@ingestro/importer-angular 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +193 -0
- package/fesm2022/index.mjs +14101 -0
- package/index.d.ts +1 -0
- package/lib/adapter.module.d.ts +8 -0
- package/lib/data-importer/data-importer.component.d.ts +1802 -0
- package/package.json +27 -0
- package/public-api.d.ts +2 -0
- package/workers/chunk-DTEAHNF5.js +21 -0
- package/workers/chunk-LMA7WTWH.js +1 -0
- package/workers/chunk-ODODIDUN.js +4 -0
- package/workers/chunk-QHRAJWCW.js +1 -0
- package/workers/chunk-ZW7EGY6P.js +1 -0
- package/workers/hooks/index.js +1 -0
- package/workers/javascript/index.js +5 -0
- package/workers/mapping/index.js +1 -0
- package/workers/matchValues/index.js +1 -0
- package/workers/parseData/index.js +186 -0
- package/workers/searchAndReplace/index.js +1 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as ro,c as Zs,d as Ks,f as K}from"./chunk-DTEAHNF5.js";import{a as pt}from"./chunk-ZW7EGY6P.js";import{a as zs,b as so,d as H}from"./chunk-LMA7WTWH.js";var qt=so((Bt,We)=>{(function(o,n){typeof Bt=="object"&&typeof We<"u"?We.exports=n():typeof define=="function"&&define.amd?define(n):o.moment=n()})(Bt,function(){"use strict";var o;function n(){return o.apply(null,arguments)}function h(e){o=e}function u(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function y(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function F(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(f(e,t))return!1;return!0}function D(e){return e===void 0}function T(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function ge(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Je(e,t){var s=[],r,a=e.length;for(r=0;r<a;++r)s.push(t(e[r],r));return s}function B(e,t){for(var s in t)f(t,s)&&(e[s]=t[s]);return f(t,"toString")&&(e.toString=t.toString),f(t,"valueOf")&&(e.valueOf=t.valueOf),e}function U(e,t,s,r){return ks(e,t,s,r,!0).utc()}function Mt(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function p(e){return e._pf==null&&(e._pf=Mt()),e._pf}var He;Array.prototype.some?He=Array.prototype.some:He=function(e){var t=Object(this),s=t.length>>>0,r;for(r=0;r<s;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function Le(e){var t=null,s=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=p(e),s=He.call(t.parsedDateParts,function(a){return a!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&s),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function ke(e){var t=U(NaN);return e!=null?B(p(t),e):p(t).userInvalidated=!0,t}var v=n.momentProperties=[],Ie=!1;function Ue(e,t){var s,r,a,i=v.length;if(D(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),D(t._i)||(e._i=t._i),D(t._f)||(e._f=t._f),D(t._l)||(e._l=t._l),D(t._strict)||(e._strict=t._strict),D(t._tzm)||(e._tzm=t._tzm),D(t._isUTC)||(e._isUTC=t._isUTC),D(t._offset)||(e._offset=t._offset),D(t._pf)||(e._pf=p(t)),D(t._locale)||(e._locale=t._locale),i>0)for(s=0;s<i;s++)r=v[s],a=t[r],D(a)||(e[r]=a);return e}function pe(e){Ue(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Ie===!1&&(Ie=!0,n.updateOffset(this),Ie=!1)}function j(e){return e instanceof pe||e!=null&&e._isAMomentObject!=null}function Qt(e){n.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function E(e,t){var s=!0;return B(function(){if(n.deprecationHandler!=null&&n.deprecationHandler(null,e),s){var r=[],a,i,l,c=arguments.length;for(i=0;i<c;i++){if(a="",typeof arguments[i]=="object"){a+=`
|
|
2
|
+
[`+i+"] ";for(l in arguments[0])f(arguments[0],l)&&(a+=l+": "+arguments[0][l]+", ");a=a.slice(0,-2)}else a=arguments[i];r.push(a)}Qt(e+`
|
|
3
|
+
Arguments: `+Array.prototype.slice.call(r).join("")+`
|
|
4
|
+
`+new Error().stack),s=!1}return t.apply(this,arguments)},t)}var Xt={};function es(e,t){n.deprecationHandler!=null&&n.deprecationHandler(e,t),Xt[e]||(Qt(t),Xt[e]=!0)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null;function q(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function rr(e){var t,s;for(s in e)f(e,s)&&(t=e[s],q(t)?this[s]=t:this["_"+s]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function St(e,t){var s=B({},e),r;for(r in t)f(t,r)&&(y(e[r])&&y(t[r])?(s[r]={},B(s[r],e[r]),B(s[r],t[r])):t[r]!=null?s[r]=t[r]:delete s[r]);for(r in e)f(e,r)&&!f(t,r)&&y(e[r])&&(s[r]=B({},s[r]));return s}function vt(e){e!=null&&this.set(e)}var kt;Object.keys?kt=Object.keys:kt=function(e){var t,s=[];for(t in e)f(e,t)&&s.push(t);return s};var ar={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function ir(e,t,s){var r=this._calendar[e]||this._calendar.sameElse;return q(r)?r.call(t,s):r}function J(e,t,s){var r=""+Math.abs(e),a=t-r.length,i=e>=0;return(i?s?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+r}var Dt=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Qe=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,bt={},De={};function _(e,t,s,r){var a=r;typeof r=="string"&&(a=function(){return this[r]()}),e&&(De[e]=a),t&&(De[t[0]]=function(){return J(a.apply(this,arguments),t[1],t[2])}),s&&(De[s]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function nr(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function or(e){var t=e.match(Dt),s,r;for(s=0,r=t.length;s<r;s++)De[t[s]]?t[s]=De[t[s]]:t[s]=nr(t[s]);return function(a){var i="",l;for(l=0;l<r;l++)i+=q(t[l])?t[l].call(a,e):t[l];return i}}function Xe(e,t){return e.isValid()?(t=ts(t,e.localeData()),bt[t]=bt[t]||or(t),bt[t](e)):e.localeData().invalidDate()}function ts(e,t){var s=5;function r(a){return t.longDateFormat(a)||a}for(Qe.lastIndex=0;s>=0&&Qe.test(e);)e=e.replace(Qe,r),Qe.lastIndex=0,s-=1;return e}var lr={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ur(e){var t=this._longDateFormat[e],s=this._longDateFormat[e.toUpperCase()];return t||!s?t:(this._longDateFormat[e]=s.match(Dt).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var dr="Invalid date";function hr(){return this._invalidDate}var fr="%d",cr=/\d{1,2}/;function mr(e){return this._ordinal.replace("%d",e)}var yr={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function _r(e,t,s,r){var a=this._relativeTime[s];return q(a)?a(e,t,s,r):a.replace(/%d/i,e)}function gr(e,t){var s=this._relativeTime[e>0?"future":"past"];return q(s)?s(t):s.replace(/%s/i,t)}var ss={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function A(e){return typeof e=="string"?ss[e]||ss[e.toLowerCase()]:void 0}function Yt(e){var t={},s,r;for(r in e)f(e,r)&&(s=A(r),s&&(t[s]=e[r]));return t}var pr={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function wr(e){var t=[],s;for(s in e)f(e,s)&&t.push({unit:s,priority:pr[s]});return t.sort(function(r,a){return r.priority-a.priority}),t}var rs=/\d/,I=/\d\d/,as=/\d{3}/,Ot=/\d{4}/,et=/[+-]?\d{6}/,Y=/\d\d?/,is=/\d\d\d\d?/,ns=/\d\d\d\d\d\d?/,tt=/\d{1,3}/,Tt=/\d{1,4}/,st=/[+-]?\d{1,6}/,be=/\d+/,rt=/[+-]?\d+/,Mr=/Z|[+-]\d\d:?\d\d/gi,at=/Z|[+-]\d\d(?::?\d\d)?/gi,Sr=/[+-]?\d+(\.\d{1,3})?/,Ee=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ye=/^[1-9]\d?/,Nt=/^([1-9]\d|\d)/,it;it={};function m(e,t,s){it[e]=q(t)?t:function(r,a){return r&&s?s:t}}function vr(e,t){return f(it,e)?it[e](t._strict,t._locale):new RegExp(kr(e))}function kr(e){return ee(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,s,r,a,i){return s||r||a||i}))}function ee(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function V(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function w(e){var t=+e,s=0;return t!==0&&isFinite(t)&&(s=V(t)),s}var xt={};function b(e,t){var s,r=t,a;for(typeof e=="string"&&(e=[e]),T(t)&&(r=function(i,l){l[t]=w(i)}),a=e.length,s=0;s<a;s++)xt[e[s]]=r}function Ae(e,t){b(e,function(s,r,a,i){a._w=a._w||{},t(s,a._w,a,i)})}function Dr(e,t,s){t!=null&&f(xt,e)&&xt[e](t,s._a,s,e)}function nt(e){return e%4===0&&e%100!==0||e%400===0}var W=0,te=1,Q=2,R=3,z=4,se=5,we=6,br=7,Yr=8;_("Y",0,0,function(){var e=this.year();return e<=9999?J(e,4):"+"+e}),_(0,["YY",2],0,function(){return this.year()%100}),_(0,["YYYY",4],0,"year"),_(0,["YYYYY",5],0,"year"),_(0,["YYYYYY",6,!0],0,"year"),m("Y",rt),m("YY",Y,I),m("YYYY",Tt,Ot),m("YYYYY",st,et),m("YYYYYY",st,et),b(["YYYYY","YYYYYY"],W),b("YYYY",function(e,t){t[W]=e.length===2?n.parseTwoDigitYear(e):w(e)}),b("YY",function(e,t){t[W]=n.parseTwoDigitYear(e)}),b("Y",function(e,t){t[W]=parseInt(e,10)});function Ve(e){return nt(e)?366:365}n.parseTwoDigitYear=function(e){return w(e)+(w(e)>68?1900:2e3)};var os=Oe("FullYear",!0);function Or(){return nt(this.year())}function Oe(e,t){return function(s){return s!=null?(ls(this,e,s),n.updateOffset(this,t),this):$e(this,e)}}function $e(e,t){if(!e.isValid())return NaN;var s=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?s.getUTCMilliseconds():s.getMilliseconds();case"Seconds":return r?s.getUTCSeconds():s.getSeconds();case"Minutes":return r?s.getUTCMinutes():s.getMinutes();case"Hours":return r?s.getUTCHours():s.getHours();case"Date":return r?s.getUTCDate():s.getDate();case"Day":return r?s.getUTCDay():s.getDay();case"Month":return r?s.getUTCMonth():s.getMonth();case"FullYear":return r?s.getUTCFullYear():s.getFullYear();default:return NaN}}function ls(e,t,s){var r,a,i,l,c;if(!(!e.isValid()||isNaN(s))){switch(r=e._d,a=e._isUTC,t){case"Milliseconds":return void(a?r.setUTCMilliseconds(s):r.setMilliseconds(s));case"Seconds":return void(a?r.setUTCSeconds(s):r.setSeconds(s));case"Minutes":return void(a?r.setUTCMinutes(s):r.setMinutes(s));case"Hours":return void(a?r.setUTCHours(s):r.setHours(s));case"Date":return void(a?r.setUTCDate(s):r.setDate(s));case"FullYear":break;default:return}i=s,l=e.month(),c=e.date(),c=c===29&&l===1&&!nt(i)?28:c,a?r.setUTCFullYear(i,l,c):r.setFullYear(i,l,c)}}function Tr(e){return e=A(e),q(this[e])?this[e]():this}function Nr(e,t){if(typeof e=="object"){e=Yt(e);var s=wr(e),r,a=s.length;for(r=0;r<a;r++)this[s[r].unit](e[s[r].unit])}else if(e=A(e),q(this[e]))return this[e](t);return this}function xr(e,t){return(e%t+t)%t}var x;Array.prototype.indexOf?x=Array.prototype.indexOf:x=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Ft(e,t){if(isNaN(e)||isNaN(t))return NaN;var s=xr(t,12);return e+=(t-s)/12,s===1?nt(e)?29:28:31-s%7%2}_("M",["MM",2],"Mo",function(){return this.month()+1}),_("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),_("MMMM",0,0,function(e){return this.localeData().months(this,e)}),m("M",Y,Ye),m("MM",Y,I),m("MMM",function(e,t){return t.monthsShortRegex(e)}),m("MMMM",function(e,t){return t.monthsRegex(e)}),b(["M","MM"],function(e,t){t[te]=w(e)-1}),b(["MMM","MMMM"],function(e,t,s,r){var a=s._locale.monthsParse(e,r,s._strict);a!=null?t[te]=a:p(s).invalidMonth=e});var Fr="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),us="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ds=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Rr=Ee,Wr=Ee;function Pr(e,t){return e?u(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ds).test(t)?"format":"standalone"][e.month()]:u(this._months)?this._months:this._months.standalone}function Cr(e,t){return e?u(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ds.test(t)?"format":"standalone"][e.month()]:u(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Hr(e,t,s){var r,a,i,l=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=U([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return s?t==="MMM"?(a=x.call(this._shortMonthsParse,l),a!==-1?a:null):(a=x.call(this._longMonthsParse,l),a!==-1?a:null):t==="MMM"?(a=x.call(this._shortMonthsParse,l),a!==-1?a:(a=x.call(this._longMonthsParse,l),a!==-1?a:null)):(a=x.call(this._longMonthsParse,l),a!==-1?a:(a=x.call(this._shortMonthsParse,l),a!==-1?a:null))}function Lr(e,t,s){var r,a,i;if(this._monthsParseExact)return Hr.call(this,e,t,s);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(a=U([2e3,r]),s&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),!s&&!this._monthsParse[r]&&(i="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),s&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(s&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!s&&this._monthsParse[r].test(e))return r}}function hs(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=w(t);else if(t=e.localeData().monthsParse(t),!T(t))return e}var s=t,r=e.date();return r=r<29?r:Math.min(r,Ft(e.year(),s)),e._isUTC?e._d.setUTCMonth(s,r):e._d.setMonth(s,r),e}function fs(e){return e!=null?(hs(this,e),n.updateOffset(this,!0),this):$e(this,"Month")}function Ir(){return Ft(this.year(),this.month())}function Ur(e){return this._monthsParseExact?(f(this,"_monthsRegex")||cs.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(f(this,"_monthsShortRegex")||(this._monthsShortRegex=Rr),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Er(e){return this._monthsParseExact?(f(this,"_monthsRegex")||cs.call(this),e?this._monthsStrictRegex:this._monthsRegex):(f(this,"_monthsRegex")||(this._monthsRegex=Wr),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function cs(){function e(g,M){return M.length-g.length}var t=[],s=[],r=[],a,i,l,c;for(a=0;a<12;a++)i=U([2e3,a]),l=ee(this.monthsShort(i,"")),c=ee(this.months(i,"")),t.push(l),s.push(c),r.push(c),r.push(l);t.sort(e),s.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Ar(e,t,s,r,a,i,l){var c;return e<100&&e>=0?(c=new Date(e+400,t,s,r,a,i,l),isFinite(c.getFullYear())&&c.setFullYear(e)):c=new Date(e,t,s,r,a,i,l),c}function Ge(e){var t,s;return e<100&&e>=0?(s=Array.prototype.slice.call(arguments),s[0]=e+400,t=new Date(Date.UTC.apply(null,s)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function ot(e,t,s){var r=7+t-s,a=(7+Ge(e,0,r).getUTCDay()-t)%7;return-a+r-1}function ms(e,t,s,r,a){var i=(7+s-r)%7,l=ot(e,r,a),c=1+7*(t-1)+i+l,g,M;return c<=0?(g=e-1,M=Ve(g)+c):c>Ve(e)?(g=e+1,M=c-Ve(e)):(g=e,M=c),{year:g,dayOfYear:M}}function je(e,t,s){var r=ot(e.year(),t,s),a=Math.floor((e.dayOfYear()-r-1)/7)+1,i,l;return a<1?(l=e.year()-1,i=a+re(l,t,s)):a>re(e.year(),t,s)?(i=a-re(e.year(),t,s),l=e.year()+1):(l=e.year(),i=a),{week:i,year:l}}function re(e,t,s){var r=ot(e,t,s),a=ot(e+1,t,s);return(Ve(e)-r+a)/7}_("w",["ww",2],"wo","week"),_("W",["WW",2],"Wo","isoWeek"),m("w",Y,Ye),m("ww",Y,I),m("W",Y,Ye),m("WW",Y,I),Ae(["w","ww","W","WW"],function(e,t,s,r){t[r.substr(0,1)]=w(e)});function Vr(e){return je(e,this._week.dow,this._week.doy).week}var $r={dow:0,doy:6};function Gr(){return this._week.dow}function jr(){return this._week.doy}function zr(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Zr(e){var t=je(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}_("d",0,"do","day"),_("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),_("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),_("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),_("e",0,0,"weekday"),_("E",0,0,"isoWeekday"),m("d",Y),m("e",Y),m("E",Y),m("dd",function(e,t){return t.weekdaysMinRegex(e)}),m("ddd",function(e,t){return t.weekdaysShortRegex(e)}),m("dddd",function(e,t){return t.weekdaysRegex(e)}),Ae(["dd","ddd","dddd"],function(e,t,s,r){var a=s._locale.weekdaysParse(e,r,s._strict);a!=null?t.d=a:p(s).invalidWeekday=e}),Ae(["d","e","E"],function(e,t,s,r){t[r]=w(e)});function Kr(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Br(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Rt(e,t){return e.slice(t,7).concat(e.slice(0,t))}var qr="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ys="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Jr="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Qr=Ee,Xr=Ee,ea=Ee;function ta(e,t){var s=u(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Rt(s,this._week.dow):e?s[e.day()]:s}function sa(e){return e===!0?Rt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ra(e){return e===!0?Rt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function aa(e,t,s){var r,a,i,l=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=U([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return s?t==="dddd"?(a=x.call(this._weekdaysParse,l),a!==-1?a:null):t==="ddd"?(a=x.call(this._shortWeekdaysParse,l),a!==-1?a:null):(a=x.call(this._minWeekdaysParse,l),a!==-1?a:null):t==="dddd"?(a=x.call(this._weekdaysParse,l),a!==-1||(a=x.call(this._shortWeekdaysParse,l),a!==-1)?a:(a=x.call(this._minWeekdaysParse,l),a!==-1?a:null)):t==="ddd"?(a=x.call(this._shortWeekdaysParse,l),a!==-1||(a=x.call(this._weekdaysParse,l),a!==-1)?a:(a=x.call(this._minWeekdaysParse,l),a!==-1?a:null)):(a=x.call(this._minWeekdaysParse,l),a!==-1||(a=x.call(this._weekdaysParse,l),a!==-1)?a:(a=x.call(this._shortWeekdaysParse,l),a!==-1?a:null))}function ia(e,t,s){var r,a,i;if(this._weekdaysParseExact)return aa.call(this,e,t,s);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(a=U([2e3,1]).day(r),s&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),s&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(s&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(s&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!s&&this._weekdaysParse[r].test(e))return r}}function na(e){if(!this.isValid())return e!=null?this:NaN;var t=$e(this,"Day");return e!=null?(e=Kr(e,this.localeData()),this.add(e-t,"d")):t}function oa(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function la(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Br(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function ua(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Wt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(f(this,"_weekdaysRegex")||(this._weekdaysRegex=Qr),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function da(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Wt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(f(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Xr),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ha(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Wt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(f(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ea),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Wt(){function e(C,le){return le.length-C.length}var t=[],s=[],r=[],a=[],i,l,c,g,M;for(i=0;i<7;i++)l=U([2e3,1]).day(i),c=ee(this.weekdaysMin(l,"")),g=ee(this.weekdaysShort(l,"")),M=ee(this.weekdays(l,"")),t.push(c),s.push(g),r.push(M),a.push(c),a.push(g),a.push(M);t.sort(e),s.sort(e),r.sort(e),a.sort(e),this._weekdaysRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Pt(){return this.hours()%12||12}function fa(){return this.hours()||24}_("H",["HH",2],0,"hour"),_("h",["hh",2],0,Pt),_("k",["kk",2],0,fa),_("hmm",0,0,function(){return""+Pt.apply(this)+J(this.minutes(),2)}),_("hmmss",0,0,function(){return""+Pt.apply(this)+J(this.minutes(),2)+J(this.seconds(),2)}),_("Hmm",0,0,function(){return""+this.hours()+J(this.minutes(),2)}),_("Hmmss",0,0,function(){return""+this.hours()+J(this.minutes(),2)+J(this.seconds(),2)});function _s(e,t){_(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}_s("a",!0),_s("A",!1);function gs(e,t){return t._meridiemParse}m("a",gs),m("A",gs),m("H",Y,Nt),m("h",Y,Ye),m("k",Y,Ye),m("HH",Y,I),m("hh",Y,I),m("kk",Y,I),m("hmm",is),m("hmmss",ns),m("Hmm",is),m("Hmmss",ns),b(["H","HH"],R),b(["k","kk"],function(e,t,s){var r=w(e);t[R]=r===24?0:r}),b(["a","A"],function(e,t,s){s._isPm=s._locale.isPM(e),s._meridiem=e}),b(["h","hh"],function(e,t,s){t[R]=w(e),p(s).bigHour=!0}),b("hmm",function(e,t,s){var r=e.length-2;t[R]=w(e.substr(0,r)),t[z]=w(e.substr(r)),p(s).bigHour=!0}),b("hmmss",function(e,t,s){var r=e.length-4,a=e.length-2;t[R]=w(e.substr(0,r)),t[z]=w(e.substr(r,2)),t[se]=w(e.substr(a)),p(s).bigHour=!0}),b("Hmm",function(e,t,s){var r=e.length-2;t[R]=w(e.substr(0,r)),t[z]=w(e.substr(r))}),b("Hmmss",function(e,t,s){var r=e.length-4,a=e.length-2;t[R]=w(e.substr(0,r)),t[z]=w(e.substr(r,2)),t[se]=w(e.substr(a))});function ca(e){return(e+"").toLowerCase().charAt(0)==="p"}var ma=/[ap]\.?m?\.?/i,ya=Oe("Hours",!0);function _a(e,t,s){return e>11?s?"pm":"PM":s?"am":"AM"}var ps={calendar:ar,longDateFormat:lr,invalidDate:dr,ordinal:fr,dayOfMonthOrdinalParse:cr,relativeTime:yr,months:Fr,monthsShort:us,week:$r,weekdays:qr,weekdaysMin:Jr,weekdaysShort:ys,meridiemParse:ma},N={},ze={},Ze;function ga(e,t){var s,r=Math.min(e.length,t.length);for(s=0;s<r;s+=1)if(e[s]!==t[s])return s;return r}function ws(e){return e&&e.toLowerCase().replace("_","-")}function pa(e){for(var t=0,s,r,a,i;t<e.length;){for(i=ws(e[t]).split("-"),s=i.length,r=ws(e[t+1]),r=r?r.split("-"):null;s>0;){if(a=lt(i.slice(0,s).join("-")),a)return a;if(r&&r.length>=s&&ga(i,r)>=s-1)break;s--}t++}return Ze}function wa(e){return!!(e&&e.match("^[^/\\\\]*$"))}function lt(e){var t=null,s;if(N[e]===void 0&&typeof We<"u"&&We&&We.exports&&wa(e))try{t=Ze._abbr,s=zs,s("./locale/"+e),ue(t)}catch{N[e]=null}return N[e]}function ue(e,t){var s;return e&&(D(t)?s=ae(e):s=Ct(e,t),s?Ze=s:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ze._abbr}function Ct(e,t){if(t!==null){var s,r=ps;if(t.abbr=e,N[e]!=null)es("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=N[e]._config;else if(t.parentLocale!=null)if(N[t.parentLocale]!=null)r=N[t.parentLocale]._config;else if(s=lt(t.parentLocale),s!=null)r=s._config;else return ze[t.parentLocale]||(ze[t.parentLocale]=[]),ze[t.parentLocale].push({name:e,config:t}),null;return N[e]=new vt(St(r,t)),ze[e]&&ze[e].forEach(function(a){Ct(a.name,a.config)}),ue(e),N[e]}else return delete N[e],null}function Ma(e,t){if(t!=null){var s,r,a=ps;N[e]!=null&&N[e].parentLocale!=null?N[e].set(St(N[e]._config,t)):(r=lt(e),r!=null&&(a=r._config),t=St(a,t),r==null&&(t.abbr=e),s=new vt(t),s.parentLocale=N[e],N[e]=s),ue(e)}else N[e]!=null&&(N[e].parentLocale!=null?(N[e]=N[e].parentLocale,e===ue()&&ue(e)):N[e]!=null&&delete N[e]);return N[e]}function ae(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ze;if(!u(e)){if(t=lt(e),t)return t;e=[e]}return pa(e)}function Sa(){return kt(N)}function Ht(e){var t,s=e._a;return s&&p(e).overflow===-2&&(t=s[te]<0||s[te]>11?te:s[Q]<1||s[Q]>Ft(s[W],s[te])?Q:s[R]<0||s[R]>24||s[R]===24&&(s[z]!==0||s[se]!==0||s[we]!==0)?R:s[z]<0||s[z]>59?z:s[se]<0||s[se]>59?se:s[we]<0||s[we]>999?we:-1,p(e)._overflowDayOfYear&&(t<W||t>Q)&&(t=Q),p(e)._overflowWeeks&&t===-1&&(t=br),p(e)._overflowWeekday&&t===-1&&(t=Yr),p(e).overflow=t),e}var va=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ka=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Da=/Z|[+-]\d\d(?::?\d\d)?/,ut=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Lt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ba=/^\/?Date\((-?\d+)/i,Ya=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Oa={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Ms(e){var t,s,r=e._i,a=va.exec(r)||ka.exec(r),i,l,c,g,M=ut.length,C=Lt.length;if(a){for(p(e).iso=!0,t=0,s=M;t<s;t++)if(ut[t][1].exec(a[1])){l=ut[t][0],i=ut[t][2]!==!1;break}if(l==null){e._isValid=!1;return}if(a[3]){for(t=0,s=C;t<s;t++)if(Lt[t][1].exec(a[3])){c=(a[2]||" ")+Lt[t][0];break}if(c==null){e._isValid=!1;return}}if(!i&&c!=null){e._isValid=!1;return}if(a[4])if(Da.exec(a[4]))g="Z";else{e._isValid=!1;return}e._f=l+(c||"")+(g||""),Ut(e)}else e._isValid=!1}function Ta(e,t,s,r,a,i){var l=[Na(e),us.indexOf(t),parseInt(s,10),parseInt(r,10),parseInt(a,10)];return i&&l.push(parseInt(i,10)),l}function Na(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function xa(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Fa(e,t,s){if(e){var r=ys.indexOf(e),a=new Date(t[0],t[1],t[2]).getDay();if(r!==a)return p(s).weekdayMismatch=!0,s._isValid=!1,!1}return!0}function Ra(e,t,s){if(e)return Oa[e];if(t)return 0;var r=parseInt(s,10),a=r%100,i=(r-a)/100;return i*60+a}function Ss(e){var t=Ya.exec(xa(e._i)),s;if(t){if(s=Ta(t[4],t[3],t[2],t[5],t[6],t[7]),!Fa(t[1],s,e))return;e._a=s,e._tzm=Ra(t[8],t[9],t[10]),e._d=Ge.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),p(e).rfc2822=!0}else e._isValid=!1}function Wa(e){var t=ba.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Ms(e),e._isValid===!1)delete e._isValid;else return;if(Ss(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:n.createFromInputFallback(e)}n.createFromInputFallback=E("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Te(e,t,s){return e??t??s}function Pa(e){var t=new Date(n.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function It(e){var t,s,r=[],a,i,l;if(!e._d){for(a=Pa(e),e._w&&e._a[Q]==null&&e._a[te]==null&&Ca(e),e._dayOfYear!=null&&(l=Te(e._a[W],a[W]),(e._dayOfYear>Ve(l)||e._dayOfYear===0)&&(p(e)._overflowDayOfYear=!0),s=Ge(l,0,e._dayOfYear),e._a[te]=s.getUTCMonth(),e._a[Q]=s.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=a[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[R]===24&&e._a[z]===0&&e._a[se]===0&&e._a[we]===0&&(e._nextDay=!0,e._a[R]=0),e._d=(e._useUTC?Ge:Ar).apply(null,r),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[R]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==i&&(p(e).weekdayMismatch=!0)}}function Ca(e){var t,s,r,a,i,l,c,g,M;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(i=1,l=4,s=Te(t.GG,e._a[W],je(O(),1,4).year),r=Te(t.W,1),a=Te(t.E,1),(a<1||a>7)&&(g=!0)):(i=e._locale._week.dow,l=e._locale._week.doy,M=je(O(),i,l),s=Te(t.gg,e._a[W],M.year),r=Te(t.w,M.week),t.d!=null?(a=t.d,(a<0||a>6)&&(g=!0)):t.e!=null?(a=t.e+i,(t.e<0||t.e>6)&&(g=!0)):a=i),r<1||r>re(s,i,l)?p(e)._overflowWeeks=!0:g!=null?p(e)._overflowWeekday=!0:(c=ms(s,r,a,i,l),e._a[W]=c.year,e._dayOfYear=c.dayOfYear)}n.ISO_8601=function(){},n.RFC_2822=function(){};function Ut(e){if(e._f===n.ISO_8601){Ms(e);return}if(e._f===n.RFC_2822){Ss(e);return}e._a=[],p(e).empty=!0;var t=""+e._i,s,r,a,i,l,c=t.length,g=0,M,C;for(a=ts(e._f,e._locale).match(Dt)||[],C=a.length,s=0;s<C;s++)i=a[s],r=(t.match(vr(i,e))||[])[0],r&&(l=t.substr(0,t.indexOf(r)),l.length>0&&p(e).unusedInput.push(l),t=t.slice(t.indexOf(r)+r.length),g+=r.length),De[i]?(r?p(e).empty=!1:p(e).unusedTokens.push(i),Dr(i,r,e)):e._strict&&!r&&p(e).unusedTokens.push(i);p(e).charsLeftOver=c-g,t.length>0&&p(e).unusedInput.push(t),e._a[R]<=12&&p(e).bigHour===!0&&e._a[R]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[R]=Ha(e._locale,e._a[R],e._meridiem),M=p(e).era,M!==null&&(e._a[W]=e._locale.erasConvertYear(M,e._a[W])),It(e),Ht(e)}function Ha(e,t,s){var r;return s==null?t:e.meridiemHour!=null?e.meridiemHour(t,s):(e.isPM!=null&&(r=e.isPM(s),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function La(e){var t,s,r,a,i,l,c=!1,g=e._f.length;if(g===0){p(e).invalidFormat=!0,e._d=new Date(NaN);return}for(a=0;a<g;a++)i=0,l=!1,t=Ue({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[a],Ut(t),Le(t)&&(l=!0),i+=p(t).charsLeftOver,i+=p(t).unusedTokens.length*10,p(t).score=i,c?i<r&&(r=i,s=t):(r==null||i<r||l)&&(r=i,s=t,l&&(c=!0));B(e,s||t)}function Ia(e){if(!e._d){var t=Yt(e._i),s=t.day===void 0?t.date:t.day;e._a=Je([t.year,t.month,s,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),It(e)}}function Ua(e){var t=new pe(Ht(vs(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function vs(e){var t=e._i,s=e._f;return e._locale=e._locale||ae(e._l),t===null||s===void 0&&t===""?ke({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),j(t)?new pe(Ht(t)):(ge(t)?e._d=t:u(s)?La(e):s?Ut(e):Ea(e),Le(e)||(e._d=null),e))}function Ea(e){var t=e._i;D(t)?e._d=new Date(n.now()):ge(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Wa(e):u(t)?(e._a=Je(t.slice(0),function(s){return parseInt(s,10)}),It(e)):y(t)?Ia(e):T(t)?e._d=new Date(t):n.createFromInputFallback(e)}function ks(e,t,s,r,a){var i={};return(t===!0||t===!1)&&(r=t,t=void 0),(s===!0||s===!1)&&(r=s,s=void 0),(y(e)&&F(e)||u(e)&&e.length===0)&&(e=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=a,i._l=s,i._i=e,i._f=t,i._strict=r,Ua(i)}function O(e,t,s,r){return ks(e,t,s,r,!1)}var Aa=E("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=O.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:ke()}),Va=E("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=O.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:ke()});function Ds(e,t){var s,r;if(t.length===1&&u(t[0])&&(t=t[0]),!t.length)return O();for(s=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](s))&&(s=t[r]);return s}function $a(){var e=[].slice.call(arguments,0);return Ds("isBefore",e)}function Ga(){var e=[].slice.call(arguments,0);return Ds("isAfter",e)}var ja=function(){return Date.now?Date.now():+new Date},Ke=["year","quarter","month","week","day","hour","minute","second","millisecond"];function za(e){var t,s=!1,r,a=Ke.length;for(t in e)if(f(e,t)&&!(x.call(Ke,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<a;++r)if(e[Ke[r]]){if(s)return!1;parseFloat(e[Ke[r]])!==w(e[Ke[r]])&&(s=!0)}return!0}function Za(){return this._isValid}function Ka(){return Z(NaN)}function dt(e){var t=Yt(e),s=t.year||0,r=t.quarter||0,a=t.month||0,i=t.week||t.isoWeek||0,l=t.day||0,c=t.hour||0,g=t.minute||0,M=t.second||0,C=t.millisecond||0;this._isValid=za(t),this._milliseconds=+C+M*1e3+g*6e4+c*1e3*60*60,this._days=+l+i*7,this._months=+a+r*3+s*12,this._data={},this._locale=ae(),this._bubble()}function ht(e){return e instanceof dt}function Et(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Ba(e,t,s){var r=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),i=0,l;for(l=0;l<r;l++)(s&&e[l]!==t[l]||!s&&w(e[l])!==w(t[l]))&&i++;return i+a}function bs(e,t){_(e,0,0,function(){var s=this.utcOffset(),r="+";return s<0&&(s=-s,r="-"),r+J(~~(s/60),2)+t+J(~~s%60,2)})}bs("Z",":"),bs("ZZ",""),m("Z",at),m("ZZ",at),b(["Z","ZZ"],function(e,t,s){s._useUTC=!0,s._tzm=At(at,e)});var qa=/([\+\-]|\d\d)/gi;function At(e,t){var s=(t||"").match(e),r,a,i;return s===null?null:(r=s[s.length-1]||[],a=(r+"").match(qa)||["-",0,0],i=+(a[1]*60)+w(a[2]),i===0?0:a[0]==="+"?i:-i)}function Vt(e,t){var s,r;return t._isUTC?(s=t.clone(),r=(j(e)||ge(e)?e.valueOf():O(e).valueOf())-s.valueOf(),s._d.setTime(s._d.valueOf()+r),n.updateOffset(s,!1),s):O(e).local()}function $t(e){return-Math.round(e._d.getTimezoneOffset())}n.updateOffset=function(){};function Ja(e,t,s){var r=this._offset||0,a;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=At(at,e),e===null)return this}else Math.abs(e)<16&&!s&&(e=e*60);return!this._isUTC&&t&&(a=$t(this)),this._offset=e,this._isUTC=!0,a!=null&&this.add(a,"m"),r!==e&&(!t||this._changeInProgress?Ns(this,Z(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:$t(this)}function Qa(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Xa(e){return this.utcOffset(0,e)}function ei(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract($t(this),"m")),this}function ti(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=At(Mr,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function si(e){return this.isValid()?(e=e?O(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function ri(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ai(){if(!D(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Ue(e,this),e=vs(e),e._a?(t=e._isUTC?U(e._a):O(e._a),this._isDSTShifted=this.isValid()&&Ba(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ii(){return this.isValid()?!this._isUTC:!1}function ni(){return this.isValid()?this._isUTC:!1}function Ys(){return this.isValid()?this._isUTC&&this._offset===0:!1}var oi=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,li=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Z(e,t){var s=e,r=null,a,i,l;return ht(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:T(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(r=oi.exec(e))?(a=r[1]==="-"?-1:1,s={y:0,d:w(r[Q])*a,h:w(r[R])*a,m:w(r[z])*a,s:w(r[se])*a,ms:w(Et(r[we]*1e3))*a}):(r=li.exec(e))?(a=r[1]==="-"?-1:1,s={y:Me(r[2],a),M:Me(r[3],a),w:Me(r[4],a),d:Me(r[5],a),h:Me(r[6],a),m:Me(r[7],a),s:Me(r[8],a)}):s==null?s={}:typeof s=="object"&&("from"in s||"to"in s)&&(l=ui(O(s.from),O(s.to)),s={},s.ms=l.milliseconds,s.M=l.months),i=new dt(s),ht(e)&&f(e,"_locale")&&(i._locale=e._locale),ht(e)&&f(e,"_isValid")&&(i._isValid=e._isValid),i}Z.fn=dt.prototype,Z.invalid=Ka;function Me(e,t){var s=e&&parseFloat(e.replace(",","."));return(isNaN(s)?0:s)*t}function Os(e,t){var s={};return s.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(s.months,"M").isAfter(t)&&--s.months,s.milliseconds=+t-+e.clone().add(s.months,"M"),s}function ui(e,t){var s;return e.isValid()&&t.isValid()?(t=Vt(t,e),e.isBefore(t)?s=Os(e,t):(s=Os(t,e),s.milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0}}function Ts(e,t){return function(s,r){var a,i;return r!==null&&!isNaN(+r)&&(es(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=s,s=r,r=i),a=Z(s,r),Ns(this,a,e),this}}function Ns(e,t,s,r){var a=t._milliseconds,i=Et(t._days),l=Et(t._months);e.isValid()&&(r=r??!0,l&&hs(e,$e(e,"Month")+l*s),i&&ls(e,"Date",$e(e,"Date")+i*s),a&&e._d.setTime(e._d.valueOf()+a*s),r&&n.updateOffset(e,i||l))}var di=Ts(1,"add"),hi=Ts(-1,"subtract");function xs(e){return typeof e=="string"||e instanceof String}function fi(e){return j(e)||ge(e)||xs(e)||T(e)||mi(e)||ci(e)||e===null||e===void 0}function ci(e){var t=y(e)&&!F(e),s=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a,i,l=r.length;for(a=0;a<l;a+=1)i=r[a],s=s||f(e,i);return t&&s}function mi(e){var t=u(e),s=!1;return t&&(s=e.filter(function(r){return!T(r)&&xs(e)}).length===0),t&&s}function yi(e){var t=y(e)&&!F(e),s=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],a,i;for(a=0;a<r.length;a+=1)i=r[a],s=s||f(e,i);return t&&s}function _i(e,t){var s=e.diff(t,"days",!0);return s<-6?"sameElse":s<-1?"lastWeek":s<0?"lastDay":s<1?"sameDay":s<2?"nextDay":s<7?"nextWeek":"sameElse"}function gi(e,t){arguments.length===1&&(arguments[0]?fi(arguments[0])?(e=arguments[0],t=void 0):yi(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var s=e||O(),r=Vt(s,this).startOf("day"),a=n.calendarFormat(this,r)||"sameElse",i=t&&(q(t[a])?t[a].call(this,s):t[a]);return this.format(i||this.localeData().calendar(a,this,O(s)))}function pi(){return new pe(this)}function wi(e,t){var s=j(e)?e:O(e);return this.isValid()&&s.isValid()?(t=A(t)||"millisecond",t==="millisecond"?this.valueOf()>s.valueOf():s.valueOf()<this.clone().startOf(t).valueOf()):!1}function Mi(e,t){var s=j(e)?e:O(e);return this.isValid()&&s.isValid()?(t=A(t)||"millisecond",t==="millisecond"?this.valueOf()<s.valueOf():this.clone().endOf(t).valueOf()<s.valueOf()):!1}function Si(e,t,s,r){var a=j(e)?e:O(e),i=j(t)?t:O(t);return this.isValid()&&a.isValid()&&i.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(a,s):!this.isBefore(a,s))&&(r[1]===")"?this.isBefore(i,s):!this.isAfter(i,s))):!1}function vi(e,t){var s=j(e)?e:O(e),r;return this.isValid()&&s.isValid()?(t=A(t)||"millisecond",t==="millisecond"?this.valueOf()===s.valueOf():(r=s.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function ki(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Di(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function bi(e,t,s){var r,a,i;if(!this.isValid())return NaN;if(r=Vt(e,this),!r.isValid())return NaN;switch(a=(r.utcOffset()-this.utcOffset())*6e4,t=A(t),t){case"year":i=ft(this,r)/12;break;case"month":i=ft(this,r);break;case"quarter":i=ft(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-a)/864e5;break;case"week":i=(this-r-a)/6048e5;break;default:i=this-r}return s?i:V(i)}function ft(e,t){if(e.date()<t.date())return-ft(t,e);var s=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(s,"months"),a,i;return t-r<0?(a=e.clone().add(s-1,"months"),i=(t-r)/(r-a)):(a=e.clone().add(s+1,"months"),i=(t-r)/(a-r)),-(s+i)||0}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Yi(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Oi(e){if(!this.isValid())return null;var t=e!==!0,s=t?this.clone().utc():this;return s.year()<0||s.year()>9999?Xe(s,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):q(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Xe(s,"Z")):Xe(s,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Ti(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",s,r,a,i;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),s="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a="-MM-DD[T]HH:mm:ss.SSS",i=t+'[")]',this.format(s+r+a+i)}function Ni(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=Xe(this,e);return this.localeData().postformat(t)}function xi(e,t){return this.isValid()&&(j(e)&&e.isValid()||O(e).isValid())?Z({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Fi(e){return this.from(O(),e)}function Ri(e,t){return this.isValid()&&(j(e)&&e.isValid()||O(e).isValid())?Z({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Wi(e){return this.to(O(),e)}function Fs(e){var t;return e===void 0?this._locale._abbr:(t=ae(e),t!=null&&(this._locale=t),this)}var Rs=E("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Ws(){return this._locale}var ct=1e3,Ne=60*ct,mt=60*Ne,Ps=(365*400+97)*24*mt;function xe(e,t){return(e%t+t)%t}function Cs(e,t,s){return e<100&&e>=0?new Date(e+400,t,s)-Ps:new Date(e,t,s).valueOf()}function Hs(e,t,s){return e<100&&e>=0?Date.UTC(e+400,t,s)-Ps:Date.UTC(e,t,s)}function Pi(e){var t,s;if(e=A(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(s=this._isUTC?Hs:Cs,e){case"year":t=s(this.year(),0,1);break;case"quarter":t=s(this.year(),this.month()-this.month()%3,1);break;case"month":t=s(this.year(),this.month(),1);break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=s(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=xe(t+(this._isUTC?0:this.utcOffset()*Ne),mt);break;case"minute":t=this._d.valueOf(),t-=xe(t,Ne);break;case"second":t=this._d.valueOf(),t-=xe(t,ct);break}return this._d.setTime(t),n.updateOffset(this,!0),this}function Ci(e){var t,s;if(e=A(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(s=this._isUTC?Hs:Cs,e){case"year":t=s(this.year()+1,0,1)-1;break;case"quarter":t=s(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=s(this.year(),this.month()+1,1)-1;break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=s(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=mt-xe(t+(this._isUTC?0:this.utcOffset()*Ne),mt)-1;break;case"minute":t=this._d.valueOf(),t+=Ne-xe(t,Ne)-1;break;case"second":t=this._d.valueOf(),t+=ct-xe(t,ct)-1;break}return this._d.setTime(t),n.updateOffset(this,!0),this}function Hi(){return this._d.valueOf()-(this._offset||0)*6e4}function Li(){return Math.floor(this.valueOf()/1e3)}function Ii(){return new Date(this.valueOf())}function Ui(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Ei(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Ai(){return this.isValid()?this.toISOString():null}function Vi(){return Le(this)}function $i(){return B({},p(this))}function Gi(){return p(this).overflow}function ji(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}_("N",0,0,"eraAbbr"),_("NN",0,0,"eraAbbr"),_("NNN",0,0,"eraAbbr"),_("NNNN",0,0,"eraName"),_("NNNNN",0,0,"eraNarrow"),_("y",["y",1],"yo","eraYear"),_("y",["yy",2],0,"eraYear"),_("y",["yyy",3],0,"eraYear"),_("y",["yyyy",4],0,"eraYear"),m("N",Gt),m("NN",Gt),m("NNN",Gt),m("NNNN",sn),m("NNNNN",rn),b(["N","NN","NNN","NNNN","NNNNN"],function(e,t,s,r){var a=s._locale.erasParse(e,r,s._strict);a?p(s).era=a:p(s).invalidEra=e}),m("y",be),m("yy",be),m("yyy",be),m("yyyy",be),m("yo",an),b(["y","yy","yyy","yyyy"],W),b(["yo"],function(e,t,s,r){var a;s._locale._eraYearOrdinalRegex&&(a=e.match(s._locale._eraYearOrdinalRegex)),s._locale.eraYearOrdinalParse?t[W]=s._locale.eraYearOrdinalParse(e,a):t[W]=parseInt(e,10)});function zi(e,t){var s,r,a,i=this._eras||ae("en")._eras;for(s=0,r=i.length;s<r;++s){switch(typeof i[s].since){case"string":a=n(i[s].since).startOf("day"),i[s].since=a.valueOf();break}switch(typeof i[s].until){case"undefined":i[s].until=1/0;break;case"string":a=n(i[s].until).startOf("day").valueOf(),i[s].until=a.valueOf();break}}return i}function Zi(e,t,s){var r,a,i=this.eras(),l,c,g;for(e=e.toUpperCase(),r=0,a=i.length;r<a;++r)if(l=i[r].name.toUpperCase(),c=i[r].abbr.toUpperCase(),g=i[r].narrow.toUpperCase(),s)switch(t){case"N":case"NN":case"NNN":if(c===e)return i[r];break;case"NNNN":if(l===e)return i[r];break;case"NNNNN":if(g===e)return i[r];break}else if([l,c,g].indexOf(e)>=0)return i[r]}function Ki(e,t){var s=e.since<=e.until?1:-1;return t===void 0?n(e.since).year():n(e.since).year()+(t-e.offset)*s}function Bi(){var e,t,s,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(s=this.clone().startOf("day").valueOf(),r[e].since<=s&&s<=r[e].until||r[e].until<=s&&s<=r[e].since)return r[e].name;return""}function qi(){var e,t,s,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(s=this.clone().startOf("day").valueOf(),r[e].since<=s&&s<=r[e].until||r[e].until<=s&&s<=r[e].since)return r[e].narrow;return""}function Ji(){var e,t,s,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(s=this.clone().startOf("day").valueOf(),r[e].since<=s&&s<=r[e].until||r[e].until<=s&&s<=r[e].since)return r[e].abbr;return""}function Qi(){var e,t,s,r,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(s=a[e].since<=a[e].until?1:-1,r=this.clone().startOf("day").valueOf(),a[e].since<=r&&r<=a[e].until||a[e].until<=r&&r<=a[e].since)return(this.year()-n(a[e].since).year())*s+a[e].offset;return this.year()}function Xi(e){return f(this,"_erasNameRegex")||jt.call(this),e?this._erasNameRegex:this._erasRegex}function en(e){return f(this,"_erasAbbrRegex")||jt.call(this),e?this._erasAbbrRegex:this._erasRegex}function tn(e){return f(this,"_erasNarrowRegex")||jt.call(this),e?this._erasNarrowRegex:this._erasRegex}function Gt(e,t){return t.erasAbbrRegex(e)}function sn(e,t){return t.erasNameRegex(e)}function rn(e,t){return t.erasNarrowRegex(e)}function an(e,t){return t._eraYearOrdinalRegex||be}function jt(){var e=[],t=[],s=[],r=[],a,i,l,c,g,M=this.eras();for(a=0,i=M.length;a<i;++a)l=ee(M[a].name),c=ee(M[a].abbr),g=ee(M[a].narrow),t.push(l),e.push(c),s.push(g),r.push(l),r.push(c),r.push(g);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+s.join("|")+")","i")}_(0,["gg",2],0,function(){return this.weekYear()%100}),_(0,["GG",2],0,function(){return this.isoWeekYear()%100});function yt(e,t){_(0,[e,e.length],0,t)}yt("gggg","weekYear"),yt("ggggg","weekYear"),yt("GGGG","isoWeekYear"),yt("GGGGG","isoWeekYear"),m("G",rt),m("g",rt),m("GG",Y,I),m("gg",Y,I),m("GGGG",Tt,Ot),m("gggg",Tt,Ot),m("GGGGG",st,et),m("ggggg",st,et),Ae(["gggg","ggggg","GGGG","GGGGG"],function(e,t,s,r){t[r.substr(0,2)]=w(e)}),Ae(["gg","GG"],function(e,t,s,r){t[r]=n.parseTwoDigitYear(e)});function nn(e){return Ls.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function on(e){return Ls.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function ln(){return re(this.year(),1,4)}function un(){return re(this.isoWeekYear(),1,4)}function dn(){var e=this.localeData()._week;return re(this.year(),e.dow,e.doy)}function hn(){var e=this.localeData()._week;return re(this.weekYear(),e.dow,e.doy)}function Ls(e,t,s,r,a){var i;return e==null?je(this,r,a).year:(i=re(e,r,a),t>i&&(t=i),fn.call(this,e,t,s,r,a))}function fn(e,t,s,r,a){var i=ms(e,t,s,r,a),l=Ge(i.year,0,i.dayOfYear);return this.year(l.getUTCFullYear()),this.month(l.getUTCMonth()),this.date(l.getUTCDate()),this}_("Q",0,"Qo","quarter"),m("Q",rs),b("Q",function(e,t){t[te]=(w(e)-1)*3});function cn(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}_("D",["DD",2],"Do","date"),m("D",Y,Ye),m("DD",Y,I),m("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),b(["D","DD"],Q),b("Do",function(e,t){t[Q]=w(e.match(Y)[0])});var Is=Oe("Date",!0);_("DDD",["DDDD",3],"DDDo","dayOfYear"),m("DDD",tt),m("DDDD",as),b(["DDD","DDDD"],function(e,t,s){s._dayOfYear=w(e)});function mn(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}_("m",["mm",2],0,"minute"),m("m",Y,Nt),m("mm",Y,I),b(["m","mm"],z);var yn=Oe("Minutes",!1);_("s",["ss",2],0,"second"),m("s",Y,Nt),m("ss",Y,I),b(["s","ss"],se);var _n=Oe("Seconds",!1);_("S",0,0,function(){return~~(this.millisecond()/100)}),_(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),_(0,["SSS",3],0,"millisecond"),_(0,["SSSS",4],0,function(){return this.millisecond()*10}),_(0,["SSSSS",5],0,function(){return this.millisecond()*100}),_(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),_(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),_(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),_(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),m("S",tt,rs),m("SS",tt,I),m("SSS",tt,as);var de,Us;for(de="SSSS";de.length<=9;de+="S")m(de,be);function gn(e,t){t[we]=w(("0."+e)*1e3)}for(de="S";de.length<=9;de+="S")b(de,gn);Us=Oe("Milliseconds",!1),_("z",0,0,"zoneAbbr"),_("zz",0,0,"zoneName");function pn(){return this._isUTC?"UTC":""}function wn(){return this._isUTC?"Coordinated Universal Time":""}var d=pe.prototype;d.add=di,d.calendar=gi,d.clone=pi,d.diff=bi,d.endOf=Ci,d.format=Ni,d.from=xi,d.fromNow=Fi,d.to=Ri,d.toNow=Wi,d.get=Tr,d.invalidAt=Gi,d.isAfter=wi,d.isBefore=Mi,d.isBetween=Si,d.isSame=vi,d.isSameOrAfter=ki,d.isSameOrBefore=Di,d.isValid=Vi,d.lang=Rs,d.locale=Fs,d.localeData=Ws,d.max=Va,d.min=Aa,d.parsingFlags=$i,d.set=Nr,d.startOf=Pi,d.subtract=hi,d.toArray=Ui,d.toObject=Ei,d.toDate=Ii,d.toISOString=Oi,d.inspect=Ti,typeof Symbol<"u"&&Symbol.for!=null&&(d[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),d.toJSON=Ai,d.toString=Yi,d.unix=Li,d.valueOf=Hi,d.creationData=ji,d.eraName=Bi,d.eraNarrow=qi,d.eraAbbr=Ji,d.eraYear=Qi,d.year=os,d.isLeapYear=Or,d.weekYear=nn,d.isoWeekYear=on,d.quarter=d.quarters=cn,d.month=fs,d.daysInMonth=Ir,d.week=d.weeks=zr,d.isoWeek=d.isoWeeks=Zr,d.weeksInYear=dn,d.weeksInWeekYear=hn,d.isoWeeksInYear=ln,d.isoWeeksInISOWeekYear=un,d.date=Is,d.day=d.days=na,d.weekday=oa,d.isoWeekday=la,d.dayOfYear=mn,d.hour=d.hours=ya,d.minute=d.minutes=yn,d.second=d.seconds=_n,d.millisecond=d.milliseconds=Us,d.utcOffset=Ja,d.utc=Xa,d.local=ei,d.parseZone=ti,d.hasAlignedHourOffset=si,d.isDST=ri,d.isLocal=ii,d.isUtcOffset=ni,d.isUtc=Ys,d.isUTC=Ys,d.zoneAbbr=pn,d.zoneName=wn,d.dates=E("dates accessor is deprecated. Use date instead.",Is),d.months=E("months accessor is deprecated. Use month instead",fs),d.years=E("years accessor is deprecated. Use year instead",os),d.zone=E("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Qa),d.isDSTShifted=E("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ai);function Mn(e){return O(e*1e3)}function Sn(){return O.apply(null,arguments).parseZone()}function Es(e){return e}var k=vt.prototype;k.calendar=ir,k.longDateFormat=ur,k.invalidDate=hr,k.ordinal=mr,k.preparse=Es,k.postformat=Es,k.relativeTime=_r,k.pastFuture=gr,k.set=rr,k.eras=zi,k.erasParse=Zi,k.erasConvertYear=Ki,k.erasAbbrRegex=en,k.erasNameRegex=Xi,k.erasNarrowRegex=tn,k.months=Pr,k.monthsShort=Cr,k.monthsParse=Lr,k.monthsRegex=Er,k.monthsShortRegex=Ur,k.week=Vr,k.firstDayOfYear=jr,k.firstDayOfWeek=Gr,k.weekdays=ta,k.weekdaysMin=ra,k.weekdaysShort=sa,k.weekdaysParse=ia,k.weekdaysRegex=ua,k.weekdaysShortRegex=da,k.weekdaysMinRegex=ha,k.isPM=ca,k.meridiem=_a;function _t(e,t,s,r){var a=ae(),i=U().set(r,t);return a[s](i,e)}function As(e,t,s){if(T(e)&&(t=e,e=void 0),e=e||"",t!=null)return _t(e,t,s,"month");var r,a=[];for(r=0;r<12;r++)a[r]=_t(e,r,s,"month");return a}function zt(e,t,s,r){typeof e=="boolean"?(T(t)&&(s=t,t=void 0),t=t||""):(t=e,s=t,e=!1,T(t)&&(s=t,t=void 0),t=t||"");var a=ae(),i=e?a._week.dow:0,l,c=[];if(s!=null)return _t(t,(s+i)%7,r,"day");for(l=0;l<7;l++)c[l]=_t(t,(l+i)%7,r,"day");return c}function vn(e,t){return As(e,t,"months")}function kn(e,t){return As(e,t,"monthsShort")}function Dn(e,t,s){return zt(e,t,s,"weekdays")}function bn(e,t,s){return zt(e,t,s,"weekdaysShort")}function Yn(e,t,s){return zt(e,t,s,"weekdaysMin")}ue("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,s=w(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+s}}),n.lang=E("moment.lang is deprecated. Use moment.locale instead.",ue),n.langData=E("moment.langData is deprecated. Use moment.localeData instead.",ae);var ie=Math.abs;function On(){var e=this._data;return this._milliseconds=ie(this._milliseconds),this._days=ie(this._days),this._months=ie(this._months),e.milliseconds=ie(e.milliseconds),e.seconds=ie(e.seconds),e.minutes=ie(e.minutes),e.hours=ie(e.hours),e.months=ie(e.months),e.years=ie(e.years),this}function Vs(e,t,s,r){var a=Z(t,s);return e._milliseconds+=r*a._milliseconds,e._days+=r*a._days,e._months+=r*a._months,e._bubble()}function Tn(e,t){return Vs(this,e,t,1)}function Nn(e,t){return Vs(this,e,t,-1)}function $s(e){return e<0?Math.floor(e):Math.ceil(e)}function xn(){var e=this._milliseconds,t=this._days,s=this._months,r=this._data,a,i,l,c,g;return e>=0&&t>=0&&s>=0||e<=0&&t<=0&&s<=0||(e+=$s(Zt(s)+t)*864e5,t=0,s=0),r.milliseconds=e%1e3,a=V(e/1e3),r.seconds=a%60,i=V(a/60),r.minutes=i%60,l=V(i/60),r.hours=l%24,t+=V(l/24),g=V(Gs(t)),s+=g,t-=$s(Zt(g)),c=V(s/12),s%=12,r.days=t,r.months=s,r.years=c,this}function Gs(e){return e*4800/146097}function Zt(e){return e*146097/4800}function Fn(e){if(!this.isValid())return NaN;var t,s,r=this._milliseconds;if(e=A(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,s=this._months+Gs(t),e){case"month":return s;case"quarter":return s/3;case"year":return s/12}else switch(t=this._days+Math.round(Zt(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function ne(e){return function(){return this.as(e)}}var js=ne("ms"),Rn=ne("s"),Wn=ne("m"),Pn=ne("h"),Cn=ne("d"),Hn=ne("w"),Ln=ne("M"),In=ne("Q"),Un=ne("y"),En=js;function An(){return Z(this)}function Vn(e){return e=A(e),this.isValid()?this[e+"s"]():NaN}function Se(e){return function(){return this.isValid()?this._data[e]:NaN}}var $n=Se("milliseconds"),Gn=Se("seconds"),jn=Se("minutes"),zn=Se("hours"),Zn=Se("days"),Kn=Se("months"),Bn=Se("years");function qn(){return V(this.days()/7)}var oe=Math.round,Fe={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Jn(e,t,s,r,a){return a.relativeTime(t||1,!!s,e,r)}function Qn(e,t,s,r){var a=Z(e).abs(),i=oe(a.as("s")),l=oe(a.as("m")),c=oe(a.as("h")),g=oe(a.as("d")),M=oe(a.as("M")),C=oe(a.as("w")),le=oe(a.as("y")),he=i<=s.ss&&["s",i]||i<s.s&&["ss",i]||l<=1&&["m"]||l<s.m&&["mm",l]||c<=1&&["h"]||c<s.h&&["hh",c]||g<=1&&["d"]||g<s.d&&["dd",g];return s.w!=null&&(he=he||C<=1&&["w"]||C<s.w&&["ww",C]),he=he||M<=1&&["M"]||M<s.M&&["MM",M]||le<=1&&["y"]||["yy",le],he[2]=t,he[3]=+e>0,he[4]=r,Jn.apply(null,he)}function Xn(e){return e===void 0?oe:typeof e=="function"?(oe=e,!0):!1}function eo(e,t){return Fe[e]===void 0?!1:t===void 0?Fe[e]:(Fe[e]=t,e==="s"&&(Fe.ss=t-1),!0)}function to(e,t){if(!this.isValid())return this.localeData().invalidDate();var s=!1,r=Fe,a,i;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(s=e),typeof t=="object"&&(r=Object.assign({},Fe,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),a=this.localeData(),i=Qn(this,!s,r,a),s&&(i=a.pastFuture(+this,i)),a.postformat(i)}var Kt=Math.abs;function Re(e){return(e>0)-(e<0)||+e}function gt(){if(!this.isValid())return this.localeData().invalidDate();var e=Kt(this._milliseconds)/1e3,t=Kt(this._days),s=Kt(this._months),r,a,i,l,c=this.asSeconds(),g,M,C,le;return c?(r=V(e/60),a=V(r/60),e%=60,r%=60,i=V(s/12),s%=12,l=e?e.toFixed(3).replace(/\.?0+$/,""):"",g=c<0?"-":"",M=Re(this._months)!==Re(c)?"-":"",C=Re(this._days)!==Re(c)?"-":"",le=Re(this._milliseconds)!==Re(c)?"-":"",g+"P"+(i?M+i+"Y":"")+(s?M+s+"M":"")+(t?C+t+"D":"")+(a||r||e?"T":"")+(a?le+a+"H":"")+(r?le+r+"M":"")+(e?le+l+"S":"")):"P0D"}var S=dt.prototype;S.isValid=Za,S.abs=On,S.add=Tn,S.subtract=Nn,S.as=Fn,S.asMilliseconds=js,S.asSeconds=Rn,S.asMinutes=Wn,S.asHours=Pn,S.asDays=Cn,S.asWeeks=Hn,S.asMonths=Ln,S.asQuarters=In,S.asYears=Un,S.valueOf=En,S._bubble=xn,S.clone=An,S.get=Vn,S.milliseconds=$n,S.seconds=Gn,S.minutes=jn,S.hours=zn,S.days=Zn,S.weeks=qn,S.months=Kn,S.years=Bn,S.humanize=to,S.toISOString=gt,S.toString=gt,S.toJSON=gt,S.locale=Fs,S.localeData=Ws,S.toIsoString=E("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",gt),S.lang=Rs,_("X",0,0,"unix"),_("x",0,0,"valueOf"),m("x",rt),m("X",Sr),b("X",function(e,t,s){s._d=new Date(parseFloat(e)*1e3)}),b("x",function(e,t,s){s._d=new Date(w(e))});return n.version="2.30.1",h(O),n.fn=d,n.min=$a,n.max=Ga,n.now=ja,n.utc=U,n.unix=Mn,n.months=vn,n.isDate=ge,n.locale=ue,n.invalid=ke,n.duration=Z,n.isMoment=j,n.weekdays=Dn,n.parseZone=Sn,n.localeData=ae,n.isDuration=ht,n.monthsShort=kn,n.weekdaysMin=Yn,n.defineLocale=Ct,n.updateLocale=Ma,n.locales=Sa,n.weekdaysShort=bn,n.normalizeUnits=A,n.relativeTimeRounding=Xn,n.relativeTimeThreshold=eo,n.calendarFormat=_i,n.prototype=d,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n})});var Pe=H(K()),Js=H(ro()),Qs=H(K()),Ce=H(K()),G=H(K()),ce=H(K()),me=H(K()),X=H(K()),ye=H(K());var Be=H(qt());var _e=H(K()),qe=H(qt()),sr=H(K()),wt=H(K()),L,fe=(L=class{static convertToFormat(n,h){if(n==null||n===""||typeof n=="string"&&n.trim()==="")return"";let u="";if(typeof n=="string"){let T=this.convertStringToNumber(n,{targetFormat:h?.targetFormat});if(T===null)return n;u=T}else if(typeof n=="number"){let T=n;h?.adornment==="percentage"&&(T=n*100,T=Number(T.toFixed(10))),u=T.toString()}else throw new Error(`[convertToFormat] unsupported type of the "value" - ${typeof n}`);let[y,f]=u.split("."),F=h?.decimalDigits||f?.length||0,D="";try{D=(0,Js.default)(u).format({thousandSeparated:!0,mantissa:F})}catch{return u}if(h?.targetFormat==="eu"){let T=D.replace(/,/g,"$").replace(/\./g,",").replace(/\$/g,".");return this.appendAdornment(T,h)}return this.appendAdornment(D,h)}static detectNumberFormat(n,h){let u=[];for(let D=0;D<n.length;D++)(n[D]===","||n[D]===".")&&u.push(n[D]);if(u.length===0)return;let y=n.replace(/([+\-EUR€SD$%\s])/g,"");if(u.length===1){let[D,T]=y.split(u[0]);return D.length>3||D.replace(/0/g,"")===""?u[0]===","?"eu":"us":T.length===3?h?.targetFormat?h?.targetFormat:h?.resolveUncertainty===!1?void 0:u[0]===","?"us":"eu":u[0]===","?"eu":"us"}let f=/^([1-9]\d{0,2})(\.\d{3})*(,\d+)?$/,F=/^([1-9]\d{0,2})(,\d{3})*(\.\d+)?$/;return f.test(y)?"eu":F.test(y)?"us":null}static convertToUsWithDecimal(n,h){let u=n,y=L.getDelimiters(n),f=n.replace(/([+\-EUR€SD$%\s])/g,"");if(y.length===1){let[F,D]=f.split(y[0]);if(D.length===3)return h==="us"?u=`${n}`?.replace(/,/g,""):u=`${n}`?.replace(/\./g,"$")?.replace(/,/,".").replace(/\$/g,""),u}return this.replaceDelimiter(n)}static hasDecimalPart(n,h){if(typeof n=="number")return n%1!==0;let u=n.trim(),y=h||this.detectNumberFormat(u);return y===null?!1:y==="us"?n.includes("."):n.includes(",")}static appendAdornment(n,h){return h?.adornment==="currency"?h.symbol==="us"?`${this.currencySymbol.us}${n}`:`${n} ${this.currencySymbol[h.symbol??"eu"]}`:h?.adornment==="percentage"?`${n} ${this.percentageSymbol}`:n}static getDelimiters(n){let h=[];for(let u=0;u<n.length;u++)(n[u]===","||n[u]===".")&&h.push(n[u]);return h}static replaceDelimiter(n){let h=n,u=L.detectNumberFormat(`${n}`);return(0,Qs.isNil)(u)?null:(u==="eu"?h=`${n}`?.replace(/\./g,"$")?.replace(/,/,".").replace(/\$/g,""):h=`${n}`?.replace(/,/g,""),h)}},L.currencySymbol={eu:"\u20AC",us:"$"},L.percentageSymbol="%",L.maxSafeNumberLength=17,L.convertStringToNumber=(n,h)=>{if(typeof n=="number")return`${n}`;if(typeof n!="string")return null;let u=n.trim().replace(/([EUR€SD$%\s])/g,"");if(u==="")return n;let y=h?.format||L.detectNumberFormat(u,{targetFormat:h?.targetFormat}),f="";if(y===null||(y==="us"?f=u.replace(/,/g,""):f=u.replace(/\./g,"$").replace(/,/,".").replace(/\$/g,""),f.length>L.maxSafeNumberLength&&(f=f.slice(0,L.maxSafeNumberLength),f.at(-1)==="."&&(f=f.slice(0,L.maxSafeNumberLength-1))),isNaN(Number(f))))return null;if(h?.adornment==="percentage"&&n.includes("%")){let F=Number(f)/100;f=Number(F.toFixed(10)).toString()}return f},L),Xs=()=>pt.getInstance().getTruthyWords(),er=()=>pt.getInstance().getFalsyWords();var Go=[...Xs(),...er()],ao=class{constructor(){this.parse=(o,n)=>(0,Ce.isNil)(o)||(0,Ce.isArray)(o)||(0,Ce.isObject)(o)?null:Xs().includes(`${o}`.toLowerCase())?!0:er().includes(`${o}`.toLowerCase())?!1:o===""?null:`${o}`}},io=ao,no=class{constructor(){this.parseSingle=(o,n)=>(0,G.isNil)(o)||(0,G.isObject)(o)||(0,G.isArray)(o)?null:(0,G.isBoolean)(o)?JSON.stringify(o):o===""?null:Jt({value:o,dataModel:n.dataModel,isTrim:!0}),this.parseMultiple=(o,n)=>(0,G.isArray)(o)?o.map(h=>Jt({value:h,dataModel:n.dataModel,isTrim:!0})):(0,G.isNil)(o)||(0,G.isObject)(o)||o===""?null:(0,G.isBoolean)(o)?[JSON.stringify(o)]:[Jt({value:o,dataModel:n.dataModel,isTrim:!0})],this.parse=(o,n)=>n.dataModel.getIsMultiSelection()&&!n.forceSingle?this.parseMultiple(o,n):this.parseSingle(o,n)}},oo=no,lo=class{constructor(){this.parse=(o,n)=>(0,ce.isNil)(o)||(0,ce.isArray)(o)||(0,ce.isObject)(o)?null:(0,ce.isBoolean)(o)?JSON.stringify(o):o===""?null:P(`${o}`)}},uo=lo,ho=class{constructor(){this.parse=(o,n)=>(0,me.isNil)(o)?null:(0,me.isBoolean)(o)?o?"1":"0":(0,me.isObject)(o)||(0,me.isArray)(o)||o===""||P(o)===null?null:this.valueParser(o,n)}},tr=ho,fo=class extends tr{constructor(){super(...arguments),this.valueParser=(o,n)=>{let h=fe.convertStringToNumber(o,{format:n?.numberFormat});return h===null?P(`${o}`):Number(h)}}},co=fo,mo=class extends tr{constructor(){super(...arguments),this.valueParser=(o,n)=>{let h=fe.convertStringToNumber(o,{format:n?.numberFormat});return h===null?P(`${o}`):Number(h)}}},yo=mo,_o=class{constructor(){this.parse=(o,n)=>{if((0,X.isNil)(o)||(0,X.isObject)(o)||(0,X.isArray)(o))return null;if((0,X.isBoolean)(o))return JSON.stringify(o);if((0,X.isNumber)(o))return o;if(o===""||P(o)===null)return null;let h=fe.convertStringToNumber(o,{adornment:"percentage"});return h===null?P(`${o}`):Number(h)}}},go=_o,po=class{constructor(){this.parse=(o,n)=>{if((0,ye.isNil)(o)||(0,ye.isArray)(o)||(0,ye.isObject)(o))return null;if((0,ye.isBoolean)(o))return JSON.stringify(o);if(o===""||P(o)===null)return null;let h=fe.convertStringToNumber(o,{format:n?.numberFormat});return h===null?P(`${o}`):Number(h)}}},wo=po,Mo="dd.MM.yyyy HH:mm:ss:SSS",So="DD.MM.YYYY HH:mm:ss:SSS",vo="DD.MM.YYYY HH:mm:ss:SSSZ",ko={date_dmy:"dd.MM.yyyy",date_mdy:"MM.dd.yyyy",date_iso:"yyyy-MM-dd",datetime:"yyyy-MM-dd HH:mm:ss",time_hm:"hh:mm aaa",time_hms:"hh:mm:ss aaa",time_hm_24:"HH:mm",time_hms_24:"HH:mm:ss"},Do={time_hm:"hh:mm a",time_hms:"hh:mm:ss a",time_hm_24:"HH:mm",time_hms_24:"HH:mm:ss"};var bo=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"],Yo=(o,n)=>{o===null&&(o=""),o=/^\d{3,}$/.test(o)?parseInt(o,10):o;let h=/^\d{1,2}$/.test(o);h&&(o+=":00");let u=(0,Be.default)(o,bo,!0).isValid()?(0,Be.default)(o):(0,Be.default)(o,n),y=u.isValid(),f=(0,Be.default)(o,n,!0).isValid()&&!h;return o===""&&(y=!0,f=!0),y&&!f?u.format(n):o};var Oo=/([+-](?:0\d|1[0-4]):?[0-5]\d|Z)$/i,To=class{constructor(){this.parse=(o,n)=>{if((0,_e.isNil)(o)||(0,_e.isArray)(o)||(0,_e.isObject)(o))return null;if((0,_e.isBoolean)(o))return JSON.stringify(o);let h=n?.dataModel?.getType();if(!h)return P(`${o}`);if(typeof o=="string"){if(o==="")return null;try{if(n?.dataModel?.getType()==="date"){let u=n?.dataModel?.getOutputFormat(),y=o.match(Oo),f=!!(y&&y[0]);if((f?qe.default.parseZone(o,u,!0):(0,qe.default)(o,u,!0)).isValid())return o;let F=f?qe.default.parseZone(o,vo):(0,qe.default)(o,So);if(F.isValid())return F.format(u);throw new Error("invalid date")}else{let u=ko[h];if(!u)return P(`${o}`);let y=Ks(o,Mo,new Date);return Zs(y,u)}}catch{let u=Do[h];return P(u?Yo(o,u):`${o}`)}}else return P(`${o}`)}}},No=To,xo=class{constructor({validation:o,regex:n,fields:h,errorMessage:u}){this.getValidation=()=>this.validation,this.getRegex=()=>this.regex,this.getFields=()=>this.fields,this.getErrorMessage=()=>this.errorMessage,this.serialize=()=>({validation:this.getValidation(),fields:this.getFields(),regex:this.getRegex(),errorMessage:this.getErrorMessage()}),this.validation=o,this.regex=n,this.fields=h??[],this.errorMessage=u}},zo=xo,$,Fo=($=class{constructor({description:n,key:h,example:u,label:y,type:f,validators:F,mappingValidation:D,alternativeMatches:T,columnSize:ge,creator:Je,baseKey:B,baseKeyCounter:U,outputFormat:Mt,numberFormat:p,hidden:He,disabled:Le,optionMappingConfiguration:ke}){this.getDescription=()=>this.description,this.getKey=()=>this.key,this.getExample=()=>this.example,this.getLabel=()=>this.label,this.setLabel=v=>{this.label=v},this.getType=()=>this.type,this.getOutputFormat=()=>$.getOutputFormat(this.outputFormat),this.getValidators=()=>this.validators,this.getColumnSize=()=>this.columnSize,this.getIsRequired=()=>!!this.validators.find(v=>v.getValidation()==="REQUIRED"),this.getIsUnique=()=>!!this.validators.find(v=>v.getValidation()==="UNIQUE"),this.getIsUniqueAndRequired=()=>this.getIsRequired()===!0&&this.getIsUnique()===!0,this.hasMappingValidation=()=>!!(this.mappingValidation&&this.mappingValidation.logic&&this.mappingValidation.logic.trim().length>0),this.getMappingValidation=()=>this.mappingValidation||void 0,this.getAlternativeMatches=()=>this.alternativeMatches.filter(v=>!!v),this.getCreator=()=>this.creator,this.getBaseKey=()=>this.baseKey,this.getBaseKeyCounter=()=>this.baseKeyCounter,this.setCustomKey=({key:v,baseKey:Ie,baseKeyCounter:Ue,creator:pe})=>{this.baseKey=Ie,this.key=v,this.baseKeyCounter=Ue,this.creator=pe},this.isDropdown=()=>$.isTypeDropdown(this.getType()),this.isCategoryType=()=>$.isTypeCategory(this.getType()),this.isBooleanType=()=>this.type==="boolean",this.serialize=()=>({description:this.getDescription(),example:this.getExample(),key:this.getKey(),label:this.getLabel(),type:this.getType(),validators:[],alternativeMatches:this.getAlternativeMatches(),columnSize:this.getColumnSize(),outputFormat:this.getOutputFormat(),isMultiSelection:this.getIsMultiSelection(),numberFormat:this.getNumberFormat(),baseKey:this.getBaseKey(),baseKeyCounter:this.getBaseKeyCounter(),creator:this.getCreator(),hidden:this.isHidden(),disabled:this.isDisabled(),optionMappingConfiguration:this.getOptionMappingConfiguration()}),this.getIsMultiSelection=()=>!1,this.getNumberFormat=()=>this.numberFormat,this.isDisabled=()=>this.disabled,this.isNumeric=()=>this.type==="int"||this.type==="float"||this.type==="currency_eur"||this.type==="currency_usd"||this.type==="percentage",this.isCurrency=()=>this.type==="currency_eur"||this.type==="currency_usd",this.baseClone=()=>{let v=this.serialize();return new $({description:v.description,example:v.example,key:v.key,label:v.label,type:v.type,validators:this.getValidators(),alternativeMatches:v.alternativeMatches,columnSize:v.columnSize,baseKey:v.baseKey,baseKeyCounter:v.baseKeyCounter,creator:v.creator,numberFormat:v.numberFormat,outputFormat:v.outputFormat,hidden:v.hidden,disabled:v.disabled,optionMappingConfiguration:v.optionMappingConfiguration})},this.isHidden=()=>this.hidden,this.getOptionMappingConfiguration=()=>this.optionMappingConfiguration,this.description=n,this.key=h,this.example=u,this.label=y,this.type=f,this.validators=F??[],this.mappingValidation=D,this.alternativeMatches=T?[...T.filter(v=>v!==y&&v!==h)?.map(v=>v?.toString())]:[],this.columnSize=ge,this.creator=Je,this.baseKey=B||h,this.baseKeyCounter=U||0,this.outputFormat=Mt||"",this.numberFormat=p||"eu",this.hidden=He??!1,this.disabled=Le??!1,this.optionMappingConfiguration=ke}},$.getOutputFormat=n=>(n||"DD.MM.YYYY").replace(/d/g,"D").replace(/e|E/g,""),$.isTypeDropdown=n=>$.isTypeCategory(n)||n==="boolean",$.isTypeCategory=n=>n==="single-select"||n==="currency_code"||n==="country_code_alpha_2"||n==="country_code_alpha_3",$),Ro=new co,Wo=new yo,Po=new wo,Co=new go,Ho=new io,Lo=new oo,Io=new uo,Uo=new No,ve,Eo=(ve=class{},ve.parse=(n,h)=>{let u;switch(h?.dataModel?.getType()){case"int":u=Ro;break;case"float":u=Wo;break;case"boolean":u=Ho;break;case"single-select":case"currency_code":case"country_code_alpha_2":case"country_code_alpha_3":u=Lo;break;case"percentage":u=Co;break;case"currency_eur":case"currency_usd":u=Po;break;case"date":case"date_dmy":case"date_mdy":case"date_iso":case"datetime":case"time_hms":case"time_hms_24":case"time_hm":case"time_hm_24":u=Uo;break;case"email":case"url_www":case"url_https":case"url":case"phone":case"zip_code_de":case"bic":case"vat_eu":case"gtin":case"iban":default:u=Io;break}return u.parse(n,h)},ve.parseRawValueToDisplayValue=(n,h)=>{let u=n;if(h.isNumeric)u=fe.convertToFormat(n,{targetFormat:h.numberFormat||"eu",adornment:h.type==="percentage"?"percentage":void 0}),["currency_eur","currency_usd"].includes(h.type)&&(h.type==="currency_usd"?u=`$${u}`:u=`${u} \u20AC`);else if(h.type==="boolean"){let y=pt.getInstance().getOptionsForReviewEntries().find(f=>`${f.value}`.includes(`${n}`));y&&(u=`${y.label}`)}else if(Fo.isTypeCategory(h.type))if(h.isMultiSelection){if((0,sr.isArray)(n)){let y=h.options?.filter(f=>n.some(F=>qs(f,F)));y&&(u=y.map(f=>f.label).join(", "))}}else{let y=h.options?.find(f=>qs(f,n));y&&(u=`${y?.label}`)}return`${u}`},ve.parseDisplayValueToRawValue=(n,h)=>{if(h.isNumeric){let u=fe.convertToUsWithDecimal(`${n}`,h.numberFormat??"eu");if(u===null)return n;let y=fe.convertStringToNumber(u,{format:"us"});return y!==null?Number(y):n}else return n},ve),Ao=Eo;var Zo=(o,n)=>{let{value:h,isExact:u,columns:y}=n,f=Ao.parseRawValueToDisplayValue(o,y[0]);return u&&!(0,Pe.isNil)(o)&&f===h?!0:!!(!u&&!(0,Pe.isNil)(o)&&f?.toLowerCase()?.includes(h?.toLowerCase()))};var P=o=>{if((0,Pe.isString)(o)){let n=o.trimEnd();return n===""?null:n}return o};var Bs=o=>o?.replace(/[-!$%^&*()_+|~=`{}\\[\]:";'<>?,.\\/]/g," ")?.replace(/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?)*/g," ")?.toLowerCase(),Ko=(o,n,h)=>{for(let u=0;u<o.length;u++){let y=o[u].getKey(),f=n;if(h&&(y=Bs(y),f=Bs(f)),y===f)return o[u]}return null},Bo=(o,n)=>{for(let h=0;h<n.length;h++)if(n[h].getKey()===o)return h;return-1},qs=(o,n)=>`${o.value}`==`${n}`;var Jt=({value:o,dataModel:n,isTrim:h})=>{let u=n.getOptionTypeMap(),y=o!==void 0?u.get(o):void 0;if(!y&&typeof o=="number"&&(y=u.get(String(o))),!y&&typeof o=="string"){let f=Number(o);isNaN(f)||(y=u.get(f))}if(y=y??"string",y==="int"){let f=Number(o);return!isNaN(f)&&(0,wt.isInteger)(f)?f:h?P(`${o}`):`${o}`}else if(y==="float"){if((0,wt.isNumber)(o))return o;let f=`${o}`.replace(/,/,"."),F=fe.convertStringToNumber(`${f}`,{format:"us"});return F===null?h?P(`${o}`):`${o}`:Number(F)}else return h?P(`${o}`):`${o}`};export{zo as a,Fo as b,Ao as c,Zo as d,Ko as e,Bo as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as s}from"./chunk-ODODIDUN.js";var S=class o extends s{constructor({description:t,key:a,example:n,label:l,type:p,options:r,validators:h,alternativeMatches:u,columnSize:d,isMultiSelection:g,allowCustomOptions:c,creator:y,baseKey:m,baseKeyCounter:M,hidden:b,optionMappingConfiguration:C,...v}){super({description:t,key:a,example:n,label:l,type:p,validators:h,alternativeMatches:u,columnSize:d,creator:y,baseKey:m,baseKeyCounter:M,hidden:b,optionMappingConfiguration:C,...v}),this.optionTypeMap=null,this.getOptions=()=>this.options,this.getOptionTypeMap=()=>{if(!this.optionTypeMap){this.optionTypeMap=new Map;for(let e=0;e<this.options.length;e++){let i=this.options[e];this.optionTypeMap.set(i.value,i.type??"string")}}return this.optionTypeMap},this.setOptions=e=>{this.options=e,this.optionTypeMap=null},this.serialize=()=>{let e={description:this.getDescription(),example:this.getExample(),isRequired:this.getIsRequired(),key:this.getKey(),label:this.getLabel(),type:this.getType(),validators:this.getValidators().map(O=>O.serialize()),alternativeMatches:this.getAlternativeMatches(),columnSize:this.getColumnSize(),outputFormat:this.getOutputFormat(),numberFormat:this.getNumberFormat(),baseKey:this.getBaseKey(),baseKeyCounter:this.getBaseKeyCounter(),creator:this.getCreator(),hidden:this.isHidden(),disabled:this.isDisabled(),optionMappingConfiguration:this.getOptionMappingConfiguration()},i=this.getOptions();return{...e,options:i,isMultiSelection:this.isMultiSelection,allowCustomOptions:this.allowCustomOptions}},this.getIsMultiSelection=()=>this.isMultiSelection,this.getAllowCustomOptions=()=>this.allowCustomOptions,this.options=r?.map(e=>({...e,baseKey:e?.baseKey||e.value,baseKeyCounter:e.baseKeyCounter||0,alternativeMatches:e.alternativeMatches.filter(i=>i!==e.label),validations:e.validations||[]})),this.isMultiSelection=g,this.allowCustomOptions=c||!1}clone(){let t=this.serialize();return new o({description:t.description,example:t.example,key:t.key,label:t.label,type:t.type,options:t.options,validators:this.getValidators(),alternativeMatches:t.alternativeMatches,columnSize:t.columnSize,isMultiSelection:t.isMultiSelection,allowCustomOptions:t.allowCustomOptions,hidden:t.hidden,disabled:t.disabled,optionMappingConfiguration:t.optionMappingConfiguration})}},f=S;export{f as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var s,e=(s=class{constructor(){this.options=[],this.truthyWords=[],this.falsyWords=[],this.defaultTruthyWords=["true",!0,1,"1","yes","ja"],this.defaultFalsyWords=["false",!1,0,"0","no","nein"],this.getBooleanOptionToRender=()=>[this.defaultTruthyWords.length===this.truthyWords.length?"Ja":this.truthyWords[this.truthyWords.length-1],this.defaultFalsyWords.length===this.falsyWords.length?"Nein":this.falsyWords[this.falsyWords.length-1]],this.truthyWords=this.defaultTruthyWords,this.falsyWords=this.defaultFalsyWords}static getInstance(){return this.instance||(this.instance=new s),this.instance}setOptions(t){this.options=t}getOptionsForMatchColumn(){return this.options.length===0?[{label:"yes",value:`${s.trueValue}`},{label:"no",value:`${s.falseValue}`}]:this.options.map(t=>({...t,value:`${t.value}`}))}getOptionsForReviewEntries(){return this.options.length===0?[{label:"yes",value:s.trueValue},{label:"no",value:s.falseValue}]:this.options}setTruthyWords(t){this.truthyWords=[...this.truthyWords,t?.toLowerCase(),t],this.truthyWords=Array.from(new Set(this.truthyWords))}setFalsyWords(t){this.falsyWords=[...this.falsyWords,t?.toLowerCase(),t],this.falsyWords=Array.from(new Set(this.falsyWords))}getTruthyWords(){return this.truthyWords?.filter(t=>`${t}`.length>0)}getFalsyWords(){return this.falsyWords?.filter(t=>`${t}`.length>0)}},s.trueValue=!0,s.falseValue=!1,s);export{e as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as v,f as g}from"../chunk-ODODIDUN.js";import{f as c}from"../chunk-DTEAHNF5.js";import"../chunk-ZW7EGY6P.js";import{d as h,h as p}from"../chunk-LMA7WTWH.js";var m="info",u="disabled";var o=h(c());var I=(a,i,e,t,s)=>{(0,o.isEmpty)(a)||Object.keys(a).forEach(l=>{let d=v(s,l);(0,o.isUndefined)(a[l].value)||(t[i][l]=a[l].value);let f=g(l,s.filter(r=>!r.isHidden()));(0,o.isNil)(a[l].info)||f<0||a[l].info?.forEach(r=>{if(!d?.isDisabled()&&r.level===u)return;let n={rowIndex:i,colIndex:f,popover:{message:r.message,level:r.level||m}};(e[i]?.length??0)===0?e[i]=[n]:e[i].push(n)})})},F=async({initResults:a,dataInfos:i,initialValues:e},t)=>{for(let s=0;s<a.length;s++)I(a[s][0],a[s][1],i,e,t);return{dataInfos:i,initialValues:e}},b=async({initialValues:a,key:i,result:e,colIndex:t})=>{let s={};for(let l=0;l<e.length;l++)if((0,o.isUndefined)(e[l][0].value)||a[e[l][1]]&&(a[e[l][1]][i]=e[l][0].value),e?.[l]?.[0]?.info&&t>=0){let d=e?.[l]?.[0]?.info??[],f={message:e?.[l]?.[0]?.info?.[0]?.message??"",level:e?.[l]?.[0]?.info?.[0]?.level??m};for(let n=0;n<d?.length;n++)if(d[n].level!==u){f={message:e?.[l]?.[0]?.info?.[n]?.message??"",level:e?.[l]?.[0]?.info?.[n]?.level??m};break}let r={rowIndex:e[l][1],colIndex:t,popover:f};r.popover.level!==u&&a[e[l][1]]&&((s[e[l][1]]?.length??0)===0?s[e[l][1]]=[r]:s[e[l][1]].push(r))}return{dataInfos:s,initialValues:a}},x=async({dataInfos:a,columnDataInfos:i})=>{let e=Object.keys(i);for(let t=0;t<e.length;t++){let s=e[t];i?.[s]?.length>0&&(a[s]||(a[s]=[]),a[s].push(...i[s]))}return{dataInfos:a}},y=()=>!0;p({check:y,handleOnEntryInit:F,handleColumnHooks:b,integrateColumnHooksData:x});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as we}from"../chunk-ZW7EGY6P.js";import{h as Oe}from"../chunk-LMA7WTWH.js";var me=function(e){if(e===globalThis)return globalThis;for(let i in e)this[i]=e[i]},be=class{constructor(e,i,t,r,o,s,l,a,u,f,d,c){this.ctx=e,this.constants=i,this.tree=t,this.getSubscriptions=r,this.setSubscriptions=o,this.changeSubscriptions=s,this.setSubscriptionsGlobal=l,this.changeSubscriptionsGlobal=a,this.evals=u,this.registerSandboxFunction=f,this.allowJit=d,this.evalContext=c}};function Fe(n,e){let i=new me(e.globals),t={sandbox:n,globalsWhitelist:new Set(Object.values(e.globals)),prototypeWhitelist:new Map([...e.prototypeWhitelist].map(r=>[r[0].prototype,r[1]])),options:e,globalScope:new O(null,e.globals,i),sandboxGlobal:i};return t.prototypeWhitelist.set(Object.getPrototypeOf([][Symbol.iterator]()),new Set),t}function Q(n,e,i){let t=new Map,r=new be(n.context,e.constants,e.tree,new Set,new WeakMap,new WeakMap,n.setSubscriptions,n.changeSubscriptions,t,o=>n.sandboxFunctions.set(o,r),!!i,i);if(i){let o=i.sandboxFunction(r);t.set(Function,o),t.set(eval,i.sandboxedEval(o)),t.set(setTimeout,i.sandboxedSetTimeout(o)),t.set(setInterval,i.sandboxedSetInterval(o))}return r}var k=class n{constructor(e){this.ref={str:""},e instanceof n?(this.ref=e.ref,this.start=e.start,this.end=e.end):(this.ref.str=e,this.start=0,this.end=e.length)}substring(e,i){if(!this.length)return this;e=this.start+e,e<0&&(e=0),e>this.end&&(e=this.end),i=i===void 0?this.end:this.start+i,i<0&&(i=0),i>this.end&&(i=this.end);let t=new n(this);return t.start=e,t.end=i,t}get length(){let e=this.end-this.start;return e<0?0:e}char(e){if(this.start!==this.end)return this.ref.str[this.start+e]}toString(){return this.ref.str.substring(this.start,this.end)}trimStart(){let e=/^\s+/.exec(this.toString()),i=new n(this);return e&&(i.start+=e[0].length),i}slice(e,i){return e<0&&(e=this.end-this.start+e),e<0&&(e=0),i===void 0&&(i=this.end-this.start),i<0&&(i=this.end-this.start+i),i<0&&(i=0),this.substring(e,i)}trim(){let e=this.trimStart(),i=/\s+$/.exec(e.toString());return i&&(e.end-=i[0].length),e}valueOf(){return this.toString()}};function xe(n){let e=Object.assign({},n);for(let i in e)e[i]=!0;return e}var ye=new Set(["instanceof","typeof","return","throw","try","catch","if","finally","else","in","of","var","let","const","for","delete","false","true","while","do","break","continue","new","function","async","await","switch","case"]),O=class{constructor(e,i={},t){this.const={},this.let={},this.var={};let r=t!==void 0||e===null;this.parent=e,this.allVars=i,this.let=r?this.let:xe(i),this.var=r?xe(i):this.var,this.globals=e===null?xe(i):{},this.functionThis=t}get(e,i=!1){let t=this.functionThis;if(e==="this"&&t!==void 0)return new F({this:t},e,!0,!1,!0);if(ye.has(e))throw new SyntaxError("Unexepected token '"+e+"'");if(this.parent===null||!i||t!==void 0){if(this.globals.hasOwnProperty(e))return new F(t,e,!1,!0,!0);if(e in this.allVars&&(!(e in{})||this.allVars.hasOwnProperty(e)))return new F(this.allVars,e,this.const.hasOwnProperty(e),this.globals.hasOwnProperty(e),!0);if(this.parent===null)return new F(void 0,e)}return this.parent.get(e,i)}set(e,i){if(e==="this")throw new SyntaxError('"this" cannot be assigned');if(ye.has(e))throw new SyntaxError("Unexepected token '"+e+"'");let t=this.get(e);if(t.context===void 0)throw new ReferenceError(`Variable '${e}' was not declared.`);if(t.isConst)throw new TypeError(`Cannot assign to const variable '${e}'`);if(t.isGlobal)throw new T(`Cannot override global variable '${e}'`);if(!(t.context instanceof Object))throw new T("Scope is not an object");return t.context[t.prop]=i,t}declare(e,i,t=void 0,r=!1){if(e==="this")throw new SyntaxError('"this" cannot be declared');if(ye.has(e))throw new SyntaxError("Unexepected token '"+e+"'");if(i==="var"&&this.functionThis===void 0&&this.parent!==null)return this.parent.declare(e,i,t,r);if(this[i].hasOwnProperty(e)&&i!=="const"&&!this.globals.hasOwnProperty(e)||!(e in this.allVars))r&&(this.globals[e]=!0),this[i][e]=!0,this.allVars[e]=t;else throw new T(`Identifier '${e}' has already been declared`);return new F(this.allVars,e,this.const.hasOwnProperty(e),r)}};var oe=class{},T=class extends Error{};function W(n){return Array.isArray(n)&&typeof n[0]=="number"&&n[0]!==0&&n[0]!==88}var F=class{constructor(e,i,t=!1,r=!1,o=!1){this.context=e,this.prop=i,this.isConst=t,this.isGlobal=r,this.isVariable=o}get(e){let i=this.context;if(i===void 0)throw new ReferenceError(`${this.prop} is not defined`);if(i===null)throw new TypeError(`Cannot read properties of null, (reading '${this.prop}')`);return e.getSubscriptions.forEach(t=>t(i,this.prop)),i[this.prop]}};var z=class{constructor(e,i,t,r=!1,o=!1){this.auditReport=e,this.result=i,this.returned=t,this.breakLoop=r,this.continueLoop=o}},L={};function le(n,e){let i={};return n.forEach((t,r)=>{t.startsWith("...")?i[t.substring(3)]=e.slice(r):i[t]=e[r]}),i}var fe=new WeakSet;function te(n,e,i,t,r,o){if(t.ctx.options.forbidFunctionCreation)throw new T("Function creation is forbidden");let s;return o===void 0?s=(...l)=>{let a=le(n,l);return X(i,t,e,r===void 0?[]:[new O(r,a)]).result}:s=function(...a){let u=le(n,a);return X(i,t,e,r===void 0?[]:[new O(r,u,this)]).result},t.registerSandboxFunction(s),fe.add(s),s}function $e(n,e,i,t,r,o){if(t.ctx.options.forbidFunctionCreation)throw new T("Function creation is forbidden");if(!t.ctx.prototypeWhitelist?.has(Promise.prototype))throw new T("Async/await not permitted");let s;return o===void 0?s=async(...l)=>{let a=le(n,l);return(await K(i,t,e,r===void 0?[]:[new O(r,a)])).result}:s=async function(...a){let u=le(n,a);return(await K(i,t,e,r===void 0?[]:[new O(r,u,this)])).result},t.registerSandboxFunction(s),fe.add(s),s}function R(n,e,i="assign"){if(n.context===void 0)throw new ReferenceError(`Cannot ${i} value to undefined.`);if(typeof n.context!="object"&&typeof n.context!="function")throw new SyntaxError(`Cannot ${i} value to a primitive.`);if(n.isConst)throw new TypeError(`Cannot set value to const variable '${n.prop}'`);if(n.isGlobal)throw new T(`Cannot ${i} property '${n.prop}' of a global object`);if(n.context===null)throw new TypeError("Cannot set properties of null");if(typeof n.context[n.prop]=="function"&&!n.context.hasOwnProperty(n.prop))throw new T(`Override prototype property '${n.prop}' not allowed`);i==="delete"?n.context.hasOwnProperty(n.prop)&&(e.changeSubscriptions.get(n.context)?.forEach(t=>t({type:"delete",prop:n.prop})),e.changeSubscriptionsGlobal.get(n.context)?.forEach(t=>t({type:"delete",prop:n.prop}))):n.context.hasOwnProperty(n.prop)?(e.setSubscriptions.get(n.context)?.get(n.prop)?.forEach(t=>t({type:"replace"})),e.setSubscriptionsGlobal.get(n.context)?.get(n.prop)?.forEach(t=>t({type:"replace"}))):(e.changeSubscriptions.get(n.context)?.forEach(t=>t({type:"create",prop:n.prop})),e.changeSubscriptionsGlobal.get(n.context)?.forEach(t=>t({type:"create",prop:n.prop})))}var Qe=new Set([[].push,[].pop,[].shift,[].unshift,[].splice,[].reverse,[].sort,[].copyWithin]),Se=class{constructor(e,i){this.key=e,this.val=i}},ae=class{constructor(e){this.item=e}},ee=class{constructor(e){this.item=e}},ue=class{constructor(e,i){this.t=e,this.f=i}},Ye=/(\$\$)*(\$)?\${(\d+)}/g,Y=new Map;function h(n,e){Y.set(n,e)}h(1,(n,e,i,t,r,o,s,l)=>{if(t===null)throw new TypeError(`Cannot get property ${r} of null`);let a=typeof t;if(a==="undefined"&&o===void 0){let c=l.get(r);if(c.context===s.ctx.sandboxGlobal){s.ctx.options.audit&&s.ctx.auditReport?.globalsAccess.add(r);let p=s.ctx.globalsWhitelist.has(s.ctx.sandboxGlobal[r])?s.evals.get(s.ctx.sandboxGlobal[r]):void 0;if(p){e(void 0,p);return}}if(c.context&&c.context[r]===globalThis){e(void 0,s.ctx.globalScope.get("this"));return}e(void 0,c);return}else if(t===void 0)throw new T("Cannot get property '"+r+"' of undefined");if(a!=="object")a==="number"?t=new Number(t):a==="string"?t=new String(t):a==="boolean"&&(t=new Boolean(t));else if(typeof t.hasOwnProperty>"u"){e(void 0,new F(void 0,r));return}let u=a==="function",f=u||!(t.hasOwnProperty(r)||typeof r=="number");if(s.ctx.options.audit&&f&&typeof r=="string"){let c=Object.getPrototypeOf(t);do c.hasOwnProperty(r)&&(s.ctx.auditReport&&!s.ctx.auditReport.prototypeAccess[c.constructor.name]&&(s.ctx.auditReport.prototypeAccess[c.constructor.name]=new Set),s.ctx.auditReport?.prototypeAccess[c.constructor.name].add(r));while(c=Object.getPrototypeOf(c))}if(f){if(u){if(!["name","length","constructor"].includes(r)&&(t.hasOwnProperty(r)||r==="__proto__")){let c=s.ctx.prototypeWhitelist.get(t.prototype),p=s.ctx.options.prototypeReplacements.get(t);if(p){e(void 0,new F(p(t,!0),r));return}if(!(c&&(!c.size||c.has(r))))throw new T(`Static method or property access not permitted: ${t.name}.${r}`)}}else if(r!=="constructor"){let c=t;for(;c=Object.getPrototypeOf(c);)if(c.hasOwnProperty(r)){let p=s.ctx.prototypeWhitelist.get(c),g=s.ctx.options.prototypeReplacements.get(c.constuctor);if(g){e(void 0,new F(g(t,!1),r));return}if(p&&(!p.size||p.has(r)))break;throw new T(`Method or property access not permitted: ${c.constructor.name}.${r}`)}}}if(s.evals.has(t[r])){e(void 0,s.evals.get(t[r]));return}if(t[r]===globalThis){e(void 0,s.ctx.globalScope.get("this"));return}let d=o.isGlobal||u&&!fe.has(t)||s.ctx.globalsWhitelist.has(t);e(void 0,new F(t,r,!1,d))});h(5,(n,e,i,t,r,o,s)=>{if(s.ctx.options.forbidFunctionCalls)throw new T("Function invocations are not allowed");if(typeof t!="function")throw new TypeError(`${typeof o.prop=="symbol"?"Symbol":o.prop} is not a function`);let l=r.map(a=>a instanceof ee?[...a.item]:[a]).flat().map(a=>B(a,s));if(typeof o=="function"){e(void 0,o(...l));return}if(o.context[o.prop]===JSON.stringify&&s.getSubscriptions.size){let a=new Set,u=f=>{if(!(!f||typeof f!="object"||a.has(f))){a.add(f);for(let d of Object.keys(f))s.getSubscriptions.forEach(c=>c(f,d)),u(f[d])}};u(l[0])}if(o.context instanceof Array&&Qe.has(o.context[o.prop])&&(s.changeSubscriptions.get(o.context)||s.changeSubscriptionsGlobal.get(o.context))){let a,u=!1;if(o.prop==="push")a={type:"push",added:l},u=!!l.length;else if(o.prop==="pop")a={type:"pop",removed:o.context.slice(-1)},u=!!a.removed.length;else if(o.prop==="shift")a={type:"shift",removed:o.context.slice(0,1)},u=!!a.removed.length;else if(o.prop==="unshift")a={type:"unshift",added:l},u=!!l.length;else if(o.prop==="splice")a={type:"splice",startIndex:l[0],deleteCount:l[1]===void 0?o.context.length:l[1],added:l.slice(2),removed:o.context.slice(l[0],l[1]===void 0?void 0:l[0]+l[1])},u=!!a.added.length||!!a.removed.length;else if(o.prop==="reverse"||o.prop==="sort")a={type:o.prop},u=!!o.context.length;else if(o.prop==="copyWithin"){let f=l[2]===void 0?o.context.length-l[1]:Math.min(o.context.length,l[2]-l[1]);a={type:"copyWithin",startIndex:l[0],endIndex:l[0]+f,added:o.context.slice(l[1],l[1]+f),removed:o.context.slice(l[0],l[0]+f)},u=!!a.added.length||!!a.removed.length}u&&(s.changeSubscriptions.get(o.context)?.forEach(f=>f(a)),s.changeSubscriptionsGlobal.get(o.context)?.forEach(f=>f(a)))}o.get(s),e(void 0,o.context[o.prop](...l))});h(22,(n,e,i,t,r)=>{let o={};for(let s of r)s.key instanceof ae?o={...o,...s.key.item}:o[s.key]=s.val;e(void 0,o)});h(6,(n,e,i,t,r)=>e(void 0,new Se(t,r)));h(12,(n,e,i,t,r,o,s)=>{let l=r.map(a=>a instanceof ee?[...a.item]:[a]).flat().map(a=>B(a,s));e(void 0,l)});h(23,(n,e,i,t,r)=>e(void 0,r));h(35,(n,e,i,t,r)=>{switch(r){case"true":return e(void 0,!0);case"false":return e(void 0,!1);case"null":return e(void 0,null);case"undefined":return e(void 0,void 0);case"NaN":return e(void 0,NaN);case"Infinity":return e(void 0,1/0)}e(new Error("Unknown symbol: "+r))});h(7,(n,e,i,t,r)=>e(void 0,Number(r)));h(83,(n,e,i,t,r)=>e(void 0,BigInt(r)));h(2,(n,e,i,t,r,o,s)=>e(void 0,s.constants.strings[parseInt(r)]));h(85,(n,e,i,t,r,o,s)=>{let l=s.constants.regexes[parseInt(r)];if(s.ctx.globalsWhitelist.has(RegExp))e(void 0,new RegExp(l.regex,l.flags));else throw new T("Regex not permitted")});h(84,(n,e,i,t,r,o,s,l)=>{let a=s.constants.literals[parseInt(r)],[,u,f]=a,d=[],c,p=[];for(;c=Ye.exec(u);)c[2]||(d.push(f[parseInt(c[3],10)]),p.push(c[3]));n(i,d,l,s,(g,w)=>{let y={};if(g){e(g);return}for(let m of Object.keys(w)){let x=p[m];y[x]=w[m]}e(void 0,u.replace(/(\\\\)*(\\)?\${(\d+)}/g,(m,x,b,A)=>{if(b)return m;let I=y[A];return(x||"")+`${B(I,s)}`}))})});h(18,(n,e,i,t,r)=>{e(void 0,new ee(r))});h(17,(n,e,i,t,r)=>{e(void 0,new ae(r))});h(24,(n,e,i,t,r)=>e(void 0,!r));h(64,(n,e,i,t,r)=>e(void 0,~r));h(25,(n,e,i,t,r,o,s)=>{R(o,s),e(void 0,++o.context[o.prop])});h(26,(n,e,i,t,r,o,s)=>{R(o,s),e(void 0,o.context[o.prop]++)});h(27,(n,e,i,t,r,o,s)=>{R(o,s),e(void 0,--o.context[o.prop])});h(28,(n,e,i,t,r,o,s)=>{R(o,s),e(void 0,o.context[o.prop]--)});h(9,(n,e,i,t,r,o,s)=>{R(o,s),e(void 0,o.context[o.prop]=r)});h(66,(n,e,i,t,r,o,s)=>{R(o,s),e(void 0,o.context[o.prop]+=r)});h(65,(n,e,i,t,r,o,s)=>{R(o,s),e(void 0,o.context[o.prop]-=r)});h(67,(n,e,i,t,r,o,s)=>{R(o,s),e(void 0,o.context[o.prop]/=r)});h(69,(n,e,i,t,r,o,s)=>{R(o,s),e(void 0,o.context[o.prop]*=r)});h(68,(n,e,i,t,r,o,s)=>{R(o,s),e(void 0,o.context[o.prop]**=r)});h(70,(n,e,i,t,r,o,s)=>{R(o,s),e(void 0,o.context[o.prop]%=r)});h(71,(n,e,i,t,r,o,s)=>{R(o,s),e(void 0,o.context[o.prop]^=r)});h(72,(n,e,i,t,r,o,s)=>{R(o,s),e(void 0,o.context[o.prop]&=r)});h(73,(n,e,i,t,r,o,s)=>{R(o,s),e(void 0,o.context[o.prop]|=r)});h(76,(n,e,i,t,r,o,s)=>{R(o,s),e(void 0,o.context[o.prop]<<=r)});h(75,(n,e,i,t,r,o,s)=>{R(o,s),e(void 0,o.context[o.prop]>>=r)});h(74,(n,e,i,t,r,o,s)=>{R(o,s),e(void 0,o.context[o.prop]>>=r)});h(57,(n,e,i,t,r)=>e(void 0,t>r));h(56,(n,e,i,t,r)=>e(void 0,t<r));h(55,(n,e,i,t,r)=>e(void 0,t>=r));h(54,(n,e,i,t,r)=>e(void 0,t<=r));h(52,(n,e,i,t,r)=>e(void 0,t==r));h(32,(n,e,i,t,r)=>e(void 0,t===r));h(53,(n,e,i,t,r)=>e(void 0,t!=r));h(31,(n,e,i,t,r)=>e(void 0,t!==r));h(29,(n,e,i,t,r)=>e(void 0,t&&r));h(30,(n,e,i,t,r)=>e(void 0,t||r));h(77,(n,e,i,t,r)=>e(void 0,t&r));h(78,(n,e,i,t,r)=>e(void 0,t|r));h(33,(n,e,i,t,r)=>e(void 0,t+r));h(47,(n,e,i,t,r)=>e(void 0,t-r));h(59,(n,e,i,t,r)=>e(void 0,+r));h(58,(n,e,i,t,r)=>e(void 0,-r));h(48,(n,e,i,t,r)=>e(void 0,t/r));h(79,(n,e,i,t,r)=>e(void 0,t^r));h(50,(n,e,i,t,r)=>e(void 0,t*r));h(51,(n,e,i,t,r)=>e(void 0,t%r));h(80,(n,e,i,t,r)=>e(void 0,t<<r));h(81,(n,e,i,t,r)=>e(void 0,t>>r));h(82,(n,e,i,t,r)=>e(void 0,t>>>r));h(60,(n,e,i,t,r,o,s,l)=>{n(i,r,l,s,(a,u)=>{e(void 0,typeof B(u,s))})});h(62,(n,e,i,t,r)=>e(void 0,t instanceof r));h(63,(n,e,i,t,r)=>e(void 0,t in r));h(61,(n,e,i,t,r,o,s,l,a)=>{if(a.context===void 0){e(void 0,!0);return}if(R(a,s,"delete"),a.isVariable){e(void 0,!1);return}e(void 0,delete a.context?.[a.prop])});h(8,(n,e,i,t,r)=>e(void 0,r));h(34,(n,e,i,t,r,o,s,l)=>{e(void 0,l.declare(t,"var",r))});h(3,(n,e,i,t,r,o,s,l,a)=>{e(void 0,l.declare(t,"let",r,a&&a.isGlobal))});h(4,(n,e,i,t,r,o,s,l)=>{e(void 0,l.declare(t,"const",r))});h(11,(n,e,i,t,r,o,s,l)=>{if(t=[...t],typeof o[2]=="string"||o[2]instanceof k)if(s.allowJit&&s.evalContext)o[2]=r=s.evalContext.lispifyFunction(new k(o[2]),s.constants);else throw new T("Unevaluated code detected, JIT not allowed");t.shift()?e(void 0,$e(t,r,i,s,l)):e(void 0,te(t,r,i,s,l))});h(37,(n,e,i,t,r,o,s,l)=>{if(typeof o[2]=="string"||o[2]instanceof k)if(s.allowJit&&s.evalContext)o[2]=r=s.evalContext.lispifyFunction(new k(o[2]),s.constants);else throw new T("Unevaluated code detected, JIT not allowed");let a=t.shift(),u=t.shift(),f;a===88?f=$e(t,r,i,s,l,u):f=te(t,r,i,s,l,u),u&&l.declare(u,"var",f),e(void 0,f)});h(10,(n,e,i,t,r,o,s,l)=>{if(typeof o[2]=="string"||o[2]instanceof k)if(s.allowJit&&s.evalContext)o[2]=r=s.evalContext.lispifyFunction(new k(o[2]),s.constants);else throw new T("Unevaluated code detected, JIT not allowed");let a=t.shift(),u=t.shift();u&&(l=new O(l,{}));let f;a===88?f=$e(t,r,i,s,l,u):f=te(t,r,i,s,l,u),u&&l.declare(u,"let",f),e(void 0,f)});h(38,(n,e,i,t,r,o,s,l)=>{let[a,u,f,d,c,p,g]=t,w=!0,y=new O(l,{}),m={$$obj:void 0},x=new O(y,m);if(n===G)(async()=>{let b;for(b=P(A=>n(i,d,y,s,A)),m.$$obj=(b=P(A=>n(i,f,y,s,A))).isInstant===!0?b.instant:(await b.p).result,b=P(A=>n(i,u,x,s,A)),a&&(w=(b=P(A=>n(i,p,x,s,A))).isInstant===!0?b.instant:(await b.p).result);w;){let A={};b=P(D=>n(i,g,new O(x,A),s,D)),b.isInstant===!0?b.instant:(await b.p).result;let I=await K(i,s,r,[new O(y,A)],"loop");if(I instanceof z&&I.returned){e(void 0,I);return}if(I instanceof z&&I.breakLoop)break;b=P(D=>n(i,c,x,s,D)),w=(b=P(D=>n(i,p,x,s,D))).isInstant===!0?b.instant:(await b.p).result}e()})().catch(e);else{for(_(b=>n(i,d,y,s,b)),m.$$obj=_(b=>n(i,f,y,s,b)).result,_(b=>n(i,u,x,s,b)),a&&(w=_(b=>n(i,p,x,s,b)).result);w;){let b={};_(I=>n(i,g,new O(x,b),s,I));let A=X(i,s,r,[new O(y,b)],"loop");if(A instanceof z&&A.returned){e(void 0,A);return}if(A instanceof z&&A.breakLoop)break;_(I=>n(i,c,x,s,I)),w=_(I=>n(i,p,x,s,I)).result}e()}});h(86,(n,e,i,t,r,o,s,l,a,u)=>{if(u==="switch"&&t==="continue"||!u)throw new T("Illegal "+t+" statement");e(void 0,new z(s.ctx.auditReport,void 0,!1,t==="break",t==="continue"))});h(13,(n,e,i,t,r,o,s,l)=>{n(i,B(t,s)?r.t:r.f,l,s,e)});h(15,(n,e,i,t,r,o,s,l)=>{n(i,B(t,s)?r.t:r.f,l,s,e)});h(16,(n,e,i,t,r)=>e(void 0,new ue(t,r)));h(14,(n,e,i,t,r)=>e(void 0,new ue(t,r)));h(40,(n,e,i,t,r,o,s,l)=>{n(i,t,l,s,(a,u)=>{if(a){e(a);return}if(u=B(u,s),n===N){let f,d=!1;for(let c of r)if(d||(d=!c[1]||u===B(_(p=>n(i,c[1],l,s,p)).result,s))){if(!c[2])continue;if(f=X(i,s,c[2],[l],"switch"),f.breakLoop)break;if(f.returned){e(void 0,f);return}if(!c[1])break}e()}else(async()=>{let f,d=!1;for(let c of r){let p;if(d||(d=!c[1]||u===B((p=P(g=>n(i,c[1],l,s,g))).isInstant===!0?p.instant:(await p.p).result,s))){if(!c[2])continue;if(f=await K(i,s,c[2],[l],"switch"),f.breakLoop)break;if(f.returned){e(void 0,f);return}if(!c[1])break}}e()})().catch(e)})});h(39,(n,e,i,t,r,o,s,l,a,u)=>{let[f,d,c]=r;j(n,(p,g)=>{j(n,w=>{if(w)e(w);else if(p){let y={};f&&(y[f]=p),j(n,e,i,s,d,[new O(l)],u)}else e(void 0,g)},i,s,c,[new O(l,{})])},i,s,t,[new O(l)],u)});h(87,(n,e)=>{e()});h(45,(n,e,i,t,r,o,s)=>{if(!s.ctx.globalsWhitelist.has(t)&&!fe.has(t))throw new T(`Object construction not allowed: ${t.constructor.name}`);e(void 0,new t(...r))});h(46,(n,e,i,t,r)=>{e(r)});h(43,(n,e,i,t)=>e(void 0,t.pop()));h(0,(n,e)=>e());function B(n,e){if(n instanceof F)return n.get(e);if(n!==L)return n}function Re(n,e,i,t,r,o,s){e===N?Xe(n,i,t,r,o,s):Ke(n,i,t,r,o,s).catch(t)}function Xe(n,e,i,t,r,o){let s=[];for(let l=0;l<e.length;l++){let a;try{a=_(u=>N(n,e[l],t,r,u,o)).result}catch(u){i(u);return}if(a instanceof z&&(a.returned||a.breakLoop||a.continueLoop)){i(void 0,a);return}if(W(e[l])&&e[l][0]===8){i(void 0,new z(r.ctx.auditReport,a,!0));return}s.push(a)}i(void 0,s)}async function Ke(n,e,i,t,r,o){let s=[];for(let l=0;l<e.length;l++){let a;try{let u;a=(u=P(f=>G(n,e[l],t,r,f,o))).isInstant===!0?u.instant:(await u.p).result}catch(u){i(u);return}if(a instanceof z&&(a.returned||a.breakLoop||a.continueLoop)){i(void 0,a);return}if(W(e[l])&&e[l][0]===8){i(void 0,new z(r.ctx.auditReport,a,!0));return}s.push(a)}i(void 0,s)}function P(n){let e=!1,i,t=new Promise((r,o)=>{n((s,l)=>{s?o(s):(e=!0,i=l,r({result:l}))})});return{isInstant:e,instant:i,p:t}}function _(n){let e,i;if(n((t,r)=>{i=t,e=r}),i)throw i;return{result:e}}async function G(n,e,i,t,r,o){let s=r,l=new Promise(a=>{s=(u,f)=>{r(u,f),a()}});if(!ze(n,e,i,t,s,!0,o)&&W(e)){let a=e[0],u;try{let p;u=(p=P(g=>G(n,e[1],i,t,g,o))).isInstant===!0?p.instant:(await p.p).result}catch(p){s(p);return}let f=u;try{f=u instanceof F?u.get(t):u}catch(p){s(p);return}if(a===20||a===21){if(f==null){s(void 0,L);return}a=a===20?1:5}if(f===L)if(a===1||a===5){s(void 0,f);return}else f=void 0;let d;try{let p;d=(p=P(g=>G(n,e[2],i,t,g,o))).isInstant===!0?p.instant:(await p.p).result}catch(p){s(p);return}let c=d;try{c=d instanceof F?d.get(t):d}catch(p){s(p);return}if(c===L&&(c=void 0),Y.has(a))try{Y.get(a)?.(G,s,n,f,c,u,t,i,d,o)}catch(p){s(p)}else s(new SyntaxError("Unknown operator: "+a))}await l}function N(n,e,i,t,r,o){if(!ze(n,e,i,t,r,!1,o)&&W(e)){let s=e[0],l;try{l=_(d=>N(n,e[1],i,t,d,o)).result}catch(d){r(d);return}let a=l;try{a=l instanceof F?l.get(t):l}catch(d){r(d);return}if(s===20||s===21){if(a==null){r(void 0,L);return}s=s===20?1:5}if(a===L)if(s===1||s===5){r(void 0,a);return}else a=void 0;let u;try{u=_(d=>N(n,e[2],i,t,d,o)).result}catch(d){r(d);return}let f=u;try{f=u instanceof F?u.get(t):u}catch(d){r(d);return}if(f===L&&(f=void 0),Y.has(s))try{Y.get(s)?.(N,r,n,a,f,l,t,i,u,o)}catch(d){r(d)}else r(new SyntaxError("Unknown operator: "+s))}}var qe=new Set([11,37,10,38,39,40,14,16,60]),Ee={current:{ticks:BigInt(0)}};function ze(n,e,i,t,r,o,s){let l=o?G:N;if(t.ctx.options.executionQuota&&t.ctx.options.executionQuota<=n.ticks&&!(typeof t.ctx.options.onExecutionQuotaReached=="function"&&t.ctx.options.onExecutionQuotaReached(n,i,t,e)))return r(new T("Execution quota exceeded")),!0;if(n.ticks++,Ee.current=n,e instanceof F)try{r(void 0,e.get(t))}catch(a){r(a)}else if(e===L)r();else if(Array.isArray(e)&&!W(e))e[0]===0?r():Re(n,l,e,r,i,t,s);else if(!W(e))r(void 0,e);else if(e[0]===42)Re(n,l,e[1],r,i,t,s);else if(e[0]===44)o?t.ctx.prototypeWhitelist?.has(Promise.prototype)?G(n,e[1],i,t,async(a,u)=>{if(a)r(a);else try{r(void 0,await B(u,t))}catch(f){r(f)}},s).catch(r):r(new T("Async/await is not permitted")):r(new T("Illegal use of 'await', must be inside async function"));else if(qe.has(e[0]))try{Y.get(e[0])?.(l,r,n,e[1],e[2],e,t,i,void 0,s)}catch(a){r(a)}else return!1;return!0}function X(n,e,i,t=[],r){return _(o=>j(N,o,n,e,i,t,r)).result}async function K(n,e,i,t=[],r){let o;return(o=P(s=>j(G,s,n,e,i,t,r))).isInstant===!0?o.instant:(await o.p).result}function j(n,e,i,t,r,o=[],s){if(!r){e();return}if(!(r instanceof Array))throw new SyntaxError("Bad execution tree");let l=t.ctx.globalScope,a;for(;a=o.shift();)typeof a=="object"&&(a instanceof O?l=a:l=new O(l,a,a instanceof oe?void 0:null));t.ctx.options.audit&&!t.ctx.auditReport&&(t.ctx.auditReport={globalsAccess:new Set,prototypeAccess:{}}),n===N?je(e,i,t,r,l,s):et(e,i,t,r,l,s).catch(e)}function je(n,e,i,t,r,o){if(!(t instanceof Array))throw new SyntaxError("Bad execution tree");let s=0;for(s=0;s<t.length;s++){let l,a,u=t[s];try{N(e,u,r,i,(f,d)=>{a=f,l=d},o)}catch(f){a=f}if(a){n(a);return}if(l instanceof z){n(void 0,l);return}if(W(u)&&u[0]===8){n(void 0,new z(i.ctx.auditReport,l,!0));return}}n(void 0,new z(i.ctx.auditReport,void 0,!1))}async function et(n,e,i,t,r,o){if(!(t instanceof Array))throw new SyntaxError("Bad execution tree");let s=0;for(s=0;s<t.length;s++){let l,a,u=t[s];try{await G(e,u,r,i,(f,d)=>{a=f,l=d},o)}catch(f){a=f}if(a){n(a);return}if(l instanceof z){n(void 0,l);return}if(W(u)&&u[0]===8){n(void 0,new z(i.ctx.auditReport,l,!0));return}}n(void 0,new z(i.ctx.auditReport,void 0,!1))}function tt(n){return!n.match(/[^a-f0-9]/i)?parseInt(n,16):NaN}function ce(n,e,i){let t=tt(n);if(Number.isNaN(t)||i!==void 0&&i!==n.length)throw new SyntaxError(e+": "+n);return t}function nt(n){let e=ce(n,"Malformed Hexadecimal",2);return String.fromCharCode(e)}function We(n,e){let i=ce(n,"Malformed Unicode",4);if(e!==void 0){let t=ce(e,"Malformed Unicode",4);return String.fromCharCode(i,t)}return String.fromCharCode(i)}function it(n){return n.charAt(0)==="{"&&n.charAt(n.length-1)==="}"}function rt(n){if(!it(n))throw new SyntaxError("Malformed Unicode: +"+n);let e=n.slice(1,-1),i=ce(e,"Malformed Unicode");try{return String.fromCodePoint(i)}catch(t){throw t instanceof RangeError?new SyntaxError("Code Point Limit:"+i):t}}var st=new Map([["b","\b"],["f","\f"],["n",`
|
|
2
|
+
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function ot(n){return st.get(n)||n}var lt=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function at(n){return n.replace(lt,function(e,i,t,r,o,s,l,a,u){if(i!==void 0)return"\\";if(t!==void 0)return nt(t);if(r!==void 0)return rt(r);if(o!==void 0)return We(o,s);if(l!==void 0)return We(l);if(a==="0")return"\0";if(a!==void 0)throw new SyntaxError("Octal Deprecation: "+a);if(u!==void 0)return ot(u);throw new SyntaxError("End of string")})}var ve=at;function v(n){return[n.op,n.a,n.b]}var Ne=v({op:0,a:0,b:0}),Ze=new Map,se=class extends Error{constructor(e,i){super(e+": "+i.substring(0,40)),this.code=i}},Ae,Pe,_e,Me,ut,Ue=/^:/,ft=/^else(?![\w$])/,ct=/^if(?![\w$])/,dt=/^\s/,E={splitter:{types:{opHigh:/^(\/|\*\*|\*(?!\*)|%)(?!=)/,op:/^(\+(?!(\+))|-(?!(-)))(?!=)/,comparitor:/^(<=|>=|<(?!<)|>(?!>)|!==|!=(?!=)|===|==)/,boolOp:/^(&&|\|\||instanceof(?![\w$])|in(?![\w$]))/,bitwise:/^(&(?!&)|\|(?!\|)|\^|<<|>>(?!>)|>>>)(?!=)/},next:["modifier","value","prop","incrementerBefore"]},inlineIf:{types:{inlineIf:/^\?(?!\.(?!\d))/},next:["expEnd"]},assignment:{types:{assignModify:/^(-=|\+=|\/=|\*\*=|\*=|%=|\^=|&=|\|=|>>>=|>>=|<<=)/,assign:/^(=)(?!=)/},next:["modifier","value","prop","incrementerBefore"]},incrementerBefore:{types:{incrementerBefore:/^(\+\+|--)/},next:["prop"]},expEdge:{types:{call:/^(\?\.)?[(]/,incrementerAfter:/^(\+\+|--)/},next:["splitter","expEdge","dot","inlineIf","expEnd"]},modifier:{types:{not:/^!/,inverse:/^~/,negative:/^-(?!-)/,positive:/^\+(?!\+)/,typeof:/^typeof(?![\w$])/,delete:/^delete(?![\w$])/},next:["modifier","value","prop","incrementerBefore"]},dot:{types:{arrayProp:/^(\?\.)?\[/,dot:/^(\?)?\.(?=\s*[a-zA-Z$_])/},next:["splitter","assignment","expEdge","dot","inlineIf","expEnd"]},prop:{types:{prop:/^[a-zA-Z$_][a-zA-Z\d$_]*/},next:["splitter","assignment","expEdge","dot","inlineIf","expEnd"]},value:{types:{createObject:/^\{/,createArray:/^\[/,number:/^(0x[\da-f]+(_[\da-f]+)*|(\d+(_\d+)*(\.\d+(_\d+)*)?|\.\d+(_\d+)*))(e[+-]?\d+(_\d+)*)?(n)?(?!\d)/i,string:/^"(\d+)"/,literal:/^`(\d+)`/,regex:/^\/(\d+)\/r(?![\w$])/,boolean:/^(true|false)(?![\w$])/,null:/^null(?![\w$])/,und:/^undefined(?![\w$])/,arrowFunctionSingle:/^(async\s+)?([a-zA-Z$_][a-zA-Z\d$_]*)\s*=>\s*({)?/,arrowFunction:/^(async\s*)?\(\s*((\.\.\.)?\s*[a-zA-Z$_][a-zA-Z\d$_]*(\s*,\s*(\.\.\.)?\s*[a-zA-Z$_][a-zA-Z\d$_]*)*)?\s*\)\s*=>\s*({)?/,inlineFunction:/^(async\s+)?function(\s*[a-zA-Z$_][a-zA-Z\d$_]*)?\s*\(\s*((\.\.\.)?\s*[a-zA-Z$_][a-zA-Z\d$_]*(\s*,\s*(\.\.\.)?\s*[a-zA-Z$_][a-zA-Z\d$_]*)*)?\s*\)\s*{/,group:/^\(/,NaN:/^NaN(?![\w$])/,Infinity:/^Infinity(?![\w$])/,void:/^void(?![\w$])\s*/,await:/^await(?![\w$])\s*/,new:/^new(?![\w$])\s*/},next:["splitter","expEdge","dot","inlineIf","expEnd"]},initialize:{types:{initialize:/^(var|let|const)\s+([a-zA-Z$_][a-zA-Z\d$_]*)\s*(=)?/,return:/^return(?![\w$])/,throw:/^throw(?![\w$])\s*/},next:["modifier","value","prop","incrementerBefore","expEnd"]},spreadObject:{types:{spreadObject:/^\.\.\./},next:["value","prop"]},spreadArray:{types:{spreadArray:/^\.\.\./},next:["value","prop"]},expEnd:{types:{},next:[]},expFunction:{types:{function:/^(async\s+)?function(\s*[a-zA-Z$_][a-zA-Z\d$_]*)\s*\(\s*((\.\.\.)?\s*[a-zA-Z$_][a-zA-Z\d$_]*(\s*,\s*(\.\.\.)?\s*[a-zA-Z$_][a-zA-Z\d$_]*)*)?\s*\)\s*{/},next:["expEdge","expEnd"]},expSingle:{types:{for:/^(([a-zA-Z$_][\w$]*)\s*:)?\s*for\s*\(/,do:/^(([a-zA-Z$_][\w$]*)\s*:)?\s*do(?![\w$])\s*(\{)?/,while:/^(([a-zA-Z$_][\w$]*)\s*:)?\s*while\s*\(/,loopAction:/^(break|continue)(?![\w$])\s*([a-zA-Z$_][\w$]*)?/,if:/^((([a-zA-Z$_][\w$]*)\s*:)?\s*)if\s*\(/,try:/^try\s*{/,block:/^{/,switch:/^(([a-zA-Z$_][\w$]*)\s*:)?\s*switch\s*\(/},next:["expEnd"]}},ie={"(":")","[":"]","{":"}","'":"'",'"':'"',"`":"`"};function de(n,e){let i=null;for(let t=0;t<e.length&&(i=e[t].exec(n),!i);t++);return i}var J=new k(""),pt=/^[+\-~ !]/,ht=E.value.types.number,gt=/^((if|for|else|while|do|function)(?![\w$])|[\w$]+)/,V=/^;/,ke=new WeakMap,Be=new WeakMap;function $(n,e,i,t,r,o,s={}){if(!e.length)return e;s.words=s.words||[];let l=!0;i=i||[];let a=i.includes(V);a&&(i=i.filter(m=>m!==V));let u=ke.get(e.ref)||[],f=Be.get(e.ref)||new Map;if(Be.set(e.ref,f),t&&f.has(e.start-1))return e.substring(0,f.get(e.start-1)-e.start);let d=!1,c=!1,p="",g=!1,w,y=!1;for(w=0;w<e.length&&!c;w++){let m=e.char(w);if(t==='"'||t==="'"||t==="`"){if(t==="`"&&m==="$"&&e.char(w+1)==="{"&&!d){let x=$(n,e.substring(w+2),[],"{");w+=x.length+2}else if(m===t&&!d)return e.substring(0,w);d=!d&&m==="\\"}else if(ie[m]){if(!y&&u[w+e.start]){if(y=!0,a)break;w--,p=";";continue}if(g&&m==="{"&&(g=!1),m===r){c=!0;break}else{let x=$(n,e.substring(w+1),[],m);if(f.set(x.start-1,x.end),w+=x.length+1,l=!1,o){let b=e.substring(w),A;(A=de(b.toString(),o))&&(s.regRes=A,c=!0)}}}else if(t){if(m===ie[t])return e.substring(0,w)}else{let x=e.substring(w).toString(),b,A;if(o){let I;if(I=de(x,o)){s.regRes=I,w++,c=!0;break}}if(A=ht.exec(x))w+=A[0].length-1,x=e.substring(w).toString();else if(p!=m){let I=null;if(m===";"||u[w+e.start]&&!l&&!y){if(a)I=[";"];else if(u[w+e.start]){y=!0,w--,p=";";continue}m=x=";"}else y=!1;I||(I=de(x,i)),I&&(c=!0),!c&&(b=gt.exec(x))&&(g=!0,b[0].length>1&&(s.words.push(b[1]),s.lastAnyWord=b[1],b[2]&&(s.lastWord=b[2])),b[0].length>2&&(w+=b[0].length-2))}if(l&&(pt.test(x)?c=!1:l=!1),c)break}p=m}if(t)throw new SyntaxError("Unclosed '"+t+"'");return s&&(s.oneliner=g),e.substring(0,w)}$.next=["splitter","expEnd","inlineIf"];var he=["initialize","expSingle","expFunction","value","modifier","prop","incrementerBefore","expEnd"],C=(n,e)=>{n.forEach(i=>{Ze.set(i,e)})},wt={createArray:/^\]/,createObject:/^\}/,group:/^\)/,arrayProp:/^\]/,call:/^\)/},Ge={createArray:12,createObject:22,group:23,arrayProp:19,call:5,prop:1,"?prop":20,"?call":21};C(["createArray","createObject","group","arrayProp","call"],(n,e,i,t,r,o)=>{let s=J,l=[],a=!1,u=t[0].length,f=u;for(;u<i.length&&!a;)s=$(n,i.substring(u),[wt[e],/^,/]),u+=s.length,s.trim().length&&l.push(s),i.char(u)!==","?a=!0:u++;let d=["value","modifier","prop","incrementerBefore","expEnd"],c,p;switch(e){case"group":case"arrayProp":c=M(n,i.substring(f,u));break;case"call":case"createArray":c=l.map(w=>S(n,w,[...d,"spreadArray"]));break;case"createObject":c=l.map(w=>{w=w.trimStart();let y,m="";if(p=E.expFunction.types.function.exec("function "+w),p)m=p[2].trimStart(),y=S(n,new k("function "+w.toString().replace(m,"")));else{let x=$(n,w,[/^:/]);m=S(n,x,[...d,"spreadObject"]),m[0]===1&&(m=m[2]),y=S(n,w.substring(x.length+1))}return v({op:6,a:m,b:y})});break}let g=e==="arrayProp"?t[1]?20:1:e==="call"?t[1]?21:5:Ge[e];o.lispTree=S(n,i.substring(u+1),E[r].next,v({op:g,a:o.lispTree,b:c}))});var xt={inverse:64,not:24,positive:59,negative:58,typeof:60,delete:61};C(["inverse","not","negative","positive","typeof","delete"],(n,e,i,t,r,o)=>{let s=$(n,i.substring(t[0].length),[/^([^\s.?\w$]|\?[^.])/]);o.lispTree=S(n,i.substring(s.length+t[0].length),$.next,v({op:xt[e],a:o.lispTree,b:S(n,s,E[r].next)}))});var De={"++$":25,"--$":27,"$++":26,"$--":28};C(["incrementerBefore"],(n,e,i,t,r,o)=>{let s=$(n,i.substring(2),[/^[^\s.\w$]/]);o.lispTree=S(n,i.substring(s.length+2),$.next,v({op:De[t[0]+"$"],a:S(n,s,E[r].next),b:0}))});C(["incrementerAfter"],(n,e,i,t,r,o)=>{o.lispTree=S(n,i.substring(t[0].length),E[r].next,v({op:De["$"+t[0]],a:o.lispTree,b:0}))});var yt={"&&":29,"||":30,instanceof:62,in:63,"=":9,"-=":65,"+=":66,"/=":67,"**=":68,"*=":69,"%=":70,"^=":71,"&=":72,"|=":73,">>>=":74,"<<=":76,">>=":75};C(["assign","assignModify","boolOp"],(n,e,i,t,r,o)=>{o.lispTree=v({op:yt[t[0]],a:o.lispTree,b:S(n,i.substring(t[0].length),E[r].next)})});var bt={"&":77,"|":78,"^":79,"<<":80,">>":81,">>>":82,"<=":54,">=":55,"<":56,">":57,"!==":31,"!=":53,"===":32,"==":52,"+":33,"-":47,"/":48,"**":49,"*":50,"%":51};C(["opHigh","op","comparitor","bitwise"],(n,e,i,t,r,o)=>{let s=[E.inlineIf.types.inlineIf,Ue];switch(e){case"opHigh":s.push(E.splitter.types.opHigh);case"op":s.push(E.splitter.types.op);case"comparitor":s.push(E.splitter.types.comparitor);case"bitwise":s.push(E.splitter.types.bitwise),s.push(E.splitter.types.boolOp)}let l=$(n,i.substring(t[0].length),s);o.lispTree=S(n,i.substring(l.length+t[0].length),$.next,v({op:bt[t[0]],a:o.lispTree,b:S(n,l,E[r].next)}))});C(["inlineIf"],(n,e,i,t,r,o)=>{let s=!1,l=i.substring(0,0),a=1;for(;!s&&l.length<i.length;)l.end=$(n,i.substring(l.length+1),[E.inlineIf.types.inlineIf,Ue]).end,i.char(l.length)==="?"?a++:a--,a||(s=!0);l.start=i.start+1,o.lispTree=v({op:15,a:o.lispTree,b:v({op:16,a:M(n,l),b:M(n,i.substring(t[0].length+l.length+1))})})});function Le(n,e){let i=0,t=e.substring(0,0),r=J,o,s=!0,l,a={};for(;(t=$(n,e.substring(t.end-e.start),[ft,ct,V],void 0,void 0,void 0,a)).length||s;){s=!1;let u=e.substring(t.end-e.start).toString();if(u.startsWith("if"))t.end++,i++;else if(u.startsWith("else"))o=e.substring(0,t.end-e.start),t.end++,i--,i||t.end--;else if(l=/^;?\s*else(?![\w$])/.exec(u))o=e.substring(0,t.end-e.start),t.end+=l[0].length-1,i--,i||(t.end-=l[0].length-1);else{o=r.length?o:e.substring(0,t.end-e.start);break}if(!i){r=Le(n,e.substring(t.end-e.start+(/^;?\s*else(?![\w$])/.exec(u)?.[0].length||0))).all;break}a={}}return o=o||e.substring(0,t.end-e.start),{all:e.substring(0,Math.max(o.end,r.end)-e.start),true:o,false:r}}C(["if"],(n,e,i,t,r,o)=>{let s=$(n,i.substring(t[0].length),[],"("),l=Le(n,i.substring(t[1].length)),a=t[0].length-t[1].length+s.length+1,u=l.true.substring(a),f=l.false;s=s.trim(),u=u.trim(),f=f.trim(),u.char(0)==="{"&&(u=u.slice(1,-1)),f.char(0)==="{"&&(f=f.slice(1,-1)),o.lispTree=v({op:13,a:M(n,s),b:v({op:14,a:Z(u,n),b:Z(f,n)})})});C(["switch"],(n,e,i,t,r,o)=>{let s=$(n,i.substring(t[0].length),[],"("),l=i.toString().indexOf("{",t[0].length+s.length+1);if(l===-1)throw new SyntaxError("Invalid switch");let a=re(n,$(n,i.substring(l+1),[],"{")),u,f=/^\s*(case\s|default)\s*/,d=[],c=!1;for(;u=f.exec(a.toString());){if(u[1]==="default"){if(c)throw new SyntaxError("Only one default switch case allowed");c=!0}let p=$(n,a.substring(u[0].length),[/^:/]),g=J,w=l=u[0].length+p.length+1,y=/^\s*\{/.exec(a.substring(w).toString()),m=[];if(y)w+=y[0].length,g=$(n,a.substring(w),[],"{"),w+=g.length+1,m=Z(g,n);else{let x=$(n,a.substring(w),[f]);if(!x.trim().length)m=[],w+=x.length;else{for(;(g=$(n,a.substring(w),[V])).length&&(w+=g.length+(a.char(w+g.length)===";"?1:0),!f.test(a.substring(w).toString())););m=Z(a.substring(l,g.end-a.start),n)}}a=a.substring(w),d.push(v({op:41,a:u[1]==="default"?0:M(n,p),b:m}))}o.lispTree=v({op:40,a:M(n,s),b:d})});C(["dot","prop"],(n,e,i,t,r,o)=>{let s=t[0],l=t[0].length,a="prop";if(e==="dot"){t[1]&&(a="?prop");let u=i.substring(t[0].length).toString().match(E.prop.types.prop);if(u&&u.length)s=u[0],l=s.length+t[0].length;else throw new SyntaxError("Hanging dot")}o.lispTree=S(n,i.substring(l),E[r].next,v({op:Ge[a],a:o.lispTree,b:s}))});C(["spreadArray","spreadObject"],(n,e,i,t,r,o)=>{o.lispTree=v({op:e==="spreadArray"?18:17,a:0,b:S(n,i.substring(t[0].length),E[r].next)})});C(["return","throw"],(n,e,i,t,r,o)=>{o.lispTree=v({op:e==="return"?8:46,a:0,b:M(n,i.substring(t[0].length))})});C(["number","boolean","null","und","NaN","Infinity"],(n,e,i,t,r,o)=>{o.lispTree=S(n,i.substring(t[0].length),E[r].next,v({op:e==="number"?t[10]?83:7:35,a:0,b:t[10]?t[1]:t[0]}))});C(["string","literal","regex"],(n,e,i,t,r,o)=>{o.lispTree=S(n,i.substring(t[0].length),E[r].next,v({op:e==="string"?2:e==="literal"?84:85,a:0,b:t[1]}))});C(["initialize"],(n,e,i,t,r,o)=>{let s=t[1]==="var"?34:t[1]==="let"?3:4;t[3]?o.lispTree=v({op:s,a:t[2],b:S(n,i.substring(t[0].length),E[r].next)}):o.lispTree=S(n,i.substring(t[0].length),E[r].next,v({op:s,a:t[2],b:0}))});C(["function","inlineFunction","arrowFunction","arrowFunctionSingle"],(n,e,i,t,r,o)=>{let s=e!=="function"&&e!=="inlineFunction",l=s&&!t[t.length-1],a=s?2:3,u=t[1]?88:0,f=t[a]?t[a].replace(/\s+/g,"").split(/,/g):[];s||f.unshift((t[2]||"").trimStart());let d=!1;f.forEach(g=>{if(d)throw new SyntaxError("Rest parameter must be last formal parameter");g.startsWith("...")&&(d=!0)});let c=$(n,i.substring(t[0].length),l?[/^[,)}\]]/,V]:[/^}/]),p=l?"return "+c:c.toString();o.lispTree=S(n,i.substring(t[0].length+p.length+1),E[r].next,v({op:s?11:e==="function"?37:10,a:[u,...f],b:n.eager?ge(new k(p),n):p}))});var mt=/^((let|var|const)\s+)?\s*([a-zA-Z$_][a-zA-Z\d$_]*)\s+(in|of)(?![\w$])/;C(["for","do","while"],(n,e,i,t,r,o)=>{let s=0,l=88,a=[],u=0,f=0,d=88,c,p=88,g;switch(e){case"while":{s=i.toString().indexOf("(")+1;let y=$(n,i.substring(s),[],"(");c=ne(n,y),g=$(n,i.substring(s+y.length+1)).trim(),g.char(0)==="{"&&(g=g.slice(1,-1));break}case"for":{s=i.toString().indexOf("(")+1;let y=[],m=J;for(let b=0;b<3&&(m=$(n,i.substring(s),[/^[;)]/]),y.push(m.trim()),s+=m.length+1,i.char(s-1)!==")");b++);let x;if(y.length===1&&(x=mt.exec(y[0].toString())))x[4]==="of"?(u=ne(n,y[0].substring(x[0].length)),a=[St,$t],c=Et,p=vt,f=S(n,new k((x[1]||"let ")+x[3]+" = $$next.value"),["initialize"])):(u=ne(n,y[0].substring(x[0].length)),a=[At,It],p=kt,c=Tt,f=S(n,new k((x[1]||"let ")+x[3]+" = $$keys[$$keyIndex]"),["initialize"]));else if(y.length===3)l=M(n,y.shift(),he),c=ne(n,y.shift()),p=M(n,y.shift());else throw new SyntaxError("Invalid for loop definition");g=$(n,i.substring(s)).trim(),g.char(0)==="{"&&(g=g.slice(1,-1));break}case"do":{d=0;let y=!!t[3];g=$(n,i.substring(t[0].length),y?[/^\}/]:[V]),c=ne(n,$(n,i.substring(i.toString().indexOf("(",t[0].length+g.length)+1),[],"("));break}}let w=[d,a,u,l,p,c,f];o.lispTree=v({op:38,a:w,b:Z(g,n)})});C(["block"],(n,e,i,t,r,o)=>{o.lispTree=v({op:42,a:Z($(n,i.substring(1),[],"{"),n),b:0})});C(["loopAction"],(n,e,i,t,r,o)=>{o.lispTree=v({op:86,a:t[1],b:0})});var Ie=/^\s*(catch\s*(\(\s*([a-zA-Z$_][a-zA-Z\d$_]*)\s*\))?|finally)\s*\{/;C(["try"],(n,e,i,t,r,o)=>{let s=$(n,i.substring(t[0].length),[],"{"),l=Ie.exec(i.substring(t[0].length+s.length+1).toString()),a,u="",f,d=0;l[1].startsWith("catch")?(l=Ie.exec(i.substring(t[0].length+s.length+1).toString()),u=l[2],f=$(n,i.substring(t[0].length+s.length+1+l[0].length),[],"{"),d=t[0].length+s.length+1+l[0].length+f.length+1,(l=Ie.exec(i.substring(d).toString()))&&l[1].startsWith("finally")&&(a=$(n,i.substring(d+l[0].length),[],"{"))):a=$(n,i.substring(t[0].length+s.length+1+l[0].length),[],"{");let c=[u,Z(re(n,f||J),n),Z(re(n,a||J),n)];o.lispTree=v({op:39,a:Z(re(n,s),n),b:c})});C(["void","await"],(n,e,i,t,r,o)=>{let s=$(n,i.substring(t[0].length),[/^([^\s.?\w$]|\?[^.])/]);o.lispTree=S(n,i.substring(t[0].length+s.length),E[r].next,v({op:e==="void"?87:44,a:S(n,s),b:0}))});C(["new"],(n,e,i,t,r,o)=>{let s=t[0].length,l=$(n,i.substring(s),[],void 0,"(");s+=l.length+1;let a=[];if(i.char(s-1)==="("){let u=$(n,i.substring(s),[],"(");s+=u.length+1;let f,d=0;for(;(f=$(n,u.substring(d),[/^,/])).length;)d+=f.length+1,a.push(f.trim())}o.lispTree=S(n,i.substring(s),E.expEdge.next,v({op:45,a:S(n,l,E.initialize.next),b:a.map(u=>S(n,u,E.initialize.next))}))});var St=S(void 0,new k("let $$iterator = $$obj[Symbol.iterator]()"),["initialize"]),$t=S(void 0,new k("let $$next = $$iterator.next()"),["initialize"]),Et=S(void 0,new k("return !$$next.done"),["initialize"]),vt=S(void 0,new k("$$next = $$iterator.next()")),At=S(void 0,new k("let $$keys = Object.keys($$obj)"),["initialize"]),It=S(void 0,new k("let $$keyIndex = 0"),["initialize"]),kt=S(void 0,new k("$$keyIndex++")),Tt=S(void 0,new k("return $$keyIndex < $$keys.length"),["initialize"]);function S(n,e,i,t,r=!1){if(t=t||Ne,i=i||E.initialize.next,e===void 0)return t;e=e.trimStart();let o=e.toString();if(!e.length&&!i.includes("expEnd"))throw new SyntaxError("Unexpected end of expression");if(!e.length)return t;let s={lispTree:t},l;for(let a of i)if(a!=="expEnd"){for(let u in E[a].types)if(u!=="expEnd"&&(l=E[a].types[u].exec(o))){Ae=u,ut=Me,Me=_e,_e=Pe,Pe=e;try{Ze.get(u)?.(n,u,e,l,a,s)}catch(f){throw r&&f instanceof SyntaxError?new se(f.message,o):f}break}if(l)break}if(!l&&e.length)throw r?new se(`Unexpected token after ${Ae}: ${e.char(0)}`,o):new SyntaxError(`Unexpected token after ${Ae}: ${e.char(0)}`);return s.lispTree}var Ct=he.filter(n=>n!=="expSingle");function M(n,e,i){if(!e.trimStart().length)return Ne;let t=[],r,o=0;if(i=i||E.initialize.next,i.includes("expSingle")&&de(e.toString(),Object.values(E.expSingle.types)))return S(n,e,["expSingle"],void 0,!0);for(i===he&&(i=Ct);(r=$(n,e.substring(o),[/^,/])).length;)t.push(r.trimStart()),o+=r.length+1;if(t.length===1)return S(n,e,i,void 0,!0);if(i.includes("initialize")){let l=E.initialize.types.initialize.exec(t[0].toString());if(l)return v({op:42,a:t.map((a,u)=>S(n,u?new k(l[1]+" "+a):a,["initialize"],void 0,!0)),b:0});if(E.initialize.types.return.exec(t[0].toString()))return S(n,e,i,void 0,!0)}let s=t.map(l=>S(n,l,i,void 0,!0));return v({op:43,a:s,b:0})}function ne(n,e){return v({op:8,a:0,b:M(n,e)})}function Z(n,e,i=!1){if(n=re(e,n),!n.trim().length)return[];let t=[],r,o=0,s=0,l={},a=!1,u=!1;for(;(r=$(e,n.substring(o),[V],void 0,void 0,void 0,l)).length&&(u=!!(n.char(o+r.length)&&n.char(o+r.length)!==";"),o+=r.length+(u?0:1),/^\s*else(?![\w$])/.test(n.substring(o).toString())||l.words?.includes("do")&&/^\s*while(?![\w$])/.test(n.substring(o).toString())?a=!0:(a=!1,t.push(n.substring(s,o-(u?0:1))),s=o),l={},!i););return a&&t.push(n.substring(s,o-(u?0:1))),t.map(f=>f.trimStart()).filter(f=>f.length).map(f=>M(e,f.trimStart(),he))}function ge(n,e,i=!1){if(!n.trim().length)return[];let t=Z(n,e,i);return pe(t),t}function pe(n,e=[]){if(W(n)){if(!W(n))return!1;let[i,t,r]=n;if(i===39||i===13||i===38||i===40)pe(t,e),pe(r,e);else if(i===34)e.push(v({op:34,a:t,b:0}));else if(i===37&&t[1])return e.push(n),!0}else if(Array.isArray(n)){let i=[];for(let t of n)pe(t,e)||i.push(t);i.length!==n.length&&(n.length=0,n.push(...e,...i))}return!1}var Ot=/^(\})\s*(catch|finally|else|while|instanceof)(?![\w$])/,Ft=/^((([\w$\])"'`]|\+\+|--)\s*\r?\n\s*([\w$+\-!~]))|(\}\s*[\w$!~+\-{("'`]))/;function re(n,e){let i=e,t=J,r={},o=ke.get(e.ref)||new Array(e.ref.str.length);for(;(t=$(n,i,[],void 0,void 0,[Ft],r)).length;){let s=!1,l=t,a=t.length;if(r.regRes){s=!0;let[,,u,,,f]=r.regRes;if(a=r.regRes[3]==="++"||r.regRes[3]==="--"?t.length+1:t.length,l=i.substring(0,a),f){let d=Ot.exec(i.substring(t.length-1).toString());d?d[2]==="while"?s=r.lastWord!=="do":s=!1:r.lastWord==="function"&&r.regRes[5][0]==="}"&&r.regRes[5].slice(-1)==="("&&(s=!1)}else u&&(r.lastWord==="if"||r.lastWord==="while"||r.lastWord==="for"||r.lastWord==="else")&&(s=!1)}s&&(o[l.end]=!0),i=i.substring(a),r={}}return ke.set(e.ref,o),e}function Rt(n){let e=1,i=!1,t=!1,r=!1;for(;e<n.length&&!t&&!r;)t=n[e]==="/"&&!i,i=n[e]==="\\"&&!i,r=n[e]===`
|
|
3
|
+
`,e++;let o=n.substring(e);if(r=r||!t||/^\s*\d/.test(o),r)return null;let s=/^[a-z]*/.exec(o);return/^\s+[\w$]/.test(n.substring(e+s[0].length))?null:{regex:n.substring(1,e-1),flags:s&&s[0]||"",length:e+(s&&s[0].length||0)}}var zt=/(typeof|delete|instanceof|return|in|of|throw|new|void|do|if)$/,Wt=/^([\w$\])]|\+\+|--)[\s/]/;function Je(n,e,i=""){let t,r=[],o=!1,s,l="",a=-1,u=[],f="",d=[],c=[],p=null,g=0;for(g=0;g<e.length;g++)if(f=e[g],l)f===l&&(l==="*"&&e[g+1]==="/"?(l="",g++):l===`
|
|
4
|
+
`&&(l=""));else{if(o){o=!1,r.push(f);continue}if(t)if(t==="`"&&f==="$"&&e[g+1]==="{"){let w=Je(n,e.substring(g+2),"{");u.push(w.str),r.push("${",u.length-1,"}"),g+=w.length+2}else if(t===f){if(t==="`"){let w=v({op:36,a:ve(r.join("")),b:[]});w.tempJsStrings=u,n.literals.push(w),d.push("`",n.literals.length-1,"`")}else n.strings.push(ve(r.join(""))),d.push('"',n.strings.length-1,'"');t=null,r=[]}else r.push(f);else{if(f==="'"||f==='"'||f==="`")u=[],t=f;else{if(ie[i]===f&&!c.length)return{str:d.join(""),length:g};ie[f]?(c.push(f),d.push(f)):ie[c[c.length-1]]===f?(c.pop(),d.push(f)):f==="/"&&(e[g+1]==="*"||e[g+1]==="/")?(l=e[g+1]==="*"?"*":`
|
|
5
|
+
`,a=g):f==="/"&&!p&&(s=Rt(e.substring(g)))?(n.regexes.push(s),d.push("/",n.regexes.length-1,"/r"),g+=s.length-1):d.push(f)}(!p||!dt.test(f))&&(p=Wt.exec(e.substring(g)))&&zt.test(e.substring(0,g+p[1].length))&&(p=null)}o=!!(t&&f==="\\")}if(l&&l==="*")throw new SyntaxError(`Unclosed comment '/*': ${e.substring(a)}`);return{str:d.join(""),length:g}}function U(n,e=!1,i=!1){if(typeof n!="string")throw new se(`Cannot parse ${n}`,n);let t=" "+n,r={strings:[],literals:[],regexes:[],eager:e};t=Je(r,t).str;for(let o of r.literals)o[2]=o.tempJsStrings.map(s=>M(r,new k(s))),delete o.tempJsStrings;return{tree:ge(new k(t),r,i),constants:r}}function Te(){return{sandboxFunction:Pt,sandboxedEval:_t,sandboxedSetTimeout:Mt,sandboxedSetInterval:Bt,lispifyFunction:ge}}function Pt(n,e){return i;function i(...t){let r=t.pop()||"",o=U(r);return te(t,o.tree,e||Ee.current,{...n,constants:o.constants,tree:o.tree},void 0,"anonymous")}}function _t(n){return e;function e(i){return n(i)()}}function Mt(n){return function(i,...t){return typeof i!="string"?setTimeout(i,...t):setTimeout(n(i),...t)}}function Bt(n){return function(i,...t){return typeof i!="string"?setInterval(i,...t):setInterval(n(i),...t)}}function Ve(n,e,i,t){if(!(n instanceof Object))throw new Error("Invalid subscription object, got "+(typeof n=="object"?"null":typeof n));let r=t.setSubscriptions.get(n)||new Map;t.setSubscriptions.set(n,r);let o=r.get(e)||new Set;r.set(e,o),o.add(i);let s,l=n[e];return l instanceof Object&&(s=t.changeSubscriptions.get(l)||new Set,s.add(i),t.changeSubscriptions.set(l,s)),{unsubscribe:()=>{o.delete(i),s?.delete(i)}}}var q=class n{constructor(e,i){this.evalContext=i,this.setSubscriptions=new WeakMap,this.changeSubscriptions=new WeakMap,this.sandboxFunctions=new WeakMap;let t=Object.assign({audit:!1,forbidFunctionCalls:!1,forbidFunctionCreation:!1,globals:n.SAFE_GLOBALS,prototypeWhitelist:n.SAFE_PROTOTYPES,prototypeReplacements:new Map},e||{});this.context=Fe(this,t)}static get SAFE_GLOBALS(){return{Function,console:{debug:console.debug,error:console.error,info:console.info,log:console.log,table:console.table,warn:console.warn},isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,escape,unescape,Boolean,Number,BigInt,String,Object,Array,Symbol,Error,EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError,Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Map,Set,WeakMap,WeakSet,Promise,Intl,JSON,Math,Date,RegExp}}static get SAFE_PROTOTYPES(){let e=[me,Function,Boolean,Number,BigInt,String,Date,Error,Array,Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Map,Set,WeakMap,WeakSet,Promise,Symbol,Date,RegExp],i=new Map;return e.forEach(t=>{i.set(t,new Set)}),i.set(Object,new Set(["entries","fromEntries","getOwnPropertyNames","is","keys","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf","values"])),i}subscribeGet(e,i){return i.getSubscriptions.add(e),{unsubscribe:()=>i.getSubscriptions.delete(e)}}subscribeSet(e,i,t,r){return Ve(e,i,t,r)}subscribeSetGlobal(e,i,t){return Ve(e,i,t,this)}getContext(e){return this.sandboxFunctions.get(e)}executeTree(e,i=[]){return X({ticks:BigInt(0)},e,e.tree,i)}executeTreeAsync(e,i=[]){return K({ticks:BigInt(0)},e,e.tree,i)}};var H=class extends q{constructor(e){super(e,Te())}static audit(e,i=[]){let t={};for(let o of Object.getOwnPropertyNames(globalThis))t[o]=globalThis[o];let r=new q({globals:t,audit:!0});return r.executeTree(Q(r,U(e,!0),Te()),i)}static parse(e){return U(e)}compile(e,i=!1){let t=U(e,i);return(...o)=>{let s=Q(this,t,this.evalContext);return{context:s,run:()=>this.executeTree(s,[...o]).result}}}compileAsync(e,i=!1){let t=U(e,i);return(...o)=>{let s=Q(this,t,this.evalContext);return{context:s,run:()=>this.executeTreeAsync(s,[...o]).then(l=>l.result)}}}compileExpression(e,i=!1){let t=U(e,i,!0);return(...o)=>{let s=Q(this,t,this.evalContext);return{context:s,run:()=>this.executeTree(s,[...o]).result}}}compileExpressionAsync(e,i=!1){let t=U(e,i,!0);return(...o)=>{let s=Q(this,t,this.evalContext);return{context:s,run:()=>this.executeTreeAsync(s,[...o]).then(l=>l.result)}}}};function Ce(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}var Nt=(n,e,i)=>{let t=n,r=[...e,{label:"rowIndex",key:"rowIndex"}];for(let o of r){let{label:s,key:l}=o,a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),u=[],f,d=/(['"])((?:(?!\1)[^\\]|\\.)*)(\1)/g;for(;(f=d.exec(t))!==null;)u.push({start:f.index,end:f.index+f[0].length});let c=g=>u.some(w=>g>=w.start&&g<w.end),p=[new RegExp(`@${a}\\b`,"g"),new RegExp(`@${a}(?=\\W|$)`,"g")];for(let g of p){let w,y="",m=0;for(g.lastIndex=0;(w=g.exec(t))!==null;){let x=w.index;y+=t.substring(m,x),c(x)?y+=w[0]:l==="rowIndex"?y+=`row.${l}`:y+=`row["${l.trim()}"]`,m=g.lastIndex,w.index===g.lastIndex&&g.lastIndex++}for(y+=t.substring(m),t=y,u.length=0,d.lastIndex=0;(f=d.exec(t))!==null;)u.push({start:f.index,end:f.index+f[0].length})}}if(i){let o=we.getInstance().getTruthyWords(),s=we.getInstance().getFalsyWords(),l=[],a,u=/(['"])((?:(?!\1)[^\\]|\\.)*)(\1)/g;for(;(a=u.exec(t))!==null;)l.push({start:a.index,end:a.index+a[0].length});let f=c=>l.some(p=>c>=p.start&&c<p.end),d=(c,p,g)=>{let w=c;for(let y of p){let m=String(y).replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),x=new RegExp(`\\b${m}\\b`,"gi"),b="",A=0,I;for(x.lastIndex=0;(I=x.exec(w))!==null;){let D=I.index;b+=w.substring(A,D),f(D)?b+=g:b+=I[0],A=x.lastIndex,I.index===x.lastIndex&&x.lastIndex++}b+=w.substring(A),w=b}return w};t=d(t,o,"true"),t=d(t,s,"false")}return t};var He=class{constructor(){this.formula="",this.outputData=[],this.initialize=()=>Promise.resolve(),this.cleanupData=()=>{this.outputData=[]},this.setFormula=n=>(this.formula=n,Promise.resolve()),this.check=()=>!0,this.parse=async(n,e,i)=>{this.outputData=[];let t=Nt(this.formula,e,i),r=this.generateInputValues(n,e),o=r?.[0];await this.validateFunction([o],e,t);let s=[];for(let l=0;l<r.length;l++)try{let a=async()=>{let u=await new Function("return "+t)()(r[l],l+1);return JSON.parse(JSON.stringify(u))};s.push(a())}catch{s.push(void 0);continue}return await Promise.allSettled(s).then(l=>{for(let a=0;a<l.length;a++)if(this.outputData[a]||(this.outputData[a]=[]),l[a].status==="fulfilled")this.outputData[a]=[l[a].value];else throw new Error(`Error in row ${a+1}: ${l[a].reason?.message??"Check your formula"}`)}).catch(l=>{throw new Error(l.message)}),this.outputData},this.validateFunction=async(n,e,i)=>{let t=[...e.map(d=>d.key.trim()),"rowIndex"],r=i||this.formula;if(r){let d=/row\.([a-zA-Z_][\w$]*)/g,c=r.matchAll(d);for(let p of c){let g=p[1];if(!t.includes(g))throw new Error(`Invalid variable: row.${g} is not a valid column reference`)}}let o={...H.SAFE_GLOBALS,setTimeout},s=H.SAFE_PROTOTYPES;s.set(Response,new Set);let l=new H({globals:o,prototypeWhitelist:s,executionQuota:BigInt(3e3)}),a=n[0],u=`return (${this.replaceNullishCoalescingWithLogicalOr(i||this.formula)})($$inputs)`,f={$$inputs:{...a,rowIndex:0}};try{let d=l.compileAsync(u,!0)(f),c;Ce(d)?c=d:c=d.run();let p=await c;this.outputData[0]=[JSON.parse(JSON.stringify(p))]}catch{throw Error("Invalid Syntax")}},this.generateInputValues=(n,e)=>{let i=[];for(let t=0;t<n.length;++t)i[t]={},e.forEach((r,o)=>{i[t][r.key.trim()]=n[t][o]??""}),i[t].rowIndex=t;return i},this.replaceNullishCoalescingWithLogicalOr=n=>n.replace(/\?\?/g,"||")}};Oe(He);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as g}from"../chunk-LMA7WTWH.js";var O=["label"],m={EMAIL:"^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|'(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*')@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$",WEBSITE:"^(http:\\/\\/www\\.|https:\\/\\/www\\.|http:\\/\\/|https:\\/\\/)?[a-z0-9]+([\\-\\.]{1}[a-z0-9]+)*\\.[a-z]{2,5}(:[0-9]{1,5})?(\\/.*)?$"},y=["label","key","alternateMatches"],C=4,K=e=>{let t=new Set;for(let r=0;r<e.length;r++){let n=e[r];for(let o of Object.values(n))t.add(o)}return[...t]},L=(e,t)=>{let r={};for(let[n,o]of Object.entries(e)){r[n]={};for(let[l,s]of Object.entries(o))s.simValue>=t&&(r[n][l]=s.simValue)}return r},S=(e,t)=>{let r=new Set;for(let n of e.dropdownOptions??[])for(let[o,l]of Object.entries(n))t.includes(o)&&r.add(l);return[...r]};function z(e){let t={},r=[];for(let n of e?.dropdownOptions??[]){r.push(n),t[n.label]=n.label;for(let o of n.alternativeMatches??[])t[o]||(r.push({...n,label:o}),t[o]=n.label)}return{flatDropdownOptions:r,mappedKey:t}}function V(e,t){let r=structuredClone(e);for(let[n,o]of Object.entries(e.suggestions)){let l={};for(let[s,i]of Object.entries(o)){let u=t[s]??s;(l[u]??0)<=i&&(l[u]=i)}r.suggestions[n]=l}return r}function j(e){return!!(new RegExp(m.EMAIL).test(e)||new RegExp(m.WEBSITE).test(e))}function M(e,t){let r=S(e,O),n=K(t),o=Object.keys(t?.[0]||{})?.[0]??"";return{dropdownOptions:r,uniqueInputOptions:n,inputColumnLabel:o}}function k(e,t){let{dropdownOptions:r,uniqueInputOptions:n,inputColumnLabel:o}=M(e,t),l=E(n,r,e.optionMappingConfiguration);return{tdmColumnKey:e.key,inputColumn:o,suggestions:l}}function d(e){return e.toLowerCase().replace(/[~!@#$%^&*()_\-+={}[\]\\|;:'",./<>?]/g," ").replace(/\s+/g," ").trim()}var v=class{constructor(e,t){this.s1=e,this.s2=t}findLongestMatch(){let e=0,t=0,r=0,n=this.s1.length,o=this.s2.length,l=Array.from({length:n+1},()=>Array(o+1).fill(0));for(let s=0;s<n;s++)for(let i=0;i<o;i++)if(this.s1[s]===this.s2[i]){let u=l[s][i]+1;l[s+1][i+1]=u,u>r&&(r=u,e=s-u+1,t=i-u+1)}return{length:r,start1:e,start2:t}}};function h(e,t){let r=new v(e,t).findLongestMatch().length,n=e.length+t.length;return 2*r/n}function $(e,t){if(e.trim().length===0||t.trim().length===0)return 0;let r=d(e),n=d(t),o=h(r,n);if(Number(o.toFixed(2))===Number((.5+.07).toFixed(2))&&!e.toLowerCase().includes(t.toLowerCase()))o-=.1;else if(o>.56&&o<.5)o+=.02;else if(Number(o.toFixed(2))>.2&&o<=.5&&e.length>0&&t.length>0&&!j(e)){let l=h(r,n);l>o&&t.length>1&&e.length>1&&e.toLowerCase().includes(t.toLowerCase())&&(o=l)}return o}function E(e,t,r){let n={};for(let o of e)n[`${o}`]=x(`${o}`,t,r.layers);return L(n,r.threshold)}function x(e,t,r){let n={},o=r.includes("fuzzy"),l=r.includes("exact")?I(e,t):{},s=1;for(let i=0;i<t.length;i++){let u=t[i],a=0,f=!0;if(l.priority1?.includes(u))a=c(l.priority1.indexOf(u)),s=a<s?a:s;else if(l.priority2?.includes(u)){let p=2+l.priority1.length+l.priority2.indexOf(u);a=c(p),s=a<s?a:s}else if(l.priority3?.includes(u)){let p=3+l.priority2.length+l.priority3.indexOf(u);a=c(p),s=a<s?a:s}else o&&(f=!1,a=$(e,u),l.priority1?.includes(e)&&a===1&&(a=1-1e-4));n[u]={simValue:Number.isNaN(a)?0:a,isSameWord:f}}if(l.priority1?.length>0||l.priority2?.length>0||l.priority3?.length>0)for(let i=0;i<t.length;i++){let u=t[i];n[u].isSameWord||(n[u].simValue=N(s,n[u].simValue))}return n}function N(e,t){let r=Math.abs(e-t-1e-4);return t>r?t-r:0}function c(e){return 1-1e-4*e}function I(e,t){let r={priority1:[],priority2:[],priority3:[]};for(let n=0;n<t.length;n++){let o=t[n],l=e.trim().toLowerCase(),s=o.trim().toLowerCase(),i=l.replace(/[\s\-\\_&+!]/g,""),u=s.replace(/[\s\-\\_&+!]/g,"");e===o?r.priority1.push(o):l===s?r.priority2.push(o):i===u&&r.priority3.push(o)}return r}var W=e=>{let t=new Set;for(let r of e)for(let[n,o]of Object.entries(r))y.includes(n)&&t.add(o);return[...t]};function _(e,t){let r=[...new Set(t)],n=W(e);return{uniqueHeaders:r,tdmMappingKeys:n}}function q(e){let t={},r=[];for(let n of e){r.push(n),t[n.label]=n.key;for(let o of n.alternativeMatches??[])t[o]||(r.push({...n,key:o,label:o}),t[o]=n.key)}return{flatTdmColumns:r,mappedKey:t}}function A(e,t){let r=[];for(let n of e){let o=new Set,l=[];for(let s of n.columnSuggestions){let i=t[s.key]??s.key;o.has(i)||(l.push({...s,key:i}),o.add(i))}r.push({...n,columnSuggestions:l})}return r}function F(e,t,r,n){let o={},l={},s=[];for(let i of e){let u=x(`${i}`,t,n.layers);for(let[a,f]of Object.entries(u))if(f.isSameWord){let p=r?.[a]?.toLowerCase()||a.toLowerCase();l[p]?l[p]=l[p]>f.simValue?f.simValue:l[p]:l[p]=f.simValue}else f.simValue===1&&s.push({inputKey:i,suggestionKey:a});o[`${i}`]=u}for(let i=0;i<s.length;i++){let u=s[i],a=r?.[u.suggestionKey]?.toLowerCase()||u.suggestionKey.toLowerCase();l[a]&&(o[u.inputKey][u.suggestionKey].simValue=l[a]-1e-4)}return o}var T=(e,t)=>{let r={},n={};for(let o of t)for(let l of y){let s=o[l];s&&typeof s=="string"&&(n[s]=o.key)}for(let[o,l]of Object.entries(e)){let s={};for(let[i,u]of Object.entries(l)){let a=n[i],f=s[a];(!f||f.simValue<u.simValue)&&(s[a]=u)}r[o]=s}return r};function B(e,t){let r=[];for(let[n,o]of Object.entries(e)){let l={inputColumnKey:n,columnSuggestions:[]};for(let[s,i]of Object.entries(o))i.simValue>=t&&l.columnSuggestions.push({key:s,percentage:Number(i.simValue.toFixed(8))});l.columnSuggestions=l.columnSuggestions.sort((s,i)=>s.percentage>i.percentage?-1:1).slice(0,C),r.push(l)}return r}var D=(e,t)=>{let{flatDropdownOptions:r,mappedKey:n}=z(e);return e.dropdownOptions=r,{similarities:k(e,t),mappedKey:n}};async function b(e,t){return new Promise((r,n)=>{try{let{similarities:o,mappedKey:l}=D(e,t),s=V(o,l);r(s)}catch(o){n(o)}})}var H=(e,t,r)=>{let{mappedKey:n,flatTdmColumns:o}=q(e),{uniqueHeaders:l,tdmMappingKeys:s}=_(o,t),i=F(l,s,n,r);return{similarities:T(i,o),mappedKey:n}};async function w(e,t,r){return new Promise((n,o)=>{try{let{similarities:l,mappedKey:s}=H(e,t,r),i=B(l,r.threshold),u=A(i,s);n(u)}catch(l){o(l)}})}var R=()=>!0;g({check:R,getOptionMappings:b,getColumnMappings:w});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as x}from"../chunk-QHRAJWCW.js";import{b as M,c as C}from"../chunk-ODODIDUN.js";import{f as w}from"../chunk-DTEAHNF5.js";import"../chunk-ZW7EGY6P.js";import{d as S,g as D,h as R}from"../chunk-LMA7WTWH.js";var N=S(w()),f=S(w());var I=({rowA:o,rowB:e},h)=>h.every(t=>{let s=`${o[t.source]??""}`,a=`${e[t.target]??""}`;return s===a&&s!==""&&a!==""}),_=(o,e,h)=>{let t=[],s=o.headerRow,a=e.headerRow;for(let i=0;i<s.length;++i)t.push(s[i]);for(let i=0;i<a.length;++i)h.every(n=>n.target!==i)&&t.push(a[i]);return t},F=async(o,e)=>{let h=o.values,t=e.values,s=o.headerRow,a=e.headerRow,i=[...s,...a],n=[];n.push(i);for(let l=0;l<h.length;++l)n.push([...h[l],...t[0]]);return{data:n,type:"ADD_TO_ALL_ROWS"}},O=async(o,e)=>{let h=o.values,t=e.values,s=o.headerRow,a=e.headerRow,i=[...s,...a],n=[];n.push(i);for(let l=0;l<h.length;++l)n.push([...h[l],...a.map(()=>"")]);for(let l=0;l<t.length;++l)n.push([...s.map(()=>""),...t[l]]);return{data:n,type:"JOIN_WITHOUT_COLUMNS"}},K=async(o,e,h)=>{let t=o.values,s=e.values,a=[],i=[],n={},l=_(o,e,h);a.push(l);for(let r=0;r<t.length;++r){let m=!1,u=t[r];for(let d=0;d<s.length;++d){let c=s[d];I({rowA:u,rowB:c},h)&&(n[d]=!0,m=!0,a.push([...u,...c.filter((y,z)=>h.every($=>$.target!==z))]))}m||i.push([...u,...e.headerRow.filter((d,c)=>h.every(y=>y.target!==c)).map(()=>"")])}for(let r=0;r<s.length;++r){if(n[r])continue;let m=s[r],u=o.headerRow.map(()=>"");h.forEach(d=>{u[d.source]=m[d.target]}),i.push([...u,...m.filter((d,c)=>h.every(y=>y.target!==c))])}return i.forEach(r=>{a.push(r)}),{data:a,type:"JOIN_ON_COLUMNS"}},J=async(o,e,h)=>{let t=e.headerRow.filter((i,n)=>h.every(l=>l.target!==n)),s=[[...o.headerRow,...t]];for(let i=0;i<o.values.length;++i){let n=[...o.values[i],...t.map(()=>"")];s.push(n)}let a=e.values;for(let i=0;i<a.length;++i){let n=o.headerRow.map(()=>""),l=[];for(let r=0;r<e.headerRow.length;++r){let m=h.find(u=>u.target===r);m?n[m.source]=a[i][r]:l.push(a[i][r])}s.push([...n,...l])}return{data:s,type:"APPEND_TO_COLUMNS"}},H=async(o,e,h)=>{let t=o.values,s=e.values,a=t.length+s.length,i=0,n={};for(let l=0;l<t.length;l++){let r=t[l],m=null,u=0;for(let d=0;d<s.length;d++){let c=s[d];if(I({rowA:r,rowB:c},h)&&(m=d,u++,u===2))break}u===1&&m!==null&&(i+=1,n[m]=!0)}for(let l=0;l<s.length;l++)n[l]&&(i+=1);return{count:i,total:a}},j=class{constructor({sheetColumn:o,matchedDataModel:e,detectedNumberFormats:h}){if(this.getOptionValue=(t,s)=>{if(!s)if(this.matchedDataModel.dataModel){let a=this.sheetColumn.columnKey,i=this.detectedNumberFormats.columns.find(n=>n.column===a)?.numberFormat||this.detectedNumberFormats.global;return C.parse(t,{dataModel:this.matchedDataModel.dataModel,isParseFromSheet:!0,numberFormat:i})}else return t;for(let a=0;a<s.length;a++)if(`${s[a]?.sheetOption}`==`${t}`)return this.matchedDataModel.dataModel&&this.matchedDataModel.dataModel.getIsMultiSelection()?C.parse(s[a]?.dataModelOptions,{dataModel:this.matchedDataModel.dataModel,isParseFromSheet:!0}):this.matchedDataModel.dataModel?C.parse(s[a]?.dataModelOption,{dataModel:this.matchedDataModel.dataModel,isParseFromSheet:!0}):s[a]?.dataModelOption},this.getValues=()=>{let t=this.sheetColumn.rows,s=[];for(let a=0;a<t.length;a++){let i=t[a];s.push(this.getOptionValue(i,this.matchedOptions))}return s},this.sheetColumn=o,this.matchedDataModel=e,this.matchedOptions=void 0,this.detectedNumberFormats=h||{global:"eu",columns:[]},this.matchedDataModel.matchedOptions){this.matchedOptions=[];for(let t=0;t<(this.matchedDataModel.matchedOptions?.length??0);t++)this.matchedDataModel.dataModel?.getIsMultiSelection()?this.matchedDataModel.matchedOptions?.[t].dataModelOptions&&this.matchedOptions.push(this.matchedDataModel.matchedOptions?.[t]):this.matchedDataModel.matchedOptions?.[t].dataModelOption&&this.matchedOptions.push(this.matchedDataModel.matchedOptions?.[t])}}},V=j,E=class{constructor(o){this.matchedColumns=[],this.parseValues=()=>{let t=[];this.matchedColumns.forEach(s=>{let a=s.matchedDataModel,i=new V({sheetColumn:s.sheetColumn,matchedDataModel:a,detectedNumberFormats:this.detectedNumberFormats}).getValues(),n=a.dataModel.getKey();i.forEach((l,r)=>{t[r]?t[r][n]=l:t[r]={[n]:l}})});for(let s=0;s<t.length;++s)for(let a=0;a<this.columns.length;++a){let i=this.columns[a].key;t[s][i]===void 0&&(t[s][i]=null)}return t},this.getValues=()=>(this.matchedColumns=[],this.matching.filter(t=>t.matchedDataModel?.dataModel).forEach(t=>{this.matchedColumns.push({sheetColumn:t.sheetColumn,matchedDataModel:t.matchedDataModel})}),this.parseValues());let{matching:e,detectedNumberFormats:h}=o;this.matching=e,this.detectedNumberFormats=h||{global:"eu",columns:[]},this.columns=o.columns??[]}},B=E,T=({matching:o,detectedNumberFormats:e,columns:h})=>new B({matching:o,detectedNumberFormats:e,columns:h}).getValues(),g,v=(g=class{},g.serialize=e=>e.serialize(),g.deSerialize=e=>M.isTypeCategory(e.type)?new x({description:e.description,example:e.example,key:e.key,label:e.label,type:e.type,options:e.options,validators:[],alternativeMatches:e.alternativeMatches,columnSize:e.columnSize,isMultiSelection:e.isMultiSelection??!1,allowCustomOptions:e.allowCustomOptions||!1,hidden:e.hidden,disabled:e.disabled,optionMappingConfiguration:e.optionMappingConfiguration}):new M({description:e.description,example:e.example,key:e.key,label:e.label,type:e.type,validators:[],alternativeMatches:e.alternativeMatches,columnSize:e.columnSize,outputFormat:e.outputFormat,numberFormat:e.numberFormat,hidden:e.hidden,disabled:e.disabled,optionMappingConfiguration:e.optionMappingConfiguration}),g),p,b=(p=class{},p.serialize=e=>{let h={matching:[],detectedNumberFormats:e.detectedNumberFormats,columns:e.columns};return h.matching=e.matching.map(t=>({sheetColumn:t.sheetColumn,matchedDataModel:t.matchedDataModel?{dataModel:t.matchedDataModel.dataModel?v.serialize(t.matchedDataModel.dataModel):t.matchedDataModel.dataModel,matchedOptions:t.matchedDataModel.matchedOptions}:t.matchedDataModel})),[h,[]]},p.deserialize=e=>({matching:e.matching.map(h=>({sheetColumn:h.sheetColumn,matchedDataModel:h.matchedDataModel?{dataModel:h.matchedDataModel.dataModel?v.deSerialize(h.matchedDataModel.dataModel):h.matchedDataModel.dataModel,matchedOptions:h.matchedDataModel.matchedOptions}:h.matchedDataModel})),detectedNumberFormats:e.detectedNumberFormats,columns:e.columns}),p);D.set("Matching",{canHandle:o=>!!(typeof o=="object"&&o.matching),serialize:o=>b.serialize(o),deserialize:o=>b.deserialize(o)});var q=()=>!0;R({check:q,getValues:T,addToAllRows:F,joinWithoutColumns:O,joinOnColumns:K,appendToColumns:J,countMatching:H});
|