go-core 0.2.35 → 0.2.37
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/dist/code.es5.js +8 -20
- package/dist/code.umd.js +8 -20
- package/package.json +1 -1
package/dist/code.umd.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lodash"),require("axios")):"function"==typeof define&&define.amd?define(["exports","lodash","axios"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).code={},e._,e.axios)}(this,(function(exports,_$1,axios){"use strict";var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var moment=createCommonjsModule((function(e,t){e.exports=function(){var t,r;function n(){return t.apply(null,arguments)}function i(e){t=e}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function c(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var r,n=[],i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function f(e,t){for(var r in t)s(t,r)&&(e[r]=t[r]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,r,n){return Wr(e,t,r,n,!0).utc()}function m(){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 g(e){return null==e._pf&&(e._pf=m()),e._pf}function v(e){var t=null,n=!1,i=e._d&&!isNaN(e._d.getTime());return i&&(t=g(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),i=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?i:(e._isValid=i,e._isValid)}function y(e){var t=p(NaN);return null!=e?f(g(t),e):g(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){var t,r=Object(this),n=r.length>>>0;for(t=0;t<n;t++)if(t in r&&e.call(this,r[t],t,r))return!0;return!1};var _=n.momentProperties=[],b=!1;function w(e,t){var r,n,i,o=_.length;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=g(t)),c(t._locale)||(e._locale=t._locale),o>0)for(r=0;r<o;r++)c(i=t[n=_[r]])||(e[n]=i);return e}function D(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,n.updateOffset(this),b=!1)}function x(e){return e instanceof D||null!=e&&null!=e._isAMomentObject}function S(e){!1===n.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function k(e,t){var r=!0;return f((function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,e),r){var i,o,a,l=[],c=arguments.length;for(o=0;o<c;o++){if(i="","object"==typeof arguments[o]){for(a in i+="\n["+o+"] ",arguments[0])s(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[o];l.push(i)}S(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),r=!1}return t.apply(this,arguments)}),t)}var T,P={};function E(e,t){null!=n.deprecationHandler&&n.deprecationHandler(e,t),P[e]||(S(t),P[e]=!0)}function A(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function C(e){var t,r;for(r in e)s(e,r)&&(A(t=e[r])?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function O(e,t){var r,n=f({},e);for(r in t)s(t,r)&&(a(e[r])&&a(t[r])?(n[r]={},f(n[r],e[r]),f(n[r],t[r])):null!=t[r]?n[r]=t[r]:delete n[r]);for(r in e)s(e,r)&&!s(t,r)&&a(e[r])&&(n[r]=f({},n[r]));return n}function M(e){null!=e&&this.set(e)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null,T=Object.keys?Object.keys:function(e){var t,r=[];for(t in e)s(e,t)&&r.push(t);return r};var R={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function I(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return A(n)?n.call(t,r):n}function N(e,t,r){var n=""+Math.abs(e),i=t-n.length;return(e>=0?r?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}var B=/(\[[^\[]*\])|(\\)?([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,F=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,j={},$={};function V(e,t,r,n){var i=n;"string"==typeof n&&(i=function(){return this[n]()}),e&&($[e]=i),t&&($[t[0]]=function(){return N(i.apply(this,arguments),t[1],t[2])}),r&&($[r]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function U(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function L(e){var t,r,n=e.match(B);for(t=0,r=n.length;t<r;t++)$[n[t]]?n[t]=$[n[t]]:n[t]=U(n[t]);return function(t){var i,o="";for(i=0;i<r;i++)o+=A(n[i])?n[i].call(t,e):n[i];return o}}function z(e,t){return e.isValid()?(t=K(t,e.localeData()),j[t]=j[t]||L(t),j[t](e)):e.localeData().invalidDate()}function K(e,t){var r=5;function n(e){return t.longDateFormat(e)||e}for(F.lastIndex=0;r>=0&&F.test(e);)e=e.replace(F,n),F.lastIndex=0,r-=1;return e}var H={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 q(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(B).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var W="Invalid date";function Y(){return this._invalidDate}var G="%d",J=/\d{1,2}/;function X(e){return this._ordinal.replace("%d",e)}var Z={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 Q(e,t,r,n){var i=this._relativeTime[r];return A(i)?i(e,t,r,n):i.replace(/%d/i,e)}function ee(e,t){var r=this._relativeTime[e>0?"future":"past"];return A(r)?r(t):r.replace(/%s/i,t)}var te={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 re(e){return"string"==typeof e?te[e]||te[e.toLowerCase()]:void 0}function ne(e){var t,r,n={};for(r in e)s(e,r)&&(t=re(r))&&(n[t]=e[r]);return n}var ie={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 oe(e){var t,r=[];for(t in e)s(e,t)&&r.push({unit:t,priority:ie[t]});return r.sort((function(e,t){return e.priority-t.priority})),r}var ae,se=/\d/,le=/\d\d/,ce=/\d{3}/,ue=/\d{4}/,he=/[+-]?\d{6}/,de=/\d\d?/,fe=/\d\d\d\d?/,pe=/\d\d\d\d\d\d?/,me=/\d{1,3}/,ge=/\d{1,4}/,ve=/[+-]?\d{1,6}/,ye=/\d+/,_e=/[+-]?\d+/,be=/Z|[+-]\d\d:?\d\d/gi,we=/Z|[+-]\d\d(?::?\d\d)?/gi,De=/[+-]?\d+(\.\d{1,3})?/,xe=/[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,Se=/^[1-9]\d?/,ke=/^([1-9]\d|\d)/;function Te(e,t,r){ae[e]=A(t)?t:function(e,n){return e&&r?r:t}}function Pe(e,t){return s(ae,e)?ae[e](t._strict,t._locale):new RegExp(Ee(e))}function Ee(e){return Ae(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,r,n,i){return t||r||n||i})))}function Ae(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Oe(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=Ce(t)),r}ae={};var Me={};function Re(e,t){var r,n,i=t;for("string"==typeof e&&(e=[e]),u(t)&&(i=function(e,r){r[t]=Oe(e)}),n=e.length,r=0;r<n;r++)Me[e[r]]=i}function Ie(e,t){Re(e,(function(e,r,n,i){n._w=n._w||{},t(e,n._w,n,i)}))}function Ne(e,t,r){null!=t&&s(Me,e)&&Me[e](t,r._a,r,e)}function Be(e){return e%4==0&&e%100!=0||e%400==0}var Fe=0,je=1,$e=2,Ve=3,Ue=4,Le=5,ze=6,Ke=7,He=8;function qe(e){return Be(e)?366:365}V("Y",0,0,(function(){var e=this.year();return e<=9999?N(e,4):"+"+e})),V(0,["YY",2],0,(function(){return this.year()%100})),V(0,["YYYY",4],0,"year"),V(0,["YYYYY",5],0,"year"),V(0,["YYYYYY",6,!0],0,"year"),Te("Y",_e),Te("YY",de,le),Te("YYYY",ge,ue),Te("YYYYY",ve,he),Te("YYYYYY",ve,he),Re(["YYYYY","YYYYYY"],Fe),Re("YYYY",(function(e,t){t[Fe]=2===e.length?n.parseTwoDigitYear(e):Oe(e)})),Re("YY",(function(e,t){t[Fe]=n.parseTwoDigitYear(e)})),Re("Y",(function(e,t){t[Fe]=parseInt(e,10)})),n.parseTwoDigitYear=function(e){return Oe(e)+(Oe(e)>68?1900:2e3)};var We,Ye=Je("FullYear",!0);function Ge(){return Be(this.year())}function Je(e,t){return function(r){return null!=r?(Ze(this,e,r),n.updateOffset(this,t),this):Xe(this,e)}}function Xe(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function Ze(e,t,r){var n,i,o,a,s;if(e.isValid()&&!isNaN(r)){switch(n=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(i?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(i?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(i?n.setUTCHours(r):n.setHours(r));case"Date":return void(i?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}o=r,a=e.month(),s=29!==(s=e.date())||1!==a||Be(o)?s:28,i?n.setUTCFullYear(o,a,s):n.setFullYear(o,a,s)}}function Qe(e){return A(this[e=re(e)])?this[e]():this}function et(e,t){if("object"==typeof e){var r,n=oe(e=ne(e)),i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(A(this[e=re(e)]))return this[e](t);return this}function tt(e,t){return(e%t+t)%t}function rt(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=tt(t,12);return e+=(t-r)/12,1===r?Be(e)?29:28:31-r%7%2}We=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},V("M",["MM",2],"Mo",(function(){return this.month()+1})),V("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),V("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),Te("M",de,Se),Te("MM",de,le),Te("MMM",(function(e,t){return t.monthsShortRegex(e)})),Te("MMMM",(function(e,t){return t.monthsRegex(e)})),Re(["M","MM"],(function(e,t){t[je]=Oe(e)-1})),Re(["MMM","MMMM"],(function(e,t,r,n){var i=r._locale.monthsParse(e,n,r._strict);null!=i?t[je]=i:g(r).invalidMonth=e}));var nt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),it="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ot=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,at=xe,st=xe;function lt(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ot).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone}function ct(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ot.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ut(e,t,r){var n,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)o=p([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(o,"").toLocaleLowerCase();return r?"MMM"===t?-1!==(i=We.call(this._shortMonthsParse,a))?i:null:-1!==(i=We.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=We.call(this._shortMonthsParse,a))||-1!==(i=We.call(this._longMonthsParse,a))?i:null:-1!==(i=We.call(this._longMonthsParse,a))||-1!==(i=We.call(this._shortMonthsParse,a))?i:null}function ht(e,t,r){var n,i,o;if(this._monthsParseExact)return ut.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(i=p([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),r||this._monthsParse[n]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[n]=new RegExp(o.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(r&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function dt(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=Oe(t);else if(!u(t=e.localeData().monthsParse(t)))return e;var r=t,n=e.date();return n=n<29?n:Math.min(n,rt(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function ft(e){return null!=e?(dt(this,e),n.updateOffset(this,!0),this):Xe(this,"Month")}function pt(){return rt(this.year(),this.month())}function mt(e){return this._monthsParseExact?(s(this,"_monthsRegex")||vt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=at),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function gt(e){return this._monthsParseExact?(s(this,"_monthsRegex")||vt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=st),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function vt(){function e(e,t){return t.length-e.length}var t,r,n,i,o=[],a=[],s=[];for(t=0;t<12;t++)r=p([2e3,t]),n=Ae(this.monthsShort(r,"")),i=Ae(this.months(r,"")),o.push(n),a.push(i),s.push(i),s.push(n);o.sort(e),a.sort(e),s.sort(e),this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+o.join("|")+")","i")}function yt(e,t,r,n,i,o,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,r,n,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,r,n,i,o,a),s}function _t(e){var t,r;return e<100&&e>=0?((r=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function bt(e,t,r){var n=7+t-r;return-(7+_t(e,0,n).getUTCDay()-t)%7+n-1}function wt(e,t,r,n,i){var o,a,s=1+7*(t-1)+(7+r-n)%7+bt(e,n,i);return s<=0?a=qe(o=e-1)+s:s>qe(e)?(o=e+1,a=s-qe(e)):(o=e,a=s),{year:o,dayOfYear:a}}function Dt(e,t,r){var n,i,o=bt(e.year(),t,r),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?n=a+xt(i=e.year()-1,t,r):a>xt(e.year(),t,r)?(n=a-xt(e.year(),t,r),i=e.year()+1):(i=e.year(),n=a),{week:n,year:i}}function xt(e,t,r){var n=bt(e,t,r),i=bt(e+1,t,r);return(qe(e)-n+i)/7}function St(e){return Dt(e,this._week.dow,this._week.doy).week}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),Te("w",de,Se),Te("ww",de,le),Te("W",de,Se),Te("WW",de,le),Ie(["w","ww","W","WW"],(function(e,t,r,n){t[n.substr(0,1)]=Oe(e)}));var kt={dow:0,doy:6};function Tt(){return this._week.dow}function Pt(){return this._week.doy}function Et(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function At(e){var t=Dt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Ct(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Ot(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Mt(e,t){return e.slice(t,7).concat(e.slice(0,t))}V("d",0,"do","day"),V("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),V("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),V("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),Te("d",de),Te("e",de),Te("E",de),Te("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Te("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Te("dddd",(function(e,t){return t.weekdaysRegex(e)})),Ie(["dd","ddd","dddd"],(function(e,t,r,n){var i=r._locale.weekdaysParse(e,n,r._strict);null!=i?t.d=i:g(r).invalidWeekday=e})),Ie(["d","e","E"],(function(e,t,r,n){t[n]=Oe(e)}));var Rt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),It="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Nt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Bt=xe,Ft=xe,jt=xe;function $t(e,t){var r=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Mt(r,this._week.dow):e?r[e.day()]:r}function Vt(e){return!0===e?Mt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ut(e){return!0===e?Mt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Lt(e,t,r){var n,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=p([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return r?"dddd"===t?-1!==(i=We.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=We.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=We.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=We.call(this._weekdaysParse,a))||-1!==(i=We.call(this._shortWeekdaysParse,a))||-1!==(i=We.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=We.call(this._shortWeekdaysParse,a))||-1!==(i=We.call(this._weekdaysParse,a))||-1!==(i=We.call(this._minWeekdaysParse,a))?i:null:-1!==(i=We.call(this._minWeekdaysParse,a))||-1!==(i=We.call(this._weekdaysParse,a))||-1!==(i=We.call(this._shortWeekdaysParse,a))?i:null}function zt(e,t,r){var n,i,o;if(this._weekdaysParseExact)return Lt.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=p([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function Kt(e){if(!this.isValid())return null!=e?this:NaN;var t=Xe(this,"Day");return null!=e?(e=Ct(e,this.localeData()),this.add(e-t,"d")):t}function Ht(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function qt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Ot(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Wt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Jt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Bt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Yt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Jt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ft),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Gt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Jt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=jt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Jt(){function e(e,t){return t.length-e.length}var t,r,n,i,o,a=[],s=[],l=[],c=[];for(t=0;t<7;t++)r=p([2e3,1]).day(t),n=Ae(this.weekdaysMin(r,"")),i=Ae(this.weekdaysShort(r,"")),o=Ae(this.weekdays(r,"")),a.push(n),s.push(i),l.push(o),c.push(n),c.push(i),c.push(o);a.sort(e),s.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Xt(){return this.hours()%12||12}function Zt(){return this.hours()||24}function Qt(e,t){V(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function er(e,t){return t._meridiemParse}function tr(e){return"p"===(e+"").toLowerCase().charAt(0)}V("H",["HH",2],0,"hour"),V("h",["hh",2],0,Xt),V("k",["kk",2],0,Zt),V("hmm",0,0,(function(){return""+Xt.apply(this)+N(this.minutes(),2)})),V("hmmss",0,0,(function(){return""+Xt.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)})),V("Hmm",0,0,(function(){return""+this.hours()+N(this.minutes(),2)})),V("Hmmss",0,0,(function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)})),Qt("a",!0),Qt("A",!1),Te("a",er),Te("A",er),Te("H",de,ke),Te("h",de,Se),Te("k",de,Se),Te("HH",de,le),Te("hh",de,le),Te("kk",de,le),Te("hmm",fe),Te("hmmss",pe),Te("Hmm",fe),Te("Hmmss",pe),Re(["H","HH"],Ve),Re(["k","kk"],(function(e,t,r){var n=Oe(e);t[Ve]=24===n?0:n})),Re(["a","A"],(function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e})),Re(["h","hh"],(function(e,t,r){t[Ve]=Oe(e),g(r).bigHour=!0})),Re("hmm",(function(e,t,r){var n=e.length-2;t[Ve]=Oe(e.substr(0,n)),t[Ue]=Oe(e.substr(n)),g(r).bigHour=!0})),Re("hmmss",(function(e,t,r){var n=e.length-4,i=e.length-2;t[Ve]=Oe(e.substr(0,n)),t[Ue]=Oe(e.substr(n,2)),t[Le]=Oe(e.substr(i)),g(r).bigHour=!0})),Re("Hmm",(function(e,t,r){var n=e.length-2;t[Ve]=Oe(e.substr(0,n)),t[Ue]=Oe(e.substr(n))})),Re("Hmmss",(function(e,t,r){var n=e.length-4,i=e.length-2;t[Ve]=Oe(e.substr(0,n)),t[Ue]=Oe(e.substr(n,2)),t[Le]=Oe(e.substr(i))}));var rr=/[ap]\.?m?\.?/i,nr=Je("Hours",!0);function ir(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var or,ar={calendar:R,longDateFormat:H,invalidDate:W,ordinal:G,dayOfMonthOrdinalParse:J,relativeTime:Z,months:nt,monthsShort:it,week:kt,weekdays:Rt,weekdaysMin:Nt,weekdaysShort:It,meridiemParse:rr},sr={},lr={};function cr(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function ur(e){return e?e.toLowerCase().replace("_","-"):e}function hr(e){for(var t,r,n,i,o=0;o<e.length;){for(t=(i=ur(e[o]).split("-")).length,r=(r=ur(e[o+1]))?r.split("-"):null;t>0;){if(n=fr(i.slice(0,t).join("-")))return n;if(r&&r.length>=t&&cr(i,r)>=t-1)break;t--}o++}return or}function dr(e){return!(!e||!e.match("^[^/\\\\]*$"))}function fr(t){var r=null;if(void 0===sr[t]&&e&&e.exports&&dr(t))try{r=or._abbr,commonjsRequire("./locale/"+t),pr(r)}catch(e){sr[t]=null}return sr[t]}function pr(e,t){var r;return e&&((r=c(t)?vr(e):mr(e,t))?or=r:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),or._abbr}function mr(e,t){if(null!==t){var r,n=ar;if(t.abbr=e,null!=sr[e])E("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."),n=sr[e]._config;else if(null!=t.parentLocale)if(null!=sr[t.parentLocale])n=sr[t.parentLocale]._config;else{if(null==(r=fr(t.parentLocale)))return lr[t.parentLocale]||(lr[t.parentLocale]=[]),lr[t.parentLocale].push({name:e,config:t}),null;n=r._config}return sr[e]=new M(O(n,t)),lr[e]&&lr[e].forEach((function(e){mr(e.name,e.config)})),pr(e),sr[e]}return delete sr[e],null}function gr(e,t){if(null!=t){var r,n,i=ar;null!=sr[e]&&null!=sr[e].parentLocale?sr[e].set(O(sr[e]._config,t)):(null!=(n=fr(e))&&(i=n._config),t=O(i,t),null==n&&(t.abbr=e),(r=new M(t)).parentLocale=sr[e],sr[e]=r),pr(e)}else null!=sr[e]&&(null!=sr[e].parentLocale?(sr[e]=sr[e].parentLocale,e===pr()&&pr(e)):null!=sr[e]&&delete sr[e]);return sr[e]}function vr(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return or;if(!o(e)){if(t=fr(e))return t;e=[e]}return hr(e)}function yr(){return T(sr)}function _r(e){var t,r=e._a;return r&&-2===g(e).overflow&&(t=r[je]<0||r[je]>11?je:r[$e]<1||r[$e]>rt(r[Fe],r[je])?$e:r[Ve]<0||r[Ve]>24||24===r[Ve]&&(0!==r[Ue]||0!==r[Le]||0!==r[ze])?Ve:r[Ue]<0||r[Ue]>59?Ue:r[Le]<0||r[Le]>59?Le:r[ze]<0||r[ze]>999?ze:-1,g(e)._overflowDayOfYear&&(t<Fe||t>$e)&&(t=$e),g(e)._overflowWeeks&&-1===t&&(t=Ke),g(e)._overflowWeekday&&-1===t&&(t=He),g(e).overflow=t),e}var br=/^\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)?)?$/,wr=/^\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)?)?$/,Dr=/Z|[+-]\d\d(?::?\d\d)?/,xr=[["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]],Sr=[["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/]],kr=/^\/?Date\((-?\d+)/i,Tr=/^(?:(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}))$/,Pr={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Er(e){var t,r,n,i,o,a,s=e._i,l=br.exec(s)||wr.exec(s),c=xr.length,u=Sr.length;if(l){for(g(e).iso=!0,t=0,r=c;t<r;t++)if(xr[t][1].exec(l[1])){i=xr[t][0],n=!1!==xr[t][2];break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,r=u;t<r;t++)if(Sr[t][1].exec(l[3])){o=(l[2]||" ")+Sr[t][0];break}if(null==o)return void(e._isValid=!1)}if(!n&&null!=o)return void(e._isValid=!1);if(l[4]){if(!Dr.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=i+(o||"")+(a||""),Vr(e)}else e._isValid=!1}function Ar(e,t,r,n,i,o){var a=[Cr(e),it.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(i,10)];return o&&a.push(parseInt(o,10)),a}function Cr(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Or(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Mr(e,t,r){return!e||It.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(r).weekdayMismatch=!0,r._isValid=!1,!1)}function Rr(e,t,r){if(e)return Pr[e];if(t)return 0;var n=parseInt(r,10),i=n%100;return(n-i)/100*60+i}function Ir(e){var t,r=Tr.exec(Or(e._i));if(r){if(t=Ar(r[4],r[3],r[2],r[5],r[6],r[7]),!Mr(r[1],t,e))return;e._a=t,e._tzm=Rr(r[8],r[9],r[10]),e._d=_t.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function Nr(e){var t=kr.exec(e._i);null===t?(Er(e),!1===e._isValid&&(delete e._isValid,Ir(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:n.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Br(e,t,r){return null!=e?e:null!=t?t:r}function Fr(e){var t=new Date(n.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function jr(e){var t,r,n,i,o,a=[];if(!e._d){for(n=Fr(e),e._w&&null==e._a[$e]&&null==e._a[je]&&$r(e),null!=e._dayOfYear&&(o=Br(e._a[Fe],n[Fe]),(e._dayOfYear>qe(o)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),r=_t(o,0,e._dayOfYear),e._a[je]=r.getUTCMonth(),e._a[$e]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=n[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ve]&&0===e._a[Ue]&&0===e._a[Le]&&0===e._a[ze]&&(e._nextDay=!0,e._a[Ve]=0),e._d=(e._useUTC?_t:yt).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ve]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}function $r(e){var t,r,n,i,o,a,s,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(o=1,a=4,r=Br(t.GG,e._a[Fe],Dt(Yr(),1,4).year),n=Br(t.W,1),((i=Br(t.E,1))<1||i>7)&&(l=!0)):(o=e._locale._week.dow,a=e._locale._week.doy,c=Dt(Yr(),o,a),r=Br(t.gg,e._a[Fe],c.year),n=Br(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o),n<1||n>xt(r,o,a)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(s=wt(r,n,i,o,a),e._a[Fe]=s.year,e._dayOfYear=s.dayOfYear)}function Vr(e){if(e._f!==n.ISO_8601)if(e._f!==n.RFC_2822){e._a=[],g(e).empty=!0;var t,r,i,o,a,s,l,c=""+e._i,u=c.length,h=0;for(l=(i=K(e._f,e._locale).match(B)||[]).length,t=0;t<l;t++)o=i[t],(r=(c.match(Pe(o,e))||[])[0])&&((a=c.substr(0,c.indexOf(r))).length>0&&g(e).unusedInput.push(a),c=c.slice(c.indexOf(r)+r.length),h+=r.length),$[o]?(r?g(e).empty=!1:g(e).unusedTokens.push(o),Ne(o,r,e)):e._strict&&!r&&g(e).unusedTokens.push(o);g(e).charsLeftOver=u-h,c.length>0&&g(e).unusedInput.push(c),e._a[Ve]<=12&&!0===g(e).bigHour&&e._a[Ve]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[Ve]=Ur(e._locale,e._a[Ve],e._meridiem),null!==(s=g(e).era)&&(e._a[Fe]=e._locale.erasConvertYear(s,e._a[Fe])),jr(e),_r(e)}else Ir(e);else Er(e)}function Ur(e,t,r){var n;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?((n=e.isPM(r))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}function Lr(e){var t,r,n,i,o,a,s=!1,l=e._f.length;if(0===l)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<l;i++)o=0,a=!1,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Vr(t),v(t)&&(a=!0),o+=g(t).charsLeftOver,o+=10*g(t).unusedTokens.length,g(t).score=o,s?o<n&&(n=o,r=t):(null==n||o<n||a)&&(n=o,r=t,a&&(s=!0));f(e,r||t)}function zr(e){if(!e._d){var t=ne(e._i),r=void 0===t.day?t.date:t.day;e._a=d([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),jr(e)}}function Kr(e){var t=new D(_r(Hr(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Hr(e){var t=e._i,r=e._f;return e._locale=e._locale||vr(e._l),null===t||void 0===r&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),x(t)?new D(_r(t)):(h(t)?e._d=t:o(r)?Lr(e):r?Vr(e):qr(e),v(e)||(e._d=null),e))}function qr(e){var t=e._i;c(t)?e._d=new Date(n.now()):h(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Nr(e):o(t)?(e._a=d(t.slice(0),(function(e){return parseInt(e,10)})),jr(e)):a(t)?zr(e):u(t)?e._d=new Date(t):n.createFromInputFallback(e)}function Wr(e,t,r,n,i){var s={};return!0!==t&&!1!==t||(n=t,t=void 0),!0!==r&&!1!==r||(n=r,r=void 0),(a(e)&&l(e)||o(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=r,s._i=e,s._f=t,s._strict=n,Kr(s)}function Yr(e,t,r,n){return Wr(e,t,r,n,!1)}n.createFromInputFallback=k("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":""))})),n.ISO_8601=function(){},n.RFC_2822=function(){};var Gr=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Yr.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()})),Jr=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Yr.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()}));function Xr(e,t){var r,n;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Yr();for(r=t[0],n=1;n<t.length;++n)t[n].isValid()&&!t[n][e](r)||(r=t[n]);return r}function Zr(){return Xr("isBefore",[].slice.call(arguments,0))}function Qr(){return Xr("isAfter",[].slice.call(arguments,0))}var en=function(){return Date.now?Date.now():+new Date},tn=["year","quarter","month","week","day","hour","minute","second","millisecond"];function rn(e){var t,r,n=!1,i=tn.length;for(t in e)if(s(e,t)&&(-1===We.call(tn,t)||null!=e[t]&&isNaN(e[t])))return!1;for(r=0;r<i;++r)if(e[tn[r]]){if(n)return!1;parseFloat(e[tn[r]])!==Oe(e[tn[r]])&&(n=!0)}return!0}function nn(){return this._isValid}function on(){return En(NaN)}function an(e){var t=ne(e),r=t.year||0,n=t.quarter||0,i=t.month||0,o=t.week||t.isoWeek||0,a=t.day||0,s=t.hour||0,l=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=rn(t),this._milliseconds=+u+1e3*c+6e4*l+1e3*s*60*60,this._days=+a+7*o,this._months=+i+3*n+12*r,this._data={},this._locale=vr(),this._bubble()}function sn(e){return e instanceof an}function ln(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function cn(e,t,r){var n,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(n=0;n<i;n++)(r&&e[n]!==t[n]||!r&&Oe(e[n])!==Oe(t[n]))&&a++;return a+o}function un(e,t){V(e,0,0,(function(){var e=this.utcOffset(),r="+";return e<0&&(e=-e,r="-"),r+N(~~(e/60),2)+t+N(~~e%60,2)}))}un("Z",":"),un("ZZ",""),Te("Z",we),Te("ZZ",we),Re(["Z","ZZ"],(function(e,t,r){r._useUTC=!0,r._tzm=dn(we,e)}));var hn=/([\+\-]|\d\d)/gi;function dn(e,t){var r,n,i=(t||"").match(e);return null===i?null:0===(n=60*(r=((i[i.length-1]||[])+"").match(hn)||["-",0,0])[1]+Oe(r[2]))?0:"+"===r[0]?n:-n}function fn(e,t){var r,i;return t._isUTC?(r=t.clone(),i=(x(e)||h(e)?e.valueOf():Yr(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+i),n.updateOffset(r,!1),r):Yr(e).local()}function pn(e){return-Math.round(e._d.getTimezoneOffset())}function mn(e,t,r){var i,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=dn(we,e)))return this}else Math.abs(e)<16&&!r&&(e*=60);return!this._isUTC&&t&&(i=pn(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==e&&(!t||this._changeInProgress?Rn(this,En(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:pn(this)}function gn(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function vn(e){return this.utcOffset(0,e)}function yn(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(pn(this),"m")),this}function _n(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=dn(be,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function bn(e){return!!this.isValid()&&(e=e?Yr(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function wn(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Dn(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=Hr(t))._a?(e=t._isUTC?p(t._a):Yr(t._a),this._isDSTShifted=this.isValid()&&cn(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function xn(){return!!this.isValid()&&!this._isUTC}function Sn(){return!!this.isValid()&&this._isUTC}function kn(){return!!this.isValid()&&this._isUTC&&0===this._offset}n.updateOffset=function(){};var Tn=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Pn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function En(e,t){var r,n,i,o=e,a=null;return sn(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(o={},t?o[t]=+e:o.milliseconds=+e):(a=Tn.exec(e))?(r="-"===a[1]?-1:1,o={y:0,d:Oe(a[$e])*r,h:Oe(a[Ve])*r,m:Oe(a[Ue])*r,s:Oe(a[Le])*r,ms:Oe(ln(1e3*a[ze]))*r}):(a=Pn.exec(e))?(r="-"===a[1]?-1:1,o={y:An(a[2],r),M:An(a[3],r),w:An(a[4],r),d:An(a[5],r),h:An(a[6],r),m:An(a[7],r),s:An(a[8],r)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(i=On(Yr(o.from),Yr(o.to)),(o={}).ms=i.milliseconds,o.M=i.months),n=new an(o),sn(e)&&s(e,"_locale")&&(n._locale=e._locale),sn(e)&&s(e,"_isValid")&&(n._isValid=e._isValid),n}function An(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Cn(e,t){var r={};return r.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function On(e,t){var r;return e.isValid()&&t.isValid()?(t=fn(t,e),e.isBefore(t)?r=Cn(e,t):((r=Cn(t,e)).milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Mn(e,t){return function(r,n){var i;return null===n||isNaN(+n)||(E(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=r,r=n,n=i),Rn(this,En(r,n),e),this}}function Rn(e,t,r,i){var o=t._milliseconds,a=ln(t._days),s=ln(t._months);e.isValid()&&(i=null==i||i,s&&dt(e,Xe(e,"Month")+s*r),a&&Ze(e,"Date",Xe(e,"Date")+a*r),o&&e._d.setTime(e._d.valueOf()+o*r),i&&n.updateOffset(e,a||s))}En.fn=an.prototype,En.invalid=on;var In=Mn(1,"add"),Nn=Mn(-1,"subtract");function Bn(e){return"string"==typeof e||e instanceof String}function Fn(e){return x(e)||h(e)||Bn(e)||u(e)||$n(e)||jn(e)||null==e}function jn(e){var t,r,n=a(e)&&!l(e),i=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=o.length;for(t=0;t<c;t+=1)r=o[t],i=i||s(e,r);return n&&i}function $n(e){var t=o(e),r=!1;return t&&(r=0===e.filter((function(t){return!u(t)&&Bn(e)})).length),t&&r}function Vn(e){var t,r,n=a(e)&&!l(e),i=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<o.length;t+=1)r=o[t],i=i||s(e,r);return n&&i}function Un(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function Ln(e,t){1===arguments.length&&(arguments[0]?Fn(arguments[0])?(e=arguments[0],t=void 0):Vn(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Yr(),i=fn(r,this).startOf("day"),o=n.calendarFormat(this,i)||"sameElse",a=t&&(A(t[o])?t[o].call(this,r):t[o]);return this.format(a||this.localeData().calendar(o,this,Yr(r)))}function zn(){return new D(this)}function Kn(e,t){var r=x(e)?e:Yr(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf())}function Hn(e,t){var r=x(e)?e:Yr(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf())}function qn(e,t,r,n){var i=x(e)?e:Yr(e),o=x(t)?t:Yr(t);return!!(this.isValid()&&i.isValid()&&o.isValid())&&("("===(n=n||"()")[0]?this.isAfter(i,r):!this.isBefore(i,r))&&(")"===n[1]?this.isBefore(o,r):!this.isAfter(o,r))}function Wn(e,t){var r,n=x(e)?e:Yr(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf()))}function Yn(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Gn(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Jn(e,t,r){var n,i,o;if(!this.isValid())return NaN;if(!(n=fn(e,this)).isValid())return NaN;switch(i=6e4*(n.utcOffset()-this.utcOffset()),t=re(t)){case"year":o=Xn(this,n)/12;break;case"month":o=Xn(this,n);break;case"quarter":o=Xn(this,n)/3;break;case"second":o=(this-n)/1e3;break;case"minute":o=(this-n)/6e4;break;case"hour":o=(this-n)/36e5;break;case"day":o=(this-n-i)/864e5;break;case"week":o=(this-n-i)/6048e5;break;default:o=this-n}return r?o:Ce(o)}function Xn(e,t){if(e.date()<t.date())return-Xn(t,e);var r=12*(t.year()-e.year())+(t.month()-e.month()),n=e.clone().add(r,"months");return-(r+(t-n<0?(t-n)/(n-e.clone().add(r-1,"months")):(t-n)/(e.clone().add(r+1,"months")-n)))||0}function Zn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Qn(e){if(!this.isValid())return null;var t=!0!==e,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?z(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",z(r,"Z")):z(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ei(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,r,n,i="moment",o="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",n=o+'[")]',this.format(e+t+r+n)}function ti(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=z(this,e);return this.localeData().postformat(t)}function ri(e,t){return this.isValid()&&(x(e)&&e.isValid()||Yr(e).isValid())?En({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ni(e){return this.from(Yr(),e)}function ii(e,t){return this.isValid()&&(x(e)&&e.isValid()||Yr(e).isValid())?En({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function oi(e){return this.to(Yr(),e)}function ai(e){var t;return void 0===e?this._locale._abbr:(null!=(t=vr(e))&&(this._locale=t),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var si=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function li(){return this._locale}var ci=1e3,ui=60*ci,hi=60*ui,di=3506328*hi;function fi(e,t){return(e%t+t)%t}function pi(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-di:new Date(e,t,r).valueOf()}function mi(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-di:Date.UTC(e,t,r)}function gi(e){var t,r;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?mi:pi,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=fi(t+(this._isUTC?0:this.utcOffset()*ui),hi);break;case"minute":t=this._d.valueOf(),t-=fi(t,ui);break;case"second":t=this._d.valueOf(),t-=fi(t,ci)}return this._d.setTime(t),n.updateOffset(this,!0),this}function vi(e){var t,r;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?mi:pi,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=hi-fi(t+(this._isUTC?0:this.utcOffset()*ui),hi)-1;break;case"minute":t=this._d.valueOf(),t+=ui-fi(t,ui)-1;break;case"second":t=this._d.valueOf(),t+=ci-fi(t,ci)-1}return this._d.setTime(t),n.updateOffset(this,!0),this}function yi(){return this._d.valueOf()-6e4*(this._offset||0)}function _i(){return Math.floor(this.valueOf()/1e3)}function bi(){return new Date(this.valueOf())}function wi(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Di(){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 xi(){return this.isValid()?this.toISOString():null}function Si(){return v(this)}function ki(){return f({},g(this))}function Ti(){return g(this).overflow}function Pi(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ei(e,t){var r,i,o,a=this._eras||vr("en")._eras;for(r=0,i=a.length;r<i;++r)switch("string"==typeof a[r].since&&(o=n(a[r].since).startOf("day"),a[r].since=o.valueOf()),typeof a[r].until){case"undefined":a[r].until=1/0;break;case"string":o=n(a[r].until).startOf("day").valueOf(),a[r].until=o.valueOf()}return a}function Ai(e,t,r){var n,i,o,a,s,l=this.eras();for(e=e.toUpperCase(),n=0,i=l.length;n<i;++n)if(o=l[n].name.toUpperCase(),a=l[n].abbr.toUpperCase(),s=l[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(a===e)return l[n];break;case"NNNN":if(o===e)return l[n];break;case"NNNNN":if(s===e)return l[n]}else if([o,a,s].indexOf(e)>=0)return l[n]}function Ci(e,t){var r=e.since<=e.until?1:-1;return void 0===t?n(e.since).year():n(e.since).year()+(t-e.offset)*r}function Oi(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].name;if(n[e].until<=r&&r<=n[e].since)return n[e].name}return""}function Mi(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].narrow;if(n[e].until<=r&&r<=n[e].since)return n[e].narrow}return""}function Ri(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].abbr;if(n[e].until<=r&&r<=n[e].since)return n[e].abbr}return""}function Ii(){var e,t,r,i,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(r=o[e].since<=o[e].until?1:-1,i=this.clone().startOf("day").valueOf(),o[e].since<=i&&i<=o[e].until||o[e].until<=i&&i<=o[e].since)return(this.year()-n(o[e].since).year())*r+o[e].offset;return this.year()}function Ni(e){return s(this,"_erasNameRegex")||Li.call(this),e?this._erasNameRegex:this._erasRegex}function Bi(e){return s(this,"_erasAbbrRegex")||Li.call(this),e?this._erasAbbrRegex:this._erasRegex}function Fi(e){return s(this,"_erasNarrowRegex")||Li.call(this),e?this._erasNarrowRegex:this._erasRegex}function ji(e,t){return t.erasAbbrRegex(e)}function $i(e,t){return t.erasNameRegex(e)}function Vi(e,t){return t.erasNarrowRegex(e)}function Ui(e,t){return t._eraYearOrdinalRegex||ye}function Li(){var e,t,r,n,i,o=[],a=[],s=[],l=[],c=this.eras();for(e=0,t=c.length;e<t;++e)r=Ae(c[e].name),n=Ae(c[e].abbr),i=Ae(c[e].narrow),a.push(r),o.push(n),s.push(i),l.push(r),l.push(n),l.push(i);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+s.join("|")+")","i")}function zi(e,t){V(0,[e,e.length],0,t)}function Ki(e){return Ji.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Hi(e){return Ji.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function qi(){return xt(this.year(),1,4)}function Wi(){return xt(this.isoWeekYear(),1,4)}function Yi(){var e=this.localeData()._week;return xt(this.year(),e.dow,e.doy)}function Gi(){var e=this.localeData()._week;return xt(this.weekYear(),e.dow,e.doy)}function Ji(e,t,r,n,i){var o;return null==e?Dt(this,n,i).year:(t>(o=xt(e,n,i))&&(t=o),Xi.call(this,e,t,r,n,i))}function Xi(e,t,r,n,i){var o=wt(e,t,r,n,i),a=_t(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Zi(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}V("N",0,0,"eraAbbr"),V("NN",0,0,"eraAbbr"),V("NNN",0,0,"eraAbbr"),V("NNNN",0,0,"eraName"),V("NNNNN",0,0,"eraNarrow"),V("y",["y",1],"yo","eraYear"),V("y",["yy",2],0,"eraYear"),V("y",["yyy",3],0,"eraYear"),V("y",["yyyy",4],0,"eraYear"),Te("N",ji),Te("NN",ji),Te("NNN",ji),Te("NNNN",$i),Te("NNNNN",Vi),Re(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,r,n){var i=r._locale.erasParse(e,n,r._strict);i?g(r).era=i:g(r).invalidEra=e})),Te("y",ye),Te("yy",ye),Te("yyy",ye),Te("yyyy",ye),Te("yo",Ui),Re(["y","yy","yyy","yyyy"],Fe),Re(["yo"],(function(e,t,r,n){var i;r._locale._eraYearOrdinalRegex&&(i=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Fe]=r._locale.eraYearOrdinalParse(e,i):t[Fe]=parseInt(e,10)})),V(0,["gg",2],0,(function(){return this.weekYear()%100})),V(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),zi("gggg","weekYear"),zi("ggggg","weekYear"),zi("GGGG","isoWeekYear"),zi("GGGGG","isoWeekYear"),Te("G",_e),Te("g",_e),Te("GG",de,le),Te("gg",de,le),Te("GGGG",ge,ue),Te("gggg",ge,ue),Te("GGGGG",ve,he),Te("ggggg",ve,he),Ie(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,r,n){t[n.substr(0,2)]=Oe(e)})),Ie(["gg","GG"],(function(e,t,r,i){t[i]=n.parseTwoDigitYear(e)})),V("Q",0,"Qo","quarter"),Te("Q",se),Re("Q",(function(e,t){t[je]=3*(Oe(e)-1)})),V("D",["DD",2],"Do","date"),Te("D",de,Se),Te("DD",de,le),Te("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Re(["D","DD"],$e),Re("Do",(function(e,t){t[$e]=Oe(e.match(de)[0])}));var Qi=Je("Date",!0);function eo(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}V("DDD",["DDDD",3],"DDDo","dayOfYear"),Te("DDD",me),Te("DDDD",ce),Re(["DDD","DDDD"],(function(e,t,r){r._dayOfYear=Oe(e)})),V("m",["mm",2],0,"minute"),Te("m",de,ke),Te("mm",de,le),Re(["m","mm"],Ue);var to=Je("Minutes",!1);V("s",["ss",2],0,"second"),Te("s",de,ke),Te("ss",de,le),Re(["s","ss"],Le);var ro,no,io=Je("Seconds",!1);for(V("S",0,0,(function(){return~~(this.millisecond()/100)})),V(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),V(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),V(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),V(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),V(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),V(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),Te("S",me,se),Te("SS",me,le),Te("SSS",me,ce),ro="SSSS";ro.length<=9;ro+="S")Te(ro,ye);function oo(e,t){t[ze]=Oe(1e3*("0."+e))}for(ro="S";ro.length<=9;ro+="S")Re(ro,oo);function ao(){return this._isUTC?"UTC":""}function so(){return this._isUTC?"Coordinated Universal Time":""}no=Je("Milliseconds",!1),V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");var lo=D.prototype;function co(e){return Yr(1e3*e)}function uo(){return Yr.apply(null,arguments).parseZone()}function ho(e){return e}lo.add=In,lo.calendar=Ln,lo.clone=zn,lo.diff=Jn,lo.endOf=vi,lo.format=ti,lo.from=ri,lo.fromNow=ni,lo.to=ii,lo.toNow=oi,lo.get=Qe,lo.invalidAt=Ti,lo.isAfter=Kn,lo.isBefore=Hn,lo.isBetween=qn,lo.isSame=Wn,lo.isSameOrAfter=Yn,lo.isSameOrBefore=Gn,lo.isValid=Si,lo.lang=si,lo.locale=ai,lo.localeData=li,lo.max=Jr,lo.min=Gr,lo.parsingFlags=ki,lo.set=et,lo.startOf=gi,lo.subtract=Nn,lo.toArray=wi,lo.toObject=Di,lo.toDate=bi,lo.toISOString=Qn,lo.inspect=ei,"undefined"!=typeof Symbol&&null!=Symbol.for&&(lo[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),lo.toJSON=xi,lo.toString=Zn,lo.unix=_i,lo.valueOf=yi,lo.creationData=Pi,lo.eraName=Oi,lo.eraNarrow=Mi,lo.eraAbbr=Ri,lo.eraYear=Ii,lo.year=Ye,lo.isLeapYear=Ge,lo.weekYear=Ki,lo.isoWeekYear=Hi,lo.quarter=lo.quarters=Zi,lo.month=ft,lo.daysInMonth=pt,lo.week=lo.weeks=Et,lo.isoWeek=lo.isoWeeks=At,lo.weeksInYear=Yi,lo.weeksInWeekYear=Gi,lo.isoWeeksInYear=qi,lo.isoWeeksInISOWeekYear=Wi,lo.date=Qi,lo.day=lo.days=Kt,lo.weekday=Ht,lo.isoWeekday=qt,lo.dayOfYear=eo,lo.hour=lo.hours=nr,lo.minute=lo.minutes=to,lo.second=lo.seconds=io,lo.millisecond=lo.milliseconds=no,lo.utcOffset=mn,lo.utc=vn,lo.local=yn,lo.parseZone=_n,lo.hasAlignedHourOffset=bn,lo.isDST=wn,lo.isLocal=xn,lo.isUtcOffset=Sn,lo.isUtc=kn,lo.isUTC=kn,lo.zoneAbbr=ao,lo.zoneName=so,lo.dates=k("dates accessor is deprecated. Use date instead.",Qi),lo.months=k("months accessor is deprecated. Use month instead",ft),lo.years=k("years accessor is deprecated. Use year instead",Ye),lo.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gn),lo.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Dn);var fo=M.prototype;function po(e,t,r,n){var i=vr(),o=p().set(n,t);return i[r](o,e)}function mo(e,t,r){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return po(e,t,r,"month");var n,i=[];for(n=0;n<12;n++)i[n]=po(e,n,r,"month");return i}function go(e,t,r,n){"boolean"==typeof e?(u(t)&&(r=t,t=void 0),t=t||""):(r=t=e,e=!1,u(t)&&(r=t,t=void 0),t=t||"");var i,o=vr(),a=e?o._week.dow:0,s=[];if(null!=r)return po(t,(r+a)%7,n,"day");for(i=0;i<7;i++)s[i]=po(t,(i+a)%7,n,"day");return s}function vo(e,t){return mo(e,t,"months")}function yo(e,t){return mo(e,t,"monthsShort")}function _o(e,t,r){return go(e,t,r,"weekdays")}function bo(e,t,r){return go(e,t,r,"weekdaysShort")}function wo(e,t,r){return go(e,t,r,"weekdaysMin")}fo.calendar=I,fo.longDateFormat=q,fo.invalidDate=Y,fo.ordinal=X,fo.preparse=ho,fo.postformat=ho,fo.relativeTime=Q,fo.pastFuture=ee,fo.set=C,fo.eras=Ei,fo.erasParse=Ai,fo.erasConvertYear=Ci,fo.erasAbbrRegex=Bi,fo.erasNameRegex=Ni,fo.erasNarrowRegex=Fi,fo.months=lt,fo.monthsShort=ct,fo.monthsParse=ht,fo.monthsRegex=gt,fo.monthsShortRegex=mt,fo.week=St,fo.firstDayOfYear=Pt,fo.firstDayOfWeek=Tt,fo.weekdays=$t,fo.weekdaysMin=Ut,fo.weekdaysShort=Vt,fo.weekdaysParse=zt,fo.weekdaysRegex=Wt,fo.weekdaysShortRegex=Yt,fo.weekdaysMinRegex=Gt,fo.isPM=tr,fo.meridiem=ir,pr("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;return e+(1===Oe(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.lang=k("moment.lang is deprecated. Use moment.locale instead.",pr),n.langData=k("moment.langData is deprecated. Use moment.localeData instead.",vr);var Do=Math.abs;function xo(){var e=this._data;return this._milliseconds=Do(this._milliseconds),this._days=Do(this._days),this._months=Do(this._months),e.milliseconds=Do(e.milliseconds),e.seconds=Do(e.seconds),e.minutes=Do(e.minutes),e.hours=Do(e.hours),e.months=Do(e.months),e.years=Do(e.years),this}function So(e,t,r,n){var i=En(t,r);return e._milliseconds+=n*i._milliseconds,e._days+=n*i._days,e._months+=n*i._months,e._bubble()}function ko(e,t){return So(this,e,t,1)}function To(e,t){return So(this,e,t,-1)}function Po(e){return e<0?Math.floor(e):Math.ceil(e)}function Eo(){var e,t,r,n,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*Po(Co(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=Ce(o/1e3),l.seconds=e%60,t=Ce(e/60),l.minutes=t%60,r=Ce(t/60),l.hours=r%24,a+=Ce(r/24),s+=i=Ce(Ao(a)),a-=Po(Co(i)),n=Ce(s/12),s%=12,l.days=a,l.months=s,l.years=n,this}function Ao(e){return 4800*e/146097}function Co(e){return 146097*e/4800}function Oo(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if("month"===(e=re(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,r=this._months+Ao(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Co(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}}function Mo(e){return function(){return this.as(e)}}var Ro=Mo("ms"),Io=Mo("s"),No=Mo("m"),Bo=Mo("h"),Fo=Mo("d"),jo=Mo("w"),$o=Mo("M"),Vo=Mo("Q"),Uo=Mo("y"),Lo=Ro;function zo(){return En(this)}function Ko(e){return e=re(e),this.isValid()?this[e+"s"]():NaN}function Ho(e){return function(){return this.isValid()?this._data[e]:NaN}}var qo=Ho("milliseconds"),Wo=Ho("seconds"),Yo=Ho("minutes"),Go=Ho("hours"),Jo=Ho("days"),Xo=Ho("months"),Zo=Ho("years");function Qo(){return Ce(this.days()/7)}var ea=Math.round,ta={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ra(e,t,r,n,i){return i.relativeTime(t||1,!!r,e,n)}function na(e,t,r,n){var i=En(e).abs(),o=ea(i.as("s")),a=ea(i.as("m")),s=ea(i.as("h")),l=ea(i.as("d")),c=ea(i.as("M")),u=ea(i.as("w")),h=ea(i.as("y")),d=o<=r.ss&&["s",o]||o<r.s&&["ss",o]||a<=1&&["m"]||a<r.m&&["mm",a]||s<=1&&["h"]||s<r.h&&["hh",s]||l<=1&&["d"]||l<r.d&&["dd",l];return null!=r.w&&(d=d||u<=1&&["w"]||u<r.w&&["ww",u]),(d=d||c<=1&&["M"]||c<r.M&&["MM",c]||h<=1&&["y"]||["yy",h])[2]=t,d[3]=+e>0,d[4]=n,ra.apply(null,d)}function ia(e){return void 0===e?ea:"function"==typeof e&&(ea=e,!0)}function oa(e,t){return void 0!==ta[e]&&(void 0===t?ta[e]:(ta[e]=t,"s"===e&&(ta.ss=t-1),!0))}function aa(e,t){if(!this.isValid())return this.localeData().invalidDate();var r,n,i=!1,o=ta;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(o=Object.assign({},ta,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),n=na(this,!i,o,r=this.localeData()),i&&(n=r.pastFuture(+this,n)),r.postformat(n)}var sa=Math.abs;function la(e){return(e>0)-(e<0)||+e}function ca(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,n,i,o,a,s,l=sa(this._milliseconds)/1e3,c=sa(this._days),u=sa(this._months),h=this.asSeconds();return h?(e=Ce(l/60),t=Ce(e/60),l%=60,e%=60,r=Ce(u/12),u%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=h<0?"-":"",o=la(this._months)!==la(h)?"-":"",a=la(this._days)!==la(h)?"-":"",s=la(this._milliseconds)!==la(h)?"-":"",i+"P"+(r?o+r+"Y":"")+(u?o+u+"M":"")+(c?a+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+n+"S":"")):"P0D"}var ua=an.prototype;return ua.isValid=nn,ua.abs=xo,ua.add=ko,ua.subtract=To,ua.as=Oo,ua.asMilliseconds=Ro,ua.asSeconds=Io,ua.asMinutes=No,ua.asHours=Bo,ua.asDays=Fo,ua.asWeeks=jo,ua.asMonths=$o,ua.asQuarters=Vo,ua.asYears=Uo,ua.valueOf=Lo,ua._bubble=Eo,ua.clone=zo,ua.get=Ko,ua.milliseconds=qo,ua.seconds=Wo,ua.minutes=Yo,ua.hours=Go,ua.days=Jo,ua.weeks=Qo,ua.months=Xo,ua.years=Zo,ua.humanize=aa,ua.toISOString=ca,ua.toString=ca,ua.toJSON=ca,ua.locale=ai,ua.localeData=li,ua.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ca),ua.lang=si,V("X",0,0,"unix"),V("x",0,0,"valueOf"),Te("x",_e),Te("X",De),Re("X",(function(e,t,r){r._d=new Date(1e3*parseFloat(e))})),Re("x",(function(e,t,r){r._d=new Date(Oe(e))})),
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("lodash"),require("axios")):"function"==typeof define&&define.amd?define(["exports","lodash","axios"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).code={},t._,t.axios)}(this,(function(t,e,n){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function a(t,e){return t(e={exports:{}},e.exports),e.exports}var s=a((function(t,e){t.exports=function(){var e,n;function r(){return e.apply(null,arguments)}function o(t){e=t}function a(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function s(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function l(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function c(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(l(t,e))return!1;return!0}function u(t){return void 0===t}function h(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function d(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function f(t,e){var n,r=[],i=t.length;for(n=0;n<i;++n)r.push(e(t[n],n));return r}function p(t,e){for(var n in e)l(e,n)&&(t[n]=e[n]);return l(e,"toString")&&(t.toString=e.toString),l(e,"valueOf")&&(t.valueOf=e.valueOf),t}function m(t,e,n,r){return Kn(t,e,n,r,!0).utc()}function g(){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 v(t){return null==t._pf&&(t._pf=g()),t._pf}function y(t){var e=null,r=!1,i=t._d&&!isNaN(t._d.getTime());return i&&(e=v(t),r=n.call(e.parsedDateParts,(function(t){return null!=t})),i=e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&r),t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour)),null!=Object.isFrozen&&Object.isFrozen(t)?i:(t._isValid=i,t._isValid)}function b(t){var e=m(NaN);return null!=t?p(v(e),t):v(e).userInvalidated=!0,e}n=Array.prototype.some?Array.prototype.some:function(t){var e,n=Object(this),r=n.length>>>0;for(e=0;e<r;e++)if(e in n&&t.call(this,n[e],e,n))return!0;return!1};var w=r.momentProperties=[],_=!1;function D(t,e){var n,r,i,o=w.length;if(u(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),u(e._i)||(t._i=e._i),u(e._f)||(t._f=e._f),u(e._l)||(t._l=e._l),u(e._strict)||(t._strict=e._strict),u(e._tzm)||(t._tzm=e._tzm),u(e._isUTC)||(t._isUTC=e._isUTC),u(e._offset)||(t._offset=e._offset),u(e._pf)||(t._pf=v(e)),u(e._locale)||(t._locale=e._locale),o>0)for(n=0;n<o;n++)u(i=e[r=w[n]])||(t[r]=i);return t}function S(t){D(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===_&&(_=!0,r.updateOffset(this),_=!1)}function x(t){return t instanceof S||null!=t&&null!=t._isAMomentObject}function k(t){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function T(t,e){var n=!0;return p((function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,t),n){var i,o,a,s=[],c=arguments.length;for(o=0;o<c;o++){if(i="","object"==typeof arguments[o]){for(a in i+="\n["+o+"] ",arguments[0])l(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[o];s.push(i)}k(t+"\nArguments: "+Array.prototype.slice.call(s).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var C,O={};function A(t,e){null!=r.deprecationHandler&&r.deprecationHandler(t,e),O[t]||(k(e),O[t]=!0)}function E(t){return"undefined"!=typeof Function&&t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function M(t){var e,n;for(n in t)l(t,n)&&(E(e=t[n])?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function N(t,e){var n,r=p({},t);for(n in e)l(e,n)&&(s(t[n])&&s(e[n])?(r[n]={},p(r[n],t[n]),p(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)l(t,n)&&!l(e,n)&&s(t[n])&&(r[n]=p({},r[n]));return r}function P(t){null!=t&&this.set(t)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,C=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)l(t,e)&&n.push(e);return n};var V={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function R(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return E(r)?r.call(e,n):r}function B(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(t>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var I=/(\[[^\[]*\])|(\\)?([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,F=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,j={},L={};function z(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&(L[t]=i),e&&(L[e[0]]=function(){return B(i.apply(this,arguments),e[1],e[2])}),n&&(L[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function Y(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function H(t){var e,n,r=t.match(I);for(e=0,n=r.length;e<n;e++)L[r[e]]?r[e]=L[r[e]]:r[e]=Y(r[e]);return function(e){var i,o="";for(i=0;i<n;i++)o+=E(r[i])?r[i].call(e,t):r[i];return o}}function U(t,e){return t.isValid()?(e=q(e,t.localeData()),j[e]=j[e]||H(e),j[e](t)):t.localeData().invalidDate()}function q(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for(F.lastIndex=0;n>=0&&F.test(t);)t=t.replace(F,r),F.lastIndex=0,n-=1;return t}var G={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 W(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(I).map((function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t})).join(""),this._longDateFormat[t])}var $="Invalid date";function K(){return this._invalidDate}var Z="%d",X=/\d{1,2}/;function J(t){return this._ordinal.replace("%d",t)}var Q={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 tt(t,e,n,r){var i=this._relativeTime[n];return E(i)?i(t,e,n,r):i.replace(/%d/i,t)}function et(t,e){var n=this._relativeTime[t>0?"future":"past"];return E(n)?n(e):n.replace(/%s/i,e)}var nt={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 rt(t){return"string"==typeof t?nt[t]||nt[t.toLowerCase()]:void 0}function it(t){var e,n,r={};for(n in t)l(t,n)&&(e=rt(n))&&(r[e]=t[n]);return r}var ot={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 at(t){var e,n=[];for(e in t)l(t,e)&&n.push({unit:e,priority:ot[e]});return n.sort((function(t,e){return t.priority-e.priority})),n}var st,lt=/\d/,ct=/\d\d/,ut=/\d{3}/,ht=/\d{4}/,dt=/[+-]?\d{6}/,ft=/\d\d?/,pt=/\d\d\d\d?/,mt=/\d\d\d\d\d\d?/,gt=/\d{1,3}/,vt=/\d{1,4}/,yt=/[+-]?\d{1,6}/,bt=/\d+/,wt=/[+-]?\d+/,_t=/Z|[+-]\d\d:?\d\d/gi,Dt=/Z|[+-]\d\d(?::?\d\d)?/gi,St=/[+-]?\d+(\.\d{1,3})?/,xt=/[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,kt=/^[1-9]\d?/,Tt=/^([1-9]\d|\d)/;function Ct(t,e,n){st[t]=E(e)?e:function(t,r){return t&&n?n:e}}function Ot(t,e){return l(st,t)?st[t](e._strict,e._locale):new RegExp(At(t))}function At(t){return Et(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,r,i){return e||n||r||i})))}function Et(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Mt(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function Nt(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=Mt(e)),n}st={};var Pt={};function Vt(t,e){var n,r,i=e;for("string"==typeof t&&(t=[t]),h(e)&&(i=function(t,n){n[e]=Nt(t)}),r=t.length,n=0;n<r;n++)Pt[t[n]]=i}function Rt(t,e){Vt(t,(function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)}))}function Bt(t,e,n){null!=e&&l(Pt,t)&&Pt[t](e,n._a,n,t)}function It(t){return t%4==0&&t%100!=0||t%400==0}var Ft=0,jt=1,Lt=2,zt=3,Yt=4,Ht=5,Ut=6,qt=7,Gt=8;function Wt(t){return It(t)?366:365}z("Y",0,0,(function(){var t=this.year();return t<=9999?B(t,4):"+"+t})),z(0,["YY",2],0,(function(){return this.year()%100})),z(0,["YYYY",4],0,"year"),z(0,["YYYYY",5],0,"year"),z(0,["YYYYYY",6,!0],0,"year"),Ct("Y",wt),Ct("YY",ft,ct),Ct("YYYY",vt,ht),Ct("YYYYY",yt,dt),Ct("YYYYYY",yt,dt),Vt(["YYYYY","YYYYYY"],Ft),Vt("YYYY",(function(t,e){e[Ft]=2===t.length?r.parseTwoDigitYear(t):Nt(t)})),Vt("YY",(function(t,e){e[Ft]=r.parseTwoDigitYear(t)})),Vt("Y",(function(t,e){e[Ft]=parseInt(t,10)})),r.parseTwoDigitYear=function(t){return Nt(t)+(Nt(t)>68?1900:2e3)};var $t,Kt=Xt("FullYear",!0);function Zt(){return It(this.year())}function Xt(t,e){return function(n){return null!=n?(Qt(this,t,n),r.updateOffset(this,e),this):Jt(this,t)}}function Jt(t,e){if(!t.isValid())return NaN;var n=t._d,r=t._isUTC;switch(e){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Qt(t,e,n){var r,i,o,a,s;if(t.isValid()&&!isNaN(n)){switch(r=t._d,i=t._isUTC,e){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}o=n,a=t.month(),s=29!==(s=t.date())||1!==a||It(o)?s:28,i?r.setUTCFullYear(o,a,s):r.setFullYear(o,a,s)}}function te(t){return E(this[t=rt(t)])?this[t]():this}function ee(t,e){if("object"==typeof t){var n,r=at(t=it(t)),i=r.length;for(n=0;n<i;n++)this[r[n].unit](t[r[n].unit])}else if(E(this[t=rt(t)]))return this[t](e);return this}function ne(t,e){return(t%e+e)%e}function re(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=ne(e,12);return t+=(e-n)/12,1===n?It(t)?29:28:31-n%7%2}$t=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},z("M",["MM",2],"Mo",(function(){return this.month()+1})),z("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),z("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),Ct("M",ft,kt),Ct("MM",ft,ct),Ct("MMM",(function(t,e){return e.monthsShortRegex(t)})),Ct("MMMM",(function(t,e){return e.monthsRegex(t)})),Vt(["M","MM"],(function(t,e){e[jt]=Nt(t)-1})),Vt(["MMM","MMMM"],(function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[jt]=i:v(n).invalidMonth=t}));var ie="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),oe="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ae=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,se=xt,le=xt;function ce(t,e){return t?a(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||ae).test(e)?"format":"standalone"][t.month()]:a(this._months)?this._months:this._months.standalone}function ue(t,e){return t?a(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[ae.test(e)?"format":"standalone"][t.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function he(t,e,n){var r,i,o,a=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=m([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=$t.call(this._shortMonthsParse,a))?i:null:-1!==(i=$t.call(this._longMonthsParse,a))?i:null:"MMM"===e?-1!==(i=$t.call(this._shortMonthsParse,a))||-1!==(i=$t.call(this._longMonthsParse,a))?i:null:-1!==(i=$t.call(this._longMonthsParse,a))||-1!==(i=$t.call(this._shortMonthsParse,a))?i:null}function de(t,e,n){var r,i,o;if(this._monthsParseExact)return he.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=m([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function fe(t,e){if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=Nt(e);else if(!h(e=t.localeData().monthsParse(e)))return t;var n=e,r=t.date();return r=r<29?r:Math.min(r,re(t.year(),n)),t._isUTC?t._d.setUTCMonth(n,r):t._d.setMonth(n,r),t}function pe(t){return null!=t?(fe(this,t),r.updateOffset(this,!0),this):Jt(this,"Month")}function me(){return re(this.year(),this.month())}function ge(t){return this._monthsParseExact?(l(this,"_monthsRegex")||ye.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=se),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function ve(t){return this._monthsParseExact?(l(this,"_monthsRegex")||ye.call(this),t?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=le),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function ye(){function t(t,e){return e.length-t.length}var e,n,r,i,o=[],a=[],s=[];for(e=0;e<12;e++)n=m([2e3,e]),r=Et(this.monthsShort(n,"")),i=Et(this.months(n,"")),o.push(r),a.push(i),s.push(i),s.push(r);o.sort(t),a.sort(t),s.sort(t),this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+o.join("|")+")","i")}function be(t,e,n,r,i,o,a){var s;return t<100&&t>=0?(s=new Date(t+400,e,n,r,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,o,a),s}function we(t){var e,n;return t<100&&t>=0?((n=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function _e(t,e,n){var r=7+e-n;return-(7+we(t,0,r).getUTCDay()-e)%7+r-1}function De(t,e,n,r,i){var o,a,s=1+7*(e-1)+(7+n-r)%7+_e(t,r,i);return s<=0?a=Wt(o=t-1)+s:s>Wt(t)?(o=t+1,a=s-Wt(t)):(o=t,a=s),{year:o,dayOfYear:a}}function Se(t,e,n){var r,i,o=_e(t.year(),e,n),a=Math.floor((t.dayOfYear()-o-1)/7)+1;return a<1?r=a+xe(i=t.year()-1,e,n):a>xe(t.year(),e,n)?(r=a-xe(t.year(),e,n),i=t.year()+1):(i=t.year(),r=a),{week:r,year:i}}function xe(t,e,n){var r=_e(t,e,n),i=_e(t+1,e,n);return(Wt(t)-r+i)/7}function ke(t){return Se(t,this._week.dow,this._week.doy).week}z("w",["ww",2],"wo","week"),z("W",["WW",2],"Wo","isoWeek"),Ct("w",ft,kt),Ct("ww",ft,ct),Ct("W",ft,kt),Ct("WW",ft,ct),Rt(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=Nt(t)}));var Te={dow:0,doy:6};function Ce(){return this._week.dow}function Oe(){return this._week.doy}function Ae(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Ee(t){var e=Se(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Me(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}function Ne(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Pe(t,e){return t.slice(e,7).concat(t.slice(0,e))}z("d",0,"do","day"),z("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),z("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),z("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),z("e",0,0,"weekday"),z("E",0,0,"isoWeekday"),Ct("d",ft),Ct("e",ft),Ct("E",ft),Ct("dd",(function(t,e){return e.weekdaysMinRegex(t)})),Ct("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),Ct("dddd",(function(t,e){return e.weekdaysRegex(t)})),Rt(["dd","ddd","dddd"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:v(n).invalidWeekday=t})),Rt(["d","e","E"],(function(t,e,n,r){e[r]=Nt(t)}));var Ve="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Re="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Be="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ie=xt,Fe=xt,je=xt;function Le(t,e){var n=a(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Pe(n,this._week.dow):t?n[t.day()]:n}function ze(t){return!0===t?Pe(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Ye(t){return!0===t?Pe(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function He(t,e,n){var r,i,o,a=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=m([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=$t.call(this._weekdaysParse,a))?i:null:"ddd"===e?-1!==(i=$t.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=$t.call(this._minWeekdaysParse,a))?i:null:"dddd"===e?-1!==(i=$t.call(this._weekdaysParse,a))||-1!==(i=$t.call(this._shortWeekdaysParse,a))||-1!==(i=$t.call(this._minWeekdaysParse,a))?i:null:"ddd"===e?-1!==(i=$t.call(this._shortWeekdaysParse,a))||-1!==(i=$t.call(this._weekdaysParse,a))||-1!==(i=$t.call(this._minWeekdaysParse,a))?i:null:-1!==(i=$t.call(this._minWeekdaysParse,a))||-1!==(i=$t.call(this._weekdaysParse,a))||-1!==(i=$t.call(this._shortWeekdaysParse,a))?i:null}function Ue(t,e,n){var r,i,o;if(this._weekdaysParseExact)return He.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=m([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}}function qe(t){if(!this.isValid())return null!=t?this:NaN;var e=Jt(this,"Day");return null!=t?(t=Me(t,this.localeData()),this.add(t-e,"d")):e}function Ge(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function We(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=Ne(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function $e(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Xe.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=Ie),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ke(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Xe.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Fe),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ze(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Xe.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=je),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Xe(){function t(t,e){return e.length-t.length}var e,n,r,i,o,a=[],s=[],l=[],c=[];for(e=0;e<7;e++)n=m([2e3,1]).day(e),r=Et(this.weekdaysMin(n,"")),i=Et(this.weekdaysShort(n,"")),o=Et(this.weekdays(n,"")),a.push(r),s.push(i),l.push(o),c.push(r),c.push(i),c.push(o);a.sort(t),s.sort(t),l.sort(t),c.sort(t),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Je(){return this.hours()%12||12}function Qe(){return this.hours()||24}function tn(t,e){z(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function en(t,e){return e._meridiemParse}function nn(t){return"p"===(t+"").toLowerCase().charAt(0)}z("H",["HH",2],0,"hour"),z("h",["hh",2],0,Je),z("k",["kk",2],0,Qe),z("hmm",0,0,(function(){return""+Je.apply(this)+B(this.minutes(),2)})),z("hmmss",0,0,(function(){return""+Je.apply(this)+B(this.minutes(),2)+B(this.seconds(),2)})),z("Hmm",0,0,(function(){return""+this.hours()+B(this.minutes(),2)})),z("Hmmss",0,0,(function(){return""+this.hours()+B(this.minutes(),2)+B(this.seconds(),2)})),tn("a",!0),tn("A",!1),Ct("a",en),Ct("A",en),Ct("H",ft,Tt),Ct("h",ft,kt),Ct("k",ft,kt),Ct("HH",ft,ct),Ct("hh",ft,ct),Ct("kk",ft,ct),Ct("hmm",pt),Ct("hmmss",mt),Ct("Hmm",pt),Ct("Hmmss",mt),Vt(["H","HH"],zt),Vt(["k","kk"],(function(t,e,n){var r=Nt(t);e[zt]=24===r?0:r})),Vt(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),Vt(["h","hh"],(function(t,e,n){e[zt]=Nt(t),v(n).bigHour=!0})),Vt("hmm",(function(t,e,n){var r=t.length-2;e[zt]=Nt(t.substr(0,r)),e[Yt]=Nt(t.substr(r)),v(n).bigHour=!0})),Vt("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[zt]=Nt(t.substr(0,r)),e[Yt]=Nt(t.substr(r,2)),e[Ht]=Nt(t.substr(i)),v(n).bigHour=!0})),Vt("Hmm",(function(t,e,n){var r=t.length-2;e[zt]=Nt(t.substr(0,r)),e[Yt]=Nt(t.substr(r))})),Vt("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[zt]=Nt(t.substr(0,r)),e[Yt]=Nt(t.substr(r,2)),e[Ht]=Nt(t.substr(i))}));var rn=/[ap]\.?m?\.?/i,on=Xt("Hours",!0);function an(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var sn,ln={calendar:V,longDateFormat:G,invalidDate:$,ordinal:Z,dayOfMonthOrdinalParse:X,relativeTime:Q,months:ie,monthsShort:oe,week:Te,weekdays:Ve,weekdaysMin:Be,weekdaysShort:Re,meridiemParse:rn},cn={},un={};function hn(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n+=1)if(t[n]!==e[n])return n;return r}function dn(t){return t?t.toLowerCase().replace("_","-"):t}function fn(t){for(var e,n,r,i,o=0;o<t.length;){for(e=(i=dn(t[o]).split("-")).length,n=(n=dn(t[o+1]))?n.split("-"):null;e>0;){if(r=mn(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&hn(i,n)>=e-1)break;e--}o++}return sn}function pn(t){return!(!t||!t.match("^[^/\\\\]*$"))}function mn(e){var n=null;if(void 0===cn[e]&&t&&t.exports&&pn(e))try{n=sn._abbr,i(),gn(n)}catch(t){cn[e]=null}return cn[e]}function gn(t,e){var n;return t&&((n=u(e)?bn(t):vn(t,e))?sn=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),sn._abbr}function vn(t,e){if(null!==e){var n,r=ln;if(e.abbr=t,null!=cn[t])A("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=cn[t]._config;else if(null!=e.parentLocale)if(null!=cn[e.parentLocale])r=cn[e.parentLocale]._config;else{if(null==(n=mn(e.parentLocale)))return un[e.parentLocale]||(un[e.parentLocale]=[]),un[e.parentLocale].push({name:t,config:e}),null;r=n._config}return cn[t]=new P(N(r,e)),un[t]&&un[t].forEach((function(t){vn(t.name,t.config)})),gn(t),cn[t]}return delete cn[t],null}function yn(t,e){if(null!=e){var n,r,i=ln;null!=cn[t]&&null!=cn[t].parentLocale?cn[t].set(N(cn[t]._config,e)):(null!=(r=mn(t))&&(i=r._config),e=N(i,e),null==r&&(e.abbr=t),(n=new P(e)).parentLocale=cn[t],cn[t]=n),gn(t)}else null!=cn[t]&&(null!=cn[t].parentLocale?(cn[t]=cn[t].parentLocale,t===gn()&&gn(t)):null!=cn[t]&&delete cn[t]);return cn[t]}function bn(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return sn;if(!a(t)){if(e=mn(t))return e;t=[t]}return fn(t)}function wn(){return C(cn)}function _n(t){var e,n=t._a;return n&&-2===v(t).overflow&&(e=n[jt]<0||n[jt]>11?jt:n[Lt]<1||n[Lt]>re(n[Ft],n[jt])?Lt:n[zt]<0||n[zt]>24||24===n[zt]&&(0!==n[Yt]||0!==n[Ht]||0!==n[Ut])?zt:n[Yt]<0||n[Yt]>59?Yt:n[Ht]<0||n[Ht]>59?Ht:n[Ut]<0||n[Ut]>999?Ut:-1,v(t)._overflowDayOfYear&&(e<Ft||e>Lt)&&(e=Lt),v(t)._overflowWeeks&&-1===e&&(e=qt),v(t)._overflowWeekday&&-1===e&&(e=Gt),v(t).overflow=e),t}var Dn=/^\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)?)?$/,Sn=/^\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)?)?$/,xn=/Z|[+-]\d\d(?::?\d\d)?/,kn=[["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]],Tn=[["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/]],Cn=/^\/?Date\((-?\d+)/i,On=/^(?:(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}))$/,An={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function En(t){var e,n,r,i,o,a,s=t._i,l=Dn.exec(s)||Sn.exec(s),c=kn.length,u=Tn.length;if(l){for(v(t).iso=!0,e=0,n=c;e<n;e++)if(kn[e][1].exec(l[1])){i=kn[e][0],r=!1!==kn[e][2];break}if(null==i)return void(t._isValid=!1);if(l[3]){for(e=0,n=u;e<n;e++)if(Tn[e][1].exec(l[3])){o=(l[2]||" ")+Tn[e][0];break}if(null==o)return void(t._isValid=!1)}if(!r&&null!=o)return void(t._isValid=!1);if(l[4]){if(!xn.exec(l[4]))return void(t._isValid=!1);a="Z"}t._f=i+(o||"")+(a||""),Yn(t)}else t._isValid=!1}function Mn(t,e,n,r,i,o){var a=[Nn(t),oe.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return o&&a.push(parseInt(o,10)),a}function Nn(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function Pn(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Vn(t,e,n){return!t||Re.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(v(n).weekdayMismatch=!0,n._isValid=!1,!1)}function Rn(t,e,n){if(t)return An[t];if(e)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}function Bn(t){var e,n=On.exec(Pn(t._i));if(n){if(e=Mn(n[4],n[3],n[2],n[5],n[6],n[7]),!Vn(n[1],e,t))return;t._a=e,t._tzm=Rn(n[8],n[9],n[10]),t._d=we.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),v(t).rfc2822=!0}else t._isValid=!1}function In(t){var e=Cn.exec(t._i);null===e?(En(t),!1===t._isValid&&(delete t._isValid,Bn(t),!1===t._isValid&&(delete t._isValid,t._strict?t._isValid=!1:r.createFromInputFallback(t)))):t._d=new Date(+e[1])}function Fn(t,e,n){return null!=t?t:null!=e?e:n}function jn(t){var e=new Date(r.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Ln(t){var e,n,r,i,o,a=[];if(!t._d){for(r=jn(t),t._w&&null==t._a[Lt]&&null==t._a[jt]&&zn(t),null!=t._dayOfYear&&(o=Fn(t._a[Ft],r[Ft]),(t._dayOfYear>Wt(o)||0===t._dayOfYear)&&(v(t)._overflowDayOfYear=!0),n=we(o,0,t._dayOfYear),t._a[jt]=n.getUTCMonth(),t._a[Lt]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=a[e]=r[e];for(;e<7;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[zt]&&0===t._a[Yt]&&0===t._a[Ht]&&0===t._a[Ut]&&(t._nextDay=!0,t._a[zt]=0),t._d=(t._useUTC?we:be).apply(null,a),i=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[zt]=24),t._w&&void 0!==t._w.d&&t._w.d!==i&&(v(t).weekdayMismatch=!0)}}function zn(t){var e,n,r,i,o,a,s,l,c;null!=(e=t._w).GG||null!=e.W||null!=e.E?(o=1,a=4,n=Fn(e.GG,t._a[Ft],Se(Zn(),1,4).year),r=Fn(e.W,1),((i=Fn(e.E,1))<1||i>7)&&(l=!0)):(o=t._locale._week.dow,a=t._locale._week.doy,c=Se(Zn(),o,a),n=Fn(e.gg,t._a[Ft],c.year),r=Fn(e.w,c.week),null!=e.d?((i=e.d)<0||i>6)&&(l=!0):null!=e.e?(i=e.e+o,(e.e<0||e.e>6)&&(l=!0)):i=o),r<1||r>xe(n,o,a)?v(t)._overflowWeeks=!0:null!=l?v(t)._overflowWeekday=!0:(s=De(n,r,i,o,a),t._a[Ft]=s.year,t._dayOfYear=s.dayOfYear)}function Yn(t){if(t._f!==r.ISO_8601)if(t._f!==r.RFC_2822){t._a=[],v(t).empty=!0;var e,n,i,o,a,s,l,c=""+t._i,u=c.length,h=0;for(l=(i=q(t._f,t._locale).match(I)||[]).length,e=0;e<l;e++)o=i[e],(n=(c.match(Ot(o,t))||[])[0])&&((a=c.substr(0,c.indexOf(n))).length>0&&v(t).unusedInput.push(a),c=c.slice(c.indexOf(n)+n.length),h+=n.length),L[o]?(n?v(t).empty=!1:v(t).unusedTokens.push(o),Bt(o,n,t)):t._strict&&!n&&v(t).unusedTokens.push(o);v(t).charsLeftOver=u-h,c.length>0&&v(t).unusedInput.push(c),t._a[zt]<=12&&!0===v(t).bigHour&&t._a[zt]>0&&(v(t).bigHour=void 0),v(t).parsedDateParts=t._a.slice(0),v(t).meridiem=t._meridiem,t._a[zt]=Hn(t._locale,t._a[zt],t._meridiem),null!==(s=v(t).era)&&(t._a[Ft]=t._locale.erasConvertYear(s,t._a[Ft])),Ln(t),_n(t)}else Bn(t);else En(t)}function Hn(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0),e):e}function Un(t){var e,n,r,i,o,a,s=!1,l=t._f.length;if(0===l)return v(t).invalidFormat=!0,void(t._d=new Date(NaN));for(i=0;i<l;i++)o=0,a=!1,e=D({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],Yn(e),y(e)&&(a=!0),o+=v(e).charsLeftOver,o+=10*v(e).unusedTokens.length,v(e).score=o,s?o<r&&(r=o,n=e):(null==r||o<r||a)&&(r=o,n=e,a&&(s=!0));p(t,n||e)}function qn(t){if(!t._d){var e=it(t._i),n=void 0===e.day?e.date:e.day;t._a=f([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),Ln(t)}}function Gn(t){var e=new S(_n(Wn(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Wn(t){var e=t._i,n=t._f;return t._locale=t._locale||bn(t._l),null===e||void 0===n&&""===e?b({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),x(e)?new S(_n(e)):(d(e)?t._d=e:a(n)?Un(t):n?Yn(t):$n(t),y(t)||(t._d=null),t))}function $n(t){var e=t._i;u(e)?t._d=new Date(r.now()):d(e)?t._d=new Date(e.valueOf()):"string"==typeof e?In(t):a(e)?(t._a=f(e.slice(0),(function(t){return parseInt(t,10)})),Ln(t)):s(e)?qn(t):h(e)?t._d=new Date(e):r.createFromInputFallback(t)}function Kn(t,e,n,r,i){var o={};return!0!==e&&!1!==e||(r=e,e=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(s(t)&&c(t)||a(t)&&0===t.length)&&(t=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=i,o._l=n,o._i=t,o._f=e,o._strict=r,Gn(o)}function Zn(t,e,n,r){return Kn(t,e,n,r,!1)}r.createFromInputFallback=T("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(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),r.ISO_8601=function(){},r.RFC_2822=function(){};var Xn=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Zn.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:b()})),Jn=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Zn.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:b()}));function Qn(t,e){var n,r;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return Zn();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}function tr(){return Qn("isBefore",[].slice.call(arguments,0))}function er(){return Qn("isAfter",[].slice.call(arguments,0))}var nr=function(){return Date.now?Date.now():+new Date},rr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ir(t){var e,n,r=!1,i=rr.length;for(e in t)if(l(t,e)&&(-1===$t.call(rr,e)||null!=t[e]&&isNaN(t[e])))return!1;for(n=0;n<i;++n)if(t[rr[n]]){if(r)return!1;parseFloat(t[rr[n]])!==Nt(t[rr[n]])&&(r=!0)}return!0}function or(){return this._isValid}function ar(){return Ar(NaN)}function sr(t){var e=it(t),n=e.year||0,r=e.quarter||0,i=e.month||0,o=e.week||e.isoWeek||0,a=e.day||0,s=e.hour||0,l=e.minute||0,c=e.second||0,u=e.millisecond||0;this._isValid=ir(e),this._milliseconds=+u+1e3*c+6e4*l+1e3*s*60*60,this._days=+a+7*o,this._months=+i+3*r+12*n,this._data={},this._locale=bn(),this._bubble()}function lr(t){return t instanceof sr}function cr(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function ur(t,e,n){var r,i=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),a=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&&Nt(t[r])!==Nt(e[r]))&&a++;return a+o}function hr(t,e){z(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+B(~~(t/60),2)+e+B(~~t%60,2)}))}hr("Z",":"),hr("ZZ",""),Ct("Z",Dt),Ct("ZZ",Dt),Vt(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=fr(Dt,t)}));var dr=/([\+\-]|\d\d)/gi;function fr(t,e){var n,r,i=(e||"").match(t);return null===i?null:0===(r=60*(n=((i[i.length-1]||[])+"").match(dr)||["-",0,0])[1]+Nt(n[2]))?0:"+"===n[0]?r:-r}function pr(t,e){var n,i;return e._isUTC?(n=e.clone(),i=(x(t)||d(t)?t.valueOf():Zn(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):Zn(t).local()}function mr(t){return-Math.round(t._d.getTimezoneOffset())}function gr(t,e,n){var i,o=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=fr(Dt,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(i=mr(this)),this._offset=t,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==t&&(!e||this._changeInProgress?Vr(this,Ar(t-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:mr(this)}function vr(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function yr(t){return this.utcOffset(0,t)}function br(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(mr(this),"m")),this}function wr(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=fr(_t,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this}function _r(t){return!!this.isValid()&&(t=t?Zn(t).utcOffset():0,(this.utcOffset()-t)%60==0)}function Dr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Sr(){if(!u(this._isDSTShifted))return this._isDSTShifted;var t,e={};return D(e,this),(e=Wn(e))._a?(t=e._isUTC?m(e._a):Zn(e._a),this._isDSTShifted=this.isValid()&&ur(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function xr(){return!!this.isValid()&&!this._isUTC}function kr(){return!!this.isValid()&&this._isUTC}function Tr(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Cr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Or=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ar(t,e){var n,r,i,o=t,a=null;return lr(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:h(t)||!isNaN(+t)?(o={},e?o[e]=+t:o.milliseconds=+t):(a=Cr.exec(t))?(n="-"===a[1]?-1:1,o={y:0,d:Nt(a[Lt])*n,h:Nt(a[zt])*n,m:Nt(a[Yt])*n,s:Nt(a[Ht])*n,ms:Nt(cr(1e3*a[Ut]))*n}):(a=Or.exec(t))?(n="-"===a[1]?-1:1,o={y:Er(a[2],n),M:Er(a[3],n),w:Er(a[4],n),d:Er(a[5],n),h:Er(a[6],n),m:Er(a[7],n),s:Er(a[8],n)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(i=Nr(Zn(o.from),Zn(o.to)),(o={}).ms=i.milliseconds,o.M=i.months),r=new sr(o),lr(t)&&l(t,"_locale")&&(r._locale=t._locale),lr(t)&&l(t,"_isValid")&&(r._isValid=t._isValid),r}function Er(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Mr(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Nr(t,e){var n;return t.isValid()&&e.isValid()?(e=pr(e,t),t.isBefore(e)?n=Mr(t,e):((n=Mr(e,t)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Pr(t,e){return function(n,r){var i;return null===r||isNaN(+r)||(A(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Vr(this,Ar(n,r),t),this}}function Vr(t,e,n,i){var o=e._milliseconds,a=cr(e._days),s=cr(e._months);t.isValid()&&(i=null==i||i,s&&fe(t,Jt(t,"Month")+s*n),a&&Qt(t,"Date",Jt(t,"Date")+a*n),o&&t._d.setTime(t._d.valueOf()+o*n),i&&r.updateOffset(t,a||s))}Ar.fn=sr.prototype,Ar.invalid=ar;var Rr=Pr(1,"add"),Br=Pr(-1,"subtract");function Ir(t){return"string"==typeof t||t instanceof String}function Fr(t){return x(t)||d(t)||Ir(t)||h(t)||Lr(t)||jr(t)||null==t}function jr(t){var e,n,r=s(t)&&!c(t),i=!1,o=["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=o.length;for(e=0;e<a;e+=1)n=o[e],i=i||l(t,n);return r&&i}function Lr(t){var e=a(t),n=!1;return e&&(n=0===t.filter((function(e){return!h(e)&&Ir(t)})).length),e&&n}function zr(t){var e,n,r=s(t)&&!c(t),i=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(e=0;e<o.length;e+=1)n=o[e],i=i||l(t,n);return r&&i}function Yr(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Hr(t,e){1===arguments.length&&(arguments[0]?Fr(arguments[0])?(t=arguments[0],e=void 0):zr(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||Zn(),i=pr(n,this).startOf("day"),o=r.calendarFormat(this,i)||"sameElse",a=e&&(E(e[o])?e[o].call(this,n):e[o]);return this.format(a||this.localeData().calendar(o,this,Zn(n)))}function Ur(){return new S(this)}function qr(t,e){var n=x(t)?t:Zn(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=rt(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())}function Gr(t,e){var n=x(t)?t:Zn(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=rt(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())}function Wr(t,e,n,r){var i=x(t)?t:Zn(t),o=x(e)?e:Zn(e);return!!(this.isValid()&&i.isValid()&&o.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(o,n):!this.isAfter(o,n))}function $r(t,e){var n,r=x(t)?t:Zn(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=rt(e)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))}function Kr(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function Zr(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function Xr(t,e,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=pr(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=rt(e)){case"year":o=Jr(this,r)/12;break;case"month":o=Jr(this,r);break;case"quarter":o=Jr(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:Mt(o)}function Jr(t,e){if(t.date()<e.date())return-Jr(e,t);var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,"months");return-(n+(e-r<0?(e-r)/(r-t.clone().add(n-1,"months")):(e-r)/(t.clone().add(n+1,"months")-r)))||0}function Qr(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ti(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?U(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):E(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",U(n,"Z")):U(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ei(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,n,r,i="moment",o="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),t="["+i+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=o+'[")]',this.format(t+e+n+r)}function ni(t){t||(t=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var e=U(this,t);return this.localeData().postformat(e)}function ri(t,e){return this.isValid()&&(x(t)&&t.isValid()||Zn(t).isValid())?Ar({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ii(t){return this.from(Zn(),t)}function oi(t,e){return this.isValid()&&(x(t)&&t.isValid()||Zn(t).isValid())?Ar({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ai(t){return this.to(Zn(),t)}function si(t){var e;return void 0===t?this._locale._abbr:(null!=(e=bn(t))&&(this._locale=e),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var li=T("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function ci(){return this._locale}var ui=1e3,hi=60*ui,di=60*hi,fi=3506328*di;function pi(t,e){return(t%e+e)%e}function mi(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-fi:new Date(t,e,n).valueOf()}function gi(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-fi:Date.UTC(t,e,n)}function vi(t){var e,n;if(void 0===(t=rt(t))||"millisecond"===t||!this.isValid())return this;switch(n=this._isUTC?gi:mi,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=pi(e+(this._isUTC?0:this.utcOffset()*hi),di);break;case"minute":e=this._d.valueOf(),e-=pi(e,hi);break;case"second":e=this._d.valueOf(),e-=pi(e,ui)}return this._d.setTime(e),r.updateOffset(this,!0),this}function yi(t){var e,n;if(void 0===(t=rt(t))||"millisecond"===t||!this.isValid())return this;switch(n=this._isUTC?gi:mi,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=di-pi(e+(this._isUTC?0:this.utcOffset()*hi),di)-1;break;case"minute":e=this._d.valueOf(),e+=hi-pi(e,hi)-1;break;case"second":e=this._d.valueOf(),e+=ui-pi(e,ui)-1}return this._d.setTime(e),r.updateOffset(this,!0),this}function bi(){return this._d.valueOf()-6e4*(this._offset||0)}function wi(){return Math.floor(this.valueOf()/1e3)}function _i(){return new Date(this.valueOf())}function Di(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Si(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function xi(){return this.isValid()?this.toISOString():null}function ki(){return y(this)}function Ti(){return p({},v(this))}function Ci(){return v(this).overflow}function Oi(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ai(t,e){var n,i,o,a=this._eras||bn("en")._eras;for(n=0,i=a.length;n<i;++n)switch("string"==typeof a[n].since&&(o=r(a[n].since).startOf("day"),a[n].since=o.valueOf()),typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":o=r(a[n].until).startOf("day").valueOf(),a[n].until=o.valueOf()}return a}function Ei(t,e,n){var r,i,o,a,s,l=this.eras();for(t=t.toUpperCase(),r=0,i=l.length;r<i;++r)if(o=l[r].name.toUpperCase(),a=l[r].abbr.toUpperCase(),s=l[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(a===t)return l[r];break;case"NNNN":if(o===t)return l[r];break;case"NNNNN":if(s===t)return l[r]}else if([o,a,s].indexOf(t)>=0)return l[r]}function Mi(t,e){var n=t.since<=t.until?1:-1;return void 0===e?r(t.since).year():r(t.since).year()+(e-t.offset)*n}function Ni(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until)return r[t].name;if(r[t].until<=n&&n<=r[t].since)return r[t].name}return""}function Pi(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until)return r[t].narrow;if(r[t].until<=n&&n<=r[t].since)return r[t].narrow}return""}function Vi(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until)return r[t].abbr;if(r[t].until<=n&&n<=r[t].since)return r[t].abbr}return""}function Ri(){var t,e,n,i,o=this.localeData().eras();for(t=0,e=o.length;t<e;++t)if(n=o[t].since<=o[t].until?1:-1,i=this.clone().startOf("day").valueOf(),o[t].since<=i&&i<=o[t].until||o[t].until<=i&&i<=o[t].since)return(this.year()-r(o[t].since).year())*n+o[t].offset;return this.year()}function Bi(t){return l(this,"_erasNameRegex")||Hi.call(this),t?this._erasNameRegex:this._erasRegex}function Ii(t){return l(this,"_erasAbbrRegex")||Hi.call(this),t?this._erasAbbrRegex:this._erasRegex}function Fi(t){return l(this,"_erasNarrowRegex")||Hi.call(this),t?this._erasNarrowRegex:this._erasRegex}function ji(t,e){return e.erasAbbrRegex(t)}function Li(t,e){return e.erasNameRegex(t)}function zi(t,e){return e.erasNarrowRegex(t)}function Yi(t,e){return e._eraYearOrdinalRegex||bt}function Hi(){var t,e,n,r,i,o=[],a=[],s=[],l=[],c=this.eras();for(t=0,e=c.length;t<e;++t)n=Et(c[t].name),r=Et(c[t].abbr),i=Et(c[t].narrow),a.push(n),o.push(r),s.push(i),l.push(n),l.push(r),l.push(i);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+s.join("|")+")","i")}function Ui(t,e){z(0,[t,t.length],0,e)}function qi(t){return Xi.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Gi(t){return Xi.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Wi(){return xe(this.year(),1,4)}function $i(){return xe(this.isoWeekYear(),1,4)}function Ki(){var t=this.localeData()._week;return xe(this.year(),t.dow,t.doy)}function Zi(){var t=this.localeData()._week;return xe(this.weekYear(),t.dow,t.doy)}function Xi(t,e,n,r,i){var o;return null==t?Se(this,r,i).year:(e>(o=xe(t,r,i))&&(e=o),Ji.call(this,t,e,n,r,i))}function Ji(t,e,n,r,i){var o=De(t,e,n,r,i),a=we(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Qi(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}z("N",0,0,"eraAbbr"),z("NN",0,0,"eraAbbr"),z("NNN",0,0,"eraAbbr"),z("NNNN",0,0,"eraName"),z("NNNNN",0,0,"eraNarrow"),z("y",["y",1],"yo","eraYear"),z("y",["yy",2],0,"eraYear"),z("y",["yyy",3],0,"eraYear"),z("y",["yyyy",4],0,"eraYear"),Ct("N",ji),Ct("NN",ji),Ct("NNN",ji),Ct("NNNN",Li),Ct("NNNNN",zi),Vt(["N","NN","NNN","NNNN","NNNNN"],(function(t,e,n,r){var i=n._locale.erasParse(t,r,n._strict);i?v(n).era=i:v(n).invalidEra=t})),Ct("y",bt),Ct("yy",bt),Ct("yyy",bt),Ct("yyyy",bt),Ct("yo",Yi),Vt(["y","yy","yyy","yyyy"],Ft),Vt(["yo"],(function(t,e,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[Ft]=n._locale.eraYearOrdinalParse(t,i):e[Ft]=parseInt(t,10)})),z(0,["gg",2],0,(function(){return this.weekYear()%100})),z(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Ui("gggg","weekYear"),Ui("ggggg","weekYear"),Ui("GGGG","isoWeekYear"),Ui("GGGGG","isoWeekYear"),Ct("G",wt),Ct("g",wt),Ct("GG",ft,ct),Ct("gg",ft,ct),Ct("GGGG",vt,ht),Ct("gggg",vt,ht),Ct("GGGGG",yt,dt),Ct("ggggg",yt,dt),Rt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,r){e[r.substr(0,2)]=Nt(t)})),Rt(["gg","GG"],(function(t,e,n,i){e[i]=r.parseTwoDigitYear(t)})),z("Q",0,"Qo","quarter"),Ct("Q",lt),Vt("Q",(function(t,e){e[jt]=3*(Nt(t)-1)})),z("D",["DD",2],"Do","date"),Ct("D",ft,kt),Ct("DD",ft,ct),Ct("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),Vt(["D","DD"],Lt),Vt("Do",(function(t,e){e[Lt]=Nt(t.match(ft)[0])}));var to=Xt("Date",!0);function eo(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}z("DDD",["DDDD",3],"DDDo","dayOfYear"),Ct("DDD",gt),Ct("DDDD",ut),Vt(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=Nt(t)})),z("m",["mm",2],0,"minute"),Ct("m",ft,Tt),Ct("mm",ft,ct),Vt(["m","mm"],Yt);var no=Xt("Minutes",!1);z("s",["ss",2],0,"second"),Ct("s",ft,Tt),Ct("ss",ft,ct),Vt(["s","ss"],Ht);var ro,io,oo=Xt("Seconds",!1);for(z("S",0,0,(function(){return~~(this.millisecond()/100)})),z(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),z(0,["SSS",3],0,"millisecond"),z(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),z(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),z(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),z(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),z(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),z(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),Ct("S",gt,lt),Ct("SS",gt,ct),Ct("SSS",gt,ut),ro="SSSS";ro.length<=9;ro+="S")Ct(ro,bt);function ao(t,e){e[Ut]=Nt(1e3*("0."+t))}for(ro="S";ro.length<=9;ro+="S")Vt(ro,ao);function so(){return this._isUTC?"UTC":""}function lo(){return this._isUTC?"Coordinated Universal Time":""}io=Xt("Milliseconds",!1),z("z",0,0,"zoneAbbr"),z("zz",0,0,"zoneName");var co=S.prototype;function uo(t){return Zn(1e3*t)}function ho(){return Zn.apply(null,arguments).parseZone()}function fo(t){return t}co.add=Rr,co.calendar=Hr,co.clone=Ur,co.diff=Xr,co.endOf=yi,co.format=ni,co.from=ri,co.fromNow=ii,co.to=oi,co.toNow=ai,co.get=te,co.invalidAt=Ci,co.isAfter=qr,co.isBefore=Gr,co.isBetween=Wr,co.isSame=$r,co.isSameOrAfter=Kr,co.isSameOrBefore=Zr,co.isValid=ki,co.lang=li,co.locale=si,co.localeData=ci,co.max=Jn,co.min=Xn,co.parsingFlags=Ti,co.set=ee,co.startOf=vi,co.subtract=Br,co.toArray=Di,co.toObject=Si,co.toDate=_i,co.toISOString=ti,co.inspect=ei,"undefined"!=typeof Symbol&&null!=Symbol.for&&(co[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),co.toJSON=xi,co.toString=Qr,co.unix=wi,co.valueOf=bi,co.creationData=Oi,co.eraName=Ni,co.eraNarrow=Pi,co.eraAbbr=Vi,co.eraYear=Ri,co.year=Kt,co.isLeapYear=Zt,co.weekYear=qi,co.isoWeekYear=Gi,co.quarter=co.quarters=Qi,co.month=pe,co.daysInMonth=me,co.week=co.weeks=Ae,co.isoWeek=co.isoWeeks=Ee,co.weeksInYear=Ki,co.weeksInWeekYear=Zi,co.isoWeeksInYear=Wi,co.isoWeeksInISOWeekYear=$i,co.date=to,co.day=co.days=qe,co.weekday=Ge,co.isoWeekday=We,co.dayOfYear=eo,co.hour=co.hours=on,co.minute=co.minutes=no,co.second=co.seconds=oo,co.millisecond=co.milliseconds=io,co.utcOffset=gr,co.utc=yr,co.local=br,co.parseZone=wr,co.hasAlignedHourOffset=_r,co.isDST=Dr,co.isLocal=xr,co.isUtcOffset=kr,co.isUtc=Tr,co.isUTC=Tr,co.zoneAbbr=so,co.zoneName=lo,co.dates=T("dates accessor is deprecated. Use date instead.",to),co.months=T("months accessor is deprecated. Use month instead",pe),co.years=T("years accessor is deprecated. Use year instead",Kt),co.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",vr),co.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Sr);var po=P.prototype;function mo(t,e,n,r){var i=bn(),o=m().set(r,e);return i[n](o,t)}function go(t,e,n){if(h(t)&&(e=t,t=void 0),t=t||"",null!=e)return mo(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=mo(t,r,n,"month");return i}function vo(t,e,n,r){"boolean"==typeof t?(h(e)&&(n=e,e=void 0),e=e||""):(n=e=t,t=!1,h(e)&&(n=e,e=void 0),e=e||"");var i,o=bn(),a=t?o._week.dow:0,s=[];if(null!=n)return mo(e,(n+a)%7,r,"day");for(i=0;i<7;i++)s[i]=mo(e,(i+a)%7,r,"day");return s}function yo(t,e){return go(t,e,"months")}function bo(t,e){return go(t,e,"monthsShort")}function wo(t,e,n){return vo(t,e,n,"weekdays")}function _o(t,e,n){return vo(t,e,n,"weekdaysShort")}function Do(t,e,n){return vo(t,e,n,"weekdaysMin")}po.calendar=R,po.longDateFormat=W,po.invalidDate=K,po.ordinal=J,po.preparse=fo,po.postformat=fo,po.relativeTime=tt,po.pastFuture=et,po.set=M,po.eras=Ai,po.erasParse=Ei,po.erasConvertYear=Mi,po.erasAbbrRegex=Ii,po.erasNameRegex=Bi,po.erasNarrowRegex=Fi,po.months=ce,po.monthsShort=ue,po.monthsParse=de,po.monthsRegex=ve,po.monthsShortRegex=ge,po.week=ke,po.firstDayOfYear=Oe,po.firstDayOfWeek=Ce,po.weekdays=Le,po.weekdaysMin=Ye,po.weekdaysShort=ze,po.weekdaysParse=Ue,po.weekdaysRegex=$e,po.weekdaysShortRegex=Ke,po.weekdaysMinRegex=Ze,po.isPM=nn,po.meridiem=an,gn("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(t){var e=t%10;return t+(1===Nt(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),r.lang=T("moment.lang is deprecated. Use moment.locale instead.",gn),r.langData=T("moment.langData is deprecated. Use moment.localeData instead.",bn);var So=Math.abs;function xo(){var t=this._data;return this._milliseconds=So(this._milliseconds),this._days=So(this._days),this._months=So(this._months),t.milliseconds=So(t.milliseconds),t.seconds=So(t.seconds),t.minutes=So(t.minutes),t.hours=So(t.hours),t.months=So(t.months),t.years=So(t.years),this}function ko(t,e,n,r){var i=Ar(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function To(t,e){return ko(this,t,e,1)}function Co(t,e){return ko(this,t,e,-1)}function Oo(t){return t<0?Math.floor(t):Math.ceil(t)}function Ao(){var t,e,n,r,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*Oo(Mo(s)+a),a=0,s=0),l.milliseconds=o%1e3,t=Mt(o/1e3),l.seconds=t%60,e=Mt(t/60),l.minutes=e%60,n=Mt(e/60),l.hours=n%24,a+=Mt(n/24),s+=i=Mt(Eo(a)),a-=Oo(Mo(i)),r=Mt(s/12),s%=12,l.days=a,l.months=s,l.years=r,this}function Eo(t){return 4800*t/146097}function Mo(t){return 146097*t/4800}function No(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=rt(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+Eo(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(Mo(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}}function Po(t){return function(){return this.as(t)}}var Vo=Po("ms"),Ro=Po("s"),Bo=Po("m"),Io=Po("h"),Fo=Po("d"),jo=Po("w"),Lo=Po("M"),zo=Po("Q"),Yo=Po("y"),Ho=Vo;function Uo(){return Ar(this)}function qo(t){return t=rt(t),this.isValid()?this[t+"s"]():NaN}function Go(t){return function(){return this.isValid()?this._data[t]:NaN}}var Wo=Go("milliseconds"),$o=Go("seconds"),Ko=Go("minutes"),Zo=Go("hours"),Xo=Go("days"),Jo=Go("months"),Qo=Go("years");function ta(){return Mt(this.days()/7)}var ea=Math.round,na={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ra(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function ia(t,e,n,r){var i=Ar(t).abs(),o=ea(i.as("s")),a=ea(i.as("m")),s=ea(i.as("h")),l=ea(i.as("d")),c=ea(i.as("M")),u=ea(i.as("w")),h=ea(i.as("y")),d=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||a<=1&&["m"]||a<n.m&&["mm",a]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(d=d||u<=1&&["w"]||u<n.w&&["ww",u]),(d=d||c<=1&&["M"]||c<n.M&&["MM",c]||h<=1&&["y"]||["yy",h])[2]=e,d[3]=+t>0,d[4]=r,ra.apply(null,d)}function oa(t){return void 0===t?ea:"function"==typeof t&&(ea=t,!0)}function aa(t,e){return void 0!==na[t]&&(void 0===e?na[t]:(na[t]=e,"s"===t&&(na.ss=e-1),!0))}function sa(t,e){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,o=na;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(i=t),"object"==typeof e&&(o=Object.assign({},na,e),null!=e.s&&null==e.ss&&(o.ss=e.s-1)),r=ia(this,!i,o,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)}var la=Math.abs;function ca(t){return(t>0)-(t<0)||+t}function ua(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n,r,i,o,a,s,l=la(this._milliseconds)/1e3,c=la(this._days),u=la(this._months),h=this.asSeconds();return h?(t=Mt(l/60),e=Mt(t/60),l%=60,t%=60,n=Mt(u/12),u%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=h<0?"-":"",o=ca(this._months)!==ca(h)?"-":"",a=ca(this._days)!==ca(h)?"-":"",s=ca(this._milliseconds)!==ca(h)?"-":"",i+"P"+(n?o+n+"Y":"")+(u?o+u+"M":"")+(c?a+c+"D":"")+(e||t||l?"T":"")+(e?s+e+"H":"")+(t?s+t+"M":"")+(l?s+r+"S":"")):"P0D"}var ha=sr.prototype;return ha.isValid=or,ha.abs=xo,ha.add=To,ha.subtract=Co,ha.as=No,ha.asMilliseconds=Vo,ha.asSeconds=Ro,ha.asMinutes=Bo,ha.asHours=Io,ha.asDays=Fo,ha.asWeeks=jo,ha.asMonths=Lo,ha.asQuarters=zo,ha.asYears=Yo,ha.valueOf=Ho,ha._bubble=Ao,ha.clone=Uo,ha.get=qo,ha.milliseconds=Wo,ha.seconds=$o,ha.minutes=Ko,ha.hours=Zo,ha.days=Xo,ha.weeks=ta,ha.months=Jo,ha.years=Qo,ha.humanize=sa,ha.toISOString=ua,ha.toString=ua,ha.toJSON=ua,ha.locale=si,ha.localeData=ci,ha.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ua),ha.lang=li,z("X",0,0,"unix"),z("x",0,0,"valueOf"),Ct("x",wt),Ct("X",St),Vt("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t))})),Vt("x",(function(t,e,n){n._d=new Date(Nt(t))})),
|
|
2
2
|
//! moment.js
|
|
3
|
-
n.version="2.30.1",i(Yr),n.fn=lo,n.min=Zr,n.max=Qr,n.now=en,n.utc=p,n.unix=co,n.months=vo,n.isDate=h,n.locale=pr,n.invalid=y,n.duration=En,n.isMoment=x,n.weekdays=_o,n.parseZone=uo,n.localeData=vr,n.isDuration=sn,n.monthsShort=yo,n.weekdaysMin=wo,n.defineLocale=mr,n.updateLocale=gr,n.locales=yr,n.weekdaysShort=bo,n.normalizeUnits=re,n.relativeTimeRounding=ia,n.relativeTimeThreshold=oa,n.calendarFormat=Un,n.prototype=lo,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}()})),createSysConst=function(){return[{des:"年份",key:1001,mapField:"YEAR",mapping:"-",model:"2",name:"YEAR",value:moment().get("year")},{des:"月份",key:1005,mapField:"MONTH",mapping:"-",model:"2",name:"MONTH",value:moment().get("month")},{des:"日期",key:1004,mapField:"DATE",mapping:"-",model:"2",name:"DATE",value:moment().get("date")},{des:"星期",key:1003,mapField:"WEEK",mapping:"-",model:"2",name:"WEEK",value:moment().format("dddd")},{des:"版本",key:1002,mapField:"VERSION",mapping:"-",model:"2",name:"VERSION",value:"1.0.0"},{des:"手机号",key:2001,mapField:"U_PHONE",mapping:"-",model:"2",name:"U_PHONE",value:""},{des:"用户省",key:2002,mapField:"U_PROVINCE",mapping:"-",model:"2",name:"U_PROVINCE",value:""},{des:"用户市",key:2003,mapField:"U_CITY",mapping:"-",model:"2",name:"U_CITY",value:""},{des:"用户区县",key:2004,mapField:"U_COUNTY",mapping:"-",model:"2",name:"U_COUNTY",value:""}]},state={size:{width:1920,height:1080},resource:{jspaths:[],csspaths:[],otherpaths:[],fonts:[]},globalSource:[],alternateData:{},contextList:{},selectd:[],baseComs:[],globalVars:[],globalConstant:[],globalEvents:[],pages:[],pageIndex:0,groupFlag:!1,plant:{baseData:{width:1920,height:1080},option:null,optionDes:null},list:[],menuList:[],syncFlag:!0,multiple:!1,undoRedoPointer:-1,undos:[],redos:[],cache:[],cloneCache:[],shareVariable:{},shareVariableTree:{},catch:{selectd:[],list:[]},currentEditerCid:"",currentArea:{left:0,top:0,width:0,height:0,show:!1},caseList:[],constant:[],caseInfo:null,pageId:null,toPage:null,tw:null,watermark:null,endnotes:null,selectdChangeOrigin:"",sysConst:createSysConst(),historyFlag:!0,shareComs:new Map},extendStatics$1=function(e,t){return extendStatics$1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},extendStatics$1(e,t)};function __extends$2(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}extendStatics$1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var __assign$1=function(){return __assign$1=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$1.apply(this,arguments)};function __rest(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function __awaiter(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))}function __generator(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function __spreadArray$1(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var UndoRedo={createItem:function(e){e.catch={selectd:_$1.cloneDeep(e.selectd),list:_$1.cloneDeep(e.list)}},resetData:function(e,t){if(e.historyFlag){var r=_$1.cloneDeep(t);e.selected=r.selected,e.list=r.list}},execute:function(e){e.historyFlag&&(e.undoRedoPointer===e.undos.length-1?(e.undos.length>5&&_$1.pullAt(e.undos,0),e.undos.push({selectd:_$1.cloneDeep(e.selectd),list:_$1.cloneDeep(e.list)})):e.undos.splice(e.undoRedoPointer+1,e.undos.length-1-e.undoRedoPointer,{selectd:_$1.cloneDeep(e.selectd),list:_$1.cloneDeep(e.list)}),e.undoRedoPointer=e.undos.length-1)},undo:function(e){if(e.historyFlag&&e.undoRedoPointer>0&&e.undoRedoPointer<e.undos.length){e.undoRedoPointer=e.undoRedoPointer-1;var t=e.undos[e.undoRedoPointer];this.commit("GoCom/resetData",t)}},redo:function(e){if(e.historyFlag&&e.undoRedoPointer>=0&&e.undoRedoPointer<e.undos.length){e.undoRedoPointer=e.undoRedoPointer+1;var t=e.undos[e.undoRedoPointer];this.commit("GoCom/resetData",t)}},switchHistoryFlag:function(e){e.historyFlag=!e.historyFlag,e.historyFlag||(e.undos=[],e.undoRedoPointer=-1)}},sandboxWorker="\nfunction proxyObj(originObj) {\n const exposeObj = new Proxy(originObj, {\n has: (target, key) => {\n if (['fetch', 'XMLHttpRequest', 'postMessage'].indexOf(key) >= 0) {\n throw new Error('Illegal operation for key'+key)\n } else {\n return target[key]\n }\n },\n })\n return exposeObj\n}\nfunction compileCode(src) {\n src = 'with (exposeObj) {'+src+'}'\n //console.log(src)\n return new Function('exposeObj', src)\n}\nfunction run(code) {\n let proxy = proxyObj({})\n let result = compileCode(code)(proxy)\n return result\n}\n\nonmessage = (e) => {\n try {\n let result = run(e.data.code)\n postMessage({\n code: 1,\n result,\n })\n } catch (err) {\n postMessage({\n code: -1,\n err,\n })\n }\n}\n\n",blob=new Blob([sandboxWorker]),url=URL.createObjectURL(blob);function run$1(e,t){return void 0===t&&(t=5e3),__awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(n){return r=new Worker(url),[2,new Promise((function(n,i){var o=function(){clearTimeout(s),r.removeEventListener("message",a),r.terminate(),r=null},a=function(e){var t=e.data,r=t.code,a=t.result,s=t.err;o(),1===r?n(a):i(s)};r.postMessage({code:e}),r.addEventListener("message",a);var s=setTimeout((function(){o(),i("timeout")}),t)}))]}))}))}function getDataForEvaluator(e,t,r,n,i){return __awaiter(this,void 0,void 0,(function(){var r,i,o,a,s,l,c;return __generator(this,(function(u){switch(u.label){case 0:if(r=e,i=_$1.cloneDeep(t),o=i.use,a=i.data,!o)return[3,4];l=function(e){var t,i;return __generator(this,(function(o){switch(o.label){case 0:return a[e].use?(t=a[e].dependVars,i={},n&&i&&t&&t.length&&t.map((function(e){var t=_$1.cloneDeep(n).filter((function(t){var r=t.mapField==e;return r&&(i[e]=t.value),r}));t&&0!=t.length||(i[e]="")})),[4,evaluator(a[e].code,r,i,a[e].mode?a[e].mode:"worker")]):[3,2];case 1:s=o.sent(),r=s.data,o.label=2;case 2:return[2]}}))},c=0,u.label=1;case 1:return c<a.length?[5,l(c)]:[3,4];case 2:u.sent(),u.label=3;case 3:return c++,[3,1];case 4:return[2,r]}}))}))}function evaluator(e,t,r,n){return void 0===r&&(r={}),void 0===n&&(n="worker"),__awaiter(this,void 0,void 0,(function(){var i,o,a,s,l,c,u,h,d;return __generator(this,(function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),"window"!=n?[3,1]:(o=(i=[["data"],[t]])[0],a=i[1],"object"==typeof r&&Object.keys(r).forEach((function(e){o.push(e),a.push(r[e])})),s=new(Function.bind.apply(Function,__spreadArray$1(__spreadArray$1([void 0],o,!1),[e],!1))),[2,{success:!0,data:s.apply(void 0,a)}]);case 1:return u=(l=[t,r,""])[1],h=l[2],"object"==typeof(c=l[0])&&(c=JSON.stringify(t)),"object"==typeof r&&(u=JSON.stringify(r)),Object.keys(r).forEach((function(e){return h+="".concat(e,",")})),d="let data=eval(".concat(c,"); \n let app=").concat(JSON.stringify({}),";"),d+=h?"let {".concat(h,"} = eval(").concat(u,"); "):"",[4,run$1(d+="".concat(e))];case 2:return[2,{success:!0,data:f.sent()}];case 3:return[3,5];case 4:return[2,{success:!1,error:f.sent(),data:t}];case 5:return[2]}}))}))}var global$1="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}var cachedSetTimeout=defaultSetTimout,cachedClearTimeout=defaultClearTimeout;function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch(t){try{return cachedClearTimeout.call(null,e)}catch(t){return cachedClearTimeout.call(this,e)}}}"function"==typeof global$1.setTimeout&&(cachedSetTimeout=setTimeout),"function"==typeof global$1.clearTimeout&&(cachedClearTimeout=clearTimeout);var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex<t;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,t=queue.length}currentQueue=null,draining=!1,runClearTimeout(e)}}function nextTick(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];queue.push(new Item(e,t)),1!==queue.length||draining||runTimeout(drainQueue)}function Item(e,t){this.fun=e,this.array=t}Item.prototype.run=function(){this.fun.apply(null,this.array)};var title="browser",platform$1="browser",browser=!0,env={},argv=[],version$1="",versions={},release={},config={};function noop(){}var on=noop,addListener=noop,once=noop,off=noop,removeListener=noop,removeAllListeners=noop,emit=noop;function binding(e){throw new Error("process.binding is not supported")}function cwd(){return"/"}function chdir(e){throw new Error("process.chdir is not supported")}function umask(){return 0}var performance=global$1.performance||{},performanceNow=performance.now||performance.mozNow||performance.msNow||performance.oNow||performance.webkitNow||function(){return(new Date).getTime()};function hrtime(e){var t=.001*performanceNow.call(performance),r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r-=e[0],(n-=e[1])<0&&(r--,n+=1e9)),[r,n]}var startTime=new Date;function uptime(){return(new Date-startTime)/1e3}var process$1={nextTick:nextTick,title:title,browser:browser,env:env,argv:argv,version:version$1,versions:versions,on:on,addListener:addListener,once:once,off:off,removeListener:removeListener,removeAllListeners:removeAllListeners,emit:emit,binding:binding,cwd:cwd,chdir:chdir,umask:umask,hrtime:hrtime,platform:platform$1,release:release,config:config,uptime:uptime},BI_RM="0123456789abcdefghijklmnopqrstuvwxyz";function int2char(e){return BI_RM.charAt(e)}function op_and(e,t){return e&t}function op_or(e,t){return e|t}function op_xor(e,t){return e^t}function op_andnot(e,t){return e&~t}function lbit(e){if(0==e)return-1;var t=0;return 65535&e||(e>>=16,t+=16),255&e||(e>>=8,t+=8),15&e||(e>>=4,t+=4),3&e||(e>>=2,t+=2),1&e||++t,t}function cbit(e){for(var t=0;0!=e;)e&=e-1,++t;return t}var b64map="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64pad="=",decoder$1;function hex2b64(e){var t,r,n="";for(t=0;t+3<=e.length;t+=3)r=parseInt(e.substring(t,t+3),16),n+=b64map.charAt(r>>6)+b64map.charAt(63&r);for(t+1==e.length?(r=parseInt(e.substring(t,t+1),16),n+=b64map.charAt(r<<2)):t+2==e.length&&(r=parseInt(e.substring(t,t+2),16),n+=b64map.charAt(r>>2)+b64map.charAt((3&r)<<4));(3&n.length)>0;)n+=b64pad;return n}function b64tohex(e){var t,r="",n=0,i=0;for(t=0;t<e.length&&e.charAt(t)!=b64pad;++t){var o=b64map.indexOf(e.charAt(t));o<0||(0==n?(r+=int2char(o>>2),i=3&o,n=1):1==n?(r+=int2char(i<<2|o>>4),i=15&o,n=2):2==n?(r+=int2char(i),r+=int2char(o>>2),i=3&o,n=3):(r+=int2char(i<<2|o>>4),r+=int2char(15&o),n=0))}return 1==n&&(r+=int2char(i<<2)),r}var Hex={decode:function(e){var t;if(void 0===decoder$1){var r="0123456789ABCDEF",n=" \f\n\r\t \u2028\u2029";for(decoder$1={},t=0;t<16;++t)decoder$1[r.charAt(t)]=t;for(r=r.toLowerCase(),t=10;t<16;++t)decoder$1[r.charAt(t)]=t;for(t=0;t<8;++t)decoder$1[n.charAt(t)]=-1}var i=[],o=0,a=0;for(t=0;t<e.length;++t){var s=e.charAt(t);if("="==s)break;if(-1!=(s=decoder$1[s])){if(void 0===s)throw new Error("Illegal character at offset "+t);o|=s,++a>=2?(i[i.length]=o,o=0,a=0):o<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return i}},decoder,Base64={decode:function(e){var t;if(void 0===decoder){var r="= \f\n\r\t \u2028\u2029";for(decoder=Object.create(null),t=0;t<64;++t)decoder["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)]=t;for(decoder["-"]=62,decoder._=63,t=0;t<9;++t)decoder[r.charAt(t)]=-1}var n=[],i=0,o=0;for(t=0;t<e.length;++t){var a=e.charAt(t);if("="==a)break;if(-1!=(a=decoder[a])){if(void 0===a)throw new Error("Illegal character at offset "+t);i|=a,++o>=4?(n[n.length]=i>>16,n[n.length]=i>>8&255,n[n.length]=255&i,i=0,o=0):i<<=6}}switch(o){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:n[n.length]=i>>10;break;case 3:n[n.length]=i>>16,n[n.length]=i>>8&255}return n},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(e){var t=Base64.re.exec(e);if(t)if(t[1])e=t[1];else{if(!t[2])throw new Error("RegExp out of sync");e=t[2]}return Base64.decode(e)}},max=1e13,Int10=function(){function e(e){this.buf=[+e||0]}return e.prototype.mulAdd=function(e,t){var r,n,i=this.buf,o=i.length;for(r=0;r<o;++r)(n=i[r]*e+t)<max?t=0:n-=(t=0|n/max)*max,i[r]=n;t>0&&(i[r]=t)},e.prototype.sub=function(e){var t,r,n=this.buf,i=n.length;for(t=0;t<i;++t)(r=n[t]-e)<0?(r+=max,e=1):e=0,n[t]=r;for(;0===n[n.length-1];)n.pop()},e.prototype.toString=function(e){if(10!=(e||10))throw new Error("only base 10 is supported");for(var t=this.buf,r=t[t.length-1].toString(),n=t.length-2;n>=0;--n)r+=(max+t[n]).toString().substring(1);return r},e.prototype.valueOf=function(){for(var e=this.buf,t=0,r=e.length-1;r>=0;--r)t=t*max+e[r];return t},e.prototype.simplify=function(){var e=this.buf;return 1==e.length?e[0]:this},e}(),ellipsis="…",reTimeS=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,reTimeL=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function stringCut(e,t){return e.length>t&&(e=e.substring(0,t)+ellipsis),e}var Stream=function(){function e(t,r){this.hexDigits="0123456789ABCDEF",t instanceof e?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=r)}return e.prototype.get=function(e){if(void 0===e&&(e=this.pos++),e>=this.enc.length)throw new Error("Requesting byte offset ".concat(e," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(e):this.enc[e]},e.prototype.hexByte=function(e){return this.hexDigits.charAt(e>>4&15)+this.hexDigits.charAt(15&e)},e.prototype.hexDump=function(e,t,r){for(var n="",i=e;i<t;++i)if(n+=this.hexByte(this.get(i)),!0!==r)switch(15&i){case 7:n+=" ";break;case 15:n+="\n";break;default:n+=" "}return n},e.prototype.isASCII=function(e,t){for(var r=e;r<t;++r){var n=this.get(r);if(n<32||n>176)return!1}return!0},e.prototype.parseStringISO=function(e,t){for(var r="",n=e;n<t;++n)r+=String.fromCharCode(this.get(n));return r},e.prototype.parseStringUTF=function(e,t){for(var r="",n=e;n<t;){var i=this.get(n++);r+=i<128?String.fromCharCode(i):i>191&&i<224?String.fromCharCode((31&i)<<6|63&this.get(n++)):String.fromCharCode((15&i)<<12|(63&this.get(n++))<<6|63&this.get(n++))}return r},e.prototype.parseStringBMP=function(e,t){for(var r,n,i="",o=e;o<t;)r=this.get(o++),n=this.get(o++),i+=String.fromCharCode(r<<8|n);return i},e.prototype.parseTime=function(e,t,r){var n=this.parseStringISO(e,t),i=(r?reTimeS:reTimeL).exec(n);return i?(r&&(i[1]=+i[1],i[1]+=+i[1]<70?2e3:1900),n=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(n+=":"+i[5],i[6]&&(n+=":"+i[6],i[7]&&(n+="."+i[7]))),i[8]&&(n+=" UTC","Z"!=i[8]&&(n+=i[8],i[9]&&(n+=":"+i[9]))),n):"Unrecognized time: "+n},e.prototype.parseInteger=function(e,t){for(var r,n=this.get(e),i=n>127,o=i?255:0,a="";n==o&&++e<t;)n=this.get(e);if(0===(r=t-e))return i?-1:0;if(r>4){for(a=n,r<<=3;!(128&(+a^o));)a=+a<<1,--r;a="("+r+" bit)\n"}i&&(n-=256);for(var s=new Int10(n),l=e+1;l<t;++l)s.mulAdd(256,this.get(l));return a+s.toString()},e.prototype.parseBitString=function(e,t,r){for(var n=this.get(e),i="("+((t-e-1<<3)-n)+" bit)\n",o="",a=e+1;a<t;++a){for(var s=this.get(a),l=a==t-1?n:0,c=7;c>=l;--c)o+=s>>c&1?"1":"0";if(o.length>r)return i+stringCut(o,r)}return i+o},e.prototype.parseOctetString=function(e,t,r){if(this.isASCII(e,t))return stringCut(this.parseStringISO(e,t),r);var n=t-e,i="("+n+" byte)\n";n>(r/=2)&&(t=e+r);for(var o=e;o<t;++o)i+=this.hexByte(this.get(o));return n>r&&(i+=ellipsis),i},e.prototype.parseOID=function(e,t,r){for(var n="",i=new Int10,o=0,a=e;a<t;++a){var s=this.get(a);if(i.mulAdd(128,127&s),o+=7,!(128&s)){if(""===n)if((i=i.simplify())instanceof Int10)i.sub(80),n="2."+i.toString();else{var l=i<80?i<40?0:1:2;n=l+"."+(i-40*l)}else n+="."+i.toString();if(n.length>r)return stringCut(n,r);i=new Int10,o=0}}return o>0&&(n+=".incomplete"),n},e}(),ASN1=function(){function e(e,t,r,n,i){if(!(n instanceof ASN1Tag))throw new Error("Invalid tag value.");this.stream=e,this.header=t,this.length=r,this.tag=n,this.sub=i}return e.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},e.prototype.content=function(e){if(void 0===this.tag)return null;void 0===e&&(e=1/0);var t=this.posContent(),r=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+r,e);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(t)?"false":"true";case 2:return this.stream.parseInteger(t,t+r);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(t,t+r,e);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+r,e);case 6:return this.stream.parseOID(t,t+r,e);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return stringCut(this.stream.parseStringUTF(t,t+r),e);case 18:case 19:case 20:case 21:case 22:case 26:return stringCut(this.stream.parseStringISO(t,t+r),e);case 30:return stringCut(this.stream.parseStringBMP(t,t+r),e);case 23:case 24:return this.stream.parseTime(t,t+r,23==this.tag.tagNumber)}return null},e.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},e.prototype.toPrettyString=function(e){void 0===e&&(e="");var t=e+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(t+=" (encapsulates)"),t+="\n",null!==this.sub){e+=" ";for(var r=0,n=this.sub.length;r<n;++r)t+=this.sub[r].toPrettyString(e)}return t},e.prototype.posStart=function(){return this.stream.pos},e.prototype.posContent=function(){return this.stream.pos+this.header},e.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},e.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},e.decodeLength=function(e){var t=e.get(),r=127&t;if(r==t)return r;if(r>6)throw new Error("Length over 48 bits not supported at position "+(e.pos-1));if(0===r)return null;t=0;for(var n=0;n<r;++n)t=256*t+e.get();return t},e.prototype.getHexStringValue=function(){var e=this.toHexString(),t=2*this.header,r=2*this.length;return e.substr(t,r)},e.decode=function(t){var r;r=t instanceof Stream?t:new Stream(t,0);var n=new Stream(r),i=new ASN1Tag(r),o=e.decodeLength(r),a=r.pos,s=a-n.pos,l=null,c=function(){var t=[];if(null!==o){for(var n=a+o;r.pos<n;)t[t.length]=e.decode(r);if(r.pos!=n)throw new Error("Content size is not correct for container starting at offset "+a)}else try{for(;;){var i=e.decode(r);if(i.tag.isEOC())break;t[t.length]=i}o=a-r.pos}catch(e){throw new Error("Exception while decoding undefined length content: "+e)}return t};if(i.tagConstructed)l=c();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=r.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");l=c();for(var u=0;u<l.length;++u)if(l[u].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(e){l=null}if(null===l){if(null===o)throw new Error("We can't skip over an invalid tag with undefined length at offset "+a);r.pos=a+Math.abs(o)}return new e(n,s,o,i,l)},e}(),ASN1Tag=function(){function e(e){var t=e.get();if(this.tagClass=t>>6,this.tagConstructed=!!(32&t),this.tagNumber=31&t,31==this.tagNumber){var r=new Int10;do{t=e.get(),r.mulAdd(128,127&t)}while(128&t);this.tagNumber=r.simplify()}}return e.prototype.isUniversal=function(){return 0===this.tagClass},e.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},e}(),dbits,canary=0xdeadbeefcafe,j_lm=15715070==(16777215&canary),lowprimes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],lplim=(1<<26)/lowprimes[lowprimes.length-1],BigInteger=function(){function e(e,t,r){null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}return e.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<<t)-1,i=!1,o="",a=this.t,s=this.DB-a*this.DB%t;if(a-- >0)for(s<this.DB&&(r=this[a]>>s)>0&&(i=!0,o=int2char(r));a>=0;)s<t?(r=(this[a]&(1<<s)-1)<<t-s,r|=this[--a]>>(s+=this.DB-t)):(r=this[a]>>(s-=t)&n,s<=0&&(s+=this.DB,--a)),r>0&&(i=!0),i&&(o+=int2char(r));return i?o:"0"},e.prototype.negate=function(){var t=nbi();return e.ZERO.subTo(this,t),t},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(t){var r=nbi();return this.abs().divRemTo(t,null,r),this.s<0&&r.compareTo(e.ZERO)>0&&t.subTo(r,r),r},e.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new Classic(t):new Montgomery(t),this.exp(e,r)},e.prototype.clone=function(){var e=nbi();return this.copyTo(e),e},e.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},e.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},e.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},e.prototype.toByteArray=function(){var e=this.t,t=[];t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n<this.DB&&(r=this[e]>>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<<this.DB-n);e>=0;)n<8?(r=(this[e]&(1<<n)-1)<<8-n,r|=this[--e]>>(n+=this.DB-8)):(r=this[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),128&r&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},e.prototype.equals=function(e){return 0==this.compareTo(e)},e.prototype.min=function(e){return this.compareTo(e)<0?this:e},e.prototype.max=function(e){return this.compareTo(e)>0?this:e},e.prototype.and=function(e){var t=nbi();return this.bitwiseTo(e,op_and,t),t},e.prototype.or=function(e){var t=nbi();return this.bitwiseTo(e,op_or,t),t},e.prototype.xor=function(e){var t=nbi();return this.bitwiseTo(e,op_xor,t),t},e.prototype.andNot=function(e){var t=nbi();return this.bitwiseTo(e,op_andnot,t),t},e.prototype.not=function(){for(var e=nbi(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},e.prototype.shiftLeft=function(e){var t=nbi();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},e.prototype.shiftRight=function(e){var t=nbi();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},e.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+lbit(this[e]);return this.s<0?this.t*this.DB:-1},e.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=cbit(this[r]^t);return e},e.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:!!(this[t]&1<<e%this.DB)},e.prototype.setBit=function(e){return this.changeBit(e,op_or)},e.prototype.clearBit=function(e){return this.changeBit(e,op_andnot)},e.prototype.flipBit=function(e){return this.changeBit(e,op_xor)},e.prototype.add=function(e){var t=nbi();return this.addTo(e,t),t},e.prototype.subtract=function(e){var t=nbi();return this.subTo(e,t),t},e.prototype.multiply=function(e){var t=nbi();return this.multiplyTo(e,t),t},e.prototype.divide=function(e){var t=nbi();return this.divRemTo(e,t,null),t},e.prototype.remainder=function(e){var t=nbi();return this.divRemTo(e,null,t),t},e.prototype.divideAndRemainder=function(e){var t=nbi(),r=nbi();return this.divRemTo(e,t,r),[t,r]},e.prototype.modPow=function(e,t){var r,n,i=e.bitLength(),o=nbv(1);if(i<=0)return o;r=i<18?1:i<48?3:i<144?4:i<768?5:6,n=i<8?new Classic(t):t.isEven()?new Barrett(t):new Montgomery(t);var a=[],s=3,l=r-1,c=(1<<r)-1;if(a[1]=n.convert(this),r>1){var u=nbi();for(n.sqrTo(a[1],u);s<=c;)a[s]=nbi(),n.mulTo(u,a[s-2],a[s]),s+=2}var h,d,f=e.t-1,p=!0,m=nbi();for(i=nbits(e[f])-1;f>=0;){for(i>=l?h=e[f]>>i-l&c:(h=(e[f]&(1<<i+1)-1)<<l-i,f>0&&(h|=e[f-1]>>this.DB+i-l)),s=r;!(1&h);)h>>=1,--s;if((i-=s)<0&&(i+=this.DB,--f),p)a[h].copyTo(o),p=!1;else{for(;s>1;)n.sqrTo(o,m),n.sqrTo(m,o),s-=2;s>0?n.sqrTo(o,m):(d=o,o=m,m=d),n.mulTo(m,a[h],o)}for(;f>=0&&!(e[f]&1<<i);)n.sqrTo(o,m),d=o,o=m,m=d,--i<0&&(i=this.DB-1,--f)}return n.revert(o)},e.prototype.modInverse=function(t){var r=t.isEven();if(this.isEven()&&r||0==t.signum())return e.ZERO;for(var n=t.clone(),i=this.clone(),o=nbv(1),a=nbv(0),s=nbv(0),l=nbv(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),r?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(t,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(t,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),r?(s.isEven()&&l.isEven()||(s.addTo(this,s),l.subTo(t,l)),s.rShiftTo(1,s)):l.isEven()||l.subTo(t,l),l.rShiftTo(1,l);n.compareTo(i)>=0?(n.subTo(i,n),r&&o.subTo(s,o),a.subTo(l,a)):(i.subTo(n,i),r&&s.subTo(o,s),l.subTo(a,l))}return 0!=i.compareTo(e.ONE)?e.ZERO:l.compareTo(t)>=0?l.subtract(t):l.signum()<0?(l.addTo(t,l),l.signum()<0?l.add(t):l):l},e.prototype.pow=function(e){return this.exp(e,new NullExp)},e.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(i<o&&(o=i),o>0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},e.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r[0]<=lowprimes[lowprimes.length-1]){for(t=0;t<lowprimes.length;++t)if(r[0]==lowprimes[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<lowprimes.length;){for(var n=lowprimes[t],i=t+1;i<lowprimes.length&&n<lplim;)n*=lowprimes[i++];for(n=r.modInt(n);t<i;)if(n%lowprimes[t++]==0)return!1}return r.millerRabin(e)},e.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},e.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},e.prototype.fromString=function(t,r){var n;if(16==r)n=4;else if(8==r)n=3;else if(256==r)n=8;else if(2==r)n=1;else if(32==r)n=5;else{if(4!=r)return void this.fromRadix(t,r);n=2}this.t=0,this.s=0;for(var i=t.length,o=!1,a=0;--i>=0;){var s=8==n?255&+t[i]:intAt(t,i);s<0?"-"==t.charAt(i)&&(o=!0):(o=!1,0==a?this[this.t++]=s:a+n>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,(a+=n)>=this.DB&&(a-=this.DB))}8==n&&128&+t[0]&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),o&&e.ZERO.subTo(this,this)},e.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},e.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},e.prototype.drShiftTo=function(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s},e.prototype.lShiftTo=function(e,t){for(var r=e%this.DB,n=this.DB-r,i=(1<<n)-1,o=Math.floor(e/this.DB),a=this.s<<r&this.DM,s=this.t-1;s>=0;--s)t[s+o+1]=this[s]>>n|a,a=(this[s]&i)<<r;for(s=o-1;s>=0;--s)t[s]=0;t[o]=a,t.t=this.t+o+1,t.s=this.s,t.clamp()},e.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<<n)-1;t[0]=this[r]>>n;for(var a=r+1;a<this.t;++a)t[a-r-1]|=(this[a]&o)<<i,t[a-r]=this[a]>>n;n>0&&(t[this.t-r-1]|=(this.s&o)<<i),t.t=this.t-r,t.clamp()}},e.prototype.subTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]-e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e[r],t[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()},e.prototype.multiplyTo=function(t,r){var n=this.abs(),i=t.abs(),o=n.t;for(r.t=o+i.t;--o>=0;)r[o]=0;for(o=0;o<i.t;++o)r[o+n.t]=n.am(0,i[o],r,o,0,n.t);r.s=0,r.clamp(),this.s!=t.s&&e.ZERO.subTo(r,r)},e.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},e.prototype.divRemTo=function(t,r,n){var i=t.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t)return null!=r&&r.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=nbi());var a=nbi(),s=this.s,l=t.s,c=this.DB-nbits(i[i.t-1]);c>0?(i.lShiftTo(c,a),o.lShiftTo(c,n)):(i.copyTo(a),o.copyTo(n));var u=a.t,h=a[u-1];if(0!=h){var d=h*(1<<this.F1)+(u>1?a[u-2]>>this.F2:0),f=this.FV/d,p=(1<<this.F1)/d,m=1<<this.F2,g=n.t,v=g-u,y=null==r?nbi():r;for(a.dlShiftTo(v,y),n.compareTo(y)>=0&&(n[n.t++]=1,n.subTo(y,n)),e.ONE.dlShiftTo(u,y),y.subTo(a,a);a.t<u;)a[a.t++]=0;for(;--v>=0;){var _=n[--g]==h?this.DM:Math.floor(n[g]*f+(n[g-1]+m)*p);if((n[g]+=a.am(0,_,n,v,0,u))<_)for(a.dlShiftTo(v,y),n.subTo(y,n);n[g]<--_;)n.subTo(y,n)}null!=r&&(n.drShiftTo(u,r),s!=l&&e.ZERO.subTo(r,r)),n.t=u,n.clamp(),c>0&&n.rShiftTo(c,n),s<0&&e.ZERO.subTo(n,n)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(!(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},e.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},e.prototype.exp=function(t,r){if(t>4294967295||t<1)return e.ONE;var n=nbi(),i=nbi(),o=r.convert(this),a=nbits(t)-1;for(o.copyTo(n);--a>=0;)if(r.sqrTo(n,i),(t&1<<a)>0)r.mulTo(i,o,n);else{var s=n;n=i,i=s}return r.revert(n)},e.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},e.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=nbv(r),i=nbi(),o=nbi(),a="";for(this.divRemTo(n,i,o);i.signum()>0;)a=(r+o.intValue()).toString(e).substr(1)+a,i.divRemTo(n,i,o);return o.intValue().toString(e)+a},e.prototype.fromRadix=function(t,r){this.fromInt(0),null==r&&(r=10);for(var n=this.chunkSize(r),i=Math.pow(r,n),o=!1,a=0,s=0,l=0;l<t.length;++l){var c=intAt(t,l);c<0?"-"==t.charAt(l)&&0==this.signum()&&(o=!0):(s=r*s+c,++a>=n&&(this.dMultiply(i),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(r,a)),this.dAddOffset(s,0)),o&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(t,r,n){if("number"==typeof r)if(t<2)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),op_or,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(r);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var i=[],o=7&t;i.length=1+(t>>3),r.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},e.prototype.bitwiseTo=function(e,t,r){var n,i,o=Math.min(e.t,this.t);for(n=0;n<o;++n)r[n]=t(this[n],e[n]);if(e.t<this.t){for(i=e.s&this.DM,n=o;n<this.t;++n)r[n]=t(this[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=o;n<e.t;++n)r[n]=t(i,e[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()},e.prototype.changeBit=function(t,r){var n=e.ONE.shiftLeft(t);return this.bitwiseTo(n,r,n),n},e.prototype.addTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]+e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e[r],t[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()},e.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},e.prototype.multiplyLowerTo=function(e,t,r){var n=Math.min(this.t+e.t,t);for(r.s=0,r.t=n;n>0;)r[--n]=0;for(var i=r.t-this.t;n<i;++n)r[n+this.t]=this.am(0,e[n],r,n,0,this.t);for(i=Math.min(e.t,t);n<i;++n)this.am(0,e[n],r,n,0,t-n);r.clamp()},e.prototype.multiplyUpperTo=function(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(t-this.t,0);n<e.t;++n)r[this.t+n-t]=this.am(t-n,e[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)},e.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(0==t)r=this[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this[n])%e;return r},e.prototype.millerRabin=function(t){var r=this.subtract(e.ONE),n=r.getLowestSetBit();if(n<=0)return!1;var i=r.shiftRight(n);(t=t+1>>1)>lowprimes.length&&(t=lowprimes.length);for(var o=nbi(),a=0;a<t;++a){o.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);var s=o.modPow(i,this);if(0!=s.compareTo(e.ONE)&&0!=s.compareTo(r)){for(var l=1;l++<n&&0!=s.compareTo(r);)if(0==(s=s.modPowInt(2,this)).compareTo(e.ONE))return!1;if(0!=s.compareTo(r))return!1}}return!0},e.prototype.square=function(){var e=nbi();return this.squareTo(e),e},e.prototype.gcda=function(e,t){var r=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(r.compareTo(n)<0){var i=r;r=n,n=i}var o=r.getLowestSetBit(),a=n.getLowestSetBit();if(a<0)t(r);else{o<a&&(a=o),a>0&&(r.rShiftTo(a,r),n.rShiftTo(a,n));var s=function(){(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),r.compareTo(n)>=0?(r.subTo(n,r),r.rShiftTo(1,r)):(n.subTo(r,n),n.rShiftTo(1,n)),r.signum()>0?setTimeout(s,0):(a>0&&n.lShiftTo(a,n),setTimeout((function(){t(n)}),0))};setTimeout(s,10)}},e.prototype.fromNumberAsync=function(t,r,n,i){if("number"==typeof r)if(t<2)this.fromInt(1);else{this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),op_or,this),this.isEven()&&this.dAddOffset(1,0);var o=this,a=function(){o.dAddOffset(2,0),o.bitLength()>t&&o.subTo(e.ONE.shiftLeft(t-1),o),o.isProbablePrime(r)?setTimeout((function(){i()}),0):setTimeout(a,0)};setTimeout(a,0)}else{var s=[],l=7&t;s.length=1+(t>>3),r.nextBytes(s),l>0?s[0]&=(1<<l)-1:s[0]=0,this.fromString(s,256)}},e}(),NullExp=function(){function e(){}return e.prototype.convert=function(e){return e},e.prototype.revert=function(e){return e},e.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},e.prototype.sqrTo=function(e,t){e.squareTo(t)},e}(),Classic=function(){function e(e){this.m=e}return e.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},e.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),Montgomery=function(){function e(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}return e.prototype.convert=function(e){var t=nbi();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(BigInteger.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(e){var t=nbi();return e.copyTo(t),this.reduce(t),t},e.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e[t],n=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),Barrett=function(){function e(e){this.m=e,this.r2=nbi(),this.q3=nbi(),BigInteger.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e)}return e.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=nbi();return e.copyTo(t),this.reduce(t),t},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}();function nbi(){return new BigInteger(null)}function parseBigInt(e,t){return new BigInteger(e,t)}var inBrowser="undefined"!=typeof navigator;inBrowser&&j_lm&&"Microsoft Internet Explorer"==navigator.appName?(BigInteger.prototype.am=function(e,t,r,n,i,o){for(var a=32767&t,s=t>>15;--o>=0;){var l=32767&this[e],c=this[e++]>>15,u=s*l+c*a;i=((l=a*l+((32767&u)<<15)+r[n]+(1073741823&i))>>>30)+(u>>>15)+s*c+(i>>>30),r[n++]=1073741823&l}return i},dbits=30):inBrowser&&j_lm&&"Netscape"!=navigator.appName?(BigInteger.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var a=t*this[e++]+r[n]+i;i=Math.floor(a/67108864),r[n++]=67108863&a}return i},dbits=26):(BigInteger.prototype.am=function(e,t,r,n,i,o){for(var a=16383&t,s=t>>14;--o>=0;){var l=16383&this[e],c=this[e++]>>14,u=s*l+c*a;i=((l=a*l+((16383&u)<<14)+r[n]+i)>>28)+(u>>14)+s*c,r[n++]=268435455&l}return i},dbits=28),BigInteger.prototype.DB=dbits,BigInteger.prototype.DM=(1<<dbits)-1,BigInteger.prototype.DV=1<<dbits;var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP),BigInteger.prototype.F1=BI_FP-dbits,BigInteger.prototype.F2=2*dbits-BI_FP;var BI_RC=[],rr,vv;for(rr="0".charCodeAt(0),vv=0;vv<=9;++vv)BI_RC[rr++]=vv;for(rr="a".charCodeAt(0),vv=10;vv<36;++vv)BI_RC[rr++]=vv;for(rr="A".charCodeAt(0),vv=10;vv<36;++vv)BI_RC[rr++]=vv;function intAt(e,t){var r=BI_RC[e.charCodeAt(t)];return null==r?-1:r}function nbv(e){var t=nbi();return t.fromInt(e),t}function nbits(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}BigInteger.ZERO=nbv(0),BigInteger.ONE=nbv(1);var Arcfour=function(){function e(){this.i=0,this.j=0,this.S=[]}return e.prototype.init=function(e){var t,r,n;for(t=0;t<256;++t)this.S[t]=t;for(r=0,t=0;t<256;++t)r=r+this.S[t]+e[t%e.length]&255,n=this.S[t],this.S[t]=this.S[r],this.S[r]=n;this.i=0,this.j=0},e.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]},e}();function prng_newstate(){return new Arcfour}var rng_psize=256,rng_state,rng_pool=null,rng_pptr;if(null==rng_pool){rng_pool=[],rng_pptr=0;var t=void 0;if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues){var z$1=new Uint32Array(256);for(window.crypto.getRandomValues(z$1),t=0;t<z$1.length;++t)rng_pool[rng_pptr++]=255&z$1[t]}var count=0,onMouseMoveListener_1=function(e){if((count=count||0)>=256||rng_pptr>=rng_psize)window.removeEventListener?window.removeEventListener("mousemove",onMouseMoveListener_1,!1):window.detachEvent&&window.detachEvent("onmousemove",onMouseMoveListener_1);else try{var t=e.x+e.y;rng_pool[rng_pptr++]=255&t,count+=1}catch(e){}};"undefined"!=typeof window&&(window.addEventListener?window.addEventListener("mousemove",onMouseMoveListener_1,!1):window.attachEvent&&window.attachEvent("onmousemove",onMouseMoveListener_1))}function rng_get_byte(){if(null==rng_state){for(rng_state=prng_newstate();rng_pptr<rng_psize;){var e=Math.floor(65536*Math.random());rng_pool[rng_pptr++]=255&e}for(rng_state.init(rng_pool),rng_pptr=0;rng_pptr<rng_pool.length;++rng_pptr)rng_pool[rng_pptr]=0;rng_pptr=0}return rng_state.next()}var SecureRandom=function(){function e(){}return e.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=rng_get_byte()},e}();function pkcs1pad1(e,t){if(t<e.length+22)return console.error("Message too long for RSA"),null;for(var r=t-e.length-6,n="",i=0;i<r;i+=2)n+="ff";return parseBigInt("0001"+n+"00"+e,16)}function pkcs1pad2(e,t){if(t<e.length+11)return console.error("Message too long for RSA"),null;for(var r=[],n=e.length-1;n>=0&&t>0;){var i=e.charCodeAt(n--);i<128?r[--t]=i:i>127&&i<2048?(r[--t]=63&i|128,r[--t]=i>>6|192):(r[--t]=63&i|128,r[--t]=i>>6&63|128,r[--t]=i>>12|224)}r[--t]=0;for(var o=new SecureRandom,a=[];t>2;){for(a[0]=0;0==a[0];)o.nextBytes(a);r[--t]=a[0]}return r[--t]=2,r[--t]=0,new BigInteger(r)}var RSAKey=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},e.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),r=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(r)<0;)t=t.add(this.p);return t.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},e.prototype.setPublic=function(e,t){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=parseBigInt(e,16),this.e=parseInt(t,16)):console.error("Invalid RSA public key")},e.prototype.encrypt=function(e){var t=this.n.bitLength()+7>>3,r=pkcs1pad2(e,t);if(null==r)return null;var n=this.doPublic(r);if(null==n)return null;for(var i=n.toString(16),o=i.length,a=0;a<2*t-o;a++)i="0"+i;return i},e.prototype.setPrivate=function(e,t,r){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=parseBigInt(e,16),this.e=parseInt(t,16),this.d=parseBigInt(r,16)):console.error("Invalid RSA private key")},e.prototype.setPrivateEx=function(e,t,r,n,i,o,a,s){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=parseBigInt(e,16),this.e=parseInt(t,16),this.d=parseBigInt(r,16),this.p=parseBigInt(n,16),this.q=parseBigInt(i,16),this.dmp1=parseBigInt(o,16),this.dmq1=parseBigInt(a,16),this.coeff=parseBigInt(s,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(e,t){var r=new SecureRandom,n=e>>1;this.e=parseInt(t,16);for(var i=new BigInteger(t,16);;){for(;this.p=new BigInteger(e-n,1,r),0!=this.p.subtract(BigInteger.ONE).gcd(i).compareTo(BigInteger.ONE)||!this.p.isProbablePrime(10););for(;this.q=new BigInteger(n,1,r),0!=this.q.subtract(BigInteger.ONE).gcd(i).compareTo(BigInteger.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var a=this.p.subtract(BigInteger.ONE),s=this.q.subtract(BigInteger.ONE),l=a.multiply(s);if(0==l.gcd(i).compareTo(BigInteger.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(l),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}},e.prototype.decrypt=function(e){var t=parseBigInt(e,16),r=this.doPrivate(t);return null==r?null:pkcs1unpad2(r,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(e,t,r){var n=new SecureRandom,i=e>>1;this.e=parseInt(t,16);var o=new BigInteger(t,16),a=this,s=function(){var t=function(){if(a.p.compareTo(a.q)<=0){var e=a.p;a.p=a.q,a.q=e}var t=a.p.subtract(BigInteger.ONE),n=a.q.subtract(BigInteger.ONE),i=t.multiply(n);0==i.gcd(o).compareTo(BigInteger.ONE)?(a.n=a.p.multiply(a.q),a.d=o.modInverse(i),a.dmp1=a.d.mod(t),a.dmq1=a.d.mod(n),a.coeff=a.q.modInverse(a.p),setTimeout((function(){r()}),0)):setTimeout(s,0)},l=function(){a.q=nbi(),a.q.fromNumberAsync(i,1,n,(function(){a.q.subtract(BigInteger.ONE).gcda(o,(function(e){0==e.compareTo(BigInteger.ONE)&&a.q.isProbablePrime(10)?setTimeout(t,0):setTimeout(l,0)}))}))},c=function(){a.p=nbi(),a.p.fromNumberAsync(e-i,1,n,(function(){a.p.subtract(BigInteger.ONE).gcda(o,(function(e){0==e.compareTo(BigInteger.ONE)&&a.p.isProbablePrime(10)?setTimeout(l,0):setTimeout(c,0)}))}))};setTimeout(c,0)};setTimeout(s,0)},e.prototype.sign=function(e,t,r){var n=pkcs1pad1(getDigestHeader(r)+t(e).toString(),this.n.bitLength()/4);if(null==n)return null;var i=this.doPrivate(n);if(null==i)return null;var o=i.toString(16);return 1&o.length?"0"+o:o},e.prototype.verify=function(e,t,r){var n=parseBigInt(t,16),i=this.doPublic(n);return null==i?null:removeDigestHeader(i.toString(16).replace(/^1f+00/,""))==r(e).toString()},e}();function pkcs1unpad2(e,t){for(var r=e.toByteArray(),n=0;n<r.length&&0==r[n];)++n;if(r.length-n!=t-1||2!=r[n])return null;for(++n;0!=r[n];)if(++n>=r.length)return null;for(var i="";++n<r.length;){var o=255&r[n];o<128?i+=String.fromCharCode(o):o>191&&o<224?(i+=String.fromCharCode((31&o)<<6|63&r[n+1]),++n):(i+=String.fromCharCode((15&o)<<12|(63&r[n+1])<<6|63&r[n+2]),n+=2)}return i}var DIGEST_HEADERS={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function getDigestHeader(e){return DIGEST_HEADERS[e]||""}function removeDigestHeader(e){for(var t in DIGEST_HEADERS)if(DIGEST_HEADERS.hasOwnProperty(t)){var r=DIGEST_HEADERS[t],n=r.length;if(e.substr(0,n)==r)return e.substr(n)}return e}
|
|
3
|
+
r.version="2.30.1",o(Zn),r.fn=co,r.min=tr,r.max=er,r.now=nr,r.utc=m,r.unix=uo,r.months=yo,r.isDate=d,r.locale=gn,r.invalid=b,r.duration=Ar,r.isMoment=x,r.weekdays=wo,r.parseZone=ho,r.localeData=bn,r.isDuration=lr,r.monthsShort=bo,r.weekdaysMin=Do,r.defineLocale=vn,r.updateLocale=yn,r.locales=wn,r.weekdaysShort=_o,r.normalizeUnits=rt,r.relativeTimeRounding=oa,r.relativeTimeThreshold=aa,r.calendarFormat=Yr,r.prototype=co,r.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"},r}()})),l={size:{width:1920,height:1080},resource:{jspaths:[],csspaths:[],otherpaths:[],fonts:[]},globalSource:[],alternateData:{},contextList:{},selectd:[],baseComs:[],globalVars:[],globalConstant:[],globalEvents:[],pages:[],pageIndex:0,groupFlag:!1,plant:{baseData:{width:1920,height:1080},option:null,optionDes:null},list:[],menuList:[],syncFlag:!0,multiple:!1,undoRedoPointer:-1,undos:[],redos:[],cache:[],cloneCache:[],shareVariable:{},shareVariableTree:{},catch:{selectd:[],list:[]},currentEditerCid:"",currentArea:{left:0,top:0,width:0,height:0,show:!1},caseList:[],constant:[],caseInfo:null,pageId:null,toPage:null,tw:null,watermark:null,endnotes:null,selectdChangeOrigin:"",sysConst:[{des:"年份",key:1001,mapField:"YEAR",mapping:"-",model:"2",name:"YEAR",value:s().get("year")},{des:"月份",key:1005,mapField:"MONTH",mapping:"-",model:"2",name:"MONTH",value:s().get("month")},{des:"日期",key:1004,mapField:"DATE",mapping:"-",model:"2",name:"DATE",value:s().get("date")},{des:"星期",key:1003,mapField:"WEEK",mapping:"-",model:"2",name:"WEEK",value:s().format("dddd")},{des:"版本",key:1002,mapField:"VERSION",mapping:"-",model:"2",name:"VERSION",value:"1.0.0"},{des:"手机号",key:2001,mapField:"U_PHONE",mapping:"-",model:"2",name:"U_PHONE",value:""},{des:"用户省",key:2002,mapField:"U_PROVINCE",mapping:"-",model:"2",name:"U_PROVINCE",value:""},{des:"用户市",key:2003,mapField:"U_CITY",mapping:"-",model:"2",name:"U_CITY",value:""},{des:"用户区县",key:2004,mapField:"U_COUNTY",mapping:"-",model:"2",name:"U_COUNTY",value:""}],historyFlag:!0,shareComs:new Map},c=function(t,e){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},c(t,e)};var u=function(){return u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},u.apply(this,arguments)};function h(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))}function d(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function f(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var p={createItem:function(t){t.catch={selectd:e.cloneDeep(t.selectd),list:e.cloneDeep(t.list)}},resetData:function(t,n){if(t.historyFlag){var r=e.cloneDeep(n);t.selected=r.selected,t.list=r.list}},execute:function(t){t.historyFlag&&(t.undoRedoPointer===t.undos.length-1?(t.undos.length>5&&e.pullAt(t.undos,0),t.undos.push({selectd:e.cloneDeep(t.selectd),list:e.cloneDeep(t.list)})):t.undos.splice(t.undoRedoPointer+1,t.undos.length-1-t.undoRedoPointer,{selectd:e.cloneDeep(t.selectd),list:e.cloneDeep(t.list)}),t.undoRedoPointer=t.undos.length-1)},undo:function(t){if(t.historyFlag&&t.undoRedoPointer>0&&t.undoRedoPointer<t.undos.length){t.undoRedoPointer=t.undoRedoPointer-1;var e=t.undos[t.undoRedoPointer];this.commit("GoCom/resetData",e)}},redo:function(t){if(t.historyFlag&&t.undoRedoPointer>=0&&t.undoRedoPointer<t.undos.length){t.undoRedoPointer=t.undoRedoPointer+1;var e=t.undos[t.undoRedoPointer];this.commit("GoCom/resetData",e)}},switchHistoryFlag:function(t){t.historyFlag=!t.historyFlag,t.historyFlag||(t.undos=[],t.undoRedoPointer=-1)}},m=new Blob(["\nfunction proxyObj(originObj) {\n const exposeObj = new Proxy(originObj, {\n has: (target, key) => {\n if (['fetch', 'XMLHttpRequest', 'postMessage'].indexOf(key) >= 0) {\n throw new Error('Illegal operation for key'+key)\n } else {\n return target[key]\n }\n },\n })\n return exposeObj\n}\nfunction compileCode(src) {\n src = 'with (exposeObj) {'+src+'}'\n //console.log(src)\n return new Function('exposeObj', src)\n}\nfunction run(code) {\n let proxy = proxyObj({})\n let result = compileCode(code)(proxy)\n return result\n}\n\nonmessage = (e) => {\n try {\n let result = run(e.data.code)\n postMessage({\n code: 1,\n result,\n })\n } catch (err) {\n postMessage({\n code: -1,\n err,\n })\n }\n}\n\n"]),g=URL.createObjectURL(m);function v(t,e){return void 0===e&&(e=5e3),h(this,void 0,void 0,(function(){var n;return d(this,(function(r){return n=new Worker(g),[2,new Promise((function(r,i){var o=function(){clearTimeout(s),n.removeEventListener("message",a),n.terminate(),n=null},a=function(t){var e=t.data,n=e.code,a=e.result,s=e.err;o(),1===n?r(a):i(s)};n.postMessage({code:t}),n.addEventListener("message",a);var s=setTimeout((function(){o(),i("timeout")}),e)}))]}))}))}function y(t,n,r,i,o){return h(this,void 0,void 0,(function(){var r,o,a,s,l,c,u;return d(this,(function(h){switch(h.label){case 0:if(r=t,o=e.cloneDeep(n),a=o.use,s=o.data,!a)return[3,4];c=function(t){var n,o;return d(this,(function(a){switch(a.label){case 0:return s[t].use?(n=s[t].dependVars,o={},i&&o&&n&&n.length&&n.map((function(t){var n=e.cloneDeep(i).filter((function(e){var n=e.mapField==t;return n&&(o[t]=e.value),n}));n&&0!=n.length||(o[t]="")})),[4,b(s[t].code,r,o,s[t].mode?s[t].mode:"worker")]):[3,2];case 1:l=a.sent(),r=l.data,a.label=2;case 2:return[2]}}))},u=0,h.label=1;case 1:return u<s.length?[5,c(u)]:[3,4];case 2:h.sent(),h.label=3;case 3:return u++,[3,1];case 4:return[2,r]}}))}))}function b(t,e,n,r){return void 0===n&&(n={}),void 0===r&&(r="worker"),h(this,void 0,void 0,(function(){var i,o,a,s,l,c,u,h,p;return d(this,(function(d){switch(d.label){case 0:return d.trys.push([0,4,,5]),"window"!=r?[3,1]:(o=(i=[["data"],[e]])[0],a=i[1],"object"==typeof n&&Object.keys(n).forEach((function(t){o.push(t),a.push(n[t])})),s=new(Function.bind.apply(Function,f(f([void 0],o,!1),[t],!1))),[2,{success:!0,data:s.apply(void 0,a)}]);case 1:return u=(l=[e,n,""])[1],h=l[2],"object"==typeof(c=l[0])&&(c=JSON.stringify(e)),"object"==typeof n&&(u=JSON.stringify(n)),Object.keys(n).forEach((function(t){return h+="".concat(t,",")})),p="let data=eval(".concat(c,"); \n let app=").concat(JSON.stringify({}),";"),p+=h?"let {".concat(h,"} = eval(").concat(u,"); "):"",[4,v(p+="".concat(t))];case 2:return[2,{success:!0,data:d.sent()}];case 3:return[3,5];case 4:return[2,{success:!1,error:d.sent(),data:e}];case 5:return[2]}}))}))}var w="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function _(){throw new Error("setTimeout has not been defined")}function D(){throw new Error("clearTimeout has not been defined")}var S=_,x=D;function k(t){if(S===setTimeout)return setTimeout(t,0);if((S===_||!S)&&setTimeout)return S=setTimeout,setTimeout(t,0);try{return S(t,0)}catch(e){try{return S.call(null,t,0)}catch(e){return S.call(this,t,0)}}}"function"==typeof w.setTimeout&&(S=setTimeout),"function"==typeof w.clearTimeout&&(x=clearTimeout);var T,C=[],O=!1,A=-1;function E(){O&&T&&(O=!1,T.length?C=T.concat(C):A=-1,C.length&&M())}function M(){if(!O){var t=k(E);O=!0;for(var e=C.length;e;){for(T=C,C=[];++A<e;)T&&T[A].run();A=-1,e=C.length}T=null,O=!1,function(t){if(x===clearTimeout)return clearTimeout(t);if((x===D||!x)&&clearTimeout)return x=clearTimeout,clearTimeout(t);try{return x(t)}catch(e){try{return x.call(null,t)}catch(e){return x.call(this,t)}}}(t)}}function N(t,e){this.fun=t,this.array=e}N.prototype.run=function(){this.fun.apply(null,this.array)};function P(){}var V=P,R=P,B=P,I=P,F=P,j=P,L=P;var z=w.performance||{},Y=z.now||z.mozNow||z.msNow||z.oNow||z.webkitNow||function(){return(new Date).getTime()};var H=new Date;var U={nextTick:function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];C.push(new N(t,e)),1!==C.length||O||k(M)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:V,addListener:R,once:B,off:I,removeListener:F,removeAllListeners:j,emit:L,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var e=.001*Y.call(z),n=Math.floor(e),r=Math.floor(e%1*1e9);return t&&(n-=t[0],(r-=t[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-H)/1e3}},q="0123456789abcdefghijklmnopqrstuvwxyz";function G(t){return q.charAt(t)}function W(t,e){return t&e}function $(t,e){return t|e}function K(t,e){return t^e}function Z(t,e){return t&~e}function X(t){if(0==t)return-1;var e=0;return 65535&t||(t>>=16,e+=16),255&t||(t>>=8,e+=8),15&t||(t>>=4,e+=4),3&t||(t>>=2,e+=2),1&t||++e,e}function J(t){for(var e=0;0!=t;)t&=t-1,++e;return e}var Q,tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function et(t){var e,n,r="";for(e=0;e+3<=t.length;e+=3)n=parseInt(t.substring(e,e+3),16),r+=tt.charAt(n>>6)+tt.charAt(63&n);for(e+1==t.length?(n=parseInt(t.substring(e,e+1),16),r+=tt.charAt(n<<2)):e+2==t.length&&(n=parseInt(t.substring(e,e+2),16),r+=tt.charAt(n>>2)+tt.charAt((3&n)<<4));(3&r.length)>0;)r+="=";return r}function nt(t){var e,n="",r=0,i=0;for(e=0;e<t.length&&"="!=t.charAt(e);++e){var o=tt.indexOf(t.charAt(e));o<0||(0==r?(n+=G(o>>2),i=3&o,r=1):1==r?(n+=G(i<<2|o>>4),i=15&o,r=2):2==r?(n+=G(i),n+=G(o>>2),i=3&o,r=3):(n+=G(i<<2|o>>4),n+=G(15&o),r=0))}return 1==r&&(n+=G(i<<2)),n}var rt,it=function(t){var e;if(void 0===Q){var n="0123456789ABCDEF",r=" \f\n\r\t \u2028\u2029";for(Q={},e=0;e<16;++e)Q[n.charAt(e)]=e;for(n=n.toLowerCase(),e=10;e<16;++e)Q[n.charAt(e)]=e;for(e=0;e<8;++e)Q[r.charAt(e)]=-1}var i=[],o=0,a=0;for(e=0;e<t.length;++e){var s=t.charAt(e);if("="==s)break;if(-1!=(s=Q[s])){if(void 0===s)throw new Error("Illegal character at offset "+e);o|=s,++a>=2?(i[i.length]=o,o=0,a=0):o<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return i},ot={decode:function(t){var e;if(void 0===rt){var n="= \f\n\r\t \u2028\u2029";for(rt=Object.create(null),e=0;e<64;++e)rt["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(rt["-"]=62,rt._=63,e=0;e<9;++e)rt[n.charAt(e)]=-1}var r=[],i=0,o=0;for(e=0;e<t.length;++e){var a=t.charAt(e);if("="==a)break;if(-1!=(a=rt[a])){if(void 0===a)throw new Error("Illegal character at offset "+e);i|=a,++o>=4?(r[r.length]=i>>16,r[r.length]=i>>8&255,r[r.length]=255&i,i=0,o=0):i<<=6}}switch(o){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:r[r.length]=i>>10;break;case 3:r[r.length]=i>>16,r[r.length]=i>>8&255}return r},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=ot.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return ot.decode(t)}},at=1e13,st=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var n,r,i=this.buf,o=i.length;for(n=0;n<o;++n)(r=i[n]*t+e)<at?e=0:r-=(e=0|r/at)*at,i[n]=r;e>0&&(i[n]=e)},t.prototype.sub=function(t){var e,n,r=this.buf,i=r.length;for(e=0;e<i;++e)(n=r[e]-t)<0?(n+=at,t=1):t=0,r[e]=n;for(;0===r[r.length-1];)r.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,n=e[e.length-1].toString(),r=e.length-2;r>=0;--r)n+=(at+e[r]).toString().substring(1);return n},t.prototype.valueOf=function(){for(var t=this.buf,e=0,n=t.length-1;n>=0;--n)e=e*at+t[n];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),lt=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,ct=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function ut(t,e){return t.length>e&&(t=t.substring(0,e)+"…"),t}var ht,dt=function(){function t(e,n){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=n)}return t.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset ".concat(t," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,n){for(var r="",i=t;i<e;++i)if(r+=this.hexByte(this.get(i)),!0!==n)switch(15&i){case 7:r+=" ";break;case 15:r+="\n";break;default:r+=" "}return r},t.prototype.isASCII=function(t,e){for(var n=t;n<e;++n){var r=this.get(n);if(r<32||r>176)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var n="",r=t;r<e;++r)n+=String.fromCharCode(this.get(r));return n},t.prototype.parseStringUTF=function(t,e){for(var n="",r=t;r<e;){var i=this.get(r++);n+=i<128?String.fromCharCode(i):i>191&&i<224?String.fromCharCode((31&i)<<6|63&this.get(r++)):String.fromCharCode((15&i)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return n},t.prototype.parseStringBMP=function(t,e){for(var n,r,i="",o=t;o<e;)n=this.get(o++),r=this.get(o++),i+=String.fromCharCode(n<<8|r);return i},t.prototype.parseTime=function(t,e,n){var r=this.parseStringISO(t,e),i=(n?lt:ct).exec(r);return i?(n&&(i[1]=+i[1],i[1]+=+i[1]<70?2e3:1900),r=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(r+=":"+i[5],i[6]&&(r+=":"+i[6],i[7]&&(r+="."+i[7]))),i[8]&&(r+=" UTC","Z"!=i[8]&&(r+=i[8],i[9]&&(r+=":"+i[9]))),r):"Unrecognized time: "+r},t.prototype.parseInteger=function(t,e){for(var n,r=this.get(t),i=r>127,o=i?255:0,a="";r==o&&++t<e;)r=this.get(t);if(0===(n=e-t))return i?-1:0;if(n>4){for(a=r,n<<=3;!(128&(+a^o));)a=+a<<1,--n;a="("+n+" bit)\n"}i&&(r-=256);for(var s=new st(r),l=t+1;l<e;++l)s.mulAdd(256,this.get(l));return a+s.toString()},t.prototype.parseBitString=function(t,e,n){for(var r=this.get(t),i="("+((e-t-1<<3)-r)+" bit)\n",o="",a=t+1;a<e;++a){for(var s=this.get(a),l=a==e-1?r:0,c=7;c>=l;--c)o+=s>>c&1?"1":"0";if(o.length>n)return i+ut(o,n)}return i+o},t.prototype.parseOctetString=function(t,e,n){if(this.isASCII(t,e))return ut(this.parseStringISO(t,e),n);var r=e-t,i="("+r+" byte)\n";r>(n/=2)&&(e=t+n);for(var o=t;o<e;++o)i+=this.hexByte(this.get(o));return r>n&&(i+="…"),i},t.prototype.parseOID=function(t,e,n){for(var r="",i=new st,o=0,a=t;a<e;++a){var s=this.get(a);if(i.mulAdd(128,127&s),o+=7,!(128&s)){if(""===r)if((i=i.simplify())instanceof st)i.sub(80),r="2."+i.toString();else{var l=i<80?i<40?0:1:2;r=l+"."+(i-40*l)}else r+="."+i.toString();if(r.length>n)return ut(r,n);i=new st,o=0}}return o>0&&(r+=".incomplete"),r},t}(),ft=function(){function t(t,e,n,r,i){if(!(r instanceof pt))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=n,this.tag=r,this.sub=i}return t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},t.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+n,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);case 6:return this.stream.parseOID(e,e+n,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return ut(this.stream.parseStringUTF(e,e+n),t);case 18:case 19:case 20:case 21:case 22:case 26:return ut(this.stream.parseStringISO(e,e+n),t);case 30:return ut(this.stream.parseStringBMP(e,e+n),t);case 23:case 24:return this.stream.parseTime(e,e+n,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var n=0,r=this.sub.length;n<r;++n)e+=this.sub[n].toPrettyString(t)}return e},t.prototype.posStart=function(){return this.stream.pos},t.prototype.posContent=function(){return this.stream.pos+this.header},t.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},t.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},t.decodeLength=function(t){var e=t.get(),n=127&e;if(n==e)return n;if(n>6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===n)return null;e=0;for(var r=0;r<n;++r)e=256*e+t.get();return e},t.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,n=2*this.length;return t.substr(e,n)},t.decode=function(e){var n;n=e instanceof dt?e:new dt(e,0);var r=new dt(n),i=new pt(n),o=t.decodeLength(n),a=n.pos,s=a-r.pos,l=null,c=function(){var e=[];if(null!==o){for(var r=a+o;n.pos<r;)e[e.length]=t.decode(n);if(n.pos!=r)throw new Error("Content size is not correct for container starting at offset "+a)}else try{for(;;){var i=t.decode(n);if(i.tag.isEOC())break;e[e.length]=i}o=a-n.pos}catch(t){throw new Error("Exception while decoding undefined length content: "+t)}return e};if(i.tagConstructed)l=c();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=n.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");l=c();for(var u=0;u<l.length;++u)if(l[u].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(t){l=null}if(null===l){if(null===o)throw new Error("We can't skip over an invalid tag with undefined length at offset "+a);n.pos=a+Math.abs(o)}return new t(r,s,o,i,l)},t}(),pt=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=!!(32&e),this.tagNumber=31&e,31==this.tagNumber){var n=new st;do{e=t.get(),n.mulAdd(128,127&e)}while(128&e);this.tagNumber=n.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),mt=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],gt=(1<<26)/mt[mt.length-1],vt=function(){function t(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return t.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,r=(1<<e)-1,i=!1,o="",a=this.t,s=this.DB-a*this.DB%e;if(a-- >0)for(s<this.DB&&(n=this[a]>>s)>0&&(i=!0,o=G(n));a>=0;)s<e?(n=(this[a]&(1<<s)-1)<<e-s,n|=this[--a]>>(s+=this.DB-e)):(n=this[a]>>(s-=e)&r,s<=0&&(s+=this.DB,--a)),n>0&&(i=!0),i&&(o+=G(n));return i?o:"0"},t.prototype.negate=function(){var e=Dt();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return this.s<0?this.negate():this},t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0},t.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+Et(this[this.t-1]^this.s&this.DM)},t.prototype.mod=function(e){var n=Dt();return this.abs().divRemTo(e,null,n),this.s<0&&n.compareTo(t.ZERO)>0&&e.subTo(n,n),n},t.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new bt(e):new wt(e),this.exp(t,n)},t.prototype.clone=function(){var t=Dt();return this.copyTo(t),t},t.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},t.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},t.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},t.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var n,r=this.DB-t*this.DB%8,i=0;if(t-- >0)for(r<this.DB&&(n=this[t]>>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<<this.DB-r);t>=0;)r<8?(n=(this[t]&(1<<r)-1)<<8-r,n|=this[--t]>>(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),128&n&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(e[i++]=n);return e},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.min=function(t){return this.compareTo(t)<0?this:t},t.prototype.max=function(t){return this.compareTo(t)>0?this:t},t.prototype.and=function(t){var e=Dt();return this.bitwiseTo(t,W,e),e},t.prototype.or=function(t){var e=Dt();return this.bitwiseTo(t,$,e),e},t.prototype.xor=function(t){var e=Dt();return this.bitwiseTo(t,K,e),e},t.prototype.andNot=function(t){var e=Dt();return this.bitwiseTo(t,Z,e),e},t.prototype.not=function(){for(var t=Dt(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},t.prototype.shiftLeft=function(t){var e=Dt();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},t.prototype.shiftRight=function(t){var e=Dt();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},t.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+X(this[t]);return this.s<0?this.t*this.DB:-1},t.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;n<this.t;++n)t+=J(this[n]^e);return t},t.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:!!(this[e]&1<<t%this.DB)},t.prototype.setBit=function(t){return this.changeBit(t,$)},t.prototype.clearBit=function(t){return this.changeBit(t,Z)},t.prototype.flipBit=function(t){return this.changeBit(t,K)},t.prototype.add=function(t){var e=Dt();return this.addTo(t,e),e},t.prototype.subtract=function(t){var e=Dt();return this.subTo(t,e),e},t.prototype.multiply=function(t){var e=Dt();return this.multiplyTo(t,e),e},t.prototype.divide=function(t){var e=Dt();return this.divRemTo(t,e,null),e},t.prototype.remainder=function(t){var e=Dt();return this.divRemTo(t,null,e),e},t.prototype.divideAndRemainder=function(t){var e=Dt(),n=Dt();return this.divRemTo(t,e,n),[e,n]},t.prototype.modPow=function(t,e){var n,r,i=t.bitLength(),o=At(1);if(i<=0)return o;n=i<18?1:i<48?3:i<144?4:i<768?5:6,r=i<8?new bt(e):e.isEven()?new _t(e):new wt(e);var a=[],s=3,l=n-1,c=(1<<n)-1;if(a[1]=r.convert(this),n>1){var u=Dt();for(r.sqrTo(a[1],u);s<=c;)a[s]=Dt(),r.mulTo(u,a[s-2],a[s]),s+=2}var h,d,f=t.t-1,p=!0,m=Dt();for(i=Et(t[f])-1;f>=0;){for(i>=l?h=t[f]>>i-l&c:(h=(t[f]&(1<<i+1)-1)<<l-i,f>0&&(h|=t[f-1]>>this.DB+i-l)),s=n;!(1&h);)h>>=1,--s;if((i-=s)<0&&(i+=this.DB,--f),p)a[h].copyTo(o),p=!1;else{for(;s>1;)r.sqrTo(o,m),r.sqrTo(m,o),s-=2;s>0?r.sqrTo(o,m):(d=o,o=m,m=d),r.mulTo(m,a[h],o)}for(;f>=0&&!(t[f]&1<<i);)r.sqrTo(o,m),d=o,o=m,m=d,--i<0&&(i=this.DB-1,--f)}return r.revert(o)},t.prototype.modInverse=function(e){var n=e.isEven();if(this.isEven()&&n||0==e.signum())return t.ZERO;for(var r=e.clone(),i=this.clone(),o=At(1),a=At(0),s=At(0),l=At(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),n?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(e,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),n?(s.isEven()&&l.isEven()||(s.addTo(this,s),l.subTo(e,l)),s.rShiftTo(1,s)):l.isEven()||l.subTo(e,l),l.rShiftTo(1,l);r.compareTo(i)>=0?(r.subTo(i,r),n&&o.subTo(s,o),a.subTo(l,a)):(i.subTo(r,i),n&&s.subTo(o,s),l.subTo(a,l))}return 0!=i.compareTo(t.ONE)?t.ZERO:l.compareTo(e)>=0?l.subtract(e):l.signum()<0?(l.addTo(e,l),l.signum()<0?l.add(e):l):l},t.prototype.pow=function(t){return this.exp(t,new yt)},t.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var r=e;e=n,n=r}var i=e.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return e;for(i<o&&(o=i),o>0&&(e.rShiftTo(o,e),n.rShiftTo(o,n));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},t.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=mt[mt.length-1]){for(e=0;e<mt.length;++e)if(n[0]==mt[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<mt.length;){for(var r=mt[e],i=e+1;i<mt.length&&r<gt;)r*=mt[i++];for(r=n.modInt(r);e<i;)if(r%mt[e++]==0)return!1}return n.millerRabin(t)},t.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},t.prototype.fromString=function(e,n){var r;if(16==n)r=4;else if(8==n)r=3;else if(256==n)r=8;else if(2==n)r=1;else if(32==n)r=5;else{if(4!=n)return void this.fromRadix(e,n);r=2}this.t=0,this.s=0;for(var i=e.length,o=!1,a=0;--i>=0;){var s=8==r?255&+e[i]:Ot(e,i);s<0?"-"==e.charAt(i)&&(o=!0):(o=!1,0==a?this[this.t++]=s:a+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,(a+=r)>=this.DB&&(a-=this.DB))}8==r&&128&+e[0]&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),o&&t.ZERO.subTo(this,this)},t.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},t.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s},t.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},t.prototype.lShiftTo=function(t,e){for(var n=t%this.DB,r=this.DB-n,i=(1<<r)-1,o=Math.floor(t/this.DB),a=this.s<<n&this.DM,s=this.t-1;s>=0;--s)e[s+o+1]=this[s]>>r|a,a=(this[s]&i)<<n;for(s=o-1;s>=0;--s)e[s]=0;e[o]=a,e.t=this.t+o+1,e.s=this.s,e.clamp()},t.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var r=t%this.DB,i=this.DB-r,o=(1<<r)-1;e[0]=this[n]>>r;for(var a=n+1;a<this.t;++a)e[a-n-1]|=(this[a]&o)<<i,e[a-n]=this[a]>>r;r>0&&(e[this.t-n-1]|=(this.s&o)<<i),e.t=this.t-n,e.clamp()}},t.prototype.subTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()},t.prototype.multiplyTo=function(e,n){var r=this.abs(),i=e.abs(),o=r.t;for(n.t=o+i.t;--o>=0;)n[o]=0;for(o=0;o<i.t;++o)n[o+r.t]=r.am(0,i[o],n,o,0,r.t);n.s=0,n.clamp(),this.s!=e.s&&t.ZERO.subTo(n,n)},t.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;--n>=0;)t[n]=0;for(n=0;n<e.t-1;++n){var r=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,r,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},t.prototype.divRemTo=function(e,n,r){var i=e.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t)return null!=n&&n.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=Dt());var a=Dt(),s=this.s,l=e.s,c=this.DB-Et(i[i.t-1]);c>0?(i.lShiftTo(c,a),o.lShiftTo(c,r)):(i.copyTo(a),o.copyTo(r));var u=a.t,h=a[u-1];if(0!=h){var d=h*(1<<this.F1)+(u>1?a[u-2]>>this.F2:0),f=this.FV/d,p=(1<<this.F1)/d,m=1<<this.F2,g=r.t,v=g-u,y=null==n?Dt():n;for(a.dlShiftTo(v,y),r.compareTo(y)>=0&&(r[r.t++]=1,r.subTo(y,r)),t.ONE.dlShiftTo(u,y),y.subTo(a,a);a.t<u;)a[a.t++]=0;for(;--v>=0;){var b=r[--g]==h?this.DM:Math.floor(r[g]*f+(r[g-1]+m)*p);if((r[g]+=a.am(0,b,r,v,0,u))<b)for(a.dlShiftTo(v,y),r.subTo(y,r);r[g]<--b;)r.subTo(y,r)}null!=n&&(r.drShiftTo(u,n),s!=l&&t.ZERO.subTo(n,n)),r.t=u,r.clamp(),c>0&&r.rShiftTo(c,r),s<0&&t.ZERO.subTo(r,r)}}},t.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(!(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},t.prototype.exp=function(e,n){if(e>4294967295||e<1)return t.ONE;var r=Dt(),i=Dt(),o=n.convert(this),a=Et(e)-1;for(o.copyTo(r);--a>=0;)if(n.sqrTo(r,i),(e&1<<a)>0)n.mulTo(i,o,r);else{var s=r;r=i,i=s}return n.revert(r)},t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},t.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),r=At(n),i=Dt(),o=Dt(),a="";for(this.divRemTo(r,i,o);i.signum()>0;)a=(n+o.intValue()).toString(t).substr(1)+a,i.divRemTo(r,i,o);return o.intValue().toString(t)+a},t.prototype.fromRadix=function(e,n){this.fromInt(0),null==n&&(n=10);for(var r=this.chunkSize(n),i=Math.pow(n,r),o=!1,a=0,s=0,l=0;l<e.length;++l){var c=Ot(e,l);c<0?"-"==e.charAt(l)&&0==this.signum()&&(o=!0):(s=n*s+c,++a>=r&&(this.dMultiply(i),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(n,a)),this.dAddOffset(s,0)),o&&t.ZERO.subTo(this,this)},t.prototype.fromNumber=function(e,n,r){if("number"==typeof n)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),$,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(t.ONE.shiftLeft(e-1),this);else{var i=[],o=7&e;i.length=1+(e>>3),n.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},t.prototype.bitwiseTo=function(t,e,n){var r,i,o=Math.min(t.t,this.t);for(r=0;r<o;++r)n[r]=e(this[r],t[r]);if(t.t<this.t){for(i=t.s&this.DM,r=o;r<this.t;++r)n[r]=e(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=o;r<t.t;++r)n[r]=e(i,t[r]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},t.prototype.changeBit=function(e,n){var r=t.ONE.shiftLeft(e);return this.bitwiseTo(r,n,r),r},t.prototype.addTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]+t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r+=t[n],e[n++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[n++]=r:r<-1&&(e[n++]=this.DV+r),e.t=n,e.clamp()},t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},t.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},t.prototype.multiplyLowerTo=function(t,e,n){var r=Math.min(this.t+t.t,e);for(n.s=0,n.t=r;r>0;)n[--r]=0;for(var i=n.t-this.t;r<i;++r)n[r+this.t]=this.am(0,t[r],n,r,0,this.t);for(i=Math.min(t.t,e);r<i;++r)this.am(0,t[r],n,r,0,e-r);n.clamp()},t.prototype.multiplyUpperTo=function(t,e,n){--e;var r=n.t=this.t+t.t-e;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)n[this.t+r-e]=this.am(e-r,t[r],n,0,0,this.t+r-e);n.clamp(),n.drShiftTo(1,n)},t.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(this.t>0)if(0==e)n=this[0]%t;else for(var r=this.t-1;r>=0;--r)n=(e*n+this[r])%t;return n},t.prototype.millerRabin=function(e){var n=this.subtract(t.ONE),r=n.getLowestSetBit();if(r<=0)return!1;var i=n.shiftRight(r);(e=e+1>>1)>mt.length&&(e=mt.length);for(var o=Dt(),a=0;a<e;++a){o.fromInt(mt[Math.floor(Math.random()*mt.length)]);var s=o.modPow(i,this);if(0!=s.compareTo(t.ONE)&&0!=s.compareTo(n)){for(var l=1;l++<r&&0!=s.compareTo(n);)if(0==(s=s.modPowInt(2,this)).compareTo(t.ONE))return!1;if(0!=s.compareTo(n))return!1}}return!0},t.prototype.square=function(){var t=Dt();return this.squareTo(t),t},t.prototype.gcda=function(t,e){var n=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(n.compareTo(r)<0){var i=n;n=r,r=i}var o=n.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)e(n);else{o<a&&(a=o),a>0&&(n.rShiftTo(a,n),r.rShiftTo(a,r));var s=function(){(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),n.compareTo(r)>=0?(n.subTo(r,n),n.rShiftTo(1,n)):(r.subTo(n,r),r.rShiftTo(1,r)),n.signum()>0?setTimeout(s,0):(a>0&&r.lShiftTo(a,r),setTimeout((function(){e(r)}),0))};setTimeout(s,10)}},t.prototype.fromNumberAsync=function(e,n,r,i){if("number"==typeof n)if(e<2)this.fromInt(1);else{this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),$,this),this.isEven()&&this.dAddOffset(1,0);var o=this,a=function(){o.dAddOffset(2,0),o.bitLength()>e&&o.subTo(t.ONE.shiftLeft(e-1),o),o.isProbablePrime(n)?setTimeout((function(){i()}),0):setTimeout(a,0)};setTimeout(a,0)}else{var s=[],l=7&e;s.length=1+(e>>3),n.nextBytes(s),l>0?s[0]&=(1<<l)-1:s[0]=0,this.fromString(s,256)}},t}(),yt=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),bt=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),wt=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return t.prototype.convert=function(t){var e=Dt();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(vt.ZERO)>0&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=Dt();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var n=32767&t[e],r=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),_t=function(){function t(t){this.m=t,this.r2=Dt(),this.q3=Dt(),vt.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=Dt();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function Dt(){return new vt(null)}function St(t,e){return new vt(t,e)}var xt="undefined"!=typeof navigator;xt&&"Microsoft Internet Explorer"==navigator.appName?(vt.prototype.am=function(t,e,n,r,i,o){for(var a=32767&e,s=e>>15;--o>=0;){var l=32767&this[t],c=this[t++]>>15,u=s*l+c*a;i=((l=a*l+((32767&u)<<15)+n[r]+(1073741823&i))>>>30)+(u>>>15)+s*c+(i>>>30),n[r++]=1073741823&l}return i},ht=30):xt&&"Netscape"!=navigator.appName?(vt.prototype.am=function(t,e,n,r,i,o){for(;--o>=0;){var a=e*this[t++]+n[r]+i;i=Math.floor(a/67108864),n[r++]=67108863&a}return i},ht=26):(vt.prototype.am=function(t,e,n,r,i,o){for(var a=16383&e,s=e>>14;--o>=0;){var l=16383&this[t],c=this[t++]>>14,u=s*l+c*a;i=((l=a*l+((16383&u)<<14)+n[r]+i)>>28)+(u>>14)+s*c,n[r++]=268435455&l}return i},ht=28),vt.prototype.DB=ht,vt.prototype.DM=(1<<ht)-1,vt.prototype.DV=1<<ht;vt.prototype.FV=Math.pow(2,52),vt.prototype.F1=52-ht,vt.prototype.F2=2*ht-52;var kt,Tt,Ct=[];for(kt="0".charCodeAt(0),Tt=0;Tt<=9;++Tt)Ct[kt++]=Tt;for(kt="a".charCodeAt(0),Tt=10;Tt<36;++Tt)Ct[kt++]=Tt;for(kt="A".charCodeAt(0),Tt=10;Tt<36;++Tt)Ct[kt++]=Tt;function Ot(t,e){var n=Ct[t.charCodeAt(e)];return null==n?-1:n}function At(t){var e=Dt();return e.fromInt(t),e}function Et(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}vt.ZERO=At(0),vt.ONE=At(1);var Mt=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,n,r;for(e=0;e<256;++e)this.S[e]=e;for(n=0,e=0;e<256;++e)n=n+this.S[e]+t[e%t.length]&255,r=this.S[e],this.S[e]=this.S[n],this.S[n]=r;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}();var Nt,Pt,Vt=null;if(null==Vt){Vt=[],Pt=0;var Rt=void 0;if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues){var Bt=new Uint32Array(256);for(window.crypto.getRandomValues(Bt),Rt=0;Rt<Bt.length;++Rt)Vt[Pt++]=255&Bt[Rt]}var It=0,Ft=function(t){if((It=It||0)>=256||Pt>=256)window.removeEventListener?window.removeEventListener("mousemove",Ft,!1):window.detachEvent&&window.detachEvent("onmousemove",Ft);else try{var e=t.x+t.y;Vt[Pt++]=255&e,It+=1}catch(t){}};"undefined"!=typeof window&&(window.addEventListener?window.addEventListener("mousemove",Ft,!1):window.attachEvent&&window.attachEvent("onmousemove",Ft))}function jt(){if(null==Nt){for(Nt=new Mt;Pt<256;){var t=Math.floor(65536*Math.random());Vt[Pt++]=255&t}for(Nt.init(Vt),Pt=0;Pt<Vt.length;++Pt)Vt[Pt]=0;Pt=0}return Nt.next()}var Lt=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=jt()},t}();var zt=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),n=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(n)<0;)e=e.add(this.p);return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=St(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t){var e=this.n.bitLength()+7>>3,n=function(t,e){if(e<t.length+11)return console.error("Message too long for RSA"),null;for(var n=[],r=t.length-1;r>=0&&e>0;){var i=t.charCodeAt(r--);i<128?n[--e]=i:i>127&&i<2048?(n[--e]=63&i|128,n[--e]=i>>6|192):(n[--e]=63&i|128,n[--e]=i>>6&63|128,n[--e]=i>>12|224)}n[--e]=0;for(var o=new Lt,a=[];e>2;){for(a[0]=0;0==a[0];)o.nextBytes(a);n[--e]=a[0]}return n[--e]=2,n[--e]=0,new vt(n)}(t,e);if(null==n)return null;var r=this.doPublic(n);if(null==r)return null;for(var i=r.toString(16),o=i.length,a=0;a<2*e-o;a++)i="0"+i;return i},t.prototype.setPrivate=function(t,e,n){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=St(t,16),this.e=parseInt(e,16),this.d=St(n,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,n,r,i,o,a,s){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=St(t,16),this.e=parseInt(e,16),this.d=St(n,16),this.p=St(r,16),this.q=St(i,16),this.dmp1=St(o,16),this.dmq1=St(a,16),this.coeff=St(s,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var n=new Lt,r=t>>1;this.e=parseInt(e,16);for(var i=new vt(e,16);;){for(;this.p=new vt(t-r,1,n),0!=this.p.subtract(vt.ONE).gcd(i).compareTo(vt.ONE)||!this.p.isProbablePrime(10););for(;this.q=new vt(r,1,n),0!=this.q.subtract(vt.ONE).gcd(i).compareTo(vt.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var a=this.p.subtract(vt.ONE),s=this.q.subtract(vt.ONE),l=a.multiply(s);if(0==l.gcd(i).compareTo(vt.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(l),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=St(t,16),n=this.doPrivate(e);return null==n?null:function(t,e){var n=t.toByteArray(),r=0;for(;r<n.length&&0==n[r];)++r;if(n.length-r!=e-1||2!=n[r])return null;++r;for(;0!=n[r];)if(++r>=n.length)return null;var i="";for(;++r<n.length;){var o=255&n[r];o<128?i+=String.fromCharCode(o):o>191&&o<224?(i+=String.fromCharCode((31&o)<<6|63&n[r+1]),++r):(i+=String.fromCharCode((15&o)<<12|(63&n[r+1])<<6|63&n[r+2]),r+=2)}return i}(n,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,n){var r=new Lt,i=t>>1;this.e=parseInt(e,16);var o=new vt(e,16),a=this,s=function(){var e=function(){if(a.p.compareTo(a.q)<=0){var t=a.p;a.p=a.q,a.q=t}var e=a.p.subtract(vt.ONE),r=a.q.subtract(vt.ONE),i=e.multiply(r);0==i.gcd(o).compareTo(vt.ONE)?(a.n=a.p.multiply(a.q),a.d=o.modInverse(i),a.dmp1=a.d.mod(e),a.dmq1=a.d.mod(r),a.coeff=a.q.modInverse(a.p),setTimeout((function(){n()}),0)):setTimeout(s,0)},l=function(){a.q=Dt(),a.q.fromNumberAsync(i,1,r,(function(){a.q.subtract(vt.ONE).gcda(o,(function(t){0==t.compareTo(vt.ONE)&&a.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(l,0)}))}))},c=function(){a.p=Dt(),a.p.fromNumberAsync(t-i,1,r,(function(){a.p.subtract(vt.ONE).gcda(o,(function(t){0==t.compareTo(vt.ONE)&&a.p.isProbablePrime(10)?setTimeout(l,0):setTimeout(c,0)}))}))};setTimeout(c,0)};setTimeout(s,0)},t.prototype.sign=function(t,e,n){var r=function(t,e){if(e<t.length+22)return console.error("Message too long for RSA"),null;for(var n=e-t.length-6,r="",i=0;i<n;i+=2)r+="ff";return St("0001"+r+"00"+t,16)}((Yt[n]||"")+e(t).toString(),this.n.bitLength()/4);if(null==r)return null;var i=this.doPrivate(r);if(null==i)return null;var o=i.toString(16);return 1&o.length?"0"+o:o},t.prototype.verify=function(t,e,n){var r=St(e,16),i=this.doPublic(r);return null==i?null:function(t){for(var e in Yt)if(Yt.hasOwnProperty(e)){var n=Yt[e],r=n.length;if(t.substr(0,r)==n)return t.substr(r)}return t}
|
|
4
4
|
/*!
|
|
5
5
|
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
|
|
6
6
|
Code licensed under the BSD License:
|
|
7
7
|
http://developer.yahoo.com/yui/license.html
|
|
8
8
|
version: 2.9.0
|
|
9
|
-
*/var
|
|
9
|
+
*/(i.toString(16).replace(/^1f+00/,""))==n(t).toString()},t}();var Yt={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};var Ht={};Ht.lang={extend:function(t,e,n){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var r=function(){};if(r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t,t.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),n){var i;for(i in n)t.prototype[i]=n[i];var o=function(){},a=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(o=function(t,e){for(i=0;i<a.length;i+=1){var n=a[i],r=e[n];"function"==typeof r&&r!=Object.prototype[n]&&(t[n]=r)}})}catch(t){}o(t.prototype,n)}}};
|
|
10
10
|
/**
|
|
11
11
|
* @fileOverview
|
|
12
12
|
* @name asn1-1.0.js
|
|
@@ -15,7 +15,7 @@ n.version="2.30.1",i(Yr),n.fn=lo,n.min=Zr,n.max=Qr,n.now=en,n.utc=p,n.unix=co,n.
|
|
|
15
15
|
* @since jsrsasign 2.1
|
|
16
16
|
* @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
|
|
17
17
|
*/
|
|
18
|
-
var KJUR={};void 0!==KJUR.asn1&&KJUR.asn1||(KJUR.asn1={}),KJUR.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(e){var t=e.toString(16);if("-"!=t.substr(0,1))t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var r=t.substr(1).length;r%2==1?r+=1:t.match(/^[0-7]/)||(r+=2);for(var n="",i=0;i<r;i++)n+="f";t=new BigInteger(n,16).xor(e).add(BigInteger.ONE).toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(e,t){return hextopem(e,t)},this.newObject=function(e){var t=KJUR.asn1,r=t.DERBoolean,n=t.DERInteger,i=t.DERBitString,o=t.DEROctetString,a=t.DERNull,s=t.DERObjectIdentifier,l=t.DEREnumerated,c=t.DERUTF8String,u=t.DERNumericString,h=t.DERPrintableString,d=t.DERTeletexString,f=t.DERIA5String,p=t.DERUTCTime,m=t.DERGeneralizedTime,g=t.DERSequence,v=t.DERSet,y=t.DERTaggedObject,_=t.ASN1Util.newObject,b=Object.keys(e);if(1!=b.length)throw"key of param shall be only one.";var w=b[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+w+":"))throw"undefined key: "+w;if("bool"==w)return new r(e[w]);if("int"==w)return new n(e[w]);if("bitstr"==w)return new i(e[w]);if("octstr"==w)return new o(e[w]);if("null"==w)return new a(e[w]);if("oid"==w)return new s(e[w]);if("enum"==w)return new l(e[w]);if("utf8str"==w)return new c(e[w]);if("numstr"==w)return new u(e[w]);if("prnstr"==w)return new h(e[w]);if("telstr"==w)return new d(e[w]);if("ia5str"==w)return new f(e[w]);if("utctime"==w)return new p(e[w]);if("gentime"==w)return new m(e[w]);if("seq"==w){for(var D=e[w],x=[],S=0;S<D.length;S++){var k=_(D[S]);x.push(k)}return new g({array:x})}if("set"==w){for(D=e[w],x=[],S=0;S<D.length;S++){k=_(D[S]);x.push(k)}return new v({array:x})}if("tag"==w){var T=e[w];if("[object Array]"===Object.prototype.toString.call(T)&&3==T.length){var P=_(T[2]);return new y({tag:T[0],explicit:T[1],obj:P})}var E={};if(void 0!==T.explicit&&(E.explicit=T.explicit),void 0!==T.tag&&(E.tag=T.tag),void 0===T.obj)throw"obj shall be specified for 'tag'.";return E.obj=_(T.obj),new y(E)}},this.jsonToASN1HEX=function(e){return this.newObject(e).getEncodedHex()}},KJUR.asn1.ASN1Util.oidHexToInt=function(e){for(var t="",r=parseInt(e.substr(0,2),16),n=(t=Math.floor(r/40)+"."+r%40,""),i=2;i<e.length;i+=2){var o=("00000000"+parseInt(e.substr(i,2),16).toString(2)).slice(-8);if(n+=o.substr(1,7),"0"==o.substr(0,1))t=t+"."+new BigInteger(n,2).toString(10),n=""}return t},KJUR.asn1.ASN1Util.oidIntToHex=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},r=function(e){var r="",n=new BigInteger(e,10).toString(2),i=7-n.length%7;7==i&&(i=0);for(var o="",a=0;a<i;a++)o+="0";n=o+n;for(a=0;a<n.length-1;a+=7){var s=n.substr(a,7);a!=n.length-7&&(s="1"+s),r+=t(parseInt(s,2))}return r};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var n="",i=e.split("."),o=40*parseInt(i[0])+parseInt(i[1]);n+=t(o),i.splice(0,2);for(var a=0;a<i.length;a++)n+=r(i[a]);return n},KJUR.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n=0,v="+this.hV;var e=this.hV.length/2,t=e.toString(16);if(t.length%2==1&&(t="0"+t),e<128)return t;var r=t.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);return(128+r).toString(16)+t},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},KJUR.asn1.DERAbstractString=function(e){KJUR.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(this.s)},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?this.setString(e):void 0!==e.str?this.setString(e.str):void 0!==e.hex&&this.setStringHex(e.hex))},YAHOO.lang.extend(KJUR.asn1.DERAbstractString,KJUR.asn1.ASN1Object),KJUR.asn1.DERAbstractTime=function(e){KJUR.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){return utc=e.getTime()+6e4*e.getTimezoneOffset(),new Date(utc)},this.formatDate=function(e,t,r){var n=this.zeroPadding,i=this.localDateToUTC(e),o=String(i.getFullYear());"utc"==t&&(o=o.substr(2,2));var a=o+n(String(i.getMonth()+1),2)+n(String(i.getDate()),2)+n(String(i.getHours()),2)+n(String(i.getMinutes()),2)+n(String(i.getSeconds()),2);if(!0===r){var s=i.getMilliseconds();if(0!=s){var l=n(String(s),3);a=a+"."+(l=l.replace(/[0]+$/,""))}}return a+"Z"},this.zeroPadding=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(e)},this.setByDateValue=function(e,t,r,n,i,o){var a=new Date(Date.UTC(e,t-1,r,n,i,o,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},YAHOO.lang.extend(KJUR.asn1.DERAbstractTime,KJUR.asn1.ASN1Object),KJUR.asn1.DERAbstractStructured=function(e){KJUR.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=new Array,void 0!==e&&void 0!==e.array&&(this.asn1Array=e.array)},YAHOO.lang.extend(KJUR.asn1.DERAbstractStructured,KJUR.asn1.ASN1Object),KJUR.asn1.DERBoolean=function(){KJUR.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},YAHOO.lang.extend(KJUR.asn1.DERBoolean,KJUR.asn1.ASN1Object),KJUR.asn1.DERInteger=function(e){KJUR.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new BigInteger(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.bigint?this.setByBigInteger(e.bigint):void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},YAHOO.lang.extend(KJUR.asn1.DERInteger,KJUR.asn1.ASN1Object),KJUR.asn1.DERBitString=function(e){if(void 0!==e&&void 0!==e.obj){var t=KJUR.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.getEncodedHex()}KJUR.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7<e)throw"unused bits shall be from 0 to 7: u = "+e;var r="0"+e;this.hTLV=null,this.isModified=!0,this.hV=r+t},this.setByBinaryString=function(e){var t=8-(e=e.replace(/0+$/,"")).length%8;8==t&&(t=0);for(var r=0;r<=t;r++)e+="0";var n="";for(r=0;r<e.length-1;r+=8){var i=e.substr(r,8),o=parseInt(i,2).toString(16);1==o.length&&(o="0"+o),n+=o}this.hTLV=null,this.isModified=!0,this.hV="0"+t+n},this.setByBooleanArray=function(e){for(var t="",r=0;r<e.length;r++)1==e[r]?t+="1":t+="0";this.setByBinaryString(t)},this.newFalseArray=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=!1;return t},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e&&e.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(e):void 0!==e.hex?this.setHexValueIncludingUnusedBits(e.hex):void 0!==e.bin?this.setByBinaryString(e.bin):void 0!==e.array&&this.setByBooleanArray(e.array))},YAHOO.lang.extend(KJUR.asn1.DERBitString,KJUR.asn1.ASN1Object),KJUR.asn1.DEROctetString=function(e){if(void 0!==e&&void 0!==e.obj){var t=KJUR.asn1.ASN1Util.newObject(e.obj);e.hex=t.getEncodedHex()}KJUR.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"},YAHOO.lang.extend(KJUR.asn1.DEROctetString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERNull=function(){KJUR.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},YAHOO.lang.extend(KJUR.asn1.DERNull,KJUR.asn1.ASN1Object),KJUR.asn1.DERObjectIdentifier=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},r=function(e){var r="",n=new BigInteger(e,10).toString(2),i=7-n.length%7;7==i&&(i=0);for(var o="",a=0;a<i;a++)o+="0";n=o+n;for(a=0;a<n.length-1;a+=7){var s=n.substr(a,7);a!=n.length-7&&(s="1"+s),r+=t(parseInt(s,2))}return r};KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueOidString=function(e){if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var n="",i=e.split("."),o=40*parseInt(i[0])+parseInt(i[1]);n+=t(o),i.splice(0,2);for(var a=0;a<i.length;a++)n+=r(i[a]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=n},this.setValueName=function(e){var t=KJUR.asn1.x509.OID.name2oid(e);if(""===t)throw"DERObjectIdentifier oidName undefined: "+e;this.setValueOidString(t)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?e.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(e):this.setValueName(e):void 0!==e.oid?this.setValueOidString(e.oid):void 0!==e.hex?this.setValueHex(e.hex):void 0!==e.name&&this.setValueName(e.name))},YAHOO.lang.extend(KJUR.asn1.DERObjectIdentifier,KJUR.asn1.ASN1Object),KJUR.asn1.DEREnumerated=function(e){KJUR.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new BigInteger(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},YAHOO.lang.extend(KJUR.asn1.DEREnumerated,KJUR.asn1.ASN1Object),KJUR.asn1.DERUTF8String=function(e){KJUR.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"},YAHOO.lang.extend(KJUR.asn1.DERUTF8String,KJUR.asn1.DERAbstractString),KJUR.asn1.DERNumericString=function(e){KJUR.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"},YAHOO.lang.extend(KJUR.asn1.DERNumericString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERPrintableString=function(e){KJUR.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"},YAHOO.lang.extend(KJUR.asn1.DERPrintableString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERTeletexString=function(e){KJUR.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"},YAHOO.lang.extend(KJUR.asn1.DERTeletexString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERIA5String=function(e){KJUR.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"},YAHOO.lang.extend(KJUR.asn1.DERIA5String,KJUR.asn1.DERAbstractString),KJUR.asn1.DERUTCTime=function(e){KJUR.asn1.DERUTCTime.superclass.constructor.call(this,e),this.hT="17",this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{12}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date))},YAHOO.lang.extend(KJUR.asn1.DERUTCTime,KJUR.asn1.DERAbstractTime),KJUR.asn1.DERGeneralizedTime=function(e){KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this,e),this.hT="18",this.withMillis=!1,this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{14}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date),!0===e.millis&&(this.withMillis=!0))},YAHOO.lang.extend(KJUR.asn1.DERGeneralizedTime,KJUR.asn1.DERAbstractTime),KJUR.asn1.DERSequence=function(e){KJUR.asn1.DERSequence.superclass.constructor.call(this,e),this.hT="30",this.getFreshValueHex=function(){for(var e="",t=0;t<this.asn1Array.length;t++){e+=this.asn1Array[t].getEncodedHex()}return this.hV=e,this.hV}},YAHOO.lang.extend(KJUR.asn1.DERSequence,KJUR.asn1.DERAbstractStructured),KJUR.asn1.DERSet=function(e){KJUR.asn1.DERSet.superclass.constructor.call(this,e),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var e=new Array,t=0;t<this.asn1Array.length;t++){var r=this.asn1Array[t];e.push(r.getEncodedHex())}return 1==this.sortFlag&&e.sort(),this.hV=e.join(""),this.hV},void 0!==e&&void 0!==e.sortflag&&0==e.sortflag&&(this.sortFlag=!1)},YAHOO.lang.extend(KJUR.asn1.DERSet,KJUR.asn1.DERAbstractStructured),KJUR.asn1.DERTaggedObject=function(e){KJUR.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(e,t,r){this.hT=t,this.isExplicit=e,this.asn1Object=r,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=r.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,t),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.tag&&(this.hT=e.tag),void 0!==e.explicit&&(this.isExplicit=e.explicit),void 0!==e.obj&&(this.asn1Object=e.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},YAHOO.lang.extend(KJUR.asn1.DERTaggedObject,KJUR.asn1.ASN1Object);var __extends$1=window&&window.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),JSEncryptRSAKey=function(e){function t(r){var n=e.call(this)||this;return r&&("string"==typeof r?n.parseKey(r):(t.hasPrivateKeyProperty(r)||t.hasPublicKeyProperty(r))&&n.parsePropertiesFrom(r)),n}return __extends$1(t,e),t.prototype.parseKey=function(e){try{var t=0,r=0,n=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e)?Hex.decode(e):Base64.unarmor(e),i=ASN1.decode(n);if(3===i.sub.length&&(i=i.sub[2].sub[0]),9===i.sub.length){t=i.sub[1].getHexStringValue(),this.n=parseBigInt(t,16),r=i.sub[2].getHexStringValue(),this.e=parseInt(r,16);var o=i.sub[3].getHexStringValue();this.d=parseBigInt(o,16);var a=i.sub[4].getHexStringValue();this.p=parseBigInt(a,16);var s=i.sub[5].getHexStringValue();this.q=parseBigInt(s,16);var l=i.sub[6].getHexStringValue();this.dmp1=parseBigInt(l,16);var c=i.sub[7].getHexStringValue();this.dmq1=parseBigInt(c,16);var u=i.sub[8].getHexStringValue();this.coeff=parseBigInt(u,16)}else{if(2!==i.sub.length)return!1;if(i.sub[0].sub){var h=i.sub[1].sub[0];t=h.sub[0].getHexStringValue(),this.n=parseBigInt(t,16),r=h.sub[1].getHexStringValue(),this.e=parseInt(r,16)}else t=i.sub[0].getHexStringValue(),this.n=parseBigInt(t,16),r=i.sub[1].getHexStringValue(),this.e=parseInt(r,16)}return!0}catch(e){return!1}},t.prototype.getPrivateBaseKey=function(){var e={array:[new KJUR.asn1.DERInteger({int:0}),new KJUR.asn1.DERInteger({bigint:this.n}),new KJUR.asn1.DERInteger({int:this.e}),new KJUR.asn1.DERInteger({bigint:this.d}),new KJUR.asn1.DERInteger({bigint:this.p}),new KJUR.asn1.DERInteger({bigint:this.q}),new KJUR.asn1.DERInteger({bigint:this.dmp1}),new KJUR.asn1.DERInteger({bigint:this.dmq1}),new KJUR.asn1.DERInteger({bigint:this.coeff})]};return new KJUR.asn1.DERSequence(e).getEncodedHex()},t.prototype.getPrivateBaseKeyB64=function(){return hex2b64(this.getPrivateBaseKey())},t.prototype.getPublicBaseKey=function(){var e=new KJUR.asn1.DERSequence({array:[new KJUR.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new KJUR.asn1.DERNull]}),t=new KJUR.asn1.DERSequence({array:[new KJUR.asn1.DERInteger({bigint:this.n}),new KJUR.asn1.DERInteger({int:this.e})]}),r=new KJUR.asn1.DERBitString({hex:"00"+t.getEncodedHex()});return new KJUR.asn1.DERSequence({array:[e,r]}).getEncodedHex()},t.prototype.getPublicBaseKeyB64=function(){return hex2b64(this.getPublicBaseKey())},t.wordwrap=function(e,t){if(!e)return e;var r="(.{1,"+(t=t||64)+"})( +|$\n?)|(.{1,"+t+"})";return e.match(RegExp(r,"g")).join("\n")},t.prototype.getPrivateKey=function(){var e="-----BEGIN RSA PRIVATE KEY-----\n";return e+=t.wordwrap(this.getPrivateBaseKeyB64())+"\n",e+="-----END RSA PRIVATE KEY-----"},t.prototype.getPublicKey=function(){var e="-----BEGIN PUBLIC KEY-----\n";return e+=t.wordwrap(this.getPublicBaseKeyB64())+"\n",e+="-----END PUBLIC KEY-----"},t.hasPublicKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")},t.hasPrivateKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")&&e.hasOwnProperty("d")&&e.hasOwnProperty("p")&&e.hasOwnProperty("q")&&e.hasOwnProperty("dmp1")&&e.hasOwnProperty("dmq1")&&e.hasOwnProperty("coeff")},t.prototype.parsePropertiesFrom=function(e){this.n=e.n,this.e=e.e,e.hasOwnProperty("d")&&(this.d=e.d,this.p=e.p,this.q=e.q,this.dmp1=e.dmp1,this.dmq1=e.dmq1,this.coeff=e.coeff)},t}(RSAKey),_a$2,version=void 0!==process$1?null===(_a$2=process$1.env)||void 0===_a$2?void 0:_a$2.npm_package_version:void 0,JSEncrypt=function(){function e(e){void 0===e&&(e={}),e=e||{},this.default_key_size=e.default_key_size?parseInt(e.default_key_size,10):1024,this.default_public_exponent=e.default_public_exponent||"010001",this.log=e.log||!1,this.key=null}return e.prototype.setKey=function(e){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new JSEncryptRSAKey(e)},e.prototype.setPrivateKey=function(e){this.setKey(e)},e.prototype.setPublicKey=function(e){this.setKey(e)},e.prototype.decrypt=function(e){try{return this.getKey().decrypt(b64tohex(e))}catch(e){return!1}},e.prototype.encrypt=function(e){try{return hex2b64(this.getKey().encrypt(e))}catch(e){return!1}},e.prototype.sign=function(e,t,r){try{return hex2b64(this.getKey().sign(e,t,r))}catch(e){return!1}},e.prototype.verify=function(e,t,r){try{return this.getKey().verify(e,b64tohex(t),r)}catch(e){return!1}},e.prototype.getKey=function(e){if(!this.key){if(this.key=new JSEncryptRSAKey,e&&"[object Function]"==={}.toString.call(e))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,e);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},e.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},e.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},e.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},e.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},e.version=version,e}(),require$$0={},core=createCommonjsModule((function(e,t){var r;e.exports=(r=r||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==commonjsGlobal&&commonjsGlobal.crypto&&(r=commonjsGlobal.crypto),!r&&"function"==typeof commonjsRequire)try{r=require$$0}catch(e){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),o={},a=o.lib={},s=a.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},l=a.WordArray=s.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var a=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(var s=0;s<i;s+=4)t[n+s>>>2]=r[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new l.init(t,e)}}),c=o.enc={},u=c.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new l.init(r,t/2)}},h=c.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new l.init(r,t)}},d=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(h.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return h.parse(unescape(encodeURIComponent(e)))}},f=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,u=e.min(4*c,o);if(c){for(var h=0;h<c;h+=a)this._doProcessBlock(i,h);r=i.splice(0,c),n.sigBytes-=u}return new l.init(r,u)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});a.Hasher=f.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new p.HMAC.init(e,r).finalize(t)}}});var p=o.algo={};return o}(Math),r)})),x64Core=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(e){var t=r,n=t.lib,i=n.Base,o=n.WordArray,a=t.x64={};a.Word=i.extend({init:function(e,t){this.high=e,this.low=t}}),a.WordArray=i.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:8*t.length},toX32:function(){for(var e=this.words,t=e.length,r=[],n=0;n<t;n++){var i=e[n];r.push(i.high),r.push(i.low)}return o.create(r,this.sigBytes)},clone:function(){for(var e=i.clone.call(this),t=e.words=this.words.slice(0),r=t.length,n=0;n<r;n++)t[n]=t[n].clone();return e}})}(),r)})),libTypedarrays=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){if("function"==typeof ArrayBuffer){var e=r.lib.WordArray,t=e.init,n=e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var r=e.byteLength,n=[],i=0;i<r;i++)n[i>>>2]|=e[i]<<24-i%4*8;t.call(this,n,r)}else t.apply(this,arguments)};n.prototype=e}}(),r.lib.WordArray)})),encUtf16=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.WordArray,n=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i+=2){var o=t[i>>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var r=e.length,n=[],i=0;i<r;i++)n[i>>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(n,2*r)}},n.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o+=2){var a=i(t[o>>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var r=e.length,n=[],o=0;o<r;o++)n[o>>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return t.create(n,2*r)}}}(),r.enc.Utf16)})),encBase64=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.WordArray;function n(e,r,n){for(var i=[],o=0,a=0;a<r;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return t.create(i,o)}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],o=0;o<r;o+=3)for(var a=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<r;s++)i.push(n.charAt(a>>>6*(3-s)&63));var l=n.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<r.length;o++)i[r.charCodeAt(o)]=o}var a=r.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return n(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),r.enc.Base64)})),encBase64url=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.WordArray;function n(e,r,n){for(var i=[],o=0,a=0;a<r;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return t.create(i,o)}e.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var r=e.words,n=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var o=[],a=0;a<n;a+=3)for(var s=(r[a>>>2]>>>24-a%4*8&255)<<16|(r[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|r[a+2>>>2]>>>24-(a+2)%4*8&255,l=0;l<4&&a+.75*l<n;l++)o.push(i.charAt(s>>>6*(3-l)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e,t){void 0===t&&(t=!0);var r=e.length,i=t?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var a=0;a<i.length;a++)o[i.charCodeAt(a)]=a}var s=i.charAt(64);if(s){var l=e.indexOf(s);-1!==l&&(r=l)}return n(e,r,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),r.enc.Base64url)})),md5=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],l=e[t+1],f=e[t+2],p=e[t+3],m=e[t+4],g=e[t+5],v=e[t+6],y=e[t+7],_=e[t+8],b=e[t+9],w=e[t+10],D=e[t+11],x=e[t+12],S=e[t+13],k=e[t+14],T=e[t+15],P=o[0],E=o[1],A=o[2],C=o[3];P=c(P,E,A,C,a,7,s[0]),C=c(C,P,E,A,l,12,s[1]),A=c(A,C,P,E,f,17,s[2]),E=c(E,A,C,P,p,22,s[3]),P=c(P,E,A,C,m,7,s[4]),C=c(C,P,E,A,g,12,s[5]),A=c(A,C,P,E,v,17,s[6]),E=c(E,A,C,P,y,22,s[7]),P=c(P,E,A,C,_,7,s[8]),C=c(C,P,E,A,b,12,s[9]),A=c(A,C,P,E,w,17,s[10]),E=c(E,A,C,P,D,22,s[11]),P=c(P,E,A,C,x,7,s[12]),C=c(C,P,E,A,S,12,s[13]),A=c(A,C,P,E,k,17,s[14]),P=u(P,E=c(E,A,C,P,T,22,s[15]),A,C,l,5,s[16]),C=u(C,P,E,A,v,9,s[17]),A=u(A,C,P,E,D,14,s[18]),E=u(E,A,C,P,a,20,s[19]),P=u(P,E,A,C,g,5,s[20]),C=u(C,P,E,A,w,9,s[21]),A=u(A,C,P,E,T,14,s[22]),E=u(E,A,C,P,m,20,s[23]),P=u(P,E,A,C,b,5,s[24]),C=u(C,P,E,A,k,9,s[25]),A=u(A,C,P,E,p,14,s[26]),E=u(E,A,C,P,_,20,s[27]),P=u(P,E,A,C,S,5,s[28]),C=u(C,P,E,A,f,9,s[29]),A=u(A,C,P,E,y,14,s[30]),P=h(P,E=u(E,A,C,P,x,20,s[31]),A,C,g,4,s[32]),C=h(C,P,E,A,_,11,s[33]),A=h(A,C,P,E,D,16,s[34]),E=h(E,A,C,P,k,23,s[35]),P=h(P,E,A,C,l,4,s[36]),C=h(C,P,E,A,m,11,s[37]),A=h(A,C,P,E,y,16,s[38]),E=h(E,A,C,P,w,23,s[39]),P=h(P,E,A,C,S,4,s[40]),C=h(C,P,E,A,a,11,s[41]),A=h(A,C,P,E,p,16,s[42]),E=h(E,A,C,P,v,23,s[43]),P=h(P,E,A,C,b,4,s[44]),C=h(C,P,E,A,x,11,s[45]),A=h(A,C,P,E,T,16,s[46]),P=d(P,E=h(E,A,C,P,f,23,s[47]),A,C,a,6,s[48]),C=d(C,P,E,A,y,10,s[49]),A=d(A,C,P,E,k,15,s[50]),E=d(E,A,C,P,g,21,s[51]),P=d(P,E,A,C,x,6,s[52]),C=d(C,P,E,A,p,10,s[53]),A=d(A,C,P,E,w,15,s[54]),E=d(E,A,C,P,l,21,s[55]),P=d(P,E,A,C,_,6,s[56]),C=d(C,P,E,A,T,10,s[57]),A=d(A,C,P,E,v,15,s[58]),E=d(E,A,C,P,S,21,s[59]),P=d(P,E,A,C,m,6,s[60]),C=d(C,P,E,A,D,10,s[61]),A=d(A,C,P,E,f,15,s[62]),E=d(E,A,C,P,b,21,s[63]),o[0]=o[0]+P|0,o[1]=o[1]+E|0,o[2]=o[2]+A|0,o[3]=o[3]+C|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var o=e.floor(n/4294967296),a=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+i+a;return(s<<o|s>>>32-o)+t}function u(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+i+a;return(s<<o|s>>>32-o)+t}function h(e,t,r,n,i,o,a){var s=e+(t^r^n)+i+a;return(s<<o|s>>>32-o)+t}function d(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+i+a;return(s<<o|s>>>32-o)+t}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),r.MD5)})),sha1=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib,n=t.WordArray,i=t.Hasher,o=e.algo,a=[],s=o.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],l=r[4],c=0;c<80;c++){if(c<16)a[c]=0|e[t+c];else{var u=a[c-3]^a[c-8]^a[c-14]^a[c-16];a[c]=u<<1|u>>>31}var h=(n<<5|n>>>27)+l+a[c];h+=c<20?1518500249+(i&o|~i&s):c<40?1859775393+(i^o^s):c<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,l=s,s=o,o=i<<30|i>>>2,i=n,n=h}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+l|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=i._createHelper(s),e.HmacSHA1=i._createHmacHelper(s)}(),r.SHA1)})),sha256=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[],l=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),l[i]=r(e.pow(n,1/3)),i++),n++}();var c=[],u=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],u=r[5],h=r[6],d=r[7],f=0;f<64;f++){if(f<16)c[f]=0|e[t+f];else{var p=c[f-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=c[f-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[f]=m+c[f-7]+v+c[f-16]}var y=n&i^n&o^i&o,_=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),b=d+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&h)+l[f]+c[f];d=h,h=u,u=s,s=a+b|0,a=o,o=i,i=n,n=b+(_+y)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0,r[5]=r[5]+u|0,r[6]=r[6]+h|0,r[7]=r[7]+d|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(u),t.HmacSHA256=o._createHmacHelper(u)}(Math),r.SHA256)})),sha224=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.WordArray,n=e.algo,i=n.SHA256,o=n.SHA224=i.extend({_doReset:function(){this._hash=new t.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=i._doFinalize.call(this);return e.sigBytes-=4,e}});e.SHA224=i._createHelper(o),e.HmacSHA224=i._createHmacHelper(o)}(),r.SHA224)})),sha512=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.Hasher,n=e.x64,i=n.Word,o=n.WordArray,a=e.algo;function s(){return i.create.apply(i,arguments)}var l=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var u=a.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],u=r[5],h=r[6],d=r[7],f=n.high,p=n.low,m=i.high,g=i.low,v=o.high,y=o.low,_=a.high,b=a.low,w=s.high,D=s.low,x=u.high,S=u.low,k=h.high,T=h.low,P=d.high,E=d.low,A=f,C=p,O=m,M=g,R=v,I=y,N=_,B=b,F=w,j=D,$=x,V=S,U=k,L=T,z=P,K=E,H=0;H<80;H++){var q,W,Y=c[H];if(H<16)W=Y.high=0|e[t+2*H],q=Y.low=0|e[t+2*H+1];else{var G=c[H-15],J=G.high,X=G.low,Z=(J>>>1|X<<31)^(J>>>8|X<<24)^J>>>7,Q=(X>>>1|J<<31)^(X>>>8|J<<24)^(X>>>7|J<<25),ee=c[H-2],te=ee.high,re=ee.low,ne=(te>>>19|re<<13)^(te<<3|re>>>29)^te>>>6,ie=(re>>>19|te<<13)^(re<<3|te>>>29)^(re>>>6|te<<26),oe=c[H-7],ae=oe.high,se=oe.low,le=c[H-16],ce=le.high,ue=le.low;W=(W=(W=Z+ae+((q=Q+se)>>>0<Q>>>0?1:0))+ne+((q+=ie)>>>0<ie>>>0?1:0))+ce+((q+=ue)>>>0<ue>>>0?1:0),Y.high=W,Y.low=q}var he,de=F&$^~F&U,fe=j&V^~j&L,pe=A&O^A&R^O&R,me=C&M^C&I^M&I,ge=(A>>>28|C<<4)^(A<<30|C>>>2)^(A<<25|C>>>7),ve=(C>>>28|A<<4)^(C<<30|A>>>2)^(C<<25|A>>>7),ye=(F>>>14|j<<18)^(F>>>18|j<<14)^(F<<23|j>>>9),_e=(j>>>14|F<<18)^(j>>>18|F<<14)^(j<<23|F>>>9),be=l[H],we=be.high,De=be.low,xe=z+ye+((he=K+_e)>>>0<K>>>0?1:0),Se=ve+me;z=U,K=L,U=$,L=V,$=F,V=j,F=N+(xe=(xe=(xe=xe+de+((he+=fe)>>>0<fe>>>0?1:0))+we+((he+=De)>>>0<De>>>0?1:0))+W+((he+=q)>>>0<q>>>0?1:0))+((j=B+he|0)>>>0<B>>>0?1:0)|0,N=R,B=I,R=O,I=M,O=A,M=C,A=xe+(ge+pe+(Se>>>0<ve>>>0?1:0))+((C=he+Se|0)>>>0<he>>>0?1:0)|0}p=n.low=p+C,n.high=f+A+(p>>>0<C>>>0?1:0),g=i.low=g+M,i.high=m+O+(g>>>0<M>>>0?1:0),y=o.low=y+I,o.high=v+R+(y>>>0<I>>>0?1:0),b=a.low=b+B,a.high=_+N+(b>>>0<B>>>0?1:0),D=s.low=D+j,s.high=w+F+(D>>>0<j>>>0?1:0),S=u.low=S+V,u.high=x+$+(S>>>0<V>>>0?1:0),T=h.low=T+L,h.high=k+U+(T>>>0<L>>>0?1:0),E=d.low=E+K,d.high=P+z+(E>>>0<K>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(n+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(u),e.HmacSHA512=t._createHmacHelper(u)}(),r.SHA512)})),sha384=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.x64,n=t.Word,i=t.WordArray,o=e.algo,a=o.SHA512,s=o.SHA384=a.extend({_doReset:function(){this._hash=new i.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=16,e}});e.SHA384=a._createHelper(s),e.HmacSHA384=a._createHmacHelper(s)}(),r.SHA384)})),sha3=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.x64.Word,s=t.algo,l=[],c=[],u=[];!function(){for(var e=1,t=0,r=0;r<24;r++){l[e+5*t]=(r+1)*(r+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,h=0,d=0;d<7;d++){if(1&i){var f=(1<<d)-1;f<32?h^=1<<f:s^=1<<f-32}128&i?i=i<<1^113:i<<=1}u[o]=a.create(s,h)}}();var h=[];!function(){for(var e=0;e<25;e++)h[e]=a.create()}();var d=s.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var r=this._state,n=this.blockSize/2,i=0;i<n;i++){var o=e[t+2*i],a=e[t+2*i+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(E=r[i]).high^=a,E.low^=o}for(var s=0;s<24;s++){for(var d=0;d<5;d++){for(var f=0,p=0,m=0;m<5;m++)f^=(E=r[d+5*m]).high,p^=E.low;var g=h[d];g.high=f,g.low=p}for(d=0;d<5;d++){var v=h[(d+4)%5],y=h[(d+1)%5],_=y.high,b=y.low;for(f=v.high^(_<<1|b>>>31),p=v.low^(b<<1|_>>>31),m=0;m<5;m++)(E=r[d+5*m]).high^=f,E.low^=p}for(var w=1;w<25;w++){var D=(E=r[w]).high,x=E.low,S=l[w];S<32?(f=D<<S|x>>>32-S,p=x<<S|D>>>32-S):(f=x<<S-32|D>>>64-S,p=D<<S-32|x>>>64-S);var k=h[c[w]];k.high=f,k.low=p}var T=h[0],P=r[0];for(T.high=P.high,T.low=P.low,d=0;d<5;d++)for(m=0;m<5;m++){var E=r[w=d+5*m],A=h[w],C=h[(d+1)%5+5*m],O=h[(d+2)%5+5*m];E.high=A.high^~C.high&O.high,E.low=A.low^~C.low&O.low}E=r[0];var M=u[s];E.high^=M.high,E.low^=M.low}},_doFinalize:function(){var t=this._data,r=t.words;this._nDataBytes;var n=8*t.sigBytes,o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(e.ceil((n+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,l=s/8,c=[],u=0;u<l;u++){var h=a[u],d=h.high,f=h.low;d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c.push(f),c.push(d)}return new i.init(c,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});t.SHA3=o._createHelper(d),t.HmacSHA3=o._createHmacHelper(d)}(Math),r.SHA3)})),ripemd160=createCommonjsModule((function(e,t){var r;e.exports=(r=core,
|
|
18
|
+
var Ut={};void 0!==Ut.asn1&&Ut.asn1||(Ut.asn1={}),Ut.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substr(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var n=e.substr(1).length;n%2==1?n+=1:e.match(/^[0-7]/)||(n+=2);for(var r="",i=0;i<n;i++)r+="f";e=new vt(r,16).xor(t).add(vt.ONE).toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=Ut.asn1,n=e.DERBoolean,r=e.DERInteger,i=e.DERBitString,o=e.DEROctetString,a=e.DERNull,s=e.DERObjectIdentifier,l=e.DEREnumerated,c=e.DERUTF8String,u=e.DERNumericString,h=e.DERPrintableString,d=e.DERTeletexString,f=e.DERIA5String,p=e.DERUTCTime,m=e.DERGeneralizedTime,g=e.DERSequence,v=e.DERSet,y=e.DERTaggedObject,b=e.ASN1Util.newObject,w=Object.keys(t);if(1!=w.length)throw"key of param shall be only one.";var _=w[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+_+":"))throw"undefined key: "+_;if("bool"==_)return new n(t[_]);if("int"==_)return new r(t[_]);if("bitstr"==_)return new i(t[_]);if("octstr"==_)return new o(t[_]);if("null"==_)return new a(t[_]);if("oid"==_)return new s(t[_]);if("enum"==_)return new l(t[_]);if("utf8str"==_)return new c(t[_]);if("numstr"==_)return new u(t[_]);if("prnstr"==_)return new h(t[_]);if("telstr"==_)return new d(t[_]);if("ia5str"==_)return new f(t[_]);if("utctime"==_)return new p(t[_]);if("gentime"==_)return new m(t[_]);if("seq"==_){for(var D=t[_],S=[],x=0;x<D.length;x++){var k=b(D[x]);S.push(k)}return new g({array:S})}if("set"==_){for(D=t[_],S=[],x=0;x<D.length;x++){k=b(D[x]);S.push(k)}return new v({array:S})}if("tag"==_){var T=t[_];if("[object Array]"===Object.prototype.toString.call(T)&&3==T.length){var C=b(T[2]);return new y({tag:T[0],explicit:T[1],obj:C})}var O={};if(void 0!==T.explicit&&(O.explicit=T.explicit),void 0!==T.tag&&(O.tag=T.tag),void 0===T.obj)throw"obj shall be specified for 'tag'.";return O.obj=b(T.obj),new y(O)}},this.jsonToASN1HEX=function(t){return this.newObject(t).getEncodedHex()}},Ut.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",n=parseInt(t.substr(0,2),16),r=(e=Math.floor(n/40)+"."+n%40,""),i=2;i<t.length;i+=2){var o=("00000000"+parseInt(t.substr(i,2),16).toString(2)).slice(-8);if(r+=o.substr(1,7),"0"==o.substr(0,1))e=e+"."+new vt(r,2).toString(10),r=""}return e},Ut.asn1.ASN1Util.oidIntToHex=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},n=function(t){var n="",r=new vt(t,10).toString(2),i=7-r.length%7;7==i&&(i=0);for(var o="",a=0;a<i;a++)o+="0";r=o+r;for(a=0;a<r.length-1;a+=7){var s=r.substr(a,7);a!=r.length-7&&(s="1"+s),n+=e(parseInt(s,2))}return n};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var r="",i=t.split("."),o=40*parseInt(i[0])+parseInt(i[1]);r+=e(o),i.splice(0,2);for(var a=0;a<i.length;a++)r+=n(i[a]);return r},Ut.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n=0,v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var n=e.length/2;if(n>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+n).toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},Ut.asn1.DERAbstractString=function(t){Ut.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},Ht.lang.extend(Ut.asn1.DERAbstractString,Ut.asn1.ASN1Object),Ut.asn1.DERAbstractTime=function(t){Ut.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,e,n){var r=this.zeroPadding,i=this.localDateToUTC(t),o=String(i.getFullYear());"utc"==e&&(o=o.substr(2,2));var a=o+r(String(i.getMonth()+1),2)+r(String(i.getDate()),2)+r(String(i.getHours()),2)+r(String(i.getMinutes()),2)+r(String(i.getSeconds()),2);if(!0===n){var s=i.getMilliseconds();if(0!=s){var l=r(String(s),3);a=a+"."+(l=l.replace(/[0]+$/,""))}}return a+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,n,r,i,o){var a=new Date(Date.UTC(t,e-1,n,r,i,o,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},Ht.lang.extend(Ut.asn1.DERAbstractTime,Ut.asn1.ASN1Object),Ut.asn1.DERAbstractStructured=function(t){Ut.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},Ht.lang.extend(Ut.asn1.DERAbstractStructured,Ut.asn1.ASN1Object),Ut.asn1.DERBoolean=function(){Ut.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},Ht.lang.extend(Ut.asn1.DERBoolean,Ut.asn1.ASN1Object),Ut.asn1.DERInteger=function(t){Ut.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=Ut.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new vt(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},Ht.lang.extend(Ut.asn1.DERInteger,Ut.asn1.ASN1Object),Ut.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=Ut.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}Ut.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var n="0"+t;this.hTLV=null,this.isModified=!0,this.hV=n+e},this.setByBinaryString=function(t){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var n=0;n<=e;n++)t+="0";var r="";for(n=0;n<t.length-1;n+=8){var i=t.substr(n,8),o=parseInt(i,2).toString(16);1==o.length&&(o="0"+o),r+=o}this.hTLV=null,this.isModified=!0,this.hV="0"+e+r},this.setByBooleanArray=function(t){for(var e="",n=0;n<t.length;n++)1==t[n]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},Ht.lang.extend(Ut.asn1.DERBitString,Ut.asn1.ASN1Object),Ut.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=Ut.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}Ut.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},Ht.lang.extend(Ut.asn1.DEROctetString,Ut.asn1.DERAbstractString),Ut.asn1.DERNull=function(){Ut.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},Ht.lang.extend(Ut.asn1.DERNull,Ut.asn1.ASN1Object),Ut.asn1.DERObjectIdentifier=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},n=function(t){var n="",r=new vt(t,10).toString(2),i=7-r.length%7;7==i&&(i=0);for(var o="",a=0;a<i;a++)o+="0";r=o+r;for(a=0;a<r.length-1;a+=7){var s=r.substr(a,7);a!=r.length-7&&(s="1"+s),n+=e(parseInt(s,2))}return n};Ut.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var r="",i=t.split("."),o=40*parseInt(i[0])+parseInt(i[1]);r+=e(o),i.splice(0,2);for(var a=0;a<i.length;a++)r+=n(i[a]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueName=function(t){var e=Ut.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},Ht.lang.extend(Ut.asn1.DERObjectIdentifier,Ut.asn1.ASN1Object),Ut.asn1.DEREnumerated=function(t){Ut.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=Ut.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new vt(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},Ht.lang.extend(Ut.asn1.DEREnumerated,Ut.asn1.ASN1Object),Ut.asn1.DERUTF8String=function(t){Ut.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},Ht.lang.extend(Ut.asn1.DERUTF8String,Ut.asn1.DERAbstractString),Ut.asn1.DERNumericString=function(t){Ut.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},Ht.lang.extend(Ut.asn1.DERNumericString,Ut.asn1.DERAbstractString),Ut.asn1.DERPrintableString=function(t){Ut.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},Ht.lang.extend(Ut.asn1.DERPrintableString,Ut.asn1.DERAbstractString),Ut.asn1.DERTeletexString=function(t){Ut.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},Ht.lang.extend(Ut.asn1.DERTeletexString,Ut.asn1.DERAbstractString),Ut.asn1.DERIA5String=function(t){Ut.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},Ht.lang.extend(Ut.asn1.DERIA5String,Ut.asn1.DERAbstractString),Ut.asn1.DERUTCTime=function(t){Ut.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},Ht.lang.extend(Ut.asn1.DERUTCTime,Ut.asn1.DERAbstractTime),Ut.asn1.DERGeneralizedTime=function(t){Ut.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},Ht.lang.extend(Ut.asn1.DERGeneralizedTime,Ut.asn1.DERAbstractTime),Ut.asn1.DERSequence=function(t){Ut.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++){t+=this.asn1Array[e].getEncodedHex()}return this.hV=t,this.hV}},Ht.lang.extend(Ut.asn1.DERSequence,Ut.asn1.DERAbstractStructured),Ut.asn1.DERSet=function(t){Ut.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var n=this.asn1Array[e];t.push(n.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},Ht.lang.extend(Ut.asn1.DERSet,Ut.asn1.DERAbstractStructured),Ut.asn1.DERTaggedObject=function(t){Ut.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,n){this.hT=e,this.isExplicit=t,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},Ht.lang.extend(Ut.asn1.DERTaggedObject,Ut.asn1.ASN1Object);var qt,Gt=window&&window.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wt=function(t){function e(n){var r=t.call(this)||this;return n&&("string"==typeof n?r.parseKey(n):(e.hasPrivateKeyProperty(n)||e.hasPublicKeyProperty(n))&&r.parsePropertiesFrom(n)),r}return Gt(e,t),e.prototype.parseKey=function(t){try{var e=0,n=0,r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)?it(t):ot.unarmor(t),i=ft.decode(r);if(3===i.sub.length&&(i=i.sub[2].sub[0]),9===i.sub.length){e=i.sub[1].getHexStringValue(),this.n=St(e,16),n=i.sub[2].getHexStringValue(),this.e=parseInt(n,16);var o=i.sub[3].getHexStringValue();this.d=St(o,16);var a=i.sub[4].getHexStringValue();this.p=St(a,16);var s=i.sub[5].getHexStringValue();this.q=St(s,16);var l=i.sub[6].getHexStringValue();this.dmp1=St(l,16);var c=i.sub[7].getHexStringValue();this.dmq1=St(c,16);var u=i.sub[8].getHexStringValue();this.coeff=St(u,16)}else{if(2!==i.sub.length)return!1;if(i.sub[0].sub){var h=i.sub[1].sub[0];e=h.sub[0].getHexStringValue(),this.n=St(e,16),n=h.sub[1].getHexStringValue(),this.e=parseInt(n,16)}else e=i.sub[0].getHexStringValue(),this.n=St(e,16),n=i.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(t){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new Ut.asn1.DERInteger({int:0}),new Ut.asn1.DERInteger({bigint:this.n}),new Ut.asn1.DERInteger({int:this.e}),new Ut.asn1.DERInteger({bigint:this.d}),new Ut.asn1.DERInteger({bigint:this.p}),new Ut.asn1.DERInteger({bigint:this.q}),new Ut.asn1.DERInteger({bigint:this.dmp1}),new Ut.asn1.DERInteger({bigint:this.dmq1}),new Ut.asn1.DERInteger({bigint:this.coeff})]};return new Ut.asn1.DERSequence(t).getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return et(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new Ut.asn1.DERSequence({array:[new Ut.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new Ut.asn1.DERNull]}),e=new Ut.asn1.DERSequence({array:[new Ut.asn1.DERInteger({bigint:this.n}),new Ut.asn1.DERInteger({int:this.e})]}),n=new Ut.asn1.DERBitString({hex:"00"+e.getEncodedHex()});return new Ut.asn1.DERSequence({array:[t,n]}).getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return et(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(!t)return t;var n="(.{1,"+(e=e||64)+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(n,"g")).join("\n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return t+=e.wordwrap(this.getPrivateBaseKeyB64())+"\n",t+="-----END RSA PRIVATE KEY-----"},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return t+=e.wordwrap(this.getPublicBaseKeyB64())+"\n",t+="-----END PUBLIC KEY-----"},e.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}(zt),$t=void 0!==U?null===(qt=U.env)||void 0===qt?void 0:qt.npm_package_version:void 0,Kt=function(){function t(t){void 0===t&&(t={}),t=t||{},this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return t.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new Wt(t)},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(nt(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return et(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.sign=function(t,e,n){try{return et(this.getKey().sign(t,e,n))}catch(t){return!1}},t.prototype.verify=function(t,e,n){try{return this.getKey().verify(t,nt(e),n)}catch(t){return!1}},t.prototype.getKey=function(t){if(!this.key){if(this.key=new Wt,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version=$t,t}(),Zt={},Xt=a((function(t,e){var n;t.exports=(n=n||function(t,e){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==r&&r.crypto&&(n=r.crypto),!n)try{n=Zt}catch(t){}var i=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),a={},s=a.lib={},l=s.Base={extend:function(t){var e=o(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},c=s.WordArray=l.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=e?n:4*t.length},toString:function(t){return(t||h).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var a=n[o>>>2]>>>24-o%4*8&255;e[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s<i;s+=4)e[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=l.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n<t;n+=4)e.push(i());return new c.init(e,t)}}),u=a.enc={},h=u.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new c.init(n,e/2)}},d=u.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new c.init(n,e)}},f=u.Utf8={stringify:function(t){try{return decodeURIComponent(escape(d.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return d.parse(unescape(encodeURIComponent(t)))}},p=s.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),l=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*a,u=t.min(4*l,o);if(l){for(var h=0;h<l;h+=a)this._doProcessBlock(i,h);n=i.splice(0,l),r.sigBytes-=u}return new c.init(n,u)},clone:function(){var t=l.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});s.Hasher=p.extend({cfg:l.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new m.HMAC.init(t,n).finalize(e)}}});var m=a.algo={};return a}(Math),n)})),Jt=(a((function(t,e){var n;t.exports=(n=Xt,function(t){var e=n,r=e.lib,i=r.Base,o=r.WordArray,a=e.x64={};a.Word=i.extend({init:function(t,e){this.high=t,this.low=e}}),a.WordArray=i.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:8*e.length},toX32:function(){for(var t=this.words,e=t.length,n=[],r=0;r<e;r++){var i=t[r];n.push(i.high),n.push(i.low)}return o.create(n,this.sigBytes)},clone:function(){for(var t=i.clone.call(this),e=t.words=this.words.slice(0),n=e.length,r=0;r<n;r++)e[r]=e[r].clone();return t}})}(),n)})),a((function(t,e){var n;t.exports=(n=Xt,function(){if("function"==typeof ArrayBuffer){var t=n.lib.WordArray,e=t.init,r=t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var n=t.byteLength,r=[],i=0;i<n;i++)r[i>>>2]|=t[i]<<24-i%4*8;e.call(this,r,n)}else e.apply(this,arguments)};r.prototype=t}}(),n.lib.WordArray)})),a((function(t,e){var n;t.exports=(n=Xt,function(){var t=n,e=t.lib.WordArray,r=t.enc;function i(t){return t<<8&4278255360|t>>>8&16711935}r.Utf16=r.Utf16BE={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i+=2){var o=e[i>>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var n=t.length,r=[],i=0;i<n;i++)r[i>>>1]|=t.charCodeAt(i)<<16-i%2*16;return e.create(r,2*n)}},r.Utf16LE={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o<n;o+=2){var a=i(e[o>>>2]>>>16-o%4*8&65535);r.push(String.fromCharCode(a))}return r.join("")},parse:function(t){for(var n=t.length,r=[],o=0;o<n;o++)r[o>>>1]|=i(t.charCodeAt(o)<<16-o%2*16);return e.create(r,2*n)}}}(),n.enc.Utf16)})),a((function(t,e){var n;t.exports=(n=Xt,function(){var t=n,e=t.lib.WordArray;function r(t,n,r){for(var i=[],o=0,a=0;a<n;a++)if(a%4){var s=r[t.charCodeAt(a-1)]<<a%4*2|r[t.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return e.create(i,o)}t.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var i=[],o=0;o<n;o+=3)for(var a=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<n;s++)i.push(r.charAt(a>>>6*(3-s)&63));var l=r.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(t){var e=t.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<n.length;o++)i[n.charCodeAt(o)]=o}var a=n.charAt(64);if(a){var s=t.indexOf(a);-1!==s&&(e=s)}return r(t,e,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),n.enc.Base64)})),a((function(t,e){var n;t.exports=(n=Xt,function(){var t=n,e=t.lib.WordArray;function r(t,n,r){for(var i=[],o=0,a=0;a<n;a++)if(a%4){var s=r[t.charCodeAt(a-1)]<<a%4*2|r[t.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return e.create(i,o)}t.enc.Base64url={stringify:function(t,e){void 0===e&&(e=!0);var n=t.words,r=t.sigBytes,i=e?this._safe_map:this._map;t.clamp();for(var o=[],a=0;a<r;a+=3)for(var s=(n[a>>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,l=0;l<4&&a+.75*l<r;l++)o.push(i.charAt(s>>>6*(3-l)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(t,e){void 0===e&&(e=!0);var n=t.length,i=e?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var a=0;a<i.length;a++)o[i.charCodeAt(a)]=a}var s=i.charAt(64);if(s){var l=t.indexOf(s);-1!==l&&(n=l)}return r(t,n,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),n.enc.Base64url)})),a((function(t,e){var n;t.exports=(n=Xt,function(t){var e=n,r=e.lib,i=r.WordArray,o=r.Hasher,a=e.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var l=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=t[e+0],l=t[e+1],f=t[e+2],p=t[e+3],m=t[e+4],g=t[e+5],v=t[e+6],y=t[e+7],b=t[e+8],w=t[e+9],_=t[e+10],D=t[e+11],S=t[e+12],x=t[e+13],k=t[e+14],T=t[e+15],C=o[0],O=o[1],A=o[2],E=o[3];C=c(C,O,A,E,a,7,s[0]),E=c(E,C,O,A,l,12,s[1]),A=c(A,E,C,O,f,17,s[2]),O=c(O,A,E,C,p,22,s[3]),C=c(C,O,A,E,m,7,s[4]),E=c(E,C,O,A,g,12,s[5]),A=c(A,E,C,O,v,17,s[6]),O=c(O,A,E,C,y,22,s[7]),C=c(C,O,A,E,b,7,s[8]),E=c(E,C,O,A,w,12,s[9]),A=c(A,E,C,O,_,17,s[10]),O=c(O,A,E,C,D,22,s[11]),C=c(C,O,A,E,S,7,s[12]),E=c(E,C,O,A,x,12,s[13]),A=c(A,E,C,O,k,17,s[14]),C=u(C,O=c(O,A,E,C,T,22,s[15]),A,E,l,5,s[16]),E=u(E,C,O,A,v,9,s[17]),A=u(A,E,C,O,D,14,s[18]),O=u(O,A,E,C,a,20,s[19]),C=u(C,O,A,E,g,5,s[20]),E=u(E,C,O,A,_,9,s[21]),A=u(A,E,C,O,T,14,s[22]),O=u(O,A,E,C,m,20,s[23]),C=u(C,O,A,E,w,5,s[24]),E=u(E,C,O,A,k,9,s[25]),A=u(A,E,C,O,p,14,s[26]),O=u(O,A,E,C,b,20,s[27]),C=u(C,O,A,E,x,5,s[28]),E=u(E,C,O,A,f,9,s[29]),A=u(A,E,C,O,y,14,s[30]),C=h(C,O=u(O,A,E,C,S,20,s[31]),A,E,g,4,s[32]),E=h(E,C,O,A,b,11,s[33]),A=h(A,E,C,O,D,16,s[34]),O=h(O,A,E,C,k,23,s[35]),C=h(C,O,A,E,l,4,s[36]),E=h(E,C,O,A,m,11,s[37]),A=h(A,E,C,O,y,16,s[38]),O=h(O,A,E,C,_,23,s[39]),C=h(C,O,A,E,x,4,s[40]),E=h(E,C,O,A,a,11,s[41]),A=h(A,E,C,O,p,16,s[42]),O=h(O,A,E,C,v,23,s[43]),C=h(C,O,A,E,w,4,s[44]),E=h(E,C,O,A,S,11,s[45]),A=h(A,E,C,O,T,16,s[46]),C=d(C,O=h(O,A,E,C,f,23,s[47]),A,E,a,6,s[48]),E=d(E,C,O,A,y,10,s[49]),A=d(A,E,C,O,k,15,s[50]),O=d(O,A,E,C,g,21,s[51]),C=d(C,O,A,E,S,6,s[52]),E=d(E,C,O,A,p,10,s[53]),A=d(A,E,C,O,_,15,s[54]),O=d(O,A,E,C,l,21,s[55]),C=d(C,O,A,E,b,6,s[56]),E=d(E,C,O,A,T,10,s[57]),A=d(A,E,C,O,v,15,s[58]),O=d(O,A,E,C,x,21,s[59]),C=d(C,O,A,E,m,6,s[60]),E=d(E,C,O,A,D,10,s[61]),A=d(A,E,C,O,f,15,s[62]),O=d(O,A,E,C,w,21,s[63]),o[0]=o[0]+C|0,o[1]=o[1]+O|0,o[2]=o[2]+A|0,o[3]=o[3]+E|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,n,r,i,o,a){var s=t+(e&n|~e&r)+i+a;return(s<<o|s>>>32-o)+e}function u(t,e,n,r,i,o,a){var s=t+(e&r|n&~r)+i+a;return(s<<o|s>>>32-o)+e}function h(t,e,n,r,i,o,a){var s=t+(e^n^r)+i+a;return(s<<o|s>>>32-o)+e}function d(t,e,n,r,i,o,a){var s=t+(n^(e|~r))+i+a;return(s<<o|s>>>32-o)+e}e.MD5=o._createHelper(l),e.HmacMD5=o._createHmacHelper(l)}(Math),n.MD5)})),a((function(t,e){var n;t.exports=(n=Xt,function(){var t=n,e=t.lib,r=e.WordArray,i=e.Hasher,o=t.algo,a=[],s=o.SHA1=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],l=n[4],c=0;c<80;c++){if(c<16)a[c]=0|t[e+c];else{var u=a[c-3]^a[c-8]^a[c-14]^a[c-16];a[c]=u<<1|u>>>31}var h=(r<<5|r>>>27)+l+a[c];h+=c<20?1518500249+(i&o|~i&s):c<40?1859775393+(i^o^s):c<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,l=s,s=o,o=i<<30|i>>>2,i=r,r=h}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+l|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),e[15+(r+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});t.SHA1=i._createHelper(s),t.HmacSHA1=i._createHmacHelper(s)}(),n.SHA1)})),a((function(t,e){var n;t.exports=(n=Xt,function(t){var e=n,r=e.lib,i=r.WordArray,o=r.Hasher,a=e.algo,s=[],l=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,i=0;i<64;)e(r)&&(i<8&&(s[i]=n(t.pow(r,.5))),l[i]=n(t.pow(r,1/3)),i++),r++}();var c=[],u=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],h=n[6],d=n[7],f=0;f<64;f++){if(f<16)c[f]=0|t[e+f];else{var p=c[f-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=c[f-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[f]=m+c[f-7]+v+c[f-16]}var y=r&i^r&o^i&o,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),w=d+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&h)+l[f]+c[f];d=h,h=u,u=s,s=a+w|0,a=o,o=i,i=r,r=w+(b+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+h|0,n[7]=n[7]+d|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=t.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(u),e.HmacSHA256=o._createHmacHelper(u)}(Math),n.SHA256)})),a((function(t,e){var n;t.exports=(n=Xt,function(){var t=n,e=t.lib.WordArray,r=t.algo,i=r.SHA256,o=r.SHA224=i.extend({_doReset:function(){this._hash=new e.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=i._doFinalize.call(this);return t.sigBytes-=4,t}});t.SHA224=i._createHelper(o),t.HmacSHA224=i._createHmacHelper(o)}(),n.SHA224)})),a((function(t,e){var n;t.exports=(n=Xt,function(){var t=n,e=t.lib.Hasher,r=t.x64,i=r.Word,o=r.WordArray,a=t.algo;function s(){return i.create.apply(i,arguments)}var l=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var t=0;t<80;t++)c[t]=s()}();var u=a.SHA512=e.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],h=n[6],d=n[7],f=r.high,p=r.low,m=i.high,g=i.low,v=o.high,y=o.low,b=a.high,w=a.low,_=s.high,D=s.low,S=u.high,x=u.low,k=h.high,T=h.low,C=d.high,O=d.low,A=f,E=p,M=m,N=g,P=v,V=y,R=b,B=w,I=_,F=D,j=S,L=x,z=k,Y=T,H=C,U=O,q=0;q<80;q++){var G,W,$=c[q];if(q<16)W=$.high=0|t[e+2*q],G=$.low=0|t[e+2*q+1];else{var K=c[q-15],Z=K.high,X=K.low,J=(Z>>>1|X<<31)^(Z>>>8|X<<24)^Z>>>7,Q=(X>>>1|Z<<31)^(X>>>8|Z<<24)^(X>>>7|Z<<25),tt=c[q-2],et=tt.high,nt=tt.low,rt=(et>>>19|nt<<13)^(et<<3|nt>>>29)^et>>>6,it=(nt>>>19|et<<13)^(nt<<3|et>>>29)^(nt>>>6|et<<26),ot=c[q-7],at=ot.high,st=ot.low,lt=c[q-16],ct=lt.high,ut=lt.low;W=(W=(W=J+at+((G=Q+st)>>>0<Q>>>0?1:0))+rt+((G+=it)>>>0<it>>>0?1:0))+ct+((G+=ut)>>>0<ut>>>0?1:0),$.high=W,$.low=G}var ht,dt=I&j^~I&z,ft=F&L^~F&Y,pt=A&M^A&P^M&P,mt=E&N^E&V^N&V,gt=(A>>>28|E<<4)^(A<<30|E>>>2)^(A<<25|E>>>7),vt=(E>>>28|A<<4)^(E<<30|A>>>2)^(E<<25|A>>>7),yt=(I>>>14|F<<18)^(I>>>18|F<<14)^(I<<23|F>>>9),bt=(F>>>14|I<<18)^(F>>>18|I<<14)^(F<<23|I>>>9),wt=l[q],_t=wt.high,Dt=wt.low,St=H+yt+((ht=U+bt)>>>0<U>>>0?1:0),xt=vt+mt;H=z,U=Y,z=j,Y=L,j=I,L=F,I=R+(St=(St=(St=St+dt+((ht+=ft)>>>0<ft>>>0?1:0))+_t+((ht+=Dt)>>>0<Dt>>>0?1:0))+W+((ht+=G)>>>0<G>>>0?1:0))+((F=B+ht|0)>>>0<B>>>0?1:0)|0,R=P,B=V,P=M,V=N,M=A,N=E,A=St+(gt+pt+(xt>>>0<vt>>>0?1:0))+((E=ht+xt|0)>>>0<ht>>>0?1:0)|0}p=r.low=p+E,r.high=f+A+(p>>>0<E>>>0?1:0),g=i.low=g+N,i.high=m+M+(g>>>0<N>>>0?1:0),y=o.low=y+V,o.high=v+P+(y>>>0<V>>>0?1:0),w=a.low=w+B,a.high=b+R+(w>>>0<B>>>0?1:0),D=s.low=D+F,s.high=_+I+(D>>>0<F>>>0?1:0),x=u.low=x+L,u.high=S+j+(x>>>0<L>>>0?1:0),T=h.low=T+Y,h.high=k+z+(T>>>0<Y>>>0?1:0),O=d.low=O+U,d.high=C+H+(O>>>0<U>>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),e[31+(r+128>>>10<<5)]=n,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(u),t.HmacSHA512=e._createHmacHelper(u)}(),n.SHA512)})),a((function(t,e){var n;t.exports=(n=Xt,function(){var t=n,e=t.x64,r=e.Word,i=e.WordArray,o=t.algo,a=o.SHA512,s=o.SHA384=a.extend({_doReset:function(){this._hash=new i.init([new r.init(3418070365,3238371032),new r.init(1654270250,914150663),new r.init(2438529370,812702999),new r.init(355462360,4144912697),new r.init(1731405415,4290775857),new r.init(2394180231,1750603025),new r.init(3675008525,1694076839),new r.init(1203062813,3204075428)])},_doFinalize:function(){var t=a._doFinalize.call(this);return t.sigBytes-=16,t}});t.SHA384=a._createHelper(s),t.HmacSHA384=a._createHmacHelper(s)}(),n.SHA384)})),a((function(t,e){var n;t.exports=(n=Xt,function(t){var e=n,r=e.lib,i=r.WordArray,o=r.Hasher,a=e.x64.Word,s=e.algo,l=[],c=[],u=[];!function(){for(var t=1,e=0,n=0;n<24;n++){l[t+5*e]=(n+1)*(n+2)/2%64;var r=(2*t+3*e)%5;t=e%5,e=r}for(t=0;t<5;t++)for(e=0;e<5;e++)c[t+5*e]=e+(2*t+3*e)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,h=0,d=0;d<7;d++){if(1&i){var f=(1<<d)-1;f<32?h^=1<<f:s^=1<<f-32}128&i?i=i<<1^113:i<<=1}u[o]=a.create(s,h)}}();var h=[];!function(){for(var t=0;t<25;t++)h[t]=a.create()}();var d=s.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],e=0;e<25;e++)t[e]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,e){for(var n=this._state,r=this.blockSize/2,i=0;i<r;i++){var o=t[e+2*i],a=t[e+2*i+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(O=n[i]).high^=a,O.low^=o}for(var s=0;s<24;s++){for(var d=0;d<5;d++){for(var f=0,p=0,m=0;m<5;m++)f^=(O=n[d+5*m]).high,p^=O.low;var g=h[d];g.high=f,g.low=p}for(d=0;d<5;d++){var v=h[(d+4)%5],y=h[(d+1)%5],b=y.high,w=y.low;for(f=v.high^(b<<1|w>>>31),p=v.low^(w<<1|b>>>31),m=0;m<5;m++)(O=n[d+5*m]).high^=f,O.low^=p}for(var _=1;_<25;_++){var D=(O=n[_]).high,S=O.low,x=l[_];x<32?(f=D<<x|S>>>32-x,p=S<<x|D>>>32-x):(f=S<<x-32|D>>>64-x,p=D<<x-32|S>>>64-x);var k=h[c[_]];k.high=f,k.low=p}var T=h[0],C=n[0];for(T.high=C.high,T.low=C.low,d=0;d<5;d++)for(m=0;m<5;m++){var O=n[_=d+5*m],A=h[_],E=h[(d+1)%5+5*m],M=h[(d+2)%5+5*m];O.high=A.high^~E.high&M.high,O.low=A.low^~E.low&M.low}O=n[0];var N=u[s];O.high^=N.high,O.low^=N.low}},_doFinalize:function(){var e=this._data,n=e.words;this._nDataBytes;var r=8*e.sigBytes,o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(t.ceil((r+1)/o)*o>>>5)-1]|=128,e.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,l=s/8,c=[],u=0;u<l;u++){var h=a[u],d=h.high,f=h.low;d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c.push(f),c.push(d)}return new i.init(c,s)},clone:function(){for(var t=o.clone.call(this),e=t._state=this._state.slice(0),n=0;n<25;n++)e[n]=e[n].clone();return t}});e.SHA3=o._createHelper(d),e.HmacSHA3=o._createHmacHelper(d)}(Math),n.SHA3)})),a((function(t,e){var n;t.exports=(n=Xt,
|
|
19
19
|
/** @preserve
|
|
20
20
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
21
21
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
@@ -23,25 +23,13 @@ var KJUR={};void 0!==KJUR.asn1&&KJUR.asn1||(KJUR.asn1={}),KJUR.asn1.ASN1Util=new
|
|
|
23
23
|
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
24
24
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
25
25
|
*/
|
|
26
|
-
function(
|
|
26
|
+
function(t){var e=n,r=e.lib,i=r.WordArray,o=r.Hasher,a=e.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=i.create([0,1518500249,1859775393,2400959708,2840853838]),d=i.create([1352829926,1548603684,1836072691,2053994217,0]),f=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,a,f,w,_,D,S,x,k,T,C,O=this._hash.words,A=h.words,E=d.words,M=s.words,N=l.words,P=c.words,V=u.words;for(D=o=O[0],S=a=O[1],x=f=O[2],k=w=O[3],T=_=O[4],n=0;n<80;n+=1)C=o+t[e+M[n]]|0,C+=n<16?p(a,f,w)+A[0]:n<32?m(a,f,w)+A[1]:n<48?g(a,f,w)+A[2]:n<64?v(a,f,w)+A[3]:y(a,f,w)+A[4],C=(C=b(C|=0,P[n]))+_|0,o=_,_=w,w=b(f,10),f=a,a=C,C=D+t[e+N[n]]|0,C+=n<16?y(S,x,k)+E[0]:n<32?v(S,x,k)+E[1]:n<48?g(S,x,k)+E[2]:n<64?m(S,x,k)+E[3]:p(S,x,k)+E[4],C=(C=b(C|=0,V[n]))+T|0,D=T,T=k,k=b(x,10),x=S,S=C;C=O[1]+f+k|0,O[1]=O[2]+w+T|0,O[2]=O[3]+_+D|0,O[3]=O[4]+o+S|0,O[4]=O[0]+a+x|0,O[0]=C},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(e.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function p(t,e,n){return t^e^n}function m(t,e,n){return t&e|~t&n}function g(t,e,n){return(t|~e)^n}function v(t,e,n){return t&n|e&~n}function y(t,e,n){return t^(e|~n)}function b(t,e){return t<<e|t>>>32-e}e.RIPEMD160=o._createHelper(f),e.HmacRIPEMD160=o._createHmacHelper(f)}(),n.RIPEMD160)})),a((function(t,e){var n;t.exports=(n=Xt,void function(){var t=n,e=t.lib.Base,r=t.enc.Utf8;t.algo.HMAC=e.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=r.parse(e));var n=t.blockSize,i=4*n;e.sigBytes>i&&(e=t.finalize(e)),e.clamp();for(var o=this._oKey=e.clone(),a=this._iKey=e.clone(),s=o.words,l=a.words,c=0;c<n;c++)s[c]^=1549556828,l[c]^=909522486;o.sigBytes=a.sigBytes=i,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,n=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(n))}})}())})),a((function(t,e){var n;t.exports=(n=Xt,function(){var t=n,e=t.lib,r=e.Base,i=e.WordArray,o=t.algo,a=o.SHA256,s=o.HMAC,l=o.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:a,iterations:25e4}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=this.cfg,r=s.create(n.hasher,t),o=i.create(),a=i.create([1]),l=o.words,c=a.words,u=n.keySize,h=n.iterations;l.length<u;){var d=r.update(e).finalize(a);r.reset();for(var f=d.words,p=f.length,m=d,g=1;g<h;g++){m=r.finalize(m),r.reset();for(var v=m.words,y=0;y<p;y++)f[y]^=v[y]}o.concat(d),c[0]++}return o.sigBytes=4*u,o}});t.PBKDF2=function(t,e,n){return l.create(n).compute(t,e)}}(),n.PBKDF2)})),a((function(t,e){var n;t.exports=(n=Xt,function(){var t=n,e=t.lib,r=e.Base,i=e.WordArray,o=t.algo,a=o.MD5,s=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:a,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n,r=this.cfg,o=r.hasher.create(),a=i.create(),s=a.words,l=r.keySize,c=r.iterations;s.length<l;){n&&o.update(n),n=o.update(t).finalize(e),o.reset();for(var u=1;u<c;u++)n=o.finalize(n),o.reset();a.concat(n)}return a.sigBytes=4*l,a}});t.EvpKDF=function(t,e,n){return s.create(n).compute(t,e)}}(),n.EvpKDF)})),a((function(t,e){var n;t.exports=void((n=Xt).lib.Cipher||function(t){var e=n,r=e.lib,i=r.Base,o=r.WordArray,a=r.BufferedBlockAlgorithm,s=e.enc;s.Utf8;var l=s.Base64,c=e.algo.EvpKDF,u=r.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?b:v}return function(e){return{encrypt:function(n,r,i){return t(r).encrypt(e,n,r,i)},decrypt:function(n,r,i){return t(r).decrypt(e,n,r,i)}}}}()});r.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var h=e.mode={},d=r.BlockCipherMode=i.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),f=h.CBC=function(){var e=d.extend();function n(e,n,r){var i,o=this._iv;o?(i=o,this._iv=t):i=this._prevBlock;for(var a=0;a<r;a++)e[n+a]^=i[a]}return e.Encryptor=e.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize;n.call(this,t,e,i),r.encryptBlock(t,e),this._prevBlock=t.slice(e,e+i)}}),e.Decryptor=e.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,o=t.slice(e,e+i);r.decryptBlock(t,e),n.call(this,t,e,i),this._prevBlock=o}}),e}(),p=(e.pad={}).Pkcs7={pad:function(t,e){for(var n=4*e,r=n-t.sigBytes%n,i=r<<24|r<<16|r<<8|r,a=[],s=0;s<r;s+=4)a.push(i);var l=o.create(a,r);t.concat(l)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}};r.BlockCipher=u.extend({cfg:u.cfg.extend({mode:f,padding:p}),reset:function(){var t;u.reset.call(this);var e=this.cfg,n=e.iv,r=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=r.createEncryptor:(t=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,n&&n.words):(this._mode=t.call(r,this,n&&n.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4});var m=r.CipherParams=i.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),g=(e.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,n=t.salt;return(n?o.create([1398893684,1701076831]).concat(n).concat(e):e).toString(l)},parse:function(t){var e,n=l.parse(t),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(e=o.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),m.create({ciphertext:n,salt:e})}},v=r.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var i=t.createEncryptor(n,r),o=i.finalize(e),a=i.cfg;return m.create({ciphertext:o,key:n,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),t.createDecryptor(n,r).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),y=(e.kdf={}).OpenSSL={execute:function(t,e,n,r,i){if(r||(r=o.random(8)),i)a=c.create({keySize:e+n,hasher:i}).compute(t,r);else var a=c.create({keySize:e+n}).compute(t,r);var s=o.create(a.words.slice(e),4*n);return a.sigBytes=4*e,m.create({key:a,iv:s,salt:r})}},b=r.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:y}),encrypt:function(t,e,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,t.keySize,t.ivSize,r.salt,r.hasher);r.iv=i.iv;var o=v.encrypt.call(this,t,e,i.key,r);return o.mixIn(i),o},decrypt:function(t,e,n,r){r=this.cfg.extend(r),e=this._parse(e,r.format);var i=r.kdf.execute(n,t.keySize,t.ivSize,e.salt,r.hasher);return r.iv=i.iv,v.decrypt.call(this,t,e,i.key,r)}})}())})),a((function(t,e){var n;t.exports=((n=Xt).mode.CFB=function(){var t=n.lib.BlockCipherMode.extend();function e(t,e,n,r){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var a=0;a<n;a++)t[e+a]^=i[a]}return t.Encryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize;e.call(this,t,n,i,r),this._prevBlock=t.slice(n,n+i)}}),t.Decryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize,o=t.slice(n,n+i);e.call(this,t,n,i,r),this._prevBlock=o}}),t}(),n.mode.CFB)})),a((function(t,e){var n,r,i;t.exports=((i=Xt).mode.CTR=(n=i.lib.BlockCipherMode.extend(),r=n.Encryptor=n.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._counter;i&&(o=this._counter=i.slice(0),this._iv=void 0);var a=o.slice(0);n.encryptBlock(a,0),o[r-1]=o[r-1]+1|0;for(var s=0;s<r;s++)t[e+s]^=a[s]}}),n.Decryptor=r,n),i.mode.CTR)})),a((function(t,e){var n;t.exports=(
|
|
27
27
|
/** @preserve
|
|
28
28
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
29
29
|
* derived from CryptoJS.mode.CTR
|
|
30
30
|
* Jan Hruby jhruby.web@gmail.com
|
|
31
31
|
*/
|
|
32
|
-
(r=core).mode.CTRGladman=function(){var e=r.lib.BlockCipherMode.extend();function t(e){if(255&~(e>>24))e+=1<<24;else{var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}return e}function n(e){return 0===(e[0]=t(e[0]))&&(e[1]=t(e[1])),e}var i=e.Encryptor=e.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),n(a);var s=a.slice(0);r.encryptBlock(s,0);for(var l=0;l<i;l++)e[t+l]^=s[l]}});return e.Decryptor=i,e}(),r.mode.CTRGladman)})),modeOfb=createCommonjsModule((function(e,t){var r,n,i;e.exports=((i=core).mode.OFB=(r=i.lib.BlockCipherMode.extend(),n=r.Encryptor=r.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),r.encryptBlock(o,0);for(var a=0;a<n;a++)e[t+a]^=o[a]}}),r.Decryptor=n,r),i.mode.OFB)})),modeEcb=createCommonjsModule((function(e,t){var r,n;e.exports=((n=core).mode.ECB=((r=n.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),r.Decryptor=r.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),r),n.mode.ECB)})),padAnsix923=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,i=n-r%n,o=r+i-1;e.clamp(),e.words[o>>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Ansix923)})),padIso10126=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.Iso10126={pad:function(e,t){var n=4*t,i=n-e.sigBytes%n;e.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso10126)})),padIso97971=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)})),padZeropadding=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},r.pad.ZeroPadding)})),padNopadding=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)})),formatHex=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(e){var t=r,n=t.lib.CipherParams,i=t.enc.Hex;t.format.Hex={stringify:function(e){return e.ciphertext.toString(i)},parse:function(e){var t=i.parse(e);return n.create({ciphertext:t})}}}(),r.format.Hex)})),aes=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.BlockCipher,n=e.algo,i=[],o=[],a=[],s=[],l=[],c=[],u=[],h=[],d=[],f=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,o[p]=r;var m=e[r],g=e[m],v=e[g],y=257*e[p]^16843008*p;a[r]=y<<24|y>>>8,s[r]=y<<16|y>>>16,l[r]=y<<8|y>>>24,c[r]=y,y=16843009*v^65537*g^257*m^16843008*r,u[p]=y<<24|y>>>8,h[p]=y<<16|y>>>16,d[p]=y<<8|y>>>24,f[p]=y,r?(r=m^e[e[e[v^m]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],a=0;a<n;a++)a<r?o[a]=t[a]:(c=o[a-1],a%r?r>6&&a%r==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[a/r|0]<<24),o[a]=o[a-r]^c);for(var s=this._invKeySchedule=[],l=0;l<n;l++){if(a=n-l,l%4)var c=o[a];else c=o[a-4];s[l]=l<4||a<=4?c:u[i[c>>>24]]^h[i[c>>>16&255]]^d[i[c>>>8&255]]^f[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,l,c,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,h,d,f,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var l=this._nRounds,c=e[t]^r[0],u=e[t+1]^r[1],h=e[t+2]^r[2],d=e[t+3]^r[3],f=4,p=1;p<l;p++){var m=n[c>>>24]^i[u>>>16&255]^o[h>>>8&255]^a[255&d]^r[f++],g=n[u>>>24]^i[h>>>16&255]^o[d>>>8&255]^a[255&c]^r[f++],v=n[h>>>24]^i[d>>>16&255]^o[c>>>8&255]^a[255&u]^r[f++],y=n[d>>>24]^i[c>>>16&255]^o[u>>>8&255]^a[255&h]^r[f++];c=m,u=g,h=v,d=y}m=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[h>>>8&255]<<8|s[255&d])^r[f++],g=(s[u>>>24]<<24|s[h>>>16&255]<<16|s[d>>>8&255]<<8|s[255&c])^r[f++],v=(s[h>>>24]<<24|s[d>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^r[f++],y=(s[d>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&h])^r[f++],e[t]=m,e[t+1]=g,e[t+2]=v,e[t+3]=y},keySize:8});e.AES=t._createHelper(m)}(),r.AES)})),tripledes=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib,n=t.WordArray,i=t.BlockCipher,o=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=a[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var c=i[o]=[],u=l[o];for(r=0;r<24;r++)c[r/6|0]|=t[(s[r]-1+u)%28]<<31-r%6,c[4+(r/6|0)]|=t[28+(s[r+24]-1+u)%28]<<31-r%6;for(c[0]=c[0]<<1|c[0]>>>31,r=1;r<7;r++)c[r]=c[r]>>>4*(r-1)+3;c[7]=c[7]<<5|c[7]>>>27}var h=this._invSubKeys=[];for(r=0;r<16;r++)h[r]=i[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],d.call(this,4,252645135),d.call(this,16,65535),f.call(this,2,858993459),f.call(this,8,16711935),d.call(this,1,1431655765);for(var n=0;n<16;n++){for(var i=r[n],o=this._lBlock,a=this._rBlock,s=0,l=0;l<8;l++)s|=c[l][((a^i[l])&u[l])>>>0];this._lBlock=a,this._rBlock=o^s}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,d.call(this,1,1431655765),f.call(this,8,16711935),f.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function d(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<<e}function f(e,t){var r=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<<e}e.DES=i._createHelper(h);var p=o.TripleDES=i.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=h.createEncryptor(n.create(t)),this._des2=h.createEncryptor(n.create(r)),this._des3=h.createEncryptor(n.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(p)}(),r.TripleDES)})),rc4=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(var o=0;i<256;i++){var a=i%r,s=t[a>>>2]>>>24-a%4*8&255;o=(o+n[i]+s)%256;var l=n[i];n[i]=n[o],n[o]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[r],e[r]=o,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}e.RC4=t._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(a)}(),r.RC4)})),rabbit=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)l.call(this);for(r=0;r<8;r++)i[r]^=n[r+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=c>>>16|4294901760&u,d=u<<16|65535&c;for(i[0]^=c,i[1]^=h,i[2]^=u,i[3]^=d,i[4]^=c,i[5]^=h,i[6]^=u,i[7]^=d,r=0;r<4;r++)l.call(this)}},_doProcessBlock:function(e,t){var r=this._X;l.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=l^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),r.Rabbit)})),rabbitLegacy=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=c>>>16|4294901760&u,d=u<<16|65535&c;for(n[0]^=c,n[1]^=h,n[2]^=u,n[3]^=d,n[4]^=c,n[5]^=h,n[6]^=u,n[7]^=d,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(e,t){var r=this._X;l.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=l^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),r.RabbitLegacy)})),blowfish=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.BlockCipher,n=e.algo;const i=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function l(e,t){let r=t>>24&255,n=t>>16&255,i=t>>8&255,o=255&t,a=e.sbox[0][r]+e.sbox[1][n];return a^=e.sbox[2][i],a+=e.sbox[3][o],a}function c(e,t,r){let n,o=t,a=r;for(let t=0;t<i;++t)o^=e.pbox[t],a=l(e,o)^a,n=o,o=a,a=n;return n=o,o=a,a=n,a^=e.pbox[i],o^=e.pbox[i+1],{left:o,right:a}}function u(e,t,r){let n,o=t,a=r;for(let t=i+1;t>1;--t)o^=e.pbox[t],a=l(e,o)^a,n=o,o=a,a=n;return n=o,o=a,a=n,a^=e.pbox[1],o^=e.pbox[0],{left:o,right:a}}function h(e,t,r){for(let t=0;t<4;t++){e.sbox[t]=[];for(let r=0;r<256;r++)e.sbox[t][r]=a[t][r]}let n=0;for(let a=0;a<i+2;a++)e.pbox[a]=o[a]^t[n],n++,n>=r&&(n=0);let s=0,l=0,u=0;for(let t=0;t<i+2;t+=2)u=c(e,s,l),s=u.left,l=u.right,e.pbox[t]=s,e.pbox[t+1]=l;for(let t=0;t<4;t++)for(let r=0;r<256;r+=2)u=c(e,s,l),s=u.left,l=u.right,e.sbox[t][r]=s,e.sbox[t][r+1]=l;return!0}var d=n.Blowfish=t.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4;h(s,t,r)}},encryptBlock:function(e,t){var r=c(s,e[t],e[t+1]);e[t]=r.left,e[t+1]=r.right},decryptBlock:function(e,t){var r=u(s,e[t],e[t+1]);e[t]=r.left,e[t+1]=r.right},blockSize:2,keySize:4,ivSize:2});e.Blowfish=t._createHelper(d)}(),r.Blowfish)})),cryptoJs=createCommonjsModule((function(e,t){e.exports=core}));function setSessionData(e,t){var r=JSON.stringify(t);sessionStorage.setItem(e,r)}function getSessionData(e){var t=sessionStorage.getItem(e);return t?JSON.parse(t):null}var updataSizeDeep=function(e,t){try{var r=t.xRatio,n=t.yRatio;return isNaN(r)||isNaN(n)?(console.error("发生错误:on updataSizeDeep in go-code "),e):(e.forEach((function(e){var i;e.baseData.left=e.baseData.left*r,e.baseData.width=e.baseData.width*r,e.baseData.top=e.baseData.top*n,e.baseData.height=e.baseData.height*n,e.baseData.angle=e.baseData.angle,(null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)&&updataSizeDeep(null==e?void 0:e.children,t)})),e)}catch(t){return e}},checkBaseData=function(e,t){var r=!0;try{for(var n=0,i=["width","height","left","top","opacity","angel","skewY","skewX","rotateX","rotateY"];n<i.length;n++){var o=i[n];if(Object.hasOwn(e,o)&&isNaN(e[o])){if(!("string"==typeof e[o]&&e[o].includes("%")||"NaN"==e[o])){console.warn(o+"--参数校验不合法:"+t),r=!1;break}r=!0}}return r}catch(e){return console.warn("参数校验不合法:"+t),!1}},arraySwap=function(e,t,r){var n=e[r];return e.splice(r,1),e.splice(t,0,n),e},arraySwapForId=function(e,t,r){var n=_$1.findIndex(e,(function(e){return e.cid==r})),i=_$1.findIndex(e,(function(e){return e.cid==t}));return arraySwap(e,i,n)},arraySwapDeep=function(e,t,r){for(var n=-1,i=0;i<e.length;i++){var o=e[i];if(o.children&&o.children.length)for(var a=0;a<o.children.length;a++){if(n=a,o.children[a].cid===r){switch(t){case"up":n>=1&&arraySwap(o.children,n-1,n);break;case"down":n<o.children.length-2&&arraySwap(o.children,n+1,n);break;case"top":0!==n&&arraySwap(o.children,0,n);break;case"bottom":var s=o.children.length-1;n!==s&&arraySwap(o.children,s,n)}break}}}return e},findItemDeep$1=function(e,t,r){var n=!1,i=function(e){for(var o=0;o<e.length;o++){if(e[o].cid==t){n=e[o],r&&_$1.remove(e,(function(e){return e.cid==t}));break}if(e[o].children)i(e[o].children);else if(e[o].dynamicChildren){if(e[o].dynamicChildren instanceof Map){for(var a=Array.from(e[o].dynamicChildren),s=0;s<a.length;s++)if(a[s]instanceof Array){var l=a[s][1];i(l)}}else if(e[o].dynamicChildren instanceof Array)for(a=e[o].dynamicChildren,s=0;s<a.length;s++)if(a[s]instanceof Array){l=a[s][1];i(l)}}else e[o].stateChildren&&i(e[o].stateChildren)}};return i(e),n||!1},getAncestorsNodes=function(e,t){var r=[],n=function(e){for(var i=0;i<e.length;i++){if(e[i].cid===t)return!0;if(Array.isArray(e[i].children)){if(n(e[i].children))return r.push(e[i]),!0;n(e[i].children)}}};return n(e),r},findItemIndexDeep=function(e,t){for(var r,n=0,i=0;i<e.length;i++){var o=e[i];if(n+=1,o.cid==t)break;if(null===(r=null==o?void 0:o.children)||void 0===r?void 0:r.length)for(var a=0;a<(null==o?void 0:o.children.length);a++){if(n+=1,(null==o?void 0:o.children[a]).cid==t)return n}}return n},getLength=function(e){var t=0,r=function(e){for(var n=function(n){if(e[n].isShow&&e[n].children)r(e[n].children);else if(e[n].isShow&&e[n].dynamicChildren){if(e[n].dynamicChildren instanceof Map){for(var i=Array.from(e[n].dynamicChildren),o=0;o<i.length;o++)if(i[o]instanceof Array){var a=i[o][1];r(a)}}else if(e[n].isShow&&e[n].dynamicChildren instanceof Array){var s=e[n].dynamicChildren.find((function(t){return t[0]=e[n].activeDynamic}));s&&s.length&&r(s[1])}}else e[n].isShow&&e[n].stateChildren?r(e[n].stateChildren):e[n].isShow&&t++},i=0;i<e.length;i++)n(i)};return r(e),t||!1},findParentDeep=function(e,t){var r=null,n=function(e,i){for(var o=0,a=e;o<a.length;o++){var s=a[o];if(s.cid==t){r=i;break}if(s.children)n(s.children,s);else if(s.dynamicChildren)if(s.dynamicChildren instanceof Map){for(var l=Array.from(s.dynamicChildren),c=0;c<l.length;c++)if(l[c]instanceof Array){var u=l[c][1];n(u,s)}}else s.dynamicChildren;else s.stateChildren&&n(s.stateChildren,s)}};return n(e,null),r||!1},findItem=function(e,t,r){for(var n,i=function(i){var o=e[i];if(o.cid===t)return n=o,r&&e.splice(i,1),{value:n};if(o.children&&o.children.length){for(var a=0;a<o.children.length;a++)if(o.children[a].cid===t)return n=o.children[a],r&&o.children.splice(a,1),{value:n}}else if(o.stateChildren&&o.stateChildren.length){for(a=0;a<o.stateChildren.length;a++)if(o.stateChildren[a].cid===t)return n=o.stateChildren[a],r&&o.stateChildren.splice(a,1),{value:n}}else if(o.dynamicChildren){var s=void 0;if(o.dynamicChildren instanceof Map?s=o.dynamicChildren.get(o.activeDynamic):o.dynamicChildren instanceof Array&&(s=o.dynamicChildren.find((function(e){return e[0]==o.activeDynamic}))[1]),s)for(a=0;a<s.length;a++)if(s[a].cid===t)return n=s[a],r&&s.splice(a,1),{value:n}}},o=0;o<e.length;o++){var a=i(o);if("object"==typeof a)return a.value}return!!n},isPeer=function(e,t,r){var n=findItem(e,t),i=findItem(e,r);return n.pid&&i.pid||!n.pid&&!i.pid},recursion=function(e,t){var r=function(e){for(var n,i,o,a=0,s=e;a<s.length;a++){var l=s[a],c=null===(o=null===(i=null===(n=null==l?void 0:l.tmpData)||void 0===n?void 0:n.source)||void 0===i?void 0:i.converse)||void 0===o?void 0:o.data;if(null==c?void 0:c.length)for(var u=0,h=c;u<h.length;u++){var d=h[u];d.code=d.code.replace(/>/g,">").replace(/</g,"<")}t(l),l&&l.children?r(l.children):l&&l.dynamicChildren?(l.dynamicChildren&&l.dynamicChildren instanceof Map&&l.dynamicChildren.forEach((function(e){r(e)})),l.dynamicChildren&&l.dynamicChildren instanceof Array&&l.dynamicChildren.forEach((function(e){r(e[1])}))):(null==l?void 0:l.stateChildren)&&r(l.stateChildren)}};r(e)},setIndex=function(e){var t=e.length,r=function(e,t){for(var n=function(n){var i=e[n];if(i&&i.children&&i.children.length){var o=i.children.length;r(i.children,o)}else if(i&&i.dynamicChildren){var a=i.dynamicChildren.length;Array.from(i.dynamicChildren).forEach((function(e,t){r(e[1],a)}))}i.z=10*t-n},i=0;i<e.length;i++)n(i)};r(e,t)},resetID=function(e){var t=function(e,r){for(var n=function(n){var i=e[n],o=genID();r?i.pid=r:i.drag||(i.baseData.left=0,i.baseData.top=0),i.cid=o,i&&i.children&&i.children.length?t(i.children,o):i&&i.dynamicChildren&&Array.from(i.dynamicChildren).forEach((function(e,r){t(e[1],o)}))},i=0;i<e.length;i++)n(i)};t(e)},updataAttribute=function(e,t,r,n){try{if(!e||!e.hasOwnProperty(t)&&!e.hasOwnProperty(n))throw"The property you want to modify is not found. Please check whether the attribute ".concat(t," is entered correctly!");if(n){_$1.cloneDeep(e[n][t]);e[n][t]=r}else e[t]=r}catch(e){console.error(e)}},updataAttributeForOption=function(e,t){var r;try{var n="tmpData";if(!e||!(null===(r=e[n])||void 0===r?void 0:r.hasOwnProperty("option")))throw new Error("The property you want to modify is not found. Please check whether the attribute 'option' is entered correctly!");var i=_$1.cloneDeep(e[n].option),o={};Object.assign(o,i,t),console.log(o,i,"newOP"),e[n].option=o}catch(e){console.error(new Error("An error occurred: ".concat(e)))}},comToggle=function(e){try{if(!e)throw" 没有找到组件";e.isShow||"false"==e.isShow?e.isShow=!1:e.isShow=!0}catch(e){console.error(e)}},setAttr=function(e,t,r){for(var n,i=0;i<e.length;i++)(n=e[i]).cid!==t&&n.id!==t||(n[r]=!n[r])},setPositionForGroup=function(e,t){t.forEach((function(t){t.baseData.left=t.baseData.left-e.left,t.baseData.top=t.baseData.top-e.top}))},resetPositionForGroup=function(e,t){var r=t.map((function(e){return e.cid}));t.forEach((function(t){t.pid&&setPositionForWorld(t,e)}));var n=selectdArea(r,t);return setPositionForGroup(n,t),{left:n.left,top:n.top,width:n.width,height:n.height}},calculateNodePosition=function(e,t,r){var n=e.baseData.left,i=e.baseData.top,o=t;if(n+=o.baseData.left,i+=o.baseData.top,r){if(r.baseData.angle){var a=r.baseData.angle*Math.PI/180,s=Math.cos(a),l=Math.sin(a),c=n*l+i*s;n=n*s-i*l,i=c}r.baseData.scale&&(n*=r.baseData.scale.x,i*=r.baseData.scale.y)}return{left:n,top:i}},breakUp=function(e,t){var r=_$1.cloneDeep(e),n=[];return r.children&&r.children.length&&r.children.forEach((function(e){var i=t&&(null==r?void 0:r.pid)?findItemDeep$1(t,r.pid):null;setPositionForWorldNew(e,r,i),n.push(e)})),n},setPositionForWorldNew=function(e,t,r){var n=calculateNodePosition(e,t,r),i=n.left,o=n.top;e.baseData.left=i,e.baseData.top=o},setPositionForWorld=function(e,t){e.baseData.left=e.baseData.left+t.left,e.baseData.top=e.baseData.top+t.top},transformPosition=function(e,t,r){var n={left:0,top:0};return e.left=e.left||0,e.top=e.top||0,t.left=t.left||0,t.top=t.top||0,r&&0!==r?(n.left=e.left-t.left,n.top=e.top-t.top):(n.left=e.left+t.left,n.top=e.top+t.top),n},resizePosition=function(e,t){var r=_$1.cloneDeep(e),n=[],i=function(e,t){var r=findItemDeep$1(e,t);n.push(r.baseData),r.pid&&i(e,r.pid)};i(r,t);var o={left:0,top:0};return n.map((function(e){e&&(o.left+=e.left,o.top+=e.top)})),o},resziePositionForGroup=function(e,t,r,n){var i=e.baseData.left,o=e.baseData.top,a=t.left,s=t.top,l=_$1.cloneDeep(e.children),c=r||"";if(a-i<0)for(var u=0;u<l.length;u++){(h=l[u]).cid!==c&&(h.baseData.left=h.baseData.left+(i-a))}if(s-o<0)for(u=0;u<l.length;u++){var h;(h=l[u]).cid!==c&&(h.baseData.top=h.baseData.top+(o-s))}e.children=l},setPorp=function(e,t,r){var n=t.find((function(t){return t.cid===e}));"folder"===n.type?n.children.length&&n.children.forEach((function(e){e[r]=!e[r]})):n[r]=!n[r]},sortArray$1=function(e,t,r){var n=e.slice();return r||(n=_$1.cloneDeep(e)),n.length>1&&n.sort((function(e,r){return e.baseData[t]-r.baseData[t]})),n},selectdArea=function(e,t){var r=[];return e.map((function(e){var n=t.find((function(t){return t.cid===e}));n&&r.push(n)})),getPosition(r)},getPosition=function(e,t){if(e.length>0){var r={left:0,top:0,width:0,height:0},n=sortArray$1(e,"left",t),i=sortArray$1(e,"top",t),o=n[0].baseData,a=n[n.length-1].baseData,s=i[0].baseData,l=i[i.length-1].baseData,c=Math.max.apply(Math,i.map((function(e){return 1*e.baseData.top+1*e.baseData.height}))),u=Math.max.apply(Math,i.map((function(e){return 1*e.baseData.left+1*e.baseData.width})));return r.left=o.left,r.width=Math.max(1*a.left+1*a.width,u)-1*o.left,r.top=s.top,r.height=Math.max(1*l.top+1*l.height,c)-1*s.top,r}return{left:0,top:0,width:0,height:0}};function safeConvertToNumber(e){try{if(null==e||""===e)return 0;var t=e.toString().match(/^-?\d+\.?\d*/);return t?Number(t[0]):0}catch(e){return console.error("Error converting to number: ".concat(e)),0}}function validateAndFixObject(e){var t={};for(var r in e)if(e.hasOwnProperty(r))try{t[r]=safeConvertToNumber(e[r])}catch(e){console.error("Error processing key ".concat(r,": ").concat(e)),t[r]=0}return t}var upDataGroup=function(e,t,r,n){var i=e.children,o=_$1.cloneDeep(t),a=_$1.cloneDeep(getPosition(i,n)),s=validateAndFixObject(o),l=s.left,c=s.top;s.width,s.height;var u=validateAndFixObject(a),h=u.left,d=u.top,f=u.width,p=u.height,m={left:l+h,top:c+d,width:f,height:p,angle:t.angle?t.angle:0};return i.forEach((function(e){var t=_$1.cloneDeep(e.baseData);e.baseData.left<0?t.left=0:t.left=t.left-h,e.baseData.top<0?t.top=0:t.top=t.top-d,e.baseData=t})),e.baseData=m,e.children=i,m},upDataGroupChildren=function(e,t,r){var n=e.children,i=_$1.cloneDeep(t),o=_$1.cloneDeep(getPosition(n)),a=i.left,s=i.top;i.width,i.height;var l=o.left,c=o.top,u=o.width,h=o.height,d={left:a+l,top:s+c,width:u,height:h,angle:t.angle?t.angle:0};return n.forEach((function(e){var t=_$1.cloneDeep(e.baseData);e.baseData.left<0?t.left=0:t.left=t.left-l,e.baseData.top<0?t.top=0:t.top=t.top-c,e.baseData=t})),e.children=n,d},resizeListPosition=function(e,t){var r=function(e,n){for(var i,o=0;o<e.length;o++){var a=e[o];if(a.pid!=n){var s=resizePosition(t,a.cid),l=resizePosition(t,a.pid);a.baseData.left=s.left-l.left,a.baseData.top=s.top-l.top}(null===(i=null==a?void 0:a.children)||void 0===i?void 0:i.length)&&r(a.children,a.cid)}};r(e,t)},RecursiveList=function(e,t){for(var r=0;r<e.length;r++){var n=e[r];e[r].index=r,n.children&&n.children.length?RecursiveList(n.children):t&&t(n)}},genID=function(){return(Math.random().toString().substr(3,10)+Date.now()).toString()},genCopyName=function(e,t,r){var n,i;void 0===r&&(r=" copy");var o=new RegExp("".concat(r,"( \\d+)?$")).exec(e);o?(n=o[1]?parseInt(o[1]):0,i=e.slice(0,o.index)):(n=0,i=e);var a=new RegExp("^".concat(i).concat(r,"( [1-9][0-9]*)?$")),s=[];t.forEach((function(e){if(o=a.exec(e)){var t=o[1]?parseInt(o[1]):1;s.push(t)}})),s.sort((function(e,t){return e-t})),n++;for(var l=0,c=s.length;l<c;l++)if(s[l]===n)n++;else if(s[l]>n)break;return i+r+" "+n},getUrlParams=function(e,t){try{var r=t||window.location.href;if(-1!=r.indexOf("?")){var n={};return r.slice(r.indexOf("?")+1).split("&").forEach((function(e){var t=e.split("=");n[t[0]]=t[1]})),e?n[e]?n[e]:null:n}return console.log("没有参数"),null}catch(e){console.error(e)}};function setActions(e,t){var r=e.types,n=e.element,i=e.actions,o=e.events,a=e.eventsComs;e.filter,store.state.globalVars;for(var s=function(e){var t=r[e],s=n.tmpData.actions[e];if(s&&s.use){a&&a.push(n.cid);var l=s[s.behave];if(!l)return"continue";"vars"===s.behave?l.map((function(e){e.type=t,e.id=n.cid,e.model=0,e.originalValue||(e.originalValue=e.value),e.mapField&&i.push(e)})):l.length>0&&l.forEach((function(e,r){"toggle"===s.behave&&""!==e.value&&e.value.length&&o.push({id:n.cid,type:s.behave,children:e.value.map((function(e){return{cid:e.cid,visible:e.visible}})),eventType:t,index:r}),"update"===s.behave&&""!==e.value&&e.value.length?o.push({id:n.cid,type:s.behave,children:e.value.map((function(e){return{cid:e.cid,visible:e.visible}})),eventType:t,index:r}):"link"===s.behave&&""!==e.value?o.push({id:n.cid,type:s.behave,link:e.value,eventType:t,target:e.target,index:r}):"page"===s.behave&&""!==e.value?o.push({id:n.cid,type:s.behave,page:e.value,params:e.params,eventType:t,index:r}):"dynamic"===s.behave&&""!==e.value&&e.value.length>0?o.push({id:n.cid,type:s.behave,dynamic:e.value,eventType:t,index:r}):o.push(void 0)}))}},l=0;l<r.length;l++)s(l)}var publicKey="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApWni7uLYVV8iyDPTR6Zs\naj+2BHCn4xTzFeVHADzTdtBiFH9i4fKeDK0IfbPV/9TGeRYNfl0qSfdLtU+1ZIzm\npqHppadukmk5+NbBG4Xm/lAZgVt3dUIrSyamxVjwnymN7PLdxaSOS/mgU6SDGMhN\nTM76AXKZZXWMK12UCXvKkh+TkGufcXzLe7LtrvHPLOgcnEED2CkWATuE9g8K9j4T\neOMxhJcHBUmXLgU6Chufa4nBed2899E7jxJa14+J1IDa2ahrDFLZN7H//ZsvwnXq\nxVbxm0k5jyWqfCpg13V7zD3DxNWlo3MIh2fPtIEUDVhugqPd0jPmqquqdBNTnu2I\nGQIDAQAB",privateKey="MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQClaeLu4thVXyLI\nM9NHpmxqP7YEcKfjFPMV5UcAPNN20GIUf2Lh8p4MrQh9s9X/1MZ5Fg1+XSpJ90u1\nT7VkjOamoemlp26SaTn41sEbheb+UBmBW3d1QitLJqbFWPCfKY3s8t3FpI5L+aBT\npIMYyE1MzvoBcplldYwrXZQJe8qSH5OQa59xfMt7su2u8c8s6BycQQPYKRYBO4T2\nDwr2PhN44zGElwcFSZcuBToKG59ricF53bz30TuPElrXj4nUgNrZqGsMUtk3sf/9\nmy/CderFVvGbSTmPJap8KmDXdXvMPcPE1aWjcwiHZ8+0gRQNWG6Co93SM+aqq6p0\nE1Oe7YgZAgMBAAECggEABN8LadGQYWM92Pt9u1xxUOezaooOx6c0SW7JGn6wE42r\ndcMSnGjSsrjdySXkpXYUqjg2CYSg3DDGL/667s0fdcTK5q/5l6I1rNhWM4NL/C1L\nsv2IlRFvyPTIcINgAq/smA/G7C0ea6pcSFpN6grsC9kEj8paLhy6FgTZeTYGDyuG\nwI3D7XWZNzWfyQlAsoWEYAmDx72rOuEaeK4W4SMf3BB2g1hJ6fZoKT3ehHozAGcJ\nB7R8k3tGALVYdOqQgXhj8t3vNu1OATG0Q6d4z28e4TwsVunxReTyRcofrgOVwpry\nEmb4C5RYaN/rWxRrL8aW+nB3wAD/PFDacVBz/8RvaQKBgQDX90jqlLtLRVAsqbiS\nSHmX67CqQzNNDWgysQLmF2YmmkGyth4QR+cNEenIEeSSt+vc0VMAbxYY5SVzVCRl\nSZHoKHNlLGmepd3aJw5ZcFnpU86J7aG8fhvgZGEmCR+1JOZU7pUbpTvka0WQC3AK\n2+O7nUYIU65xeOaJVZvUu6My+wKBgQDEE6DrFVMNgI3dDZM0buHMYDJ2mL9F1DZb\n2URxYAlmvjkpaQb9Vq1VXV0ApZ3ItXgIX6cVrJB+MILmrsoxAamFOl/9AYiKnpnb\nYMxxqFYPuME7fzEli041915j6CpMmOwrAq6SrLiZ//hNlobJf76dAY9qyX91BTC8\nBfEWVhnk+wKBgQDT5kb+G+bVSPIMkI6PwVrE7DWQKZV5YdE+A55TgtvwvmP95GEF\nGneixFO8wYmjR6C+LgihoV1uGc+wI/v+AbyOrLnkqDoNtrNB7BZRPUKLBHbfsHCE\nELxrZDJJ7qPUyZrR9LIKyQpF6db8KazKiswc9oiTfP/pSHXyhDP8/Ap55wKBgQC6\njDI9dzxdTEGsXo3/BL+vQpbAXvMb7JsLJ9sGQuiu56xayaHsxdqDrSAezXMg0gYx\ncU/2Pwf6Bw2DjCiyF3LBXpiUjjDqMZsQLThVqmK28oBlqs2HetIeZgtX4jrcRWHs\nSdDtm4bGfdIvf1cdvnwLxMA+SRcKrrV/LegB6EkaoQKBgEwE4rllfRxOSGaF47ew\nRxTLGphZmxhLDsx0fMOHflx/BnGnxruBLEhdv3mlp12YMmb2s6kwFJvngLq4fZll\nTmC7BW3Z9h8XsL9j2xtID+5gsxYHHOCcdbzGuQV5KWb51cBym7EP9qk/3NP8w3/+\nH0iKrgAII5Ym0yh41dGL5HCo";function encrypt$1(e){var t=new JSEncrypt;return t.setPublicKey(publicKey),t.encrypt(e)}function decrypt(e){var t=new JSEncrypt;return t.setPrivateKey(privateKey),t.decrypt(e)}var decryptKey={key:"anov@2019:helloX",iv:"anov@2020:helloX"};function decrypAES(e){var t=cryptoJs.enc.Utf8.parse(decryptKey.key),r=cryptoJs.enc.Utf8.parse(decryptKey.iv);return cryptoJs.AES.encrypt(e,t,{iv:r,mode:cryptoJs.mode.CBC,padding:cryptoJs.pad.Pkcs7}).toString()}function safeEval(e,t){var r=store.state.globalVars,n={};r.forEach((function(e){(null==e?void 0:e.name)&&(n[e.name]=e.value||e.originvalue)}));try{return/^(?:[^\r\n]*[\r\n]){0,2}(?:[^\r\n]*(?=\{))?\s*(?:function\s*[^\r\n]*|\(.*?\))?\s*[\w\s\$\._\[\]]*\s*(?:[=:]\s*)?(?:new\s+)?[A-Z]\w*\s*(?:\[.*?\]|\([^\r\n]*\))*\s*\{.*?\}/i.test(e),new Function("data","vars",e)(t,n)}catch(e){return console.error(e),t}}var globalSourceTemp={type:"static",converse:{use:!1,data:[]},static:{data:{},originData:""},api:{requestType:"get",url:"",headers:{use:!1,value:""},params:"",agency:!1,cookie:!0,autoUpdate:{open:!1,time:10},data:""},datasource:{data:"",inputSql:"",dsName:"",dsType:300,autoUpdate:{open:!1,time:10}},indicator:{zbId:"",zbName:"",params:"",data:"",autoUpdate:{open:!1,time:10}},staticFile:{data:"",dsName:"",dsType:201}},UpdataForContainer=function(e){var t;try{var r=[];if((null==e?void 0:e.dynamicChildren)instanceof Map)for(var n=Array.from(null==e?void 0:e.dynamicChildren),i=0;i<n.length;i++)n[i]instanceof Array&&r.push.apply(r,n[i][1]);else if((null==e?void 0:e.dynamicChildren)instanceof Array)for(n=null==e?void 0:e.dynamicChildren,i=0;i<n.length;i++)n[i]instanceof Array&&r.push.apply(r,n[i][1]);if(null==r?void 0:r.length)for(var o=0,a=r;o<a.length;o++){var s=a[o];if(s){var l=null===(t=null==s?void 0:s.tmpData)||void 0===t?void 0:t.source,c=l.type;l&&"packData"==c&&(s.tmpData.source.packData.data=e.source[0])}}}catch(e){console.log(e)}},__defProp$1=Object.defineProperty,__getOwnPropSymbols$1=Object.getOwnPropertySymbols,__hasOwnProp$1=Object.prototype.hasOwnProperty,__propIsEnum$1=Object.prototype.propertyIsEnumerable,__defNormalProp$1=(e,t,r)=>t in e?__defProp$1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues$1=(e,t)=>{for(var r in t||(t={}))__hasOwnProp$1.call(t,r)&&__defNormalProp$1(e,r,t[r]);if(__getOwnPropSymbols$1)for(var r of __getOwnPropSymbols$1(t))__propIsEnum$1.call(t,r)&&__defNormalProp$1(e,r,t[r]);return e},NOTHING=Symbol.for("immer-nothing"),DRAFTABLE=Symbol.for("immer-draftable"),DRAFT_STATE=Symbol.for("immer-state"),errors="production"!==process$1.env.NODE_ENV?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function die(e,...t){if("production"!==process$1.env.NODE_ENV){const r=errors[e],n="function"==typeof r?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var getPrototypeOf=Object.getPrototypeOf;function isDraft(e){return!!e&&!!e[DRAFT_STATE]}function isDraftable(e){var t;return!!e&&(isPlainObject(e)||Array.isArray(e)||!!e[DRAFTABLE]||!!(null==(t=e.constructor)?void 0:t[DRAFTABLE])||isMap(e)||isSet(e))}var objectCtorString=Object.prototype.constructor.toString();function isPlainObject(e){if(!e||"object"!=typeof e)return!1;const t=getPrototypeOf(e);if(null===t)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===objectCtorString}function each(e,t){0===getArchtype(e)?Reflect.ownKeys(e).forEach((r=>{t(r,e[r],e)})):e.forEach(((r,n)=>t(n,r,e)))}function getArchtype(e){const t=e[DRAFT_STATE];return t?t.type_:Array.isArray(e)?1:isMap(e)?2:isSet(e)?3:0}function has(e,t){return 2===getArchtype(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function set(e,t,r){const n=getArchtype(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function is(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function isMap(e){return e instanceof Map}function isSet(e){return e instanceof Set}function latest(e){return e.copy_||e.base_}function shallowCopy(e,t){if(isMap(e))return new Map(e);if(isSet(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=isPlainObject(e);if(!0===t||"class_only"===t&&!r){const t=Object.getOwnPropertyDescriptors(e);delete t[DRAFT_STATE];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){const i=r[n],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(getPrototypeOf(e),t)}{const t=getPrototypeOf(e);if(null!==t&&r)return __spreadValues$1({},e);const n=Object.create(t);return Object.assign(n,e)}}function freeze(e,t=!1){return isFrozen(e)||isDraft(e)||!isDraftable(e)||(getArchtype(e)>1&&(e.set=e.add=e.clear=e.delete=dontMutateFrozenCollections),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>freeze(t,!0)))),e}function dontMutateFrozenCollections(){die(2)}function isFrozen(e){return Object.isFrozen(e)}var plugins={},currentScope;function getPlugin(e){const t=plugins[e];return t||die(0,e),t}function getCurrentScope(){return currentScope}function createScope(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function usePatchesInScope(e,t){t&&(getPlugin("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function revokeScope(e){leaveScope(e),e.drafts_.forEach(revokeDraft),e.drafts_=null}function leaveScope(e){e===currentScope&&(currentScope=e.parent_)}function enterScope(e){return currentScope=createScope(currentScope,e)}function revokeDraft(e){const t=e[DRAFT_STATE];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function processResult(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return void 0!==e&&e!==r?(r[DRAFT_STATE].modified_&&(revokeScope(t),die(4)),isDraftable(e)&&(e=finalize(t,e),t.parent_||maybeFreeze(t,e)),t.patches_&&getPlugin("Patches").generateReplacementPatches_(r[DRAFT_STATE].base_,e,t.patches_,t.inversePatches_)):e=finalize(t,r,[]),revokeScope(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==NOTHING?e:void 0}function finalize(e,t,r){if(isFrozen(t))return t;const n=t[DRAFT_STATE];if(!n)return each(t,((i,o)=>finalizeProperty(e,n,t,i,o,r))),t;if(n.scope_!==e)return t;if(!n.modified_)return maybeFreeze(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const t=n.copy_;let i=t,o=!1;3===n.type_&&(i=new Set(t),t.clear(),o=!0),each(i,((i,a)=>finalizeProperty(e,n,t,i,a,r,o))),maybeFreeze(e,t,!1),r&&e.patches_&&getPlugin("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function finalizeProperty(e,t,r,n,i,o,a){if("production"!==process$1.env.NODE_ENV&&i===r&&die(5),isDraft(i)){const a=finalize(e,i,o&&t&&3!==t.type_&&!has(t.assigned_,n)?o.concat(n):void 0);if(set(r,n,a),!isDraft(a))return;e.canAutoFreeze_=!1}else a&&r.add(i);if(isDraftable(i)&&!isFrozen(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;finalize(e,i),t&&t.scope_.parent_||"symbol"==typeof n||!Object.prototype.propertyIsEnumerable.call(r,n)||maybeFreeze(e,i)}}function maybeFreeze(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&freeze(t,r)}function createProxyProxy(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:getCurrentScope(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=objectTraps;r&&(i=[n],o=arrayTraps);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return n.draft_=s,n.revoke_=a,s}var objectTraps={get(e,t){if(t===DRAFT_STATE)return e;const r=latest(e);if(!has(r,t))return readPropFromProto(e,r,t);const n=r[t];return e.finalized_||!isDraftable(n)?n:n===peek(e.base_,t)?(prepareCopy(e),e.copy_[t]=createProxy(n,e)):n},has:(e,t)=>t in latest(e),ownKeys:e=>Reflect.ownKeys(latest(e)),set(e,t,r){const n=getDescriptorFromProto(latest(e),t);if(null==n?void 0:n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const n=peek(latest(e),t),i=null==n?void 0:n[DRAFT_STATE];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(is(r,n)&&(void 0!==r||has(e.base_,t)))return!0;prepareCopy(e),markChanged(e)}return e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==peek(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,prepareCopy(e),markChanged(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const r=latest(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty(){die(11)},getPrototypeOf:e=>getPrototypeOf(e.base_),setPrototypeOf(){die(12)}},arrayTraps={};function peek(e,t){const r=e[DRAFT_STATE];return(r?latest(r):e)[t]}function readPropFromProto(e,t,r){var n;const i=getDescriptorFromProto(t,r);return i?"value"in i?i.value:null==(n=i.get)?void 0:n.call(e.draft_):void 0}function getDescriptorFromProto(e,t){if(!(t in e))return;let r=getPrototypeOf(e);for(;r;){const e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=getPrototypeOf(r)}}function markChanged(e){e.modified_||(e.modified_=!0,e.parent_&&markChanged(e.parent_))}function prepareCopy(e){e.copy_||(e.copy_=shallowCopy(e.base_,e.scope_.immer_.useStrictShallowCopy_))}each(objectTraps,((e,t)=>{arrayTraps[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),arrayTraps.deleteProperty=function(e,t){return"production"!==process$1.env.NODE_ENV&&isNaN(parseInt(t))&&die(13),arrayTraps.set.call(this,e,t,void 0)},arrayTraps.set=function(e,t,r){return"production"!==process$1.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&die(14),objectTraps.set.call(this,e[0],t,r,e[0])};var Immer2=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,r)=>{if("function"==typeof e&&"function"!=typeof t){const r=t;t=e;const n=this;return function(e=r,...i){return n.produce(e,(e=>t.call(this,e,...i)))}}let n;if("function"!=typeof t&&die(6),void 0!==r&&"function"!=typeof r&&die(7),isDraftable(e)){const i=enterScope(this),o=createProxy(e,void 0);let a=!0;try{n=t(o),a=!1}finally{a?revokeScope(i):leaveScope(i)}return usePatchesInScope(i,r),processResult(n,i)}if(!e||"object"!=typeof e){if(n=t(e),void 0===n&&(n=e),n===NOTHING&&(n=void 0),this.autoFreeze_&&freeze(n,!0),r){const t=[],i=[];getPlugin("Patches").generateReplacementPatches_(e,n,t,i),r(t,i)}return n}die(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...r)=>this.produceWithPatches(t,(t=>e(t,...r)));let r,n;const i=this.produce(e,t,((e,t)=>{r=e,n=t}));return[i,r,n]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){isDraftable(e)||die(8),isDraft(e)&&(e=current(e));const t=enterScope(this),r=createProxy(e,void 0);return r[DRAFT_STATE].isManual_=!0,leaveScope(t),r}finishDraft(e,t){const r=e&&e[DRAFT_STATE];r&&r.isManual_||die(9);const{scope_:n}=r;return usePatchesInScope(n,t),processResult(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));const n=getPlugin("Patches").applyPatches_;return isDraft(e)?n(e,t):this.produce(e,(e=>n(e,t)))}};function createProxy(e,t){const r=isMap(e)?getPlugin("MapSet").proxyMap_(e,t):isSet(e)?getPlugin("MapSet").proxySet_(e,t):createProxyProxy(e,t);return(t?t.scope_:getCurrentScope()).drafts_.push(r),r}function current(e){return isDraft(e)||die(10,e),currentImpl(e)}function currentImpl(e){if(!isDraftable(e)||isFrozen(e))return e;const t=e[DRAFT_STATE];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=shallowCopy(e,t.scope_.immer_.useStrictShallowCopy_)}else r=shallowCopy(e,!0);return each(r,((e,t)=>{set(r,e,currentImpl(t))})),t&&(t.finalized_=!1),r}var immer=new Immer2,produce=immer.produce;immer.produceWithPatches.bind(immer);var setAutoFreeze=immer.setAutoFreeze.bind(immer);function produceWithImmer(e,t){return setAutoFreeze(!1),produce(e,t)}immer.setUseStrictShallowCopy.bind(immer),immer.applyPatches.bind(immer),immer.createDraft.bind(immer),immer.finishDraft.bind(immer);var baseDataMutaitons={updataArea:function(e,t){e.currentArea=t},selectdArea:function(e,t){var r=selectdArea(t,e.list);e.currentArea=r},updataAngle:function(e,t){var r=t.id,n=t.angle,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.baseData.angle=n)},updataBaseData:function(e,t){var r,n=t.data;if(null==(null===(r=null==n?void 0:n.baseData)||void 0===r?void 0:r.opacity)&&(n.baseData.opacity=100),checkBaseData(t.data.baseData,"updataBaseData")){var i=t.ratio,o=findItemDeep$1(e.list,n.cid),a=t.oldData;if("object"!=typeof o||o.pid){if("object"==typeof o&&o.pid){var s=findItemDeep$1(e.list,o.pid);"object"==typeof s?(o.baseData.left<0&&(o.baseData.left=0),o.baseData.top<0&&(o.baseData.top=0),Object.assign(o.baseData,n.baseData),upDataGroup(s,s.baseData),e.groupFlag=!e.groupFlag):s||(o.baseData.left<0&&(o.baseData.left=0),o.baseData.top<0&&(o.baseData.top=0),Object.assign(o.baseData,n.baseData))}}else if(Object.assign(o.baseData,n.baseData),i&&o.children&&o.children.length>0){var l=o.baseData.width/a.width,c=o.baseData.height/a.height;updataSizeDeep(o.children,{xRatio:l,yRatio:c})}}},multipleUpdataBaseData:function(e,t){if(t.ratio)for(var r=t.newData,n=t.oldData,i=r.width/n.width,o=r.height/n.height,a=e.cache.length;a--;)e.cache[a].baseData.left=e.cache[a].baseData.left*i,e.cache[a].baseData.width=e.cache[a].baseData.width*i,e.cache[a].baseData.top=e.cache[a].baseData.top*o,e.cache[a].baseData.height=e.cache[a].baseData.height*o;else for(a=e.cache.length;a--;){var s=_$1.cloneDeep(e.cache[a].baseData);s.left=s.left+t.deltaX,s.top=s.top+t.deltaY,e.cache[a].comPanel?e.cache[a].comPanel.setAttrData(Object.assign(s,t.baseData)):e.cache[a].baseData=s}},multipleUpdata:function(e,t){var r=t.ids,n=t.data,i=findItemDeep$1(e.list,r);i&&Object.assign(i.baseData,n)},multipleMove:function(e,t){},move:function(e,t){var r=e.selectd,n=t.type,i=t.speed?t.speed:1;if(0!==r.length){var o=e.list.filter((function(e){return r.includes(e.cid)}));0==o.length&&(o=[findItemDeep$1(e.list,r[0])]);for(var a=0;a<o.length;a++){var s=o[a];if(s.pid&&e.selectd.length>1)return void console.warn("Only one component can be moved within a group");if("up"===n?s.baseData.top=s.baseData.top-i:"down"===n?s.baseData.top+=i:"left"===n?s.baseData.left-=i:"right"===n&&(s.baseData.left+=i),"object"==typeof s&&s.pid){var l=findItemDeep$1(e.list,s.pid);"object"==typeof l&&(upDataGroup(l,l.baseData),e.groupFlag=!e.groupFlag)}}}else console.warn("Warning! please select the component to move.")},updataGroupBaseData:function(e,t){var r=findItemDeep$1(e.list,t.pid),n=_$1.cloneDeep(r);findItemDeep$1(r.children,t.cid),upDataGroup(r,n.baseData)},editGroupBaseData:function(e,t){var r=findItemDeep$1(e.list,t);r.children.forEach((function(e){setPositionForWorld(e,r.baseData)}))},syncBaseData:function(e,t){var r=t.cid,n=t.data,i=t.isContainer,o=function(e){for(var t=0;t<e.length;t++)r===e[t].cid?(e[t].baseData=Object.assign({},e[t].baseData,n),console.log(__assign$1({},e[t].baseData))):e[t].hasOwnProperty("children")&&o(e[t].children)},a=produceWithImmer(e.list,(function(e){void 0!==i&&e.length&&o(e)}));if(i)e.list=a;else{var s=findItemDeep$1(a,r);if(s){var l=_$1.cloneDeep(s.baseData),c=Object.assign({},s.baseData,n);this.commit("GoCom/updataBaseData",{data:{cid:r,baseData:c},oldData:l,ratio:!0})}}},updataItemData:function(e,t){var r=t.cid,n=t.propsName,i=t.propsValue,o=findItemDeep$1(e.list,r);o&&(o[n]=i)},updataOpacity:function(e,t){var r=t.cid,n=t.propsValue,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&i&&(i.baseData.opacity=n)}},extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},extendStatics(e,t)};
|
|
33
|
-
/*! *****************************************************************************
|
|
34
|
-
Copyright (c) Microsoft Corporation.
|
|
35
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
36
|
-
purpose with or without fee is hereby granted.
|
|
37
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
38
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
39
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
40
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
41
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
42
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
43
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
44
|
-
***************************************************************************** */function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var __assign=function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign.apply(this,arguments)};function __spreadArray(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var _global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,keys=Object.keys,isArray=Array.isArray;function extend(e,t){return"object"!=typeof t||keys(t).forEach((function(r){e[r]=t[r]})),e}"undefined"==typeof Promise||_global.Promise||(_global.Promise=Promise);var getProto=Object.getPrototypeOf,_hasOwn={}.hasOwnProperty;function hasOwn(e,t){return _hasOwn.call(e,t)}function props(e,t){"function"==typeof t&&(t=t(getProto(e))),("undefined"==typeof Reflect?keys:Reflect.ownKeys)(t).forEach((function(r){setProp(e,r,t[r])}))}var defineProperty=Object.defineProperty;function setProp(e,t,r,n){defineProperty(e,t,extend(r&&hasOwn(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function derive(e){return{from:function(t){return e.prototype=Object.create(t.prototype),setProp(e.prototype,"constructor",e),{extend:props.bind(null,e.prototype)}}}}var getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor;function getPropertyDescriptor(e,t){var r;return getOwnPropertyDescriptor(e,t)||(r=getProto(e))&&getPropertyDescriptor(r,t)}var _slice$1=[].slice;function slice(e,t,r){return _slice$1.call(e,t,r)}function override(e,t){return t(e)}function assert(e){if(!e)throw new Error("Assertion Failed")}function asap$1(e){_global.setImmediate?setImmediate(e):setTimeout(e,0)}function arrayToObject(e,t){return e.reduce((function(e,r,n){var i=t(r,n);return i&&(e[i[0]]=i[1]),e}),{})}function getByKeyPath(e,t){if("string"==typeof t&&hasOwn(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,i=t.length;n<i;++n){var o=getByKeyPath(e,t[n]);r.push(o)}return r}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return null==s?void 0:getByKeyPath(s,t.substr(a+1))}}function setByKeyPath(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){assert("string"!=typeof r&&"length"in r);for(var n=0,i=t.length;n<i;++n)setByKeyPath(e,t[n],r[n])}else{var o=t.indexOf(".");if(-1!==o){var a=t.substr(0,o),s=t.substr(o+1);if(""===s)void 0===r?isArray(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=r;else{var l=e[a];l&&hasOwn(e,a)||(l=e[a]={}),setByKeyPath(l,s,r)}}else void 0===r?isArray(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function delByKeyPath(e,t){"string"==typeof t?setByKeyPath(e,t,void 0):"length"in t&&[].map.call(t,(function(t){setByKeyPath(e,t,void 0)}))}function shallowClone(e){var t={};for(var r in e)hasOwn(e,r)&&(t[r]=e[r]);return t}var concat=[].concat;function flatten(e){return concat.apply([],e)}var intrinsicTypeNames="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(flatten([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return _global[e]})),intrinsicTypes=new Set(intrinsicTypeNames.map((function(e){return _global[e]})));function cloneSimpleObjectTree(e){var t={};for(var r in e)if(hasOwn(e,r)){var n=e[r];t[r]=!n||"object"!=typeof n||intrinsicTypes.has(n.constructor)?n:cloneSimpleObjectTree(n)}return t}function objectIsEmpty(e){for(var t in e)if(hasOwn(e,t))return!1;return!0}var circularRefs=null;function deepClone(e){circularRefs=new WeakMap;var t=innerDeepClone(e);return circularRefs=null,t}function innerDeepClone(e){if(!e||"object"!=typeof e)return e;var t=circularRefs.get(e);if(t)return t;if(isArray(e)){t=[],circularRefs.set(e,t);for(var r=0,n=e.length;r<n;++r)t.push(innerDeepClone(e[r]))}else if(intrinsicTypes.has(e.constructor))t=e;else{var i=getProto(e);for(var o in t=i===Object.prototype?{}:Object.create(i),circularRefs.set(e,t),e)hasOwn(e,o)&&(t[o]=innerDeepClone(e[o]))}return t}var toString={}.toString;function toStringTag(e){return toString.call(e).slice(8,-1)}var iteratorSymbol="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",getIteratorOf="symbol"==typeof iteratorSymbol?function(e){var t;return null!=e&&(t=e[iteratorSymbol])&&t.apply(e)}:function(){return null};function delArrayItem(e,t){var r=e.indexOf(t);return r>=0&&e.splice(r,1),r>=0}var NO_CHAR_ARRAY={};function getArrayOf(e){var t,r,n,i;if(1===arguments.length){if(isArray(e))return e.slice();if(this===NO_CHAR_ARRAY&&"string"==typeof e)return[e];if(i=getIteratorOf(e)){for(r=[];!(n=i.next()).done;)r.push(n.value);return r}if(null==e)return[e];if("number"==typeof(t=e.length)){for(r=new Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=new Array(t);t--;)r[t]=arguments[t];return r}var isAsyncFunction="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},dexieErrorNames=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"],idbDomErrorNames=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],errorList=dexieErrorNames.concat(idbDomErrorNames),defaultTexts={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function DexieError(e,t){this.name=e,this.message=t}function getMultiErrorMessage(e,t){return e+". Errors: "+Object.keys(t).map((function(e){return t[e].toString()})).filter((function(e,t,r){return r.indexOf(e)===t})).join("\n")}function ModifyError(e,t,r,n){this.failures=t,this.failedKeys=n,this.successCount=r,this.message=getMultiErrorMessage(e,t)}function BulkError(e,t){this.name="BulkError",this.failures=Object.keys(t).map((function(e){return t[e]})),this.failuresByPos=t,this.message=getMultiErrorMessage(e,this.failures)}derive(DexieError).from(Error).extend({toString:function(){return this.name+": "+this.message}}),derive(ModifyError).from(DexieError),derive(BulkError).from(DexieError);var errnames=errorList.reduce((function(e,t){return e[t]=t+"Error",e}),{}),BaseException=DexieError,exceptions=errorList.reduce((function(e,t){var r=t+"Error";function n(e,n){this.name=r,e?"string"==typeof e?(this.message="".concat(e).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof e&&(this.message="".concat(e.name," ").concat(e.message),this.inner=e):(this.message=defaultTexts[t]||r,this.inner=null)}return derive(n).from(BaseException),e[t]=n,e}),{});exceptions.Syntax=SyntaxError,exceptions.Type=TypeError,exceptions.Range=RangeError;var exceptionMap=idbDomErrorNames.reduce((function(e,t){return e[t+"Error"]=exceptions[t],e}),{});function mapError(e,t){if(!e||e instanceof DexieError||e instanceof TypeError||e instanceof SyntaxError||!e.name||!exceptionMap[e.name])return e;var r=new exceptionMap[e.name](t||e.message,e);return"stack"in e&&setProp(r,"stack",{get:function(){return this.inner.stack}}),r}var fullNameExceptions=errorList.reduce((function(e,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=exceptions[t]),e}),{});function nop(){}function mirror(e){return e}function pureFunctionChain(e,t){return null==e||e===mirror?t:function(r){return t(e(r))}}function callBoth(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function hookCreatingChain(e,t){return e===nop?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?callBoth(n,this.onsuccess):n),i&&(this.onerror=this.onerror?callBoth(i,this.onerror):i),void 0!==o?o:r}}function hookDeletingChain(e,t){return e===nop?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?callBoth(r,this.onsuccess):r),n&&(this.onerror=this.onerror?callBoth(n,this.onerror):n)}}function hookUpdatingChain(e,t){return e===nop?t:function(r){var n=e.apply(this,arguments);extend(r,n);var i=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?callBoth(i,this.onsuccess):i),o&&(this.onerror=this.onerror?callBoth(o,this.onerror):o),void 0===n?void 0===a?void 0:a:extend(n,a)}}function reverseStoppableEventChain(e,t){return e===nop?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function promisableChain(e,t){return e===nop?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,i=arguments.length,o=new Array(i);i--;)o[i]=arguments[i];return r.then((function(){return t.apply(n,o)}))}return t.apply(this,arguments)}}fullNameExceptions.ModifyError=ModifyError,fullNameExceptions.DexieError=DexieError,fullNameExceptions.BulkError=BulkError;var debug="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function setDebug(e,t){debug=e}var INTERNAL={},ZONE_ECHO_LIMIT=100,_a$1="undefined"==typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,getProto(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,getProto(t),e]}(),resolvedNativePromise=_a$1[0],nativePromiseProto=_a$1[1],resolvedGlobalPromise=_a$1[2],nativePromiseThen=nativePromiseProto&&nativePromiseProto.then,NativePromise=resolvedNativePromise&&resolvedNativePromise.constructor,patchGlobalPromise=!!resolvedGlobalPromise;function schedulePhysicalTick(){queueMicrotask(physicalTick)}var asap=function(e,t){microtickQueue.push([e,t]),needsNewPhysicalTick&&(schedulePhysicalTick(),needsNewPhysicalTick=!1)},isOutsideMicroTick=!0,needsNewPhysicalTick=!0,unhandledErrors=[],rejectingErrors=[],rejectionMapper=mirror,globalPSD={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:nop,pgp:!1,env:{},finalize:nop},PSD=globalPSD,microtickQueue=[],numScheduledCalls=0,tickFinalizers=[];function DexiePromise(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var t=this._PSD=PSD;if("function"!=typeof e){if(e!==INTERNAL)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&handleRejection(this,this._value))}this._state=null,this._value=null,++t.ref,executePromiseTask(this,e)}var thenProp={get:function(){var e=PSD,t=totalEchoes;function r(r,n){var i=this,o=!e.global&&(e!==PSD||t!==totalEchoes),a=o&&!decrementExpectedAwaits(),s=new DexiePromise((function(t,s){propagateToListener(i,new Listener(nativeAwaitCompatibleWrap(r,e,o,a),nativeAwaitCompatibleWrap(n,e,o,a),t,s,e))}));return this._consoleTask&&(s._consoleTask=this._consoleTask),s}return r.prototype=INTERNAL,r},set:function(e){setProp(this,"then",e&&e.prototype===INTERNAL?thenProp:{get:function(){return e},set:thenProp.set})}};function Listener(e,t,r,n,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=i}function executePromiseTask(e,t){try{t((function(t){if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var r=e._lib&&beginMicroTickScope();t&&"function"==typeof t.then?executePromiseTask(e,(function(e,r){t instanceof DexiePromise?t._then(e,r):t.then(e,r)})):(e._state=!0,e._value=t,propagateAllListeners(e)),r&&endMicroTickScope()}}),handleRejection.bind(null,e))}catch(t){handleRejection(e,t)}}function handleRejection(e,t){if(rejectingErrors.push(t),null===e._state){var r=e._lib&&beginMicroTickScope();t=rejectionMapper(t),e._state=!1,e._value=t,addPossiblyUnhandledError(e),propagateAllListeners(e),r&&endMicroTickScope()}}function propagateAllListeners(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)propagateToListener(e,t[r]);var i=e._PSD;--i.ref||i.finalize(),0===numScheduledCalls&&(++numScheduledCalls,asap((function(){0==--numScheduledCalls&&finalizePhysicalTick()}),[]))}function propagateToListener(e,t){if(null!==e._state){var r=e._state?t.onFulfilled:t.onRejected;if(null===r)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++numScheduledCalls,asap(callListener,[r,e,t])}else e._listeners.push(t)}function callListener(e,t,r){try{var n,i=t._value;!t._state&&rejectingErrors.length&&(rejectingErrors=[]),n=debug&&t._consoleTask?t._consoleTask.run((function(){return e(i)})):e(i),t._state||-1!==rejectingErrors.indexOf(i)||markErrorAsHandled(t),r.resolve(n)}catch(e){r.reject(e)}finally{0==--numScheduledCalls&&finalizePhysicalTick(),--r.psd.ref||r.psd.finalize()}}function physicalTick(){usePSD(globalPSD,(function(){beginMicroTickScope()&&endMicroTickScope()}))}function beginMicroTickScope(){var e=isOutsideMicroTick;return isOutsideMicroTick=!1,needsNewPhysicalTick=!1,e}function endMicroTickScope(){var e,t,r;do{for(;microtickQueue.length>0;)for(e=microtickQueue,microtickQueue=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}}while(microtickQueue.length>0);isOutsideMicroTick=!0,needsNewPhysicalTick=!0}function finalizePhysicalTick(){var e=unhandledErrors;unhandledErrors=[],e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));for(var t=tickFinalizers.slice(0),r=t.length;r;)t[--r]()}function run_at_end_of_this_or_next_physical_tick(e){tickFinalizers.push((function t(){e(),tickFinalizers.splice(tickFinalizers.indexOf(t),1)})),++numScheduledCalls,asap((function(){0==--numScheduledCalls&&finalizePhysicalTick()}),[])}function addPossiblyUnhandledError(e){unhandledErrors.some((function(t){return t._value===e._value}))||unhandledErrors.push(e)}function markErrorAsHandled(e){for(var t=unhandledErrors.length;t;)if(unhandledErrors[--t]._value===e._value)return void unhandledErrors.splice(t,1)}function PromiseReject(e){return new DexiePromise(INTERNAL,!1,e)}function wrap$1(e,t){var r=PSD;return function(){var n=beginMicroTickScope(),i=PSD;try{return switchToZone(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{switchToZone(i,!1),n&&endMicroTickScope()}}}props(DexiePromise.prototype,{then:thenProp,_then:function(e,t){propagateToListener(this,new Listener(null,null,e,t,PSD))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],r=arguments[1];return"function"==typeof t?this.then(null,(function(e){return e instanceof t?r(e):PromiseReject(e)})):this.then(null,(function(e){return e&&e.name===t?r(e):PromiseReject(e)}))},finally:function(e){return this.then((function(t){return DexiePromise.resolve(e()).then((function(){return t}))}),(function(t){return DexiePromise.resolve(e()).then((function(){return PromiseReject(t)}))}))},timeout:function(e,t){var r=this;return e<1/0?new DexiePromise((function(n,i){var o=setTimeout((function(){return i(new exceptions.Timeout(t))}),e);r.then(n,i).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&setProp(DexiePromise.prototype,Symbol.toStringTag,"Dexie.Promise"),globalPSD.env=snapShot(),props(DexiePromise,{all:function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t,r){0===e.length&&t([]);var n=e.length;e.forEach((function(i,o){return DexiePromise.resolve(i).then((function(r){e[o]=r,--n||t(e)}),r)}))}))},resolve:function(e){return e instanceof DexiePromise?e:e&&"function"==typeof e.then?new DexiePromise((function(t,r){e.then(t,r)})):new DexiePromise(INTERNAL,!0,e)},reject:PromiseReject,race:function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t,r){e.map((function(e){return DexiePromise.resolve(e).then(t,r)}))}))},PSD:{get:function(){return PSD},set:function(e){return PSD=e}},totalEchoes:{get:function(){return totalEchoes}},newPSD:newScope,usePSD:usePSD,scheduler:{get:function(){return asap},set:function(e){asap=e}},rejectionMapper:{get:function(){return rejectionMapper},set:function(e){rejectionMapper=e}},follow:function(e,t){return new DexiePromise((function(r,n){return newScope((function(t,r){var n=PSD;n.unhandleds=[],n.onunhandled=r,n.finalize=callBoth((function(){var e=this;run_at_end_of_this_or_next_physical_tick((function(){0===e.unhandleds.length?t():r(e.unhandleds[0])}))}),n.finalize),e()}),t,r,n)}))}}),NativePromise&&(NativePromise.allSettled&&setProp(DexiePromise,"allSettled",(function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t){0===e.length&&t([]);var r=e.length,n=new Array(r);e.forEach((function(e,i){return DexiePromise.resolve(e).then((function(e){return n[i]={status:"fulfilled",value:e}}),(function(e){return n[i]={status:"rejected",reason:e}})).then((function(){return--r||t(n)}))}))}))})),NativePromise.any&&"undefined"!=typeof AggregateError&&setProp(DexiePromise,"any",(function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t,r){0===e.length&&r(new AggregateError([]));var n=e.length,i=new Array(n);e.forEach((function(e,o){return DexiePromise.resolve(e).then((function(e){return t(e)}),(function(e){i[o]=e,--n||r(new AggregateError(i))}))}))}))})));var task={awaits:0,echoes:0,id:0},taskCounter=0,zoneStack=[],zoneEchoes=0,totalEchoes=0,zone_id_counter=0;function newScope(e,t,r,n){var i=PSD,o=Object.create(i);o.parent=i,o.ref=0,o.global=!1,o.id=++zone_id_counter,globalPSD.env,o.env=patchGlobalPromise?{Promise:DexiePromise,PromiseProp:{value:DexiePromise,configurable:!0,writable:!0},all:DexiePromise.all,race:DexiePromise.race,allSettled:DexiePromise.allSettled,any:DexiePromise.any,resolve:DexiePromise.resolve,reject:DexiePromise.reject}:{},t&&extend(o,t),++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=usePSD(o,e,r,n);return 0===o.ref&&o.finalize(),a}function incrementExpectedAwaits(){return task.id||(task.id=++taskCounter),++task.awaits,task.echoes+=ZONE_ECHO_LIMIT,task.id}function decrementExpectedAwaits(){return!!task.awaits&&(0==--task.awaits&&(task.id=0),task.echoes=task.awaits*ZONE_ECHO_LIMIT,!0)}function onPossibleParallellAsync(e){return task.echoes&&e&&e.constructor===NativePromise?(incrementExpectedAwaits(),e.then((function(e){return decrementExpectedAwaits(),e}),(function(e){return decrementExpectedAwaits(),rejection(e)}))):e}function zoneEnterEcho(e){++totalEchoes,task.echoes&&0!=--task.echoes||(task.echoes=task.awaits=task.id=0),zoneStack.push(PSD),switchToZone(e,!0)}function zoneLeaveEcho(){var e=zoneStack[zoneStack.length-1];zoneStack.pop(),switchToZone(e,!1)}function switchToZone(e,t){var r=PSD;if((t?!task.echoes||zoneEchoes++&&e===PSD:!zoneEchoes||--zoneEchoes&&e===PSD)||queueMicrotask(t?zoneEnterEcho.bind(null,e):zoneLeaveEcho),e!==PSD&&(PSD=e,r===globalPSD&&(globalPSD.env=snapShot()),patchGlobalPromise)){var n=globalPSD.env.Promise,i=e.env;(r.global||e.global)&&(Object.defineProperty(_global,"Promise",i.PromiseProp),n.all=i.all,n.race=i.race,n.resolve=i.resolve,n.reject=i.reject,i.allSettled&&(n.allSettled=i.allSettled),i.any&&(n.any=i.any))}}function snapShot(){var e=_global.Promise;return patchGlobalPromise?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(_global,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject}:{}}function usePSD(e,t,r,n,i){var o=PSD;try{return switchToZone(e,!0),t(r,n,i)}finally{switchToZone(o,!1)}}function nativeAwaitCompatibleWrap(e,t,r,n){return"function"!=typeof e?e:function(){var i=PSD;r&&incrementExpectedAwaits(),switchToZone(t,!0);try{return e.apply(this,arguments)}finally{switchToZone(i,!1),n&&queueMicrotask(decrementExpectedAwaits)}}}function execInGlobalContext(e){Promise===NativePromise&&0===task.echoes?0===zoneEchoes?e():enqueueNativeMicroTask(e):setTimeout(e,0)}-1===(""+nativePromiseThen).indexOf("[native code]")&&(incrementExpectedAwaits=decrementExpectedAwaits=nop);var rejection=DexiePromise.reject;function tempTransaction(e,t,r,n){if(e.idbdb&&(e._state.openComplete||PSD.letThrough||e._vip)){var i=e._createTransaction(t,r,e._dbSchema);try{i.create(),e._state.PR1398_maxLoop=3}catch(i){return i.name===errnames.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e.close({disableAutoOpen:!1}),e.open().then((function(){return tempTransaction(e,t,r,n)}))):rejection(i)}return i._promise(t,(function(e,t){return newScope((function(){return PSD.trans=i,n(e,t,i)}))})).then((function(e){if("readwrite"===t)try{i.idbtrans.commit()}catch(e){}return"readonly"===t?e:i._completion.then((function(){return e}))}))}if(e._state.openComplete)return rejection(new exceptions.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._state.autoOpen)return rejection(new exceptions.DatabaseClosed);e.open().catch(nop)}return e._state.dbReadyPromise.then((function(){return tempTransaction(e,t,r,n)}))}var DEXIE_VERSION="4.0.4",maxString=String.fromCharCode(65535),minKey=-1/0,INVALID_KEY_ARGUMENT="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",STRING_EXPECTED="String expected.",connections=[],DBNAMES_DB="__dbnames",READONLY="readonly",READWRITE="readwrite";function combine(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var AnyRange={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function workaroundForUndefinedPrimKey(e){return"string"!=typeof e||/\./.test(e)?function(e){return e}:function(t){return void 0===t[e]&&e in t&&delete(t=deepClone(t))[e],t}}function Entity(){throw exceptions.Type()}function cmp(e,t){try{var r=type(e),n=type(t);if(r!==n)return"Array"===r?1:"Array"===n?-1:"binary"===r?1:"binary"===n?-1:"string"===r?1:"string"===n?-1:"Date"===r?1:"Date"!==n?NaN:-1;switch(r){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return compareUint8Arrays(getUint8Array(e),getUint8Array(t));case"Array":return compareArrays(e,t)}}catch(e){}return NaN}function compareArrays(e,t){for(var r=e.length,n=t.length,i=r<n?r:n,o=0;o<i;++o){var a=cmp(e[o],t[o]);if(0!==a)return a}return r===n?0:r<n?-1:1}function compareUint8Arrays(e,t){for(var r=e.length,n=t.length,i=r<n?r:n,o=0;o<i;++o)if(e[o]!==t[o])return e[o]<t[o]?-1:1;return r===n?0:r<n?-1:1}function type(e){var t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";var r=toStringTag(e);return"ArrayBuffer"===r?"binary":r}function getUint8Array(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}var Table=function(){function e(){}return e.prototype._trans=function(e,t,r){var n=this._tx||PSD.trans,i=this.name,o=debug&&"undefined"!=typeof console&&console.createTask&&console.createTask("Dexie: ".concat("readonly"===e?"read":"write"," ").concat(this.name));function a(e,r,n){if(!n.schema[i])throw new exceptions.NotFound("Table "+i+" not part of transaction");return t(n.idbtrans,n)}var s=beginMicroTickScope();try{var l=n&&n.db._novip===this.db._novip?n===PSD.trans?n._promise(e,a,r):newScope((function(){return n._promise(e,a,r)}),{trans:n,transless:PSD.transless||PSD}):tempTransaction(this.db,e,[this.name],a);return o&&(l._consoleTask=o,l=l.catch((function(e){return console.trace(e),rejection(e)}))),l}finally{s&&endMicroTickScope()}},e.prototype.get=function(e,t){var r=this;return e&&e.constructor===Object?this.where(e).first(t):null==e?rejection(new exceptions.Type("Invalid argument to Table.get()")):this._trans("readonly",(function(t){return r.core.get({trans:t,key:e}).then((function(e){return r.hook.reading.fire(e)}))})).then(t)},e.prototype.where=function(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(isArray(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var t=keys(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(e){if(e.compound&&t.every((function(t){return e.keyPath.indexOf(t)>=0}))){for(var r=0;r<t.length;++r)if(-1===t.indexOf(e.keyPath[r]))return!1;return!0}return!1})).sort((function(e,t){return e.keyPath.length-t.keyPath.length}))[0];if(r&&this.db._maxKey!==maxString){var n=r.keyPath.slice(0,t.length);return this.where(n).equals(n.map((function(t){return e[t]})))}!r&&debug&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(t.join("+"),"]"));var i=this.schema.idxByName,o=this.db._deps.indexedDB;function a(e,t){return 0===o.cmp(e,t)}var s=t.reduce((function(t,r){var n=t[0],o=t[1],s=i[r],l=e[r];return[n||s,n||!s?combine(o,s&&s.multi?function(e){var t=getByKeyPath(e,r);return isArray(t)&&t.some((function(e){return a(l,e)}))}:function(e){return a(l,getByKeyPath(e,r))}):o]}),[null,null]),l=s[0],c=s[1];return l?this.where(l.name).equals(e[l.keyPath]).filter(c):r?this.filter(c):this.where(t).equals("")},e.prototype.filter=function(e){return this.toCollection().and(e)},e.prototype.count=function(e){return this.toCollection().count(e)},e.prototype.offset=function(e){return this.toCollection().offset(e)},e.prototype.limit=function(e){return this.toCollection().limit(e)},e.prototype.each=function(e){return this.toCollection().each(e)},e.prototype.toArray=function(e){return this.toCollection().toArray(e)},e.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},e.prototype.orderBy=function(e){return new this.db.Collection(new this.db.WhereClause(this,isArray(e)?"[".concat(e.join("+"),"]"):e))},e.prototype.reverse=function(){return this.toCollection().reverse()},e.prototype.mapToClass=function(e){var t=this.db,r=this.name;this.schema.mappedClass=e,e.prototype instanceof Entity&&(e=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return __extends(n,e),Object.defineProperty(n.prototype,"db",{get:function(){return t},enumerable:!1,configurable:!0}),n.prototype.table=function(){return r},n}(e));for(var n=new Set,i=e.prototype;i;i=getProto(i))Object.getOwnPropertyNames(i).forEach((function(e){return n.add(e)}));var o=function(t){if(!t)return t;var r=Object.create(e.prototype);for(var i in t)if(!n.has(i))try{r[i]=t[i]}catch(e){}return r};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=o,this.hook("reading",o),e},e.prototype.defineClass=function(){return this.mapToClass((function(e){extend(this,e)}))},e.prototype.add=function(e,t){var r=this,n=this.schema.primKey,i=n.auto,o=n.keyPath,a=e;return o&&i&&(a=workaroundForUndefinedPrimKey(o)(e)),this._trans("readwrite",(function(e){return r.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):e.lastResult})).then((function(t){if(o)try{setByKeyPath(e,o,t)}catch(e){}return t}))},e.prototype.update=function(e,t){if("object"!=typeof e||isArray(e))return this.where(":id").equals(e).modify(t);var r=getByKeyPath(e,this.schema.primKey.keyPath);return void 0===r?rejection(new exceptions.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(r).modify(t)},e.prototype.put=function(e,t){var r=this,n=this.schema.primKey,i=n.auto,o=n.keyPath,a=e;return o&&i&&(a=workaroundForUndefinedPrimKey(o)(e)),this._trans("readwrite",(function(e){return r.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):e.lastResult})).then((function(t){if(o)try{setByKeyPath(e,o,t)}catch(e){}return t}))},e.prototype.delete=function(e){var t=this;return this._trans("readwrite",(function(r){return t.core.mutate({trans:r,type:"delete",keys:[e]})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):void 0}))},e.prototype.clear=function(){var e=this;return this._trans("readwrite",(function(t){return e.core.mutate({trans:t,type:"deleteRange",range:AnyRange})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):void 0}))},e.prototype.bulkGet=function(e){var t=this;return this._trans("readonly",(function(r){return t.core.getMany({keys:e,trans:r}).then((function(e){return e.map((function(e){return t.hook.reading.fire(e)}))}))}))},e.prototype.bulkAdd=function(e,t,r){var n=this,i=Array.isArray(t)?t:void 0,o=(r=r||(i?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(function(t){var r=n.schema.primKey,a=r.auto,s=r.keyPath;if(s&&i)throw new exceptions.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new exceptions.InvalidArgument("Arguments objects and keys must have the same length");var l=e.length,c=s&&a?e.map(workaroundForUndefinedPrimKey(s)):e;return n.core.mutate({trans:t,type:"add",keys:i,values:c,wantResults:o}).then((function(e){var t=e.numFailures,r=e.results,i=e.lastResult,a=e.failures;if(0===t)return o?r:i;throw new BulkError("".concat(n.name,".bulkAdd(): ").concat(t," of ").concat(l," operations failed"),a)}))}))},e.prototype.bulkPut=function(e,t,r){var n=this,i=Array.isArray(t)?t:void 0,o=(r=r||(i?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(function(t){var r=n.schema.primKey,a=r.auto,s=r.keyPath;if(s&&i)throw new exceptions.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new exceptions.InvalidArgument("Arguments objects and keys must have the same length");var l=e.length,c=s&&a?e.map(workaroundForUndefinedPrimKey(s)):e;return n.core.mutate({trans:t,type:"put",keys:i,values:c,wantResults:o}).then((function(e){var t=e.numFailures,r=e.results,i=e.lastResult,a=e.failures;if(0===t)return o?r:i;throw new BulkError("".concat(n.name,".bulkPut(): ").concat(t," of ").concat(l," operations failed"),a)}))}))},e.prototype.bulkUpdate=function(e){var t=this,r=this.core,n=e.map((function(e){return e.key})),i=e.map((function(e){return e.changes})),o=[];return this._trans("readwrite",(function(a){return r.getMany({trans:a,keys:n,cache:"clone"}).then((function(s){var l=[],c=[];e.forEach((function(e,r){var n=e.key,i=e.changes,a=s[r];if(a){for(var u=0,h=Object.keys(i);u<h.length;u++){var d=h[u],f=i[d];if(d===t.schema.primKey.keyPath){if(0!==cmp(f,n))throw new exceptions.Constraint("Cannot update primary key in bulkUpdate()")}else setByKeyPath(a,d,f)}o.push(r),l.push(n),c.push(a)}}));var u=l.length;return r.mutate({trans:a,type:"put",keys:l,values:c,updates:{keys:n,changeSpecs:i}}).then((function(e){var r=e.numFailures,n=e.failures;if(0===r)return u;for(var i=0,a=Object.keys(n);i<a.length;i++){var s=a[i],l=o[Number(s)];if(null!=l){var c=n[s];delete n[s],n[l]=c}}throw new BulkError("".concat(t.name,".bulkUpdate(): ").concat(r," of ").concat(u," operations failed"),n)}))}))}))},e.prototype.bulkDelete=function(e){var t=this,r=e.length;return this._trans("readwrite",(function(r){return t.core.mutate({trans:r,type:"delete",keys:e})})).then((function(e){var n=e.numFailures,i=e.lastResult,o=e.failures;if(0===n)return i;throw new BulkError("".concat(t.name,".bulkDelete(): ").concat(n," of ").concat(r," operations failed"),o)}))},e}();function Events(e){var t={},r=function(r,n){if(n){for(var i=arguments.length,o=new Array(i-1);--i;)o[i-1]=arguments[i];return t[r].subscribe.apply(null,o),e}if("string"==typeof r)return t[r]};r.addEventType=o;for(var n=1,i=arguments.length;n<i;++n)o(arguments[n]);return r;function o(e,n,i){if("object"!=typeof e){var a;n||(n=reverseStoppableEventChain),i||(i=nop);var s={subscribers:[],fire:i,subscribe:function(e){-1===s.subscribers.indexOf(e)&&(s.subscribers.push(e),s.fire=n(s.fire,e))},unsubscribe:function(e){s.subscribers=s.subscribers.filter((function(t){return t!==e})),s.fire=s.subscribers.reduce(n,i)}};return t[e]=r[e]=s,s}keys(a=e).forEach((function(e){var t=a[e];if(isArray(t))o(e,a[e][0],a[e][1]);else{if("asap"!==t)throw new exceptions.InvalidArgument("Invalid event config");var r=o(e,mirror,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){asap$1((function(){e.apply(null,t)}))}))}))}}))}}function makeClassConstructor(e,t){return derive(t).from({prototype:e}),t}function createTableConstructor(e){return makeClassConstructor(Table.prototype,(function(t,r,n){this.db=e,this._tx=n,this.name=t,this.schema=r,this.hook=e._allTables[t]?e._allTables[t].hook:Events(null,{creating:[hookCreatingChain,nop],reading:[pureFunctionChain,mirror],updating:[hookUpdatingChain,nop],deleting:[hookDeletingChain,nop]})}))}function isPlainKeyRange(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function addFilter(e,t){e.filter=combine(e.filter,t)}function addReplayFilter(e,t,r){var n=e.replayFilter;e.replayFilter=n?function(){return combine(n(),t())}:t,e.justLimit=r&&!n}function addMatchFilter(e,t){e.isMatch=combine(e.isMatch,t)}function getIndexOrStore(e,t){if(e.isPrimKey)return t.primaryKey;var r=t.getIndexByKeyPath(e.index);if(!r)throw new exceptions.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function openCursor(e,t,r){var n=getIndexOrStore(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:n,range:e.range}})}function iter(e,t,r,n){var i=e.replayFilter?combine(e.filter,e.replayFilter()):e.filter;if(e.or){var o={},a=function(e,r,n){if(!i||i(r,n,(function(e){return r.stop(e)}),(function(e){return r.fail(e)}))){var a=r.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),hasOwn(o,s)||(o[s]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(a,r),iterate(openCursor(e,n,r),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return iterate(openCursor(e,n,r),combine(e.algorithm,i),t,!e.keysOnly&&e.valueMapper)}function iterate(e,t,r,n){var i=n?function(e,t,i){return r(n(e),t,i)}:r,o=wrap$1(i);return e.then((function(e){if(e)return e.start((function(){var r=function(){return e.continue()};t&&!t(e,(function(e){return r=e}),(function(t){e.stop(t),r=nop}),(function(t){e.fail(t),r=nop}))||o(e.value,e,(function(e){return r=e})),r()}))}))}var PropModification=function(){function e(e){Object.assign(this,e)}return e.prototype.execute=function(e){var t,r=null===(t=this.replacePrefix)||void 0===t?void 0:t[0];return r&&"string"==typeof e&&e.startsWith(r)?this.replacePrefix[1]+e.substring(r.length):e},e}(),Collection=function(){function e(){}return e.prototype._read=function(e,t){var r=this._ctx;return r.error?r.table._trans(null,rejection.bind(null,r.error)):r.table._trans("readonly",e).then(t)},e.prototype._write=function(e){var t=this._ctx;return t.error?t.table._trans(null,rejection.bind(null,t.error)):t.table._trans("readwrite",e,"locked")},e.prototype._addAlgorithm=function(e){var t=this._ctx;t.algorithm=combine(t.algorithm,e)},e.prototype._iterate=function(e,t){return iter(this._ctx,e,t,this._ctx.table.core)},e.prototype.clone=function(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&extend(r,e),t._ctx=r,t},e.prototype.raw=function(){return this._ctx.valueMapper=null,this},e.prototype.each=function(e){var t=this._ctx;return this._read((function(r){return iter(t,e,r,t.table.core)}))},e.prototype.count=function(e){var t=this;return this._read((function(e){var r=t._ctx,n=r.table.core;if(isPlainKeyRange(r,!0))return n.count({trans:e,query:{index:getIndexOrStore(r,n.schema),range:r.range}}).then((function(e){return Math.min(e,r.limit)}));var i=0;return iter(r,(function(){return++i,!1}),e,n).then((function(){return i}))})).then(e)},e.prototype.sortBy=function(e,t){var r=e.split(".").reverse(),n=r[0],i=r.length-1;function o(e,t){return t?o(e[r[t]],t-1):e[n]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var r=o(e,i),n=o(t,i);return r<n?-a:r>n?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)},e.prototype.toArray=function(e){var t=this;return this._read((function(e){var r=t._ctx;if("next"===r.dir&&isPlainKeyRange(r,!0)&&r.limit>0){var n=r.valueMapper,i=getIndexOrStore(r,r.table.core.schema);return r.table.core.query({trans:e,limit:r.limit,values:!0,query:{index:i,range:r.range}}).then((function(e){var t=e.result;return n?t.map(n):t}))}var o=[];return iter(r,(function(e){return o.push(e)}),e,r.table.core).then((function(){return o}))}),e)},e.prototype.offset=function(e){var t=this._ctx;return e<=0||(t.offset+=e,isPlainKeyRange(t)?addReplayFilter(t,(function(){var t=e;return function(e,r){return 0===t||(1===t?(--t,!1):(r((function(){e.advance(t),t=0})),!1))}})):addReplayFilter(t,(function(){var t=e;return function(){return--t<0}}))),this},e.prototype.limit=function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),addReplayFilter(this._ctx,(function(){var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}}),!0),this},e.prototype.until=function(e,t){return addFilter(this._ctx,(function(r,n,i){return!e(r.value)||(n(i),t)})),this},e.prototype.first=function(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)},e.prototype.last=function(e){return this.reverse().first(e)},e.prototype.filter=function(e){return addFilter(this._ctx,(function(t){return e(t.value)})),addMatchFilter(this._ctx,e),this},e.prototype.and=function(e){return this.filter(e)},e.prototype.or=function(e){return new this.db.WhereClause(this._ctx.table,e,this)},e.prototype.reverse=function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},e.prototype.desc=function(){return this.reverse()},e.prototype.eachKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,r){e(r.key,r)}))},e.prototype.eachUniqueKey=function(e){return this._ctx.unique="unique",this.eachKey(e)},e.prototype.eachPrimaryKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,r){e(r.primaryKey,r)}))},e.prototype.keys=function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,t){r.push(t.key)})).then((function(){return r})).then(e)},e.prototype.primaryKeys=function(e){var t=this._ctx;if("next"===t.dir&&isPlainKeyRange(t,!0)&&t.limit>0)return this._read((function(e){var r=getIndexOrStore(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:r,range:t.range}})})).then((function(e){return e.result})).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,t){r.push(t.primaryKey)})).then((function(){return r})).then(e)},e.prototype.uniqueKeys=function(e){return this._ctx.unique="unique",this.keys(e)},e.prototype.firstKey=function(e){return this.limit(1).keys((function(e){return e[0]})).then(e)},e.prototype.lastKey=function(e){return this.reverse().firstKey(e)},e.prototype.distinct=function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var r={};return addFilter(this._ctx,(function(e){var t=e.primaryKey.toString(),n=hasOwn(r,t);return r[t]=!0,!n})),this},e.prototype.modify=function(e){var t=this,r=this._ctx;return this._write((function(n){var i;if("function"==typeof e)i=e;else{var o=keys(e),a=o.length;i=function(t){for(var r=!1,n=0;n<a;++n){var i=o[n],s=e[i],l=getByKeyPath(t,i);s instanceof PropModification?(setByKeyPath(t,i,s.execute(l)),r=!0):l!==s&&(setByKeyPath(t,i,s),r=!0)}return r}}var s=r.table.core,l=s.schema.primaryKey,c=l.outbound,u=l.extractKey,h=t.db._options.modifyChunkSize||200,d=[],f=0,p=[],m=function(e,t){var r=t.failures,n=t.numFailures;f+=e-n;for(var i=0,o=keys(r);i<o.length;i++){var a=o[i];d.push(r[a])}};return t.clone().primaryKeys().then((function(t){var o=function(a){var l=Math.min(h,t.length-a);return s.getMany({trans:n,keys:t.slice(a,a+l),cache:"immutable"}).then((function(d){for(var f=[],p=[],g=c?[]:null,v=[],y=0;y<l;++y){var _=d[y],b={value:deepClone(_),primKey:t[a+y]};!1!==i.call(b,b.value,b)&&(null==b.value?v.push(t[a+y]):c||0===cmp(u(_),u(b.value))?(p.push(b.value),c&&g.push(t[a+y])):(v.push(t[a+y]),f.push(b.value)))}var w=isPlainKeyRange(r)&&r.limit===1/0&&("function"!=typeof e||e===deleteCallback)&&{index:r.index,range:r.range};return Promise.resolve(f.length>0&&s.mutate({trans:n,type:"add",values:f}).then((function(e){for(var t in e.failures)v.splice(parseInt(t),1);m(f.length,e)}))).then((function(){return(p.length>0||w&&"object"==typeof e)&&s.mutate({trans:n,type:"put",keys:g,values:p,criteria:w,changeSpec:"function"!=typeof e&&e}).then((function(e){return m(p.length,e)}))})).then((function(){return(v.length>0||w&&e===deleteCallback)&&s.mutate({trans:n,type:"delete",keys:v,criteria:w}).then((function(e){return m(v.length,e)}))})).then((function(){return t.length>a+l&&o(a+h)}))}))};return o(0).then((function(){if(d.length>0)throw new ModifyError("Error modifying one or more objects",d,f,p);return t.length}))}))}))},e.prototype.delete=function(){var e=this._ctx,t=e.range;return isPlainKeyRange(e)&&(e.isPrimKey||3===t.type)?this._write((function(r){var n=e.table.core.schema.primaryKey,i=t;return e.table.core.count({trans:r,query:{index:n,range:i}}).then((function(t){return e.table.core.mutate({trans:r,type:"deleteRange",range:i}).then((function(e){var r=e.failures;e.lastResult,e.results;var n=e.numFailures;if(n)throw new ModifyError("Could not delete some values",Object.keys(r).map((function(e){return r[e]})),t-n);return t-n}))}))})):this.modify(deleteCallback)},e}(),deleteCallback=function(e,t){return t.value=null};function createCollectionConstructor(e){return makeClassConstructor(Collection.prototype,(function(t,r){this.db=e;var n=AnyRange,i=null;if(r)try{n=r()}catch(e){i=e}var o=t._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:i,or:o.or,valueMapper:s!==mirror?s:null}}))}function simpleCompare(e,t){return e<t?-1:e===t?0:1}function simpleCompareReverse(e,t){return e>t?-1:e===t?0:1}function fail(e,t,r){var n=e instanceof WhereClause?new e.Collection(e):e;return n._ctx.error=r?new r(t):new TypeError(t),n}function emptyCollection(e){return new e.Collection(e,(function(){return rangeEqual("")})).limit(0)}function upperFactory(e){return"next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()}}function lowerFactory(e){return"next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()}}function nextCasing(e,t,r,n,i,o){for(var a=Math.min(e.length,n.length),s=-1,l=0;l<a;++l){var c=t[l];if(c!==n[l])return i(e[l],r[l])<0?e.substr(0,l)+r[l]+r.substr(l+1):i(e[l],n[l])<0?e.substr(0,l)+n[l]+r.substr(l+1):s>=0?e.substr(0,s)+t[s]+r.substr(s+1):null;i(e[l],c)<0&&(s=l)}return a<n.length&&"next"===o?e+r.substr(e.length):a<e.length&&"prev"===o?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}function addIgnoreCaseAlgorithm(e,t,r,n){var i,o,a,s,l,c,u,h=r.length;if(!r.every((function(e){return"string"==typeof e})))return fail(e,STRING_EXPECTED);function d(e){i=upperFactory(e),o=lowerFactory(e),a="next"===e?simpleCompare:simpleCompareReverse;var t=r.map((function(e){return{lower:o(e),upper:i(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),l=t.map((function(e){return e.lower})),c=e,u="next"===e?"":n}d("next");var f=new e.Collection(e,(function(){return createRange(s[0],l[h-1]+n)}));f._ondirectionchange=function(e){d(e)};var p=0;return f._addAlgorithm((function(e,r,n){var i=e.key;if("string"!=typeof i)return!1;var d=o(i);if(t(d,l,p))return!0;for(var f=null,m=p;m<h;++m){var g=nextCasing(i,d,s[m],l[m],a,c);null===g&&null===f?p=m+1:(null===f||a(f,g)>0)&&(f=g)}return r(null!==f?function(){e.continue(f+u)}:n),!1})),f}function createRange(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function rangeEqual(e){return{type:1,lower:e,upper:e}}var WhereClause=function(){function e(){}return Object.defineProperty(e.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),e.prototype.between=function(e,t,r,n){r=!1!==r,n=!0===n;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(r||n)&&(!r||!n)?emptyCollection(this):new this.Collection(this,(function(){return createRange(e,t,!r,!n)}))}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}},e.prototype.equals=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return rangeEqual(e)}))},e.prototype.above=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(e,void 0,!0)}))},e.prototype.aboveOrEqual=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(e,void 0,!1)}))},e.prototype.below=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(void 0,e,!1,!0)}))},e.prototype.belowOrEqual=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(void 0,e)}))},e.prototype.startsWith=function(e){return"string"!=typeof e?fail(this,STRING_EXPECTED):this.between(e,e+maxString,!0,!0)},e.prototype.startsWithIgnoreCase=function(e){return""===e?this.startsWith(e):addIgnoreCaseAlgorithm(this,(function(e,t){return 0===e.indexOf(t[0])}),[e],maxString)},e.prototype.equalsIgnoreCase=function(e){return addIgnoreCaseAlgorithm(this,(function(e,t){return e===t[0]}),[e],"")},e.prototype.anyOfIgnoreCase=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);return 0===e.length?emptyCollection(this):addIgnoreCaseAlgorithm(this,(function(e,t){return-1!==t.indexOf(e)}),e,"")},e.prototype.startsWithAnyOfIgnoreCase=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);return 0===e.length?emptyCollection(this):addIgnoreCaseAlgorithm(this,(function(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}),e,maxString)},e.prototype.anyOf=function(){var e=this,t=getArrayOf.apply(NO_CHAR_ARRAY,arguments),r=this._cmp;try{t.sort(r)}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}if(0===t.length)return emptyCollection(this);var n=new this.Collection(this,(function(){return createRange(t[0],t[t.length-1])}));n._ondirectionchange=function(n){r="next"===n?e._ascending:e._descending,t.sort(r)};var i=0;return n._addAlgorithm((function(e,n,o){for(var a=e.key;r(a,t[i])>0;)if(++i===t.length)return n(o),!1;return 0===r(a,t[i])||(n((function(){e.continue(t[i])})),!1)})),n},e.prototype.notEqual=function(e){return this.inAnyRange([[minKey,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},e.prototype.noneOf=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}var t=e.reduce((function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[minKey,t]]}),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})},e.prototype.inAnyRange=function(e,t){var r=this,n=this._cmp,i=this._ascending,o=this._descending,a=this._min,s=this._max;if(0===e.length)return emptyCollection(this);if(!e.every((function(e){return void 0!==e[0]&&void 0!==e[1]&&i(e[0],e[1])<=0})))return fail(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",exceptions.InvalidArgument);var l=!t||!1!==t.includeLowers,c=t&&!0===t.includeUppers;var u,h=i;function d(e,t){return h(e[0],t[0])}try{u=e.reduce((function(e,t){for(var r=0,i=e.length;r<i;++r){var o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=a(o[0],t[0]),o[1]=s(o[1],t[1]);break}}return r===i&&e.push(t),e}),[]),u.sort(d)}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}var f=0,p=c?function(e){return i(e,u[f][1])>0}:function(e){return i(e,u[f][1])>=0},m=l?function(e){return o(e,u[f][0])>0}:function(e){return o(e,u[f][0])>=0};var g=p,v=new this.Collection(this,(function(){return createRange(u[0][0],u[u.length-1][1],!l,!c)}));return v._ondirectionchange=function(e){"next"===e?(g=p,h=i):(g=m,h=o),u.sort(d)},v._addAlgorithm((function(e,t,n){for(var o=e.key;g(o);)if(++f===u.length)return t(n),!1;return!!function(e){return!p(e)&&!m(e)}(o)||(0===r._cmp(o,u[f][1])||0===r._cmp(o,u[f][0])||t((function(){h===i?e.continue(u[f][0]):e.continue(u[f][1])})),!1)})),v},e.prototype.startsWithAnyOf=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);return e.every((function(e){return"string"==typeof e}))?0===e.length?emptyCollection(this):this.inAnyRange(e.map((function(e){return[e,e+maxString]}))):fail(this,"startsWithAnyOf() only works with strings")},e}();function createWhereClauseConstructor(e){return makeClassConstructor(WhereClause.prototype,(function(t,r,n){if(this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n},this._cmp=this._ascending=cmp,this._descending=function(e,t){return cmp(t,e)},this._max=function(e,t){return cmp(e,t)>0?e:t},this._min=function(e,t){return cmp(e,t)<0?e:t},this._IDBKeyRange=e._deps.IDBKeyRange,!this._IDBKeyRange)throw new exceptions.MissingAPI}))}function eventRejectHandler(e){return wrap$1((function(t){return preventDefault(t),e(t.target.error),!1}))}function preventDefault(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var DEXIE_STORAGE_MUTATED_EVENT_NAME="storagemutated",STORAGE_MUTATED_DOM_EVENT_NAME="x-storagemutated-1",globalEvents=Events(null,DEXIE_STORAGE_MUTATED_EVENT_NAME),Transaction=function(){function e(){}return e.prototype._lock=function(){return assert(!PSD.global),++this._reculock,1!==this._reculock||PSD.global||(PSD.lockOwnerFor=this),this},e.prototype._unlock=function(){if(assert(!PSD.global),0==--this._reculock)for(PSD.global||(PSD.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{usePSD(e[1],e[0])}catch(e){}}return this},e.prototype._locked=function(){return this._reculock&&PSD.lockOwnerFor!==this},e.prototype.create=function(e){var t=this;if(!this.mode)return this;var r=this.db.idbdb,n=this.db._state.dbOpenError;if(assert(!this.idbtrans),!e&&!r)switch(n&&n.name){case"DatabaseClosedError":throw new exceptions.DatabaseClosed(n);case"MissingAPIError":throw new exceptions.MissingAPI(n.message,n);default:throw new exceptions.OpenFailed(n)}if(!this.active)throw new exceptions.TransactionInactive;return assert(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):r.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=wrap$1((function(r){preventDefault(r),t._reject(e.error)})),e.onabort=wrap$1((function(r){preventDefault(r),t.active&&t._reject(new exceptions.Abort(e.error)),t.active=!1,t.on("abort").fire(r)})),e.oncomplete=wrap$1((function(){t.active=!1,t._resolve(),"mutatedParts"in e&&globalEvents.storagemutated.fire(e.mutatedParts)})),this},e.prototype._promise=function(e,t,r){var n=this;if("readwrite"===e&&"readwrite"!==this.mode)return rejection(new exceptions.ReadOnly("Transaction is readonly"));if(!this.active)return rejection(new exceptions.TransactionInactive);if(this._locked())return new DexiePromise((function(i,o){n._blockedFuncs.push([function(){n._promise(e,t,r).then(i,o)},PSD])}));if(r)return newScope((function(){var e=new DexiePromise((function(e,r){n._lock();var i=t(e,r,n);i&&i.then&&i.then(e,r)}));return e.finally((function(){return n._unlock()})),e._lib=!0,e}));var i=new DexiePromise((function(e,r){var i=t(e,r,n);i&&i.then&&i.then(e,r)}));return i._lib=!0,i},e.prototype._root=function(){return this.parent?this.parent._root():this},e.prototype.waitFor=function(e){var t=this._root(),r=DexiePromise.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((function(){return r}));else{t._waitingFor=r,t._waitingQueue=[];var n=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=e)}()}var i=t._waitingFor;return new DexiePromise((function(e,n){r.then((function(r){return t._waitingQueue.push(wrap$1(e.bind(null,r)))}),(function(e){return t._waitingQueue.push(wrap$1(n.bind(null,e)))})).finally((function(){t._waitingFor===i&&(t._waitingFor=null)}))}))},e.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new exceptions.Abort))},e.prototype.table=function(e){var t=this._memoizedTables||(this._memoizedTables={});if(hasOwn(t,e))return t[e];var r=this.schema[e];if(!r)throw new exceptions.NotFound("Table "+e+" not part of transaction");var n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n},e}();function createTransactionConstructor(e){return makeClassConstructor(Transaction.prototype,(function(t,r,n,i,o){var a=this;this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.chromeTransactionDurability=i,this.idbtrans=null,this.on=Events(this,"complete","error","abort"),this.parent=o||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new DexiePromise((function(e,t){a._resolve=e,a._reject=t})),this._completion.then((function(){a.active=!1,a.on.complete.fire()}),(function(e){var t=a.active;return a.active=!1,a.on.error.fire(e),a.parent?a.parent._reject(e):t&&a.idbtrans&&a.idbtrans.abort(),rejection(e)}))}))}function createIndexSpec(e,t,r,n,i,o,a){return{name:e,keyPath:t,unique:r,multi:n,auto:i,compound:o,src:(r&&!a?"&":"")+(n?"*":"")+(i?"++":"")+nameFromKeyPath(t)}}function nameFromKeyPath(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function createTableSchema(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:arrayToObject(r,(function(e){return[e.name,e]}))}}function safariMultiStoreFix(e){return 1===e.length?e[0]:e}var getMaxKey=function(e){try{return e.only([[]]),getMaxKey=function(){return[[]]},[[]]}catch(e){return getMaxKey=function(){return maxString},maxString}};function getKeyExtractor(e){return null==e?function(){}:"string"==typeof e?getSinglePathKeyExtractor(e):function(t){return getByKeyPath(t,e)}}function getSinglePathKeyExtractor(e){return 1===e.split(".").length?function(t){return t[e]}:function(t){return getByKeyPath(t,e)}}function arrayify(e){return[].slice.call(e)}var _id_counter=0;function getKeyPathAlias(e){return null==e?":id":"string"==typeof e?e:"[".concat(e.join("+"),"]")}function createDBCore(e,t,r){function n(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");var r=e.lower,n=e.upper,i=e.lowerOpen,o=e.upperOpen;return void 0===r?void 0===n?null:t.upperBound(n,!!o):void 0===n?t.lowerBound(r,!!i):t.bound(r,n,!!i,!!o)}var i=function(e,t){var r=arrayify(e.objectStoreNames);return{schema:{name:e.name,tables:r.map((function(e){return t.objectStore(e)})).map((function(e){var t=e.keyPath,r=e.autoIncrement,n=isArray(t),i=null==t,o={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:i,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:getKeyExtractor(t)},indexes:arrayify(e.indexNames).map((function(t){return e.index(t)})).map((function(e){var t=e.name,r=e.unique,n=e.multiEntry,i=e.keyPath,a={name:t,compound:isArray(i),keyPath:i,unique:r,multiEntry:n,extractKey:getKeyExtractor(i)};return o[getKeyPathAlias(i)]=a,a})),getIndexByKeyPath:function(e){return o[getKeyPathAlias(e)]}};return o[":id"]=a.primaryKey,null!=t&&(o[getKeyPathAlias(t)]=a.primaryKey),a}))},hasGetAll:r.length>0&&"getAll"in t.objectStore(r[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,r),o=i.schema,a=i.hasGetAll,s=o.tables.map((function(e){return function(e){var t=e.name;return{name:t,schema:e,mutate:function(e){var r=e.trans,i=e.type,o=e.keys,a=e.values,s=e.range;return new Promise((function(e,l){e=wrap$1(e);var c=r.objectStore(t),u=null==c.keyPath,h="put"===i||"add"===i;if(!h&&"delete"!==i&&"deleteRange"!==i)throw new Error("Invalid operation type: "+i);var d,f=(o||a||{length:1}).length;if(o&&a&&o.length!==a.length)throw new Error("Given keys array must have same length as given values array.");if(0===f)return e({numFailures:0,failures:{},results:[],lastResult:void 0});var p=[],m=[],g=0,v=function(e){++g,preventDefault(e)};if("deleteRange"===i){if(4===s.type)return e({numFailures:g,failures:m,results:[],lastResult:void 0});3===s.type?p.push(d=c.clear()):p.push(d=c.delete(n(s)))}else{var y=h?u?[a,o]:[a,null]:[o,null],_=y[0],b=y[1];if(h)for(var w=0;w<f;++w)p.push(d=b&&void 0!==b[w]?c[i](_[w],b[w]):c[i](_[w])),d.onerror=v;else for(w=0;w<f;++w)p.push(d=c[i](_[w])),d.onerror=v}var D=function(t){var r=t.target.result;p.forEach((function(e,t){return null!=e.error&&(m[t]=e.error)})),e({numFailures:g,failures:m,results:"delete"===i?o:p.map((function(e){return e.result})),lastResult:r})};d.onerror=function(e){v(e),D(e)},d.onsuccess=D}))},getMany:function(e){var r=e.trans,n=e.keys;return new Promise((function(e,i){e=wrap$1(e);for(var o,a=r.objectStore(t),s=n.length,l=new Array(s),c=0,u=0,h=function(t){var r=t.target;l[r._pos]=r.result,++u===c&&e(l)},d=eventRejectHandler(i),f=0;f<s;++f)null!=n[f]&&((o=a.get(n[f]))._pos=f,o.onsuccess=h,o.onerror=d,++c);0===c&&e(l)}))},get:function(e){var r=e.trans,n=e.key;return new Promise((function(e,i){e=wrap$1(e);var o=r.objectStore(t).get(n);o.onsuccess=function(t){return e(t.target.result)},o.onerror=eventRejectHandler(i)}))},query:function(e){return function(r){return new Promise((function(i,o){i=wrap$1(i);var a=r.trans,s=r.values,l=r.limit,c=r.query,u=l===1/0?void 0:l,h=c.index,d=c.range,f=a.objectStore(t),p=h.isPrimaryKey?f:f.index(h.name),m=n(d);if(0===l)return i({result:[]});if(e){var g=s?p.getAll(m,u):p.getAllKeys(m,u);g.onsuccess=function(e){return i({result:e.target.result})},g.onerror=eventRejectHandler(o)}else{var v=0,y=s||!("openKeyCursor"in p)?p.openCursor(m):p.openKeyCursor(m),_=[];y.onsuccess=function(e){var t=y.result;return t?(_.push(s?t.value:t.primaryKey),++v===l?i({result:_}):void t.continue()):i({result:_})},y.onerror=eventRejectHandler(o)}}))}}(a),openCursor:function(e){var r=e.trans,i=e.values,o=e.query,a=e.reverse,s=e.unique;return new Promise((function(e,l){e=wrap$1(e);var c=o.index,u=o.range,h=r.objectStore(t),d=c.isPrimaryKey?h:h.index(c.name),f=a?s?"prevunique":"prev":s?"nextunique":"next",p=i||!("openKeyCursor"in d)?d.openCursor(n(u),f):d.openKeyCursor(n(u),f);p.onerror=eventRejectHandler(l),p.onsuccess=wrap$1((function(t){var n=p.result;if(n){n.___id=++_id_counter,n.done=!1;var i=n.continue.bind(n),o=n.continuePrimaryKey;o&&(o=o.bind(n));var a=n.advance.bind(n),s=function(){throw new Error("Cursor not stopped")};n.trans=r,n.stop=n.continue=n.continuePrimaryKey=n.advance=function(){throw new Error("Cursor not started")},n.fail=wrap$1(l),n.next=function(){var e=this,t=1;return this.start((function(){return t--?e.continue():e.stop()})).then((function(){return e}))},n.start=function(e){var t=new Promise((function(e,t){e=wrap$1(e),p.onerror=eventRejectHandler(t),n.fail=t,n.stop=function(t){n.stop=n.continue=n.continuePrimaryKey=n.advance=s,e(t)}})),r=function(){if(p.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=function(){throw new Error("Cursor behind last entry")},n.stop()};return p.onsuccess=wrap$1((function(e){p.onsuccess=r,r()})),n.continue=i,n.continuePrimaryKey=o,n.advance=a,r(),t},e(n)}else e(null)}),l)}))},count:function(e){var r=e.query,i=e.trans,o=r.index,a=r.range;return new Promise((function(e,r){var s=i.objectStore(t),l=o.isPrimaryKey?s:s.index(o.name),c=n(a),u=c?l.count(c):l.count();u.onsuccess=wrap$1((function(t){return e(t.target.result)})),u.onerror=eventRejectHandler(r)}))}}}(e)})),l={};return s.forEach((function(e){return l[e.name]=e})),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(e){if(!l[e])throw new Error("Table '".concat(e,"' not found"));return l[e]},MIN_KEY:-1/0,MAX_KEY:getMaxKey(t),schema:o}}function createMiddlewareStack(e,t){return t.reduce((function(e,t){var r=t.create;return __assign(__assign({},e),r(e))}),e)}function createMiddlewareStacks(e,t,r,n){var i=r.IDBKeyRange;return r.indexedDB,{dbcore:createMiddlewareStack(createDBCore(t,i,n),e.dbcore)}}function generateMiddlewareStacks(e,t){var r=t.db,n=createMiddlewareStacks(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach((function(t){var r=t.name;e.core.schema.tables.some((function(e){return e.name===r}))&&(t.core=e.core.table(r),e[r]instanceof e.Table&&(e[r].core=t.core))}))}function setApiOnPlace(e,t,r,n){r.forEach((function(r){var i=n[r];t.forEach((function(t){var n=getPropertyDescriptor(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?setProp(t,r,{get:function(){return this.table(r)},set:function(e){defineProperty(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,i))}))}))}function removeTablesApi(e,t){t.forEach((function(t){for(var r in t)t[r]instanceof e.Table&&delete t[r]}))}function lowerVersionFirst(e,t){return e._cfg.version-t._cfg.version}function runUpgraders(e,t,r,n){var i=e._dbSchema;r.objectStoreNames.contains("$meta")&&!i.$meta&&(i.$meta=createTableSchema("$meta",parseIndexSyntax("")[0],[]),e._storeNames.push("$meta"));var o=e._createTransaction("readwrite",e._storeNames,i);o.create(r),o._completion.catch(n);var a=o._reject.bind(o),s=PSD.transless||PSD;newScope((function(){if(PSD.trans=o,PSD.transless=s,0!==t)return generateMiddlewareStacks(e,r),getExistingVersion(e,o,t).then((function(t){return updateTablesAndIndexes(e,t,o,r)})).catch(a);keys(i).forEach((function(e){createTable(r,e,i[e].primKey,i[e].indexes)})),generateMiddlewareStacks(e,r),DexiePromise.follow((function(){return e.on.populate.fire(o)})).catch(a)}))}function patchCurrentVersion(e,t){createMissingTables(e._dbSchema,t),t.db.version%10!=0||t.objectStoreNames.contains("$meta")||t.db.createObjectStore("$meta").add(Math.ceil(t.db.version/10-1),"version");var r=buildGlobalSchema(e,e.idbdb,t);adjustToExistingIndexNames(e,e._dbSchema,t);for(var n=function(e){if(e.change.length||e.recreate)return console.warn("Unable to patch indexes of table ".concat(e.name," because it has changes on the type of index or primary key.")),{value:void 0};var r=t.objectStore(e.name);e.add.forEach((function(t){debug&&console.debug("Dexie upgrade patch: Creating missing index ".concat(e.name,".").concat(t.src)),addIndex(r,t)}))},i=0,o=getSchemaDiff(r,e._dbSchema).change;i<o.length;i++){var a=n(o[i]);if("object"==typeof a)return a.value}}function getExistingVersion(e,t,r){return t.storeNames.includes("$meta")?t.table("$meta").get("version").then((function(e){return null!=e?e:r})):DexiePromise.resolve(r)}function updateTablesAndIndexes(e,t,r,n){var i=[],o=e._versions,a=e._dbSchema=buildGlobalSchema(e,e.idbdb,n),s=o.filter((function(e){return e._cfg.version>=t}));if(0===s.length)return DexiePromise.resolve();return s.forEach((function(o){i.push((function(){var i=a,s=o._cfg.dbschema;adjustToExistingIndexNames(e,i,n),adjustToExistingIndexNames(e,s,n),a=e._dbSchema=s;var l=getSchemaDiff(i,s);l.add.forEach((function(e){createTable(n,e[0],e[1].primKey,e[1].indexes)})),l.change.forEach((function(e){if(e.recreate)throw new exceptions.Upgrade("Not yet support for changing primary key");var t=n.objectStore(e.name);e.add.forEach((function(e){return addIndex(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),addIndex(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var c=o._cfg.contentUpgrade;if(c&&o._cfg.version>t){generateMiddlewareStacks(e,n),r._memoizedTables={};var u=shallowClone(s);l.del.forEach((function(e){u[e]=i[e]})),removeTablesApi(e,[e.Transaction.prototype]),setApiOnPlace(e,[e.Transaction.prototype],keys(u),u),r.schema=u;var h,d=isAsyncFunction(c);d&&incrementExpectedAwaits();var f=DexiePromise.follow((function(){if((h=c(r))&&d){var e=decrementExpectedAwaits.bind(null,null);h.then(e,e)}}));return h&&"function"==typeof h.then?DexiePromise.resolve(h):f.then((function(){return h}))}})),i.push((function(t){deleteRemovedTables(o._cfg.dbschema,t),removeTablesApi(e,[e.Transaction.prototype]),setApiOnPlace(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema})),i.push((function(t){e.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(e.idbdb.version/10)===o._cfg.version?(e.idbdb.deleteObjectStore("$meta"),delete e._dbSchema.$meta,e._storeNames=e._storeNames.filter((function(e){return"$meta"!==e}))):t.objectStore("$meta").put(o._cfg.version,"version"))}))})),function e(){return i.length?DexiePromise.resolve(i.shift()(r.idbtrans)).then(e):DexiePromise.resolve()}().then((function(){createMissingTables(a,n)}))}function getSchemaDiff(e,t){var r,n={del:[],add:[],change:[]};for(r in e)t[r]||n.del.push(r);for(r in t){var i=e[r],o=t[r];if(i){var a={name:r,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")!=""+(o.primKey.keyPath||"")||i.primKey.auto!==o.primKey.auto)a.recreate=!0,n.change.push(a);else{var s=i.idxByName,l=o.idxByName,c=void 0;for(c in s)l[c]||a.del.push(c);for(c in l){var u=s[c],h=l[c];u?u.src!==h.src&&a.change.push(h):a.add.push(h)}(a.del.length>0||a.add.length>0||a.change.length>0)&&n.change.push(a)}}else n.add.push([r,o])}return n}function createTable(e,t,r,n){var i=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach((function(e){return addIndex(i,e)})),i}function createMissingTables(e,t){keys(e).forEach((function(r){t.db.objectStoreNames.contains(r)||(debug&&console.debug("Dexie: Creating missing table",r),createTable(t,r,e[r].primKey,e[r].indexes))}))}function deleteRemovedTables(e,t){[].slice.call(t.db.objectStoreNames).forEach((function(r){return null==e[r]&&t.db.deleteObjectStore(r)}))}function addIndex(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function buildGlobalSchema(e,t,r){var n={};return slice(t.objectStoreNames,0).forEach((function(e){for(var t=r.objectStore(e),i=t.keyPath,o=createIndexSpec(nameFromKeyPath(i),i||"",!0,!1,!!t.autoIncrement,i&&"string"!=typeof i,!0),a=[],s=0;s<t.indexNames.length;++s){var l=t.index(t.indexNames[s]);i=l.keyPath;var c=createIndexSpec(l.name,i,!!l.unique,!!l.multiEntry,!1,i&&"string"!=typeof i,!1);a.push(c)}n[e]=createTableSchema(e,o,a)})),n}function readGlobalSchema(e,t,r){e.verno=t.version/10;var n=e._dbSchema=buildGlobalSchema(e,t,r);e._storeNames=slice(t.objectStoreNames,0),setApiOnPlace(e,[e._allTables],keys(n),n)}function verifyInstalledSchema(e,t){var r=getSchemaDiff(buildGlobalSchema(e,e.idbdb,t),e._dbSchema);return!(r.add.length||r.change.some((function(e){return e.add.length||e.change.length})))}function adjustToExistingIndexNames(e,t,r){for(var n=r.db.objectStoreNames,i=0;i<n.length;++i){var o=n[i],a=r.objectStore(o);e._hasGetAll="getAll"in a;for(var s=0;s<a.indexNames.length;++s){var l=a.indexNames[s],c=a.index(l).keyPath,u="string"==typeof c?c:"["+slice(c).join("+")+"]";if(t[o]){var h=t[o].idxByName[u];h&&(h.name=l,delete t[o].idxByName[u],t[o].idxByName[l]=h)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&_global.WorkerGlobalScope&&_global instanceof _global.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}function parseIndexSyntax(e){return e.split(",").map((function(e,t){var r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),n=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return createIndexSpec(r,n||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),isArray(n),0===t)}))}var Version=function(){function e(){}return e.prototype._parseStoresSpec=function(e,t){keys(e).forEach((function(r){if(null!==e[r]){var n=parseIndexSyntax(e[r]),i=n.shift();if(i.unique=!0,i.multi)throw new exceptions.Schema("Primary key cannot be multi-valued");n.forEach((function(e){if(e.auto)throw new exceptions.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new exceptions.Schema("Index must have a name and cannot be an empty string")})),t[r]=createTableSchema(r,i,n)}}))},e.prototype.stores=function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?extend(this._cfg.storesSource,e):e;var r=t._versions,n={},i={};return r.forEach((function(e){extend(n,e._cfg.storesSource),i=e._cfg.dbschema={},e._parseStoresSpec(n,i)})),t._dbSchema=i,removeTablesApi(t,[t._allTables,t,t.Transaction.prototype]),setApiOnPlace(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],keys(i),i),t._storeNames=keys(i),this},e.prototype.upgrade=function(e){return this._cfg.contentUpgrade=promisableChain(this._cfg.contentUpgrade||nop,e),this},e}(),_a;function createVersionConstructor(e){return makeClassConstructor(Version.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}function getDbNamesTable(e,t){var r=e._dbNamesDB;return r||(r=e._dbNamesDB=new Dexie$1(DBNAMES_DB,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),r.table("dbnames")}function hasDatabasesNative(e){return e&&"function"==typeof e.databases}function getDatabaseNames(e){var t=e.indexedDB,r=e.IDBKeyRange;return hasDatabasesNative(t)?Promise.resolve(t.databases()).then((function(e){return e.map((function(e){return e.name})).filter((function(e){return e!==DBNAMES_DB}))})):getDbNamesTable(t,r).toCollection().primaryKeys()}function _onDatabaseCreated(e,t){var r=e.indexedDB,n=e.IDBKeyRange;!hasDatabasesNative(r)&&t!==DBNAMES_DB&&getDbNamesTable(r,n).put({name:t}).catch(nop)}function _onDatabaseDeleted(e,t){var r=e.indexedDB,n=e.IDBKeyRange;!hasDatabasesNative(r)&&t!==DBNAMES_DB&&getDbNamesTable(r,n).delete(t).catch(nop)}function vip(e){return newScope((function(){return PSD.letThrough=!0,e()}))}function idbReady(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var r=function(){return indexedDB.databases().finally(t)};e=setInterval(r,100),r()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function isEmptyRange(e){return!("from"in e)}var RangeSet=function(e,t){if(!this){var r=new RangeSet;return e&&"d"in e&&extend(r,e),r}extend(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function addRange(e,t,r){var n=cmp(t,r);if(!isNaN(n)){if(n>0)throw RangeError();if(isEmptyRange(e))return extend(e,{from:t,to:r,d:1});var i=e.l,o=e.r;if(cmp(r,e.from)<0)return i?addRange(i,t,r):e.l={from:t,to:r,d:1,l:null,r:null},rebalance(e);if(cmp(t,e.to)>0)return o?addRange(o,t,r):e.r={from:t,to:r,d:1,l:null,r:null},rebalance(e);cmp(t,e.from)<0&&(e.from=t,e.l=null,e.d=o?o.d+1:1),cmp(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);var a=!e.r;i&&!e.l&&mergeRanges(e,i),o&&a&&mergeRanges(e,o)}}function mergeRanges(e,t){isEmptyRange(t)||function e(t,r){var n=r.from,i=r.to,o=r.l,a=r.r;addRange(t,n,i),o&&e(t,o),a&&e(t,a)}(e,t)}function rangesOverlap(e,t){var r=getRangeSetIterator(t),n=r.next();if(n.done)return!1;for(var i=n.value,o=getRangeSetIterator(e),a=o.next(i.from),s=a.value;!n.done&&!a.done;){if(cmp(s.from,i.to)<=0&&cmp(s.to,i.from)>=0)return!0;cmp(i.from,s.from)<0?i=(n=r.next(s.from)).value:s=(a=o.next(i.from)).value}return!1}function getRangeSetIterator(e){var t=isEmptyRange(e)?null:{s:0,n:e};return{next:function(e){for(var r=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&cmp(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||cmp(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function rebalance(e){var t,r,n=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(r=e.l)||void 0===r?void 0:r.d)||0),i=n>1?"r":n<-1?"l":"";if(i){var o="r"===i?"l":"r",a=__assign({},e),s=e[i];e.from=s.from,e.to=s.to,e[i]=s[i],a[i]=s[o],e[o]=a,a.d=computeDepth(a)}e.d=computeDepth(e)}function computeDepth(e){var t=e.r,r=e.l;return(t?r?Math.max(t.d,r.d):t.d:r?r.d:0)+1}function extendObservabilitySet(e,t){return keys(t).forEach((function(r){e[r]?mergeRanges(e[r],t[r]):e[r]=cloneSimpleObjectTree(t[r])})),e}function obsSetsOverlap(e,t){return e.all||t.all||Object.keys(e).some((function(r){return t[r]&&rangesOverlap(t[r],e[r])}))}props(RangeSet.prototype,(_a={add:function(e){return mergeRanges(this,e),this},addKey:function(e){return addRange(this,e,e),this},addKeys:function(e){var t=this;return e.forEach((function(e){return addRange(t,e,e)})),this}},_a[iteratorSymbol]=function(){return getRangeSetIterator(this)},_a));var cache={},unsignaledParts={},isTaskEnqueued=!1;function signalSubscribersLazily(e,t){extendObservabilitySet(unsignaledParts,e),isTaskEnqueued||(isTaskEnqueued=!0,setTimeout((function(){isTaskEnqueued=!1;var e=unsignaledParts;unsignaledParts={},signalSubscribersNow(e,!1)}),0))}function signalSubscribersNow(e,t){void 0===t&&(t=!1);var r=new Set;if(e.all)for(var n=0,i=Object.values(cache);n<i.length;n++){collectTableSubscribers(s=i[n],e,r,t)}else for(var o in e){var a=/^idb\:\/\/(.*)\/(.*)\//.exec(o);if(a){var s,l=a[1],c=a[2];(s=cache["idb://".concat(l,"/").concat(c)])&&collectTableSubscribers(s,e,r,t)}}r.forEach((function(e){return e()}))}function collectTableSubscribers(e,t,r,n){for(var i=[],o=0,a=Object.entries(e.queries.query);o<a.length;o++){for(var s=a[o],l=s[0],c=[],u=0,h=s[1];u<h.length;u++){var d=h[u];obsSetsOverlap(t,d.obsSet)?d.subscribers.forEach((function(e){return r.add(e)})):n&&c.push(d)}n&&i.push([l,c])}if(n)for(var f=0,p=i;f<p.length;f++){var m=p[f];l=m[0],c=m[1];e.queries.query[l]=c}}function dexieOpen(e){var t=e._state,r=e._deps.indexedDB;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((function(){return t.dbOpenError?rejection(t.dbOpenError):e}));t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;var n=t.openCanceller,i=Math.round(10*e.verno),o=!1;function a(){if(t.openCanceller!==n)throw new exceptions.DatabaseClosed("db.open() was cancelled")}var s=t.dbReadyResolve,l=null,c=!1,u=function(){return new DexiePromise((function(n,s){if(a(),!r)throw new exceptions.MissingAPI;var h=e.name,d=t.autoSchema||!i?r.open(h):r.open(h,i);if(!d)throw new exceptions.MissingAPI;d.onerror=eventRejectHandler(s),d.onblocked=wrap$1(e._fireOnBlocked),d.onupgradeneeded=wrap$1((function(n){if(l=d.transaction,t.autoSchema&&!e._options.allowEmptyDB){d.onerror=preventDefault,l.abort(),d.result.close();var i=r.deleteDatabase(h);i.onsuccess=i.onerror=wrap$1((function(){s(new exceptions.NoSuchDatabase("Database ".concat(h," doesnt exist")))}))}else{l.onerror=eventRejectHandler(s);var a=n.oldVersion>Math.pow(2,62)?0:n.oldVersion;c=a<1,e.idbdb=d.result,o&&patchCurrentVersion(e,l),runUpgraders(e,a/10,l,s)}}),s),d.onsuccess=wrap$1((function(){l=null;var r=e.idbdb=d.result,a=slice(r.objectStoreNames);if(a.length>0)try{var s=r.transaction(safariMultiStoreFix(a),"readonly");if(t.autoSchema)readGlobalSchema(e,r,s);else if(adjustToExistingIndexNames(e,e._dbSchema,s),!verifyInstalledSchema(e,s)&&!o)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),r.close(),i=r.version+1,o=!0,n(u());generateMiddlewareStacks(e,s)}catch(e){}connections.push(e),r.onversionchange=wrap$1((function(r){t.vcFired=!0,e.on("versionchange").fire(r)})),r.onclose=wrap$1((function(t){e.on("close").fire(t)})),c&&_onDatabaseCreated(e._deps,h),n()}),s)})).catch((function(e){switch(null==e?void 0:e.name){case"UnknownError":if(t.PR1398_maxLoop>0)return t.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),u();break;case"VersionError":if(i>0)return i=0,u()}return DexiePromise.reject(e)}))};return DexiePromise.race([n,("undefined"==typeof navigator?DexiePromise.resolve():idbReady()).then(u)]).then((function(){return a(),t.onReadyBeingFired=[],DexiePromise.resolve(vip((function(){return e.on.ready.fire(e.vip)}))).then((function r(){if(t.onReadyBeingFired.length>0){var n=t.onReadyBeingFired.reduce(promisableChain,nop);return t.onReadyBeingFired=[],DexiePromise.resolve(vip((function(){return n(e.vip)}))).then(r)}}))})).finally((function(){t.openCanceller===n&&(t.onReadyBeingFired=null,t.isBeingOpened=!1)})).catch((function(r){t.dbOpenError=r;try{l&&l.abort()}catch(e){}return n===t.openCanceller&&e._close(),rejection(r)})).finally((function(){t.openComplete=!0,s()})).then((function(){if(c){var t={};e.tables.forEach((function(r){r.schema.indexes.forEach((function(n){n.name&&(t["idb://".concat(e.name,"/").concat(r.name,"/").concat(n.name)]=new RangeSet(-1/0,[[[]]]))})),t["idb://".concat(e.name,"/").concat(r.name,"/")]=t["idb://".concat(e.name,"/").concat(r.name,"/:dels")]=new RangeSet(-1/0,[[[]]])})),globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME).fire(t),signalSubscribersNow(t,!0)}return e}))}function awaitIterator(e){var t=function(t){return e.next(t)},r=i(t),n=i((function(t){return e.throw(t)}));function i(e){return function(t){var i=e(t),o=i.value;return i.done?o:o&&"function"==typeof o.then?o.then(r,n):isArray(o)?Promise.all(o).then(r,n):r(o)}}return i(t)()}function extractTransactionArgs(e,t,r){var n=arguments.length;if(n<2)throw new exceptions.InvalidArgument("Too few arguments");for(var i=new Array(n-1);--n;)i[n-1]=arguments[n];return r=i.pop(),[e,flatten(i),r]}function enterTransactionScope(e,t,r,n,i){return DexiePromise.resolve().then((function(){var o=PSD.transless||PSD,a=e._createTransaction(t,r,e._dbSchema,n);a.explicit=!0;var s={trans:a,transless:o};if(n)a.idbtrans=n.idbtrans;else try{a.create(),a.idbtrans._explicit=!0,e._state.PR1398_maxLoop=3}catch(n){return n.name===errnames.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e.close({disableAutoOpen:!1}),e.open().then((function(){return enterTransactionScope(e,t,r,null,i)}))):rejection(n)}var l,c=isAsyncFunction(i);c&&incrementExpectedAwaits();var u=DexiePromise.follow((function(){if(l=i.call(a,a))if(c){var e=decrementExpectedAwaits.bind(null,null);l.then(e,e)}else"function"==typeof l.next&&"function"==typeof l.throw&&(l=awaitIterator(l))}),s);return(l&&"function"==typeof l.then?DexiePromise.resolve(l).then((function(e){return a.active?e:rejection(new exceptions.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):u.then((function(){return l}))).then((function(e){return n&&a._resolve(),a._completion.then((function(){return e}))})).catch((function(e){return a._reject(e),rejection(e)}))}))}function pad(e,t,r){for(var n=isArray(e)?e.slice():[e],i=0;i<r;++i)n.push(t);return n}function createVirtualIndexMiddleware(e){return __assign(__assign({},e),{table:function(t){var r=e.table(t),n=r.schema,i={},o=[];function a(e,t,r){var n=getKeyPathAlias(e),s=i[n]=i[n]||[],l=null==e?0:"string"==typeof e?1:e.length,c=t>0,u=__assign(__assign({},r),{name:c?"".concat(n,"(virtual-from:").concat(r.name,")"):r.name,lowLevelIndex:r,isVirtual:c,keyTail:t,keyLength:l,extractKey:getKeyExtractor(e),unique:!c&&r.unique});(s.push(u),u.isPrimaryKey||o.push(u),l>1)&&a(2===l?e[0]:e.slice(0,l-1),t+1,r);return s.sort((function(e,t){return e.keyTail-t.keyTail})),u}var s=a(n.primaryKey.keyPath,0,n.primaryKey);i[":id"]=[s];for(var l=0,c=n.indexes;l<c.length;l++){var u=c[l];a(u.keyPath,0,u)}function h(t){var r,n,i=t.query.index;return i.isVirtual?__assign(__assign({},t),{query:{index:i.lowLevelIndex,range:(r=t.query.range,n=i.keyTail,{type:1===r.type?2:r.type,lower:pad(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,n),lowerOpen:!0,upper:pad(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,n),upperOpen:!0})}}):t}var d=__assign(__assign({},r),{schema:__assign(__assign({},n),{primaryKey:s,indexes:o,getIndexByKeyPath:function(e){var t=i[getKeyPathAlias(e)];return t&&t[0]}}),count:function(e){return r.count(h(e))},query:function(e){return r.query(h(e))},openCursor:function(t){var n=t.query.index,i=n.keyTail,o=n.isVirtual,a=n.keyLength;if(!o)return r.openCursor(t);return r.openCursor(h(t)).then((function(r){return r&&function(r){var n=Object.create(r,{continue:{value:function(n){null!=n?r.continue(pad(n,t.reverse?e.MAX_KEY:e.MIN_KEY,i)):t.unique?r.continue(r.key.slice(0,a).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,i)):r.continue()}},continuePrimaryKey:{value:function(t,n){r.continuePrimaryKey(pad(t,e.MAX_KEY,i),n)}},primaryKey:{get:function(){return r.primaryKey}},key:{get:function(){var e=r.key;return 1===a?e[0]:e.slice(0,a)}},value:{get:function(){return r.value}}});return n}(r)}))}});return d}})}var virtualIndexMiddleware={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:createVirtualIndexMiddleware};function getObjectDiff(e,t,r,n){return r=r||{},n=n||"",keys(e).forEach((function(i){if(hasOwn(t,i)){var o=e[i],a=t[i];if("object"==typeof o&&"object"==typeof a&&o&&a){var s=toStringTag(o);s!==toStringTag(a)?r[n+i]=t[i]:"Object"===s?getObjectDiff(o,a,r,n+i+"."):o!==a&&(r[n+i]=t[i])}else o!==a&&(r[n+i]=t[i])}else r[n+i]=void 0})),keys(t).forEach((function(i){hasOwn(e,i)||(r[n+i]=t[i])})),r}function getEffectiveKeys(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}var hooksMiddleware={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return __assign(__assign({},e),{table:function(t){var r=e.table(t),n=r.schema.primaryKey,i=__assign(__assign({},r),{mutate:function(e){var i=PSD.trans,o=i.table(t).hook,a=o.deleting,s=o.creating,l=o.updating;switch(e.type){case"add":if(s.fire===nop)break;return i._promise("readwrite",(function(){return c(e)}),!0);case"put":if(s.fire===nop&&l.fire===nop)break;return i._promise("readwrite",(function(){return c(e)}),!0);case"delete":if(a.fire===nop)break;return i._promise("readwrite",(function(){return c(e)}),!0);case"deleteRange":if(a.fire===nop)break;return i._promise("readwrite",(function(){return function(e){return u(e.trans,e.range,1e4)}(e)}),!0)}return r.mutate(e);function c(e){var t=PSD.trans,i=e.keys||getEffectiveKeys(n,e);if(!i)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?__assign(__assign({},e),{keys:i}):__assign({},e)).type&&(e.values=__spreadArray([],e.values,!0)),e.keys&&(e.keys=__spreadArray([],e.keys,!0)),getExistingValues(r,e,i).then((function(o){var c=i.map((function(r,i){var c=o[i],u={onerror:null,onsuccess:null};if("delete"===e.type)a.fire.call(u,r,c,t);else if("add"===e.type||void 0===c){var h=s.fire.call(u,r,e.values[i],t);null==r&&null!=h&&(r=h,e.keys[i]=r,n.outbound||setByKeyPath(e.values[i],n.keyPath,r))}else{var d=getObjectDiff(c,e.values[i]),f=l.fire.call(u,d,r,c,t);if(f){var p=e.values[i];Object.keys(f).forEach((function(e){hasOwn(p,e)?p[e]=f[e]:setByKeyPath(p,e,f[e])}))}}return u}));return r.mutate(e).then((function(t){for(var r=t.failures,n=t.results,a=t.numFailures,s=t.lastResult,l=0;l<i.length;++l){var u=n?n[l]:i[l],h=c[l];null==u?h.onerror&&h.onerror(r[l]):h.onsuccess&&h.onsuccess("put"===e.type&&o[l]?e.values[l]:u)}return{failures:r,results:n,numFailures:a,lastResult:s}})).catch((function(e){return c.forEach((function(t){return t.onerror&&t.onerror(e)})),Promise.reject(e)}))}))}function u(e,t,i){return r.query({trans:e,values:!1,query:{index:n,range:t},limit:i}).then((function(r){var n=r.result;return c({type:"delete",keys:n,trans:e}).then((function(r){return r.numFailures>0?Promise.reject(r.failures[0]):n.length<i?{failures:[],numFailures:0,lastResult:void 0}:u(e,__assign(__assign({},t),{lower:n[n.length-1],lowerOpen:!0}),i)}))}))}}});return i}})}};function getExistingValues(e,t,r){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:r,cache:"immutable"})}function getFromTransactionCache(e,t,r){try{if(!t)return null;if(t.keys.length<e.length)return null;for(var n=[],i=0,o=0;i<t.keys.length&&o<e.length;++i)0===cmp(t.keys[i],e[o])&&(n.push(r?deepClone(t.values[i]):t.values[i]),++o);return n.length===e.length?n:null}catch(e){return null}}var cacheExistingValuesMiddleware={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var r=e.table(t);return __assign(__assign({},r),{getMany:function(e){if(!e.cache)return r.getMany(e);var t=getFromTransactionCache(e.keys,e.trans._cache,"clone"===e.cache);return t?DexiePromise.resolve(t):r.getMany(e).then((function(t){return e.trans._cache={keys:e.keys,values:"clone"===e.cache?deepClone(t):t},t}))},mutate:function(e){return"add"!==e.type&&(e.trans._cache=null),r.mutate(e)}})}}}};function isCachableContext(e,t){return"readonly"===e.trans.mode&&!!e.subscr&&!e.trans.explicit&&"disabled"!==e.trans.db._options.cache&&!t.schema.primaryKey.outbound}function isCachableRequest(e,t){switch(e){case"query":return t.values&&!t.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var observabilityMiddleware={stack:"dbcore",level:0,name:"Observability",create:function(e){var t=e.schema.name,r=new RangeSet(e.MIN_KEY,e.MAX_KEY);return __assign(__assign({},e),{transaction:function(t,r,n){if(PSD.subscr&&"readonly"!==r)throw new exceptions.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(PSD.querier));return e.transaction(t,r,n)},table:function(n){var i=e.table(n),o=i.schema,a=o.primaryKey,s=o.indexes,l=a.extractKey,c=a.outbound,u=a.autoIncrement&&s.filter((function(e){return e.compound&&e.keyPath.includes(a.keyPath)})),h=__assign(__assign({},i),{mutate:function(e){var s=e.trans,l=e.mutatedParts||(e.mutatedParts={}),c=function(e){var r="idb://".concat(t,"/").concat(n,"/").concat(e);return l[r]||(l[r]=new RangeSet)},h=c(""),d=c(":dels"),f=e.type,p="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[getEffectiveKeys(a,e).filter((function(e){return e})),e.values]:[],m=p[0],g=p[1],v=e.trans._cache;if(isArray(m)){h.addKeys(m);var y="delete"===f||m.length===g.length?getFromTransactionCache(m,v):null;y||d.addKeys(m),(y||g)&&trackAffectedIndexes(c,o,y,g)}else if(m){var _={from:m.lower,to:m.upper};d.add(_),h.add(_)}else h.add(r),d.add(r),o.indexes.forEach((function(e){return c(e.name).add(r)}));return i.mutate(e).then((function(t){return!m||"add"!==e.type&&"put"!==e.type||(h.addKeys(t.results),u&&u.forEach((function(r){var n=e.values.map((function(e){return r.extractKey(e)})),i=r.keyPath.findIndex((function(e){return e===a.keyPath}));t.results.forEach((function(e){return n[i]=e})),c(r.name).addKeys(n)}))),s.mutatedParts=extendObservabilitySet(s.mutatedParts||{},l),t}))}}),d=function(t){var r,n,i=t.query,o=i.index,a=i.range;return[o,new RangeSet(null!==(r=a.lower)&&void 0!==r?r:e.MIN_KEY,null!==(n=a.upper)&&void 0!==n?n:e.MAX_KEY)]},f={get:function(e){return[a,new RangeSet(e.key)]},getMany:function(e){return[a,(new RangeSet).addKeys(e.keys)]},count:d,query:d,openCursor:d};return keys(f).forEach((function(e){h[e]=function(o){var a=PSD.subscr,s=!!a,u=isCachableContext(PSD,i)&&isCachableRequest(e,o)?o.obsSet={}:a;if(s){var h=function(e){var r="idb://".concat(t,"/").concat(n,"/").concat(e);return u[r]||(u[r]=new RangeSet)},d=h(""),p=h(":dels"),m=f[e](o),g=m[0],v=m[1];if("query"===e&&g.isPrimaryKey&&!o.values?p.add(v):h(g.name||"").add(v),!g.isPrimaryKey){if("count"!==e){var y="query"===e&&c&&o.values&&i.query(__assign(__assign({},o),{values:!1}));return i[e].apply(this,arguments).then((function(t){if("query"===e){if(c&&o.values)return y.then((function(e){var r=e.result;return d.addKeys(r),t}));var r=o.values?t.result.map(l):t.result;o.values?d.addKeys(r):p.addKeys(r)}else if("openCursor"===e){var n=t,i=o.values;return n&&Object.create(n,{key:{get:function(){return p.addKey(n.primaryKey),n.key}},primaryKey:{get:function(){var e=n.primaryKey;return p.addKey(e),e}},value:{get:function(){return i&&d.addKey(n.primaryKey),n.value}}})}return t}))}p.add(r)}}return i[e].apply(this,arguments)}})),h}})}};function trackAffectedIndexes(e,t,r,n){t.indexes.forEach((function(t){var i=e(t.name||"");function o(e){return null!=e?t.extractKey(e):null}var a=function(e){return t.multiEntry&&isArray(e)?e.forEach((function(e){return i.addKey(e)})):i.addKey(e)};(r||n).forEach((function(e,t){var i=r&&o(r[t]),s=n&&o(n[t]);0!==cmp(i,s)&&(null!=i&&a(i),null!=s&&a(s))}))}))}function adjustOptimisticFromFailures(e,t,r){if(0===r.numFailures)return t;if("deleteRange"===t.type)return null;var n=t.keys?t.keys.length:"values"in t&&t.values?t.values.length:1;if(r.numFailures===n)return null;var i=__assign({},t);return isArray(i.keys)&&(i.keys=i.keys.filter((function(e,t){return!(t in r.failures)}))),"values"in i&&isArray(i.values)&&(i.values=i.values.filter((function(e,t){return!(t in r.failures)}))),i}function isAboveLower(e,t){return void 0===t.lower||(t.lowerOpen?cmp(e,t.lower)>0:cmp(e,t.lower)>=0)}function isBelowUpper(e,t){return void 0===t.upper||(t.upperOpen?cmp(e,t.upper)<0:cmp(e,t.upper)<=0)}function isWithinRange(e,t){return isAboveLower(e,t)&&isBelowUpper(e,t)}function applyOptimisticOps(e,t,r,n,i,o){if(!r||0===r.length)return e;var a=t.query.index,s=a.multiEntry,l=t.query.range,c=n.schema.primaryKey.extractKey,u=a.extractKey,h=(a.lowLevelIndex||a).extractKey,d=r.reduce((function(e,r){var n=e,i="add"===r.type||"put"===r.type?r.values.filter((function(e){var t=u(e);return s&&isArray(t)?t.some((function(e){return isWithinRange(e,l)})):isWithinRange(t,l)})).map((function(e){return e=deepClone(e),o&&Object.freeze(e),e})):[];switch(r.type){case"add":n=e.concat(t.values?i:i.map((function(e){return c(e)})));break;case"put":var a=(new RangeSet).addKeys(r.values.map((function(e){return c(e)})));n=e.filter((function(e){var r=t.values?c(e):e;return!rangesOverlap(new RangeSet(r),a)})).concat(t.values?i:i.map((function(e){return c(e)})));break;case"delete":var h=(new RangeSet).addKeys(r.keys);n=e.filter((function(e){var r=t.values?c(e):e;return!rangesOverlap(new RangeSet(r),h)}));break;case"deleteRange":var d=r.range;n=e.filter((function(e){return!isWithinRange(c(e),d)}))}return n}),e);return d===e?e:(d.sort((function(e,t){return cmp(h(e),h(t))||cmp(c(e),c(t))})),t.limit&&t.limit<1/0&&(d.length>t.limit?d.length=t.limit:e.length===t.limit&&d.length<t.limit&&(i.dirty=!0)),o?Object.freeze(d):d)}function areRangesEqual(e,t){return 0===cmp(e.lower,t.lower)&&0===cmp(e.upper,t.upper)&&!!e.lowerOpen==!!t.lowerOpen&&!!e.upperOpen==!!t.upperOpen}function compareLowers(e,t,r,n){if(void 0===e)return void 0!==t?-1:0;if(void 0===t)return 1;var i=cmp(e,t);if(0===i){if(r&&n)return 0;if(r)return 1;if(n)return-1}return i}function compareUppers(e,t,r,n){if(void 0===e)return void 0!==t?1:0;if(void 0===t)return-1;var i=cmp(e,t);if(0===i){if(r&&n)return 0;if(r)return-1;if(n)return 1}return i}function isSuperRange(e,t){return compareLowers(e.lower,t.lower,e.lowerOpen,t.lowerOpen)<=0&&compareUppers(e.upper,t.upper,e.upperOpen,t.upperOpen)>=0}function findCompatibleQuery(e,t,r,n){var i=cache["idb://".concat(e,"/").concat(t)];if(!i)return[];var o=i.queries[r];if(!o)return[null,!1,i,null];var a=o[(n.query?n.query.index.name:null)||""];if(!a)return[null,!1,i,null];switch(r){case"query":var s=a.find((function(e){return e.req.limit===n.limit&&e.req.values===n.values&&areRangesEqual(e.req.query.range,n.query.range)}));return s?[s,!0,i,a]:[a.find((function(e){return("limit"in e.req?e.req.limit:1/0)>=n.limit&&(!n.values||e.req.values)&&isSuperRange(e.req.query.range,n.query.range)})),!1,i,a];case"count":var l=a.find((function(e){return areRangesEqual(e.req.query.range,n.query.range)}));return[l,!!l,i,a]}}function subscribeToCacheEntry(e,t,r,n){e.subscribers.add(r),n.addEventListener("abort",(function(){e.subscribers.delete(r),0===e.subscribers.size&&enqueForDeletion(e,t)}))}function enqueForDeletion(e,t){setTimeout((function(){0===e.subscribers.size&&delArrayItem(t,e)}),3e3)}var cacheMiddleware={stack:"dbcore",level:0,name:"Cache",create:function(e){var t=e.schema.name,r=__assign(__assign({},e),{transaction:function(r,n,i){var o=e.transaction(r,n,i);if("readwrite"===n){var a=new AbortController,s=a.signal,l=function(i){return function(){if(a.abort(),"readwrite"===n){for(var s=new Set,l=0,c=r;l<c.length;l++){var u=c[l],h=cache["idb://".concat(t,"/").concat(u)];if(h){var d=e.table(u),f=h.optimisticOps.filter((function(e){return e.trans===o}));if(o._explicit&&i&&o.mutatedParts)for(var p=0,m=Object.values(h.queries.query);p<m.length;p++)for(var g=0,v=(b=m[p]).slice();g<v.length;g++){obsSetsOverlap((x=v[g]).obsSet,o.mutatedParts)&&(delArrayItem(b,x),x.subscribers.forEach((function(e){return s.add(e)})))}else if(f.length>0){h.optimisticOps=h.optimisticOps.filter((function(e){return e.trans!==o}));for(var y=0,_=Object.values(h.queries.query);y<_.length;y++)for(var b,w=0,D=(b=_[y]).slice();w<D.length;w++){var x;if(null!=(x=D[w]).res&&o.mutatedParts)if(i&&!x.dirty){var S=Object.isFrozen(x.res),k=applyOptimisticOps(x.res,x.req,f,d,x,S);x.dirty?(delArrayItem(b,x),x.subscribers.forEach((function(e){return s.add(e)}))):k!==x.res&&(x.res=k,x.promise=DexiePromise.resolve({result:k}))}else x.dirty&&delArrayItem(b,x),x.subscribers.forEach((function(e){return s.add(e)}))}}}}s.forEach((function(e){return e()}))}}};o.addEventListener("abort",l(!1),{signal:s}),o.addEventListener("error",l(!1),{signal:s}),o.addEventListener("complete",l(!0),{signal:s})}return o},table:function(r){var n=e.table(r),i=n.schema.primaryKey,o=__assign(__assign({},n),{mutate:function(e){var o=PSD.trans;if(i.outbound||"disabled"===o.db._options.cache||o.explicit)return n.mutate(e);var a=cache["idb://".concat(t,"/").concat(r)];if(!a)return n.mutate(e);var s=n.mutate(e);return"add"!==e.type&&"put"!==e.type||!(e.values.length>=50||getEffectiveKeys(i,e).some((function(e){return null==e})))?(a.optimisticOps.push(e),e.mutatedParts&&signalSubscribersLazily(e.mutatedParts),s.then((function(t){if(t.numFailures>0){delArrayItem(a.optimisticOps,e);var r=adjustOptimisticFromFailures(a,e,t);r&&a.optimisticOps.push(r),e.mutatedParts&&signalSubscribersLazily(e.mutatedParts)}})),s.catch((function(){delArrayItem(a.optimisticOps,e),e.mutatedParts&&signalSubscribersLazily(e.mutatedParts)}))):s.then((function(t){var r=__assign(__assign({},e),{values:e.values.map((function(e,r){var n,o=(null===(n=i.keyPath)||void 0===n?void 0:n.includes("."))?deepClone(e):__assign({},e);return setByKeyPath(o,i.keyPath,t.results[r]),o}))}),n=adjustOptimisticFromFailures(a,r,t);a.optimisticOps.push(n),queueMicrotask((function(){return e.mutatedParts&&signalSubscribersLazily(e.mutatedParts)}))})),s},query:function(e){var i;if(!isCachableContext(PSD,n)||!isCachableRequest("query",e))return n.query(e);var o="immutable"===(null===(i=PSD.trans)||void 0===i?void 0:i.db._options.cache),a=PSD,s=a.requery,l=a.signal,c=findCompatibleQuery(t,r,"query",e),u=c[0],h=c[1],d=c[2],f=c[3];if(u&&h)u.obsSet=e.obsSet;else{var p=n.query(e).then((function(e){var t=e.result;if(u&&(u.res=t),o){for(var r=0,n=t.length;r<n;++r)Object.freeze(t[r]);Object.freeze(t)}else e.result=deepClone(t);return e})).catch((function(e){return f&&u&&delArrayItem(f,u),Promise.reject(e)}));u={obsSet:e.obsSet,promise:p,subscribers:new Set,type:"query",req:e,dirty:!1},f?f.push(u):(f=[u],d||(d=cache["idb://".concat(t,"/").concat(r)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}}),d.queries.query[e.query.index.name||""]=f)}return subscribeToCacheEntry(u,f,s,l),u.promise.then((function(t){return{result:applyOptimisticOps(t.result,e,null==d?void 0:d.optimisticOps,n,u,o)}}))}});return o}});return r}};function vipify(e,t){return new Proxy(e,{get:function(e,r,n){return"db"===r?t:Reflect.get(e,r,n)}})}var Dexie$1=function(){function e(t,r){var n=this;this._middlewares={},this.verno=0;var i=e.dependencies;this._options=r=__assign({addons:e.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange,cache:"cloned"},r),this._deps={indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange};var o=r.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var a={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:nop,dbReadyPromise:null,cancelOpen:nop,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:r.autoOpen};a.dbReadyPromise=new DexiePromise((function(e){a.dbReadyResolve=e})),a.openCanceller=new DexiePromise((function(e,t){a.cancelOpen=t})),this._state=a,this.name=t,this.on=Events(this,"populate","blocked","versionchange","close",{ready:[promisableChain,nop]}),this.on.ready.subscribe=override(this.on.ready.subscribe,(function(t){return function(r,i){e.vip((function(){var e=n._state;if(e.openComplete)e.dbOpenError||DexiePromise.resolve().then(r),i&&t(r);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(r),i&&t(r);else{t(r);var o=n;i||t((function e(){o.on.ready.unsubscribe(r),o.on.ready.unsubscribe(e)}))}}))}})),this.Collection=createCollectionConstructor(this),this.Table=createTableConstructor(this),this.Transaction=createTransactionConstructor(this),this.Version=createVersionConstructor(this),this.WhereClause=createWhereClauseConstructor(this),this.on("versionchange",(function(e){e.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(n.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(n.name,"'. Closing db now to resume the delete request.")),n.close({disableAutoOpen:!1})})),this.on("blocked",(function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('".concat(n.name,"') was blocked")):console.warn("Upgrade '".concat(n.name,"' blocked by other connection holding version ").concat(e.oldVersion/10))})),this._maxKey=getMaxKey(r.IDBKeyRange),this._createTransaction=function(e,t,r,i){return new n.Transaction(e,t,r,n._options.chromeTransactionDurability,i)},this._fireOnBlocked=function(e){n.on("blocked").fire(e),connections.filter((function(e){return e.name===n.name&&e!==n&&!e._state.vcFired})).map((function(t){return t.on("versionchange").fire(e)}))},this.use(cacheExistingValuesMiddleware),this.use(cacheMiddleware),this.use(observabilityMiddleware),this.use(virtualIndexMiddleware),this.use(hooksMiddleware);var s=new Proxy(this,{get:function(e,t,r){if("_vip"===t)return!0;if("table"===t)return function(e){return vipify(n.table(e),s)};var i=Reflect.get(e,t,r);return i instanceof Table?vipify(i,s):"tables"===t?i.map((function(e){return vipify(e,s)})):"_createTransaction"===t?function(){return vipify(i.apply(this,arguments),s)}:i}});this.vip=s,o.forEach((function(e){return e(n)}))}return e.prototype.version=function(e){if(isNaN(e)||e<.1)throw new exceptions.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new exceptions.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,r=t.filter((function(t){return t._cfg.version===e}))[0];return r||(r=new this.Version(e),t.push(r),t.sort(lowerVersionFirst),r.stores({}),this._state.autoSchema=!1,r)},e.prototype._whenReady=function(e){var t=this;return this.idbdb&&(this._state.openComplete||PSD.letThrough||this._vip)?e():new DexiePromise((function(e,r){if(t._state.openComplete)return r(new exceptions.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._state.autoOpen)return void r(new exceptions.DatabaseClosed);t.open().catch(nop)}t._state.dbReadyPromise.then(e,r)})).then(e)},e.prototype.use=function(e){var t=e.stack,r=e.create,n=e.level,i=e.name;i&&this.unuse({stack:t,name:i});var o=this._middlewares[t]||(this._middlewares[t]=[]);return o.push({stack:t,create:r,level:null==n?10:n,name:i}),o.sort((function(e,t){return e.level-t.level})),this},e.prototype.unuse=function(e){var t=e.stack,r=e.name,n=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((function(e){return n?e.create!==n:!!r&&e.name!==r}))),this},e.prototype.open=function(){var e=this;return usePSD(globalPSD,(function(){return dexieOpen(e)}))},e.prototype._close=function(){var e=this._state,t=connections.indexOf(this);if(t>=0&&connections.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this.idbdb=null}e.isBeingOpened||(e.dbReadyPromise=new DexiePromise((function(t){e.dbReadyResolve=t})),e.openCanceller=new DexiePromise((function(t,r){e.cancelOpen=r})))},e.prototype.close=function(e){var t=(void 0===e?{disableAutoOpen:!0}:e).disableAutoOpen,r=this._state;t?(r.isBeingOpened&&r.cancelOpen(new exceptions.DatabaseClosed),this._close(),r.autoOpen=!1,r.dbOpenError=new exceptions.DatabaseClosed):(this._close(),r.autoOpen=this._options.autoOpen||r.isBeingOpened,r.openComplete=!1,r.dbOpenError=null)},e.prototype.delete=function(e){var t=this;void 0===e&&(e={disableAutoOpen:!0});var r=arguments.length>0&&"object"!=typeof arguments[0],n=this._state;return new DexiePromise((function(i,o){var a=function(){t.close(e);var r=t._deps.indexedDB.deleteDatabase(t.name);r.onsuccess=wrap$1((function(){_onDatabaseDeleted(t._deps,t.name),i()})),r.onerror=eventRejectHandler(o),r.onblocked=t._fireOnBlocked};if(r)throw new exceptions.InvalidArgument("Invalid closeOptions argument to db.delete()");n.isBeingOpened?n.dbReadyPromise.then(a):a()}))},e.prototype.backendDB=function(){return this.idbdb},e.prototype.isOpen=function(){return null!==this.idbdb},e.prototype.hasBeenClosed=function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name},e.prototype.hasFailed=function(){return null!==this._state.dbOpenError},e.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(e.prototype,"tables",{get:function(){var e=this;return keys(this._allTables).map((function(t){return e._allTables[t]}))},enumerable:!1,configurable:!0}),e.prototype.transaction=function(){var e=extractTransactionArgs.apply(this,arguments);return this._transaction.apply(this,e)},e.prototype._transaction=function(e,t,r){var n=this,i=PSD.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);var o,a,s=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(a=t.map((function(e){var t=e instanceof n.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||e===READONLY)o=READONLY;else{if("rw"!=e&&e!=READWRITE)throw new exceptions.InvalidArgument("Invalid transaction mode: "+e);o=READWRITE}if(i){if(i.mode===READONLY&&o===READWRITE){if(!s)throw new exceptions.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&a.forEach((function(e){if(i&&-1===i.storeNames.indexOf(e)){if(!s)throw new exceptions.SubTransaction("Table "+e+" not included in parent transaction.");i=null}})),s&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,(function(t,r){r(e)})):rejection(e)}var l=enterTransactionScope.bind(null,this,o,a,i,r);return i?i._promise(o,l,"lock"):PSD.trans?usePSD(PSD.transless,(function(){return n._whenReady(l)})):this._whenReady(l)},e.prototype.table=function(e){if(!hasOwn(this._allTables,e))throw new exceptions.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]},e}(),symbolObservable="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Observable=function(){function e(e){this._subscribe=e}return e.prototype.subscribe=function(e,t,r){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:r})},e.prototype[symbolObservable]=function(){return this},e}(),domDeps;try{domDeps={indexedDB:_global.indexedDB||_global.mozIndexedDB||_global.webkitIndexedDB||_global.msIndexedDB,IDBKeyRange:_global.IDBKeyRange||_global.webkitIDBKeyRange}}catch(e){domDeps={indexedDB:null,IDBKeyRange:null}}function liveQuery(e){var t,r=!1,n=new Observable((function(n){var i=isAsyncFunction(e);var o,a=!1,s={},l={},c={get closed(){return a},unsubscribe:function(){a||(a=!0,o&&o.abort(),u&&globalEvents.storagemutated.unsubscribe(d))}};n.start&&n.start(c);var u=!1,h=function(){return execInGlobalContext(f)};var d=function(e){extendObservabilitySet(s,e),obsSetsOverlap(l,s)&&h()},f=function(){if(!a&&domDeps.indexedDB){s={};var c={};o&&o.abort(),o=new AbortController;var f={subscr:c,signal:o.signal,requery:h,querier:e,trans:null},p=function(t){var r=beginMicroTickScope();try{i&&incrementExpectedAwaits();var n=newScope(e,t);return i&&(n=n.finally(decrementExpectedAwaits)),n}finally{r&&endMicroTickScope()}}(f);Promise.resolve(p).then((function(e){r=!0,t=e,a||f.signal.aborted||(s={},objectIsEmpty(l=c)||u||(globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME,d),u=!0),execInGlobalContext((function(){return!a&&n.next&&n.next(e)})))}),(function(e){r=!1,["DatabaseClosedError","AbortError"].includes(null==e?void 0:e.name)||a||execInGlobalContext((function(){a||n.error&&n.error(e)}))}))}};return setTimeout(h,0),c}));return n.hasValue=function(){return r},n.getValue=function(){return t},n}var Dexie=Dexie$1;function propagateLocally(e){var t=propagatingLocally;try{propagatingLocally=!0,globalEvents.storagemutated.fire(e),signalSubscribersNow(e,!0)}finally{propagatingLocally=t}}props(Dexie,__assign(__assign({},fullNameExceptions),{delete:function(e){return new Dexie(e,{addons:[]}).delete()},exists:function(e){return new Dexie(e,{addons:[]}).open().then((function(e){return e.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(e){try{return getDatabaseNames(Dexie.dependencies).then(e)}catch(e){return rejection(new exceptions.MissingAPI)}},defineClass:function(){return function(e){extend(this,e)}},ignoreTransaction:function(e){return PSD.trans?usePSD(PSD.transless,e):e()},vip:vip,async:function(e){return function(){try{var t=awaitIterator(e.apply(this,arguments));return t&&"function"==typeof t.then?t:DexiePromise.resolve(t)}catch(e){return rejection(e)}}},spawn:function(e,t,r){try{var n=awaitIterator(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:DexiePromise.resolve(n)}catch(e){return rejection(e)}},currentTransaction:{get:function(){return PSD.trans||null}},waitFor:function(e,t){var r=DexiePromise.resolve("function"==typeof e?Dexie.ignoreTransaction(e):e).timeout(t||6e4);return PSD.trans?PSD.trans.waitFor(r):r},Promise:DexiePromise,debug:{get:function(){return debug},set:function(e){setDebug(e)}},derive:derive,extend:extend,props:props,override:override,Events:Events,on:globalEvents,liveQuery:liveQuery,extendObservabilitySet:extendObservabilitySet,getByKeyPath:getByKeyPath,setByKeyPath:setByKeyPath,delByKeyPath:delByKeyPath,shallowClone:shallowClone,deepClone:deepClone,getObjectDiff:getObjectDiff,cmp:cmp,asap:asap$1,minKey:minKey,addons:[],connections:connections,errnames:errnames,dependencies:domDeps,cache:cache,semVer:DEXIE_VERSION,version:DEXIE_VERSION.split(".").map((function(e){return parseInt(e)})).reduce((function(e,t,r){return e+t/Math.pow(10,2*r)}))})),Dexie.maxKey=getMaxKey(Dexie.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME,(function(e){var t;propagatingLocally||(t=new CustomEvent(STORAGE_MUTATED_DOM_EVENT_NAME,{detail:e}),propagatingLocally=!0,dispatchEvent(t),propagatingLocally=!1)})),addEventListener(STORAGE_MUTATED_DOM_EVENT_NAME,(function(e){var t=e.detail;propagatingLocally||propagateLocally(t)})));var propagatingLocally=!1,bc,createBC=function(){};"undefined"!=typeof BroadcastChannel&&(createBC=function(){(bc=new BroadcastChannel(STORAGE_MUTATED_DOM_EVENT_NAME)).onmessage=function(e){return e.data&&propagateLocally(e.data)}},createBC(),"function"==typeof bc.unref&&bc.unref(),globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME,(function(e){propagatingLocally||bc.postMessage(e)}))),"undefined"!=typeof addEventListener&&(addEventListener("pagehide",(function(e){if(!Dexie$1.disableBfCache&&e.persisted){debug&&console.debug("Dexie: handling persisted pagehide"),null==bc||bc.close();for(var t=0,r=connections;t<r.length;t++){r[t].close({disableAutoOpen:!1})}}})),addEventListener("pageshow",(function(e){!Dexie$1.disableBfCache&&e.persisted&&(debug&&console.debug("Dexie: handling persisted pageshow"),createBC(),propagateLocally({all:new RangeSet(-1/0,[[]])}))}))),DexiePromise.rejectionMapper=mapError,setDebug(debug);var requireFoolWebpack=eval("typeof require !== 'undefined' ? require : function (module) { throw new Error('Module \" + module + \" not found.') }"),requireFoolWebpack_1=requireFoolWebpack,environment=createCommonjsModule((function(e){var t=function(e){return void 0!==e&&null!=e.versions&&null!=e.versions.node};e.exports.isNode=t,e.exports.platform=void 0!==process$1&&t(process$1)?"node":"browser";var r=function(e){try{return requireFoolWebpack_1(e)}catch(e){return null}}("worker_threads");e.exports.isMainThread="node"===e.exports.platform?(!r||r.isMainThread)&&!process$1.connected:"undefined"!=typeof Window,e.exports.cpus="browser"===e.exports.platform?self.navigator.hardwareConcurrency:requireFoolWebpack_1("os").cpus().length}));function Promise$2(e,t){var r=this;if(!(this instanceof Promise$2))throw new SyntaxError("Constructor must be called with the new operator");if("function"!=typeof e)throw new SyntaxError("Function parameter handler(resolve, reject) missing");var n=[],i=[];this.resolved=!1,this.rejected=!1,this.pending=!0;var o=function(e,t){n.push(e),i.push(t)};this.then=function(e,t){return new Promise$2((function(r,n){var i=e?_then(e,r,n):r,a=t?_then(t,r,n):n;o(i,a)}),r)};var a=function(e){return r.resolved=!0,r.rejected=!1,r.pending=!1,n.forEach((function(t){t(e)})),o=function(t,r){t(e)},a=s=function(){},r},s=function(e){return r.resolved=!1,r.rejected=!0,r.pending=!1,i.forEach((function(t){t(e)})),o=function(t,r){r(e)},a=s=function(){},r};this.cancel=function(){return t?t.cancel():s(new CancellationError),r},this.timeout=function(e){if(t)t.timeout(e);else{var n=setTimeout((function(){s(new TimeoutError("Promise timed out after "+e+" ms"))}),e);r.always((function(){clearTimeout(n)}))}return r},e((function(e){a(e)}),(function(e){s(e)}))}function _then(e,t,r){return function(n){try{var i=e(n);i&&"function"==typeof i.then&&"function"==typeof i.catch?i.then(t,r):t(i)}catch(e){r(e)}}}function CancellationError(e){this.message=e||"promise cancelled",this.stack=(new Error).stack}function TimeoutError(e){this.message=e||"timeout exceeded",this.stack=(new Error).stack}environment.isNode,environment.platform,environment.isMainThread,environment.cpus,Promise$2.prototype.catch=function(e){return this.then(null,e)},Promise$2.prototype.always=function(e){return this.then(e,e)},Promise$2.all=function(e){return new Promise$2((function(t,r){var n=e.length,i=[];n?e.forEach((function(e,o){e.then((function(e){i[o]=e,0==--n&&t(i)}),(function(e){n=0,r(e)}))})):t(i)}))},Promise$2.defer=function(){var e={};return e.promise=new Promise$2((function(t,r){e.resolve=t,e.reject=r})),e},CancellationError.prototype=new Error,CancellationError.prototype.constructor=Error,CancellationError.prototype.name="CancellationError",Promise$2.CancellationError=CancellationError,TimeoutError.prototype=new Error,TimeoutError.prototype.constructor=Error,TimeoutError.prototype.name="TimeoutError",Promise$2.TimeoutError=TimeoutError;var _Promise=Promise$2,__dirname="/Users/wangshuai/workspace/web-design/go-design/node_modules/.pnpm/workerpool@6.4.0/node_modules/workerpool/src",embeddedWorker='!function(){var __webpack_modules__={577:function(e){e.exports=function(e,r){this.message=e,this.transfer=r}}},__webpack_module_cache__={};function __webpack_require__(e){var r=__webpack_module_cache__[e];return void 0!==r||(r=__webpack_module_cache__[e]={exports:{}},__webpack_modules__[e](r,r.exports,__webpack_require__)),r.exports}var __webpack_exports__={};!function(){var exports=__webpack_exports__,__webpack_unused_export__;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Transfer=__webpack_require__(577),requireFoolWebpack=eval("typeof require !== \'undefined\' ? require : function (module) { throw new Error(\'Module \\" + module + \\" not found.\') }"),TERMINATE_METHOD_ID="__workerpool-terminate__",worker={exit:function(){}},WorkerThreads,parentPort;if("undefined"!=typeof self&&"function"==typeof postMessage&&"function"==typeof addEventListener)worker.on=function(e,r){addEventListener(e,function(e){r(e.data)})},worker.send=function(e){postMessage(e)};else{if("undefined"==typeof process)throw new Error("Script must be executed as a worker");try{WorkerThreads=requireFoolWebpack("worker_threads")}catch(error){if("object"!==_typeof(error)||null===error||"MODULE_NOT_FOUND"!==error.code)throw error}WorkerThreads&&null!==WorkerThreads.parentPort?(parentPort=WorkerThreads.parentPort,worker.send=parentPort.postMessage.bind(parentPort),worker.on=parentPort.on.bind(parentPort)):(worker.on=process.on.bind(process),worker.send=function(e){process.send(e)},worker.on("disconnect",function(){process.exit(1)})),worker.exit=process.exit.bind(process)}function convertError(o){return Object.getOwnPropertyNames(o).reduce(function(e,r){return Object.defineProperty(e,r,{value:o[r],enumerable:!0})},{})}function isPromise(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}worker.methods={},worker.methods.run=function(e,r){e=new Function("return ("+e+").apply(null, arguments);");return e.apply(e,r)},worker.methods.methods=function(){return Object.keys(worker.methods)},worker.terminationHandler=void 0,worker.cleanupAndExit=function(e){function r(){worker.exit(e)}if(!worker.terminationHandler)return r();var o=worker.terminationHandler(e);isPromise(o)?o.then(r,r):r()};var currentRequestId=null;worker.on("message",function(r){if(r===TERMINATE_METHOD_ID)return worker.cleanupAndExit(0);try{var e=worker.methods[r.method];if(!e)throw new Error(\'Unknown method "\'+r.method+\'"\');currentRequestId=r.id;var o=e.apply(e,r.params);isPromise(o)?o.then(function(e){e instanceof Transfer?worker.send({id:r.id,result:e.message,error:null},e.transfer):worker.send({id:r.id,result:e,error:null}),currentRequestId=null}).catch(function(e){worker.send({id:r.id,result:null,error:convertError(e)}),currentRequestId=null}):(o instanceof Transfer?worker.send({id:r.id,result:o.message,error:null},o.transfer):worker.send({id:r.id,result:o,error:null}),currentRequestId=null)}catch(e){worker.send({id:r.id,result:null,error:convertError(e)})}}),worker.register=function(e,r){if(e)for(var o in e)e.hasOwnProperty(o)&&(worker.methods[o]=e[o]);r&&(worker.terminationHandler=r.onTerminate),worker.send("ready")},worker.emit=function(e){currentRequestId&&(e instanceof Transfer?worker.send({id:currentRequestId,isEvent:!0,payload:e.message},e.transfer):worker.send({id:currentRequestId,isEvent:!0,payload:e}))},__webpack_unused_export__=worker.register,worker.emit}()}();',TERMINATE_METHOD_ID="__workerpool-terminate__";function ensureWorkerThreads(){var e=tryRequireWorkerThreads();if(!e)throw new Error("WorkerPool: workerType = 'thread' is not supported, Node >= 11.7.0 required");return e}function ensureWebWorker(){if("function"!=typeof Worker&&("object"!=typeof Worker||"function"!=typeof Worker.prototype.constructor))throw new Error("WorkerPool: Web Workers not supported")}function tryRequireWorkerThreads(){try{return requireFoolWebpack_1("worker_threads")}catch(e){if("object"==typeof e&&null!==e&&"MODULE_NOT_FOUND"===e.code)return null;throw e}}function getDefaultWorker(){if("browser"===environment.platform){if("undefined"==typeof Blob)throw new Error("Blob not supported by the browser");if(!window.URL||"function"!=typeof window.URL.createObjectURL)throw new Error("URL.createObjectURL not supported by the browser");var e=new Blob([embeddedWorker],{type:"text/javascript"});return window.URL.createObjectURL(e)}return __dirname+"/worker.js"}function setupWorker(e,t){if("web"===t.workerType)return ensureWebWorker(),setupBrowserWorker(e,Worker);if("thread"===t.workerType)return setupWorkerThreadWorker(e,r=ensureWorkerThreads(),t.workerThreadOpts);if("process"!==t.workerType&&t.workerType){if("browser"===environment.platform)return ensureWebWorker(),setupBrowserWorker(e,Worker);var r=tryRequireWorkerThreads();return r?setupWorkerThreadWorker(e,r):setupProcessWorker(e,resolveForkOptions(t),requireFoolWebpack_1("child_process"))}return setupProcessWorker(e,resolveForkOptions(t),requireFoolWebpack_1("child_process"))}function setupBrowserWorker(e,t){var r=new t(e);return r.isBrowserWorker=!0,r.on=function(e,t){this.addEventListener(e,(function(e){t(e.data)}))},r.send=function(e,t){this.postMessage(e,t)},r}function setupWorkerThreadWorker(e,t,r){var n=new t.Worker(e,{stdout:!1,stderr:!1,...r});return n.isWorkerThread=!0,n.send=function(e,t){this.postMessage(e,t)},n.kill=function(){return this.terminate(),!0},n.disconnect=function(){this.terminate()},n}function setupProcessWorker(e,t,r){var n=r.fork(e,t.forkArgs,t.forkOpts),i=n.send;return n.send=function(e){return i.call(n,e)},n.isChildProcess=!0,n}function resolveForkOptions(e){e=e||{};var t=process$1.execArgv.join(" "),r=-1!==t.indexOf("--inspect"),n=-1!==t.indexOf("--debug-brk"),i=[];return r&&(i.push("--inspect="+e.debugPort),n&&i.push("--debug-brk")),process$1.execArgv.forEach((function(e){e.indexOf("--max-old-space-size")>-1&&i.push(e)})),Object.assign({},e,{forkArgs:e.forkArgs,forkOpts:Object.assign({},e.forkOpts,{execArgv:(e.forkOpts&&e.forkOpts.execArgv||[]).concat(i)})})}function objectToError(e){for(var t=new Error(""),r=Object.keys(e),n=0;n<r.length;n++)t[r[n]]=e[r[n]];return t}function WorkerHandler(e,t){var r=this,n=t||{};function i(e){for(var t in r.terminated=!0,r.processing)void 0!==r.processing[t]&&r.processing[t].resolver.reject(e);r.processing=Object.create(null)}this.script=e||getDefaultWorker(),this.worker=setupWorker(this.script,n),this.debugPort=n.debugPort,this.forkOpts=n.forkOpts,this.forkArgs=n.forkArgs,this.workerThreadOpts=n.workerThreadOpts,this.workerTerminateTimeout=n.workerTerminateTimeout,e||(this.worker.ready=!0),this.requestQueue=[],this.worker.on("message",(function(e){if(!r.terminated)if("string"==typeof e&&"ready"===e)r.worker.ready=!0,function(){for(const e of r.requestQueue.splice(0))r.worker.send(e.message,e.transfer)}();else{var t=e.id,n=r.processing[t];void 0!==n&&(e.isEvent?n.options&&"function"==typeof n.options.on&&n.options.on(e.payload):(delete r.processing[t],!0===r.terminating&&r.terminate(),e.error?n.resolver.reject(objectToError(e.error)):n.resolver.resolve(e.result)))}}));var o=this.worker;this.worker.on("error",i),this.worker.on("exit",(function(e,t){var n="Workerpool Worker terminated Unexpectedly\n";n+=" exitCode: `"+e+"`\n",n+=" signalCode: `"+t+"`\n",n+=" workerpool.script: `"+r.script+"`\n",n+=" spawnArgs: `"+o.spawnargs+"`\n",n+=" spawnfile: `"+o.spawnfile+"`\n",n+=" stdout: `"+o.stdout+"`\n",n+=" stderr: `"+o.stderr+"`\n",i(new Error(n))})),this.processing=Object.create(null),this.terminating=!1,this.terminated=!1,this.cleaning=!1,this.terminationHandler=null,this.lastId=0}WorkerHandler.prototype.methods=function(){return this.exec("methods")},WorkerHandler.prototype.exec=function(e,t,r,n){r||(r=_Promise.defer());var i=++this.lastId;this.processing[i]={id:i,resolver:r,options:n};var o={message:{id:i,method:e,params:t},transfer:n&&n.transfer};this.terminated?r.reject(new Error("Worker is terminated")):this.worker.ready?this.worker.send(o.message,o.transfer):this.requestQueue.push(o);var a=this;return r.promise.catch((function(e){if(e instanceof _Promise.CancellationError||e instanceof _Promise.TimeoutError)return delete a.processing[i],a.terminateAndNotify(!0).then((function(){throw e}),(function(e){throw e}));throw e}))},WorkerHandler.prototype.busy=function(){return this.cleaning||Object.keys(this.processing).length>0},WorkerHandler.prototype.terminate=function(e,t){var r=this;if(e){for(var n in this.processing)void 0!==this.processing[n]&&this.processing[n].resolver.reject(new Error("Worker terminated"));this.processing=Object.create(null)}if("function"==typeof t&&(this.terminationHandler=t),this.busy())this.terminating=!0;else{var i=function(e){if(r.terminated=!0,r.cleaning=!1,null!=r.worker&&r.worker.removeAllListeners&&r.worker.removeAllListeners("message"),r.worker=null,r.terminating=!1,r.terminationHandler)r.terminationHandler(e,r);else if(e)throw e};if(this.worker){if("function"==typeof this.worker.kill){if(this.worker.killed)return void i(new Error("worker already killed!"));var o=setTimeout((function(){r.worker&&r.worker.kill()}),this.workerTerminateTimeout);return this.worker.once("exit",(function(){clearTimeout(o),r.worker&&(r.worker.killed=!0),i()})),this.worker.ready?this.worker.send(TERMINATE_METHOD_ID):this.requestQueue.push(TERMINATE_METHOD_ID),void(this.cleaning=!0)}if("function"!=typeof this.worker.terminate)throw new Error("Failed to terminate worker");this.worker.terminate(),this.worker.killed=!0}i()}},WorkerHandler.prototype.terminateAndNotify=function(e,t){var r=_Promise.defer();return t&&(r.promise.timeout=t),this.terminate(e,(function(e,t){e?r.reject(e):r.resolve(t)})),r.promise};var WorkerHandler_1=WorkerHandler,_tryRequireWorkerThreads=tryRequireWorkerThreads,_setupProcessWorker=setupProcessWorker,_setupBrowserWorker=setupBrowserWorker,_setupWorkerThreadWorker=setupWorkerThreadWorker,ensureWorkerThreads_1=ensureWorkerThreads;WorkerHandler_1._tryRequireWorkerThreads=_tryRequireWorkerThreads,WorkerHandler_1._setupProcessWorker=_setupProcessWorker,WorkerHandler_1._setupBrowserWorker=_setupBrowserWorker,WorkerHandler_1._setupWorkerThreadWorker=_setupWorkerThreadWorker,WorkerHandler_1.ensureWorkerThreads=ensureWorkerThreads_1;var MAX_PORTS=65535,debugPortAllocator=DebugPortAllocator;function DebugPortAllocator(){this.ports=Object.create(null),this.length=0}DebugPortAllocator.prototype.nextAvailableStartingAt=function(e){for(;!0===this.ports[e];)e++;if(e>=MAX_PORTS)throw new Error("WorkerPool debug port limit reached: "+e+">= "+MAX_PORTS);return this.ports[e]=!0,this.length++,e},DebugPortAllocator.prototype.releasePort=function(e){delete this.ports[e],this.length--};var DEBUG_PORT_ALLOCATOR=new debugPortAllocator;function Pool(e,t){"string"==typeof e?this.script=e||null:(this.script=null,t=e),this.workers=[],this.tasks=[],t=t||{},this.forkArgs=Object.freeze(t.forkArgs||[]),this.forkOpts=Object.freeze(t.forkOpts||{}),this.workerThreadOpts=Object.freeze(t.workerThreadOpts||{}),this.debugPortStart=t.debugPortStart||43210,this.nodeWorker=t.nodeWorker,this.workerType=t.workerType||t.nodeWorker||"auto",this.maxQueueSize=t.maxQueueSize||1/0,this.workerTerminateTimeout=t.workerTerminateTimeout||1e3,this.onCreateWorker=t.onCreateWorker||(()=>null),this.onTerminateWorker=t.onTerminateWorker||(()=>null),t&&"maxWorkers"in t?(validateMaxWorkers(t.maxWorkers),this.maxWorkers=t.maxWorkers):this.maxWorkers=Math.max((environment.cpus||4)-1,1),t&&"minWorkers"in t&&("max"===t.minWorkers?this.minWorkers=this.maxWorkers:(validateMinWorkers(t.minWorkers),this.minWorkers=t.minWorkers,this.maxWorkers=Math.max(this.minWorkers,this.maxWorkers)),this._ensureMinWorkers()),this._boundNext=this._next.bind(this),"thread"===this.workerType&&WorkerHandler_1.ensureWorkerThreads()}function validateMaxWorkers(e){if(!isNumber(e)||!isInteger(e)||e<1)throw new TypeError("Option maxWorkers must be an integer number >= 1")}function validateMinWorkers(e){if(!isNumber(e)||!isInteger(e)||e<0)throw new TypeError("Option minWorkers must be an integer number >= 0")}function isNumber(e){return"number"==typeof e}function isInteger(e){return Math.round(e)==e}Pool.prototype.exec=function(e,t,r){if(t&&!Array.isArray(t))throw new TypeError('Array expected as argument "params"');if("string"==typeof e){var n=_Promise.defer();if(this.tasks.length>=this.maxQueueSize)throw new Error("Max queue size of "+this.maxQueueSize+" reached");var i=this.tasks,o={method:e,params:t,resolver:n,timeout:null,options:r};i.push(o);var a=n.promise.timeout;return n.promise.timeout=function(e){return-1!==i.indexOf(o)?(o.timeout=e,n.promise):a.call(n.promise,e)},this._next(),n.promise}if("function"==typeof e)return this.exec("run",[String(e),t]);throw new TypeError('Function or string expected as argument "method"')},Pool.prototype.proxy=function(){if(arguments.length>0)throw new Error("No arguments expected");var e=this;return this.exec("methods").then((function(t){var r={};return t.forEach((function(t){r[t]=function(){return e.exec(t,Array.prototype.slice.call(arguments))}})),r}))},Pool.prototype._next=function(){if(this.tasks.length>0){var e=this._getWorker();if(e){var t=this,r=this.tasks.shift();if(r.resolver.promise.pending){var n=e.exec(r.method,r.params,r.resolver,r.options).then(t._boundNext).catch((function(){if(e.terminated)return t._removeWorker(e)})).then((function(){t._next()}));"number"==typeof r.timeout&&n.timeout(r.timeout)}else t._next()}}},Pool.prototype._getWorker=function(){for(var e=this.workers,t=0;t<e.length;t++){var r=e[t];if(!1===r.busy())return r}return e.length<this.maxWorkers?(r=this._createWorkerHandler(),e.push(r),r):null},Pool.prototype._removeWorker=function(e){var t=this;return DEBUG_PORT_ALLOCATOR.releasePort(e.debugPort),this._removeWorkerFromList(e),this._ensureMinWorkers(),new _Promise((function(r,n){e.terminate(!1,(function(i){t.onTerminateWorker({forkArgs:e.forkArgs,forkOpts:e.forkOpts,workerThreadOpts:e.workerThreadOpts,script:e.script}),i?n(i):r(e)}))}))},Pool.prototype._removeWorkerFromList=function(e){var t=this.workers.indexOf(e);-1!==t&&this.workers.splice(t,1)},Pool.prototype.terminate=function(e,t){var r=this;this.tasks.forEach((function(e){e.resolver.reject(new Error("Pool terminated"))})),this.tasks.length=0;var n=function(e){DEBUG_PORT_ALLOCATOR.releasePort(e.debugPort),this._removeWorkerFromList(e)}.bind(this),i=[];return this.workers.slice().forEach((function(o){var a=o.terminateAndNotify(e,t).then(n).always((function(){r.onTerminateWorker({forkArgs:o.forkArgs,forkOpts:o.forkOpts,workerThreadOpts:o.workerThreadOpts,script:o.script})}));i.push(a)})),_Promise.all(i)},Pool.prototype.stats=function(){var e=this.workers.length,t=this.workers.filter((function(e){return e.busy()})).length;return{totalWorkers:e,busyWorkers:t,idleWorkers:e-t,pendingTasks:this.tasks.length,activeTasks:t}},Pool.prototype._ensureMinWorkers=function(){if(this.minWorkers)for(var e=this.workers.length;e<this.minWorkers;e++)this.workers.push(this._createWorkerHandler())},Pool.prototype._createWorkerHandler=function(){const e=this.onCreateWorker({forkArgs:this.forkArgs,forkOpts:this.forkOpts,workerThreadOpts:this.workerThreadOpts,script:this.script})||{};return new WorkerHandler_1(e.script||this.script,{forkArgs:e.forkArgs||this.forkArgs,forkOpts:e.forkOpts||this.forkOpts,workerThreadOpts:e.workerThreadOpts||this.workerThreadOpts,debugPort:DEBUG_PORT_ALLOCATOR.nextAvailableStartingAt(this.debugPortStart),workerType:this.workerType,workerTerminateTimeout:this.workerTerminateTimeout})};var Pool_1=Pool;function Transfer$1(e,t){this.message=e,this.transfer=t}var transfer=Transfer$1,worker_1=createCommonjsModule((function(module,exports){var requireFoolWebpack=eval("typeof require !== 'undefined' ? require : function (module) { throw new Error('Module \" + module + \" not found.') }"),TERMINATE_METHOD_ID="__workerpool-terminate__",worker={exit:function(){}};if("undefined"!=typeof self&&"function"==typeof postMessage&&"function"==typeof addEventListener)worker.on=function(e,t){addEventListener(e,(function(e){t(e.data)}))},worker.send=function(e){postMessage(e)};else{if(void 0===process$1)throw new Error("Script must be executed as a worker");var WorkerThreads;try{WorkerThreads=requireFoolWebpack("worker_threads")}catch(e){if("object"!=typeof e||null===e||"MODULE_NOT_FOUND"!==e.code)throw e}if(WorkerThreads&&null!==WorkerThreads.parentPort){var parentPort=WorkerThreads.parentPort;worker.send=parentPort.postMessage.bind(parentPort),worker.on=parentPort.on.bind(parentPort),worker.exit=process$1.exit.bind(process$1)}else worker.on=process$1.on.bind(process$1),worker.send=function(e){process$1.send(e)},worker.on("disconnect",(function(){process$1.exit(1)})),worker.exit=process$1.exit.bind(process$1)}function convertError(e){return Object.getOwnPropertyNames(e).reduce((function(t,r){return Object.defineProperty(t,r,{value:e[r],enumerable:!0})}),{})}function isPromise(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}worker.methods={},worker.methods.run=function(e,t){var r=new Function("return ("+e+").apply(null, arguments);");return r.apply(r,t)},worker.methods.methods=function(){return Object.keys(worker.methods)},worker.terminationHandler=void 0,worker.cleanupAndExit=function(e){var t=function(){worker.exit(e)};if(!worker.terminationHandler)return t();var r=worker.terminationHandler(e);isPromise(r)?r.then(t,t):t()};var currentRequestId=null;worker.on("message",(function(e){if(e===TERMINATE_METHOD_ID)return worker.cleanupAndExit(0);try{var t=worker.methods[e.method];if(!t)throw new Error('Unknown method "'+e.method+'"');currentRequestId=e.id;var r=t.apply(t,e.params);isPromise(r)?r.then((function(t){t instanceof transfer?worker.send({id:e.id,result:t.message,error:null},t.transfer):worker.send({id:e.id,result:t,error:null}),currentRequestId=null})).catch((function(t){worker.send({id:e.id,result:null,error:convertError(t)}),currentRequestId=null})):(r instanceof transfer?worker.send({id:e.id,result:r.message,error:null},r.transfer):worker.send({id:e.id,result:r,error:null}),currentRequestId=null)}catch(t){worker.send({id:e.id,result:null,error:convertError(t)})}})),worker.register=function(e,t){if(e)for(var r in e)e.hasOwnProperty(r)&&(worker.methods[r]=e[r]);t&&(worker.terminationHandler=t.onTerminate),worker.send("ready")},worker.emit=function(e){if(currentRequestId){if(e instanceof transfer)return void worker.send({id:currentRequestId,isEvent:!0,payload:e.message},e.transfer);worker.send({id:currentRequestId,isEvent:!0,payload:e})}},exports.add=worker.register,exports.emit=worker.emit}));worker_1.add,worker_1.emit;var pool=function(e,t){return new Pool_1(e,t)},worker=function(e,t){var r=worker_1;r.add(e,t)},workerEmit=function(e){worker_1.emit(e)},Promise$1=_Promise,Transfer=transfer,platform=environment.platform,isMainThread=environment.isMainThread,cpus=environment.cpus,src={pool:pool,worker:worker,workerEmit:workerEmit,Promise:Promise$1,Transfer:Transfer,platform:platform,isMainThread:isMainThread,cpus:cpus},interopRequireDefault=createCommonjsModule((function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}));unwrapExports(interopRequireDefault);var colorName={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},isArrayish=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))},simpleSwizzle=createCommonjsModule((function(e){var t=Array.prototype.concat,r=Array.prototype.slice,n=e.exports=function(e){for(var n=[],i=0,o=e.length;i<o;i++){var a=e[i];isArrayish(a)?n=t.call(n,r.call(a)):n.push(a)}return n};n.wrap=function(e){return function(){return e(n(arguments))}}})),colorString=createCommonjsModule((function(e){var t=Object.hasOwnProperty,r=Object.create(null);for(var n in colorName)t.call(colorName,n)&&(r[colorName[n]]=n);var i=e.exports={to:{},get:{}};function o(e,t,r){return Math.min(Math.max(t,e),r)}function a(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}i.get=function(e){var t,r;switch(e.substring(0,3).toLowerCase()){case"hsl":t=i.get.hsl(e),r="hsl";break;case"hwb":t=i.get.hwb(e),r="hwb";break;default:t=i.get.rgb(e),r="rgb"}return t?{model:r,value:t}:null},i.get.rgb=function(e){if(!e)return null;var r,n,i,a=[0,0,0,1];if(r=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(i=r[2],r=r[1],n=0;n<3;n++){var s=2*n;a[n]=parseInt(r.slice(s,s+2),16)}i&&(a[3]=parseInt(i,16)/255)}else if(r=e.match(/^#([a-f0-9]{3,4})$/i)){for(i=(r=r[1])[3],n=0;n<3;n++)a[n]=parseInt(r[n]+r[n],16);i&&(a[3]=parseInt(i+i,16)/255)}else if(r=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)a[n]=parseInt(r[n+1],0);r[4]&&(r[5]?a[3]=.01*parseFloat(r[4]):a[3]=parseFloat(r[4]))}else{if(!(r=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(r=e.match(/^(\w+)$/))?"transparent"===r[1]?[0,0,0,0]:t.call(colorName,r[1])?((a=colorName[r[1]])[3]=1,a):null:null;for(n=0;n<3;n++)a[n]=Math.round(2.55*parseFloat(r[n+1]));r[4]&&(r[5]?a[3]=.01*parseFloat(r[4]):a[3]=parseFloat(r[4]))}for(n=0;n<3;n++)a[n]=o(a[n],0,255);return a[3]=o(a[3],0,1),a},i.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var r=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,o(parseFloat(t[2]),0,100),o(parseFloat(t[3]),0,100),o(isNaN(r)?1:r,0,1)]}return null},i.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var r=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,o(parseFloat(t[2]),0,100),o(parseFloat(t[3]),0,100),o(isNaN(r)?1:r,0,1)]}return null},i.to.hex=function(){var e=simpleSwizzle(arguments);return"#"+a(e[0])+a(e[1])+a(e[2])+(e[3]<1?a(Math.round(255*e[3])):"")},i.to.rgb=function(){var e=simpleSwizzle(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},i.to.rgb.percent=function(){var e=simpleSwizzle(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),n=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+r+"%, "+n+"%)":"rgba("+t+"%, "+r+"%, "+n+"%, "+e[3]+")"},i.to.hsl=function(){var e=simpleSwizzle(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},i.to.hwb=function(){var e=simpleSwizzle(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},i.to.keyword=function(e){return r[e.slice(0,3)]}}));colorString.to,colorString.get;const reverseKeywords={};for(const e of Object.keys(colorName))reverseKeywords[colorName[e]]=e;const convert$1={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var conversions=convert$1;for(const e of Object.keys(convert$1)){if(!("channels"in convert$1[e]))throw new Error("missing channels property: "+e);if(!("labels"in convert$1[e]))throw new Error("missing channel labels property: "+e);if(convert$1[e].labels.length!==convert$1[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=convert$1[e];delete convert$1[e].channels,delete convert$1[e].labels,Object.defineProperty(convert$1[e],"channels",{value:t}),Object.defineProperty(convert$1[e],"labels",{value:r})}function comparativeDistance(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}function buildGraph(){const e={},t=Object.keys(conversions);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}function deriveBFS(e){const t=buildGraph(),r=[e];for(t[e].distance=0;r.length;){const e=r.pop(),n=Object.keys(conversions[e]);for(let i=n.length,o=0;o<i;o++){const i=n[o],a=t[i];-1===a.distance&&(a.distance=t[e].distance+1,a.parent=e,r.unshift(i))}}return t}function link(e,t){return function(r){return t(e(r))}}function wrapConversion(e,t){const r=[t[e].parent,e];let n=conversions[t[e].parent][e],i=t[e].parent;for(;t[i].parent;)r.unshift(t[i].parent),n=link(conversions[t[i].parent][i],n),i=t[i].parent;return n.conversion=r,n}convert$1.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=o-i;let s,l;o===i?s=0:t===o?s=(r-n)/a:r===o?s=2+(n-t)/a:n===o&&(s=4+(t-r)/a),s=Math.min(60*s,360),s<0&&(s+=360);const c=(i+o)/2;return l=o===i?0:c<=.5?a/(o+i):a/(2-o-i),[s,100*l,100*c]},convert$1.rgb.hsv=function(e){let t,r,n,i,o;const a=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(a,s,l),u=c-Math.min(a,s,l),h=function(e){return(c-e)/6/u+.5};return 0===u?(i=0,o=0):(o=u/c,t=h(a),r=h(s),n=h(l),a===c?i=n-r:s===c?i=1/3+t-n:l===c&&(i=2/3+r-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*o,100*c]},convert$1.rgb.hwb=function(e){const t=e[0],r=e[1];let n=e[2];const i=convert$1.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[i,100*o,100*n]},convert$1.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(1-t,1-r,1-n);return[100*((1-t-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*i]},convert$1.rgb.keyword=function(e){const t=reverseKeywords[e];if(t)return t;let r,n=1/0;for(const t of Object.keys(colorName)){const i=comparativeDistance(e,colorName[t]);i<n&&(n=i,r=t)}return r},convert$1.keyword.rgb=function(e){return colorName[e]},convert$1.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*t+.3576*r+.1805*n),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},convert$1.rgb.lab=function(e){const t=convert$1.rgb.xyz(e);let r=t[0],n=t[1],i=t[2];r/=95.047,n/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*n-16,500*(r-n),200*(n-i)]},convert$1.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let i,o,a;if(0===r)return a=255*n,[a,a,a];i=n<.5?n*(1+r):n+r-n*r;const s=2*n-i,l=[0,0,0];for(let e=0;e<3;e++)o=t+1/3*-(e-1),o<0&&o++,o>1&&o--,a=6*o<1?s+6*(i-s)*o:2*o<1?i:3*o<2?s+(i-s)*(2/3-o)*6:s,l[e]=255*a;return l},convert$1.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,i=r;const o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=o<=1?o:2-o;return[t,100*(0===n?2*i/(o+i):2*r/(n+r)),100*((n+r)/2)]},convert$1.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const i=Math.floor(t)%6,o=t-Math.floor(t),a=255*n*(1-r),s=255*n*(1-r*o),l=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,l,a];case 1:return[s,n,a];case 2:return[a,n,l];case 3:return[a,s,n];case 4:return[l,a,n];case 5:return[n,a,s]}},convert$1.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,i=Math.max(n,.01);let o,a;a=(2-r)*n;const s=(2-r)*i;return o=r*i,o/=s<=1?s:2-s,o=o||0,a/=2,[t,100*o,100*a]},convert$1.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const i=r+n;let o;i>1&&(r/=i,n/=i);const a=Math.floor(6*t),s=1-n;o=6*t-a,1&a&&(o=1-o);const l=r+o*(s-r);let c,u,h;switch(a){default:case 6:case 0:c=s,u=l,h=r;break;case 1:c=l,u=s,h=r;break;case 2:c=r,u=s,h=l;break;case 3:c=r,u=l,h=s;break;case 4:c=l,u=r,h=s;break;case 5:c=s,u=r,h=l}return[255*c,255*u,255*h]},convert$1.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]},convert$1.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let i,o,a;return i=3.2406*t+-1.5372*r+-.4986*n,o=-.9689*t+1.8758*r+.0415*n,a=.0557*t+-.204*r+1.057*n,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),[255*i,255*o,255*a]},convert$1.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*r-16,500*(t-r),200*(r-n)]},convert$1.lab.xyz=function(e){let t,r,n;r=(e[0]+16)/116,t=e[1]/500+r,n=r-e[2]/200;const i=r**3,o=t**3,a=n**3;return r=i>.008856?i:(r-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,n=a>.008856?a:(n-16/116)/7.787,t*=95.047,r*=100,n*=108.883,[t,r,n]},convert$1.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let i;i=360*Math.atan2(n,r)/2/Math.PI,i<0&&(i+=360);return[t,Math.sqrt(r*r+n*n),i]},convert$1.lch.lab=function(e){const t=e[0],r=e[1],n=e[2]/360*2*Math.PI;return[t,r*Math.cos(n),r*Math.sin(n)]},convert$1.rgb.ansi16=function(e,t=null){const[r,n,i]=e;let o=null===t?convert$1.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),0===o)return 30;let a=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return 2===o&&(a+=60),a},convert$1.hsv.ansi16=function(e){return convert$1.rgb.ansi16(convert$1.hsv.rgb(e),e[2])},convert$1.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];if(t===r&&r===n)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},convert$1.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},convert$1.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},convert$1.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},convert$1.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split("").map((e=>e+e)).join(""));const n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},convert$1.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.max(Math.max(t,r),n),o=Math.min(Math.min(t,r),n),a=i-o;let s,l;return s=a<1?o/(1-a):0,l=a<=0?0:i===t?(r-n)/a%6:i===r?2+(n-t)/a:4+(t-r)/a,l/=6,l%=1,[360*l,100*a,100*s]},convert$1.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let i=0;return n<1&&(i=(r-.5*n)/(1-n)),[e[0],100*n,100*i]},convert$1.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},convert$1.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];const i=[0,0,0],o=t%1*6,a=o%1,s=1-a;let l=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return l=(1-r)*n,[255*(r*i[0]+l),255*(r*i[1]+l),255*(r*i[2]+l)]},convert$1.hcg.hsv=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);let n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},convert$1.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},convert$1.hcg.hwb=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},convert$1.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,n=r-t;let i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},convert$1.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},convert$1.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},convert$1.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},convert$1.gray.hsl=function(e){return[0,0,e[0]]},convert$1.gray.hsv=convert$1.gray.hsl,convert$1.gray.hwb=function(e){return[0,100,e[0]]},convert$1.gray.cmyk=function(e){return[0,0,0,e[0]]},convert$1.gray.lab=function(e){return[e[0],0,0]},convert$1.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},convert$1.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};var route=function(e){const t=deriveBFS(e),r={},n=Object.keys(t);for(let e=n.length,i=0;i<e;i++){const e=n[i];null!==t[e].parent&&(r[e]=wrapConversion(e,t))}return r};const convert={},models=Object.keys(conversions);function wrapRaw(e){const t=function(...t){const r=t[0];return null==r?r:(r.length>1&&(t=r),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}function wrapRounded(e){const t=function(...t){const r=t[0];if(null==r)return r;r.length>1&&(t=r);const n=e(t);if("object"==typeof n)for(let e=n.length,t=0;t<e;t++)n[t]=Math.round(n[t]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}models.forEach((e=>{convert[e]={},Object.defineProperty(convert[e],"channels",{value:conversions[e].channels}),Object.defineProperty(convert[e],"labels",{value:conversions[e].labels});const t=route(e);Object.keys(t).forEach((r=>{const n=t[r];convert[e][r]=wrapRounded(n),convert[e][r].raw=wrapRaw(n)}))}));var colorConvert=convert;const skippedModels=["keyword","gray","hex"],hashedModelKeys={};for(const e of Object.keys(colorConvert))hashedModelKeys[[...colorConvert[e].labels].sort().join("")]=e;const limiters={};function Color(e,t){if(!(this instanceof Color))return new Color(e,t);if(t&&t in skippedModels&&(t=null),t&&!(t in colorConvert))throw new Error("Unknown model: "+t);let r,n;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof Color)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if("string"==typeof e){const t=colorString.get(e);if(null===t)throw new Error("Unable to parse color from string: "+e);this.model=t.model,n=colorConvert[this.model].channels,this.color=t.value.slice(0,n),this.valpha="number"==typeof t.value[n]?t.value[n]:1}else if(e.length>0){this.model=t||"rgb",n=colorConvert[this.model].channels;const r=Array.prototype.slice.call(e,0,n);this.color=zeroArray(r,n),this.valpha="number"==typeof e[n]?e[n]:1}else if("number"==typeof e)this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;const t=Object.keys(e);"alpha"in e&&(t.splice(t.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);const n=t.sort().join("");if(!(n in hashedModelKeys))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=hashedModelKeys[n];const{labels:i}=colorConvert[this.model],o=[];for(r=0;r<i.length;r++)o.push(e[i[r]]);this.color=zeroArray(o)}if(limiters[this.model])for(n=colorConvert[this.model].channels,r=0;r<n;r++){const e=limiters[this.model][r];e&&(this.color[r]=e(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}Color.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in colorString.to?this:this.rgb();t=t.round("number"==typeof e?e:1);const r=1===t.valpha?t.color:[...t.color,this.valpha];return colorString.to[t.model](r)},percentString(e){const t=this.rgb().round("number"==typeof e?e:1),r=1===t.valpha?t.color:[...t.color,this.valpha];return colorString.to.rgb.percent(r)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:t}=colorConvert[this.model],{labels:r}=colorConvert[this.model];for(let n=0;n<t;n++)e[r[n]]=this.color[n];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new Color([...this.color.map(roundToPlace(e)),this.valpha],this.model)},alpha(e){return void 0!==e?new Color([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:getset("rgb",0,maxfn(255)),green:getset("rgb",1,maxfn(255)),blue:getset("rgb",2,maxfn(255)),hue:getset(["hsl","hsv","hsl","hwb","hcg"],0,(e=>(e%360+360)%360)),saturationl:getset("hsl",1,maxfn(100)),lightness:getset("hsl",2,maxfn(100)),saturationv:getset("hsv",1,maxfn(100)),value:getset("hsv",2,maxfn(100)),chroma:getset("hcg",1,maxfn(100)),gray:getset("hcg",2,maxfn(100)),white:getset("hwb",1,maxfn(100)),wblack:getset("hwb",2,maxfn(100)),cyan:getset("cmyk",0,maxfn(100)),magenta:getset("cmyk",1,maxfn(100)),yellow:getset("cmyk",2,maxfn(100)),black:getset("cmyk",3,maxfn(100)),x:getset("xyz",0,maxfn(95.047)),y:getset("xyz",1,maxfn(100)),z:getset("xyz",2,maxfn(108.833)),l:getset("lab",0,maxfn(100)),a:getset("lab",1),b:getset("lab",2),keyword(e){return void 0!==e?new Color(e):colorConvert[this.model].keyword(this.color)},hex(e){return void 0!==e?new Color(e):colorString.to.hex(this.rgb().round().color)},hexa(e){if(void 0!==e)return new Color(e);const t=this.rgb().round().color;let r=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===r.length&&(r="0"+r),colorString.to.hex(t)+r},rgbNumber(){const e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){const e=this.rgb().color,t=[];for(const[r,n]of e.entries()){const e=n/255;t[r]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return Color.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const r=e.rgb(),n=this.rgb(),i=void 0===t?.5:t,o=2*i-1,a=r.alpha()-n.alpha(),s=((o*a==-1?o:(o+a)/(1+o*a))+1)/2,l=1-s;return Color.rgb(s*r.red()+l*n.red(),s*r.green()+l*n.green(),s*r.blue()+l*n.blue(),r.alpha()*i+n.alpha()*(1-i))}};for(const e of Object.keys(colorConvert)){if(skippedModels.includes(e))continue;const{channels:t}=colorConvert[e];Color.prototype[e]=function(...t){return this.model===e?new Color(this):t.length>0?new Color(t,e):new Color([...assertArray(colorConvert[this.model][e].raw(this.color)),this.valpha],e)},Color[e]=function(...r){let n=r[0];return"number"==typeof n&&(n=zeroArray(r,t)),new Color(n,e)}}function roundTo(e,t){return Number(e.toFixed(t))}function roundToPlace(e){return function(t){return roundTo(t,e)}}function getset(e,t,r){e=Array.isArray(e)?e:[e];for(const n of e)(limiters[n]||(limiters[n]=[]))[t]=r;return e=e[0],function(n){let i;return void 0!==n?(r&&(n=r(n)),i=this[e](),i.color[t]=n,i):(i=this[e]().color[t],r&&(i=r(i)),i)}}function maxfn(e){return function(t){return Math.max(0,Math.min(e,t))}}function assertArray(e){return Array.isArray(e)?e:[e]}function zeroArray(e,t){for(let r=0;r<t;r++)"number"!=typeof e[r]&&(e[r]=0);return e}var color=Color,tools=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.array2obj=function(e,t){for(var r={},n=0;n<e.length;n++)r[e[n][t]]=e[n];return r},t.assignIn=function e(t,r){if(!r)return t;for(let n in r)n in t&&t[n]&&"object"==typeof t[n]&&!Array.isArray(t[n])?e(t[n],r[n]):t[n]=r[n];return t},t.capitalize=function(e){return`${e[0].toUpperCase()}${e.slice(1)}`},t.deepClone=function(e){return e&&JSON.parse(JSON.stringify(e))},t.determineResourcePath=function(e,t){if(e.startsWith("http"))return e;let r="";r=e.startsWith("/anov-prod")||e.startsWith("./anov-prod")?e:`${t}${e}`;return r},t.getMax=function(e,t){for(var r=0,n=e.length,i=0;i<n;i++){var o=e[i][t];r<o&&(r=o)}return r},t.getValueByPath=n,t.guid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},t.queryString=void 0,t.randomStr=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t="";t="string"==typeof e?e:new Array(e).fill("%");let n=new Array(t.length).fill(null);for(let e=0;e<t.length;e++){let i=t[e];if("%"===i){let e=Math.random()*r.length|0;i=r[e]}n[e]=i}return n.join("")},t.round=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return+e.toFixed(t)},t.scaleLinear=function(e,t,r,n){if(e===t)throw Error("min 和 max 值不能相等");const i=(n-r)/(t-e);return e=>r+i*e},t.setValueByPath=function(e,t,r){if(t.startsWith(".")||t.endsWith("."))throw new Error("path 路径不符合规范,不能以'.'开头或结尾");let i=t;const o=t.lastIndexOf(".");if(o>0){e=n(e,t.slice(0,o)),i=t.slice(o+1)}null!=e&&(e[i]=r)},t.trimEndWhiteLine=t.stringFormatter=void 0;t.stringFormatter=(e,t)=>e.replace(/\{([^{^}]*)\}/g,((e,r)=>n(t,r)));t.queryString=e=>{for(var t=window.location.search.substring(1).split("&"),r=0;r<t.length;r++){var n=t[r].split("=");if(n[0]==e)return n[1]}return!1};const r=[...new Array(26).fill(0).map(((e,t)=>String.fromCharCode("a".charCodeAt(0)+t))),...new Array(26).fill(0).map(((e,t)=>String.fromCharCode("A".charCodeAt(0)+t))),...new Array(10).fill(0).map(((e,t)=>String.fromCharCode("0".charCodeAt(0)+t)))];function n(e,t){if(t.startsWith(".")||t.endsWith("."))throw new Error("path 路径不符合规范,不能以'.'开头或结尾");const r=t.split(".");let n=e;for(let e=0;e<r.length;e++){if(n=n[r[e]],null==n)break}return n}t.trimEndWhiteLine=e=>e.replace(/[\n\s]+$/,"")}));unwrapExports(tools),tools.array2obj,tools.assignIn,tools.capitalize,tools.deepClone,tools.determineResourcePath,tools.getMax,tools.getValueByPath,tools.guid,tools.queryString,tools.randomStr,tools.round,tools.scaleLinear,tools.setValueByPath,tools.trimEndWhiteLine,tools.stringFormatter;var optionTheme=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.setColorByTheme=function(e){n(e,!0)},t.setDefaultColorByTheme=function(e){n(e,!1)},t.setOptionColorByTheme=function(e,t,n){if(console.log(e,t,n),!n||!e||!t)return;let i=Reflect.ownKeys(n);for(let l of i){const i=n[l];let c,u=null,h=1,d=0;if("string"==typeof i)u=i;else if(Reflect.has(i,"key")){var o,a;u=i.key,h=null!==(o=i.opacity)&&void 0!==o?o:1,d=null!==(a=i.opacityStep)&&void 0!==a?a:0}if(u&&(c=(0,tools.getValueByPath)(t,u)),c){s(e,l,(0,r.default)(c),h,d)}}};var r=interopRequireDefault(color);function n(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],{theme:r,option:s,optionDes:l}=e;s&&l&&r&&Object.keys(l).forEach((c=>{"conditionSeries"===l[c].type||"tabs"===l[c].type?function(e,t,r,i,o,a){let s=t.form,l=e;if(Array.isArray(s))for(let e=0;e<s.length;e++){let t,r=s[e];t=a?l[e].form:l[e],n({option:t,optionDes:r,theme:i},o)}else{let e=l.length;for(let t=0;t<e;t++){let e;e=a?l[t].form:l[t],n({option:e,optionDes:s,theme:i},o)}}}(s[c],l[c],0,r,t,"conditionSeries"===l[c].type):l[c].theme?s.hasOwnProperty(c)&&function(e,t,r){let n,{theme:s,option:l,optionDes:c}=e;if("color"!=c[t].type||!r&&l[t]){if("bgcolor"==c[t].type&&(r||!l[t]||!l[t].style)){l[t]||(l[t]={});let{key:e,points:r,degree:u,type:h,opacity:d}=c[t].theme;if(r){u||(u=90),h||(h="linear");let e=`${h}-gradient(${u}deg`,c=100/(r.length-1),f=[];r.forEach(((t,r)=>{n=i(s,t),e+=`,${o(n,t.opacity)} ${c*r}%`;let{red:l,green:u,blue:h,alpha:p}=a(n,d);f.push({red:l,green:u,blue:h,alpha:p,left:c*r})})),e+=")",l[t].style=e,l[t].degree=u,l[t].flag=r.length?3:2,l[t].points=f,l[t].type=h}else e&&(n=i(s,c[t].theme),l[t]={...a(n,d),style:o(n,d)})}}else{let{opacity:e}=c[t].theme;n=i(s,c[t].theme),l[t]=o(n,e)}}(e,c,t):l[c].hasOwnProperty("type")&&"slot"!=l[c].type&&"textStyle"!=l[c].type&&"sheet"!=l[c].type||l[c].constructor!=Object||n({option:s[c],optionDes:l[c],theme:r},t)}))}function i(e,t){if(e[t.key])return e[t.key]||e.color;if(t.key.indexOf(".")>-1){return[e,...t.key.split(".")].reduce(((t,r)=>"object"==typeof t&&r in t?t[r]:(l(`属性${r}不存在,获取主题颜色错误,将使用默认主题色`),e.color)))}return l(`属性${t.key}不存在,获取主题颜色错误,将使用默认主题色`),e.color}function o(e,t){let{red:r,green:n,blue:i,alpha:o}=a(e,t);return`rgba(${r},${n},${i},${o})`}function a(e,t){return-1!=e.indexOf("#")&&(e=e.substr(1)),null==t&&(t=1),{red:parseInt("0x"+e.slice(0,2)),green:parseInt("0x"+e.slice(2,4)),blue:parseInt("0x"+e.slice(4,6)),alpha:t}}function s(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;const a=t.indexOf("@i");if(a>=0){const r=a>0?t.slice(0,a-1):"",l=r?(0,tools.getValueByPath)(e,r):e,c=t.indexOf(".",a),u=c>=0?t.slice(c):"";if(Array.isArray(l))for(let e=0;e<l.length;e++){s(l,`${e}${u}`,n,+(i+(o||0)*e).toFixed(2),o)}}else{let o=(0,tools.getValueByPath)(e,t);if(o){i=(0,r.default)(o).alpha()}const a=`rgba(${n.red()}, ${n.green()}, ${n.blue()}, ${null===i?1:Math.min(1,Math.max(0,i))})`;(0,tools.setValueByPath)(e,t,a)}}function l(e){console.warn(e)}}));unwrapExports(optionTheme),optionTheme.setColorByTheme,optionTheme.setDefaultColorByTheme;var optionTheme_3=optionTheme.setOptionColorByTheme;function s(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const l=3e4,d=3e4,c=(e="",t)=>{let r=axios.create({baseURL:e,timeout:l,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}});return r.interceptors.request.use((function(e){return sessionStorage.getItem("anov-go-token")&&"null"!=sessionStorage.getItem("anov-go-token")&&(e.headers["X-ANOV-ACCESS-TOKEN"]=sessionStorage.getItem("anov-go-token")),sessionStorage.getItem("unify-access-token")&&"null"!=sessionStorage.getItem("unify-access-token")&&(e.headers["X-UNIFY-ACCESS-TOKEN"]=sessionStorage.getItem("unify-access-token")),sessionStorage.getItem("dgcc_authorization")&&"null"!=sessionStorage.getItem("dgcc_authorization")&&(e.headers.dgcc_authorization=sessionStorage.getItem("dgcc_authorization")),"post"===e.method?(e.headers["Content-Type"]="application/json;",e):"get"===e.method?e:"put"===e.method?(e.headers["Content-Type"]="application/json; charset=UTF-8",e):"delete"===e.method?e:void 0}),(function(e){return Promise.reject(e)})),r.interceptors.response.use((function(e){return 200===e.status||e.data.code,t&&t(e),e.data}),(function(e){return t&&t(null==e?void 0:e.response),Promise.reject(e.response)})),r},u=function(e){return s(this,void 0,void 0,(function*(){try{let{fontUrl:t,fontName:r}=e;const n="__custom_font__";let i=document.getElementById(n);if(!i){i=document.createElement("style"),i.id=n;const e=document.head||document.getElementsByTagName("head")[0];yield e.appendChild(i)}i.innerText+=`@font-face{font-family:'${r}';src:url(${t});}`}catch(e){console.warn(e)}}))},h=(e,t="jspaths",r)=>s(void 0,void 0,void 0,(function*(){const n="csspaths"===t?"link":"script",i=document.createElement(n);"jspaths"===t?i.defer=!0:i.rel="stylesheet",i.className=t,i.src=e,(r||document.head||document.getElementsByTagName("head")[0]).appendChild(i),yield new Promise(((e,t)=>{i.addEventListener("load",e),i.addEventListener("error",e)}))})),p=(e,t="jspaths")=>s(void 0,void 0,void 0,(function*(){const r="fonts"===t?u:h;yield Promise.all(e.map((e=>r(e))))})),m=e=>s(void 0,void 0,void 0,(function*(){e.fonts&&e.fonts.length&&(yield p(e.fonts,"fonts"))})),f=({jspaths:e=[],csspaths:t=[],fonts:r=[]})=>s(void 0,void 0,void 0,(function*(){const n=_$1.uniqBy(r,"fontName");yield Promise.all([p(e,"jspaths"),p(t,"csspaths"),p(n,"fonts")])})),g=()=>{var e;(null==(e=document.getElementById("__custom_font__"))?void 0:e.parentNode)&&e.parentNode.removeChild(e),Array.from(document.getElementsByTagName("script")).filter((e=>"jspaths"==e.className)).forEach((e=>{!function(e){for(var t,r=Array.from(document.getElementsByTagName("script")),n=0;n<r.length;n++)r[n]&&r[n].src&&-1!=r[n].src.indexOf(e)&&(null===(t=r[n])||void 0===t?void 0:t.parentNode)&&r[n].parentNode.removeChild(r[n])}(e.src)})),Array.from(document.getElementsByTagName("link")).filter((e=>"csspaths"==e.className)).forEach((e=>{!function(e){for(var t,r=Array.from(document.getElementsByTagName("link")),n=0;n<r.length;n++)r[n].href,r[n]&&r[n].href&&-1!=r[n].href.indexOf(e)&&(null===(t=r[n])||void 0===t?void 0:t.parentNode)&&r[n].parentNode.removeChild(r[n])}(e.href)}))},v=(e,t,r)=>{const n=document.createElement("link");switch(n.rel="preload",n.href=e,n.crossorigin="anonymous",t){case"video":n.as="video";break;case"script":n.as="script";break;case"image":n.as="image"}n.onload=()=>{console.log(`success to preload ${e}`),r&&r()},n.onerror=()=>{console.error(`Failed to preload ${e}`)},document.head.appendChild(n)},y=(e,t)=>{try{let r=t||window.location.href;if(-1!=r.indexOf("?")){let t={};return r.slice(r.indexOf("?")+1).split("&").forEach((e=>{let r=e.split("=");t[r[0]]=r[1]})),e?t[e]?t[e]:null:t}return console.log("没有参数"),null}catch(e){console.error(e)}};function b(e,t=!1){try{return t?w(e)?e:JSON.stringify(e):w(e)?JSON.parse(e):e}catch(t){return console.log("转化JSON 发生错我!",e),e}}const w=e=>{if("string"==typeof e)try{const t=JSON.parse(e);return"object"==typeof t&&null!==t}catch(e){return!1}return!1},D=(e,t)=>{try{const r=JSON.stringify(t);sessionStorage.setItem(e,r)}catch(t){console.error(`Error setting session data for key ${e}:`,t)}},N=e=>{const t=sessionStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(t){console.error(`Error parsing session data for key ${e}:`,t)}return null},k=e=>{for(const t of e)t.code&&(t.code=t.code.replace(/>/g,">").replace(/</g,"<"))},A=(e,t)=>{e instanceof Map?e.forEach((e=>{t([e])})):Array.isArray(e)&&e.forEach((e=>{t(e.children)}))},C=(e,t)=>{const r=e=>{var n,i,o;if(e)for(const a of e){const e=null===(o=null===(i=null===(n=null==a?void 0:a.tmpData)||void 0===n?void 0:n.source)||void 0===i?void 0:i.converse)||void 0===o?void 0:o.data;(null==e?void 0:e.length)&&k(e),t(a),a.children?r(a.children):a.dynamicChildren?A(a.dynamicChildren,r):a.stateChildren&&r(a.stateChildren)}};r(e)},x=(e,t,r,n)=>{const i=e.match(/({{[\w]*}})|((@)[\w]*)/gm);if(i){const e=i.map((e=>e.replace(/{{|}}|@/gm,"")));for(const i of e)if(i&&t&&!(t.findIndex((e=>e.mapField===i))<0))return r&&n&&S(n,i,r.cid),!0}return!1},S=(e,t,r)=>{if(!e)throw new Error("Share variable tree is not defined");if("string"!=typeof t)throw new Error("Variable name should be a string");if(!r)throw new Error("ID is required");Array.isArray(e[t])||(e[t]=[]),e[t].includes(r)||e[t].push(r)},O=(e,t,r)=>{var n;let i=!1;const o=null==t?void 0:t.converse;if(o&&o.use&&o.data.length)for(const t of o.data)if((null==t?void 0:t.dependVars)&&t.dependVars.includes(e))return!0;const a=null==t?void 0:t[null==t?void 0:t.type];return((null==a?void 0:a.inputSql)||(null==a?void 0:a.url)||(null==a?void 0:a.headers)||(null==a?void 0:a.params))&&(i=x(a.inputSql||a.url||(null===(n=a.headers)||void 0===n?void 0:n.value)||a.params,r)),i},I=(e,t,r=!1)=>{let n=null;const i=e=>{for(const o of e){if(o.cid===t){n=o,r&&_$1.remove(e,(e=>e.cid===t));break}if(o.children&&i(o.children),o.dynamicChildren&&Array.isArray(o.dynamicChildren))for(const[,e]of Array.from(o.dynamicChildren))i(e);o.stateChildren&&i(o.stateChildren)}};return i(e),n},T=(e,t,r)=>{let n=!1;const i=e=>{for(let o=0;o<e.length;o++){if(e[o].cid==t){n=e[o],r&&_$1.remove(e,(e=>e.cid==t));break}if(e[o].children)i(e[o].children);else if(e[o].dynamicChildren){if(e[o].dynamicChildren instanceof Map){let t=Array.from(e[o].dynamicChildren);for(let e=0;e<t.length;e++)if(t[e]instanceof Array){let r=t[e][1];i(r)}}else if(e[o].dynamicChildren instanceof Array){let t=e[o].dynamicChildren;for(let e=0;e<t.length;e++)if(t[e]instanceof Array){let r=t[e][1];i(r)}}}else e[o].stateChildren&&i(e[o].stateChildren)}};return i(e),n||!1};function V(e,t,r){const n={};r&&r.forEach((e=>{(null==e?void 0:e.name)&&(n[e.name]=e.value||e.originvalue)}));try{return new Function("data","vars",e)(t,n)}catch(e){return console.error(e),t}}function E(e,t,r){let n=_$1.cloneDeep(t);const i={};r&&r.forEach((e=>{(null==e?void 0:e.name)&&(i[e.name]=e.value||e.originvalue)}));try{return new Function("data","vars",e)(n,i)}catch(e){return console.error(e),n}}const F=e=>{let t=window.goFetchList;return t||(window.goFetchList={},t=window.goFetchList),t[e]?!t[e]&&void 0:(t[e]={id:e,time:(new Date).getTime()},!0)},P=e=>{let t=window.goFetchList;t&&t[e]&&delete t[e]};function j(e){const t=e.match(/\.([^\/\\]+)$/);return t?t[1].toLowerCase():void 0}const $=e=>{const t=[];let r=function(e){return e.endsWith("/")?e.slice(0,-1):e}(window.baseUrl);return C(e,(e=>{var n,i,o,a,s,l,c,u,h;if("AnDeckHeader3"==e.viewComName&&(null===(o=null===(i=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.option)||void 0===i?void 0:i.bgImage)||void 0===o?void 0:o.path)){let n=j(e.tmpData.option.bgImage.path);t.push({type:n,url:r+e.tmpData.option.bgImage.path})}if("AnVideoNormal"==e.viewComName&&(null===(s=null===(a=null==e?void 0:e.tmpData)||void 0===a?void 0:a.option)||void 0===s?void 0:s.dynamicUrl)){let n=j(null===(c=null===(l=null==e?void 0:e.tmpData)||void 0===l?void 0:l.option)||void 0===c?void 0:c.dynamicUrl);t.push({type:n,url:r+(null===(h=null===(u=null==e?void 0:e.tmpData)||void 0===u?void 0:u.option)||void 0===h?void 0:h.dynamicUrl)})}})),t},R="anov@2019:helloX",M="anov@2020:helloX";function U(e){let t=cryptoJs.enc.Utf8.parse(R),r=cryptoJs.enc.Utf8.parse(M);return cryptoJs.AES.encrypt(e,t,{iv:r,mode:cryptoJs.mode.CBC,padding:cryptoJs.pad.Pkcs7}).toString()}function q(e,t){if(0===e.length)throw new Error("Array is empty.");if(!t)return e[Math.floor(Math.random()*e.length)];if(t.length!==e.length)throw new Error("Length of probabilities array must match length of array.");const r=t.reduce(((e,t)=>e+t),0),n=Math.random()*r;let i=0;for(let r=0;r<e.length;r++)if(i+=t[r],n<i)return e[r];return e[0]}const L=new Blob(["\nfunction proxyObj(originObj) {\n const exposeObj = new Proxy(originObj, {\n has: (target, key) => {\n if (['fetch', 'XMLHttpRequest', 'postMessage'].indexOf(key) >= 0) {\n throw new Error('Illegal operation for key'+key)\n } else {\n return target[key]\n }\n },\n })\n return exposeObj\n}\nfunction compileCode(src) {\n src = 'with (exposeObj) {'+src+'}'\n //console.log(src)\n return new Function('exposeObj', src)\n}\nfunction run(code) {\n let proxy = proxyObj({})\n let result = compileCode(code)(proxy)\n return result\n}\n\nonmessage = (e) => {\n try {\n let result = run(e.data.code)\n postMessage({\n code: 1,\n result,\n })\n } catch (err) {\n postMessage({\n code: -1,\n err,\n })\n }\n}\n"]),B=URL.createObjectURL(L);function H(e,t,r={},n="worker"){return s(this,void 0,void 0,(function*(){try{if("window"==n){let[n,i]=[["data"],[t]];"object"==typeof r&&Object.keys(r).forEach((e=>{n.push(e),i.push(r[e])}));return{success:!0,data:new Function(...n,e)(...i)}}{let[n,i,o]=[t,r,""];"object"==typeof n&&(n=JSON.stringify(t)),"object"==typeof r&&(i=JSON.stringify(r)),Object.keys(r).forEach((e=>o+=`${e},`));let a=`let data=eval(${n}); \n let app=${JSON.stringify({})};`;a+=o?`let {${o}} = eval(${i}); `:"",a+=`${e}`;let l=yield function(e,t=5e3){return s(this,void 0,void 0,(function*(){let r=new Worker(B);return new Promise(((n,i)=>{const o=()=>{clearTimeout(s),r.removeEventListener("message",a),r.terminate(),r=null},a=e=>{let{code:t,result:r,err:a}=e.data;o(),1===t?n(r):i(a)};r.postMessage({code:e}),r.addEventListener("message",a);let s=setTimeout((()=>{o(),i("timeout")}),t)}))}))}(a);return{success:!0,data:l}}}catch(e){return{success:!1,error:e,data:t}}}))}var z,G$1,_,J,e;e=z||(z={}),e.StaticFile="staticFile",e.DataSource="datasource",function(e){e.json="application/json;charset=UTF-8",e.form="application/x-www-form-urlencoded; charset=UTF-8"}(G$1||(G$1={})),function(e){e.get="GET",e.post="POST",e.put="PUT",e.patch="PATCH",e.delete="DELETE"}(_||(_={}));class W{constructor(e){this.db=null,this.dbName=e.databaseName,this.tableName=e.tableName,this.keyPath=e.keyPath}static getInstance(e){return W.instance||(W.instance=new W(e)),W.instance}init(){return s(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{const r=indexedDB.open(this.dbName,1);r.onerror=e=>{t(e.target.error)},r.onupgradeneeded=e=>{this.db=e.target.result,this.db.objectStoreNames.contains(this.tableName)||this.db.createObjectStore(this.tableName,{keyPath:this.keyPath})},r.onsuccess=t=>{this.db=t.target.result,e()}}))}))}addRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).add(e);n.onsuccess=()=>{t()},n.onerror=e=>{r(e.target.error)}}))}))}deleteRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);n.onsuccess=()=>{t()},n.onerror=e=>{r(e.target.error)}}))}))}updateRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(e);n.onsuccess=()=>{t()},n.onerror=e=>{r(e.target.error)}}))}))}getRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);n.onsuccess=()=>{t(n.result)},n.onerror=e=>{r(e.target.error)}}))}))}getAllRecords(){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((e,t)=>{const r=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAll();r.onsuccess=()=>{e(r.result)},r.onerror=e=>{t(e.target.error)}}))}))}}W.instance=null,function(e){e[e.FATAL=0]="FATAL",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e[e.TRACE=5]="TRACE"}(J||(J={}));const X={databaseName:"GODB",tableName:"go-log",keyPath:"time"};class K{constructor(){this.logLevel=J.INFO,this.indexedDBInstance=W.getInstance(X);try{this.indexedDBInstance.init(),console.log("IndexedDB 初始化成功。")}catch(e){console.error("初始化 IndexedDB 时出错:",e)}}static getInstance(){return K.instance||(K.instance=new K),K.instance}setLogLevel(e){this.logLevel=e}getColor(e){switch(e){case J.FATAL:return"[31;1m";case J.ERROR:return"[31m";case J.WARN:return"[33m";case J.INFO:return"[32m";case J.DEBUG:return"[36m";case J.TRACE:return"[34m";default:return"[0m"}}log(e,t){if(t<=this.logLevel){const r=(new Date).toISOString(),n=`[${r}] [${J[t]}]`,i=this.getColor(t);if(null===window||void 0===window?void 0:window.goDev)console.log(`${i}${n} ${e}[0m`);else{let t=N("anov-go-userInfo"),o=N("anov-go-proid"),a=` [操作人:${null==t?void 0:t.userName} 项目ID:${o}] `;const s={time:r,value:`${e}`};try{this.indexedDBInstance.addRecord(s)}catch(e){console.error("添加记录时出错:",e)}console.log(`${i}${n} ${a} ${e}[0m`)}}}fatal(e){this.log(e,J.FATAL)}error(e){this.log(e,J.ERROR)}warn(e){this.log(e,J.WARN)}info(e){this.log(e,J.INFO)}debug(e){this.log(e,J.DEBUG)}trace(e){this.log(e,J.TRACE)}}const Q=K.getInstance(),Y=(e,t)=>"string"!=typeof e?Promise.reject(new Error("URL should be a string")):c(e,t),Z=c();let ee=c();function te(e,t="get",r={},n={},i){return s(this,void 0,void 0,(function*(){try{const o={method:_[t],url:e,headers:n,timeout:d};return["post","put"].includes(t.toLowerCase())?o.data=_$1.cloneDeep(r):o.params=_$1.cloneDeep(r),i&&(o.headers.sponsor=i),/.json$/.test(e)?function(e){return s(this,void 0,void 0,(function*(){try{return(yield Z({method:"get",url:e})).data}catch(e){throw console.error("JSON 数据请求:",e),e}}))}(e):function(e){return s(this,void 0,void 0,(function*(){try{return{code:2e4,data:(yield Z(e)).data}}catch(e){throw console.error("请求数据发生错误-Error:",e),e}}))}(o)}catch(e){throw console.error("获取数据:Error:",e),e}}))}function oe(e,t,r,n,i){return s(this,void 0,void 0,(function*(){try{const o=(window.anUrl||"")+(window.agentPath||"/ds/v1/api-proxy/v1/query"),a=b(r,!0);return yield Z({url:o,method:"post",headers:{"Content-Type":"application/json;charset=UTF-8",sponsor:i||""},data:{body:"post"===e?a:void 0,headers:w(n)?b(n,!0):n,method:e,url:t}})}catch(e){throw console.error("代理请求数据:Error12:",e),e}}))}function ie(e,t,r,n,i,o){return s(this,void 0,void 0,(function*(){return i?oe(t,e,r,n,o):te(e,t,r,n,o)}))}function re(e,t="",r){var n,i,o,a;const s=`${null!==(i=null===(n=null===window||void 0===window?void 0:window.BaseUrl)||void 0===n?void 0:n.replace("/management",""))&&void 0!==i?i:""}/ds/data-engine/v1/${e}/zb-query?token=${(null===(o=ge("YZH_EXCHANGE_TOKEN"))||void 0===o?void 0:o.YZH_EXCHANGE_TOKEN)||(null===(a=null===window||void 0===window?void 0:window.yzhAuth)||void 0===a?void 0:a.getToken())}&passid=${null===window||void 0===window?void 0:window.gdPassid}${(null===window||void 0===window?void 0:window.BASE_RELEASE)?"&preview=1":""}`;let c={};try{c=t?JSON.parse(t):{}}catch(e){c=t||{}}return Z({method:"POST",url:s,data:{headers:r,param:c},timeout:l})}function ae(e="",t){const r=`${null===window||void 0===window?void 0:window.BaseUrl}/ds/v1/data-views/query`;let n={};try{n=e?JSON.parse(e):{}}catch(t){n=e||{}}return Z({method:"POST",url:r,data:{headers:t,param:n},timeout:l})}const ne=(e,t)=>s(void 0,void 0,void 0,(function*(){const r=window.BaseUrl,{dateType:n="",endPeriod:i="",metricsName:o=e,startPeriod:a=""}=t;return ee({method:"GET",url:`${r}ds/v1/metrics/v1/data-alarm?dateType=${n}&endPeriod=${i}&metricsName=${o}&startPeriod=${a}`,timeout:l})})),se=(e,t,r)=>s(void 0,void 0,void 0,(function*(){var n;const i=(null===(n=window.BaseUrl)||void 0===n?void 0:n.replace("/management",""))||"";t.newEncryption=!0;const o={staticFile:{method:"get",params:t,url:`${i}/ds/v1/file/v1/${e}/query`},datasource:{method:"post",url:`${i}/ds/v1/database/v1/${e}/query`,data:Object.assign({},t)}}[r];if(!o)throw new Error("Invalid data type provided");return Z(Object.assign({timeout:l},o))})),le=e=>new Promise(((t,r)=>{let n;n=e.originData&&Object.keys(e.originData).length?e.originData:e.data,void 0!==n?t({data:n}):r("Failed to retrieve cdata")})),de=(e,t,r)=>{try{switch(t){case"api":{let t=be(e,r);return{requestType:t.requestType,url:t.url,params:t.params,headers:t.headers,agency:t.agency}}case"static":return{data:e};case"datasource":{const t=ye(e.inputSql,r);return{dsName:e.dsName,dsType:"1",sql:U(t),filter:e.sqlFilter}}case"staticFile":return{dsName:e.dsName,dsType:e.dsType,sql:""};case"indicator":return{zbId:e.zbId,params:ye(e.params,r),headers:ye(e.headers,r)};case"dataSet":return{params:ye(e.params,r),headers:ye(e.headers,r)};case"indicatorCQ":return{zbName:e.zbName,params:ye(e.params,r)};case"packData":return{};default:throw new Error("Invalid type")}}catch(t){console.log("准备请求数据发生错误",t,e)}},ce=(e,t,r)=>s(void 0,void 0,void 0,(function*(){try{switch(t){case"api":return yield ie(e.url,e.requestType,e.params,e.headers,e.agency,r);case"static":return yield le(e.data);case"datasource":return yield se(e.dsName,{dsType:e.dsType,sql:e.sql,filter:e.filter},"datasource");case"staticFile":return yield se(e.dsName,{dsType:e.dsType,sql:e.sql},"staticFile");case"indicator":return yield re(e.zbId,e.params,e.headers);case"dataSet":return yield ae(e.params,e.headers);case"indicatorCQ":return yield ne(e.zbName,e.params);case"packData":return{};default:throw new Error("Invalid type")}}catch(e){return console.warn(e,"执行请求并获取数据发生错误"),yield new Promise(((e,t)=>{e({error:!0})}))}})),ue=(e,t,r,n=[],i=!1)=>s(void 0,void 0,void 0,(function*(){const o=t||e.tmpData.source.dataType;if(!o)return console.warn(`fetdata error on fetchDataByType', dataType is ${o}`),new Promise(((e,t)=>{e({error:!0,data:null,msg:`dataType is ${o}`})}));const a=e.tmpData.source["indicatorCQ"==o?"indicator":o];if("globalData"===o){const e=n.find((e=>e.key===a.id||e.key===a.key)),t=N(a.id);if(t&&!i)return t.data;if(e){let t=yield he(e,r),n={key:a.id,data:t};return D(a.id,n),t}return}const s=de(a,o,r),l=yield ce(s,o,e.cid?e.cid:"");return(null==l?void 0:l.data)?l.data:l})),he=(e,t)=>s(void 0,void 0,void 0,(function*(){let r=Object.assign({},{tmpData:{source:e.value}});const n=r.tmpData.source.type,i=r.tmpData.source[n],o=de(i,n,t),a=yield ce(o,n);return yield pe(a.data,r,!0,t)})),pe=(e,t,r=!0,n)=>s(void 0,void 0,void 0,(function*(){try{const{converse:i,mapFields:o}=t.tmpData.source;return i&&i.use&&r?yield new Promise(((t,r)=>{const o=function(e,t,r,n,i){return s(this,void 0,void 0,(function*(){let r,i=e,{use:o,data:a}=_$1.cloneDeep(t);if(o)for(let e=0;e<a.length;e++)if(a[e].use){let t=a[e].dependVars,o={};n&&o&&t&&t.length&&t.map((e=>{let t=_$1.cloneDeep(n).filter((t=>{let r=t.mapField==e;return r&&(o[e]=t.value),r}));t&&0!=t.length||(o[e]="")})),r=yield H(a[e].code,i,o,a[e].mode?a[e].mode:"worker"),i=r.data}return i}))}(_$1.cloneDeep(e),i,0,n);t(o)})):yield new Promise(((t,r)=>{t(e)}))}catch(t){return console.error("执行过滤器发生错误:"+t),yield new Promise(((t,r)=>{t(e)}))}})),me=(e,t,r)=>{const{source:n}=e.tmpData,i=n.type;r?("static"===i&&n[i]&&(n[i].originData=r),"indicatorCQ"===i?n.indicator.data=t:n[i].data=t):"indicatorCQ"===i?n.indicator.data=t:n[i].data=t,e.source=t},fe=(e,t,r=[],n,i,o)=>s(void 0,void 0,void 0,(function*(){try{let a=e.tmpData.source.type,s=yield ue(e,a,r,n,o||!1);if(null==s||!s)return i&&i({error:!0}),Promise.resolve({error:!0});let l=yield pe(s,e,t,r);return me(e,l),i&&i(l),(null==e?void 0:e.cid)&&P(e.cid),Promise.resolve(l)}catch(t){return i&&i(t),Q.error("Error in updateComData"),console.error("Error in updateComData:",t,e),Promise.reject(t)}})),ge=e=>{const t={};if(e&&e.includes("?")){const r=e.split("?")[1].split("&");for(let e of r){const[r,n]=e.split("=").map(decodeURIComponent);t[r]=n}}return t},ve=e=>{try{return(null==e?void 0:e.value)&&"string"==typeof e.value?JSON.parse(e.value):"string"==typeof e?JSON.parse(e):e}catch(t){return e}},ye=(e,t)=>{if(!t)return ve(e);if("string"==typeof e){if(""===e.trim())return"";try{if("string"!=typeof JSON.parse(e))return ye(JSON.parse(e),t);{let r=e.replace(/@(\w+)|{{(\w+)}}/g,((e,r,n)=>{const i=r||n,o=t.find((e=>e.mapField===i));return o?o.value||o.originalValue||"":e}));return ve(r)}}catch(r){let n=e.replace(/@(\w+)|{{(\w+)}}/g,((e,r,n)=>{const i=r||n,o=t.find((e=>e.mapField===i));return o?o.value:e}));return ve(n)}}else{if(Array.isArray(e))return e.map((e=>ye(e,t)));if("object"==typeof e&&null!==e){const r={};for(let n in e)r[n]=ye(e[n],t);return ve(r)}}return ve(e)},be=(e,t)=>{const r=e.agency,n=e,{url:i=null,headers:o,params:a,requestType:s}=n,l=i?ye(i,t):void 0,c=o&&o.use?ye(o.value,t):{};return{url:l,requestType:s,params:a?ye(a,t):{},headers:c,agency:r}},we=(e,t,r,n,i)=>s(void 0,void 0,void 0,(function*(){if(e&&e.length)for(const o of e)O(t,o.value,r)&&(yield fe({tmpData:{source:{type:"globalData",globalData:{id:o.key}}}},!0,r,e,(e=>{console.log("数据更新成功-变量改变全局数据跟新")}),!0),C(n,(t=>{var n,a,s;"globalData"===(null===(a=null===(n=null==t?void 0:t.tmpData)||void 0===n?void 0:n.source)||void 0===a?void 0:a.type)&&(null===(s=null==t?void 0:t.tmpData)||void 0===s?void 0:s.source.globalData).id===o.key&&fe(t,!0,r,e,(e=>{i(t,e)}),!1)})))})),De=(e,t,r,n,i)=>s(void 0,void 0,void 0,(function*(){e&&(yield fe({tmpData:{source:{type:"globalData",globalData:{id:e.key}}}},!0,t,r,(e=>{console.log("数据更新成功-数据源编辑")}),!0),C(n,(n=>{var o,a,s;"globalData"===(null===(a=null===(o=null==n?void 0:n.tmpData)||void 0===o?void 0:o.source)||void 0===a?void 0:a.type)&&(null===(s=null==n?void 0:n.tmpData)||void 0===s?void 0:s.source.globalData).id===e.key&&fe(n,!0,t,r,(e=>{i(n,e)}),!1)})))}));class Ne{constructor(e,t){this.isUpdating=!1,this.des=e.des,this.field=e.field,this.id=e.id,this.key=e.key,this.mapping=e.mapping,this.mapField=e.mapField,this.type=e.type,this.originalValue=e.originalValue,this.model=(null==e?void 0:e.model)?null==e?void 0:e.model:1,this.converter=e.converter,this.converterCode=e.converterCode,this.fork=e.fork,this.delayUpdate=!!(null==e?void 0:e.delayUpdate),t&&(this.globalVariables=t),e.fork&&(this.model=5,this.forkValue=e.forkValue,this.originalValue=this.getForkedValue())}get value(){if(this.fork&&(this.originalValue=this.getForkedValue()),this.converter&&this.converterCode){let e=[];return E(this.converterCode,this.originalValue,e)}return this.originalValue}togglePropertyState(e){let t=Object.prototype.hasOwnProperty.call(this,e);this[e]=!t||!e}getForkedValue(){if(this.forkValue&&Array.isArray(this.forkValue))return this.forkValue.map((e=>{const t=this.globalVariables.get(e);return t?t.value:null}));if(this.forkValue){const e=this.globalVariables.get(this.forkValue);return e?e.value:null}return null}updateValue(e,t){var r;const n=Object.assign({},this,e);this.des=n.des,this.field=n.field,this.mapping=n.mapping,this.type=n.type,this.originalValue=n.originalValue,this.converter=n.converter,this.converterCode=n.converterCode,this.fork=n.fork,this.delayUpdate=null==n?void 0:n.delayUpdate,this.model=null==n?void 0:n.model,e.id&&(this.id?"string"==typeof this.id?e.id instanceof Array?this.id=_$1.uniq([this.id,...e.id]):this.id=[this.id,e.id]:this.id instanceof Array&&(e.id instanceof Array?this.id=_$1.uniq([...this.id,...e.id]):this.id=_$1.uniq([...this.id,e.id])):this.id=e.id),e.fork&&(this.model=5,this.forkValue=null!==(r=e.forkValue)&&void 0!==r?r:this.forkValue,this.originalValue=this.getForkedValue()),t&&t(this)}updateWidthOriginalValue(e,t){var r;this.originalValue=e,this.fork&&(this.forkValue=null!==(r=this.forkValue)&&void 0!==r?r:this.forkValue,this.originalValue=this.getForkedValue()),t&&t(this)}renew(e){e&&e(this)}static create(e,t){return new Ne(e,t)}}class ke{constructor(){this.variables=new Map,this.globalObservers=[],this.url=window.location.search,this.list=[]}clearVars(){this.list=[],this.variables.clear()}togglePropertyState(e,t,r){try{let n=this.getVariable(e);if(!n)throw new Error("没有找到相应的变量!");n.togglePropertyState(t),this.addToObjectArray(this.list,n),r&&r()}catch(e){console.error(e)}}static getInstance(){return ke.instance||(ke.instance=new ke),ke.instance}getFullUrl(){this.url=window.location.search}getAllUrlParams(){const e=new URLSearchParams(window.location.search),t={};for(const[r,n]of e.entries())t[r]=n;return t}delVariable(e,t){this.variables.delete(e),this.list=this.list.filter((t=>t.mapField!=e)),t&&t()}addUrlParamsToGlobalVars(){this.getFullUrl();let e=this.getAllUrlParams(),t=Object.keys(e),r=[];for(const n of t)r.push({mapField:n,originalValue:e[n],model:4});if(r.length)for(const e of r)this.addVariable(e)}addVariables(e){Array.isArray(e)?e.map(((e,t)=>{this.addVariable(e)})):this.addVariable(e),this.addUrlParamsToGlobalVars()}addVariable(e,t){if(!e||!(null==e?void 0:e.mapField))return console.error(e+"参数不合法!"),!1;if(this.isVariableNameExist(e.mapField)){let r=this.getVariable(e.mapField);return this.sameValue(r,e)?r:(this.editVariable(e,t),!1)}const r=Ne.create(e,this.variables);return this.variables.set(r.mapField,r),this.addToObjectArray(this.list,r),t&&t(r),this.notifyGlobalObservers(r),r}toJSON(e){try{return!!e&&JSON.stringify(e)}catch(e){return!1}}sameValue(e,t){if(e.mapfield!==t.mapfield)return!1;for(const r in t)if(!(["mapfield","field","key","value","name","globalVariables"].includes(r)||r in e&&e[r]==t[r]))return!1;return!0}creatVarJson(e){const{des:t,field:r,id:n,key:i,mapping:o,mapField:a,type:s,value:l,originalValue:c,model:u,converter:h,converterCode:d,fork:f,forkValue:p,update:m,delayUpdate:g}=e,v={};return void 0!==t&&(v.des=t),void 0!==r&&(v.field=r),void 0!==n&&(v.id=n),void 0!==i&&(v.key=i),void 0!==o&&(v.mapping=o),void 0!==a&&(v.mapField=a),void 0!==s&&(v.type=s),void 0!==l&&(v.value=l),void 0!==c&&(v.originalValue=c),void 0!==u&&(v.model=u),void 0!==h&&(v.converter=h),void 0!==d&&(v.converterCode=d),void 0!==f&&(v.fork=f),void 0!==p&&(v.forkValue=p),void 0!==m&&(v.update=m),void 0!==g&&(v.delayUpdate=g),v}addToObjectArray(e,t){let r=!1;for(let n=0;n<e.length;n++)if(e[n].mapField==t.mapField){e[n]=this.creatVarJson(t),r=!0;break}r||e.push(t)}editVariable(e,t){const r=this.getVariable(e.mapField);if(r&&this.isVariableNameExist(e.mapField)&&this.sameValue(r,e))return;const n=e=>{e.isUpdating||(e.isUpdating=!0,this.notifyGlobalObservers(e),this.isMapFieldInForkValues(e.mapField).forEach((e=>{let t=this.getVariable(e.mapField);t&&t.renew((e=>{this.addToObjectArray(this.list,e),this.notifyGlobalObservers(e)}))})),this.addToObjectArray(this.list,e),t&&t(e),e.isUpdating=!1)};r?r.updateValue(e,n):this.addVariable(e,n)}getForkList(e){return this.isMapFieldInForkValues(e)||[]}editVariableForValue(e,t,r){const n=this.getVariable(e);n&&n.updateWidthOriginalValue(t,(e=>{e.isUpdating||(e.isUpdating=!0,this.notifyGlobalObservers(e),this.isMapFieldInForkValues(e.mapField).forEach((e=>{let t=this.getVariable(e.mapField);t&&t.renew((e=>{this.addToObjectArray(this.list,e),this.notifyGlobalObservers(e)}))})),this.addToObjectArray(this.list,e),r&&r(e),e.isUpdating=!1)}))}isMapFieldInForkValues(e){return this.getAllVariables().filter((e=>e.fork&&e.forkValue)).filter((t=>t.forkValue==e||Array.from(t.forkValue).includes(e)))}isVariableNameExist(e){return this.variables.has(e)}checkExist(e,t){if("string"==typeof e&&this.isVariableNameExist(e)){let r=this.getVariable(e);return t==r.id&&!r.id.includes(t)&&[{key:e}]}if(Array.isArray(e)){const r=e.filter((e=>{let r=this.getVariable(e);return this.isVariableNameExist(e)&&t!=r.id&&!(r.id&&r.id.includes(t))})).map((e=>({key:e})));return!!r.length&&r}return!1}getVariable(e){return this.variables.get(e)}getVariableForId(e){var t;let r=[];for(const[,n]of this.variables)(n.id===e||(null===(t=n.id)||void 0===t?void 0:t.includes(e)))&&r.push(n);return _$1.uniq(r)}getAllVariables(e=!1){return this.addUrlParamsToGlobalVars(),e?(this.list=Array.from(this.variables.values()),this.list):[...this.list]}restoreVariables(e){e.forEach((e=>{this.addVariable(e)}))}registerGlobalObserver(e){this.globalObservers.push(e)}notifyGlobalObservers(e){this.globalObservers.forEach((t=>{t.update(e)}))}}ke.instance=null;const Ae=ke.getInstance(),Ce=(e,t)=>Array.isArray(t)?t.some((t=>e&&(void 0!==e[t]||e.hasOwnProperty(t)))):"string"==typeof t&&e&&(void 0!==e[t]||e.hasOwnProperty(t)),xe=(e,t,r,n)=>{const i=((e,t,r,n)=>{var i;let o;if(Ce(e,null==t?void 0:t.field)||Ce(e,null==t?void 0:t.forkValue))o=e[null==t?void 0:t.field]||"";else if(Ce(e.data,null==t?void 0:t.field)||Ce(e.data,null==t?void 0:t.forkValue))o=e.data[null==t?void 0:t.field]||"";else{const e=I(r,n),a=(null===(i=null==e?void 0:e.tmpData)||void 0===i?void 0:i.actions)||[];for(const e of a){const r=e.vars.find((e=>(null==e?void 0:e.mapField)===(null==t?void 0:t.mapField)));if(r){o=r.value;break}}}return o})(e,t,r,n);return void 0!==i?i:t.value},Se=(e,t,r,n,i,o,a,s,l)=>{var c;switch(e.type){case"link":let u=ye(e.link,o);window.open(u,e.target);break;case"page":if(null===(c=null==e?void 0:e.params)||void 0===c?void 0:c.length)for(let t=0;t<e.params.length;t++){const r=e.params[t],n=o.find((e=>e.mapField==r.mapField));n&&(r.value=n.value)}l&&l(e);break;case"dynamic":((e,t,r,n,i)=>{const o=e.dynamic||[];for(const a of o){if(e.id!==t.cid)continue;const o=I(r,a.pid);o&&(o.activeDynamic=a.name,o.isShow=a.visible||!n||e.index===t.index-1,i({cid:o.cid,flag:a.visible}))}})(e,t,r,n,i);break;case"toggle":((e,t,r,n,i)=>{const o=e.children||[];for(const r of o){const o=r.visible&&(!n||e.index===t.index-1);i({cid:r.cid,flag:o})}})(e,t,0,n,i);break;case"update":((e,t,r,n,i)=>{const o=e.children||[];for(const e of o){const o=I(t,e.cid);o&&fe(o,!0,r,n,(e=>{i({cid:o.cid,data:e})}))}})(e,r,o,a,s)}},Oe=(e,t,r,n,i,o,a,s,l,c)=>{const{cid:u,actions:h,index:d}=i,{eventName:f,mode:p}=h,m=2===p;((e,t,r,n,i,o)=>{let a=Ae.getVariableForId(t.cid);if(null==a?void 0:a.length)for(const s of a)if(s.type==e){let e=xe(t,s,r,n);Ae.editVariableForValue(s.mapField,e,(()=>{let e=i[s.mapField]||[],t=Ae.getForkList(s.mapField);if(t)for(const r of t){let t=i[r.mapField];e=_$1.concat(e,t)}o&&o(s,_$1.uniq(e))}))}})(f,i,n,u,r,((e,t)=>{if(we(l,e.mapFile,Ae.getAllVariables(),n,((e,t)=>{a({cid:e.cid,data:t})})),null==t?void 0:t.length)for(const r of t){e.eventSourceId=r;const t=I(n,r);!(null==e?void 0:e.delayUpdate)&&t&&fe(t,!0,Ae.getAllVariables(),l,(e=>{a({cid:t.cid,data:e})}))}}));const g=((e,t,r,n,i)=>e.filter((e=>e.id===t&&e.eventType===r&&(!i||parseInt(e.index||"0")+1===parseInt(n||"0")))))(e,u,f,d,m);for(const e of g)Se(e,i,n,m,o,Ae.getAllVariables(),l,a,s)};function Ie(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n))if("object"!=typeof e[n]||null===e[n]||Array.isArray(e[n]))Array.isArray(e[n])?JSON.stringify(e[n])!==JSON.stringify(t[n])&&(r[n]=t[n]):e[n]!==t[n]&&(r[n]=t[n]);else{const i=Ie(e[n],t[n]);null!==i&&Object.keys(i).length>0&&(r[n]=i)}return Object.keys(r).length>0?r:null}function Te(e,t){const r=Object.assign({},e);for(const e in t)t.hasOwnProperty(e)&&("object"!=typeof t[e]||null===t[e]||Array.isArray(t[e])?r[e]=t[e]:r[e]=Te(r[e],t[e]));return r}const Ve=(e,t={})=>{let r={},n={type:"static",converse:{use:!1,data:[]},static:{data:e},api:{requestType:"get",url:"",headers:{use:!1,value:""},params:"",agency:!1,cookie:!0,autoUpdate:{open:!1,time:10},data:""}};return Object.assign(r,n,t),r},Ee=(e,t)=>{let{option:r,actions:n,data:i,optionDes:o,actionsDes:a,source:s,theme:l}=((e,t)=>{let{option:r,actions:n,data:i,optionDes:o,actionsDes:a,source:s,theme:l}=_$1.cloneDeep(t[e]);return{option:r,actions:n,data:i,optionDes:o,actionsDes:a,source:s,theme:l}})(e,t);return{iconClass:null,isAssembly:null,source:i,cid:(Math.random().toString().substr(3,10)+Date.now()).toString(),isLock:!1,isShow:!0,tmpData:{option:r,source:Ve(i,s),actions:n},baseData:Pe(),dynamic:null,filePath:"",origin:"anov-ui",name:"",componentType:"",viewComName:e,optionComName:"AnOptionPanel",dataComName:"AnSourcePanel",eventComName:"AnActionsPanel",assemblyDeveloper:"",devEmail:"",version:"",devDept:""}},Fe=(e,t,r)=>{let n=Ee(e,t);return r?_$1.merge(n,r):n},Pe=e=>{let t={left:0,top:0,width:100,height:100,angle:0,penetrate:0,opacity:100,perspective:100,rotateX:0,rotateY:0,rotateZ:0,transformOriginX:"center",transformOriginY:"center",transformSwitch:!1};return e?Object.assign(t,e):t};class je{constructor(e,t,r){this.theme=null,this.plant=null,this.list=[],this.titleHeqadeHeight=70,this.clearance=3,this.checkComponentIntersection=(e,t,r=10)=>{const n=e.left,i=e.left+e.width,o=e.top,a=e.top+e.height,s=t.left,l=t.left+t.width,c=t.top,u=t.top+t.height,h=n<l&&i>s&&o<u&&a>c,d=Math.abs(e.left+e.width/2-(t.left+t.width/2)),f=Math.abs(e.top+e.height/2-(t.top+t.height/2));return h||d<r&&f<r},this.calculateCombinedComponent=e=>{if(0===e.length)return{left:0,top:0,width:0,height:0};let t=e[0].left,r=e[0].top,n=e[0].left+e[0].width,i=e[0].top+e[0].height;for(let o=1;o<e.length;o++){const a=e[o];t=Math.min(t,a.left),r=Math.min(r,a.top),n=Math.max(n,a.left+a.width),i=Math.max(i,a.top+a.height)}return{left:t,top:r,width:n-t,height:i-r}},this.getAnTextNormaltText=e=>{var t,r;try{return null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.option)||void 0===r?void 0:r.text}catch(e){return console.error("配置优化(ConfigOptimizer):",e),""}},this.initProp(e),this.upgradePlant(),this.staticComponentData=t,this.upgradeHeaderComponent(),r&&Object.assign(this,r)}isStringOrObject(e){return"string"==typeof e?"string":"object"==typeof e&&null!==e&&"object"}initProp(e){try{let t,r=this.isStringOrObject(e);if(r&&"string"===r)t=JSON.parse(e);else{if(!r||"object"!==r)throw new Error(`initProp fn error :-- 传入参数${e}不合法!`);t=e}if(t){this.originData=t;const{theme:e,plant:r,list:n}=t;this.theme=e,this.plant=r,this.list=n,this.filterFileGroup()}}catch(e){console.error("配置优化(ConfigOptimizer):",e)}}upgradePlant(){this.plant&&(this.plant.option.bg={type:1,code:"70942ec525344c96aa32b81b2c9155f6",path:"/anov-prod/resources/page/png/bg22 科技星球背景.png",thumb:"/anov-prod/resources/page/thumbnail/1e48f8fb26ec4edfb1a0f499627e84fc.png"})}areComponentsIntersecting(e,t){let r=e.baseData,n=t.baseData;const i=Math.max(0,Math.min(r.left+r.width,n.left+n.width)-Math.max(r.left,n.left)),o=Math.max(0,Math.min(r.top+r.height,n.top+n.height)-Math.max(r.top,n.top));return i>0&&o>0}filterFileGroup(){this.list=_$1.cloneDeep(this.list).map((e=>{var t,r;if(1===(null===(t=null==e?void 0:e.children)||void 0===t?void 0:t.length)&&!(null===(r=null==e?void 0:e.children[0])||void 0===r?void 0:r.children)){const t=e.children[0],{left:r,top:n}=e.baseData;return t.baseData.left=r,t.baseData.top=n,t}return e}))}getText(e,t,r){const n=document.createElement("canvas").getContext("2d");if(!n)throw new Error("Failed to get 2D context from canvas.");return n.font=`${r}px ${t}`,n.measureText(e).width}calculateMaxWidths(e){const t=Math.min(...e.map((e=>e.width))),r=[];let n=[],i=e[0].width;for(const o of e){const e=o.width;Math.abs(e-i)<=t?n.push(e):(n.length>0&&r.push(n),n=[e]),i=e}n.length>0&&r.push(n);const o=[];for(const e of r){const t=Math.max(...e);o.push(t)}return o}findClosestValue(e,t){let r=t[0],n=Math.abs(e-r);for(const i of t){const t=Math.abs(e-i);t<n&&(n=t,r=i)}return r}adjustHeightAndTop(e,t){const r=t-e.height;return Object.assign(Object.assign({},e),{height:t,top:e.top-r/2})}findNearestComponent(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=_$1.cloneDeep(e).sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=_$1.cloneDeep(t).baseData;a.top,a.height;for(const e of o){const t=e.baseData;if(t.top,t.height,a.left<t.left+t.width&&a.left+a.width>t.left){const r=t.top-a.top;r<i&&r<100&&(i=r,n=e)}}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}findNearestComponentForPoint(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=e.sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=t.baseData;a.top,a.height;for(const e of o){const t=e.baseData;let r=this.getDistance(a.left,a.top+a.height,t.left,t.top);r<i&&r<a.width&&(i=r,n=e)}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}findNearestComponentForTitlePoint(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=e.sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=t.baseData;a.top,a.height;for(const e of o){const t=e.baseData;let r=this.getDistance(a.left,a.top+a.height,t.left,t.top);r<i&&r<a.width&&t.top-a.top>100&&(i=r,n=e)}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}findNearestTitleForPoint(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=e.sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=t.baseData;a.top,a.height;for(const e of o){const t=e.baseData;let r=t.top-a.top;r<i&&r<a.width&&t.top-a.top>100&&(i=r,n=e)}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}getDistance(e,t,r,n){return Math.sqrt(Math.pow(r-e,2)+Math.pow(n-t,2))}findNearestComponent2(e,t,r){let n=null,i=1/0,o=_$1.cloneDeep(e).sort(((e,t)=>e.baseData.top-t.baseData.top));try{const e=o.filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=_$1.cloneDeep(t).baseData,s=a.top+a.height;for(const t of e){const e=t.baseData,r=e.top+e.height;if(a.left<e.left+e.width&&a.left+a.width>e.left){const e=r-s;e>=0&&e<i&&(i=e,n=t)}}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}verticalDistance(e,t){e.left,e.width;const r=e.top+e.height,n=(t.left,t.width,t.top);return Math.abs(r-n)}extractAmount(e){const t=e.match(/(\d{1,3}(?:,\d{3})*)(\D+)/);if(t){const e=t[1].replace(/,/g,"");return[parseInt(e,10),t[2].trim()]}return[!1,!1]}getAnTextNormal(){return this.list.filter((e=>"AnTextNormal"==e.viewComName))}getAnDeckTitle3(){return this.list.filter((e=>"AnDeckTitle3"==e.viewComName)).sort(((e,t)=>e.baseData.left-t.baseData.left))}judgeAnOdometer(){let e=this.getAnTextNormal().sort(((e,t)=>e.baseData.left-t.baseData.left)),t=[],r=new Set;for(const n of e){if(r.has(n.cid))continue;let i=[];for(const t of e)r.has(t.cid)||n.cid==t.cid||this.checkComponentIntersection(n.baseData,t.baseData)&&(r.add(t.cid),r.add(n.cid),i.push(t));t.push([n,...i])}let n=[];for(const e of t)for(const t of e){let r=this.getAnTextNormaltText(t);this.extractAmount(r).every((e=>e))&&n.push(e)}return n}createAnOdometer(){var e,t;let r=this.judgeAnOdometer();for(const n of r){let r,i,o,a=this.calculateCombinedComponent(n.map((e=>e.baseData)));for(const e of n){let t=this.getAnTextNormaltText(e),n=this.extractAmount(t);n.every((e=>!e))&&(r=t),n.every((e=>e))&&(i=n[0],o=n[1]),_$1.remove(this.list,(t=>t.cid==e.cid))}let s=Fe("AnIndicatorNormal",this.staticComponentData,_$1.cloneDeep({baseData:a}));(null===(t=null===(e=null==s?void 0:s.tmpData)||void 0===e?void 0:e.source)||void 0===t?void 0:t.static)&&(s.tmpData.source.static.data={text:r,num:i,unit:o},s.tmpData.source.static.originData={text:r,num:i,unit:o}),this.list.push(s)}}upgradeHeaderComponent(){for(let e=0;e<this.list.length;e++){const t=this.list[e];"AnDeckHeader3"==t.viewComName&&(t.baseData.left=0,t.baseData.top=0)}}upgradeTitleComponent(){let e=this.getAnDeckTitle3().map((e=>e.baseData)),t=this.calculateMaxWidths(e);for(let e=0;e<this.list.length;e++){const r=this.list[e];if("AnDeckTitle3"==r.viewComName){let e=this.findClosestValue(r.baseData.width,t);r.baseData.width=e>300?e:300,r.baseData=this.adjustHeightAndTop(r.baseData,this.titleHeqadeHeight)}}this.removeErroneousComponents()}containsFractionStructure(e){return/\b\d+\/\d+\b/.test(e)}removeErroneousComponents(){let e=this.getAnDeckTitle3(),t=[];for(let r=0;r<e.length;r++){const n=e[r];let i=n.tmpData.option.textNormal.text;if(this.containsFractionStructure(i))for(let r=0;r<e.length;r++){const i=e[r];n.cid!=i.cid&&this.areComponentsIntersecting(n,i)&&t.push(n.cid)}}this.list=this.list.filter((e=>!t.includes(e.cid)))}upgradeGroupComponent(){try{let e=this.getAnDeckTitle3(),t=this.list.filter((e=>"AnDeckTitle3"!=e.viewComName&&"AnDeckHeader3"!=e.viewComName&&"AnTextNormal"!=e.viewComName)),r=[],n=[];for(let i=0;i<e.length;i++){const o=e[i];let a=this.findNearestComponentForPoint(t,o,r);if(a&&a.cid&&r.push(a.cid),a){o.baseData.left=a.baseData.left;let t=this.upgradeComponentHeight(o,e,n);t&&t>=30&&(a.baseData=Object.assign({},a.baseData,{top:o.baseData.top+o.baseData.height+this.clearance}))}}}catch(e){console.error("配置优化(ConfigOptimizer):",e)}}upgradeComponentHeight(e,t,r=[]){const n=e;let i=this.findNearestTitleForPoint(_$1.cloneDeep(t),n);return i?i.baseData.top-n.baseData.top-this.titleHeqadeHeight:1080-n.baseData.top-this.titleHeqadeHeight}getData(){return this.originData.list=this.list,this.originData.plant=this.plant,this.originData}}const $e=new class{randomNum(e,t){return Math.floor(Math.random()*(t-e+1))+e}generateRandomIntArray(e,t,r,n){const i=[];for(let n=0;n<e;n++){const e=this.randomNum(t,r);i.push(e)}return n&&"asc"===n?i.sort(((e,t)=>e-t)):n&&"desc"===n?i.sort(((e,t)=>t-e)):i}randomString(e,t){const r=this.randomNum(e,t);let n="";for(let e=0;e<r;e++){const e=Math.floor(26*Math.random());n+="abcdefghijklmnopqrstuvwxyz".charAt(e)}return n}generateRandomNameArray(e,t,r){const n=[];for(let i=0;i<e;i++){const e=this.randomString(t,r);n.push(e)}return n}pick(e,t){const r=void 0!==t?e.filter((e=>e!==t)):e;return r[Math.floor(Math.random()*r.length)]}},Re=()=>{const e=[],t=$e.pick([!0,!1]);let r=$e.randomNum(3,20);const n=$e.pick([null,null,null,{}]);let i=$e.pick(["asc","desc",void 0,void 0,void 0]);for(let o=0;o<$e.randomNum(1,9);o++)e.push({data:$e.generateRandomIntArray(r,0,300,i),type:"line",smooth:t,symbolSize:$e.randomNum(1,10),lineStyle:{width:$e.randomNum(1,4)},areaStyle:n});return{xAxis:{type:"category",show:!1,boundaryGap:!1,data:$e.generateRandomNameArray(r,3,6)},grid:{left:0,top:0,bottom:0,right:0},yAxis:{show:!1,type:"value"},series:e}},Me=(e,t)=>{let r={type:e,show:!1};return"category"===e&&(r.data=$e.generateRandomNameArray(t,3,6)),r},Ue=()=>{const e=[],t=$e.pick([!0,!1]);let r=$e.randomNum(3,20);const n=$e.pick([null,null,null,{}]);let i=$e.pick(["asc","desc",void 0,void 0,void 0]),o=$e.randomNum(1,9),a=$e.pick([!0,!1]);for(let s=0;s<o;s++){let o={data:$e.generateRandomIntArray(r,0,300,i),type:"bar",smooth:t,stack:a,areaStyle:n};e.push(o)}let s=$e.pick(["value","category"]),l=$e.pick(["value","category"],s);return{xAxis:Me(s,r),grid:{left:0,top:0,bottom:0,right:0},yAxis:Me(l,r),series:e}},qe=()=>{const e=[];let t=$e.randomNum(3,20);$e.pick([null,null,null,{}]);let r=$e.pick(["asc","desc",void 0,void 0,void 0]),n=$e.pick([1,2]),i=[$e.pick(["10%","20%","30%","40%","50%","60%","70%","80%"]),$e.pick(["90%","100%"])];return e.push({data:$e.generateRandomIntArray(t,3,20,r),type:"pie",radius:1==n?"100%":i,roseType:1==n?$e.pick(["area",null,null]):null,padAngle:1==n?0:$e.randomNum(1,5),startAngle:1==n?$e.pick([0,180]):0,endAngle:360,label:{show:!1},itemStyle:{borderRadius:3}}),{grid:{left:0,top:0,bottom:0,right:0},series:e}},Le=()=>{const e=[];$e.pick([!0,!1]),$e.randomNum(3,20),$e.pick([null,null,null,{}]),$e.pick(["asc","desc",void 0,void 0,void 0]);for(let t=0;t<$e.randomNum(1,20);t++){let t=$e.randomNum(3,$e.randomNum(3,20)),r=[];for(let e=0;e<t;e++){let e=[];for(let t=0;t<2;t++)e.push($e.randomNum(1,30));r.push(e)}e.push({type:"scatter",symbolSize:$e.randomNum(3,30),data:r})}return{xAxis:{show:!1},grid:{left:0,top:0,bottom:0,right:0},yAxis:{show:!1,type:"value"},series:e}},Be=()=>{const e=[],t=$e.pick(["polygon","circle"]);let r=$e.randomNum(1e4,99999),n=$e.randomNum(3,10),i=[];for(let e=0;e<n;e++)i.push({name:$e.randomString(4,8),max:r});for(let t=0;t<$e.randomNum(2,10);t++)e.push({value:$e.generateRandomIntArray(n,1e4,r),name:$e.randomString(4,8)});return{radar:{shape:t,indicator:i,axisName:{show:!1},radius:"100%"},grid:{left:0,top:0,bottom:0,right:0},series:[{type:"radar",symbol:"none",lineStyle:{width:1},data:e}]}},He=()=>{const e=[];for(let t=0;t<$e.randomNum(4,15);t++)e.push({value:$e.randomNum(1,100),name:$e.randomString(4,8)});return{grid:{left:0,top:0,bottom:0,right:0},series:[{type:"funnel",left:"0%",top:0,bottom:0,width:"100%",min:0,minSize:"0%",maxSize:"100%",label:{show:!1,position:"inside"},sort:$e.pick(["descending","ascending"]),gap:2,lineStyle:{width:1},data:e}]}};let ze=$e.randomNum(5,20);const Ge={width:ze};$e.pick([!0,!1])&&(Ge.color=[[.3,"#67e0e3"],[.7,"#37a2da"],[1,"#fd666d"]]);class _e{constructor(){this.names=["line","bar","pie","scatter","radar","funnel","gauge"]}static getInstance(){return _e.instance||(_e.instance=new _e),_e.instance}createLine(){switch($e.pick(this.names)){case"line":return{type:"line",typeNum:1,option:Re()};case"bar":return{type:"bar",typeNum:2,option:Ue()};case"pie":return{type:"pie",typeNum:3,option:qe()};case"scatter":return{type:"scatter",typeNum:4,option:Le()};case"radar":return{type:"radar",typeNum:5,option:Be()};case"funnel":return{type:"funnel",typeNum:6,option:He()};case"gauge":return{type:"gauge",typeNum:7,option:{grid:{left:0,top:0,bottom:0,right:0},series:[{type:"gauge",radius:"100%",detail:{formatter:"{value}"},progress:{show:$e.pick([!0,!1]),width:ze},axisLine:{lineStyle:Ge},data:[{value:$e.randomNum(1,100),name:"SCORE"}]}]}}}}}_e.instance=null;const Je=_e.getInstance(),We=new class{constructor(){this.directions=["row","row"],this.direction="column",this.splitNumbers=24,this.margin=[0,0]}baseLayout(e){const t=(null==e?void 0:e.maRrows)?null==e?void 0:e.maRrows:this.splitNumbers,r=(null==e?void 0:e.colNum)?null==e?void 0:e.colNum:this.splitNumbers,n=e.wrapWidth/r,i=e.wrapHeight/t;let o=q(this.directions);o&&(this.direction=o);let a=[];if("row"===this.direction){let e=q([3,4]);a=this.simulateRandomSegments(24,4,12,e)}else{let e=q([2,3]);a=this.simulateRandomSegments(24,4,6,e)}let s=[],l=[];if("row"===this.direction){for(let e=0;e<a.length;e++)if(0==e)s.push({x:0,y:0,w:a[e],h:24,i:e,wStep:n,hStep:i});else{let t=s[e-1].x;s.push({x:a[e-1]+t,y:0,w:a[e],h:24,i:e,wStep:n,hStep:i})}let e=q([2,3]),t=this.simulateRandomSegments(24,6,12,e);for(let e=0;e<s.length;e++){const r=s[e];for(let o=0;o<t.length;o++){const a=t[o];l.push({x:r.x,y:a,w:r.w,h:a,i:10*e+o,wStep:n,hStep:i})}}}else{for(let e=0;e<a.length;e++)if(0==e)s.push({x:0,y:0,w:24,h:a[e],i:e,wStep:n,hStep:i});else{let t=s[e-1].y;s.push({x:0,y:a[e-1]+t,w:24,h:a[e],i:e,wStep:n,hStep:i})}for(let e=0;e<s.length;e++){const t=s[e];let r=q([1,2,3,4]),o=this.simulateRandomSegments(24,5,12,r),a=[];for(let r=0;r<o.length;r++){const s=o[r];if(0==r)a.push({x:0,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i}),l.push({x:0,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i});else{let c=a[r-1].x;a.push({x:o[r-1]+c,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i}),l.push({x:o[r-1]+c,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i})}}}}return{layouts:l.map((t=>{let{option:r,typeNum:n}=Je.createLine(),i=t.x*t.wStep+t.w*t.wStep/2,o=t.y*t.hStep+t.h*t.hStep/2,a=t.w*t.wStep,s=t.h*t.hStep;if(3==n||5==n||7==n){let e=Math.min(a,s);a=e,s=e}let l=e.wrapWidth,c=e.wrapHeight;return t.chartsOption=r,t.typeNum=n,t.txt=n+" "+i/l+" "+o/c+" "+a/l+" "+s/c,console.log(t.txt),t})),option:{colNum:r,margin:(null==e?void 0:e.margin)?null==e?void 0:e.margin:this.margin,isDraggable:!!(null==e?void 0:e.isDraggable)&&(null==e?void 0:e.isDraggable),isResizable:!!(null==e?void 0:e.isResizable)&&(null==e?void 0:e.isResizable),verticalCompact:!(null==e?void 0:e.verticalCompact)||(null==e?void 0:e.verticalCompact),useCssTransforms:!(null==e?void 0:e.useCssTransforms)||(null==e?void 0:e.useCssTransforms),rowHeight:e.wrapHeight/t,maRrows:t}}}simulateRandomSegments(e,t,r,n){const i=[];let o=e,a=n;for(;a>0;)if(1===a)i.push(o),a--;else{const e=Math.min(r,o-t*(a-1)),n=Math.floor(Math.random()*(e-t+1))+t;i.push(n),o-=n,a--}return i}simulateRandomSegments2(e,t,r,n){const i=[];let o=e,a=n;for(;a>0;)if(1==a){const t=e-i.reduce(((e,t)=>e+t),0);i.push(t),a--}else{let e=Math.floor(Math.random()*r),n=Math.max(t,e),s=o-t*a;const l=Math.min(n,s);i.push(l),o-=l,a--}return i}},Xe=src.pool(),Ke=e=>{try{return JSON.parse(e)}catch(t){return e}},Qe=new class{constructor(){this.requested=new Set,this.db=new Dexie$1("go-db"),this.init()}init(){return s(this,void 0,void 0,(function*(){this.db.version(1).stores({store:"key, value"})}))}pushCaseIdToRequested(e){this.requested.add(e)}add(e,t){return s(this,void 0,void 0,(function*(){try{(yield this.isExist(e))||(t.caseDetailData&&(t.caseDetailData="string"==typeof t.caseDetailData?Ke(t.caseDetailData):t.caseDetailData),this.pushCaseIdToRequested(e),yield this.db.table("store").add({key:e,value:t}))}catch(e){console.error(e)}}))}bulkPut(e){return s(this,void 0,void 0,(function*(){let t=yield Promise.all(e.map((e=>s(this,void 0,void 0,(function*(){const{caseId:t,id:r}=e,n=`${t}_${r}`;if(yield this.isExist(n))return null;if(e.caseDetailData){const t=yield Xe.exec(Ke,[e.caseDetailData]);e.caseDetailData=t,Xe.terminate()}return e})))));t=t.filter((e=>null!==e));const r=t.map((e=>{const{caseId:t,id:r}=e,n=`${t}_${r}`;return this.pushCaseIdToRequested(n),{key:n,value:e}}));this.db.table("store").bulkPut(r).then((()=>{})).catch((e=>console.error(e)))}))}get(e){return s(this,void 0,void 0,(function*(){if(!(yield this.isExist(e)))return null;const t=yield this.db.table("store").where("key").equals(e).first();return t?t.value:null}))}getAllData(){return s(this,void 0,void 0,(function*(){return yield this.db.table("store").toArray()}))}update(e,t){return s(this,void 0,void 0,(function*(){if(yield this.isExist(e)){const r=yield this.get(e),n=yield Xe.exec(Ke,[t]);Xe.terminate(),yield this.db.table("store").update(e,{value:Object.assign(Object.assign({},r),{caseDetailData:n})})}else console.error("update indexdb error")}))}delete(e){this.requested.delete(e),this.db.table("store").delete(e)}isExist(e){return s(this,void 0,void 0,(function*(){return(yield this.db.table("store").where("key").equals(e).count())>0}))}reset(){this.requested.clear(),this.db.table("store").clear()}clear(){return s(this,void 0,void 0,(function*(){yield this.db.table("store").clear()}))}isExistStore(){return s(this,void 0,void 0,(function*(){try{return yield this.db.open(),!0}catch(e){return!1}}))}};function Ye(e){!function(e,t){e.depends?optionTheme_3(e):Ze(e,!1)}(e)}function Ze(e,t=!0){let{theme:r,option:n,optionDes:i}=e;n&&i&&r&&Object.keys(i).forEach((o=>{"conditionSeries"!==i[o].type&&"tabs"!==i[o].type||!n[o]?i[o].theme?n.hasOwnProperty(o)&&function({theme:e,option:t,optionDes:r},n,i){let o;if("color"!=r[n].type||!i&&t[n]){if("bgcolor"==r[n].type&&(i||!t[n]||!t[n].style)){t[n]||(t[n]={});let{key:i,points:a,degree:s,type:l,opacity:c}=r[n].theme;if(a){s||(s=90),l||(l="linear");let r=`${l}-gradient(${s}deg`,i=100/(a.length-1),u=[];a.forEach(((t,n)=>{o=et(e,t),r+=`,${tt(o,t.opacity)} ${i*n}%`;let{red:a,green:s,blue:l,alpha:h}=ot(o,c);u.push({red:a,green:s,blue:l,alpha:h,left:i*n})})),r+=")",t[n].style=r,t[n].degree=s,t[n].flag=a.length?3:2,t[n].points=u,t[n].type=l}else i&&(o=et(e,r[n].theme),t[n]=Object.assign(Object.assign({},ot(o,c)),{style:tt(o,c)}))}}else{let{opacity:i}=r[n].theme;o=et(e,r[n].theme),t[n]=tt(o,i)}}(e,o,t):i[o].hasOwnProperty("type")&&"slot"!=i[o].type&&"textStyle"!=i[o].type&&"sheet"!=i[o].type||i[o].constructor!=Object||Ze({option:n[o],optionDes:i[o],theme:r},t):function(e,t,r,n,i,o){let a=t.form,s=e;if(Array.isArray(a))for(let e=0;e<a.length;e++){let t,r=a[e];t=o?s[e].form:s[e],Ze({option:t,optionDes:r,theme:n},i)}else{let e=s.length;for(let t=0;t<e;t++){let e;e=o?s[t].form:s[t],Ze({option:e,optionDes:a,theme:n},i)}}}(n[o],i[o],0,r,t,"conditionSeries"===i[o].type)}))}function et(e,t){return e[t.key]?e[t.key]||e.color:t.key.indexOf(".")>-1?[e,...t.key.split(".")].reduce(((t,r)=>"object"==typeof t&&r in t?t[r]:(it(`属性${r}不存在,获取主题颜色错误,将使用默认主题色`),e.color))):(it(`属性${t.key}不存在,获取主题颜色错误,将使用默认主题色`),e.color)}function tt(e,t){let{red:r,green:n,blue:i,alpha:o}=ot(e,t);return`rgba(${r},${n},${i},${o})`}function ot(e,t){return-1!=e.indexOf("#")&&(e=e.substr(1)),null==t&&(t=1),{red:parseInt("0x"+e.slice(0,2)),green:parseInt("0x"+e.slice(2,4)),blue:parseInt("0x"+e.slice(4,6)),alpha:t}}function it(e){console.warn(e)}class rt{constructor(e){this.processedIds=new Set,this.validateAccessResolve=null,e?(e.caseId&&(this.caseId=e.caseId),e.pageId&&(this.pageId=e.pageId),e.mode&&(this.mode=e.mode),e.environment&&(this.environment=e.environment),e.xhr&&(this.xhr=e.xhr),e.staticComponentData&&(this.staticComponentData=e.staticComponentData),e.theme&&(this.theme=e.theme)):console.log("初始化错误!"),this.defaultTheme={name:"科技蓝",color:"#006aee",background:"#00000033",pageBackground:"#051836",text:"#F0F0F0",groups:["#006aee","#00eae9","#00a9ec","#00ec80","#edc700","#9913ee"]}}checkHardware(){return s(this,void 0,void 0,(function*(){return yield new Promise(((e,t)=>{e("Hardware is not available")}))}))}checkSecurity(e){return s(this,void 0,void 0,(function*(){return yield new Promise(((t,r)=>{"preview"==this.environment?t(0):this.getShareForRelease(e).then((e=>{2e4==e.code&&e.data?(e.data,e.data.loginLimitSwitch?t(1):e.data.hasAuth?t(2):t(3)):t(4)}))}))}))}validateAccess(e,t){return s(this,void 0,void 0,(function*(){return new Promise(((r,n)=>{this.validateAccessResolve=r,t&&t(e)}))}))}initBefore(){return new Promise(((e,t)=>{let r=y("secretFree");r?sessionStorage.setItem("secret-free",r):sessionStorage.setItem("secret-free",null),console.log("运行免登录设置完成!"),e(!0)}))}fetchCaseId(e,t){return s(this,void 0,void 0,(function*(){try{const r=yield this.getKey(e,t);return 2e4===(null==r?void 0:r.code)&&(null==r?void 0:r.data)?r.data:e}catch(t){return console.error("Error fetching caseId:",t),e}}))}getDataForrelease(){return new Promise(((e,t)=>{e("data")}))}onProjectLoaded(e){}authenticate(){return s(this,void 0,void 0,(function*(){this.environment}))}getShareForRelease(e){return this.xhr.get(`/go/v1/go-share/v1/${e}/config`)}findById(e,t="",r=0,n=""){return"release"===this.environment?this.xhr.get(`/go/v1/go-share/v1/${e}?pwd=${t}&mode=${r}&token=${n}`):this.xhr.get(`/go/v1/go-cases/v1/${e}?mode=${r}&token=${n}`)}getKey(e,t=0){return this.xhr.get(`/go/v1/go-cases/v1/key/${e}?caseMode=${t}`)}getPageData(e,t){return s(this,void 0,void 0,(function*(){const r=yield Qe.get(e+"_"+t);return r?{data:r}:"release"===this.environment?this.xhr.get(`/go/v1/go-share/v1/${e}/pages/${t}`):this.xhr.get(`/go/v1/go-cases/v1/${e}/pages/${t}`)}))}getPageId(e,t){if(null==t?void 0:t.length){if(t.find((t=>t.id==e)))return e;let r=t.find((t=>t.caseDetailPath==e||t.caseDetailName==e));return r?r.id:e}return e}fetchProjectForId(e,t="",r=0,n=""){return s(this,void 0,void 0,(function*(){return yield this.findById(e,t,r,n)}))}updataPageData(e,t){var r;return s(this,void 0,void 0,(function*(){let n=yield this.getPageDataForID(e,t);(null==n?void 0:n.data)?null===(r=null==this?void 0:this.lifecycleHooks)||void 0===r||r.onPageDataReady(n.data.caseDetailData):console.error("请求数据发生错误!")}))}getPageDataForID(e,t,r){return s(this,void 0,void 0,(function*(){const n=this.getPageId(t,this.projectInfo.details);if(this.processedIds.has(n)){console.log(`ID ${n} has already been processed.`);const t=yield Qe.get(e+"_"+n);if(t)return{data:t}}const i=this.getPageData(e,n);this.processedIds.add(n),r&&r.length&&r.map((t=>s(this,void 0,void 0,(function*(){try{if(this.processedIds.has(t))return void console.log(`ID ${n} has already been processed.`);const r=yield this.getPageData(e,t);Qe.add(e+"_"+t,r.data),this.processedIds.add(t)}catch(e){console.error(`Error processing ID ${t}: ${e}`)}}))));const o=yield i;return Qe.add(e+"_"+n,o.data),yield i}))}fetchPageDataForId(e,t="",r=0,n=""){return s(this,void 0,void 0,(function*(){return yield this.findById(e,t,r,n)}))}setTheme(){console.log("设置主题")}setBackground(){console.log("设置背景信息")}updateVariables(){console.log("更新变量信息")}beforeRender(e){}renderComponents(){return s(this,void 0,void 0,(function*(){}))}setGlobalThemeVars(e){document.body.style.cssText=`\n --theme-background: ${e.background};\n --theme-color: ${e.color};\n --theme-pageBackground: ${e.pageBackground};\n --theme-text: ${e.text};\n ${e.groups.map(((e,t)=>`--theme-groups-${t}: ${e};`)).join("\n")}\n `}listenForRenderCompletion(){}showAnimation(){console.log("所有组件渲染完成,显示动画。")}setComTheme(e,t){var r,n;let i=null===(r=this.staticComponentData[t.viewComName])||void 0===r?void 0:r.optionDes,o=null===(n=this.staticComponentData[t.viewComName])||void 0===n?void 0:n.theme;return Ye({theme:e,option:t.tmpData.option,optionDes:i,depends:o}),t}getComData(e,t,r,n){return s(this,void 0,void 0,(function*(){return new Promise(((i,o)=>{if(e.tmpData&&e.tmpData.source){this.setComTheme(n,e);try{fe(e,!0,t,r).then((t=>{t&&(e.source=t)})),i(1)}catch(e){i(e)}}else i("")}))}))}pageInit(e){var t;return s(this,void 0,void 0,(function*(){try{let r=null==e?void 0:e.caseDetailData,n=this.defaultTheme;if((null==r?void 0:r.theme)&&(n=r.theme),this.setGlobalThemeVars(n),r.resource){let e=(null===(t=null===window||void 0===window?void 0:window.anovuiConfig)||void 0===t?void 0:t.fonts)||[],n=_$1.concat(r.resource.fonts,e),i=_$1.cloneDeep(r.resource);i.fonts=n,yield f(i)}Ae.clearVars(),Ae.addVariables(r.globalVars);let i=Ae.getAllVariables();return C(r.list,(e=>s(this,void 0,void 0,(function*(){yield this.getComData(e,i,r.globalSource,n)})))),r}catch(t){return console.warn("页面初始化发生错误:",t),(null==e?void 0:e.data)?e.data:e}}))}validate(e,t,r){return s(this,void 0,void 0,(function*(){return new Promise(((n,i)=>{const o=(e,r)=>s(this,void 0,void 0,(function*(){let i=yield this.validateAccess(e,r),a=(null==i?void 0:i.pwd)?i.pwd:"",s=(null==i?void 0:i.mode)?i.mode:0,l=(null==i?void 0:i.token)?i.token:"",c=yield this.fetchProjectForId(t,a,s,l);2e4==(null==c?void 0:c.code)&&(null==c?void 0:c.data)?(this.projectInfo=c.data,console.log("验证成功!"),this.lifecycleHooks.message("验证成功!"),n(!0)):(this.lifecycleHooks.validateError(c),this.lifecycleHooks.message(c.msg,"warning"),o(e,r))}));o(e,r)}))}))}init(e){var t;return s(this,void 0,void 0,(function*(){try{this.lifecycleHooks=e,yield this.checkHardware();let r=yield this.fetchCaseId(this.caseId,this.mode),n=yield this.checkSecurity(r),i=e.onValidateAccess||(()=>{});(yield this.validate(n,r,i))&&e.onCaseReady(this.projectInfo);let o=(null===(t=this.projectInfo)||void 0===t?void 0:t.details).map((e=>e.id)),a=this.getPageId(this.pageId,this.projectInfo.details);console.log(a,this.pageId,"this.pageId");let s=yield this.getPageDataForID(r,a||o[0],o);const l=yield this.pageInit(s.data);return e.onPageDataReady(l),{currentData:this.projectInfo,currentPageData:l}}catch(e){console.error("加载页面时出错:",e)}}))}}var index$3=Object.freeze({__proto__:null,ConfigOptimizer:je,GlobalVariables:ke,Http:Y,Log:Q,PageLoader:rt,addPreloadLink:v,agentData:oe,applyDiff:Te,delFetchStatus:P,diffObjects:Ie,displayGenerator:We,editItem:me,emitEvent:Oe,fetchDataByGlobal:he,fetchDataByType:ue,filterData:pe,findItemDeep:I,findItemDeep2:T,getData:te,getDataForApi:ie,getDataForDataSet:ae,getDataForSource:se,getDataForStatic:le,getDataForZb:re,getDataForZbCQ:ne,getResourceForComponent:$,getSessionData:N,getStandardData:b,getStringVars:x,getUrlParams:y,getVarDefaultVal:xe,globalVars:Ae,hasVar:O,isJSON:w,loadFont:m,loadFontResource:u,loadScript:h,loadTag:f,recursion:C,removeTag:g,replaceVariable:ye,safeEval:V,safeEvalForCode:E,setFetchStatus:F,setSessionData:D,updataGlobalDataSourceForVar:we,updateComData:fe,updateGlobalDataSource:De}),getInteractive=function(e,t,r,n,i){var o;try{var a={},s=[],l=[],c=[],u=_$1.cloneDeep(e);return(null===(o=null===window||void 0===window?void 0:window.go)||void 0===o?void 0:o.dev)&&recursion(e,(function(e){var t,r,n;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length)for(var i=0,o=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.actions;i<o.length;i++){var a=o[i];if("toggle"==a.behave){var s=a.toggle;if(null==s?void 0:s.length)for(var l=0,c=s;l<c.length;l++){var u=c[l],h=u.value;(null==h?void 0:h.length)&&(u.value=u.value.map((function(e){return{cid:e.cid,viewComName:e.viewComName,name:e.name,visible:e.visible}})))}}}})),recursion(u,(function(e){var t,r;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length){var n=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:n,element:e,actions:s,events:l,eventsComs:c,filter:i})}})),Ae.addVariables(s),s=Ae.getAllVariables(),recursion(u,(function(e){var t,r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.source;getShareVariableTree(r,s,e,a)})),{shareVariableTree:a,globalVars:Ae.getAllVariables(),globalEvents:l.filter((function(e){return e})),eventsComs:c}}catch(e){return console.error("error",e),{}}},getInteractive2=function(e,t,r,n,i){var o;try{var a={},s=[],l=[],c=[],u=_$1.cloneDeep(e);return(null===(o=null===window||void 0===window?void 0:window.go)||void 0===o?void 0:o.dev)&&recursion(e,(function(e){var t,r,n;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length)for(var i=0,o=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.actions;i<o.length;i++){var a=o[i];if("toggle"==a.behave){var s=a.toggle;if(null==s?void 0:s.length)for(var l=0,c=s;l<c.length;l++){var u=c[l],h=u.value;(null==h?void 0:h.length)&&(u.value=u.value.map((function(e){return{cid:e.cid,viewComName:e.viewComName,name:e.name,visible:e.visible}})))}}}})),recursion(u,(function(e){var t,r;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length){var n=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:n,element:e,actions:s,events:l,eventsComs:c})}})),t&&t.length&&(s=__spreadArray$1(__spreadArray$1([],s,!0),t,!0)),r&&r.length&&(s=__spreadArray$1(__spreadArray$1([],s,!0),r,!0)),n&&n.length&&(s=__spreadArray$1(__spreadArray$1([],s,!0),n,!0)),recursion(u,(function(e){var t,r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.source;getShareVariableTree(r,s,e,a)})),s.filter((function(e){if(e.fork){var t=s.find((function(t){return t.mapField==e.forkValue||Array.isArray(e.forkValue)&&e.forkValue.includes(t.mapField)}));(i?i==e.forkValue||Array.isArray(e.forkValue)&&e.forkValue.includes(i):!!t)&&(Array.isArray(e.forkValue)?e.originalValue=e.forkValue.map((function(e){var t=s.find((function(t){return t.mapField==e}));if(t)return t.value})):e.originalValue=t.value)}})),{shareVariableTree:a,globalVars:s.filter((function(e){return i?(i==e.forkValue||Array.isArray(e.forkValue)&&e.forkValue.includes(i))&&(e.hasOwnProperty("originalValue")||(e.originalValue=e.value),e.converter&&e.converterCode?e.value=safeEval(e.converterCode,e.originalValue):e.value=e.originalValue):(e.hasOwnProperty("originalValue")||(e.originalValue=e.value),e.converter&&e.converterCode?e.value=safeEval(e.converterCode,e.originalValue):e.value=e.originalValue),e})),globalEvents:l.filter((function(e){return e})),eventsComs:c}}catch(e){return console.error("error",e),{}}},checkVar=function(e,t){var r,n,i,o=!1,a=e.type,s=e.converse,l=e[a];if((null==s?void 0:s.use)&&(null===(r=null==s?void 0:s.data)||void 0===r?void 0:r.length))for(var c=0,u=s.data;c<u.length;c++){if((null==(v=u[c])?void 0:v.use)&&v.dependVars.includes(t)){o=!0;break}}if(o)return o;var h="",d="",f="";"api"==a&&(h=l.url,(null===(n=l.headers)||void 0===n?void 0:n.use)&&(d=l.headers.value),f=l.params),"datasource"==a&&(h=l.inputSql),"indicator"==a&&((null===(i=l.headers)||void 0===i?void 0:i.use)&&(d=l.headers.value),f=l.params);for(var p=/({{[\w]*}})|((@)[\w]*)/gm,m=0,g=[h,d,f];m<g.length;m++){var v,y=(v=g[m]).match(p);if((null==y?void 0:y.length)&&y.find((function(e){return e=="{{".concat(t,"}}")||e=="@".concat(t)}))){o=!0;break}}return o},executeFilter=function(e){return e.hasOwnProperty("originalValue")||(e.originalValue=e.value),e.converter&&e.converterCode?e.value=safeEval(e.converterCode,e.originalValue):e.value=e.originalValue,e},getShareTree=function(e,t){try{var r={},n=[],i=[];return recursion(e,(function(e){var o,a,s,l=null===(o=null==e?void 0:e.tmpData)||void 0===o?void 0:o.source;if(getShareVariableTree(l,t,e,r),null===(s=null===(a=null==e?void 0:e.tmpData)||void 0===a?void 0:a.actions)||void 0===s?void 0:s.length){var c=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:c,element:e,actions:n,events:i})}})),r}catch(e){return console.error(e),{}}},hasVar=function(e,t,r){var n,i,o,a,s=t[null==t?void 0:t.type],l=null==t?void 0:t.converse,c=!1;if(l&&l.use&&l.data.length)for(var u=0,h=l.data;u<h.length;u++){var d=h[u];if((null==d?void 0:d.dependVars)&&(null===(n=null==d?void 0:d.dependVars)||void 0===n?void 0:n.length)&&(null==d?void 0:d.dependVars.includes(e)))return c=!0}return(null==s?void 0:s.inputSql)&&(c=getStringVars(null==s?void 0:s.inputSql,r)),(null==s?void 0:s.url)&&(c=getStringVars(s.url,r)),(null==s?void 0:s.headers)&&(null===(i=null==s?void 0:s.headers)||void 0===i?void 0:i.use)&&(null===(o=null==s?void 0:s.headers)||void 0===o?void 0:o.value)&&(c=getStringVars(null===(a=null==s?void 0:s.headers)||void 0===a?void 0:a.value,r)),(null==s?void 0:s.params)&&(c=getStringVars(null==s?void 0:s.params,r)),c},getShareVariableTree=function(e,t,r,n){var i,o,a;if(e){var s=e[null==e?void 0:e.type],l=null==e?void 0:e.converse;l&&l.use&&l.data.length&&l.data.map((function(e){var t;(null==e?void 0:e.dependVars)&&(null===(t=null==e?void 0:e.dependVars)||void 0===t?void 0:t.length)&&e.dependVars.map((function(e){setShareVariableTreeData(n,e,r.cid)}))})),(null==s?void 0:s.inputSql)&&getStringVars(null==s?void 0:s.inputSql,t,r,n),(null==s?void 0:s.url)&&getStringVars(s.url,t,r,n),(null==s?void 0:s.headers)&&(null===(i=null==s?void 0:s.headers)||void 0===i?void 0:i.use)&&(null===(o=null==s?void 0:s.headers)||void 0===o?void 0:o.value)&&getStringVars(null===(a=null==s?void 0:s.headers)||void 0===a?void 0:a.value,t,r,n),(null==s?void 0:s.params)&&getStringVars(null==s?void 0:s.params,t,r,n)}},getStringVars=function(e,t,r,n){"string"!=typeof e&&(e=JSON.stringify(e));var i=e.match(/({{[\w]*}})|((@)[\w]*)/gm);if(i){var o=i.map((function(e){return e.replace(/{{|}}|@/gm,"")}));if(r)for(var a=function(e){var i=o[e];if(!i||!t||t.findIndex((function(e){return e.mapField===i}))<0)return"continue";r&&n&&setShareVariableTreeData(n,i,r.cid)},s=0;s<o.length;s++)a(s);else{var l=function(e){var i=o[e];return!i||!t||t.findIndex((function(e){return e.mapField===i}))<0?"continue":(r&&n&&setShareVariableTreeData(n,i,r.cid),{value:!0})};for(s=0;s<o.length;s++){var c=l(s);if("object"==typeof c)return c.value}}}return!1},setShareVariableTreeData=function(e,t,r){if(e[t]&&_$1.isArray(e[t])){e[t].push(r);var n=e[t];e[t]=_$1.uniq(n)}else e[t]=[],e[t].push(r)},isJSON=function(e){if("string"==typeof e)try{var t=JSON.parse(e);return!("object"!=typeof t||!t)}catch(e){return!1}return!1};function getStandardData(e,t){return void 0===t&&(t=!1),t?isJSON(e)?e:JSON.stringify(e):isJSON(e)?JSON.parse(e):e}var rightMenuMutaitons={delListItem:function(e,t){var r=_$1.cloneDeep(e.list);"string"==typeof t?findItemDeep$1(r,t,!0):t.forEach((function(e){findItemDeep$1(r,e,!0)})),e.list=r,e.globalVars=getInteractive(e.list,e.globalConstant,e.sysConst).globalVars},editCloneCache:function(e,t){var r=_$1.cloneDeep(e.cloneCache);r.length&&r.map((function(e){e.baseData=Object.assign({},e.baseData,t)})),e.cloneCache=r},cloneItem:function(e){if(e.selectd.length>0){e.cloneCache=[];for(var t=function(t){var r=findItemDeep$1(e.list,e.selectd[t]);if("boolean"!=typeof r){var n=_$1.cloneDeep(r);if(n.pid="",(null==n?void 0:n.stateChildren)||(null==n?void 0:n.children))((null==n?void 0:n.stateChildren)?null==n?void 0:n.stateChildren:null==n?void 0:n.children).forEach((function(e){var t,r,i,o,a=e.cid;if(e.cid=genID(),e.pid=n.cid,(null==n?void 0:n.stateChildren)&&(null===(r=null===(t=null==n?void 0:n.tmpData)||void 0===t?void 0:t.option)||void 0===r?void 0:r.children)){var s=null===(o=null===(i=null==n?void 0:n.tmpData)||void 0===i?void 0:i.option)||void 0===o?void 0:o.children.find((function(e){return e.cid==a}));s&&(s.cid=e.cid)}}));e.cloneCache.push(n),window.localStorage.setItem("cloneCache",JSON.stringify(e.cloneCache))}},r=0;r<e.selectd.length;r++)t(r)}},shearItem:function(e,t){if(e.selectd.length>0){e.cloneCache=[];for(var r=0;r<e.selectd.length;r++){var n=findItemDeep$1(e.list,e.selectd[r],!0);if("boolean"!=typeof n){var i=_$1.cloneDeep(n);e.cloneCache.push(i)}}e.selectd=[]}},pasteItem:function(e){var t,r;try{var n=(null===(r=_$1.cloneDeep(e.cloneCache))||void 0===r?void 0:r.length)?_$1.cloneDeep(e.cloneCache):JSON.parse(window.localStorage.getItem("cloneCache"));if(n.length>0){var i=[],o={};recursion(n,(function(e){var t=genID();if(o[e.cid]=t,e.cid=t,e&&e.children)for(var r=0,n=e.children;r<n.length;r++){n[r].pid=e.cid}else if(e.stateChildren)for(var a=0,s=e.stateChildren;a<s.length;a++){s[a].pid=e.cid}if("dynamicComponent"==e.componentType){var l=void 0;e.dynamicChildren instanceof Map?l=e.dynamicChildren.get(e.activeDynamic):e.dynamicChildren instanceof Array&&(l=e.dynamicChildren.find((function(t){return t[0]==e.activeDynamic}))),l.length>1&&(Array.isArray(l[1])?l[1].forEach((function(t){t.pid=e.cid})):l.forEach((function(t){t.pid=e.cid}))),1==l.length&&l.forEach((function(t){t.pid=e.cid}))}i.push(e.cid)})),e.selectd.length>0?selectdArea(e.selectd,e.list):getPosition(n),n.forEach((function(e){var t,r,n,i;if(e.baseData.top=e.baseData.top+20,e.baseData.left=e.baseData.left+20,e&&e.hasOwnProperty("stateChildren")&&(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.option)||void 0===r?void 0:r.children))for(var o=function(t){t.pid=e.cid;var r=null===(i=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.option)||void 0===i?void 0:i.children.find((function(e){return e.disName==t.name}));r&&(r.cid=t.cid)},a=0,s=e.stateChildren;a<s.length;a++){o(s[a])}}));try{var a=Object.keys(o),s=JSON.stringify(n);(null==a?void 0:a.length)&&a.forEach((function(e){var t=o[e];-1!==s.indexOf(e)&&(s=s.replaceAll(null==e?void 0:e.toString(),null==t?void 0:t.toString()))})),n=JSON.parse(s)}catch(e){}(t=e.list).unshift.apply(t,_$1.cloneDeep(n)),e.selectd=i}}catch(e){console.warn(e)}},updataShow:function(e,t){var r=findItemDeep$1(e.list,t);if("boolean"!=typeof r){var n=!r.isShow;updataAttribute(r,"isShow",n,"")}},changeShow:function(e,t){var r=t.cid,n=t.flag,i=findItemDeep$1(e.list,r);i&&updataAttribute(i,"isShow",n,"")},comToggle:function(e,t){var r=findItemDeep$1(e.list,t);r&&comToggle(r)},updataLock:function(e,t){var r=findItemDeep$1(e.list,t);if("boolean"!=typeof r){var n=!r.isLock;updataAttribute(r,"isLock",n,"")}},breakUp:function(e,t){var r,n;try{if(!t)throw"Please pass in the component CID correctly!";var i=findParentDeep(e.list,t),o=findItemDeep$1(e.list,t),a=o.baseData;if(isNaN(a.left)||isNaN(a.top))throw new Error("top or left is NAN");var s=breakUp(o,e.list);if(s.map((function(e){return e.pid=""})),i){var l=i.children.findIndex((function(e){return e.cid==t}));i.children.splice(l,1),(r=i.children).push.apply(r,s.reverse())}else{l=e.list.findIndex((function(e){return e.cid==t}));e.list.splice(l,1),(n=e.list).push.apply(n,s.reverse())}}catch(e){console.error(e)}},editGroup:function(e,t){var r,n=t.groupId;t.status;try{if(!n)throw"Please pass in the component CID correctly!";var i=e.list.findIndex((function(e){return e.cid===n})),o=e.list[i],a=breakUp(o);a.map((function(e){return e.pid=""})),e.list.splice(i,1),(r=e.list).push.apply(r,a)}catch(e){console.error(e)}},combination:function(e){_$1.cloneDeep(e.list);var t,r,n=[],i=[],o=genID(),a=findItemDeep$1(e.list,e.selectd[0]);a.pid?console.info("Sorry, only level 2 is supported group"):a.children&&1===e.selectd.length?console.info("Sorry, only level 2 is supported group"):(e.selectd.forEach((function(t){var r=e.list.findIndex((function(e){return e.cid===t}));if(r>-1){n.push(r);var a=e.list.splice(r,1)[0];a.pid=o,i.push(a)}})),t=n.sort((function(e,t){return e-t}))[0],r=1===i.length?_$1.cloneDeep(i[0].baseData):e.currentArea,Object.assign(r,{angle:0,opacity:100,rotate:0,rotateY:0}),setPositionForGroup(r,i),e.list.splice(t,0,{cid:o,pid:"",isShow:!0,isLock:!1,editer:!1,baseData:r,z:0,toggle:!0,name:"群组",type:"folder",origin:"anov-ui",tmpData:{actions:null,option:null,source:globalSourceTemp},children:i}),setIndex(e.list),e.selectd=[o])},moveUp:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t}));r>=1?arraySwap(e.list,r-1,r):arraySwapDeep(e.list,"up",t)}catch(e){console.error(e)}},moveDown:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t}));r>-1&&r<=e.list.length-2?arraySwap(e.list,r+1,r):arraySwapDeep(e.list,"down",t)}catch(e){console.error(e)}},moveTop:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t}));r>-1&&0!==r?arraySwap(e.list,0,r):arraySwapDeep(e.list,"top",t)}catch(e){console.error(e)}},moveBottom:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t})),n=e.list.length-1;r>-1&&r!==n?arraySwap(e.list,n,r):arraySwapDeep(e.list,"bottom",t)}catch(e){console.error(e)}}};function setComActions(e){var t=[],r=[];recursion(_$1.cloneDeep(e),(function(e){var n,i;if(null===(i=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.actions)||void 0===i?void 0:i.length){var o=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:o,element:e,actions:t,events:r})}}));var n=r.filter((function(e){return e}));return{actions:t,events:n}}var eventMutations={addGlobalSource:function(e,t){var r=t.name,n=t.value,i=genID();e.globalSource.push({key:i,name:r,value:n}),De({key:i,name:r,value:n},e.globalVars,e.globalSource,e.list,(function(e){}))},editGlobalSource:function(e,t){var r=this,n=t.key,i=t.value,o=e.globalSource.find((function(e){return e.key==n}));o&&(o.name=t.name,o.value=i,De(o,e.globalVars,e.globalSource,e.list,(function(e,t){r.commit("GoCom/updataSourceForComponent",{cid:e.cid,data:t})})))},delGlobalSource:function(e,t){try{var r=e.globalSource.findIndex((function(e){return e.key===t}));-1!==r&&e.globalSource.splice(r,1)}catch(e){console.error("删除错误",e)}},setSyncFlag:function(e,t){e.syncFlag=t},goUpShareVar:function(e,t){e.shareVariable[t.key]=__assign$1({},t)},addGoRunVar:function(e,t){try{var r=getInteractive(e.list,e.globalConstant,e.sysConst);e.globalVars=r.globalVars,e.eventsComs=r.eventsComs}catch(e){console.warn(e)}},copyGoVar:function(e,t){try{for(var r=t.mapField,n=(r.toString().trim(),e.globalConstant.filter((function(e){return e.mapField.includes(r)}))),i=1,o=0;o<n.length;o++)i++;var a="".concat(r," (").concat(i,")"),s=e.globalConstant.find((function(e){return e.mapField==r}));if(r&&s){var l=_$1.cloneDeep(s);l.mapField=a,e.globalConstant.push(l);var c=getInteractive(e.list,e.globalConstant,e.sysConst);e.globalVars=c.globalVars,e.eventsComs=c.eventsComs}}catch(e){console.warn(e)}},goDelShareVar:function(e,t){delete e.shareVariable[t]},signal:function(e,t){},goSynchroDataAll:function(e,t){e.list=_$1.cloneDeep(t)},goSynchroDataForOption:function(e,t){if(e){var r=t.cid,n=t.value,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&i&&updataAttributeForOption(i,n)}this.commit("GoCom/execute")},goSynchroData:function(e,t){if(e){var r=t.cid,n=t.attr,i=t.value,o=t.attrModel,a=findItemDeep$1(e.list,r);if("boolean"!=typeof a){if(a&&updataAttribute(a,n,i,o),"actions"===n.toLowerCase()){var s=e.list,l=_$1.uniqWith(_$1.concat(setComActions(s).actions,setComActions(e.caseList).actions),_$1.isEqual),c=_$1.uniqWith(_$1.concat(setComActions(s).events,setComActions(e.caseList).events),_$1.isEqual);Ae.addVariables(l),e.globalVars=Ae.getAllVariables(),e.globalEvents=c,e.pages[e.pageIndex]&&(e.pages[e.pageIndex].globalVars=l),e.pages[e.pageIndex]&&(e.pages[e.pageIndex].globalEvents=c)}if("source"===n){if(!a.tmpData.source)return!1;var u=a.tmpData.source,h=u.type;if("api"===h){var d=u[h].url.match(/{{[\w]*}}|(@)[\w]*/gm);if(d)for(var f=d.map((function(e){return e.replace(/{{|}}|@/gm,"")})),p=function(t){var r=f[t];if(!r||!e.globalVars||e.globalVars.findIndex((function(e){return e.mapField===r}))<0)return"continue";if(e.shareVariableTree||(e.shareVariableTree={}),e.shareVariableTree[r]&&_$1.isArray(e.shareVariableTree[r])){e.shareVariableTree[r].push(a.cid);var n=e.shareVariableTree[r];e.shareVariableTree[r]=_$1.uniq(n)}else e.shareVariableTree[r]=[],e.shareVariableTree[r].push(a.cid)},m=0;m<f.length;m++)p(m)}}}}this.commit("GoCom/execute")},goUpdataSysVars:function(e,t){var r={U_CITY:"cityCode",U_COUNTY:"countyCode",U_PROVINCE:"provinceCode",U_PHONE:"userPhone"},n=e.sysConst,i=Object.keys(r);n.map((function(e){if(e.originalValue=e.value,(null==e?void 0:e.name)&&(null==i?void 0:i.includes(e.name))){var n=r[e.name];e.value=t[n],e.originalValue=t[n]}return e})),Ae.addVariables(n)},resetGlobalData:function(e){e.globalVars=e.sysConst,e.globalConstant=[],e.globalSource=[]},updateGlobalRelatedVars:function(e,t){var r=t.run,n=t.gvData;return r.length&&r.forEach((function(e){var t=n.filter((function(t){return t.mapField==e.mapField||t.fork&&t.forkValue==e.mapField}));if(t.length)for(var r=0,i=t;r<i.length;r++){var o=i[r],a=e.value;o.mapField==e.mapField?o.value=a:o.fork&&e.mapField==o.forkValue?(o.converter&&o.converterCode,o.originalValue=a):n.push(e)}})),n}},comTreeMutations={updataList:function(e,t){var r=t.cid,n=produceWithImmer(t.list,(function(e){var t=findItemDeep$1(e,r),n=t.pid,i=getAncestorsNodes(e,r),o=function(e){for(var t=0;t<e.length;t++){var r=e[t];upDataGroup(r,r.baseData,null,!0)}},a=function(e){return e.reduce((function(e,t){return{left:e.left+t.baseData.left,top:e.top+t.baseData.top}}),{left:0,top:0})},s=function(e,t){void 0===t&&(t=e);for(var r=0;r<e.length;r++){var n=e[r];if(n.children&&Array.isArray(n.children))return 0===n.children.length?(t.splice(r,1),!0):(s(n.children,n.children)&&0===n.children.length&&t.splice(r,1),!0)}};if(i.length>0)if(t.pid=i[0].cid,n){var l=__spreadArray$1([findItemDeep$1(e,n)],getAncestorsNodes(e,n),!0),c=a(l),u=a(i);t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,c)),t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,u,1)),o(l),o(i)}else{u=a(i);t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,u,1)),o(i)}n&&0==i.length&&(t.pid="",function(t,r){var n=getAncestorsNodes(e,r),i=findItemDeep$1(e,r);if(0===n.length)t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,i.baseData));else{n=__spreadArray$1([i],n,!0);var s=a(n);t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,s))}o(__spreadArray$1([i],n,!0))}(t,n)),s(e),setIndex(e)}));e.list=n},updataListForContrast:function(e,t){var r=t.cid,n=t.list,i=findItemDeep$1(n,r);findParentDeep(n,r);var o=findParentDeep(e.list,r);if(!i.pid){i.pid=o.cid;var a=_$1.cloneDeep(i.baseData),s=transformPosition(i.baseData,o.baseData,1);Object.assign(i.baseData,s),upDataGroup(o,a)}setIndex(e.list)},updateTree:function(e){for(var t=e.list,r=0;r<t.length;r++){var n=t[r];if(n.pid)(a=findItemDeep$1(t,n.pid))&&Object.assign(n.baseData,transformPosition(n.baseData,a.baseData));if(n.children)for(var i=0;i<n.children.length;i++){var o=n.children[i];if(o.pid!=n.cid){var a=findItemDeep$1(t,o.pid);if(_$1.cloneDeep(o.baseData),a){Object.assign(o.baseData,transformPosition(o.baseData,a.baseData));var s=transformPosition(o.baseData,n.baseData,1);Object.assign(o.baseData,s),upDataGroup(n,n.baseData)}o.pid=n.cid}}}setIndex(t)}},ERR_OK=200,ERR_OK2=2e4,TIMEOUT=3e4,STATUS="status",xhr=function(e,t){void 0===e&&(e="");var r=axios.create({baseURL:e,timeout:TIMEOUT,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}});return r.interceptors.request.use((function(e){return sessionStorage.getItem("anov-go-token")&&"null"!=sessionStorage.getItem("anov-go-token")&&(e.headers["X-ANOV-ACCESS-TOKEN"]=sessionStorage.getItem("anov-go-token")),sessionStorage.getItem("unify-access-token")&&"null"!=sessionStorage.getItem("unify-access-token")&&(e.headers["X-UNIFY-ACCESS-TOKEN"]=sessionStorage.getItem("unify-access-token")),sessionStorage.getItem("dgcc_authorization")&&"null"!=sessionStorage.getItem("dgcc_authorization")&&(e.headers.dgcc_authorization=sessionStorage.getItem("dgcc_authorization")),"post"===e.method?(e.headers["Content-Type"]="application/json;",e):"get"===e.method?e:"put"===e.method?(e.headers["Content-Type"]="application/json; charset=UTF-8",e):"delete"===e.method?e:void 0}),(function(e){return Promise.reject(e)})),r.interceptors.response.use((function(e){return e[STATUS]===ERR_OK||e.data.code,t&&t(e),e.data}),(function(e){return t&&t(null==e?void 0:e.response),Promise.reject(e.response)})),r},Http=function(e,t){return xhr(e,t)},filterData=pe,parseSource=function(e,t,r,n,i,o,a,s){void 0===n&&(n=!0);console.log(t,r,n,i,"callback"),fe(t,n,r,[],(function(e){i(e),("AnContainer"===(null==t?void 0:t.viewComName)&&n||"AnGridLayout"===(null==t?void 0:t.viewComName)&&n)&&UpdataForContainer(t)}),s)},updateComData=function(e,t,r,n,i,o,a){return void 0===r&&(r=!0),__awaiter(void 0,void 0,void 0,(function(){var o;return __generator(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,fe(e,r,t,i,(function(e){n&&n(e)}),a)];case 1:return[2,s.sent()];case 2:return o=s.sent(),n&&n(o),console.log("error:11"+o),[3,3];case 3:return[2]}}))}))},autoUpdateComData=function(e,t,r){var n,i,o,a,s,l=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.source,c=null===(o=null===(i=l[null==l?void 0:l.type])||void 0===i?void 0:i.autoUpdate)||void 0===o?void 0:o.open,u=null===(s=null===(a=l[null==l?void 0:l.type])||void 0===a?void 0:a.autoUpdate)||void 0===s?void 0:s.time;c&&_$1.isNumber(u)&&u>0&&setInterval((function(){updateComData(e,t,!0,(function(t){r({cid:e.cid,data:t})}))}),1e3*u)},refreshData=function(e,t,r,n,i,o){void 0===o&&(o=!0),e&&fe(e,o,t,[],(function(t){r({cid:e.clientWidth,data:t})}))},index$2=Object.freeze({__proto__:null,Http:Http,autoUpdateComData:autoUpdateComData,axios:axios,filterData:filterData,getDataForEvaluator:getDataForEvaluator,parseSource:parseSource,refreshData:refreshData,updateComData:updateComData}),loadFontResource=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,n,i,o;return __generator(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),t=e.fontUrl,r=e.fontName,n="__custom_font__",(i=document.getElementById(n))?[3,2]:((i=document.createElement("style")).id=n,[4,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)]);case 1:a.sent(),a.label=2;case 2:return i.innerText+="@font-face{font-family:'".concat(r,"';src:url(").concat(t,");}"),[3,4];case 3:return o=a.sent(),console.warn(o),[3,4];case 4:return[2]}}))}))},loadScript=function(e,t,r){return void 0===t&&(t="jspaths"),__awaiter(void 0,void 0,void 0,(function(){var n,i;return __generator(this,(function(o){switch(o.label){case 0:return n="csspaths"===t?"link":"script",i=document.createElement(n),"jspaths"===t?i.defer=!0:i.rel="stylesheet",i.className=t,i.src=e,(r||document.head||document.getElementsByTagName("head")[0]).appendChild(i),[4,new Promise((function(e,t){i.addEventListener("load",e),i.addEventListener("error",e)}))];case 1:return o.sent(),[2]}}))}))},addTag=function(e,t){return void 0===t&&(t="jspaths"),__awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(n){switch(n.label){case 0:return r="fonts"===t?loadFontResource:loadScript,[4,Promise.all(e.map((function(e){return r(e)})))];case 1:return n.sent(),[2]}}))}))},loadFont=function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return e.fonts&&e.fonts.length?[4,addTag(e.fonts,"fonts")]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},loadTag=function(e){var t=e.jspaths,r=void 0===t?[]:t,n=e.csspaths,i=void 0===n?[]:n,o=e.fonts,a=void 0===o?[]:o;return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=_$1.uniqBy(a,"fontName"),[4,Promise.all([addTag(r,"jspaths"),addTag(i,"csspaths"),addTag(e,"fonts")])];case 1:return t.sent(),[2]}}))}))},loadFontTag=function(e){var t=e.fonts,r=void 0===t?[]:t;return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=_$1.uniqBy(r,"fontName"),[4,Promise.all([addTag(e,"fonts")])];case 1:return t.sent(),[2]}}))}))},removeTag=function(){removeFont(),Array.from(document.getElementsByTagName("script")).filter((function(e){return"jspaths"==e.className})).forEach((function(e){removeScript(e.src)})),Array.from(document.getElementsByTagName("link")).filter((function(e){return"csspaths"==e.className})).forEach((function(e){removeCss(e.href)}))};function removeScript(e){for(var t,r=Array.from(document.getElementsByTagName("script")),n=0;n<r.length;n++)r[n]&&r[n].src&&-1!=r[n].src.indexOf(e)&&(null===(t=r[n])||void 0===t?void 0:t.parentNode)&&r[n].parentNode.removeChild(r[n])}function removeCss(e){for(var t,r=Array.from(document.getElementsByTagName("link")),n=0;n<r.length;n++)r[n].href,r[n]&&r[n].href&&-1!=r[n].href.indexOf(e)&&(null===(t=r[n])||void 0===t?void 0:t.parentNode)&&r[n].parentNode.removeChild(r[n])}function removeFont(){var e=document.getElementById("__custom_font__");(null==e?void 0:e.parentNode)&&e.parentNode.removeChild(e)}var toolMutations={reset:function(e){e.selectd=[],e.list=[],e.plant=null,e.tw=null,e.watermark=null,e.endnotes=null,e.globalConstant=[]},setFonts:function(e,t){e.resource.fonts.push({fontName:t.name,fontUrl:t.src}),loadFont(e.resource)},setCaseInfo:function(e,t){e.caseInfo=t},setPageId:function(e,t){e.pageId=t},pagePush:function(e,t){try{var r=t.type,n=t.value,i=t.option,o=["name","path","id"];if(!o.includes(r))throw new Error("页面跳转错误!".concat(r," 不是一个正确的参数 请填以下参数 ").concat(o.join(",")));if(!n)throw new Error("页面跳转错误!".concat(r," 不是一个正确的参数 请填正确的页面路径或者页面名称"));e.toPage=i?{type:r,value:n,option:i}:{type:r,value:n}}catch(e){console.warn(e)}},updatComs:function(e,t){var r=this,n=findItemDeep$1(e.list,t);if("boolean"!=typeof n){(null==n?void 0:n.children)&&(null==n||n.children),updateComData(n,e.globalVars,!0,(function(e){r.commit("GoCom/updataSourceForComponent",{cid:n.cid,data:e})}),e.globalSource)}},updatComsForVar:function(e,t){var r=e.globalVars.map((function(e){var r,n;if((null===(r=null==e?void 0:e.forkValue)||void 0===r?void 0:r.length)&&(null===(n=null==e?void 0:e.forkValue)||void 0===n?void 0:n.includes(t))||e.forkValue==t)return e.mapField})).filter((function(e){return e})),n=[t];(null==r?void 0:r.length)&&(n=_$1.uniq(__spreadArray$1([t],r,!0)));for(var i=[],o=0,a=n;o<a.length;o++){var s=a[o];e.shareVariableTree[s]&&i.push.apply(i,e.shareVariableTree[s])}if(null==i?void 0:i.length)for(var l=0,c=i;l<c.length;l++){var u=c[l];this.commit("GoCom/updatComs",u)}},addConstant:function(e,t){var r=_$1.find(e.constant,{name:t.name});r?Object.assign(r,t):e.constant.push(t)},editConstant:function(e,t){var r=_$1.find(e.constant,{name:t.name});r&&Object.assign(r,t)},delConstant:function(e,t){_$1.remove(e.constant,(function(e){return e.name==t}))},setResource:function(e,t){var r=t.type,n=t.value;e.resource[r]=n,removeTag(),loadTag(e.resource)},updataResource:function(e){removeTag(),loadTag(e.resource)},resetResource:function(e){e.resource={jspaths:[],csspaths:[],otherpaths:[]}},setData:function(e,t){e.selectd=t.selectd},setList:function(e,t){e.list=t,setIndex(e.list)},saveDynamicChildren:function(e,t){var r=t.cid,n=t.data,i=t.name,o=e.pages[e.pageIndex].list,a=findItemDeep$1(o,r);a&&(a.activeDynamic=i,a.dynamicChildren instanceof Array&&(a.dynamicChildren=new Map(a.dynamicChildren)),a.dynamicChildren.set(i,n))},setTheme:function(e,t){e.theme=t},setPlant:function(e,t){var r=t.attr,n=t.value;e.plant||(e.plant={name:"",theme:null,baseData:{width:1920,height:1080,left:0,top:0},option:null,optionDes:null}),e.plant[r]=n},setPlantHeight:function(e,t){e.plant&&(e.plant.baseData.height=e.plant.baseData.height+t)},reversal:function(e,t){e.undos=[],e.undoRedoPointer=-1;var r=_$1.cloneDeep(t.globalVars);delete t.globalVars,e=Object.assign(e,t),Ae.addVariables(r),e.globalVars=Ae.getAllVariables(),setIndex(e.list)},setComTmp:function(e,t){var r=e.list.find((function(e){return e.cid===t[0]}));r.com=t[1],r.tmp=t[2]},setLoading:function(e,t){var r=t.cid,n=t.flag,i=e.list.find((function(e){return e.cid===r}));i&&(i.loading=n)},setMultiple:function(e,t){e.multiple=t},setCaseList:function(e,t){e.caseList=t},updataComponentForList:function(e,t){var r=t.cid,n=t.data,i=e.list,o=findItemDeep$1(i,r);"boolean"!=typeof o&&Object.assign(o,n)},updataComponentForCaseList:function(e,t){var r=t.cid,n=t.data,i=e.caseList,o=findItemDeep$1(i,r);"boolean"!=typeof o&&Object.assign(o,n)},updataComponent:function(e,t){var r=t.cid,n=t.data,i=e.pages&&e.pages[0]&&e.pages[0].list&&e.pages[0].list.length?e.pages[0].list:e.list,o=findItemDeep$1(i,r);"boolean"!=typeof o&&Object.assign(o,n)},updataArea:function(e,t){e.currentArea.left+=t.deltaX,e.currentArea.top+=t.deltaY},updataSource:function(e,t){var r=t.cid,n=t.data,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&("indicatorCQ"===i.tmpData.source.type?i.tmpData.source.indicator.data=n:(console.log("更新数据:"+i.cid),i.tmpData.source[i.tmpData.source.type].data=n))},updataSourceForComponent:function(e,t){var r=t.cid,n=t.data;if(e.list.length){var i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.source=_$1.cloneDeep(n))}},updataAnimationForComponent:function(e,t){var r=t.cid,n=t.data;if(e.list.length){var i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.tw=n)}},updataWatermark:function(e,t){e.watermark=t},updataEndnotes:function(e,t){e.endnotes=t},updataAnimation:function(e,t){e.tw=t},setContext:function(e,t){var r=t.cid,n=t.data,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.example=n)},setContextList:function(e,t){var r=t.cid,n=t.data;e.contextList[r]=n},setPosition:function(e,t){setPositionForWorld(e.list.find((function(e){return e.cid===t[0]})),t[1])},setSelect:function(e,t){e.cache=[],e.selectd=t instanceof Array?t:[t],e.selectd.length>1&&e.selectd.forEach((function(t){e.cache.push(e.list.find((function(e){return e.cid===t&&"Other.Plant.Normal"!==e.type})))}))},setActive:function(e,t){var r=_$1.cloneDeep(t),n=r.id,i=r.multiple,o=r.origin,a=r.ctr,s=_$1.cloneDeep(e.selectd);if(i){var l=s.includes(n);if(s.length>=1){var c=s.every((function(r){return isPeer(e.list,r,t.id)}));if(!c)return void console.info("sorry Only sibling elements can be selected!")}l?s.splice(s.findIndex((function(e){return e===n})),1):s.push(n),e.selectd=s}else e.selectd=[n];e.selectd.forEach((function(t){var r=findItemDeep$1(e.list,t);if(r.pid){var n=findItemDeep$1(e.list,r.pid);n&&(n.toggle=!0)}a||(r.toggle=!0)})),e.selectdChangeOrigin=o||""},setCache:function(e){e.cache=[],e.selectd.length>1&&e.selectd.forEach((function(t){e.cache.push(e.list.find((function(e){return e.cid===t})))}))},clearActive:function(e){e.selectd=[]},setMultipleActive:function(e,t){e.selectd=t},syncMenuInfo:function(e){RecursiveList(e.menuList,(function(t){var r=10*t.lv+t.index;e.list.filter((function(e){return e.cid===t.id}))[0].z=1e4-r}))},addComs:function(e,t){var r=t.com,n=t.isMobile;"MultiStateComponent"!=r.componentType||r.stateChildren||(r.stateChildren=[]),"dynamicComponent"!=r.componentType||r.dynamicChildren||(r.dynamicChildren=new Map,r.activeDynamic="状态1",r.dynamicChildren.set("状态1",[]),r.lines={h:[],v:[]},"AnGridLayout"==r.viewComName&&r.dynamicChildren.set("状态1",null==r?void 0:r.AnGridChildren)),n?e.list.push(r):e.list.unshift(r),e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")},addComsForParent:function(e,t){var r=t.com,n=t.isMobile,i=t.PID;if("MultiStateComponent"!=r.componentType||r.stateChildren||(r.stateChildren=[]),"dynamicComponent"!=r.componentType||r.dynamicChildren||(r.dynamicChildren=new Map,r.activeDynamic="状态1",r.dynamicChildren.set("状态1",[])),i){var o=findItemDeep$1(e.list,i);n?(o.children=[],o.children.push(r)):o.children.unshift(r)}else n?e.list.splice(0,1,r):e.list.unshift(r);e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")},addMyComs:function(e,t){var r;try{var n=t.data,i=t.shareVariableTree,o=t.globalVars,a=t.globalEvents;e.globalVars=_$1.uniq(_$1.concat(_$1.cloneDeep(e.globalVars),o)),e.globalEvents=_$1.uniq(_$1.concat(_$1.cloneDeep(e.globalEvents),a));var s=Object.keys(i),l=Object.keys(e.shareVariableTree),c=_$1.difference(s,l);c.length?c.forEach((function(t){e.shareVariableTree[t]=_$1.concat(_$1.cloneDeep(e.shareVariableTree[t]),i[t])})):e.shareVariableTree=Object.assign(_$1.cloneDeep(e.shareVariableTree),i),n instanceof Array?(resetID(n),(r=e.list).unshift.apply(r,n)):(resetID([n]),e.list.unshift(n)),e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")}catch(e){}},addStateChildren:function(e,t){var r=findItemDeep$1(e.list,t.pid);r&&r.stateChildren.push(t)},addDynamicChildren:function(e,t){var r=findItemDeep$1(e.list,t.pid);r&&r.dynamicChildren.push(t)},arraySwap:function(e,t){var r;try{if(!t||2!=t.length)throw new Error("参数错误,方法接受两个组件的CID组成的数组!");var n=_$1.cloneDeep(e.list),i=findItemDeep$1(n,t[0]),o=findItemDeep$1(n,t[1]),a=findItemDeep$1(n,i.pid),s={},l=0,c=0;if(o)if("selectContainer"==o.componentType){var u=findItemDeep$1(n,t[1]);a?(l=_$1.findIndex(a.children,(function(e){return e.cid==t[0]})),s=a.children[l],a.children=a.children.filter((function(e){return e.cid!==s.cid}))):(s=findItemDeep$1(n,t[0]),n=n.filter((function(e){return e.cid!==s.cid}))),s.cid=genID(),s.pid=u.cid,u.children.push(s)}else if(i.pid||o.pid)if(a)if(l=_$1.findIndex(a.children,(function(e){return e.cid==t[0]})),s=a.children[l],i.pid!==o.pid){u=findItemDeep$1(n,o.pid);c=_$1.findIndex(u.children,(function(e){return e.cid==t[1]}));h=u.children[c];s.cid=genID(),s.pid=u.cid,h.cid=genID(),h.pid=a.cid,a.children.splice(l,1,h),u.children.splice(c,1,s)}else c=_$1.findIndex(a.children,(function(e){return e.cid==t[1]})),(r=a.children).splice.apply(r,__spreadArray$1([c,1],a.children.splice(l,1,a.children[c]),!1));else{var u=findItemDeep$1(n,o.pid);l=_$1.findIndex(n,(function(e){return e.cid==t[0]})),c=_$1.findIndex(u.children,(function(e){return e.cid==t[1]})),s=findItemDeep$1(n,i.cid);var h=u.children[c];s.cid=genID(),s.pid=u.cid,h.cid=genID(),h.pid=null,n.splice(l,1,h),u.children.splice(c,1,s)}else arraySwapForId(e.list,t[0],t[1]);else l=_$1.findIndex(a.children,(function(e){return e.cid==t[0]})),s=a.children[l],a.children.splice(l,1),s.cid=genID(),s.pid=null,n.push(s);e.list=n,setIndex(e.list)}catch(e){console.warn("组件位置交换发生错误",e)}},changeDynamicState:function(e,t){var r=findItemDeep$1(e.list,t.cid);r&&"dynamicComponent"==r.componentType&&(r.dynamicChildren instanceof Array&&r.dynamicChildren.find((function(e){return e[0]==t.activeName}))||r.dynamicChildren instanceof Map&&r.dynamicChildren.has(t.activeName)?r.activeDynamic=t.activeName:console.error(t.activeName+"不是一个正确的状态"))},addAlternateData:function(e,t){e.alternateData[t.pid]||(e.alternateData[t.pid]=[]),e.alternateData[t.pid].push(t)},setOptionForCom:function(e,t){var r;try{var n=t.cid,i=t.key,o=t.value,a=findItemDeep$1(e.list,n);if(!a)return;if("string"!=typeof i)return void console.error("key:[".concat(i,"]格式错误"));var s=null===(r=null==a?void 0:a.tmpData)||void 0===r?void 0:r.option,l=i.split(".");s&&(null==l?void 0:l.length)&&l.forEach((function(e,t){s.hasOwnProperty(e)&&(t===l.length-1?s[e]=o:s=s[e])}))}catch(e){console.warn("同步属性发生错误:"+e)}},mergeConfig:function(e,t){t.length>0&&t.forEach((function(t){e.list.unshift(t)})),e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")},updataName:function(e,t){var r=findItemDeep$1(e.list,t.cid);r&&(r.name=t.name)},setDynamicActive:function(e,t){t.cid;var r=t.name,n=findItemDeep$1(e.list,t.cid);n&&"dynamicComponent"==n.componentType&&(n.activeDynamic=r)},updataScroll:function(e,t){t.cid;var r=t.data,n=findItemDeep$1(e.list,t.cid);n&&"dynamicComponent"==n.componentType&&(n.srcollInfo={use:!!(null==r?void 0:r.use)&&(null==r?void 0:r.use),data:(null==r?void 0:r.data)?null==r?void 0:r.data:null})},updataDySetting:function(e,t){t.cid;var r=t.data,n=findItemDeep$1(e.list,t.cid);n&&"dynamicComponent"==n.componentType&&(n.dyOption=r)},setCurrentEdited:function(e,t){if(t){var r=findItemDeep$1(e.list,t);if("boolean"!=typeof r){var n=breakUp(r);r.children=n}e.currentEditerCid=t}else e.currentEditerCid=""},setDynamicLine:function(e,t){var r=_$1.cloneDeep(e.list),n=findItemDeep$1(r,t.cid);r.length&&"boolean"!=typeof n&&(n.lines=Object.assign({},n.lines,t.lines)),e.list=r}},findArray=function(e,t){try{var r=e.map((function(e){var r=findItemDeep$1(t,e);if("object"==typeof r)return r;throw"Please check whether the input and output parameters are correct!"}));if(_$1.every(r,Object))return r;throw"Please check whether the input and output parameters are correct!"}catch(e){return console.error(e),[]}},alignLeft=function(e,t){1===e.length&&(e[0].baseData.left=0);var r=_$1.sortBy(e,(function(e){return e.baseData.left})),n=r[0].baseData.left;e.map((function(e){return e.baseData.left=n}))},alignRight=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.left=r.width-e[0].baseData.width}var n=_$1.sortBy(e,(function(e){return e.baseData.left})),i=1*n[n.length-1].baseData.left+1*n[n.length-1].baseData.width;e.map((function(e){return e.baseData.left=i-1*e.baseData.width}))},horizontally=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.left=r.width/2-e[0].baseData.width/2}var n=_$1.sortBy(e,(function(e){return e.baseData.left})),i=_$1.sortBy(e,(function(e){return 1*e.baseData.left+1*e.baseData.width})),o=(1*n[0].baseData.left+(1*i[i.length-1].baseData.left+1*i[i.length-1].baseData.width))/2;e.map((function(e){return e.baseData.left=o-e.baseData.width/2}))},alignTop=function(e,t){1===e.length&&(e[0].baseData.top=0);var r=_$1.sortBy(e,(function(e){return e.baseData.top})),n=1*r[0].baseData.top;e.map((function(e){return e.baseData.top=n}))},alignBottom=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.top=r.height-e[0].baseData.height}var n=_$1.sortBy(e,(function(e){return 1*e.baseData.top})),i=1*n[n.length-1].baseData.top+1*n[n.length-1].baseData.height;e.map((function(e){return e.baseData.top=i-1*e.baseData.height}))},verticalCenter=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.top=r.height/2-e[0].baseData.height/2}var n=_$1.sortBy(e,(function(e){return e.baseData.top})),i=_$1.sortBy(e,(function(e){return 1*e.baseData.top+1*e.baseData.height})),o=(1*n[0].baseData.top+(1*i[i.length-1].baseData.top+1*i[i.length-1].baseData.height))/2;e.map((function(e){return e.baseData.top=o-e.baseData.height/2}))},topDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.top})),r=(t[t.length-1].baseData.top-t[0].baseData.top)/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.top=1*t[0].baseData.top+r*n)}))},bottomDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.top+e.baseData.height})),r=(t[t.length-1].baseData.top+t[t.length-1].baseData.height-(t[0].baseData.top+t[0].baseData.height))/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.top=1*t[0].baseData.top+1*t[0].baseData.height-1*e.baseData.height+r*n)}))},xCenterDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.left+e.baseData.width/2})),r=1*t[t.length-1].baseData.left+t[t.length-1].baseData.width/2,n=1*t[0].baseData.left+t[0].baseData.width/2,i=(r-n)/(t.length-1);t.map((function(e,r){r>0&&r<t.length-1&&(e.baseData.left=n-e.baseData.width/2+i*r)}))},leftDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.left})),r=(t[t.length-1].baseData.left-t[0].baseData.left)/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.left=t[0].baseData.left+r*n)}))},rightDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.left+e.baseData.width})),r=(t[t.length-1].baseData.left+t[t.length-1].baseData.width-(t[0].baseData.left+t[0].baseData.width))/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.left=t[0].baseData.left+t[0].baseData.width-e.baseData.width+r*n)}))},yCenterDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.top+e.baseData.height/2})),r=1*t[t.length-1].baseData.top+t[t.length-1].baseData.height/2,n=1*t[0].baseData.top+t[0].baseData.height/2,i=(r-n)/(t.length-1);t.map((function(e,r){r>0&&r<t.length-1&&(e.baseData.top=n-e.baseData.height/2+i*r)}))},layoutMutations={layout:function(e,t){var r=findArray(e.selectd,e.list);switch(t){case"alignLeft":alignLeft(r);break;case"alignRight":alignRight(r,e);break;case"horizontally":horizontally(r,e);break;case"alignTop":alignTop(r);break;case"alignBottom":alignBottom(r,e);break;case"verticalCenter":verticalCenter(r,e);break;case"topDistribution":topDistribution(r);break;case"bottomDistribution":bottomDistribution(r);break;case"xCenterDistribution":xCenterDistribution(r);break;case"leftDistribution":leftDistribution(r);break;case"rightDistribution":rightDistribution(r);break;case"yCenterDistribution":yCenterDistribution(r)}}},pages={setPageData:function(e,t){e.pages[0]=t},parasePages:function(e,t){t instanceof Array&&(e.pages=t.map((function(e,t){return e.name||(e.name="页面"+(t+1)),e.path||(e.path="page"+(t+1)),e})))},addPage:function(e,t){var r=e.pages.length+1;t.name="页面"+r,t.path="page"+r,e.pages.push(t),e.pageIndex=e.pages.length-1,e.resource={jspaths:[],csspaths:[],otherpaths:[]},e.globalVars=e.sysConst},setCurrentPageIndex:function(e,t){var r=e.globalEvents,n=e.globalVars,i=e.list,o=e.name,a=e.theme,s=e.plant,l=e.shareVariableTree,c=e.resource;e.pages[e.pageIndex]={globalEvents:r,globalVars:n,list:i,name:o,theme:a,plant:s,shareVariableTree:l,resource:c},e.pageIndex=t},setPageDataForIndex:function(e,t){var r=t.index,n=t.data;e.pages[r]=n},setPageName:function(e,t){e.name=t,e.pages[e.pageIndex].name=t},saveCurrentPageData:function(e){var t=e.globalEvents,r=e.globalVars,n=void 0===r?[]:r,i=e.list,o=e.name,a=e.theme,s=e.plant,l=e.shareVariableTree,c=e.resource;e.pages[e.pageIndex]={globalEvents:t,globalVars:n,list:i,name:o,theme:a,plant:s,shareVariableTree:l,resource:c}},getCurrentPageData:function(e){var t=e.globalEvents,r=e.globalVars,n=e.list,i=e.name,o=e.theme,a=e.plant,s=e.shareVariableTree,l=e.resource;e.pages[e.pageIndex]={globalEvents:t,globalVars:r,list:n,name:i,theme:o,plant:a,shareVariableTree:s,resource:l}}},containerMutaitons={segmentationContainer:function(e,t){var r=_$1.cloneDeep(e.list),n=t.containerData,i=t.direction,o=[];if("del"==i)if(n.pid){var a=findItemDeep$1(r,n.pid),s=a.children.length;if(a)if(s<=2)(o=a.children.filter((function(e){return e.cid!==n.cid&&e.children.length}))).length?(a.direction=o[0].direction,a.children=o[0].children.map((function(e){return e.pid=a.pid||a.cid,e}))):a.children=[];else{var l=a.children.find((function(e){return e.cid===n.cid})),c=a.children.findIndex((function(e){return e.cid===n.cid}));a.children=a.children.filter((function(e){return e.cid!==n.cid}));var u=a.children[c>=a.children.length-1?a.children.length-1:c],h="col"==a.direction?"height":"width";u.baseData[h]=(parseFloat(u.baseData[h])+parseFloat(l.baseData[h])).toFixed(2)+"%"}}else r.length&&(r=r.filter((function(e){return e.cid!==n.cid})));else{var d=findItemDeep$1(r,n.cid);if(d){d.direction=i,1===d.children.length&&(o=d.children,d.children=[]);for(var f=(s=d.children.length)>=2?1:2,p=(h=s>=2?(100/(s+1)).toFixed(2)+"%":"50%",0);p<f;p++)d.children.push({isLock:!1,isShow:!0,baseData:{width:"col"==i?"100%":h,height:"col"==i?h:"100%",angle:0,penetrate:0,opacity:100},direction:i,componentType:"selectContainer",iconClass:"__vue_devtool_undefined__",isAssembly:"__vue_devtool_undefined__",source:[],comData:{actions:[],option:{grid:[{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"}],bgColor:{alpha:1,blue:0,green:0,red:0,flag:1,style:"transparent"},imgOpt:"",bgScaleOpt:3,borderRadius:[{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"}],margins:[{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"}]}},tmpData:{},dynamic:0,filePath:"/anov-prod/mgt/go/assembly/162-bgImage.png",origin:"anov-go",name:"容器组件",path:"/index.js",viewComName:"selectContainer",optionComName:"",dataComName:"",eventComName:"",assemblyDeveloper:"",devEmail:"",version:null,devDept:"",toggle:!0,cid:genID(),pid:d.cid,nestIndex:0,children:[],isTop:!1,isCol:"col"==i,isRow:"col"!=i,isDragged:!1,grandParentId:n.pid});o.length&&(o[0].cid=genID(),o[0].pid=d.children[0].cid,d.children[0].children=o)}}e.list=r,0==r.length&&(e.selectd=[])}},shareCom={goEditShareCom:function(e,t){var r=t.name,n=t.mapping;e.shareComs||(e.shareComs=new Map),e.shareComs.set(r,n)},delShareCom:function(e,t){var r=t.key;e.shareComs&&e.shareComs.has(r)&&e.shareComs.delete(r)}},globalVars={mutation:{addGoVar:function(e,t){try{Ae.addVariable(t,(function(){e.globalVars=Ae.getAllVariables()}))}catch(e){console.warn(e)}},delGoVar:function(e,t){try{var r=t.mapField;console.log(r,"mapFieldmapField"),Ae.delVariable(r,(function(){e.globalVars=Ae.getAllVariables()}))}catch(e){console.warn(e)}},editGoVar:function(e,t){var r=this;try{Ae.editVariable(t,(function(n){e.globalVars=Ae.getAllVariables(),we(e.globalSource,t.mapField,e.globalVars,e.list,(function(e){r.commit("GoCom/updatComs",e.cid)})),(null==t?void 0:t.delayUpdate)||r.commit("GoCom/updatComsForVar",t.mapField)}))}catch(e){console.warn(e)}},goEditVar:function(e,t){var r=t.key,n=t.value,i=e.globalVars.find((function(e){return e.mapField==r}));i&&(i.originalValue=n,i.update=!0,this.commit("GoCom/editGoVar",i))},goUpdataSysVars:function(e,t){var r={U_CITY:"cityCode",U_COUNTY:"countyCode",U_PROVINCE:"provinceCode",U_PHONE:"userPhone"},n=e.sysConst,i=Object.keys(r);n.map((function(e){if(e.originalValue=e.value,(null==e?void 0:e.name)&&(null==i?void 0:i.includes(e.name))){var n=r[e.name];e.value=t[n],e.originalValue=t[n]}return e})),Ae.addVariables(n)},updateGlobalVars:function(e,t){e.globalVars=t},updataVariables:function(e){e.globalVars=Ae.getAllVariables()}},actions:{updateGlobalVarsAction:function(e){(0,e.commit)("updateGlobalVars",Ae.getAllVariables())},goEditVar:function(e,t){(0,e.commit)("editGoVar",{mapField:t.key,originalValue:t.value})}}},mutations=__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1({},UndoRedo),baseDataMutaitons),rightMenuMutaitons),eventMutations),comTreeMutations),toolMutations),layoutMutations),pages),containerMutaitons),shareCom),globalVars.mutation),actions=__assign$1({updataList:function(e,t){var r=e.commit;t&&r("updataList",t),r("updateTree")},updataBaseData:function(e,t){var r=e.commit;t&&r("updataBaseData",t)},setActive:function(e,t){var r=e.commit;t&&r("setActive",t)},setSyncFlag:function(e,t){var r=e.commit;t&&r("setSyncFlag",t)},execute:function(e,t){var r=e.commit;t&&r("execute",t)},updataAnimationForComponent:function(e,t){var r=e.commit;t&&r("updataAnimationForComponent",t)},updataAnimation:function(e,t){(0,e.commit)("updataAnimation",t)},setOptionForCom:function(e,t){(0,e.commit)("setOptionForCom",t)},updatComs:function(e,t){var r=e.commit;setTimeout((function(){r("updatComs",t)}))},updatComsForVar:function(e,t){var r=e.dispatch,n=e.state,i=n.globalVars.map((function(e){var r,n;if((null===(r=null==e?void 0:e.forkValue)||void 0===r?void 0:r.length)&&(null===(n=null==e?void 0:e.forkValue)||void 0===n?void 0:n.includes(t))||e.forkValue==t)return e.mapField})).filter((function(e){return e})),o=[t];(null==i?void 0:i.length)&&(o=_$1.uniq(__spreadArray$1([t],i,!0)));for(var a=[],s=0,l=o;s<l.length;s++){var c=l[s];n.shareVariableTree[c]&&a.push.apply(a,n.shareVariableTree[c])}if(null==a?void 0:a.length)for(var u=0,h=a;u<h.length;u++){r("updatComs",h[u])}},goEditShareCom:function(e,t){var r=e.commit;e.state,r("goEditShareCom",t)},delShareCom:function(e,t){var r=e.commit;e.state,r("delShareCom",t)},updataSource:function(e,t){var r=e.commit;e.state,r("updataSource",t)}},globalVars.actions),getters={getCurrentPage:function(e){return e.pages.length?e.pages[e.pageIndex]:[]},globalSourceTree:function(e){if(e.list.length&&e.globalSource.length){var t=[];return recursion(_$1.cloneDeep(e.list),(function(e){var r,n,i;if("globalData"==(null===(n=null===(r=null==e?void 0:e.tmpData)||void 0===r?void 0:r.source)||void 0===n?void 0:n.type)){var o=null===(i=null==e?void 0:e.tmpData)||void 0===i?void 0:i.source.globalData;t.push({name:e.name,cid:e.cid,sourceId:o.id,viewComName:e.viewComName})}})),t}return[]}},store={namespaced:!0,state:state,mutations:mutations,actions:actions,getters:getters},VueServer=function(){function e(){}return e.setAppStore=function(t){e.store=t},e.prototype.getState=function(){return e.store.state[e.storeModule]},e.prototype.mapState=function(t){return mapState(e.storeModule,t)},e.prototype.mapGetters=function(t){return mapGetters(e.storeModule,t)},e.prototype.mapMutations=function(t){return mapMutations(e.storeModule,t)},e.prototype.callState=function(t){return e.store.state[e.storeModule][t]},e.prototype.callGetter=function(t,r){return e.store.getters[e.storeModule+"/"+t]},e.prototype.callMutation=function(t,r,n){n?e.store.commit(e.storeModule+"/"+t,r,!0):e.store.commit(e.storeModule+"/"+t,r)},e.prototype.callAction=function(t,r){e.store.dispatch(e.storeModule+"/"+t,r)},e.storeModule="GoCom",e}(),mapState=normalizeNamespace((function(e,t){var r;return normalizeMap(t).forEach((function(t){var n=t.key,i=t.val;r[n]=function(){var t=this.$store.state,r=this.$store.getters;if(e){var n=getModuleByNamespace(this.$store,"mapState",e);if(!n)return;t=n.context.state,r=n.context.getters}return"function"==typeof i?i.call(this,t,r):t[i]},r[n].VuexServer=!0})),r})),mapMutations=normalizeNamespace((function(e,t){var r;return normalizeMap(t).forEach((function(t){var n=t.key,i=t.val;r[n]=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=this.$store.commit;if(e){var o=getModuleByNamespace(this.$store,"mapMutations",e);if(!o)return;n=o.context.commit}return"function"==typeof i?i.apply(this,[n].concat(t)):n.apply(this.$store,[i].concat(t))}})),r})),mapGetters=normalizeNamespace((function(e,t){var r={};return normalizeMap(t).forEach((function(t){var n=t.key,i=t.val;i=e+i,r[n]=function(){if(!e||getModuleByNamespace(this.$store,"mapGetters",e)){if("production"===process.env.NODE_ENV||i in this.$store.getters)return this.$store.getters[i];console.error("[VuexServer] unknown getter: ".concat(i))}},r[n].VuexServer=!0})),r}));function normalizeMap(e){return Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}}))}function normalizeNamespace(e){return function(t,r){return"string"!=typeof t?(r=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,r)}}function getModuleByNamespace(e,t,r){var n=e._modulesNamespaceMap[r];return"production"===process.env.NODE_ENV||n||console.error("[VuexServer] module namespace not found in ".concat(t,"(): ").concat(r)),n}var GoComponent=function(){function e(e){var t=this;if(this.isLock=!1,this.isShow=!0,this.baseData={left:0,top:0,width:300,height:200,angle:0,opacity:100,rotate:0,rotateY:0},this.componentType="BaseComponent",this.cid=genID(),e){Object.keys(e).forEach((function(r){t[r]=e[r]}));["AnEchartsMap","AnMaptalks","AnEchartsMap1","AnArcgisMapBase","AnAMap1","AnCesium","AnThreeMap3DChina","AnThreeMapForCesium","AnThreeMap","AnGisMap","AnMineMap","MineMapMarkerLayer","MineMapClusterLayer","AnChina3D","AncsAnovGis"].includes(e.viewComName)&&(this.componentType="MultiStateComponent"),"AnDynamic"!==e.viewComName&&"AmDynamic"!==e.viewComName&&"AnContainer"!==e.viewComName&&"AnGridLayout"!==e.viewComName||(this.componentType="dynamicComponent")}}return e.prototype.setIndex=function(e){this.z=e},e}(),Load=function(){function e(e){this.vueServer=e,this.loadScript=loadScript}return e.setStore=function(e){this.store=e},e.prototype.loadComponents=function(e){var t=e&&e.list?e.list:[];recursion(t,(function(e){e.viewComName&&(e&&e.path&&e.path,e.origin,e.viewComName?e.viewComName:e.rawData.viewComName)})),e&&this.vueServer.callMutation("reversal",_$1.cloneDeep(e))},e.prototype.addStore=function(e){this.vueServer.callMutation("setActive",{id:e}),this.vueServer.callMutation("addComs",this)},e.prototype._addPlantStore=function(){this.vueServer.callMutation("setPlant",this)},e.prototype._loadComTmp=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,i=this;return __generator(this,(function(o){switch(o.label){case 0:if(window[t])return[3,5];r=function(t){var r;return __generator(this,(function(n){switch(n.label){case 0:return r=e[t],[4,new Promise((function(e){e(i._load(r))}))];case 1:return n.sent(),[2]}}))},n=0,o.label=1;case 1:return n<e.length?[5,r(n)]:[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:window[t]=t,o.label=5;case 5:return[2]}}))}))},e.prototype._load=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(r){return[2,new Promise((function(r){r(t.loadScript(e))}))]}))}))},e}(),IndexedDB=function(){function e(e){var t=e.dbName,r=e.tables,n=e.version,i=void 0===n?1:n,o=__rest(e,["dbName","tables","version"]);this.dbName=t,this.tables=r,this.version=i,this.openDB(__assign$1({dbName:t,tables:r,version:i},o))}return e.deleteDB=function(e){var t;null===(t=window.indexedDB)||void 0===t||t.deleteDatabase(e)},e.prototype.deleteItem=function(e,t,r){var n=this.storage.transaction(e,"readwrite").objectStore(e).delete(t);return n.onsuccess=function(e){"function"==typeof r&&r(e)},n},e.prototype.getItem=function(e,t,r){var n=this.storage.transaction(e,"readwrite").objectStore(e),i=null;return(i=t?n.get(t):n.getAll()).onsuccess=function(e){var t;"function"==typeof r&&r(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.result)},i.onerror=function(e){console.error(e),r(e)},i},e.prototype.setItem=function(e,t,r,n){var i=this.storage.transaction(e,"readwrite").objectStore(e).put(r,t);return i.onsuccess=function(e){"function"==typeof n&&n(e)},i.onerror=function(e){"function"==typeof n&&n(e)},i},e.prototype.get=function(e,t){return this.getItem(this.tables[0],e,t)},e.prototype.set=function(e,t,r){return this.setItem(this.tables[0],e,t,r)},e.prototype.delete=function(e,t){return this.deleteItem(this.tables[0],e,t)},e.prototype.clear=function(e,t){var r=this.storage.transaction(this.dbName,"readwrite").objectStore(e).clear();return r.onsuccess=function(e){"function"==typeof t&&t(e)},r},e.prototype.getDB=function(){return this.storage},e.prototype.closeDB=function(){this.storage.close()},e.prototype.openDB=function(e){var t=this,r=e.dbName,n=e.tables,i=e.version,o=e.callback,a=window.indexedDB;if(a)if((null==n?void 0:n.length)<1)console.error("表名不能为空");else{var s=a.open(r,i);s.onerror=function(e){var t,r;console.error("打开数据库失败: ".concat(null===(r=null===(t=e.currentTarget)||void 0===t?void 0:t.error)||void 0===r?void 0:r.message)),"function"==typeof o&&o(e)},s.onsuccess=function(e){var r;t.storage=null===(r=e.target)||void 0===r?void 0:r.result,"function"==typeof o&&o(e)},s.onupgradeneeded=function(e){var r;t.storage=null===(r=e.target)||void 0===r?void 0:r.result,n.forEach((function(r){t.storage.objectStoreNames.contains(r)||(t.storage.createObjectStore(r),"function"==typeof o&&o(e))}))}}else console.error("你的浏览器不支持indexedDB")},e}(),Go=function(){function e(){this.VueServer=new VueServer}return e.getInstance=function(){return this.instance||(this.db=new IndexedDB({dbName:"AnovGo",tables:["logs"]}),this.instance=new e),this.instance},e.prototype.getAppStore=function(){return e.store},e.setAppStore=function(t){e.store=t,VueServer.setAppStore(t),Load.setStore(t)},e.prototype.add=function(e,t,r){t.MultiState?this.VueServer.callMutation("addStateChildren",t):(this.VueServer.callMutation("addComs",{com:t,isMobile:r}),this.VueServer.callMutation("setActive",{id:e}))},e.prototype.addForParent=function(e,t,r,n){this.VueServer.callMutation("addComsForParent",{com:t,PID:r,isMobile:n}),this.VueServer.callMutation("setActive",{id:e})},e.prototype.render=function(e,t){var r=new GoComponent(e);t?this.add(r.cid,r,!0):this.add(r.cid,r)},e.prototype.renderForParent=function(e,t,r){var n=new GoComponent(e);void 0!==r?this.addForParent(n.cid,n,t,r):this.addForParent(n.cid,n,t)},e.prototype.reversal=function(e){new Load(new VueServer).loadComponents(e)},e.prototype.emitEvent=function(e,t){var r=this,n=this.VueServer.callState("globalEvents"),i=this.VueServer.callState("globalVars"),o=this.VueServer.callState("shareVariableTree"),a=this.VueServer.callState("globalSource");this.VueServer.callState("globalConstant");var s=this.VueServer.callState("list");Oe(n,i,o,s,e,(function(e){r.VueServer.callMutation("changeShow",e)}),(function(e){r.VueServer.callMutation("updataSourceForComponent",e)}),t,a)},e}(),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))__hasOwnProp.call(t,r)&&__defNormalProp(e,r,t[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))__propIsEnum.call(t,r)&&__defNormalProp(e,r,t[r]);return e},__publicField=(e,t,r)=>(__defNormalProp(e,"symbol"!=typeof t?t+"":t,r),r),__async=(e,t,r)=>new Promise(((n,i)=>{var o=e=>{try{s(r.next(e))}catch(e){i(e)}},a=e=>{try{s(r.throw(e))}catch(e){i(e)}},s=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,a);s((r=r.apply(e,t)).next())})),defaultOptions={gapX:100,gapY:100,offsetLeft:0,offsetTop:0,width:120,height:64,opacity:.15,rotate:-22,fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"300",fontColor:"#000",fontFamily:"sans-serif",textAlign:"center",textBaseline:"alphabetic",monitor:!0,zIndex:9999,mode:"interval",pack:!0,blindFontSize:16,blindOpacity:.005},attributeNameTag="data-watermark-tag",observeOptions={childList:!0,subtree:!0,attributeFilter:["style","class",attributeNameTag]};function getMutationObserver(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function getDataSetKey(e){return e.split("-").slice(1).reduce(((e,t,r)=>0===r?t:`${e}${t[0].toUpperCase()+t.slice(1)}`))}var getStyleStr=e=>{let t="";return Object.keys(e).forEach((r=>{const n=r.replace(/([A-Z])/g,"-$1").toLowerCase();t+=`${n}:${e[r]};`})),t},encrypt=e=>window.btoa(decodeURI(encodeURIComponent(e))),getRandomId=(e="")=>`${encrypt(e)}-${(new Date).getTime()}-${Math.floor(Math.random()*Math.pow(10,8))}`,getContainer=(e,t,r={},n)=>{let i;if("string"==typeof e){if(i=document.getElementById(e),!i)throw new Error(`水印挂载节点未找到,请检查#${e}是否存在`)}else i=null!=e?e:document.body;i.setAttribute(attributeNameTag,t);const o=__spreadValues({position:"relative"},r);return n||delete o.position,i.setAttribute("style",getStyleStr(o)),i},getContent=e=>{const t=document.createElement("div");return t.setAttribute("style",getStyleStr({pointerEvents:"none"})),t.setAttribute(attributeNameTag,e),t};function getDrawPattern(e){const{text:t,gapX:r,gapY:n,offsetTop:i,offsetLeft:o,width:a,height:s,rotate:l,opacity:c,fontSize:u,fontStyle:h,fontVariant:d,fontWeight:f,fontFamily:p,fontColor:m,textAlign:g,textBaseline:v,image:y,blindText:_,blindFontSize:b,blindOpacity:w}=e;return new Promise(((e,D)=>{const x=document.createElement("canvas"),S=x.getContext("2d"),k=1*(Number(r)+Number(a)),T=1*(Number(n)+Number(s)),P=Number(o)||Number(r)/2,E=Number(i)||Number(n)/2;if(x.setAttribute("width",`${k}px`),x.setAttribute("height",`${T}px`),S){const r=1*a,n=1*s;if(S.translate(1*P,1*E),S.rotate(Math.PI/180*Number(l)),_&&(S.globalAlpha=w,S.font=`${b}px normal`,S.fillText(_,0,0)),S.globalAlpha=c,y){const t=new Image;return t.crossOrigin="anonymous",t.referrerPolicy="no-referrer",t.src=y,void(t.onload=()=>{S.drawImage(t,0,0,r,n),e({url:S.canvas.toDataURL(),width:k,height:T})})}const i=Array.isArray(t)?t:[t],o=i.map((e=>S.measureText(e).width)),h=Math.max(...o),d=1*Number(u);S.textAlign=g,S.textBaseline=v,S.fillStyle=m,S.font=A(`${d}px`),h>a&&(S.font=A(d/2+"px"));const f=d+5;let p=(n-(u*i.length+5*(i.length-1)))/2;p=p<0?0:p;for(let e=0;e<i.length;e++)S.fillText(i[e]||"",r/2,p+f*e);e({url:S.canvas.toDataURL(),width:k,height:T})}function A(e){return`${h} ${d} ${f} ${e} ${p}`}return D()}))}var MutationObserver=getMutationObserver(),Watermark=class{constructor(e={}){__publicField(this,"options"),__publicField(this,"container"),__publicField(this,"watermarkContent"),__publicField(this,"watermarkDom"),__publicField(this,"style"),__publicField(this,"watermarkTag"),__publicField(this,"shadowRoot"),__publicField(this,"mutationObserver"),__publicField(this,"_isAgainRender",(e=>{if("attributes"===e.type){if(e.attributeName===attributeNameTag)return!0;if(this.watermarkTag===this._getNodeRandomId(e.target))return!0}return!(!e.removedNodes.length||this.watermarkTag!==this._getNodeRandomId(e.removedNodes[0]))})),__publicField(this,"_getNodeRandomId",(e=>{var t;return null==(t=null==e?void 0:e.dataset)?void 0:t[getDataSetKey(attributeNameTag)]})),__publicField(this,"_destroyMutationObserver",(()=>{this.mutationObserver&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.mutationObserver=null)})),__publicField(this,"_getWatermarkDom",(e=>__async(this,null,(function*(){this.watermarkDom||(this.watermarkDom=document.createElement("div")),"number"==typeof e&&e&&(this.style.height=`${e}px`);const t=yield getDrawPattern(this.options);if(null==t?void 0:t.url){const e=t.url;"repeat"===this.options.mode?this.style.backgroundImage=`url(${e})`:(this.style.backgroundImage=`url(${e}), url(${e})`,this.style.backgroundRepeat="repeat, repeat",this.style.backgroundPosition=`${t.width/2}px ${t.height/2}px, 0 0`),this.options.container||(this.style.position="fixed",this.style.height=void 0),this.watermarkDom.setAttribute("style",getStyleStr(this.style))}return this.watermarkDom.setAttribute(attributeNameTag,this.watermarkTag),this.watermarkDom})))),__publicField(this,"_getWatermarkHeight",(()=>{if(!this.container)return 0;let e=0;const{scrollHeight:t=0,clientHeight:r=0}=this.options.container?this.container.parentNode:this.container;return t>r&&(e=Math.max(t,r)),e})),this.options=Object.assign({},defaultOptions,e),this.style={position:"absolute",left:0,top:0,right:0,bottom:0,pointerEvents:"none",overflow:"hidden",backgroundColor:"transparent",backgroundRepeat:"repeat"},this.style.zIndex=this.options.zIndex,this.watermarkTag=getRandomId("watermark"),this.mutationObserver=null,this._render()}update(e={}){this.options=__spreadValues(__spreadValues({},this.options),e),this.style.zIndex=this.options.zIndex,this._render()}show(){this.watermarkDom&&(this.style.display="block",this.watermarkDom.setAttribute("style",getStyleStr(this.style)))}hide(){this.watermarkDom&&(this.style.display="none",this.watermarkDom.setAttribute("style",getStyleStr(this.style)))}destroy(){this.shadowRoot=void 0,this.watermarkContent&&(this.watermarkContent.remove(),this.watermarkContent=void 0),this.watermarkDom&&(this.watermarkDom.remove(),this.watermarkDom=void 0),this._destroyMutationObserver()}_render(){return __async(this,null,(function*(){this._destroyMutationObserver(),this.container=getContainer(this.options.container,this.watermarkTag,this.options.containerStyle,this.options.pack),this.watermarkContent||(this.watermarkContent=getContent(this.watermarkTag),this.container.append(this.watermarkContent));const e=this._getWatermarkHeight();if(this.watermarkDom=yield this._getWatermarkDom(e),this.watermarkContent){const e=this.watermarkContent.childNodes||[];for(let t=0;t<e.length;t++)this.watermarkContent.removeChild(e[t])}"function"==typeof this.watermarkContent.attachShadow?this.shadowRoot||(this.shadowRoot=this.watermarkContent.attachShadow({mode:"open"})):this.shadowRoot=this.watermarkContent,this.shadowRoot.append(this.watermarkDom),MutationObserver&&this.options.monitor&&(this.mutationObserver=new MutationObserver((e=>{e.forEach((e=>{if(this._isAgainRender(e))return this.destroy(),void this._render()}))})),this.mutationObserver.observe(this.container,observeOptions),this.shadowRoot&&this.mutationObserver.observe(this.shadowRoot,observeOptions))}))}},FileSaver_min=createCommonjsModule((function(e,t){!function(){function t(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function r(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){s(n.response,t,r)},n.onerror=function(){console.error("could not download file")},n.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof commonjsGlobal&&commonjsGlobal.global===commonjsGlobal?commonjsGlobal:void 0,a=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(e,t,a){var s=o.URL||o.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?i(l):n(l.href)?r(e,t,a):i(l,l.target="_blank")):(l.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(l.href)}),4e4),setTimeout((function(){i(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,o,a){if(o=o||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,a),o);else if(n(e))r(e,o,a);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){i(s)}))}}:function(e,t,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var s="application/octet-stream"===e.type,l=/constructor/i.test(o.HTMLElement)||o.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||s&&l||a)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},u.readAsDataURL(e)}else{var h=o.URL||o.webkitURL,d=h.createObjectURL(e);i?i.location=d:location.href=d,i=null,setTimeout((function(){h.revokeObjectURL(d)}),4e4)}});o.saveAs=s.saveAs=s,e.exports=s}()})),getComOptions=function(e){var t=_$1.cloneDeep(e),r=_$1.omit(t,["comData","source"]);return __assign$1({},r)},generateComponentList=function(e){if(0===e.length)return[];var t=function(e){for(var r,n=0;n<e.length;n++)e[n].tmpData&&(e[n]=Object.assign({},getComOptions(e[n]))),e[n]&&e[n].children&&(null===(r=e[n])||void 0===r?void 0:r.children.length)?t(e[n].children):e[n]&&e[n].dynamicChildren&&Array.from(e[n].dynamicChildren).forEach((function(e,r){t(e[1])}))};return t(e),e},generateCaseDataJson=function(e){var t=_$1.cloneDeep(e)?_$1.cloneDeep(e):{};"string"==typeof e&&(t=JSON.parse(e));var r=[];if(t instanceof Array)t.forEach((function(e,t){var n=JSON.parse(e.caseDetailData)?JSON.parse(e.caseDetailData):{},i=e.caseDetailPath,o=e.caseDetailName,a=n.theme,s=void 0===a?null:a,l=n.globalVars,c=void 0===l?null:l,u=n.shareVariableTree,h=void 0===u?null:u,d=n.plant,f=void 0===d?null:d,p=n.list,m=void 0===p?[]:p,g=n.path,v=void 0===g?"":g;n.name;var y=n.resource,_=void 0===y?{jspaths:[],csspaths:[],otherpaths:[]}:y,b=n.watermark,w=void 0===b?null:b,D=n.tw,x=void 0===D?null:D,S=n.globalSource,k=void 0===S?[]:S,T=n.globalEvents,P=void 0===T?[]:T,E=n.globalConstant,A=void 0===E?[]:E;r.push({path:v||i,theme:s,name:o,resource:_,tw:x,watermark:w,globalSource:k,globalVars:c,globalEvents:P,globalConstant:A,shareVariableTree:h,plant:f,list:generateComponentList(m)})}));else{var n=t.theme,i=void 0===n?null:n,o=t.globalVars,a=void 0===o?null:o,s=t.shareVariableTree,l=void 0===s?null:s,c=t.plant,u=void 0===c?null:c,h=t.list,d=void 0===h?[]:h,f=t.resource,p=void 0===f?{jspaths:[],csspaths:[],otherpaths:[]}:f,m=t.watermark,g=void 0===m?null:m,v=t.tw,y=void 0===v?null:v,_=t.globalSource,b=void 0===_?[]:_,w=t.globalEvents,D=void 0===w?[]:w,x=t.globalConstant,S=void 0===x?[]:x;r.push({resource:p,tw:y,watermark:g,globalSource:b,theme:i,globalVars:a,globalEvents:D,shareVariableTree:l,globalConstant:S,plant:u,list:generateComponentList(d)})}return r},generatePageData=function(e){var t={},r=t.theme,n=void 0===r?null:r,i=t.globalVars,o=void 0===i?null:i,a=t.shareVariableTree,s=void 0===a?null:a,l=t.plant,c=void 0===l?null:l,u=t.list,h=void 0===u?[]:u,d=t.undos,f=void 0===d?[]:d,p=t.undoRedoPointer,m=void 0===p?-1:p,g=t.globalEvents,v=void 0===g?[]:g;return e&&(n=e.theme,c=e.plant),{theme:n,globalVars:o,globalEvents:v,shareVariableTree:s,plant:c,undos:f,undoRedoPointer:m,list:generateComponentList(h)}},exportJson=function(e){var t=e.caseName,r=void 0===t?"case-name":t,n=e.caseImg,i=void 0===n?"":n,o=e.caseRemark,a=void 0===o?"":o,s=e.details,l=e.caseClientType,c=void 0===l?"":l,u=e.id,h={caseClientType:c,caseName:r,caseImg:i,caseRemark:a,caseId:void 0===u?"":u,createTime:moment().format("YYYY-MM-DD , h:mm:ss"),caseData:generateCaseDataJson(s)},d=new Blob([JSON.stringify(h)],{type:"json"});FileSaver_min.saveAs(d,r+".json")},generateJson=function(e){var t=e.caseName,r=void 0===t?"":t,n=e.caseData;return e.plangInfoForPsd,{caseName:r,createTime:moment().format("YYYY-MM-DD , h:mm:ss"),caseData:generateCaseDataJson(n)}};function elementError(e,t){throw new Error("".concat(e,":Expected HTMLElement, got ").concat(t))}var SizeAdaption=function(){function e(e){this.option=e,this.option.isResize&&window.addEventListener("resize",this.resize.bind(this))}return Object.defineProperty(e,"defaultOption",{get:function(){return e._defaultOption},set:function(t){e._defaultOption=t},enumerable:!1,configurable:!0}),e.getInstance=function(t){return e.instance||(e.instance=new e(t)),e.instance},e.prototype.removeResize=function(){window.removeEventListener("resize",this.resize.bind(this))},e.prototype.resize=function(){var e=this.option,t=e.isEqualScale,r=e.wrapSelector,n=e.viewSelector,i=e.designWidth,o=e.designHeight,a=e.horizontal,s=e.vertical,l=document.querySelector(r);l||elementError("wrap",l);var c=l.clientWidth,u=l.clientHeight,h=document.querySelector(n);h||elementError("view",h),h.style.position="absolute",h.style.width=i+"px",h.style.height=o+"px";var d,f,p,m,g=Math.min(c/i,u/o);if(t){switch(h.style.transform="scale(".concat(g,")"),a){case"center":d=(c-i)/2+"px";break;case"left":d=(g-1)/2*i+"px";break;case"right":p=(g-1)/2*i+"px"}switch(s){case"center":f=(u-o)/2+"px";break;case"top":f=(g-1)/2*o+"px";break;case"bottom":m=(g-1)/2*o+"px"}}else h.style.transform="scale('".concat(c/i,", ").concat(u/o,"')"),d=(c-i)/2+"px",f=(u-o)/2+"px";f?h.style.top=f:m&&(h.style.bottom=m),d?h.style.left=d:p&&(h.style.right=p)},e._defaultOption={isEqualScale:!0,designWidth:1920,designHeight:1080,wrapSelector:"body",viewSelector:"#app",horizontal:"center",vertical:"center",isResize:!0},e}(),Scale=function(){function e(e){this.wrap=null,this.target=null,this.type=0,this.minRatio=1,this.outSize={w:0,h:0},this.inSize={w:0,h:0};var t=e.wrap,r=e.target,n=e.type,i=e.size,o=e.callback;this.size=i,this.type=n,this.initOptions(t,r,i),this.initSize(i),this.layout(),this.scale(o),window.addEventListener("resize",this.reset.bind(this,o))}return e.prototype.reset=function(e){this.initSize(this.size),this.layout(),e?this.scale(e):this.scale()},e.getInstance=function(t){return e.instance||(e.instance=new e(t)),e.instance},e.prototype.removeResize=function(){window.removeEventListener("resize",this.reset.bind(this,void 0))},e.prototype.getDom=function(e){if(_$1.isElement(e))return e;var t=document.querySelector(e);return _$1.isElement(t)?t:null},e.prototype.initOptions=function(e,t,r){this.wrap=this.getDom(e),this.target=this.getDom(t),this.target.style.width=r.w+"px",this.target.style.height=r.h+"px",this.verificationDom()},e.prototype.initSize=function(e){this.outSize.w=this.wrap.clientWidth,this.outSize.h=this.wrap.clientHeight,this.inSize=e},e.prototype.verificationDom=function(){null!=this.wrap&&null!=this.target&&this.isChildOf(this.wrap,this.target)||console.warn("Please pass in the DOM element correctly!")},e.prototype.layout=function(){if(0==this.type||3==this.type){var e=(this.outSize.w-this.inSize.w)/2,t=(this.outSize.h-this.inSize.h)/2;this.target.style.top=t+"px",this.target.style.left=e+"px"}else this.wrap.style.display="flex",this.wrap.style["align-items"]="center",this.wrap.style["justify-content"]="center",this.target.style.position="static",1==this.type?(this.wrap.style["overflow-y"]="auto",this.wrap.style["overflow-x"]="hidden"):2==this.type&&(this.wrap.style["overflow-y"]="hidden",this.wrap.style["overflow-x"]="auto")},e.prototype.isChildOf=function(e,t){var r;if(e&&t)for(r=e.parentNode;r;){if(t===r)return!0;r=r.parentNode}return!1},e.prototype.scale=function(e){var t=1,r=1;switch(this.type){case 0:t=Math.min(this.outSize.w/this.inSize.w,this.outSize.h/this.inSize.h),r=Math.min(this.outSize.w/this.inSize.w,this.outSize.h/this.inSize.h);break;case 1:r=t=this.outSize.w/this.inSize.w;break;case 2:t=r=this.outSize.h/this.inSize.h;break;case 3:t=this.outSize.w/this.inSize.w,r=this.outSize.h/this.inSize.h}e&&e([t,r]),this.target.style.transform="scale(".concat(t,",").concat(r,")")},e.prototype.resize=function(){},e}(),domToImage=createCommonjsModule((function(e){!function(t){var r=function(){return{escape:function(e){return e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:e,mimeType:function(t){var r=e(t).toLowerCase();return(n="application/font-woff",i="image/jpeg",{woff:n,woff2:n,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:i,jpeg:i,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[r]||"";var n,i},dataAsUrl:function(e,t){return"data:"+t+";base64,"+e},isDataUrl:function(e){return-1!==e.search(/^(data:)/)},canvasToBlob:function(e){return e.toBlob?new Promise((function(t){e.toBlob(t)})):function(e){return new Promise((function(t){for(var r=window.atob(e.toDataURL().split(",")[1]),n=r.length,i=new Uint8Array(n),o=0;o<n;o++)i[o]=r.charCodeAt(o);t(new Blob([i],{type:"image/png"}))}))}(e)},resolveUrl:function(e,t){var r=document.implementation.createHTMLDocument(),n=r.createElement("base");r.head.appendChild(n);var i=r.createElement("a");return r.body.appendChild(i),n.href=t,i.href=e,i.href},getAndEncode:function(e){var t=3e4;s.impl.options.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());return new Promise((function(r){var n,i=new XMLHttpRequest;if(i.onreadystatechange=a,i.ontimeout=l,i.responseType="blob",i.timeout=t,i.open("GET",e,!0),i.send(),s.impl.options.imagePlaceholder){var o=s.impl.options.imagePlaceholder.split(/,/);o&&o[1]&&(n=o[1])}function a(){if(4===i.readyState)if(200===i.status){var t=new FileReader;t.onloadend=function(){var e=t.result.split(/,/)[1];r(e)},t.readAsDataURL(i.response)}else n?r(n):c("cannot fetch resource: "+e+", status: "+i.status)}function l(){n?r(n):c("timeout of "+t+"ms occured while fetching resource: "+e)}function c(e){console.error(e),r("")}}))},uid:function(){var e=0;return function(){return"u"+t()+e++;function t(){return("0000"+(Math.random()*Math.pow(36,4)|0).toString(36)).slice(-4)}}}(),delay:function(e){return function(t){return new Promise((function(r){setTimeout((function(){r(t)}),e)}))}},asArray:function(e){for(var t=[],r=e.length,n=0;n<r;n++)t.push(e[n]);return t},escapeXhtml:function(e){return e.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(e){return new Promise((function(t,r){var n=new Image;n.onload=function(){t(n)},n.onerror=r,n.src=e}))},width:function(e){var r=t(e,"border-left-width"),n=t(e,"border-right-width");return e.scrollWidth+r+n},height:function(e){var r=t(e,"border-top-width"),n=t(e,"border-bottom-width");return e.scrollHeight+r+n}};function e(e){var t=/\.([^\.\/]*?)$/g.exec(e);return t?t[1]:""}function t(e,t){var r=window.getComputedStyle(e).getPropertyValue(t);return parseFloat(r.replace("px",""))}}(),n=function(){var e=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(e,r,o){return a()?Promise.resolve(e):Promise.resolve(e).then(n).then((function(t){var n=Promise.resolve(e);return t.forEach((function(e){n=n.then((function(t){return i(t,e,r,o)}))})),n}));function a(){return!t(e)}},shouldProcess:t,impl:{readUrls:n,inline:i}};function t(t){return-1!==t.search(e)}function n(t){for(var n,i=[];null!==(n=e.exec(t));)i.push(n[1]);return i.filter((function(e){return!r.isDataUrl(e)}))}function i(e,t,n,i){return Promise.resolve(t).then((function(e){return n?r.resolveUrl(e,n):e})).then(i||r.getAndEncode).then((function(e){return r.dataAsUrl(e,r.mimeType(t))})).then((function(n){return e.replace(function(e){return new RegExp("(url\\(['\"]?)("+r.escape(e)+")(['\"]?\\))","g")}(t),"$1"+n+"$3")}))}}(),i=function(){return{resolveAll:function(){return e().then((function(e){return Promise.all(e.map((function(e){return e.resolve()})))})).then((function(e){return e.join("\n")}))},impl:{readAll:e}};function e(){return Promise.resolve(r.asArray(document.styleSheets)).then((function(e){var t=[];return e.forEach((function(e){try{r.asArray(e.cssRules||[]).forEach(t.push.bind(t))}catch(t){console.log("Error while reading CSS rules from "+e.href,t.toString())}})),t})).then((function(e){return e.filter((function(e){return e.type===CSSRule.FONT_FACE_RULE})).filter((function(e){return n.shouldProcess(e.style.getPropertyValue("src"))}))})).then((function(t){return t.map(e)}));function e(e){return{resolve:function(){var t=(e.parentStyleSheet||{}).href;return n.inlineAll(e.cssText,t)},src:function(){return e.style.getPropertyValue("src")}}}}}(),o=function(){return{inlineAll:function t(i){return i instanceof Element?o(i).then((function(){return i instanceof HTMLImageElement?e(i).inline():Promise.all(r.asArray(i.childNodes).map((function(e){return t(e)})))})):Promise.resolve(i);function o(e){var t=e.style.getPropertyValue("background");return t?n.inlineAll(t).then((function(t){e.style.setProperty("background",t,e.style.getPropertyPriority("background"))})).then((function(){return e})):Promise.resolve(e)}},impl:{newImage:e}};function e(e){return{inline:function(t){return r.isDataUrl(e.src)?Promise.resolve():Promise.resolve(e.src).then(t||r.getAndEncode).then((function(t){return r.dataAsUrl(t,r.mimeType(e.src))})).then((function(t){return new Promise((function(r,n){e.onload=r,e.onerror=n,e.src=t}))}))}}}}(),a={imagePlaceholder:void 0,cacheBust:!1},s={toSvg:l,toPng:function(e,t){return c(e,t||{}).then((function(e){return e.toDataURL()}))},toJpeg:function(e,t){return c(e,t=t||{}).then((function(e){return e.toDataURL("image/jpeg",t.quality||1)}))},toBlob:function(e,t){return c(e,t||{}).then(r.canvasToBlob)},toPixelData:function(e,t){return c(e,t||{}).then((function(t){return t.getContext("2d").getImageData(0,0,r.width(e),r.height(e)).data}))},impl:{fontFaces:i,images:o,util:r,inliner:n,options:{}}};function l(e,t){return function(e){void 0===e.imagePlaceholder?s.impl.options.imagePlaceholder=a.imagePlaceholder:s.impl.options.imagePlaceholder=e.imagePlaceholder;void 0===e.cacheBust?s.impl.options.cacheBust=a.cacheBust:s.impl.options.cacheBust=e.cacheBust}(t=t||{}),Promise.resolve(e).then((function(e){return u(e,t.filter,!0)})).then(h).then((function(e){t.bgcolor&&(e.style.backgroundColor=t.bgcolor);t.width&&(e.style.width=t.width+"px");t.height&&(e.style.height=t.height+"px");t.style&&Object.keys(t.style).forEach((function(r){e.style[r]=t.style[r]}));return e})).then((function(n){return function(e,t,n){return Promise.resolve(e).then((function(e){return e.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(e)})).then(r.escapeXhtml).then((function(e){return'<foreignObject x="0" y="0" width="100%" height="100%">'+e+"</foreignObject>"})).then((function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+t+'" height="'+n+'">'+e+"</svg>"})).then((function(e){return"data:image/svg+xml;charset=utf-8,"+e}))}(n,t.width||r.width(e),t.height||r.height(e))}))}function c(e,t){return l(e,t).then(r.makeImage).then(r.delay(100)).then((function(n){var i=function(e){var n=document.createElement("canvas");if(n.width=t.width||r.width(e),n.height=t.height||r.height(e),t.bgcolor){var i=n.getContext("2d");i.fillStyle=t.bgcolor,i.fillRect(0,0,n.width,n.height)}return n}(e);return i.getContext("2d").drawImage(n,0,0),i}))}function u(e,t,n){return n||!t||t(e)?Promise.resolve(e).then((function(e){return e instanceof HTMLCanvasElement?r.makeImage(e.toDataURL()):e.cloneNode(!1)})).then((function(n){return function(e,t,n){var i=e.childNodes;return 0===i.length?Promise.resolve(t):o(t,r.asArray(i),n).then((function(){return t}));function o(e,t,r){var n=Promise.resolve();return t.forEach((function(t){n=n.then((function(){return u(t,r)})).then((function(t){t&&e.appendChild(t)}))})),n}}(e,n,t)})).then((function(t){return function(e,t){var n=t;return n instanceof Element?Promise.resolve().then(i).then(o).then(a).then(s).then(l).then((function(){return n})):n;function i(){if(n instanceof HTMLVideoElement){var t=window.getComputedStyle(e),r=document.createElement("canvas");r.width=parseInt(t.width,10),r.height=parseInt(t.height,10);var i=Math.max(e.videoWidth/r.width,e.videoHeight/r.height),o=e.videoWidth/i,a=e.videoHeight/i,s=r.width/2-o/2,l=r.height/2-a/2;r.getContext("2d").drawImage(e,s,l,o,a);var c=n=document.createElement("img");try{c.src=r.toDataURL()}catch(e){c.src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="}}}function o(){function t(e,t){function n(e,t){r.asArray(e).forEach((function(r){t.setProperty(r,e.getPropertyValue(r),e.getPropertyPriority(r))}))}e.cssText?t.cssText=e.cssText:n(e,t)}t(window.getComputedStyle(e),n.style)}function a(){function t(t){var i=window.getComputedStyle(e,t),o=i.getPropertyValue("content");if(""!==o&&"none"!==o){var a=r.uid();n.className=n.className+" "+a;var s=document.createElement("style");s.appendChild(l(a,t,i)),n.appendChild(s)}function l(e,t,n){var i="."+e+":"+t,o=n.cssText?a(n):s(n);return document.createTextNode(i+"{"+o+"}");function a(e){var t=e.getPropertyValue("content");return e.cssText+" content: "+t+";"}function s(e){return r.asArray(e).map(t).join("; ")+";";function t(t){return t+": "+e.getPropertyValue(t)+(e.getPropertyPriority(t)?" !important":"")}}}}[":before",":after"].forEach((function(e){t(e)}))}function s(){e instanceof HTMLTextAreaElement&&(n.innerHTML=e.value),e instanceof HTMLInputElement&&n.setAttribute("value",e.value)}function l(){n instanceof SVGElement&&(n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n instanceof SVGRectElement&&["width","height"].forEach((function(e){var t=n.getAttribute(e);t&&n.style.setProperty(e,t)})))}}(e,t)})):Promise.resolve()}function h(e){return o.inlineAll(e).then((function(){return e}))}e.exports=s}()})),isURL=function(e){if(!e)return!1;return 1==new RegExp(/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/).test(e)},ArrayBufferToBase64=function(e){for(var t="",r=new Uint8Array(e),n=r.byteLength,i=0;i<n;i++)t+=String.fromCharCode(r[i]);return"data:image/jpeg;base64,".concat(window.btoa(t))},dataURLtoFile=function(e,t){void 0===t&&(t="screenshot.jpeg");try{for(var r=e.split(","),n=r[0].match(/:(.*?);/)[1],i=atob(r[1]),o=i.length,a=new Uint8Array(o);o--;)a[o]=i.charCodeAt(o);return new File([a],t,{type:n})}catch(e){console.error("dataURLtoFile:数据转换错误 : "+e)}},transformData=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,11,,12]),"File"!=t||"string"!=typeof e?[3,2]:[4,dataURLtoFile(e)];case 1:case 3:case 5:case 7:return[2,n.sent()];case 2:return"File"!=t||"[object ArrayBuffer]"!=e.toString()?[3,4]:[4,new File([e],"screenshot.jpeg")];case 4:return"Base64"!=t||"string"!=typeof e?[3,6]:[4,e];case 6:return"Base64"!=t||"[object ArrayBuffer]"!=e.toString()?[3,8]:[4,ArrayBufferToBase64(e)];case 8:return[4,new Error("transformData: 转换发生错误")];case 9:throw n.sent();case 10:return[3,12];case 11:return r=n.sent(),console.log(r),[3,12];case 12:return[2]}}))}))},fetch=function(e,t,r,n){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,axios({url:e,method:"GET",responseType:"arraybuffer",params:{url:t,dom:r,quality:n}})];case 1:return[2,i.sent()];case 2:return i.sent(),console.warn("请求截图服务器发生错误,请检查地址及参数是否正确!",{url:e,path:t,dom:r,quality:n}),[2,null];case 3:return[2]}}))}))},domToImg=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){var r,n;return __generator(this,(function(i){switch(i.label){case 0:if(i.trys.push([0,2,,3]),!(r=document.querySelector(e)))throw new Error("domToImg:"+e+" dom未被找到!");return[4,domToImage.toJpeg(r,{style:{transform:"scale(1)",position:"static"},quality:t})];case 1:return[2,i.sent()];case 2:return n=i.sent(),console.warn(n),[3,3];case 3:return[2]}}))}))},screenshot=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t,r,n,i,o,a,s,l;return __generator(this,(function(c){switch(c.label){case 0:return c.trys.push([0,11,,12]),t=e.dom,r=e.servePath,n=e.targetPath,i=e.quality,o=e.type,a=void 0,isURL(r)&&isURL(n)?[4,fetch(r,n,t,i||.5)]:[3,5];case 1:return(s=c.sent())&&200==s.status&&s.data?(a=s.data,[3,4]):[3,2];case 2:return console.warn("截取错误,请检查网络或服务地址配置是否正确,已转换为dom-to-img."),[4,domToImg(t,i||.5)];case 3:a=c.sent(),c.label=4;case 4:return[3,7];case 5:return console.warn("地址错误,请检查传入的地址是否争取,已转换为dom-to-img."),[4,domToImg(t,i||.5)];case 6:a=c.sent(),c.label=7;case 7:return a?[4,transformData(a,o)]:[3,9];case 8:return[2,c.sent()];case 9:return[2,null];case 10:return[3,12];case 11:return l=c.sent(),console.error("截图发生错误:"+l),[2,null];case 12:return[2]}}))}))},toHex=function(e){return"".concat(e>15?"":0).concat(e.toString(16))},toHexString=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=void 0===i?1:i;return"#".concat(toHex(t)).concat(toHex(r)).concat(toHex(n)).concat(1===o?"":toHex(Math.floor(255*o)))},toRgbString=function(e){var t=e.r,r=e.g,n=e.b;return"rgb(".concat(t,",").concat(r,",").concat(n,")")},toRgbaString=function(e,t){void 0===t&&(t=1e4);var r=e.r,n=e.g,i=e.b,o=e.a,a=void 0===o?1:o;return"rgba(".concat(r,",").concat(n,",").concat(i,",").concat(Math.floor(a*t)/t,")")},parseHexColor=function(e){var t=e.slice(1),r=1;3===t.length&&(t="".concat(t[0]).concat(t[0]).concat(t[1]).concat(t[1]).concat(t[2]).concat(t[2])),8===t.length&&(r=parseInt(t.slice(6),16)/255,t=t.slice(0,6));var n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:255&n,a:r}},parseRgbaColor=function(e){var t=e.match(/(\d(\.\d+)?)+/g)||[],r=t.map((function(e){return parseInt(e,10)}));return{r:r[0],g:r[1],b:r[2],a:parseFloat(t[3])}},parseColorString=function(e){if(e.startsWith("#"))return parseHexColor(e);if(e.startsWith("rgb"))return parseRgbaColor(e);if("transparent"===e)return parseHexColor("#00000000");throw new Error("color string error: ".concat(e))},getColorInfo=function(e){var t=parseColorString(e);return{hex:toHexString(t),rgba:toRgbaString(t),rgb:toRgbString(t),rgbaObj:t}},hexToRgba=function(e){var t=parseColorString(e);return toRgbaString(t)},rgbaToHex=function(e){var t=parseColorString(e);return toHexString(t)},errCode=new Map([["E1001","系统未知错误"],["E1002","vue逻辑错误"],["E1003","JavaScript错误"],["E1004","静态资源加载错误"],["E1005","请求错误"],["E1006","Promise错误"]]),watchError=function(e,t){e.config.errorHandler=function(e){console.error("监测到E1002错误"),console.error(e.filename),errorHandler("E1002",e.name+":"+e.message,t)},window.addEventListener("error",(function(e){e.message?(console.error("监测到E1003错误"),errorHandler("E1003",e.message,e.filename,t)):(console.error("监测到E1004错误"),errorHandler("E1004",e.target.currentSrc,e.filename,t))}),!0)},errorHandler=function(e,t,r,n){void 0===n&&(n="null"),saveLog({code:e,type:errCode.get("".concat(e)),msg:t,router:r.currentRoute.value.fullPath,file:n,createTime:(new Date).toLocaleString()})},saveLog=function(e){var t=localStorage.getItem("ERROR");if(t){var r=JSON.parse(t);sortArray(r),r.length>50?(r[0]=e,sortArray(r)):r.push(e),localStorage.setItem("ERROR",JSON.stringify(r))}else localStorage.setItem("ERROR",JSON.stringify([e]))},sortArray=function(e){e.sort((function(e,t){return e.createTime>t.createTime?1:-1}))},index$1=Object.freeze({__proto__:null,RecursiveList:RecursiveList,Scale:Scale,SizeAdaption:SizeAdaption,UpdataForContainer:UpdataForContainer,Watermark:Watermark,arraySwap:arraySwap,arraySwapDeep:arraySwapDeep,arraySwapForId:arraySwapForId,breakUp:breakUp,checkBaseData:checkBaseData,checkVar:checkVar,comToggle:comToggle,decrypAES:decrypAES,decrypt:decrypt,encrypt:encrypt$1,errorHandler:errorHandler,executeFilter:executeFilter,exportJson:exportJson,findItem:findItem,findItemDeep:findItemDeep$1,findItemIndexDeep:findItemIndexDeep,findParentDeep:findParentDeep,genCopyName:genCopyName,genID:genID,generateCaseDataJson:generateCaseDataJson,generateComponentList:generateComponentList,generateJson:generateJson,generatePageData:generatePageData,getAncestorsNodes:getAncestorsNodes,getColorInfo:getColorInfo,getDataForEvaluator:getDataForEvaluator,getInteractive:getInteractive,getInteractive2:getInteractive2,getLength:getLength,getPosition:getPosition,getSessionData:getSessionData,getShareTree:getShareTree,getStandardData:getStandardData,getUrlParams:getUrlParams,globalSourceTemp:globalSourceTemp,hasVar:hasVar,hexToRgba:hexToRgba,isJSON:isJSON,isPeer:isPeer,loadFont:loadFont,loadFontResource:loadFontResource,loadFontTag:loadFontTag,loadScript:loadScript,loadTag:loadTag,parseColorString:parseColorString,parseHexColor:parseHexColor,parseRgbaColor:parseRgbaColor,recursion:recursion,removeTag:removeTag,resetID:resetID,resetPositionForGroup:resetPositionForGroup,resizeListPosition:resizeListPosition,resizePosition:resizePosition,resziePositionForGroup:resziePositionForGroup,rgbaToHex:rgbaToHex,safeConvertToNumber:safeConvertToNumber,safeEval:safeEval,screenshot:screenshot,selectdArea:selectdArea,setActions:setActions,setAttr:setAttr,setIndex:setIndex,setPorp:setPorp,setPositionForGroup:setPositionForGroup,setPositionForWorld:setPositionForWorld,setSessionData:setSessionData,toHex:toHex,toHexString:toHexString,toRgbString:toRgbString,toRgbaString:toRgbaString,transformPosition:transformPosition,upDataGroup:upDataGroup,upDataGroupChildren:upDataGroupChildren,updataAttribute:updataAttribute,updataAttributeForOption:updataAttributeForOption,updataSizeDeep:updataSizeDeep,validateAndFixObject:validateAndFixObject,watchError:watchError});function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}
|
|
32
|
+
(n=Xt).mode.CTRGladman=function(){var t=n.lib.BlockCipherMode.extend();function e(t){if(255&~(t>>24))t+=1<<24;else{var e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}return t}function r(t){return 0===(t[0]=e(t[0]))&&(t[1]=e(t[1])),t}var i=t.Encryptor=t.extend({processBlock:function(t,e){var n=this._cipher,i=n.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),r(a);var s=a.slice(0);n.encryptBlock(s,0);for(var l=0;l<i;l++)t[e+l]^=s[l]}});return t.Decryptor=i,t}(),n.mode.CTRGladman)})),a((function(t,e){var n,r,i;t.exports=((i=Xt).mode.OFB=(n=i.lib.BlockCipherMode.extend(),r=n.Encryptor=n.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),n.encryptBlock(o,0);for(var a=0;a<r;a++)t[e+a]^=o[a]}}),n.Decryptor=r,n),i.mode.OFB)})),a((function(t,e){var n,r;t.exports=((r=Xt).mode.ECB=((n=r.lib.BlockCipherMode.extend()).Encryptor=n.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),n.Decryptor=n.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),n),r.mode.ECB)})),a((function(t,e){var n;t.exports=((n=Xt).pad.AnsiX923={pad:function(t,e){var n=t.sigBytes,r=4*e,i=r-n%r,o=n+i-1;t.clamp(),t.words[o>>>2]|=i<<24-o%4*8,t.sigBytes+=i},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},n.pad.Ansix923)})),a((function(t,e){var n;t.exports=((n=Xt).pad.Iso10126={pad:function(t,e){var r=4*e,i=r-t.sigBytes%r;t.concat(n.lib.WordArray.random(i-1)).concat(n.lib.WordArray.create([i<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},n.pad.Iso10126)})),a((function(t,e){var n;t.exports=((n=Xt).pad.Iso97971={pad:function(t,e){t.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(t,e)},unpad:function(t){n.pad.ZeroPadding.unpad(t),t.sigBytes--}},n.pad.Iso97971)})),a((function(t,e){var n;t.exports=((n=Xt).pad.ZeroPadding={pad:function(t,e){var n=4*e;t.clamp(),t.sigBytes+=n-(t.sigBytes%n||n)},unpad:function(t){var e=t.words,n=t.sigBytes-1;for(n=t.sigBytes-1;n>=0;n--)if(e[n>>>2]>>>24-n%4*8&255){t.sigBytes=n+1;break}}},n.pad.ZeroPadding)})),a((function(t,e){var n;t.exports=((n=Xt).pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)})),a((function(t,e){var n;t.exports=(n=Xt,function(t){var e=n,r=e.lib.CipherParams,i=e.enc.Hex;e.format.Hex={stringify:function(t){return t.ciphertext.toString(i)},parse:function(t){var e=i.parse(t);return r.create({ciphertext:e})}}}(),n.format.Hex)})),a((function(t,e){var n;t.exports=(n=Xt,function(){var t=n,e=t.lib.BlockCipher,r=t.algo,i=[],o=[],a=[],s=[],l=[],c=[],u=[],h=[],d=[],f=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var n=0,r=0;for(e=0;e<256;e++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var m=t[n],g=t[m],v=t[g],y=257*t[p]^16843008*p;a[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,l[n]=y<<8|y>>>24,c[n]=y,y=16843009*v^65537*g^257*m^16843008*n,u[p]=y<<24|y>>>8,h[p]=y<<16|y>>>16,d[p]=y<<8|y>>>24,f[p]=y,n?(n=m^t[t[t[v^m]]],r^=t[t[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=r.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,n=t.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],a=0;a<r;a++)a<n?o[a]=e[a]:(c=o[a-1],a%n?n>6&&a%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[a/n|0]<<24),o[a]=o[a-n]^c);for(var s=this._invKeySchedule=[],l=0;l<r;l++){if(a=r-l,l%4)var c=o[a];else c=o[a-4];s[l]=l<4||a<=4?c:u[i[c>>>24]]^h[i[c>>>16&255]]^d[i[c>>>8&255]]^f[i[255&c]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,a,s,l,c,i)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,u,h,d,f,o),n=t[e+1],t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,r,i,o,a,s){for(var l=this._nRounds,c=t[e]^n[0],u=t[e+1]^n[1],h=t[e+2]^n[2],d=t[e+3]^n[3],f=4,p=1;p<l;p++){var m=r[c>>>24]^i[u>>>16&255]^o[h>>>8&255]^a[255&d]^n[f++],g=r[u>>>24]^i[h>>>16&255]^o[d>>>8&255]^a[255&c]^n[f++],v=r[h>>>24]^i[d>>>16&255]^o[c>>>8&255]^a[255&u]^n[f++],y=r[d>>>24]^i[c>>>16&255]^o[u>>>8&255]^a[255&h]^n[f++];c=m,u=g,h=v,d=y}m=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[h>>>8&255]<<8|s[255&d])^n[f++],g=(s[u>>>24]<<24|s[h>>>16&255]<<16|s[d>>>8&255]<<8|s[255&c])^n[f++],v=(s[h>>>24]<<24|s[d>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^n[f++],y=(s[d>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&h])^n[f++],t[e]=m,t[e+1]=g,t[e+2]=v,t[e+3]=y},keySize:8});t.AES=e._createHelper(m)}(),n.AES)})),a((function(t,e){var n;t.exports=(n=Xt,function(){var t=n,e=t.lib,r=e.WordArray,i=e.BlockCipher,o=t.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=o.DES=i.extend({_doReset:function(){for(var t=this._key.words,e=[],n=0;n<56;n++){var r=a[n]-1;e[n]=t[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var c=i[o]=[],u=l[o];for(n=0;n<24;n++)c[n/6|0]|=e[(s[n]-1+u)%28]<<31-n%6,c[4+(n/6|0)]|=e[28+(s[n+24]-1+u)%28]<<31-n%6;for(c[0]=c[0]<<1|c[0]>>>31,n=1;n<7;n++)c[n]=c[n]>>>4*(n-1)+3;c[7]=c[7]<<5|c[7]>>>27}var h=this._invSubKeys=[];for(n=0;n<16;n++)h[n]=i[15-n]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,n){this._lBlock=t[e],this._rBlock=t[e+1],d.call(this,4,252645135),d.call(this,16,65535),f.call(this,2,858993459),f.call(this,8,16711935),d.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],o=this._lBlock,a=this._rBlock,s=0,l=0;l<8;l++)s|=c[l][((a^i[l])&u[l])>>>0];this._lBlock=a,this._rBlock=o^s}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,d.call(this,1,1431655765),f.call(this,8,16711935),f.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function d(t,e){var n=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=n,this._lBlock^=n<<t}function f(t,e){var n=(this._rBlock>>>t^this._lBlock)&e;this._lBlock^=n,this._rBlock^=n<<t}t.DES=i._createHelper(h);var p=o.TripleDES=i.extend({_doReset:function(){var t=this._key.words;if(2!==t.length&&4!==t.length&&t.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var e=t.slice(0,2),n=t.length<4?t.slice(0,2):t.slice(2,4),i=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=h.createEncryptor(r.create(e)),this._des2=h.createEncryptor(r.create(n)),this._des3=h.createEncryptor(r.create(i))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=i._createHelper(p)}(),n.TripleDES)})),a((function(t,e){var n;t.exports=(n=Xt,function(){var t=n,e=t.lib.StreamCipher,r=t.algo,i=r.RC4=e.extend({_doReset:function(){for(var t=this._key,e=t.words,n=t.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var a=i%n,s=e[a>>>2]>>>24-a%4*8&255;o=(o+r[i]+s)%256;var l=r[i];r[i]=r[o],r[o]=l}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var t=this._S,e=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+t[e=(e+1)%256])%256;var o=t[e];t[e]=t[n],t[n]=o,r|=t[(t[e]+t[n])%256]<<24-8*i}return this._i=e,this._j=n,r}t.RC4=e._createHelper(i);var a=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)o.call(this)}});t.RC4Drop=e._createHelper(a)}(),n.RC4)})),a((function(t,e){var n;t.exports=(n=Xt,function(){var t=n,e=t.lib.StreamCipher,r=t.algo,i=[],o=[],a=[],s=r.Rabbit=e.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,n=0;n<4;n++)t[n]=16711935&(t[n]<<8|t[n]>>>24)|4278255360&(t[n]<<24|t[n]>>>8);var r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(this._b=0,n=0;n<4;n++)l.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var o=e.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=c>>>16|4294901760&u,d=u<<16|65535&c;for(i[0]^=c,i[1]^=h,i[2]^=u,i[3]^=d,i[4]^=c,i[5]^=h,i[6]^=u,i[7]^=d,n=0;n<4;n++)l.call(this)}},_doProcessBlock:function(t,e){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),t[e+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var t=this._X,e=this._C,n=0;n<8;n++)o[n]=e[n];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=t[n]+e[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=l^c}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=e._createHelper(s)}(),n.Rabbit)})),a((function(t,e){var n;t.exports=(n=Xt,function(){var t=n,e=t.lib.StreamCipher,r=t.algo,i=[],o=[],a=[],s=r.RabbitLegacy=e.extend({_doReset:function(){var t=this._key.words,e=this.cfg.iv,n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],r=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(e){var o=e.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=c>>>16|4294901760&u,d=u<<16|65535&c;for(r[0]^=c,r[1]^=h,r[2]^=u,r[3]^=d,r[4]^=c,r[5]^=h,r[6]^=u,r[7]^=d,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(t,e){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),t[e+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var t=this._X,e=this._C,n=0;n<8;n++)o[n]=e[n];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=t[n]+e[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=l^c}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=e._createHelper(s)}(),n.RabbitLegacy)})),a((function(t,e){var n;t.exports=(n=Xt,function(){var t=n,e=t.lib.BlockCipher,r=t.algo;const i=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function l(t,e){let n=e>>24&255,r=e>>16&255,i=e>>8&255,o=255&e,a=t.sbox[0][n]+t.sbox[1][r];return a^=t.sbox[2][i],a+=t.sbox[3][o],a}function c(t,e,n){let r,o=e,a=n;for(let e=0;e<i;++e)o^=t.pbox[e],a=l(t,o)^a,r=o,o=a,a=r;return r=o,o=a,a=r,a^=t.pbox[i],o^=t.pbox[i+1],{left:o,right:a}}function u(t,e,n){let r,o=e,a=n;for(let e=i+1;e>1;--e)o^=t.pbox[e],a=l(t,o)^a,r=o,o=a,a=r;return r=o,o=a,a=r,a^=t.pbox[1],o^=t.pbox[0],{left:o,right:a}}function h(t,e,n){for(let e=0;e<4;e++){t.sbox[e]=[];for(let n=0;n<256;n++)t.sbox[e][n]=a[e][n]}let r=0;for(let a=0;a<i+2;a++)t.pbox[a]=o[a]^e[r],r++,r>=n&&(r=0);let s=0,l=0,u=0;for(let e=0;e<i+2;e+=2)u=c(t,s,l),s=u.left,l=u.right,t.pbox[e]=s,t.pbox[e+1]=l;for(let e=0;e<4;e++)for(let n=0;n<256;n+=2)u=c(t,s,l),s=u.left,l=u.right,t.sbox[e][n]=s,t.sbox[e][n+1]=l;return!0}var d=r.Blowfish=e.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var t=this._keyPriorReset=this._key,e=t.words,n=t.sigBytes/4;h(s,e,n)}},encryptBlock:function(t,e){var n=c(s,t[e],t[e+1]);t[e]=n.left,t[e+1]=n.right},decryptBlock:function(t,e){var n=u(s,t[e],t[e+1]);t[e]=n.left,t[e+1]=n.right},blockSize:2,keySize:4,ivSize:2});t.Blowfish=e._createHelper(d)}(),n.Blowfish)})),a((function(t,e){t.exports=Xt})));var Qt=function(t,e){try{var n=e.xRatio,r=e.yRatio;return isNaN(n)||isNaN(r)?(console.error("发生错误:on updataSizeDeep in go-code "),t):(t.forEach((function(t){var i;t.baseData.left=t.baseData.left*n,t.baseData.width=t.baseData.width*n,t.baseData.top=t.baseData.top*r,t.baseData.height=t.baseData.height*r,t.baseData.angle=t.baseData.angle,(null===(i=null==t?void 0:t.children)||void 0===i?void 0:i.length)&&Qt(null==t?void 0:t.children,e)})),t)}catch(e){return t}},te=function(t,e){var n=!0;try{for(var r=0,i=["width","height","left","top","opacity","angel","skewY","skewX","rotateX","rotateY"];r<i.length;r++){var o=i[r];if(Object.hasOwn(t,o)&&isNaN(t[o])){if(!("string"==typeof t[o]&&t[o].includes("%")||"NaN"==t[o])){console.warn(o+"--参数校验不合法:"+e),n=!1;break}n=!0}}return n}catch(t){return console.warn("参数校验不合法:"+e),!1}},ee=function(t,e,n){var r=t[n];return t.splice(n,1),t.splice(e,0,r),t},ne=function(t,n,r){var i=e.findIndex(t,(function(t){return t.cid==r})),o=e.findIndex(t,(function(t){return t.cid==n}));return ee(t,o,i)},re=function(t,e,n){for(var r=-1,i=0;i<t.length;i++){var o=t[i];if(o.children&&o.children.length)for(var a=0;a<o.children.length;a++){if(r=a,o.children[a].cid===n){switch(e){case"up":r>=1&&ee(o.children,r-1,r);break;case"down":r<o.children.length-2&&ee(o.children,r+1,r);break;case"top":0!==r&&ee(o.children,0,r);break;case"bottom":var s=o.children.length-1;r!==s&&ee(o.children,s,r)}break}}}return t},ie=function(t,n,r){var i=!1,o=function(t){for(var a=0;a<t.length;a++){if(t[a].cid==n){i=t[a],r&&e.remove(t,(function(t){return t.cid==n}));break}if(t[a].children)o(t[a].children);else if(t[a].dynamicChildren){if(t[a].dynamicChildren instanceof Map){for(var s=Array.from(t[a].dynamicChildren),l=0;l<s.length;l++)if(s[l]instanceof Array){var c=s[l][1];o(c)}}else if(t[a].dynamicChildren instanceof Array)for(s=t[a].dynamicChildren,l=0;l<s.length;l++)if(s[l]instanceof Array){c=s[l][1];o(c)}}else t[a].stateChildren&&o(t[a].stateChildren)}};return o(t),i||!1},oe=function(t,e){var n=[],r=function(t){for(var i=0;i<t.length;i++){if(t[i].cid===e)return!0;if(Array.isArray(t[i].children)){if(r(t[i].children))return n.push(t[i]),!0;r(t[i].children)}}};return r(t),n},ae=function(t,e){var n=null,r=function(t,i){for(var o=0,a=t;o<a.length;o++){var s=a[o];if(s.cid==e){n=i;break}if(s.children)r(s.children,s);else if(s.dynamicChildren)if(s.dynamicChildren instanceof Map){for(var l=Array.from(s.dynamicChildren),c=0;c<l.length;c++)if(l[c]instanceof Array){var u=l[c][1];r(u,s)}}else s.dynamicChildren;else s.stateChildren&&r(s.stateChildren,s)}};return r(t,null),n||!1},se=function(t,e,n){for(var r,i=function(i){var o=t[i];if(o.cid===e)return r=o,n&&t.splice(i,1),{value:r};if(o.children&&o.children.length){for(var a=0;a<o.children.length;a++)if(o.children[a].cid===e)return r=o.children[a],n&&o.children.splice(a,1),{value:r}}else if(o.stateChildren&&o.stateChildren.length){for(a=0;a<o.stateChildren.length;a++)if(o.stateChildren[a].cid===e)return r=o.stateChildren[a],n&&o.stateChildren.splice(a,1),{value:r}}else if(o.dynamicChildren){var s=void 0;if(o.dynamicChildren instanceof Map?s=o.dynamicChildren.get(o.activeDynamic):o.dynamicChildren instanceof Array&&(s=o.dynamicChildren.find((function(t){return t[0]==o.activeDynamic}))[1]),s)for(a=0;a<s.length;a++)if(s[a].cid===e)return r=s[a],n&&s.splice(a,1),{value:r}}},o=0;o<t.length;o++){var a=i(o);if("object"==typeof a)return a.value}return!!r},le=function(t,e,n){var r=se(t,e),i=se(t,n);return r.pid&&i.pid||!r.pid&&!i.pid},ce=function(t,e){var n=function(t){for(var r,i,o,a=0,s=t;a<s.length;a++){var l=s[a],c=null===(o=null===(i=null===(r=null==l?void 0:l.tmpData)||void 0===r?void 0:r.source)||void 0===i?void 0:i.converse)||void 0===o?void 0:o.data;if(null==c?void 0:c.length)for(var u=0,h=c;u<h.length;u++){var d=h[u];d.code=d.code.replace(/>/g,">").replace(/</g,"<")}e(l),l&&l.children?n(l.children):l&&l.dynamicChildren?(l.dynamicChildren&&l.dynamicChildren instanceof Map&&l.dynamicChildren.forEach((function(t){n(t)})),l.dynamicChildren&&l.dynamicChildren instanceof Array&&l.dynamicChildren.forEach((function(t){n(t[1])}))):(null==l?void 0:l.stateChildren)&&n(l.stateChildren)}};n(t)},ue=function(t){var e=t.length,n=function(t,e){for(var r=function(r){var i=t[r];if(i&&i.children&&i.children.length){var o=i.children.length;n(i.children,o)}else if(i&&i.dynamicChildren){var a=i.dynamicChildren.length;Array.from(i.dynamicChildren).forEach((function(t,e){n(t[1],a)}))}i.z=10*e-r},i=0;i<t.length;i++)r(i)};n(t,e)},he=function(t){var e=function(t,n){for(var r=function(r){var i=t[r],o=Oe();n?i.pid=n:i.drag||(i.baseData.left=0,i.baseData.top=0),i.cid=o,i&&i.children&&i.children.length?e(i.children,o):i&&i.dynamicChildren&&Array.from(i.dynamicChildren).forEach((function(t,n){e(t[1],o)}))},i=0;i<t.length;i++)r(i)};e(t)},de=function(t,n,r,i){try{if(!t||!t.hasOwnProperty(n)&&!t.hasOwnProperty(i))throw"The property you want to modify is not found. Please check whether the attribute ".concat(n," is entered correctly!");if(i){e.cloneDeep(t[i][n]);t[i][n]=r}else t[n]=r}catch(t){console.error(t)}},fe=function(t,n){var r;try{var i="tmpData";if(!t||!(null===(r=t[i])||void 0===r?void 0:r.hasOwnProperty("option")))throw new Error("The property you want to modify is not found. Please check whether the attribute 'option' is entered correctly!");var o=e.cloneDeep(t[i].option),a={};Object.assign(a,o,n),console.log(a,o,"newOP"),t[i].option=a}catch(t){console.error(new Error("An error occurred: ".concat(t)))}},pe=function(t){try{if(!t)throw" 没有找到组件";t.isShow||"false"==t.isShow?t.isShow=!1:t.isShow=!0}catch(t){console.error(t)}},me=function(t,e){e.forEach((function(e){e.baseData.left=e.baseData.left-t.left,e.baseData.top=e.baseData.top-t.top}))},ge=function(t,n){var r=e.cloneDeep(t),i=[];return r.children&&r.children.length&&r.children.forEach((function(t){var e=n&&(null==r?void 0:r.pid)?ie(n,r.pid):null;ve(t,r,e),i.push(t)})),i},ve=function(t,e,n){var r=function(t,e,n){var r=t.baseData.left,i=t.baseData.top,o=e;if(r+=o.baseData.left,i+=o.baseData.top,n){if(n.baseData.angle){var a=n.baseData.angle*Math.PI/180,s=Math.cos(a),l=Math.sin(a),c=r*l+i*s;r=r*s-i*l,i=c}n.baseData.scale&&(r*=n.baseData.scale.x,i*=n.baseData.scale.y)}return{left:r,top:i}}(t,e,n),i=r.left,o=r.top;t.baseData.left=i,t.baseData.top=o},ye=function(t,e){t.baseData.left=t.baseData.left+e.left,t.baseData.top=t.baseData.top+e.top},be=function(t,e,n){var r={left:0,top:0};return t.left=t.left||0,t.top=t.top||0,e.left=e.left||0,e.top=e.top||0,n&&0!==n?(r.left=t.left-e.left,r.top=t.top-e.top):(r.left=t.left+e.left,r.top=t.top+e.top),r},we=function(t,n){var r=e.cloneDeep(t),i=[],o=function(t,e){var n=ie(t,e);i.push(n.baseData),n.pid&&o(t,n.pid)};o(r,n);var a={left:0,top:0};return i.map((function(t){t&&(a.left+=t.left,a.top+=t.top)})),a},_e=function(t,n,r){var i=t.slice();return r||(i=e.cloneDeep(t)),i.length>1&&i.sort((function(t,e){return t.baseData[n]-e.baseData[n]})),i},De=function(t,e){var n=[];return t.map((function(t){var r=e.find((function(e){return e.cid===t}));r&&n.push(r)})),Se(n)},Se=function(t,e){if(t.length>0){var n={left:0,top:0,width:0,height:0},r=_e(t,"left",e),i=_e(t,"top",e),o=r[0].baseData,a=r[r.length-1].baseData,s=i[0].baseData,l=i[i.length-1].baseData,c=Math.max.apply(Math,i.map((function(t){return 1*t.baseData.top+1*t.baseData.height}))),u=Math.max.apply(Math,i.map((function(t){return 1*t.baseData.left+1*t.baseData.width})));return n.left=o.left,n.width=Math.max(1*a.left+1*a.width,u)-1*o.left,n.top=s.top,n.height=Math.max(1*l.top+1*l.height,c)-1*s.top,n}return{left:0,top:0,width:0,height:0}};function xe(t){try{if(null==t||""===t)return 0;var e=t.toString().match(/^-?\d+\.?\d*/);return e?Number(e[0]):0}catch(t){return console.error("Error converting to number: ".concat(t)),0}}function ke(t){var e={};for(var n in t)if(t.hasOwnProperty(n))try{e[n]=xe(t[n])}catch(t){console.error("Error processing key ".concat(n,": ").concat(t)),e[n]=0}return e}var Te=function(t,n,r,i){var o=t.children,a=e.cloneDeep(n),s=e.cloneDeep(Se(o,i)),l=ke(a),c=l.left,u=l.top;l.width,l.height;var h=ke(s),d=h.left,f=h.top,p=h.width,m=h.height,g={left:c+d,top:u+f,width:p,height:m,angle:n.angle?n.angle:0};return o.forEach((function(t){var n=e.cloneDeep(t.baseData);t.baseData.left<0?n.left=0:n.left=n.left-d,t.baseData.top<0?n.top=0:n.top=n.top-f,t.baseData=n})),t.baseData=g,t.children=o,g},Ce=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];t[n].index=n,r.children&&r.children.length?Ce(r.children):e&&e(r)}},Oe=function(){return(Math.random().toString().substr(3,10)+Date.now()).toString()};function Ae(t,e){var n=t.types,r=t.element,i=t.actions,o=t.events,a=t.eventsComs;t.filter,bo.state.globalVars;for(var s=function(t){var e=n[t],s=r.tmpData.actions[t];if(s&&s.use){a&&a.push(r.cid);var l=s[s.behave];if(!l)return"continue";"vars"===s.behave?l.map((function(t){t.type=e,t.id=r.cid,t.model=0,t.originalValue||(t.originalValue=t.value),t.mapField&&i.push(t)})):l.length>0&&l.forEach((function(t,n){"toggle"===s.behave&&""!==t.value&&t.value.length&&o.push({id:r.cid,type:s.behave,children:t.value.map((function(t){return{cid:t.cid,visible:t.visible}})),eventType:e,index:n}),"update"===s.behave&&""!==t.value&&t.value.length?o.push({id:r.cid,type:s.behave,children:t.value.map((function(t){return{cid:t.cid,visible:t.visible}})),eventType:e,index:n}):"link"===s.behave&&""!==t.value?o.push({id:r.cid,type:s.behave,link:t.value,eventType:e,target:t.target,index:n}):"page"===s.behave&&""!==t.value?o.push({id:r.cid,type:s.behave,page:t.value,params:t.params,eventType:e,index:n}):"dynamic"===s.behave&&""!==t.value&&t.value.length>0?o.push({id:r.cid,type:s.behave,dynamic:t.value,eventType:e,index:n}):o.push(void 0)}))}},l=0;l<n.length;l++)s(l)}var Ee="anov@2019:helloX",Me="anov@2020:helloX";function Ne(t,e){var n=bo.state.globalVars,r={};n.forEach((function(t){(null==t?void 0:t.name)&&(r[t.name]=t.value||t.originvalue)}));try{return/^(?:[^\r\n]*[\r\n]){0,2}(?:[^\r\n]*(?=\{))?\s*(?:function\s*[^\r\n]*|\(.*?\))?\s*[\w\s\$\._\[\]]*\s*(?:[=:]\s*)?(?:new\s+)?[A-Z]\w*\s*(?:\[.*?\]|\([^\r\n]*\))*\s*\{.*?\}/i.test(t),new Function("data","vars",t)(e,r)}catch(t){return console.error(t),e}}var Pe={type:"static",converse:{use:!1,data:[]},static:{data:{},originData:""},api:{requestType:"get",url:"",headers:{use:!1,value:""},params:"",agency:!1,cookie:!0,autoUpdate:{open:!1,time:10},data:""},datasource:{data:"",inputSql:"",dsName:"",dsType:300,autoUpdate:{open:!1,time:10}},indicator:{zbId:"",zbName:"",params:"",data:"",autoUpdate:{open:!1,time:10}},staticFile:{data:"",dsName:"",dsType:201}},Ve=function(t){var e;try{var n=[];if((null==t?void 0:t.dynamicChildren)instanceof Map)for(var r=Array.from(null==t?void 0:t.dynamicChildren),i=0;i<r.length;i++)r[i]instanceof Array&&n.push.apply(n,r[i][1]);else if((null==t?void 0:t.dynamicChildren)instanceof Array)for(r=null==t?void 0:t.dynamicChildren,i=0;i<r.length;i++)r[i]instanceof Array&&n.push.apply(n,r[i][1]);if(null==n?void 0:n.length)for(var o=0,a=n;o<a.length;o++){var s=a[o];if(s){var l=null===(e=null==s?void 0:s.tmpData)||void 0===e?void 0:e.source,c=l.type;l&&"packData"==c&&(s.tmpData.source.packData.data=t.source[0])}}}catch(t){console.log(t)}},Re=Object.defineProperty,Be=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,je=(t,e,n)=>e in t?Re(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Le=(t,e)=>{for(var n in e||(e={}))Ie.call(e,n)&&je(t,n,e[n]);if(Be)for(var n of Be(e))Fe.call(e,n)&&je(t,n,e[n]);return t},ze=Symbol.for("immer-nothing"),Ye=Symbol.for("immer-draftable"),He=Symbol.for("immer-state"),Ue="production"!==U.env.NODE_ENV?[function(t){return`The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`},function(t){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${t}'`},"This object has been frozen and should not be mutated",function(t){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+t},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(t){return`'current' expects a draft, got: ${t}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(t){return`'original' expects a draft, got: ${t}`}]:[];function qe(t,...e){if("production"!==U.env.NODE_ENV){const n=Ue[t],r="function"==typeof n?n.apply(null,e):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Ge=Object.getPrototypeOf;function We(t){return!!t&&!!t[He]}function $e(t){var e;return!!t&&(Ze(t)||Array.isArray(t)||!!t[Ye]||!!(null==(e=t.constructor)?void 0:e[Ye])||en(t)||nn(t))}var Ke=Object.prototype.constructor.toString();function Ze(t){if(!t||"object"!=typeof t)return!1;const e=Ge(t);if(null===e)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Ke}function Xe(t,e){0===Je(t)?Reflect.ownKeys(t).forEach((n=>{e(n,t[n],t)})):t.forEach(((n,r)=>e(r,n,t)))}function Je(t){const e=t[He];return e?e.type_:Array.isArray(t)?1:en(t)?2:nn(t)?3:0}function Qe(t,e){return 2===Je(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function tn(t,e,n){const r=Je(t);2===r?t.set(e,n):3===r?t.add(n):t[e]=n}function en(t){return t instanceof Map}function nn(t){return t instanceof Set}function rn(t){return t.copy_||t.base_}function on(t,e){if(en(t))return new Map(t);if(nn(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=Ze(t);if(!0===e||"class_only"===e&&!n){const e=Object.getOwnPropertyDescriptors(t);delete e[He];let n=Reflect.ownKeys(e);for(let r=0;r<n.length;r++){const i=n[r],o=e[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Ge(t),e)}{const e=Ge(t);if(null!==e&&n)return Le({},t);const r=Object.create(e);return Object.assign(r,t)}}function an(t,e=!1){return ln(t)||We(t)||!$e(t)||(Je(t)>1&&(t.set=t.add=t.clear=t.delete=sn),Object.freeze(t),e&&Object.entries(t).forEach((([t,e])=>an(e,!0)))),t}function sn(){qe(2)}function ln(t){return Object.isFrozen(t)}var cn,un={};function hn(t){const e=un[t];return e||qe(0,t),e}function dn(){return cn}function fn(t,e){e&&(hn("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function pn(t){mn(t),t.drafts_.forEach(vn),t.drafts_=null}function mn(t){t===cn&&(cn=t.parent_)}function gn(t){return cn={drafts_:[],parent_:cn,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function vn(t){const e=t[He];0===e.type_||1===e.type_?e.revoke_():e.revoked_=!0}function yn(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return void 0!==t&&t!==n?(n[He].modified_&&(pn(e),qe(4)),$e(t)&&(t=bn(e,t),e.parent_||_n(e,t)),e.patches_&&hn("Patches").generateReplacementPatches_(n[He].base_,t,e.patches_,e.inversePatches_)):t=bn(e,n,[]),pn(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==ze?t:void 0}function bn(t,e,n){if(ln(e))return e;const r=e[He];if(!r)return Xe(e,((i,o)=>wn(t,r,e,i,o,n))),e;if(r.scope_!==t)return e;if(!r.modified_)return _n(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const e=r.copy_;let i=e,o=!1;3===r.type_&&(i=new Set(e),e.clear(),o=!0),Xe(i,((i,a)=>wn(t,r,e,i,a,n,o))),_n(t,e,!1),n&&t.patches_&&hn("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function wn(t,e,n,r,i,o,a){if("production"!==U.env.NODE_ENV&&i===n&&qe(5),We(i)){const a=bn(t,i,o&&e&&3!==e.type_&&!Qe(e.assigned_,r)?o.concat(r):void 0);if(tn(n,r,a),!We(a))return;t.canAutoFreeze_=!1}else a&&n.add(i);if($e(i)&&!ln(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;bn(t,i),e&&e.scope_.parent_||"symbol"==typeof r||!Object.prototype.propertyIsEnumerable.call(n,r)||_n(t,i)}}function _n(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&an(e,n)}var Dn={get(t,e){if(e===He)return t;const n=rn(t);if(!Qe(n,e))return function(t,e,n){var r;const i=kn(e,n);return i?"value"in i?i.value:null==(r=i.get)?void 0:r.call(t.draft_):void 0}(t,n,e);const r=n[e];return t.finalized_||!$e(r)?r:r===xn(t.base_,e)?(Cn(t),t.copy_[e]=On(r,t)):r},has:(t,e)=>e in rn(t),ownKeys:t=>Reflect.ownKeys(rn(t)),set(t,e,n){const r=kn(rn(t),e);if(null==r?void 0:r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const r=xn(rn(t),e),i=null==r?void 0:r[He];if(i&&i.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}(n,r)&&(void 0!==n||Qe(t.base_,e)))return!0;Cn(t),Tn(t)}return t.copy_[e]===n&&(void 0!==n||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty:(t,e)=>(void 0!==xn(t.base_,e)||e in t.base_?(t.assigned_[e]=!1,Cn(t),Tn(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0),getOwnPropertyDescriptor(t,e){const n=rn(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.type_||"length"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty(){qe(11)},getPrototypeOf:t=>Ge(t.base_),setPrototypeOf(){qe(12)}},Sn={};function xn(t,e){const n=t[He];return(n?rn(n):t)[e]}function kn(t,e){if(!(e in t))return;let n=Ge(t);for(;n;){const t=Object.getOwnPropertyDescriptor(n,e);if(t)return t;n=Ge(n)}}function Tn(t){t.modified_||(t.modified_=!0,t.parent_&&Tn(t.parent_))}function Cn(t){t.copy_||(t.copy_=on(t.base_,t.scope_.immer_.useStrictShallowCopy_))}Xe(Dn,((t,e)=>{Sn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Sn.deleteProperty=function(t,e){return"production"!==U.env.NODE_ENV&&isNaN(parseInt(e))&&qe(13),Sn.set.call(this,t,e,void 0)},Sn.set=function(t,e,n){return"production"!==U.env.NODE_ENV&&"length"!==e&&isNaN(parseInt(e))&&qe(14),Dn.set.call(this,t[0],e,n,t[0])};function On(t,e){const n=en(t)?hn("MapSet").proxyMap_(t,e):nn(t)?hn("MapSet").proxySet_(t,e):function(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:dn(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=Dn;n&&(i=[r],o=Sn);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}(t,e);return(e?e.scope_:dn()).drafts_.push(n),n}function An(t){if(!$e(t)||ln(t))return t;const e=t[He];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=on(t,e.scope_.immer_.useStrictShallowCopy_)}else n=on(t,!0);return Xe(n,((t,e)=>{tn(n,t,An(e))})),e&&(e.finalized_=!1),n}var En=new class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,e,n)=>{if("function"==typeof t&&"function"!=typeof e){const n=e;e=t;const r=this;return function(t=n,...i){return r.produce(t,(t=>e.call(this,t,...i)))}}let r;if("function"!=typeof e&&qe(6),void 0!==n&&"function"!=typeof n&&qe(7),$e(t)){const i=gn(this),o=On(t,void 0);let a=!0;try{r=e(o),a=!1}finally{a?pn(i):mn(i)}return fn(i,n),yn(r,i)}if(!t||"object"!=typeof t){if(r=e(t),void 0===r&&(r=t),r===ze&&(r=void 0),this.autoFreeze_&&an(r,!0),n){const e=[],i=[];hn("Patches").generateReplacementPatches_(t,r,e,i),n(e,i)}return r}qe(1,t)},this.produceWithPatches=(t,e)=>{if("function"==typeof t)return(e,...n)=>this.produceWithPatches(e,(e=>t(e,...n)));let n,r;const i=this.produce(t,e,((t,e)=>{n=t,r=e}));return[i,n,r]},"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),"boolean"==typeof(null==t?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){$e(t)||qe(8),We(t)&&(t=function(t){We(t)||qe(10,t);return An(t)}(t));const e=gn(this),n=On(t,void 0);return n[He].isManual_=!0,mn(e),n}finishDraft(t,e){const n=t&&t[He];n&&n.isManual_||qe(9);const{scope_:r}=n;return fn(r,e),yn(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}n>-1&&(e=e.slice(n+1));const r=hn("Patches").applyPatches_;return We(t)?r(t,e):this.produce(t,(t=>r(t,e)))}},Mn=En.produce;En.produceWithPatches.bind(En);var Nn=En.setAutoFreeze.bind(En);function Pn(t,e){return Nn(!1),Mn(t,e)}En.setUseStrictShallowCopy.bind(En),En.applyPatches.bind(En),En.createDraft.bind(En),En.finishDraft.bind(En);var Vn={updataArea:function(t,e){t.currentArea=e},selectdArea:function(t,e){var n=De(e,t.list);t.currentArea=n},updataAngle:function(t,e){var n=e.id,r=e.angle,i=ie(t.list,n);"boolean"!=typeof i&&(i.baseData.angle=r)},updataBaseData:function(t,e){var n,r=e.data;if(null==(null===(n=null==r?void 0:r.baseData)||void 0===n?void 0:n.opacity)&&(r.baseData.opacity=100),te(e.data.baseData,"updataBaseData")){var i=e.ratio,o=ie(t.list,r.cid),a=e.oldData;if("object"!=typeof o||o.pid){if("object"==typeof o&&o.pid){var s=ie(t.list,o.pid);"object"==typeof s?(o.baseData.left<0&&(o.baseData.left=0),o.baseData.top<0&&(o.baseData.top=0),Object.assign(o.baseData,r.baseData),Te(s,s.baseData),t.groupFlag=!t.groupFlag):s||(o.baseData.left<0&&(o.baseData.left=0),o.baseData.top<0&&(o.baseData.top=0),Object.assign(o.baseData,r.baseData))}}else if(Object.assign(o.baseData,r.baseData),i&&o.children&&o.children.length>0){var l=o.baseData.width/a.width,c=o.baseData.height/a.height;Qt(o.children,{xRatio:l,yRatio:c})}}},multipleUpdataBaseData:function(t,n){if(n.ratio)for(var r=n.newData,i=n.oldData,o=r.width/i.width,a=r.height/i.height,s=t.cache.length;s--;)t.cache[s].baseData.left=t.cache[s].baseData.left*o,t.cache[s].baseData.width=t.cache[s].baseData.width*o,t.cache[s].baseData.top=t.cache[s].baseData.top*a,t.cache[s].baseData.height=t.cache[s].baseData.height*a;else for(s=t.cache.length;s--;){var l=e.cloneDeep(t.cache[s].baseData);l.left=l.left+n.deltaX,l.top=l.top+n.deltaY,t.cache[s].comPanel?t.cache[s].comPanel.setAttrData(Object.assign(l,n.baseData)):t.cache[s].baseData=l}},multipleUpdata:function(t,e){var n=e.ids,r=e.data,i=ie(t.list,n);i&&Object.assign(i.baseData,r)},multipleMove:function(t,e){},move:function(t,e){var n=t.selectd,r=e.type,i=e.speed?e.speed:1;if(0!==n.length){var o=t.list.filter((function(t){return n.includes(t.cid)}));0==o.length&&(o=[ie(t.list,n[0])]);for(var a=0;a<o.length;a++){var s=o[a];if(s.pid&&t.selectd.length>1)return void console.warn("Only one component can be moved within a group");if("up"===r?s.baseData.top=s.baseData.top-i:"down"===r?s.baseData.top+=i:"left"===r?s.baseData.left-=i:"right"===r&&(s.baseData.left+=i),"object"==typeof s&&s.pid){var l=ie(t.list,s.pid);"object"==typeof l&&(Te(l,l.baseData),t.groupFlag=!t.groupFlag)}}}else console.warn("Warning! please select the component to move.")},updataGroupBaseData:function(t,n){var r=ie(t.list,n.pid),i=e.cloneDeep(r);ie(r.children,n.cid),Te(r,i.baseData)},editGroupBaseData:function(t,e){var n=ie(t.list,e);n.children.forEach((function(t){ye(t,n.baseData)}))},syncBaseData:function(t,n){var r=n.cid,i=n.data,o=n.isContainer,a=function(t){for(var e=0;e<t.length;e++)r===t[e].cid?(t[e].baseData=Object.assign({},t[e].baseData,i),console.log(u({},t[e].baseData))):t[e].hasOwnProperty("children")&&a(t[e].children)},s=Pn(t.list,(function(t){void 0!==o&&t.length&&a(t)}));if(o)t.list=s;else{var l=ie(s,r);if(l){var c=e.cloneDeep(l.baseData),h=Object.assign({},l.baseData,i);this.commit("GoCom/updataBaseData",{data:{cid:r,baseData:h},oldData:c,ratio:!0})}}},updataItemData:function(t,e){var n=e.cid,r=e.propsName,i=e.propsValue,o=ie(t.list,n);o&&(o[r]=i)},updataOpacity:function(t,e){var n=e.cid,r=e.propsValue,i=ie(t.list,n);"boolean"!=typeof i&&i&&(i.baseData.opacity=r)}},Rn=a((function(t){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.__esModule=!0,t.exports.default=t.exports}));o(Rn);var Bn={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},In=a((function(t){var e=Array.prototype.concat,n=Array.prototype.slice,r=t.exports=function(t){for(var r,i=[],o=0,a=t.length;o<a;o++){var s=t[o];(r=s)&&"string"!=typeof r&&(r instanceof Array||Array.isArray(r)||r.length>=0&&(r.splice instanceof Function||Object.getOwnPropertyDescriptor(r,r.length-1)&&"String"!==r.constructor.name))?i=e.call(i,n.call(s)):i.push(s)}return i};r.wrap=function(t){return function(){return t(r(arguments))}}})),Fn=a((function(t){var e=Object.hasOwnProperty,n=Object.create(null);for(var r in Bn)e.call(Bn,r)&&(n[Bn[r]]=r);var i=t.exports={to:{},get:{}};function o(t,e,n){return Math.min(Math.max(e,t),n)}function a(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}i.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=i.get.hsl(t),n="hsl";break;case"hwb":e=i.get.hwb(t),n="hwb";break;default:e=i.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},i.get.rgb=function(t){if(!t)return null;var n,r,i,a=[0,0,0,1];if(n=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(i=n[2],n=n[1],r=0;r<3;r++){var s=2*r;a[r]=parseInt(n.slice(s,s+2),16)}i&&(a[3]=parseInt(i,16)/255)}else if(n=t.match(/^#([a-f0-9]{3,4})$/i)){for(i=(n=n[1])[3],r=0;r<3;r++)a[r]=parseInt(n[r]+n[r],16);i&&(a[3]=parseInt(i+i,16)/255)}else if(n=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(r=0;r<3;r++)a[r]=parseInt(n[r+1],0);n[4]&&(n[5]?a[3]=.01*parseFloat(n[4]):a[3]=parseFloat(n[4]))}else{if(!(n=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(n=t.match(/^(\w+)$/))?"transparent"===n[1]?[0,0,0,0]:e.call(Bn,n[1])?((a=Bn[n[1]])[3]=1,a):null:null;for(r=0;r<3;r++)a[r]=Math.round(2.55*parseFloat(n[r+1]));n[4]&&(n[5]?a[3]=.01*parseFloat(n[4]):a[3]=parseFloat(n[4]))}for(r=0;r<3;r++)a[r]=o(a[r],0,255);return a[3]=o(a[3],0,1),a},i.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,o(parseFloat(e[2]),0,100),o(parseFloat(e[3]),0,100),o(isNaN(n)?1:n,0,1)]}return null},i.get.hwb=function(t){if(!t)return null;var e=t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,o(parseFloat(e[2]),0,100),o(parseFloat(e[3]),0,100),o(isNaN(n)?1:n,0,1)]}return null},i.to.hex=function(){var t=In(arguments);return"#"+a(t[0])+a(t[1])+a(t[2])+(t[3]<1?a(Math.round(255*t[3])):"")},i.to.rgb=function(){var t=In(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},i.to.rgb.percent=function(){var t=In(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},i.to.hsl=function(){var t=In(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},i.to.hwb=function(){var t=In(arguments),e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},i.to.keyword=function(t){return n[t.slice(0,3)]}}));Fn.to,Fn.get;const jn={};for(const t of Object.keys(Bn))jn[Bn[t]]=t;const Ln={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var zn=Ln;for(const t of Object.keys(Ln)){if(!("channels"in Ln[t]))throw new Error("missing channels property: "+t);if(!("labels"in Ln[t]))throw new Error("missing channel labels property: "+t);if(Ln[t].labels.length!==Ln[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=Ln[t];delete Ln[t].channels,delete Ln[t].labels,Object.defineProperty(Ln[t],"channels",{value:e}),Object.defineProperty(Ln[t],"labels",{value:n})}function Yn(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}function Hn(t){const e=function(){const t={},e=Object.keys(zn);for(let n=e.length,r=0;r<n;r++)t[e[r]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;){const t=n.pop(),r=Object.keys(zn[t]);for(let i=r.length,o=0;o<i;o++){const i=r[o],a=e[i];-1===a.distance&&(a.distance=e[t].distance+1,a.parent=t,n.unshift(i))}}return e}function Un(t,e){return function(n){return e(t(n))}}function qn(t,e){const n=[e[t].parent,t];let r=zn[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)n.unshift(e[i].parent),r=Un(zn[e[i].parent][i],r),i=e[i].parent;return r.conversion=n,r}Ln.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=o-i;let s,l;o===i?s=0:e===o?s=(n-r)/a:n===o?s=2+(r-e)/a:r===o&&(s=4+(e-n)/a),s=Math.min(60*s,360),s<0&&(s+=360);const c=(i+o)/2;return l=o===i?0:c<=.5?a/(o+i):a/(2-o-i),[s,100*l,100*c]},Ln.rgb.hsv=function(t){let e,n,r,i,o;const a=t[0]/255,s=t[1]/255,l=t[2]/255,c=Math.max(a,s,l),u=c-Math.min(a,s,l),h=function(t){return(c-t)/6/u+.5};return 0===u?(i=0,o=0):(o=u/c,e=h(a),n=h(s),r=h(l),a===c?i=r-n:s===c?i=1/3+e-r:l===c&&(i=2/3+n-e),i<0?i+=1:i>1&&(i-=1)),[360*i,100*o,100*c]},Ln.rgb.hwb=function(t){const e=t[0],n=t[1];let r=t[2];const i=Ln.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(n,r));return r=1-1/255*Math.max(e,Math.max(n,r)),[i,100*o,100*r]},Ln.rgb.cmyk=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(1-e,1-n,1-r);return[100*((1-e-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*i]},Ln.rgb.keyword=function(t){const e=jn[t];if(e)return e;let n,r=1/0;for(const e of Object.keys(Bn)){const i=Yn(t,Bn[e]);i<r&&(r=i,n=e)}return n},Ln.keyword.rgb=function(t){return Bn[t]},Ln.rgb.xyz=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*e+.3576*n+.1805*r),100*(.2126*e+.7152*n+.0722*r),100*(.0193*e+.1192*n+.9505*r)]},Ln.rgb.lab=function(t){const e=Ln.rgb.xyz(t);let n=e[0],r=e[1],i=e[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*r-16,500*(n-r),200*(r-i)]},Ln.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100;let i,o,a;if(0===n)return a=255*r,[a,a,a];i=r<.5?r*(1+n):r+n-r*n;const s=2*r-i,l=[0,0,0];for(let t=0;t<3;t++)o=e+1/3*-(t-1),o<0&&o++,o>1&&o--,a=6*o<1?s+6*(i-s)*o:2*o<1?i:3*o<2?s+(i-s)*(2/3-o)*6:s,l[t]=255*a;return l},Ln.hsl.hsv=function(t){const e=t[0];let n=t[1]/100,r=t[2]/100,i=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=o<=1?o:2-o;return[e,100*(0===r?2*i/(o+i):2*n/(r+n)),100*((r+n)/2)]},Ln.hsv.rgb=function(t){const e=t[0]/60,n=t[1]/100;let r=t[2]/100;const i=Math.floor(e)%6,o=e-Math.floor(e),a=255*r*(1-n),s=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,l,a];case 1:return[s,r,a];case 2:return[a,r,l];case 3:return[a,s,r];case 4:return[l,a,r];case 5:return[r,a,s]}},Ln.hsv.hsl=function(t){const e=t[0],n=t[1]/100,r=t[2]/100,i=Math.max(r,.01);let o,a;a=(2-n)*r;const s=(2-n)*i;return o=n*i,o/=s<=1?s:2-s,o=o||0,a/=2,[e,100*o,100*a]},Ln.hwb.rgb=function(t){const e=t[0]/360;let n=t[1]/100,r=t[2]/100;const i=n+r;let o;i>1&&(n/=i,r/=i);const a=Math.floor(6*e),s=1-r;o=6*e-a,1&a&&(o=1-o);const l=n+o*(s-n);let c,u,h;switch(a){default:case 6:case 0:c=s,u=l,h=n;break;case 1:c=l,u=s,h=n;break;case 2:c=n,u=s,h=l;break;case 3:c=n,u=l,h=s;break;case 4:c=l,u=n,h=s;break;case 5:c=s,u=n,h=l}return[255*c,255*u,255*h]},Ln.cmyk.rgb=function(t){const e=t[0]/100,n=t[1]/100,r=t[2]/100,i=t[3]/100;return[255*(1-Math.min(1,e*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},Ln.xyz.rgb=function(t){const e=t[0]/100,n=t[1]/100,r=t[2]/100;let i,o,a;return i=3.2406*e+-1.5372*n+-.4986*r,o=-.9689*e+1.8758*n+.0415*r,a=.0557*e+-.204*n+1.057*r,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),[255*i,255*o,255*a]},Ln.xyz.lab=function(t){let e=t[0],n=t[1],r=t[2];e/=95.047,n/=100,r/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(e-n),200*(n-r)]},Ln.lab.xyz=function(t){let e,n,r;n=(t[0]+16)/116,e=t[1]/500+n,r=n-t[2]/200;const i=n**3,o=e**3,a=r**3;return n=i>.008856?i:(n-16/116)/7.787,e=o>.008856?o:(e-16/116)/7.787,r=a>.008856?a:(r-16/116)/7.787,e*=95.047,n*=100,r*=108.883,[e,n,r]},Ln.lab.lch=function(t){const e=t[0],n=t[1],r=t[2];let i;i=360*Math.atan2(r,n)/2/Math.PI,i<0&&(i+=360);return[e,Math.sqrt(n*n+r*r),i]},Ln.lch.lab=function(t){const e=t[0],n=t[1],r=t[2]/360*2*Math.PI;return[e,n*Math.cos(r),n*Math.sin(r)]},Ln.rgb.ansi16=function(t,e=null){const[n,r,i]=t;let o=null===e?Ln.rgb.hsv(t)[2]:e;if(o=Math.round(o/50),0===o)return 30;let a=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return 2===o&&(a+=60),a},Ln.hsv.ansi16=function(t){return Ln.rgb.ansi16(Ln.hsv.rgb(t),t[2])},Ln.rgb.ansi256=function(t){const e=t[0],n=t[1],r=t[2];if(e===n&&n===r)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;return 16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},Ln.ansi16.rgb=function(t){let e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},Ln.ansi256.rgb=function(t){if(t>=232){const e=10*(t-232)+8;return[e,e,e]}let e;t-=16;return[Math.floor(t/36)/5*255,Math.floor((e=t%36)/6)/5*255,e%6/5*255]},Ln.rgb.hex=function(t){const e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},Ln.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let n=e[0];3===e[0].length&&(n=n.split("").map((t=>t+t)).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},Ln.rgb.hcg=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.max(Math.max(e,n),r),o=Math.min(Math.min(e,n),r),a=i-o;let s,l;return s=a<1?o/(1-a):0,l=a<=0?0:i===e?(n-r)/a%6:i===n?2+(r-e)/a:4+(e-n)/a,l/=6,l%=1,[360*l,100*a,100*s]},Ln.hsl.hcg=function(t){const e=t[1]/100,n=t[2]/100,r=n<.5?2*e*n:2*e*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[t[0],100*r,100*i]},Ln.hsv.hcg=function(t){const e=t[1]/100,n=t[2]/100,r=e*n;let i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],100*r,100*i]},Ln.hcg.rgb=function(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100;if(0===n)return[255*r,255*r,255*r];const i=[0,0,0],o=e%1*6,a=o%1,s=1-a;let l=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return l=(1-n)*r,[255*(n*i[0]+l),255*(n*i[1]+l),255*(n*i[2]+l)]},Ln.hcg.hsv=function(t){const e=t[1]/100,n=e+t[2]/100*(1-e);let r=0;return n>0&&(r=e/n),[t[0],100*r,100*n]},Ln.hcg.hsl=function(t){const e=t[1]/100,n=t[2]/100*(1-e)+.5*e;let r=0;return n>0&&n<.5?r=e/(2*n):n>=.5&&n<1&&(r=e/(2*(1-n))),[t[0],100*r,100*n]},Ln.hcg.hwb=function(t){const e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},Ln.hwb.hcg=function(t){const e=t[1]/100,n=1-t[2]/100,r=n-e;let i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],100*r,100*i]},Ln.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},Ln.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},Ln.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},Ln.gray.hsl=function(t){return[0,0,t[0]]},Ln.gray.hsv=Ln.gray.hsl,Ln.gray.hwb=function(t){return[0,100,t[0]]},Ln.gray.cmyk=function(t){return[0,0,0,t[0]]},Ln.gray.lab=function(t){return[t[0],0,0]},Ln.gray.hex=function(t){const e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},Ln.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};const Gn={};Object.keys(zn).forEach((t=>{Gn[t]={},Object.defineProperty(Gn[t],"channels",{value:zn[t].channels}),Object.defineProperty(Gn[t],"labels",{value:zn[t].labels});const e=function(t){const e=Hn(t),n={},r=Object.keys(e);for(let t=r.length,i=0;i<t;i++){const t=r[i];null!==e[t].parent&&(n[t]=qn(t,e))}return n}(t);Object.keys(e).forEach((n=>{const r=e[n];Gn[t][n]=function(t){const e=function(...e){const n=e[0];if(null==n)return n;n.length>1&&(e=n);const r=t(e);if("object"==typeof r)for(let t=r.length,e=0;e<t;e++)r[e]=Math.round(r[e]);return r};return"conversion"in t&&(e.conversion=t.conversion),e}(r),Gn[t][n].raw=function(t){const e=function(...e){const n=e[0];return null==n?n:(n.length>1&&(e=n),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(r)}))}));var Wn=Gn;const $n=["keyword","gray","hex"],Kn={};for(const t of Object.keys(Wn))Kn[[...Wn[t].labels].sort().join("")]=t;const Zn={};function Xn(t,e){if(!(this instanceof Xn))return new Xn(t,e);if(e&&e in $n&&(e=null),e&&!(e in Wn))throw new Error("Unknown model: "+e);let n,r;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof Xn)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=Fn.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,r=Wn[this.model].channels,this.color=e.value.slice(0,r),this.valpha="number"==typeof e.value[r]?e.value[r]:1}else if(t.length>0){this.model=e||"rgb",r=Wn[this.model].channels;const n=Array.prototype.slice.call(t,0,r);this.color=er(n,r),this.valpha="number"==typeof t[r]?t[r]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const r=e.sort().join("");if(!(r in Kn))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=Kn[r];const{labels:i}=Wn[this.model],o=[];for(n=0;n<i.length;n++)o.push(t[i[n]]);this.color=er(o)}if(Zn[this.model])for(r=Wn[this.model].channels,n=0;n<r;n++){const t=Zn[this.model][n];t&&(this.color[n]=t(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}Xn.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in Fn.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const n=1===e.valpha?e.color:[...e.color,this.valpha];return Fn.to[e.model](n)},percentString(t){const e=this.rgb().round("number"==typeof t?t:1),n=1===e.valpha?e.color:[...e.color,this.valpha];return Fn.to.rgb.percent(n)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const t={},{channels:e}=Wn[this.model],{labels:n}=Wn[this.model];for(let r=0;r<e;r++)t[n[r]]=this.color[r];return 1!==this.valpha&&(t.alpha=this.valpha),t},unitArray(){const t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,1!==this.valpha&&t.push(this.valpha),t},unitObject(){const t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,1!==this.valpha&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new Xn([...this.color.map(Jn(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new Xn([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:Qn("rgb",0,tr(255)),green:Qn("rgb",1,tr(255)),blue:Qn("rgb",2,tr(255)),hue:Qn(["hsl","hsv","hsl","hwb","hcg"],0,(t=>(t%360+360)%360)),saturationl:Qn("hsl",1,tr(100)),lightness:Qn("hsl",2,tr(100)),saturationv:Qn("hsv",1,tr(100)),value:Qn("hsv",2,tr(100)),chroma:Qn("hcg",1,tr(100)),gray:Qn("hcg",2,tr(100)),white:Qn("hwb",1,tr(100)),wblack:Qn("hwb",2,tr(100)),cyan:Qn("cmyk",0,tr(100)),magenta:Qn("cmyk",1,tr(100)),yellow:Qn("cmyk",2,tr(100)),black:Qn("cmyk",3,tr(100)),x:Qn("xyz",0,tr(95.047)),y:Qn("xyz",1,tr(100)),z:Qn("xyz",2,tr(108.833)),l:Qn("lab",0,tr(100)),a:Qn("lab",1),b:Qn("lab",2),keyword(t){return void 0!==t?new Xn(t):Wn[this.model].keyword(this.color)},hex(t){return void 0!==t?new Xn(t):Fn.to.hex(this.rgb().round().color)},hexa(t){if(void 0!==t)return new Xn(t);const e=this.rgb().round().color;let n=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===n.length&&(n="0"+n),Fn.to.hex(e)+n},rgbNumber(){const t=this.rgb().color;return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},luminosity(){const t=this.rgb().color,e=[];for(const[n,r]of t.entries()){const t=r/255;e[n]=t<=.04045?t/12.92:((t+.055)/1.055)**2.4}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){const e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level(t){const e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){const t=this.rgb().color;return(2126*t[0]+7152*t[1]+722*t[2])/1e4<128},isLight(){return!this.isDark()},negate(){const t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){const e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){const e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){const e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){const e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){const t=this.rgb().color,e=.3*t[0]+.59*t[1]+.11*t[2];return Xn.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){const e=this.hsl();let n=e.color[0];return n=(n+t)%360,n=n<0?360+n:n,e.color[0]=n,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);const n=t.rgb(),r=this.rgb(),i=void 0===e?.5:e,o=2*i-1,a=n.alpha()-r.alpha(),s=((o*a==-1?o:(o+a)/(1+o*a))+1)/2,l=1-s;return Xn.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(const t of Object.keys(Wn)){if($n.includes(t))continue;const{channels:e}=Wn[t];Xn.prototype[t]=function(...e){return this.model===t?new Xn(this):e.length>0?new Xn(e,t):new Xn([...(n=Wn[this.model][t].raw(this.color),Array.isArray(n)?n:[n]),this.valpha],t);var n},Xn[t]=function(...n){let r=n[0];return"number"==typeof r&&(r=er(n,e)),new Xn(r,t)}}function Jn(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function Qn(t,e,n){t=Array.isArray(t)?t:[t];for(const r of t)(Zn[r]||(Zn[r]=[]))[e]=n;return t=t[0],function(r){let i;return void 0!==r?(n&&(r=n(r)),i=this[t](),i.color[e]=r,i):(i=this[t]().color[e],n&&(i=n(i)),i)}}function tr(t){return function(e){return Math.max(0,Math.min(t,e))}}function er(t,e){for(let n=0;n<e;n++)"number"!=typeof t[n]&&(t[n]=0);return t}var nr=Xn,rr=a((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.array2obj=function(t,e){for(var n={},r=0;r<t.length;r++)n[t[r][e]]=t[r];return n},e.assignIn=function t(e,n){if(!n)return e;for(let r in n)r in e&&e[r]&&"object"==typeof e[r]&&!Array.isArray(e[r])?t(e[r],n[r]):e[r]=n[r];return e},e.capitalize=function(t){return`${t[0].toUpperCase()}${t.slice(1)}`},e.deepClone=function(t){return t&&JSON.parse(JSON.stringify(t))},e.determineResourcePath=function(t,e){if(t.startsWith("http"))return t;let n="";n=t.startsWith("/anov-prod")||t.startsWith("./anov-prod")?t:`${e}${t}`;return n},e.getMax=function(t,e){for(var n=0,r=t.length,i=0;i<r;i++){var o=t[i][e];n<o&&(n=o)}return n},e.getValueByPath=r,e.guid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},e.queryString=void 0,e.randomStr=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,e="";e="string"==typeof t?t:new Array(t).fill("%");let r=new Array(e.length).fill(null);for(let t=0;t<e.length;t++){let i=e[t];if("%"===i){let t=Math.random()*n.length|0;i=n[t]}r[t]=i}return r.join("")},e.round=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return+t.toFixed(e)},e.scaleLinear=function(t,e,n,r){if(t===e)throw Error("min 和 max 值不能相等");const i=(r-n)/(e-t);return t=>n+i*t},e.setValueByPath=function(t,e,n){if(e.startsWith(".")||e.endsWith("."))throw new Error("path 路径不符合规范,不能以'.'开头或结尾");let i=e;const o=e.lastIndexOf(".");if(o>0){t=r(t,e.slice(0,o)),i=e.slice(o+1)}null!=t&&(t[i]=n)},e.trimEndWhiteLine=e.stringFormatter=void 0;e.stringFormatter=(t,e)=>t.replace(/\{([^{^}]*)\}/g,((t,n)=>r(e,n)));e.queryString=t=>{for(var e=window.location.search.substring(1).split("&"),n=0;n<e.length;n++){var r=e[n].split("=");if(r[0]==t)return r[1]}return!1};const n=[...new Array(26).fill(0).map(((t,e)=>String.fromCharCode("a".charCodeAt(0)+e))),...new Array(26).fill(0).map(((t,e)=>String.fromCharCode("A".charCodeAt(0)+e))),...new Array(10).fill(0).map(((t,e)=>String.fromCharCode("0".charCodeAt(0)+e)))];function r(t,e){if(e.startsWith(".")||e.endsWith("."))throw new Error("path 路径不符合规范,不能以'.'开头或结尾");const n=e.split(".");let r=t;for(let t=0;t<n.length;t++){if(r=r[n[t]],null==r)break}return r}e.trimEndWhiteLine=t=>t.replace(/[\n\s]+$/,"")}));o(rr),rr.array2obj,rr.assignIn,rr.capitalize,rr.deepClone,rr.determineResourcePath,rr.getMax,rr.getValueByPath,rr.guid,rr.queryString,rr.randomStr,rr.round,rr.scaleLinear,rr.setValueByPath,rr.trimEndWhiteLine,rr.stringFormatter;var ir=a((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.setColorByTheme=function(t){r(t,!0)},e.setDefaultColorByTheme=function(t){r(t,!1)},e.setOptionColorByTheme=function(t,e,r){if(console.log(t,e,r),!r||!t||!e)return;let i=Reflect.ownKeys(r);for(let l of i){const i=r[l];let c,u=null,h=1,d=0;if("string"==typeof i)u=i;else if(Reflect.has(i,"key")){var o,a;u=i.key,h=null!==(o=i.opacity)&&void 0!==o?o:1,d=null!==(a=i.opacityStep)&&void 0!==a?a:0}if(u&&(c=(0,rr.getValueByPath)(e,u)),c){s(t,l,(0,n.default)(c),h,d)}}};var n=Rn(nr);function r(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],{theme:n,option:s,optionDes:l}=t;s&&l&&n&&Object.keys(l).forEach((c=>{"conditionSeries"===l[c].type||"tabs"===l[c].type?function(t,e,n,i,o,a){let s=e.form,l=t;if(Array.isArray(s))for(let t=0;t<s.length;t++){let e,n=s[t];e=a?l[t].form:l[t],r({option:e,optionDes:n,theme:i},o)}else{let t=l.length;for(let e=0;e<t;e++){let t;t=a?l[e].form:l[e],r({option:t,optionDes:s,theme:i},o)}}}(s[c],l[c],0,n,e,"conditionSeries"===l[c].type):l[c].theme?s.hasOwnProperty(c)&&function(t,e,n){let r,{theme:s,option:l,optionDes:c}=t;if("color"!=c[e].type||!n&&l[e]){if("bgcolor"==c[e].type&&(n||!l[e]||!l[e].style)){l[e]||(l[e]={});let{key:t,points:n,degree:u,type:h,opacity:d}=c[e].theme;if(n){u||(u=90),h||(h="linear");let t=`${h}-gradient(${u}deg`,c=100/(n.length-1),f=[];n.forEach(((e,n)=>{r=i(s,e),t+=`,${o(r,e.opacity)} ${c*n}%`;let{red:l,green:u,blue:h,alpha:p}=a(r,d);f.push({red:l,green:u,blue:h,alpha:p,left:c*n})})),t+=")",l[e].style=t,l[e].degree=u,l[e].flag=n.length?3:2,l[e].points=f,l[e].type=h}else t&&(r=i(s,c[e].theme),l[e]={...a(r,d),style:o(r,d)})}}else{let{opacity:t}=c[e].theme;r=i(s,c[e].theme),l[e]=o(r,t)}}(t,c,e):l[c].hasOwnProperty("type")&&"slot"!=l[c].type&&"textStyle"!=l[c].type&&"sheet"!=l[c].type||l[c].constructor!=Object||r({option:s[c],optionDes:l[c],theme:n},e)}))}function i(t,e){if(t[e.key])return t[e.key]||t.color;if(e.key.indexOf(".")>-1){return[t,...e.key.split(".")].reduce(((e,n)=>"object"==typeof e&&n in e?e[n]:(l(`属性${n}不存在,获取主题颜色错误,将使用默认主题色`),t.color)))}return l(`属性${e.key}不存在,获取主题颜色错误,将使用默认主题色`),t.color}function o(t,e){let{red:n,green:r,blue:i,alpha:o}=a(t,e);return`rgba(${n},${r},${i},${o})`}function a(t,e){return-1!=t.indexOf("#")&&(t=t.substr(1)),null==e&&(e=1),{red:parseInt("0x"+t.slice(0,2)),green:parseInt("0x"+t.slice(2,4)),blue:parseInt("0x"+t.slice(4,6)),alpha:e}}function s(t,e,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;const a=e.indexOf("@i");if(a>=0){const n=a>0?e.slice(0,a-1):"",l=n?(0,rr.getValueByPath)(t,n):t,c=e.indexOf(".",a),u=c>=0?e.slice(c):"";if(Array.isArray(l))for(let t=0;t<l.length;t++){s(l,`${t}${u}`,r,+(i+(o||0)*t).toFixed(2),o)}}else{let o=(0,rr.getValueByPath)(t,e);if(o){i=(0,n.default)(o).alpha()}const a=`rgba(${r.red()}, ${r.green()}, ${r.blue()}, ${null===i?1:Math.min(1,Math.max(0,i))})`;(0,rr.setValueByPath)(t,e,a)}}function l(t){console.warn(t)}}));o(ir),ir.setColorByTheme,ir.setDefaultColorByTheme;var or=ir.setOptionColorByTheme;function ar(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const sr=3e4,lr=3e4,cr=(t="",e)=>{let r=n.create({baseURL:t,timeout:sr,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}});return r.interceptors.request.use((function(t){return sessionStorage.getItem("anov-go-token")&&"null"!=sessionStorage.getItem("anov-go-token")&&(t.headers["X-ANOV-ACCESS-TOKEN"]=sessionStorage.getItem("anov-go-token")),sessionStorage.getItem("unify-access-token")&&"null"!=sessionStorage.getItem("unify-access-token")&&(t.headers["X-UNIFY-ACCESS-TOKEN"]=sessionStorage.getItem("unify-access-token")),sessionStorage.getItem("dgcc_authorization")&&"null"!=sessionStorage.getItem("dgcc_authorization")&&(t.headers.dgcc_authorization=sessionStorage.getItem("dgcc_authorization")),"post"===t.method?(t.headers["Content-Type"]="application/json;",t):"get"===t.method?t:"put"===t.method?(t.headers["Content-Type"]="application/json; charset=UTF-8",t):"delete"===t.method?t:void 0}),(function(t){return Promise.reject(t)})),r.interceptors.response.use((function(t){return 200===t.status||t.data.code,e&&e(t),t.data}),(function(t){return e&&e(null==t?void 0:t.response),Promise.reject(t.response)})),r},ur=function(t){return ar(this,void 0,void 0,(function*(){try{let{fontUrl:e,fontName:n}=t;const r="__custom_font__";let i=document.getElementById(r);if(!i){i=document.createElement("style"),i.id=r;const t=document.head||document.getElementsByTagName("head")[0];yield t.appendChild(i)}i.innerText+=`@font-face{font-family:'${n}';src:url(${e});}`}catch(t){console.warn(t)}}))},hr=(t,e="jspaths",n)=>ar(void 0,void 0,void 0,(function*(){const r="csspaths"===e?"link":"script",i=document.createElement(r);"jspaths"===e?i.defer=!0:i.rel="stylesheet",i.className=e,i.src=t,(n||document.head||document.getElementsByTagName("head")[0]).appendChild(i),yield new Promise(((t,e)=>{i.addEventListener("load",t),i.addEventListener("error",t)}))})),dr=(t,e="jspaths")=>ar(void 0,void 0,void 0,(function*(){const n="fonts"===e?ur:hr;yield Promise.all(t.map((t=>n(t))))})),fr=({jspaths:t=[],csspaths:n=[],fonts:r=[]})=>ar(void 0,void 0,void 0,(function*(){const i=e.uniqBy(r,"fontName");yield Promise.all([dr(t,"jspaths"),dr(n,"csspaths"),dr(i,"fonts")])})),pr=(t,e)=>{try{let n=e||window.location.href;if(-1!=n.indexOf("?")){let e={};return n.slice(n.indexOf("?")+1).split("&").forEach((t=>{let n=t.split("=");e[n[0]]=n[1]})),t?e[t]?e[t]:null:e}return console.log("没有参数"),null}catch(t){console.error(t)}};function mr(t,e=!1){try{return e?gr(t)?t:JSON.stringify(t):gr(t)?JSON.parse(t):t}catch(e){return console.log("转化JSON 发生错我!",t),t}}const gr=t=>{if("string"==typeof t)try{const e=JSON.parse(t);return"object"==typeof e&&null!==e}catch(t){return!1}return!1},vr=(t,e)=>{try{const n=JSON.stringify(e);sessionStorage.setItem(t,n)}catch(e){console.error(`Error setting session data for key ${t}:`,e)}},yr=t=>{const e=sessionStorage.getItem(t);if(e)try{return JSON.parse(e)}catch(e){console.error(`Error parsing session data for key ${t}:`,e)}return null},br=t=>{for(const e of t)e.code&&(e.code=e.code.replace(/>/g,">").replace(/</g,"<"))},wr=(t,e)=>{t instanceof Map?t.forEach((t=>{e([t])})):Array.isArray(t)&&t.forEach((t=>{e(t.children)}))},_r=(t,e)=>{const n=t=>{var r,i,o;if(t)for(const a of t){const t=null===(o=null===(i=null===(r=null==a?void 0:a.tmpData)||void 0===r?void 0:r.source)||void 0===i?void 0:i.converse)||void 0===o?void 0:o.data;(null==t?void 0:t.length)&&br(t),e(a),a.children?n(a.children):a.dynamicChildren?wr(a.dynamicChildren,n):a.stateChildren&&n(a.stateChildren)}};n(t)},Dr=(t,e,n,r)=>{const i=t.match(/({{[\w]*}})|((@)[\w]*)/gm);if(i){const t=i.map((t=>t.replace(/{{|}}|@/gm,"")));for(const i of t)if(i&&e&&!(e.findIndex((t=>t.mapField===i))<0))return n&&r&&Sr(r,i,n.cid),!0}return!1},Sr=(t,e,n)=>{if(!t)throw new Error("Share variable tree is not defined");if("string"!=typeof e)throw new Error("Variable name should be a string");if(!n)throw new Error("ID is required");Array.isArray(t[e])||(t[e]=[]),t[e].includes(n)||t[e].push(n)},xr=(t,e,n)=>{var r;let i=!1;const o=null==e?void 0:e.converse;if(o&&o.use&&o.data.length)for(const e of o.data)if((null==e?void 0:e.dependVars)&&e.dependVars.includes(t))return!0;const a=null==e?void 0:e[null==e?void 0:e.type];return((null==a?void 0:a.inputSql)||(null==a?void 0:a.url)||(null==a?void 0:a.headers)||(null==a?void 0:a.params))&&(i=Dr(a.inputSql||a.url||(null===(r=a.headers)||void 0===r?void 0:r.value)||a.params,n)),i},kr=(t,n,r=!1)=>{let i=null;const o=t=>{for(const a of t){if(a.cid===n){i=a,r&&e.remove(t,(t=>t.cid===n));break}if(a.children&&o(a.children),a.dynamicChildren&&Array.isArray(a.dynamicChildren))for(const[,t]of Array.from(a.dynamicChildren))o(t);a.stateChildren&&o(a.stateChildren)}};return o(t),i};function Tr(t,n,r){let i=e.cloneDeep(n);const o={};r&&r.forEach((t=>{(null==t?void 0:t.name)&&(o[t.name]=t.value||t.originvalue)}));try{return new Function("data","vars",t)(i,o)}catch(t){return console.error(t),i}}const Cr=t=>{let e=window.goFetchList;e&&e[t]&&delete e[t]};function Or(t){const e=t.match(/\.([^\/\\]+)$/);return e?e[1].toLowerCase():void 0}function Ar(t){let e=Jt.enc.Utf8.parse("anov@2019:helloX"),n=Jt.enc.Utf8.parse("anov@2020:helloX");return Jt.AES.encrypt(t,e,{iv:n,mode:Jt.mode.CBC,padding:Jt.pad.Pkcs7}).toString()}function Er(t,e){if(0===t.length)throw new Error("Array is empty.");if(!e)return t[Math.floor(Math.random()*t.length)];if(e.length!==t.length)throw new Error("Length of probabilities array must match length of array.");const n=e.reduce(((t,e)=>t+e),0),r=Math.random()*n;let i=0;for(let n=0;n<t.length;n++)if(i+=e[n],r<i)return t[n];return t[0]}const Mr=new Blob(["\nfunction proxyObj(originObj) {\n const exposeObj = new Proxy(originObj, {\n has: (target, key) => {\n if (['fetch', 'XMLHttpRequest', 'postMessage'].indexOf(key) >= 0) {\n throw new Error('Illegal operation for key'+key)\n } else {\n return target[key]\n }\n },\n })\n return exposeObj\n}\nfunction compileCode(src) {\n src = 'with (exposeObj) {'+src+'}'\n //console.log(src)\n return new Function('exposeObj', src)\n}\nfunction run(code) {\n let proxy = proxyObj({})\n let result = compileCode(code)(proxy)\n return result\n}\n\nonmessage = (e) => {\n try {\n let result = run(e.data.code)\n postMessage({\n code: 1,\n result,\n })\n } catch (err) {\n postMessage({\n code: -1,\n err,\n })\n }\n}\n"]),Nr=URL.createObjectURL(Mr);function Pr(t,e,n={},r="worker"){return ar(this,void 0,void 0,(function*(){try{if("window"==r){let[r,i]=[["data"],[e]];"object"==typeof n&&Object.keys(n).forEach((t=>{r.push(t),i.push(n[t])}));return{success:!0,data:new Function(...r,t)(...i)}}{let[r,i,o]=[e,n,""];"object"==typeof r&&(r=JSON.stringify(e)),"object"==typeof n&&(i=JSON.stringify(n)),Object.keys(n).forEach((t=>o+=`${t},`));let a=`let data=eval(${r}); \n let app=${JSON.stringify({})};`;a+=o?`let {${o}} = eval(${i}); `:"",a+=`${t}`;let s=yield function(t,e=5e3){return ar(this,void 0,void 0,(function*(){let n=new Worker(Nr);return new Promise(((r,i)=>{const o=()=>{clearTimeout(s),n.removeEventListener("message",a),n.terminate(),n=null},a=t=>{let{code:e,result:n,err:a}=t.data;o(),1===e?r(n):i(a)};n.postMessage({code:t}),n.addEventListener("message",a);let s=setTimeout((()=>{o(),i("timeout")}),e)}))}))}(a);return{success:!0,data:s}}}catch(t){return{success:!1,error:t,data:e}}}))}var Vr,Rr,Br,Ir,Fr;(Fr=Vr||(Vr={})).StaticFile="staticFile",Fr.DataSource="datasource",function(t){t.json="application/json;charset=UTF-8",t.form="application/x-www-form-urlencoded; charset=UTF-8"}(Rr||(Rr={})),function(t){t.get="GET",t.post="POST",t.put="PUT",t.patch="PATCH",t.delete="DELETE"}(Br||(Br={}));class jr{constructor(t){this.db=null,this.dbName=t.databaseName,this.tableName=t.tableName,this.keyPath=t.keyPath}static getInstance(t){return jr.instance||(jr.instance=new jr(t)),jr.instance}init(){return ar(this,void 0,void 0,(function*(){return new Promise(((t,e)=>{const n=indexedDB.open(this.dbName,1);n.onerror=t=>{e(t.target.error)},n.onupgradeneeded=t=>{this.db=t.target.result,this.db.objectStoreNames.contains(this.tableName)||this.db.createObjectStore(this.tableName,{keyPath:this.keyPath})},n.onsuccess=e=>{this.db=e.target.result,t()}}))}))}addRecord(t){return ar(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((e,n)=>{const r=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).add(t);r.onsuccess=()=>{e()},r.onerror=t=>{n(t.target.error)}}))}))}deleteRecord(t){return ar(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((e,n)=>{const r=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(t);r.onsuccess=()=>{e()},r.onerror=t=>{n(t.target.error)}}))}))}updateRecord(t){return ar(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((e,n)=>{const r=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t);r.onsuccess=()=>{e()},r.onerror=t=>{n(t.target.error)}}))}))}getRecord(t){return ar(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((e,n)=>{const r=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(t);r.onsuccess=()=>{e(r.result)},r.onerror=t=>{n(t.target.error)}}))}))}getAllRecords(){return ar(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,e)=>{const n=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAll();n.onsuccess=()=>{t(n.result)},n.onerror=t=>{e(t.target.error)}}))}))}}jr.instance=null,function(t){t[t.FATAL=0]="FATAL",t[t.ERROR=1]="ERROR",t[t.WARN=2]="WARN",t[t.INFO=3]="INFO",t[t.DEBUG=4]="DEBUG",t[t.TRACE=5]="TRACE"}(Ir||(Ir={}));const Lr={databaseName:"GODB",tableName:"go-log",keyPath:"time"};class zr{constructor(){this.logLevel=Ir.INFO,this.indexedDBInstance=jr.getInstance(Lr);try{this.indexedDBInstance.init(),console.log("IndexedDB 初始化成功。")}catch(t){console.error("初始化 IndexedDB 时出错:",t)}}static getInstance(){return zr.instance||(zr.instance=new zr),zr.instance}setLogLevel(t){this.logLevel=t}getColor(t){switch(t){case Ir.FATAL:return"[31;1m";case Ir.ERROR:return"[31m";case Ir.WARN:return"[33m";case Ir.INFO:return"[32m";case Ir.DEBUG:return"[36m";case Ir.TRACE:return"[34m";default:return"[0m"}}log(t,e){if(e<=this.logLevel){const n=(new Date).toISOString(),r=`[${n}] [${Ir[e]}]`,i=this.getColor(e);if(null===window||void 0===window?void 0:window.goDev)console.log(`${i}${r} ${t}[0m`);else{let e=yr("anov-go-userInfo"),o=yr("anov-go-proid"),a=` [操作人:${null==e?void 0:e.userName} 项目ID:${o}] `;const s={time:n,value:`${t}`};try{this.indexedDBInstance.addRecord(s)}catch(t){console.error("添加记录时出错:",t)}console.log(`${i}${r} ${a} ${t}[0m`)}}}fatal(t){this.log(t,Ir.FATAL)}error(t){this.log(t,Ir.ERROR)}warn(t){this.log(t,Ir.WARN)}info(t){this.log(t,Ir.INFO)}debug(t){this.log(t,Ir.DEBUG)}trace(t){this.log(t,Ir.TRACE)}}const Yr=zr.getInstance(),Hr=cr();let Ur=cr();function qr(t,n="get",r={},i={},o){return ar(this,void 0,void 0,(function*(){try{const a={method:Br[n],url:t,headers:i,timeout:lr};return["post","put"].includes(n.toLowerCase())?a.data=e.cloneDeep(r):a.params=e.cloneDeep(r),o&&(a.headers.sponsor=o),/.json$/.test(t)?function(t){return ar(this,void 0,void 0,(function*(){try{return(yield Hr({method:"get",url:t})).data}catch(t){throw console.error("JSON 数据请求:",t),t}}))}(t):function(t){return ar(this,void 0,void 0,(function*(){try{return{code:2e4,data:(yield Hr(t)).data}}catch(t){throw console.error("请求数据发生错误-Error:",t),t}}))}(a)}catch(t){throw console.error("获取数据:Error:",t),t}}))}function Gr(t,e,n,r,i){return ar(this,void 0,void 0,(function*(){try{const o=(window.anUrl||"")+(window.agentPath||"/ds/v1/api-proxy/v1/query"),a=mr(n,!0);return yield Hr({url:o,method:"post",headers:{"Content-Type":"application/json;charset=UTF-8",sponsor:i||""},data:{body:"post"===t?a:void 0,headers:gr(r)?mr(r,!0):r,method:t,url:e}})}catch(t){throw console.error("代理请求数据:Error12:",t),t}}))}function Wr(t,e,n,r,i,o){return ar(this,void 0,void 0,(function*(){return i?Gr(e,t,n,r,o):qr(t,e,n,r,o)}))}function $r(t,e="",n){var r,i,o,a;const s=`${null!==(i=null===(r=null===window||void 0===window?void 0:window.BaseUrl)||void 0===r?void 0:r.replace("/management",""))&&void 0!==i?i:""}/ds/data-engine/v1/${t}/zb-query?token=${(null===(o=ai("YZH_EXCHANGE_TOKEN"))||void 0===o?void 0:o.YZH_EXCHANGE_TOKEN)||(null===(a=null===window||void 0===window?void 0:window.yzhAuth)||void 0===a?void 0:a.getToken())}&passid=${null===window||void 0===window?void 0:window.gdPassid}${(null===window||void 0===window?void 0:window.BASE_RELEASE)?"&preview=1":""}`;let l={};try{l=e?JSON.parse(e):{}}catch(t){l=e||{}}return Hr({method:"POST",url:s,data:{headers:n,param:l},timeout:sr})}function Kr(t="",e){const n=`${null===window||void 0===window?void 0:window.BaseUrl}/ds/v1/data-views/query`;let r={};try{r=t?JSON.parse(t):{}}catch(e){r=t||{}}return Hr({method:"POST",url:n,data:{headers:e,param:r},timeout:sr})}const Zr=(t,e)=>ar(void 0,void 0,void 0,(function*(){const n=window.BaseUrl,{dateType:r="",endPeriod:i="",metricsName:o=t,startPeriod:a=""}=e;return Ur({method:"GET",url:`${n}ds/v1/metrics/v1/data-alarm?dateType=${r}&endPeriod=${i}&metricsName=${o}&startPeriod=${a}`,timeout:sr})})),Xr=(t,e,n)=>ar(void 0,void 0,void 0,(function*(){var r;const i=(null===(r=window.BaseUrl)||void 0===r?void 0:r.replace("/management",""))||"";e.newEncryption=!0;const o={staticFile:{method:"get",params:e,url:`${i}/ds/v1/file/v1/${t}/query`},datasource:{method:"post",url:`${i}/ds/v1/database/v1/${t}/query`,data:Object.assign({},e)}}[n];if(!o)throw new Error("Invalid data type provided");return Hr(Object.assign({timeout:sr},o))})),Jr=t=>new Promise(((e,n)=>{let r;r=t.originData&&Object.keys(t.originData).length?t.originData:t.data,void 0!==r?e({data:r}):n("Failed to retrieve cdata")})),Qr=(t,e,n)=>{try{switch(e){case"api":{let e=ci(t,n);return{requestType:e.requestType,url:e.url,params:e.params,headers:e.headers,agency:e.agency}}case"static":return{data:t};case"datasource":{const e=li(t.inputSql,n);return{dsName:t.dsName,dsType:"1",sql:Ar(e),filter:t.sqlFilter}}case"staticFile":return{dsName:t.dsName,dsType:t.dsType,sql:""};case"indicator":return{zbId:t.zbId,params:li(t.params,n),headers:li(t.headers,n)};case"dataSet":return{params:li(t.params,n),headers:li(t.headers,n)};case"indicatorCQ":return{zbName:t.zbName,params:li(t.params,n)};case"packData":return{};default:throw new Error("Invalid type")}}catch(e){console.log("准备请求数据发生错误",e,t)}},ti=(t,e,n)=>ar(void 0,void 0,void 0,(function*(){try{switch(e){case"api":return yield Wr(t.url,t.requestType,t.params,t.headers,t.agency,n);case"static":return yield Jr(t.data);case"datasource":return yield Xr(t.dsName,{dsType:t.dsType,sql:t.sql,filter:t.filter},"datasource");case"staticFile":return yield Xr(t.dsName,{dsType:t.dsType,sql:t.sql},"staticFile");case"indicator":return yield $r(t.zbId,t.params,t.headers);case"dataSet":return yield Kr(t.params,t.headers);case"indicatorCQ":return yield Zr(t.zbName,t.params);case"packData":return{};default:throw new Error("Invalid type")}}catch(t){return console.warn(t,"执行请求并获取数据发生错误"),yield new Promise(((t,e)=>{t({error:!0})}))}})),ei=(t,e,n,r=[],i=!1)=>ar(void 0,void 0,void 0,(function*(){const o=e||t.tmpData.source.dataType;if(!o)return console.warn(`fetdata error on fetchDataByType', dataType is ${o}`),new Promise(((t,e)=>{t({error:!0,data:null,msg:`dataType is ${o}`})}));const a=t.tmpData.source["indicatorCQ"==o?"indicator":o];if("globalData"===o){const t=r.find((t=>t.key===a.id||t.key===a.key)),e=yr(a.id);if(e&&!i)return e.data;if(t){let e=yield ni(t,n),r={key:a.id,data:e};return vr(a.id,r),e}return}const s=Qr(a,o,n),l=yield ti(s,o,t.cid?t.cid:"");return(null==l?void 0:l.data)?l.data:l})),ni=(t,e)=>ar(void 0,void 0,void 0,(function*(){let n=Object.assign({},{tmpData:{source:t.value}});const r=n.tmpData.source.type,i=n.tmpData.source[r],o=Qr(i,r,e),a=yield ti(o,r);return yield ri(a.data,n,!0,e)})),ri=(t,n,r=!0,i)=>ar(void 0,void 0,void 0,(function*(){try{const{converse:o,mapFields:a}=n.tmpData.source;return o&&o.use&&r?yield new Promise(((n,r)=>{const a=function(t,n,r,i,o){return ar(this,void 0,void 0,(function*(){let r,o=t,{use:a,data:s}=e.cloneDeep(n);if(a)for(let t=0;t<s.length;t++)if(s[t].use){let n=s[t].dependVars,a={};i&&a&&n&&n.length&&n.map((t=>{let n=e.cloneDeep(i).filter((e=>{let n=e.mapField==t;return n&&(a[t]=e.value),n}));n&&0!=n.length||(a[t]="")})),r=yield Pr(s[t].code,o,a,s[t].mode?s[t].mode:"worker"),o=r.data}return o}))}(e.cloneDeep(t),o,0,i);n(a)})):yield new Promise(((e,n)=>{e(t)}))}catch(e){return console.error("执行过滤器发生错误:"+e),yield new Promise(((e,n)=>{e(t)}))}})),ii=(t,e,n)=>{const{source:r}=t.tmpData,i=r.type;n?("static"===i&&r[i]&&(r[i].originData=n),"indicatorCQ"===i?r.indicator.data=e:r[i].data=e):"indicatorCQ"===i?r.indicator.data=e:r[i].data=e,t.source=e},oi=(t,e,n=[],r,i,o)=>ar(void 0,void 0,void 0,(function*(){try{let a=t.tmpData.source.type,s=yield ei(t,a,n,r,o||!1);if(null==s||!s)return i&&i({error:!0}),Promise.resolve({error:!0});let l=yield ri(s,t,e,n);return ii(t,l),i&&i(l),(null==t?void 0:t.cid)&&Cr(t.cid),Promise.resolve(l)}catch(e){return i&&i(e),Yr.error("Error in updateComData"),console.error("Error in updateComData:",e,t),Promise.reject(e)}})),ai=t=>{const e={};if(t&&t.includes("?")){const n=t.split("?")[1].split("&");for(let t of n){const[n,r]=t.split("=").map(decodeURIComponent);e[n]=r}}return e},si=t=>{try{return(null==t?void 0:t.value)&&"string"==typeof t.value?JSON.parse(t.value):"string"==typeof t?JSON.parse(t):t}catch(e){return t}},li=(t,e)=>{if(!e)return si(t);if("string"==typeof t){if(""===t.trim())return"";try{if("string"!=typeof JSON.parse(t))return li(JSON.parse(t),e);{let n=t.replace(/@(\w+)|{{(\w+)}}/g,((t,n,r)=>{const i=n||r,o=e.find((t=>t.mapField===i));return o?o.value||o.originalValue||"":t}));return si(n)}}catch(n){let r=t.replace(/@(\w+)|{{(\w+)}}/g,((t,n,r)=>{const i=n||r,o=e.find((t=>t.mapField===i));return o?o.value:t}));return si(r)}}else{if(Array.isArray(t))return t.map((t=>li(t,e)));if("object"==typeof t&&null!==t){const n={};for(let r in t)n[r]=li(t[r],e);return si(n)}}return si(t)},ci=(t,e)=>{const n=t.agency,r=t,{url:i=null,headers:o,params:a,requestType:s}=r,l=i?li(i,e):void 0,c=o&&o.use?li(o.value,e):{};return{url:l,requestType:s,params:a?li(a,e):{},headers:c,agency:n}},ui=(t,e,n,r,i)=>ar(void 0,void 0,void 0,(function*(){if(t&&t.length)for(const o of t)xr(e,o.value,n)&&(yield oi({tmpData:{source:{type:"globalData",globalData:{id:o.key}}}},!0,n,t,(t=>{console.log("数据更新成功-变量改变全局数据跟新")}),!0),_r(r,(e=>{var r,a,s;"globalData"===(null===(a=null===(r=null==e?void 0:e.tmpData)||void 0===r?void 0:r.source)||void 0===a?void 0:a.type)&&(null===(s=null==e?void 0:e.tmpData)||void 0===s?void 0:s.source.globalData).id===o.key&&oi(e,!0,n,t,(t=>{i(e,t)}),!1)})))})),hi=(t,e,n,r,i)=>ar(void 0,void 0,void 0,(function*(){t&&(yield oi({tmpData:{source:{type:"globalData",globalData:{id:t.key}}}},!0,e,n,(t=>{console.log("数据更新成功")}),!0),_r(r,(r=>{var o,a,s;"globalData"===(null===(a=null===(o=null==r?void 0:r.tmpData)||void 0===o?void 0:o.source)||void 0===a?void 0:a.type)&&(null===(s=null==r?void 0:r.tmpData)||void 0===s?void 0:s.source.globalData).id===t.key&&oi(r,!0,e,n,(t=>{i(r,t)}),!1)})))}));class di{constructor(t,e){this.isUpdating=!1,this.des=t.des,this.field=t.field,this.id=t.id,this.key=t.key,this.mapping=t.mapping,this.mapField=t.mapField,this.type=t.type,this.originalValue=t.originalValue,this.model=(null==t?void 0:t.model)?null==t?void 0:t.model:1,this.converter=t.converter,this.converterCode=t.converterCode,this.fork=t.fork,this.delayUpdate=!!(null==t?void 0:t.delayUpdate),e&&(this.globalVariables=e),t.fork&&(this.model=5,this.forkValue=t.forkValue,this.originalValue=this.getForkedValue())}get value(){if(this.fork&&(this.originalValue=this.getForkedValue()),this.converter&&this.converterCode){let t=[];return Tr(this.converterCode,this.originalValue,t)}return this.originalValue}togglePropertyState(t){let e=Object.prototype.hasOwnProperty.call(this,t);this[t]=!e||!t}getForkedValue(){if(this.forkValue&&Array.isArray(this.forkValue))return this.forkValue.map((t=>{const e=this.globalVariables.get(t);return e?e.value:null}));if(this.forkValue){const t=this.globalVariables.get(this.forkValue);return t?t.value:null}return null}updateValue(t,n){var r;const i=Object.assign({},this,t);this.des=i.des,this.field=i.field,this.mapping=i.mapping,this.type=i.type,this.originalValue=i.originalValue,this.converter=i.converter,this.converterCode=i.converterCode,this.fork=i.fork,this.delayUpdate=null==i?void 0:i.delayUpdate,this.model=null==i?void 0:i.model,t.id&&(this.id?"string"==typeof this.id?t.id instanceof Array?this.id=e.uniq([this.id,...t.id]):this.id=[this.id,t.id]:this.id instanceof Array&&(t.id instanceof Array?this.id=e.uniq([...this.id,...t.id]):this.id=e.uniq([...this.id,t.id])):this.id=t.id),t.fork&&(this.model=5,this.forkValue=null!==(r=t.forkValue)&&void 0!==r?r:this.forkValue,this.originalValue=this.getForkedValue()),n&&n(this)}updateWidthOriginalValue(t,e){var n;this.originalValue=t,this.fork&&(this.forkValue=null!==(n=this.forkValue)&&void 0!==n?n:this.forkValue,this.originalValue=this.getForkedValue()),e&&e(this)}renew(t){t&&t(this)}static create(t,e){return new di(t,e)}}class fi{constructor(){this.variables=new Map,this.globalObservers=[],this.url=window.location.search,this.list=[]}clearVars(){this.list=[],this.variables.clear()}togglePropertyState(t,e,n){try{let r=this.getVariable(t);if(!r)throw new Error("没有找到相应的变量!");r.togglePropertyState(e),this.addToObjectArray(this.list,r),n&&n()}catch(t){console.error(t)}}static getInstance(){return fi.instance||(fi.instance=new fi),fi.instance}getFullUrl(){this.url=window.location.search}getAllUrlParams(){const t=new URLSearchParams(window.location.search),e={};for(const[n,r]of t.entries())e[n]=r;return e}delVariable(t,e){this.variables.delete(t),this.list=this.list.filter((e=>e.mapField!=t)),e&&e()}addUrlParamsToGlobalVars(){this.getFullUrl();let t=this.getAllUrlParams(),e=Object.keys(t),n=[];for(const r of e)n.push({mapField:r,originalValue:t[r],model:4});if(n.length)for(const t of n)this.addVariable(t)}addVariables(t){Array.isArray(t)?t.map(((t,e)=>{this.addVariable(t)})):this.addVariable(t),this.addUrlParamsToGlobalVars()}addVariable(t,e){if(!t||!(null==t?void 0:t.mapField))return console.error(t+"参数不合法!"),!1;if(this.isVariableNameExist(t.mapField)){let n=this.getVariable(t.mapField);return this.sameValue(n,t)?n:(this.editVariable(t,e),!1)}const n=di.create(t,this.variables);return this.variables.set(n.mapField,n),this.addToObjectArray(this.list,n),e&&e(n),this.notifyGlobalObservers(n),n}toJSON(t){try{return!!t&&JSON.stringify(t)}catch(t){return!1}}sameValue(t,e){if(t.mapfield!==e.mapfield)return!1;for(const n in e)if(!(["mapfield","field","key","value","name","globalVariables"].includes(n)||n in t&&t[n]==e[n]))return!1;return!0}creatVarJson(t){const{des:e,field:n,id:r,key:i,mapping:o,mapField:a,type:s,value:l,originalValue:c,model:u,converter:h,converterCode:d,fork:f,forkValue:p,update:m,delayUpdate:g}=t,v={};return void 0!==e&&(v.des=e),void 0!==n&&(v.field=n),void 0!==r&&(v.id=r),void 0!==i&&(v.key=i),void 0!==o&&(v.mapping=o),void 0!==a&&(v.mapField=a),void 0!==s&&(v.type=s),void 0!==l&&(v.value=l),void 0!==c&&(v.originalValue=c),void 0!==u&&(v.model=u),void 0!==h&&(v.converter=h),void 0!==d&&(v.converterCode=d),void 0!==f&&(v.fork=f),void 0!==p&&(v.forkValue=p),void 0!==m&&(v.update=m),void 0!==g&&(v.delayUpdate=g),v}addToObjectArray(t,e){let n=!1;for(let r=0;r<t.length;r++)if(t[r].mapField==e.mapField){t[r]=this.creatVarJson(e),n=!0;break}n||t.push(e)}editVariable(t,e){const n=this.getVariable(t.mapField);if(n&&this.isVariableNameExist(t.mapField)&&this.sameValue(n,t))return;const r=t=>{t.isUpdating||(t.isUpdating=!0,this.notifyGlobalObservers(t),this.isMapFieldInForkValues(t.mapField).forEach((t=>{let e=this.getVariable(t.mapField);e&&e.renew((t=>{this.addToObjectArray(this.list,t),this.notifyGlobalObservers(t)}))})),this.addToObjectArray(this.list,t),e&&e(t),t.isUpdating=!1)};n?n.updateValue(t,r):this.addVariable(t,r)}getForkList(t){return this.isMapFieldInForkValues(t)||[]}editVariableForValue(t,e,n){const r=this.getVariable(t);r&&r.updateWidthOriginalValue(e,(t=>{t.isUpdating||(t.isUpdating=!0,this.notifyGlobalObservers(t),this.isMapFieldInForkValues(t.mapField).forEach((t=>{let e=this.getVariable(t.mapField);e&&e.renew((t=>{this.addToObjectArray(this.list,t),this.notifyGlobalObservers(t)}))})),this.addToObjectArray(this.list,t),n&&n(t),t.isUpdating=!1)}))}isMapFieldInForkValues(t){return this.getAllVariables().filter((t=>t.fork&&t.forkValue)).filter((e=>e.forkValue==t||Array.from(e.forkValue).includes(t)))}isVariableNameExist(t){return this.variables.has(t)}checkExist(t,e){if("string"==typeof t&&this.isVariableNameExist(t)){let n=this.getVariable(t);return e==n.id&&!n.id.includes(e)&&[{key:t}]}if(Array.isArray(t)){const n=t.filter((t=>{let n=this.getVariable(t);return this.isVariableNameExist(t)&&e!=n.id&&!(n.id&&n.id.includes(e))})).map((t=>({key:t})));return!!n.length&&n}return!1}getVariable(t){return this.variables.get(t)}getVariableForId(t){var n;let r=[];for(const[,e]of this.variables)(e.id===t||(null===(n=e.id)||void 0===n?void 0:n.includes(t)))&&r.push(e);return e.uniq(r)}getAllVariables(t=!1){return this.addUrlParamsToGlobalVars(),t?(this.list=Array.from(this.variables.values()),this.list):[...this.list]}restoreVariables(t){t.forEach((t=>{this.addVariable(t)}))}registerGlobalObserver(t){this.globalObservers.push(t)}notifyGlobalObservers(t){this.globalObservers.forEach((e=>{e.update(t)}))}}fi.instance=null;const pi=fi.getInstance(),mi=(t,e)=>Array.isArray(e)?e.some((e=>t&&(void 0!==t[e]||t.hasOwnProperty(e)))):"string"==typeof e&&t&&(void 0!==t[e]||t.hasOwnProperty(e)),gi=(t,e,n,r)=>{const i=((t,e,n,r)=>{var i;let o;if(mi(t,null==e?void 0:e.field)||mi(t,null==e?void 0:e.forkValue))o=t[null==e?void 0:e.field]||"";else if(mi(t.data,null==e?void 0:e.field)||mi(t.data,null==e?void 0:e.forkValue))o=t.data[null==e?void 0:e.field]||"";else{const t=kr(n,r),a=(null===(i=null==t?void 0:t.tmpData)||void 0===i?void 0:i.actions)||[];for(const t of a){const n=t.vars.find((t=>(null==t?void 0:t.mapField)===(null==e?void 0:e.mapField)));if(n){o=n.value;break}}}return o})(t,e,n,r);return void 0!==i?i:e.value},vi=(t,e,n,r,i,o,a,s,l)=>{var c;switch(t.type){case"link":let u=li(t.link,o);window.open(u,t.target);break;case"page":if(null===(c=null==t?void 0:t.params)||void 0===c?void 0:c.length)for(let e=0;e<t.params.length;e++){const n=t.params[e],r=o.find((t=>t.mapField==n.mapField));r&&(n.value=r.value)}l&&l(t);break;case"dynamic":((t,e,n,r,i)=>{const o=t.dynamic||[];for(const a of o){if(t.id!==e.cid)continue;const o=kr(n,a.pid);o&&(o.activeDynamic=a.name,o.isShow=a.visible||!r||t.index===e.index-1,i({cid:o.cid,flag:a.visible}))}})(t,e,n,r,i);break;case"toggle":((t,e,n,r,i)=>{const o=t.children||[];for(const n of o){const o=n.visible&&(!r||t.index===e.index-1);i({cid:n.cid,flag:o})}})(t,e,0,r,i);break;case"update":((t,e,n,r,i)=>{const o=t.children||[];for(const t of o){const o=kr(e,t.cid);o&&oi(o,!0,n,r,(t=>{i({cid:o.cid,data:t})}))}})(t,n,o,a,s)}},yi=(t,n,r,i,o,a,s,l,c,u)=>{const{cid:h,actions:d,index:f}=o,{eventName:p,mode:m}=d,g=2===m;((t,n,r,i,o,a)=>{let s=pi.getVariableForId(n.cid);if(null==s?void 0:s.length)for(const l of s)if(l.type==t){let t=gi(n,l,r,i);pi.editVariableForValue(l.mapField,t,(()=>{let t=o[l.mapField]||[],n=pi.getForkList(l.mapField);if(n)for(const r of n){let n=o[r.mapField];t=e.concat(t,n)}a&&a(l,e.uniq(t))}))}})(p,o,i,h,r,((t,e)=>{if(ui(c,t.mapFile,pi.getAllVariables(),i,((t,e)=>{s({cid:t.cid,data:e})})),null==e?void 0:e.length)for(const n of e){t.eventSourceId=n;const e=kr(i,n);!(null==t?void 0:t.delayUpdate)&&e&&oi(e,!0,pi.getAllVariables(),c,(t=>{s({cid:e.cid,data:t})}))}}));const v=((t,e,n,r,i)=>t.filter((t=>t.id===e&&t.eventType===n&&(!i||parseInt(t.index||"0")+1===parseInt(r||"0")))))(t,h,p,f,g);for(const t of v)vi(t,o,i,g,a,pi.getAllVariables(),c,s,l)};const bi=(t,e={})=>{let n={},r={type:"static",converse:{use:!1,data:[]},static:{data:t},api:{requestType:"get",url:"",headers:{use:!1,value:""},params:"",agency:!1,cookie:!0,autoUpdate:{open:!1,time:10},data:""}};return Object.assign(n,r,e),n},wi=(t,n,r)=>{let i=((t,n)=>{let{option:r,actions:i,data:o,optionDes:a,actionsDes:s,source:l,theme:c}=((t,n)=>{let{option:r,actions:i,data:o,optionDes:a,actionsDes:s,source:l,theme:c}=e.cloneDeep(n[t]);return{option:r,actions:i,data:o,optionDes:a,actionsDes:s,source:l,theme:c}})(t,n);return{iconClass:null,isAssembly:null,source:o,cid:(Math.random().toString().substr(3,10)+Date.now()).toString(),isLock:!1,isShow:!0,tmpData:{option:r,source:bi(o,l),actions:i},baseData:_i(),dynamic:null,filePath:"",origin:"anov-ui",name:"",componentType:"",viewComName:t,optionComName:"AnOptionPanel",dataComName:"AnSourcePanel",eventComName:"AnActionsPanel",assemblyDeveloper:"",devEmail:"",version:"",devDept:""}})(t,n);return r?e.merge(i,r):i},_i=t=>{let e={left:0,top:0,width:100,height:100,angle:0,penetrate:0,opacity:100,perspective:100,rotateX:0,rotateY:0,rotateZ:0,transformOriginX:"center",transformOriginY:"center",transformSwitch:!1};return t?Object.assign(e,t):e};const Di=new class{randomNum(t,e){return Math.floor(Math.random()*(e-t+1))+t}generateRandomIntArray(t,e,n,r){const i=[];for(let r=0;r<t;r++){const t=this.randomNum(e,n);i.push(t)}return r&&"asc"===r?i.sort(((t,e)=>t-e)):r&&"desc"===r?i.sort(((t,e)=>e-t)):i}randomString(t,e){const n=this.randomNum(t,e);let r="";for(let t=0;t<n;t++){const t=Math.floor(26*Math.random());r+="abcdefghijklmnopqrstuvwxyz".charAt(t)}return r}generateRandomNameArray(t,e,n){const r=[];for(let i=0;i<t;i++){const t=this.randomString(e,n);r.push(t)}return r}pick(t,e){const n=void 0!==e?t.filter((t=>t!==e)):t;return n[Math.floor(Math.random()*n.length)]}},Si=()=>{const t=[],e=Di.pick([!0,!1]);let n=Di.randomNum(3,20);const r=Di.pick([null,null,null,{}]);let i=Di.pick(["asc","desc",void 0,void 0,void 0]);for(let o=0;o<Di.randomNum(1,9);o++)t.push({data:Di.generateRandomIntArray(n,0,300,i),type:"line",smooth:e,symbolSize:Di.randomNum(1,10),lineStyle:{width:Di.randomNum(1,4)},areaStyle:r});return{xAxis:{type:"category",show:!1,boundaryGap:!1,data:Di.generateRandomNameArray(n,3,6)},grid:{left:0,top:0,bottom:0,right:0},yAxis:{show:!1,type:"value"},series:t}},xi=(t,e)=>{let n={type:t,show:!1};return"category"===t&&(n.data=Di.generateRandomNameArray(e,3,6)),n},ki=()=>{const t=[],e=Di.pick([!0,!1]);let n=Di.randomNum(3,20);const r=Di.pick([null,null,null,{}]);let i=Di.pick(["asc","desc",void 0,void 0,void 0]),o=Di.randomNum(1,9),a=Di.pick([!0,!1]);for(let s=0;s<o;s++){let o={data:Di.generateRandomIntArray(n,0,300,i),type:"bar",smooth:e,stack:a,areaStyle:r};t.push(o)}let s=Di.pick(["value","category"]),l=Di.pick(["value","category"],s);return{xAxis:xi(s,n),grid:{left:0,top:0,bottom:0,right:0},yAxis:xi(l,n),series:t}},Ti=()=>{const t=[];let e=Di.randomNum(3,20);Di.pick([null,null,null,{}]);let n=Di.pick(["asc","desc",void 0,void 0,void 0]),r=Di.pick([1,2]),i=[Di.pick(["10%","20%","30%","40%","50%","60%","70%","80%"]),Di.pick(["90%","100%"])];return t.push({data:Di.generateRandomIntArray(e,3,20,n),type:"pie",radius:1==r?"100%":i,roseType:1==r?Di.pick(["area",null,null]):null,padAngle:1==r?0:Di.randomNum(1,5),startAngle:1==r?Di.pick([0,180]):0,endAngle:360,label:{show:!1},itemStyle:{borderRadius:3}}),{grid:{left:0,top:0,bottom:0,right:0},series:t}},Ci=()=>{const t=[];Di.pick([!0,!1]),Di.randomNum(3,20),Di.pick([null,null,null,{}]),Di.pick(["asc","desc",void 0,void 0,void 0]);for(let e=0;e<Di.randomNum(1,20);e++){let e=Di.randomNum(3,Di.randomNum(3,20)),n=[];for(let t=0;t<e;t++){let t=[];for(let e=0;e<2;e++)t.push(Di.randomNum(1,30));n.push(t)}t.push({type:"scatter",symbolSize:Di.randomNum(3,30),data:n})}return{xAxis:{show:!1},grid:{left:0,top:0,bottom:0,right:0},yAxis:{show:!1,type:"value"},series:t}},Oi=()=>{const t=[],e=Di.pick(["polygon","circle"]);let n=Di.randomNum(1e4,99999),r=Di.randomNum(3,10),i=[];for(let t=0;t<r;t++)i.push({name:Di.randomString(4,8),max:n});for(let e=0;e<Di.randomNum(2,10);e++)t.push({value:Di.generateRandomIntArray(r,1e4,n),name:Di.randomString(4,8)});return{radar:{shape:e,indicator:i,axisName:{show:!1},radius:"100%"},grid:{left:0,top:0,bottom:0,right:0},series:[{type:"radar",symbol:"none",lineStyle:{width:1},data:t}]}},Ai=()=>{const t=[];for(let e=0;e<Di.randomNum(4,15);e++)t.push({value:Di.randomNum(1,100),name:Di.randomString(4,8)});return{grid:{left:0,top:0,bottom:0,right:0},series:[{type:"funnel",left:"0%",top:0,bottom:0,width:"100%",min:0,minSize:"0%",maxSize:"100%",label:{show:!1,position:"inside"},sort:Di.pick(["descending","ascending"]),gap:2,lineStyle:{width:1},data:t}]}};let Ei=Di.randomNum(5,20);const Mi={width:Ei};Di.pick([!0,!1])&&(Mi.color=[[.3,"#67e0e3"],[.7,"#37a2da"],[1,"#fd666d"]]);class Ni{constructor(){this.names=["line","bar","pie","scatter","radar","funnel","gauge"]}static getInstance(){return Ni.instance||(Ni.instance=new Ni),Ni.instance}createLine(){switch(Di.pick(this.names)){case"line":return{type:"line",typeNum:1,option:Si()};case"bar":return{type:"bar",typeNum:2,option:ki()};case"pie":return{type:"pie",typeNum:3,option:Ti()};case"scatter":return{type:"scatter",typeNum:4,option:Ci()};case"radar":return{type:"radar",typeNum:5,option:Oi()};case"funnel":return{type:"funnel",typeNum:6,option:Ai()};case"gauge":return{type:"gauge",typeNum:7,option:{grid:{left:0,top:0,bottom:0,right:0},series:[{type:"gauge",radius:"100%",detail:{formatter:"{value}"},progress:{show:Di.pick([!0,!1]),width:Ei},axisLine:{lineStyle:Mi},data:[{value:Di.randomNum(1,100),name:"SCORE"}]}]}}}}}Ni.instance=null;const Pi=Ni.getInstance(),Vi=new class{constructor(){this.directions=["row","row"],this.direction="column",this.splitNumbers=24,this.margin=[0,0]}baseLayout(t){const e=(null==t?void 0:t.maRrows)?null==t?void 0:t.maRrows:this.splitNumbers,n=(null==t?void 0:t.colNum)?null==t?void 0:t.colNum:this.splitNumbers,r=t.wrapWidth/n,i=t.wrapHeight/e;let o=Er(this.directions);o&&(this.direction=o);let a=[];if("row"===this.direction){let t=Er([3,4]);a=this.simulateRandomSegments(24,4,12,t)}else{let t=Er([2,3]);a=this.simulateRandomSegments(24,4,6,t)}let s=[],l=[];if("row"===this.direction){for(let t=0;t<a.length;t++)if(0==t)s.push({x:0,y:0,w:a[t],h:24,i:t,wStep:r,hStep:i});else{let e=s[t-1].x;s.push({x:a[t-1]+e,y:0,w:a[t],h:24,i:t,wStep:r,hStep:i})}let t=Er([2,3]),e=this.simulateRandomSegments(24,6,12,t);for(let t=0;t<s.length;t++){const n=s[t];for(let o=0;o<e.length;o++){const a=e[o];l.push({x:n.x,y:a,w:n.w,h:a,i:10*t+o,wStep:r,hStep:i})}}}else{for(let t=0;t<a.length;t++)if(0==t)s.push({x:0,y:0,w:24,h:a[t],i:t,wStep:r,hStep:i});else{let e=s[t-1].y;s.push({x:0,y:a[t-1]+e,w:24,h:a[t],i:t,wStep:r,hStep:i})}for(let t=0;t<s.length;t++){const e=s[t];let n=Er([1,2,3,4]),o=this.simulateRandomSegments(24,5,12,n),a=[];for(let n=0;n<o.length;n++){const s=o[n];if(0==n)a.push({x:0,y:e.y,w:s,h:e.h,i:10*t+n,wStep:r,hStep:i}),l.push({x:0,y:e.y,w:s,h:e.h,i:10*t+n,wStep:r,hStep:i});else{let c=a[n-1].x;a.push({x:o[n-1]+c,y:e.y,w:s,h:e.h,i:10*t+n,wStep:r,hStep:i}),l.push({x:o[n-1]+c,y:e.y,w:s,h:e.h,i:10*t+n,wStep:r,hStep:i})}}}}return{layouts:l.map((e=>{let{option:n,typeNum:r}=Pi.createLine(),i=e.x*e.wStep+e.w*e.wStep/2,o=e.y*e.hStep+e.h*e.hStep/2,a=e.w*e.wStep,s=e.h*e.hStep;if(3==r||5==r||7==r){let t=Math.min(a,s);a=t,s=t}let l=t.wrapWidth,c=t.wrapHeight;return e.chartsOption=n,e.typeNum=r,e.txt=r+" "+i/l+" "+o/c+" "+a/l+" "+s/c,console.log(e.txt),e})),option:{colNum:n,margin:(null==t?void 0:t.margin)?null==t?void 0:t.margin:this.margin,isDraggable:!!(null==t?void 0:t.isDraggable)&&(null==t?void 0:t.isDraggable),isResizable:!!(null==t?void 0:t.isResizable)&&(null==t?void 0:t.isResizable),verticalCompact:!(null==t?void 0:t.verticalCompact)||(null==t?void 0:t.verticalCompact),useCssTransforms:!(null==t?void 0:t.useCssTransforms)||(null==t?void 0:t.useCssTransforms),rowHeight:t.wrapHeight/e,maRrows:e}}}simulateRandomSegments(t,e,n,r){const i=[];let o=t,a=r;for(;a>0;)if(1===a)i.push(o),a--;else{const t=Math.min(n,o-e*(a-1)),r=Math.floor(Math.random()*(t-e+1))+e;i.push(r),o-=r,a--}return i}simulateRandomSegments2(t,e,n,r){const i=[];let o=t,a=r;for(;a>0;)if(1==a){const e=t-i.reduce(((t,e)=>t+e),0);i.push(e),a--}else{let t=Math.floor(Math.random()*n),r=Math.max(e,t),s=o-e*a;const l=Math.min(r,s);i.push(l),o-=l,a--}return i}},Ri=t=>{try{return JSON.parse(t)}catch(e){return t}},Bi=new class{constructor(){this.requested=new Set,this.dbName="go-db",this.storeName="store",this.init()}init(){return ar(this,void 0,void 0,(function*(){const t=indexedDB.open(this.dbName,1);t.onupgradeneeded=t=>{const e=t.target.result;e.objectStoreNames.contains(this.storeName)||e.createObjectStore(this.storeName,{keyPath:"key"})},t.onsuccess=()=>{},t.onerror=t=>{var e;console.error("数据库错误: "+(null===(e=t.target.error)||void 0===e?void 0:e.message))}}))}pushCaseIdToRequested(t){this.requested.add(t)}add(t,e){return ar(this,void 0,void 0,(function*(){if(!(yield this.isExist(t))){e.caseDetailData&&(e.caseDetailData="string"==typeof e.caseDetailData?Ri(e.caseDetailData):e.caseDetailData),this.pushCaseIdToRequested(t);const n=(yield this.getDB()).transaction(this.storeName,"readwrite");n.objectStore(this.storeName).add({key:t,value:e}),n.onerror=t=>{var e;console.error("事务错误: "+(null===(e=t.target.error)||void 0===e?void 0:e.message))}}}))}bulkPut(t){return ar(this,void 0,void 0,(function*(){const e=(yield this.getDB()).transaction(this.storeName,"readwrite"),n=e.objectStore(this.storeName);for(const e of t){const{caseId:t,id:r}=e,i=`${t}_${r}`;(yield this.isExist(i))||(e.caseDetailData&&(e.caseDetailData=Ri(e.caseDetailData)),this.pushCaseIdToRequested(i),n.put({key:i,value:e}))}e.onerror=t=>{var e;console.error("事务错误: "+(null===(e=t.target.error)||void 0===e?void 0:e.message))}}))}get(t){return ar(this,void 0,void 0,(function*(){if(!(yield this.isExist(t)))return null;const e=(yield this.getDB()).transaction(this.storeName,"readonly").objectStore(this.storeName);return new Promise(((n,r)=>{const i=e.get(t);i.onsuccess=t=>{n(t.target.result?t.target.result.value:null)},i.onerror=t=>{var e;r("请求错误: "+(null===(e=t.target.error)||void 0===e?void 0:e.message))}}))}))}getAllData(){return ar(this,void 0,void 0,(function*(){const t=(yield this.getDB()).transaction(this.storeName,"readonly").objectStore(this.storeName);return new Promise(((e,n)=>{const r=t.getAll();r.onsuccess=t=>{e(t.target.result)},r.onerror=t=>{var e;n("请求错误: "+(null===(e=t.target.error)||void 0===e?void 0:e.message))}}))}))}update(t,e){return ar(this,void 0,void 0,(function*(){if(yield this.isExist(t)){const n=yield this.get(t),r=Ri(e),i=(yield this.getDB()).transaction(this.storeName,"readwrite");i.objectStore(this.storeName).put({key:t,value:Object.assign(Object.assign({},n),{caseDetailData:r})}),i.onerror=t=>{var e;console.error("事务错误: "+(null===(e=t.target.error)||void 0===e?void 0:e.message))}}else console.error("更新 IndexedDB 错误")}))}delete(t){this.requested.delete(t),indexedDB.open(this.dbName).onsuccess=e=>{const n=e.target.result.transaction(this.storeName,"readwrite");n.objectStore(this.storeName).delete(t),n.onerror=t=>{var e;console.error("事务错误: "+(null===(e=t.target.error)||void 0===e?void 0:e.message))}}}isExist(t){return ar(this,void 0,void 0,(function*(){const e=(yield this.getDB()).transaction(this.storeName,"readonly").objectStore(this.storeName);return new Promise(((n,r)=>{const i=e.count(t);i.onsuccess=t=>{n(t.target.result>0)},i.onerror=t=>{var e;r("请求错误: "+(null===(e=t.target.error)||void 0===e?void 0:e.message))}}))}))}reset(){this.requested.clear(),indexedDB.open(this.dbName).onsuccess=t=>{const e=t.target.result.transaction(this.storeName,"readwrite");e.objectStore(this.storeName).clear(),e.onerror=t=>{var e;console.error("事务错误: "+(null===(e=t.target.error)||void 0===e?void 0:e.message))}}}clear(){return ar(this,void 0,void 0,(function*(){const t=(yield this.getDB()).transaction(this.storeName,"readwrite");t.objectStore(this.storeName).clear(),t.onerror=t=>{var e;console.error("事务错误: "+(null===(e=t.target.error)||void 0===e?void 0:e.message))}}))}isExistStore(){return ar(this,void 0,void 0,(function*(){const t=indexedDB.open(this.dbName);return new Promise((e=>{t.onsuccess=()=>{e(!0)},t.onerror=()=>{e(!1)}}))}))}getDB(){return ar(this,void 0,void 0,(function*(){return new Promise(((t,e)=>{const n=indexedDB.open(this.dbName);n.onsuccess=e=>{t(e.target.result)},n.onerror=t=>{var n;e("数据库错误: "+(null===(n=t.target.error)||void 0===n?void 0:n.message))}}))}))}};function Ii(t){!function(t,e){t.depends?or(t):Fi(t,!1)}(t)}function Fi(t,e=!0){let{theme:n,option:r,optionDes:i}=t;r&&i&&n&&Object.keys(i).forEach((o=>{"conditionSeries"!==i[o].type&&"tabs"!==i[o].type||!r[o]?i[o].theme?r.hasOwnProperty(o)&&function({theme:t,option:e,optionDes:n},r,i){let o;if("color"!=n[r].type||!i&&e[r]){if("bgcolor"==n[r].type&&(i||!e[r]||!e[r].style)){e[r]||(e[r]={});let{key:i,points:a,degree:s,type:l,opacity:c}=n[r].theme;if(a){s||(s=90),l||(l="linear");let n=`${l}-gradient(${s}deg`,i=100/(a.length-1),u=[];a.forEach(((e,r)=>{o=ji(t,e),n+=`,${Li(o,e.opacity)} ${i*r}%`;let{red:a,green:s,blue:l,alpha:h}=zi(o,c);u.push({red:a,green:s,blue:l,alpha:h,left:i*r})})),n+=")",e[r].style=n,e[r].degree=s,e[r].flag=a.length?3:2,e[r].points=u,e[r].type=l}else i&&(o=ji(t,n[r].theme),e[r]=Object.assign(Object.assign({},zi(o,c)),{style:Li(o,c)}))}}else{let{opacity:i}=n[r].theme;o=ji(t,n[r].theme),e[r]=Li(o,i)}}(t,o,e):i[o].hasOwnProperty("type")&&"slot"!=i[o].type&&"textStyle"!=i[o].type&&"sheet"!=i[o].type||i[o].constructor!=Object||Fi({option:r[o],optionDes:i[o],theme:n},e):function(t,e,n,r,i,o){let a=e.form,s=t;if(Array.isArray(a))for(let t=0;t<a.length;t++){let e,n=a[t];e=o?s[t].form:s[t],Fi({option:e,optionDes:n,theme:r},i)}else{let t=s.length;for(let e=0;e<t;e++){let t;t=o?s[e].form:s[e],Fi({option:t,optionDes:a,theme:r},i)}}}(r[o],i[o],0,n,e,"conditionSeries"===i[o].type)}))}function ji(t,e){return t[e.key]?t[e.key]||t.color:e.key.indexOf(".")>-1?[t,...e.key.split(".")].reduce(((e,n)=>"object"==typeof e&&n in e?e[n]:(Yi(`属性${n}不存在,获取主题颜色错误,将使用默认主题色`),t.color))):(Yi(`属性${e.key}不存在,获取主题颜色错误,将使用默认主题色`),t.color)}function Li(t,e){let{red:n,green:r,blue:i,alpha:o}=zi(t,e);return`rgba(${n},${r},${i},${o})`}function zi(t,e){return-1!=t.indexOf("#")&&(t=t.substr(1)),null==e&&(e=1),{red:parseInt("0x"+t.slice(0,2)),green:parseInt("0x"+t.slice(2,4)),blue:parseInt("0x"+t.slice(4,6)),alpha:e}}function Yi(t){console.warn(t)}var Hi=Object.freeze({__proto__:null,ConfigOptimizer:class{constructor(t,e,n){this.theme=null,this.plant=null,this.list=[],this.titleHeqadeHeight=70,this.clearance=3,this.checkComponentIntersection=(t,e,n=10)=>{const r=t.left,i=t.left+t.width,o=t.top,a=t.top+t.height,s=e.left,l=e.left+e.width,c=e.top,u=e.top+e.height,h=r<l&&i>s&&o<u&&a>c,d=Math.abs(t.left+t.width/2-(e.left+e.width/2)),f=Math.abs(t.top+t.height/2-(e.top+e.height/2));return h||d<n&&f<n},this.calculateCombinedComponent=t=>{if(0===t.length)return{left:0,top:0,width:0,height:0};let e=t[0].left,n=t[0].top,r=t[0].left+t[0].width,i=t[0].top+t[0].height;for(let o=1;o<t.length;o++){const a=t[o];e=Math.min(e,a.left),n=Math.min(n,a.top),r=Math.max(r,a.left+a.width),i=Math.max(i,a.top+a.height)}return{left:e,top:n,width:r-e,height:i-n}},this.getAnTextNormaltText=t=>{var e,n;try{return null===(n=null===(e=null==t?void 0:t.tmpData)||void 0===e?void 0:e.option)||void 0===n?void 0:n.text}catch(t){return console.error("配置优化(ConfigOptimizer):",t),""}},this.initProp(t),this.upgradePlant(),this.staticComponentData=e,this.upgradeHeaderComponent(),n&&Object.assign(this,n)}isStringOrObject(t){return"string"==typeof t?"string":"object"==typeof t&&null!==t&&"object"}initProp(t){try{let e,n=this.isStringOrObject(t);if(n&&"string"===n)e=JSON.parse(t);else{if(!n||"object"!==n)throw new Error(`initProp fn error :-- 传入参数${t}不合法!`);e=t}if(e){this.originData=e;const{theme:t,plant:n,list:r}=e;this.theme=t,this.plant=n,this.list=r,this.filterFileGroup()}}catch(t){console.error("配置优化(ConfigOptimizer):",t)}}upgradePlant(){this.plant&&(this.plant.option.bg={type:1,code:"70942ec525344c96aa32b81b2c9155f6",path:"/anov-prod/resources/page/png/bg22 科技星球背景.png",thumb:"/anov-prod/resources/page/thumbnail/1e48f8fb26ec4edfb1a0f499627e84fc.png"})}areComponentsIntersecting(t,e){let n=t.baseData,r=e.baseData;const i=Math.max(0,Math.min(n.left+n.width,r.left+r.width)-Math.max(n.left,r.left)),o=Math.max(0,Math.min(n.top+n.height,r.top+r.height)-Math.max(n.top,r.top));return i>0&&o>0}filterFileGroup(){this.list=e.cloneDeep(this.list).map((t=>{var e,n;if(1===(null===(e=null==t?void 0:t.children)||void 0===e?void 0:e.length)&&!(null===(n=null==t?void 0:t.children[0])||void 0===n?void 0:n.children)){const e=t.children[0],{left:n,top:r}=t.baseData;return e.baseData.left=n,e.baseData.top=r,e}return t}))}getText(t,e,n){const r=document.createElement("canvas").getContext("2d");if(!r)throw new Error("Failed to get 2D context from canvas.");return r.font=`${n}px ${e}`,r.measureText(t).width}calculateMaxWidths(t){const e=Math.min(...t.map((t=>t.width))),n=[];let r=[],i=t[0].width;for(const o of t){const t=o.width;Math.abs(t-i)<=e?r.push(t):(r.length>0&&n.push(r),r=[t]),i=t}r.length>0&&n.push(r);const o=[];for(const t of n){const e=Math.max(...t);o.push(e)}return o}findClosestValue(t,e){let n=e[0],r=Math.abs(t-n);for(const i of e){const e=Math.abs(t-i);e<r&&(r=e,n=i)}return n}adjustHeightAndTop(t,e){const n=e-t.height;return Object.assign(Object.assign({},t),{height:e,top:t.top-n/2})}findNearestComponent(t,n,r){let i=null,o=1/0;n.tmpData.option.textNormal.text;try{const a=e.cloneDeep(t).sort(((t,e)=>t.baseData.top-e.baseData.top)).sort(((t,e)=>t.baseData.left-e.baseData.left)).filter((t=>!(t.cid===n.cid||"AnTextNormal"===t.viewComName||r&&r.includes(t.cid)))),s=e.cloneDeep(n).baseData;s.top,s.height;for(const t of a){const e=t.baseData;if(e.top,e.height,s.left<e.left+e.width&&s.left+s.width>e.left){const n=e.top-s.top;n<o&&n<100&&(o=n,i=t)}}}catch(t){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",t)}return i}findNearestComponentForPoint(t,e,n){let r=null,i=1/0;e.tmpData.option.textNormal.text;try{const o=t.sort(((t,e)=>t.baseData.top-e.baseData.top)).sort(((t,e)=>t.baseData.left-e.baseData.left)).filter((t=>!(t.cid===e.cid||"AnTextNormal"===t.viewComName||n&&n.includes(t.cid)))),a=e.baseData;a.top,a.height;for(const t of o){const e=t.baseData;let n=this.getDistance(a.left,a.top+a.height,e.left,e.top);n<i&&n<a.width&&(i=n,r=t)}}catch(t){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",t)}return r}findNearestComponentForTitlePoint(t,e,n){let r=null,i=1/0;e.tmpData.option.textNormal.text;try{const o=t.sort(((t,e)=>t.baseData.top-e.baseData.top)).sort(((t,e)=>t.baseData.left-e.baseData.left)).filter((t=>!(t.cid===e.cid||"AnTextNormal"===t.viewComName||n&&n.includes(t.cid)))),a=e.baseData;a.top,a.height;for(const t of o){const e=t.baseData;let n=this.getDistance(a.left,a.top+a.height,e.left,e.top);n<i&&n<a.width&&e.top-a.top>100&&(i=n,r=t)}}catch(t){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",t)}return r}findNearestTitleForPoint(t,e,n){let r=null,i=1/0;e.tmpData.option.textNormal.text;try{const o=t.sort(((t,e)=>t.baseData.top-e.baseData.top)).sort(((t,e)=>t.baseData.left-e.baseData.left)).filter((t=>!(t.cid===e.cid||"AnTextNormal"===t.viewComName||n&&n.includes(t.cid)))),a=e.baseData;a.top,a.height;for(const t of o){const e=t.baseData;let n=e.top-a.top;n<i&&n<a.width&&e.top-a.top>100&&(i=n,r=t)}}catch(t){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",t)}return r}getDistance(t,e,n,r){return Math.sqrt(Math.pow(n-t,2)+Math.pow(r-e,2))}findNearestComponent2(t,n,r){let i=null,o=1/0,a=e.cloneDeep(t).sort(((t,e)=>t.baseData.top-e.baseData.top));try{const t=a.filter((t=>!(t.cid===n.cid||"AnTextNormal"===t.viewComName||r&&r.includes(t.cid)))),s=e.cloneDeep(n).baseData,l=s.top+s.height;for(const e of t){const t=e.baseData,n=t.top+t.height;if(s.left<t.left+t.width&&s.left+s.width>t.left){const t=n-l;t>=0&&t<o&&(o=t,i=e)}}}catch(t){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",t)}return i}verticalDistance(t,e){t.left,t.width;const n=t.top+t.height,r=(e.left,e.width,e.top);return Math.abs(n-r)}extractAmount(t){const e=t.match(/(\d{1,3}(?:,\d{3})*)(\D+)/);if(e){const t=e[1].replace(/,/g,"");return[parseInt(t,10),e[2].trim()]}return[!1,!1]}getAnTextNormal(){return this.list.filter((t=>"AnTextNormal"==t.viewComName))}getAnDeckTitle3(){return this.list.filter((t=>"AnDeckTitle3"==t.viewComName)).sort(((t,e)=>t.baseData.left-e.baseData.left))}judgeAnOdometer(){let t=this.getAnTextNormal().sort(((t,e)=>t.baseData.left-e.baseData.left)),e=[],n=new Set;for(const r of t){if(n.has(r.cid))continue;let i=[];for(const e of t)n.has(e.cid)||r.cid==e.cid||this.checkComponentIntersection(r.baseData,e.baseData)&&(n.add(e.cid),n.add(r.cid),i.push(e));e.push([r,...i])}let r=[];for(const t of e)for(const e of t){let n=this.getAnTextNormaltText(e);this.extractAmount(n).every((t=>t))&&r.push(t)}return r}createAnOdometer(){var t,n;let r=this.judgeAnOdometer();for(const i of r){let r,o,a,s=this.calculateCombinedComponent(i.map((t=>t.baseData)));for(const t of i){let n=this.getAnTextNormaltText(t),i=this.extractAmount(n);i.every((t=>!t))&&(r=n),i.every((t=>t))&&(o=i[0],a=i[1]),e.remove(this.list,(e=>e.cid==t.cid))}let l=wi("AnIndicatorNormal",this.staticComponentData,e.cloneDeep({baseData:s}));(null===(n=null===(t=null==l?void 0:l.tmpData)||void 0===t?void 0:t.source)||void 0===n?void 0:n.static)&&(l.tmpData.source.static.data={text:r,num:o,unit:a},l.tmpData.source.static.originData={text:r,num:o,unit:a}),this.list.push(l)}}upgradeHeaderComponent(){for(let t=0;t<this.list.length;t++){const e=this.list[t];"AnDeckHeader3"==e.viewComName&&(e.baseData.left=0,e.baseData.top=0)}}upgradeTitleComponent(){let t=this.getAnDeckTitle3().map((t=>t.baseData)),e=this.calculateMaxWidths(t);for(let t=0;t<this.list.length;t++){const n=this.list[t];if("AnDeckTitle3"==n.viewComName){let t=this.findClosestValue(n.baseData.width,e);n.baseData.width=t>300?t:300,n.baseData=this.adjustHeightAndTop(n.baseData,this.titleHeqadeHeight)}}this.removeErroneousComponents()}containsFractionStructure(t){return/\b\d+\/\d+\b/.test(t)}removeErroneousComponents(){let t=this.getAnDeckTitle3(),e=[];for(let n=0;n<t.length;n++){const r=t[n];let i=r.tmpData.option.textNormal.text;if(this.containsFractionStructure(i))for(let n=0;n<t.length;n++){const i=t[n];r.cid!=i.cid&&this.areComponentsIntersecting(r,i)&&e.push(r.cid)}}this.list=this.list.filter((t=>!e.includes(t.cid)))}upgradeGroupComponent(){try{let t=this.getAnDeckTitle3(),e=this.list.filter((t=>"AnDeckTitle3"!=t.viewComName&&"AnDeckHeader3"!=t.viewComName&&"AnTextNormal"!=t.viewComName)),n=[],r=[];for(let i=0;i<t.length;i++){const o=t[i];let a=this.findNearestComponentForPoint(e,o,n);if(a&&a.cid&&n.push(a.cid),a){o.baseData.left=a.baseData.left;let e=this.upgradeComponentHeight(o,t,r);e&&e>=30&&(a.baseData=Object.assign({},a.baseData,{top:o.baseData.top+o.baseData.height+this.clearance}))}}}catch(t){console.error("配置优化(ConfigOptimizer):",t)}}upgradeComponentHeight(t,n,r=[]){const i=t;let o=this.findNearestTitleForPoint(e.cloneDeep(n),i);return o?o.baseData.top-i.baseData.top-this.titleHeqadeHeight:1080-i.baseData.top-this.titleHeqadeHeight}getData(){return this.originData.list=this.list,this.originData.plant=this.plant,this.originData}},GlobalVariables:fi,Http:(t,e)=>"string"!=typeof t?Promise.reject(new Error("URL should be a string")):cr(t,e),Log:Yr,PageLoader:class{constructor(t){this.processedIds=new Set,this.validateAccessResolve=null,t?(t.caseId&&(this.caseId=t.caseId),t.pageId&&(this.pageId=t.pageId),t.mode&&(this.mode=t.mode),t.environment&&(this.environment=t.environment),t.xhr&&(this.xhr=t.xhr),t.staticComponentData&&(this.staticComponentData=t.staticComponentData),t.theme&&(this.theme=t.theme)):console.log("初始化错误!"),this.defaultTheme={name:"科技蓝",color:"#006aee",background:"#00000033",pageBackground:"#051836",text:"#F0F0F0",groups:["#006aee","#00eae9","#00a9ec","#00ec80","#edc700","#9913ee"]}}checkHardware(){return ar(this,void 0,void 0,(function*(){return yield new Promise(((t,e)=>{t("Hardware is not available")}))}))}checkSecurity(t){return ar(this,void 0,void 0,(function*(){return yield new Promise(((e,n)=>{"preview"==this.environment?e(0):this.getShareForRelease(t).then((t=>{2e4==t.code&&t.data?(t.data,t.data.loginLimitSwitch?e(1):t.data.hasAuth?e(2):e(3)):e(4)}))}))}))}validateAccess(t,e){return ar(this,void 0,void 0,(function*(){return new Promise(((n,r)=>{this.validateAccessResolve=n,e&&e(t)}))}))}initBefore(){return new Promise(((t,e)=>{let n=pr("secretFree");n?sessionStorage.setItem("secret-free",n):sessionStorage.setItem("secret-free",null),console.log("运行免登录设置完成!"),t(!0)}))}fetchCaseId(t,e){return ar(this,void 0,void 0,(function*(){try{const n=yield this.getKey(t,e);return 2e4===(null==n?void 0:n.code)&&(null==n?void 0:n.data)?n.data:t}catch(e){return console.error("Error fetching caseId:",e),t}}))}getDataForrelease(){return new Promise(((t,e)=>{t("data")}))}onProjectLoaded(t){}authenticate(){return ar(this,void 0,void 0,(function*(){this.environment}))}getShareForRelease(t){return this.xhr.get(`/go/v1/go-share/v1/${t}/config`)}findById(t,e="",n=0,r=""){return"release"===this.environment?this.xhr.get(`/go/v1/go-share/v1/${t}?pwd=${e}&mode=${n}&token=${r}`):this.xhr.get(`/go/v1/go-cases/v1/${t}?mode=${n}&token=${r}`)}getKey(t,e=0){return this.xhr.get(`/go/v1/go-cases/v1/key/${t}?caseMode=${e}`)}getPageData(t,e){return ar(this,void 0,void 0,(function*(){const n=yield Bi.get(t+"_"+e);return n?{data:n}:"release"===this.environment?this.xhr.get(`/go/v1/go-share/v1/${t}/pages/${e}`):this.xhr.get(`/go/v1/go-cases/v1/${t}/pages/${e}`)}))}getPageId(t,e){if(null==e?void 0:e.length){if(e.find((e=>e.id==t)))return t;let n=e.find((e=>e.caseDetailPath==t||e.caseDetailName==t));return n?n.id:t}return t}fetchProjectForId(t,e="",n=0,r=""){return ar(this,void 0,void 0,(function*(){return yield this.findById(t,e,n,r)}))}updataPageData(t,e){var n;return ar(this,void 0,void 0,(function*(){let r=yield this.getPageDataForID(t,e);(null==r?void 0:r.data)?null===(n=null==this?void 0:this.lifecycleHooks)||void 0===n||n.onPageDataReady(r.data.caseDetailData):console.error("请求数据发生错误!")}))}getPageDataForID(t,e,n){return ar(this,void 0,void 0,(function*(){const r=this.getPageId(e,this.projectInfo.details);if(this.processedIds.has(r)){console.log(`ID ${r} has already been processed.`);const e=yield Bi.get(t+"_"+r);if(e)return{data:e}}const i=this.getPageData(t,r);this.processedIds.add(r),n&&n.length&&n.map((e=>ar(this,void 0,void 0,(function*(){try{if(this.processedIds.has(e))return void console.log(`ID ${r} has already been processed.`);const n=yield this.getPageData(t,e);Bi.add(t+"_"+e,n.data),this.processedIds.add(e)}catch(t){console.error(`Error processing ID ${e}: ${t}`)}}))));const o=yield i;return Bi.add(t+"_"+r,o.data),yield i}))}fetchPageDataForId(t,e="",n=0,r=""){return ar(this,void 0,void 0,(function*(){return yield this.findById(t,e,n,r)}))}setTheme(){console.log("设置主题")}setBackground(){console.log("设置背景信息")}updateVariables(){console.log("更新变量信息")}beforeRender(t){}renderComponents(){return ar(this,void 0,void 0,(function*(){}))}setGlobalThemeVars(t){document.body.style.cssText=`\n --theme-background: ${t.background};\n --theme-color: ${t.color};\n --theme-pageBackground: ${t.pageBackground};\n --theme-text: ${t.text};\n ${t.groups.map(((t,e)=>`--theme-groups-${e}: ${t};`)).join("\n")}\n `}listenForRenderCompletion(){}showAnimation(){console.log("所有组件渲染完成,显示动画。")}setComTheme(t,e){var n,r;let i=null===(n=this.staticComponentData[e.viewComName])||void 0===n?void 0:n.optionDes,o=null===(r=this.staticComponentData[e.viewComName])||void 0===r?void 0:r.theme;return Ii({theme:t,option:e.tmpData.option,optionDes:i,depends:o}),e}getComData(t,e,n,r){return ar(this,void 0,void 0,(function*(){return new Promise(((i,o)=>{if(t.tmpData&&t.tmpData.source){this.setComTheme(r,t);try{oi(t,!0,e,n).then((e=>{e&&(t.source=e)})),i(1)}catch(t){i(t)}}else i("")}))}))}pageInit(t){var n;return ar(this,void 0,void 0,(function*(){try{let r=null==t?void 0:t.caseDetailData,i=this.defaultTheme;if((null==r?void 0:r.theme)&&(i=r.theme),this.setGlobalThemeVars(i),r.resource){let t=(null===(n=null===window||void 0===window?void 0:window.anovuiConfig)||void 0===n?void 0:n.fonts)||[],i=e.concat(r.resource.fonts,t),o=e.cloneDeep(r.resource);o.fonts=i,yield fr(o)}pi.clearVars(),pi.addVariables(r.globalVars);let o=pi.getAllVariables();return _r(r.list,(t=>ar(this,void 0,void 0,(function*(){yield this.getComData(t,o,r.globalSource,i)})))),r}catch(e){return console.warn("页面初始化发生错误:",e),(null==t?void 0:t.data)?t.data:t}}))}validate(t,e,n){return ar(this,void 0,void 0,(function*(){return new Promise(((r,i)=>{const o=(t,n)=>ar(this,void 0,void 0,(function*(){let i=yield this.validateAccess(t,n),a=(null==i?void 0:i.pwd)?i.pwd:"",s=(null==i?void 0:i.mode)?i.mode:0,l=(null==i?void 0:i.token)?i.token:"",c=yield this.fetchProjectForId(e,a,s,l);2e4==(null==c?void 0:c.code)&&(null==c?void 0:c.data)?(this.projectInfo=c.data,console.log("验证成功!"),this.lifecycleHooks.message("验证成功!"),r(!0)):(this.lifecycleHooks.validateError(c),this.lifecycleHooks.message(c.msg,"warning"),o(t,n))}));o(t,n)}))}))}init(t){var e;return ar(this,void 0,void 0,(function*(){try{this.lifecycleHooks=t,yield this.checkHardware();let n=yield this.fetchCaseId(this.caseId,this.mode),r=yield this.checkSecurity(n),i=t.onValidateAccess||(()=>{});(yield this.validate(r,n,i))&&t.onCaseReady(this.projectInfo);let o=(null===(e=this.projectInfo)||void 0===e?void 0:e.details).map((t=>t.id)),a=this.getPageId(this.pageId,this.projectInfo.details);console.log(a,this.pageId,"this.pageId");let s=yield this.getPageDataForID(n,a||o[0],o);const l=yield this.pageInit(s.data);return t.onPageDataReady(l),{currentData:this.projectInfo,currentPageData:l}}catch(t){console.error("加载页面时出错:",t)}}))}},addPreloadLink:(t,e,n)=>{const r=document.createElement("link");switch(r.rel="preload",r.href=t,r.crossorigin="anonymous",e){case"video":r.as="video";break;case"script":r.as="script";break;case"image":r.as="image"}r.onload=()=>{console.log(`success to preload ${t}`),n&&n()},r.onerror=()=>{console.error(`Failed to preload ${t}`)},document.head.appendChild(r)},agentData:Gr,applyDiff:function t(e,n){const r=Object.assign({},e);for(const e in n)n.hasOwnProperty(e)&&("object"!=typeof n[e]||null===n[e]||Array.isArray(n[e])?r[e]=n[e]:r[e]=t(r[e],n[e]));return r},delFetchStatus:Cr,diffObjects:function t(e,n){const r={};for(const i in e)if(e.hasOwnProperty(i))if("object"!=typeof e[i]||null===e[i]||Array.isArray(e[i]))Array.isArray(e[i])?JSON.stringify(e[i])!==JSON.stringify(n[i])&&(r[i]=n[i]):e[i]!==n[i]&&(r[i]=n[i]);else{const o=t(e[i],n[i]);null!==o&&Object.keys(o).length>0&&(r[i]=o)}return Object.keys(r).length>0?r:null},displayGenerator:Vi,editItem:ii,emitEvent:yi,fetchDataByGlobal:ni,fetchDataByType:ei,filterData:ri,findItemDeep:kr,findItemDeep2:(t,n,r)=>{let i=!1;const o=t=>{for(let a=0;a<t.length;a++){if(t[a].cid==n){i=t[a],r&&e.remove(t,(t=>t.cid==n));break}if(t[a].children)o(t[a].children);else if(t[a].dynamicChildren){if(t[a].dynamicChildren instanceof Map){let e=Array.from(t[a].dynamicChildren);for(let t=0;t<e.length;t++)if(e[t]instanceof Array){let n=e[t][1];o(n)}}else if(t[a].dynamicChildren instanceof Array){let e=t[a].dynamicChildren;for(let t=0;t<e.length;t++)if(e[t]instanceof Array){let n=e[t][1];o(n)}}}else t[a].stateChildren&&o(t[a].stateChildren)}};return o(t),i||!1},getData:qr,getDataForApi:Wr,getDataForDataSet:Kr,getDataForSource:Xr,getDataForStatic:Jr,getDataForZb:$r,getDataForZbCQ:Zr,getResourceForComponent:t=>{const e=[];let n=function(t){return t.endsWith("/")?t.slice(0,-1):t}(window.baseUrl);return _r(t,(t=>{var r,i,o,a,s,l,c,u,h;if("AnDeckHeader3"==t.viewComName&&(null===(o=null===(i=null===(r=null==t?void 0:t.tmpData)||void 0===r?void 0:r.option)||void 0===i?void 0:i.bgImage)||void 0===o?void 0:o.path)){let r=Or(t.tmpData.option.bgImage.path);e.push({type:r,url:n+t.tmpData.option.bgImage.path})}if("AnVideoNormal"==t.viewComName&&(null===(s=null===(a=null==t?void 0:t.tmpData)||void 0===a?void 0:a.option)||void 0===s?void 0:s.dynamicUrl)){let r=Or(null===(c=null===(l=null==t?void 0:t.tmpData)||void 0===l?void 0:l.option)||void 0===c?void 0:c.dynamicUrl);e.push({type:r,url:n+(null===(h=null===(u=null==t?void 0:t.tmpData)||void 0===u?void 0:u.option)||void 0===h?void 0:h.dynamicUrl)})}})),e},getSessionData:yr,getStandardData:mr,getStringVars:Dr,getUrlParams:pr,getVarDefaultVal:gi,globalVars:pi,hasVar:xr,isJSON:gr,loadFont:t=>ar(void 0,void 0,void 0,(function*(){t.fonts&&t.fonts.length&&(yield dr(t.fonts,"fonts"))})),loadFontResource:ur,loadScript:hr,loadTag:fr,recursion:_r,removeTag:()=>{var t;(null==(t=document.getElementById("__custom_font__"))?void 0:t.parentNode)&&t.parentNode.removeChild(t),Array.from(document.getElementsByTagName("script")).filter((t=>"jspaths"==t.className)).forEach((t=>{!function(t){for(var e,n=Array.from(document.getElementsByTagName("script")),r=0;r<n.length;r++)n[r]&&n[r].src&&-1!=n[r].src.indexOf(t)&&(null===(e=n[r])||void 0===e?void 0:e.parentNode)&&n[r].parentNode.removeChild(n[r])}(t.src)})),Array.from(document.getElementsByTagName("link")).filter((t=>"csspaths"==t.className)).forEach((t=>{!function(t){for(var e,n=Array.from(document.getElementsByTagName("link")),r=0;r<n.length;r++)n[r].href,n[r]&&n[r].href&&-1!=n[r].href.indexOf(t)&&(null===(e=n[r])||void 0===e?void 0:e.parentNode)&&n[r].parentNode.removeChild(n[r])}(t.href)}))},replaceVariable:li,safeEval:function(t,e,n){const r={};n&&n.forEach((t=>{(null==t?void 0:t.name)&&(r[t.name]=t.value||t.originvalue)}));try{return new Function("data","vars",t)(e,r)}catch(t){return console.error(t),e}},safeEvalForCode:Tr,setFetchStatus:t=>{let e=window.goFetchList;return e||(window.goFetchList={},e=window.goFetchList),e[t]?!e[t]&&void 0:(e[t]={id:t,time:(new Date).getTime()},!0)},setSessionData:vr,updataGlobalDataSourceForVar:ui,updateComData:oi,updateGlobalDataSource:hi}),Ui=function(t,n,r,i,o){var a;try{var s={},l=[],c=[],u=[],h=e.cloneDeep(t);return(null===(a=null===window||void 0===window?void 0:window.go)||void 0===a?void 0:a.dev)&&ce(t,(function(t){var e,n,r;if(null===(n=null===(e=null==t?void 0:t.tmpData)||void 0===e?void 0:e.actions)||void 0===n?void 0:n.length)for(var i=0,o=null===(r=null==t?void 0:t.tmpData)||void 0===r?void 0:r.actions;i<o.length;i++){var a=o[i];if("toggle"==a.behave){var s=a.toggle;if(null==s?void 0:s.length)for(var l=0,c=s;l<c.length;l++){var u=c[l],h=u.value;(null==h?void 0:h.length)&&(u.value=u.value.map((function(t){return{cid:t.cid,viewComName:t.viewComName,name:t.name,visible:t.visible}})))}}}})),ce(h,(function(t){var e,n;if(null===(n=null===(e=null==t?void 0:t.tmpData)||void 0===e?void 0:e.actions)||void 0===n?void 0:n.length){var r=t.tmpData.actions.map((function(t){return t.eventType}));Ae({types:r,element:t,actions:l,events:c,eventsComs:u,filter:o})}})),pi.addVariables(l),l=pi.getAllVariables(),ce(h,(function(t){var e,n=null===(e=null==t?void 0:t.tmpData)||void 0===e?void 0:e.source;qi(n,l,t,s)})),{shareVariableTree:s,globalVars:pi.getAllVariables(),globalEvents:c.filter((function(t){return t})),eventsComs:u}}catch(t){return console.error("error",t),{}}},qi=function(t,e,n,r){var i,o,a;if(t){var s=t[null==t?void 0:t.type],l=null==t?void 0:t.converse;l&&l.use&&l.data.length&&l.data.map((function(t){var e;(null==t?void 0:t.dependVars)&&(null===(e=null==t?void 0:t.dependVars)||void 0===e?void 0:e.length)&&t.dependVars.map((function(t){Wi(r,t,n.cid)}))})),(null==s?void 0:s.inputSql)&&Gi(null==s?void 0:s.inputSql,e,n,r),(null==s?void 0:s.url)&&Gi(s.url,e,n,r),(null==s?void 0:s.headers)&&(null===(i=null==s?void 0:s.headers)||void 0===i?void 0:i.use)&&(null===(o=null==s?void 0:s.headers)||void 0===o?void 0:o.value)&&Gi(null===(a=null==s?void 0:s.headers)||void 0===a?void 0:a.value,e,n,r),(null==s?void 0:s.params)&&Gi(null==s?void 0:s.params,e,n,r)}},Gi=function(t,e,n,r){"string"!=typeof t&&(t=JSON.stringify(t));var i=t.match(/({{[\w]*}})|((@)[\w]*)/gm);if(i){var o=i.map((function(t){return t.replace(/{{|}}|@/gm,"")}));if(n)for(var a=function(t){var i=o[t];if(!i||!e||e.findIndex((function(t){return t.mapField===i}))<0)return"continue";n&&r&&Wi(r,i,n.cid)},s=0;s<o.length;s++)a(s);else{var l=function(t){var i=o[t];return!i||!e||e.findIndex((function(t){return t.mapField===i}))<0?"continue":(n&&r&&Wi(r,i,n.cid),{value:!0})};for(s=0;s<o.length;s++){var c=l(s);if("object"==typeof c)return c.value}}}return!1},Wi=function(t,n,r){if(t[n]&&e.isArray(t[n])){t[n].push(r);var i=t[n];t[n]=e.uniq(i)}else t[n]=[],t[n].push(r)},$i=function(t){if("string"==typeof t)try{var e=JSON.parse(t);return!("object"!=typeof e||!e)}catch(t){return!1}return!1};var Ki={delListItem:function(t,n){var r=e.cloneDeep(t.list);"string"==typeof n?ie(r,n,!0):n.forEach((function(t){ie(r,t,!0)})),t.list=r,t.globalVars=Ui(t.list,t.globalConstant,t.sysConst).globalVars},editCloneCache:function(t,n){var r=e.cloneDeep(t.cloneCache);r.length&&r.map((function(t){t.baseData=Object.assign({},t.baseData,n)})),t.cloneCache=r},cloneItem:function(t){if(t.selectd.length>0){t.cloneCache=[];for(var n=function(n){var r=ie(t.list,t.selectd[n]);if("boolean"!=typeof r){var i=e.cloneDeep(r);if(i.pid="",(null==i?void 0:i.stateChildren)||(null==i?void 0:i.children))((null==i?void 0:i.stateChildren)?null==i?void 0:i.stateChildren:null==i?void 0:i.children).forEach((function(t){var e,n,r,o,a=t.cid;if(t.cid=Oe(),t.pid=i.cid,(null==i?void 0:i.stateChildren)&&(null===(n=null===(e=null==i?void 0:i.tmpData)||void 0===e?void 0:e.option)||void 0===n?void 0:n.children)){var s=null===(o=null===(r=null==i?void 0:i.tmpData)||void 0===r?void 0:r.option)||void 0===o?void 0:o.children.find((function(t){return t.cid==a}));s&&(s.cid=t.cid)}}));t.cloneCache.push(i),window.localStorage.setItem("cloneCache",JSON.stringify(t.cloneCache))}},r=0;r<t.selectd.length;r++)n(r)}},shearItem:function(t,n){if(t.selectd.length>0){t.cloneCache=[];for(var r=0;r<t.selectd.length;r++){var i=ie(t.list,t.selectd[r],!0);if("boolean"!=typeof i){var o=e.cloneDeep(i);t.cloneCache.push(o)}}t.selectd=[]}},pasteItem:function(t){var n,r;try{var i=(null===(r=e.cloneDeep(t.cloneCache))||void 0===r?void 0:r.length)?e.cloneDeep(t.cloneCache):JSON.parse(window.localStorage.getItem("cloneCache"));if(i.length>0){var o=[],a={};ce(i,(function(t){var e=Oe();if(a[t.cid]=e,t.cid=e,t&&t.children)for(var n=0,r=t.children;n<r.length;n++){r[n].pid=t.cid}else if(t.stateChildren)for(var i=0,s=t.stateChildren;i<s.length;i++){s[i].pid=t.cid}if("dynamicComponent"==t.componentType){var l=void 0;t.dynamicChildren instanceof Map?l=t.dynamicChildren.get(t.activeDynamic):t.dynamicChildren instanceof Array&&(l=t.dynamicChildren.find((function(e){return e[0]==t.activeDynamic}))),l.length>1&&(Array.isArray(l[1])?l[1].forEach((function(e){e.pid=t.cid})):l.forEach((function(e){e.pid=t.cid}))),1==l.length&&l.forEach((function(e){e.pid=t.cid}))}o.push(t.cid)})),t.selectd.length>0?De(t.selectd,t.list):Se(i),i.forEach((function(t){var e,n,r,i;if(t.baseData.top=t.baseData.top+20,t.baseData.left=t.baseData.left+20,t&&t.hasOwnProperty("stateChildren")&&(null===(n=null===(e=null==t?void 0:t.tmpData)||void 0===e?void 0:e.option)||void 0===n?void 0:n.children))for(var o=function(e){e.pid=t.cid;var n=null===(i=null===(r=null==t?void 0:t.tmpData)||void 0===r?void 0:r.option)||void 0===i?void 0:i.children.find((function(t){return t.disName==e.name}));n&&(n.cid=e.cid)},a=0,s=t.stateChildren;a<s.length;a++){o(s[a])}}));try{var s=Object.keys(a),l=JSON.stringify(i);(null==s?void 0:s.length)&&s.forEach((function(t){var e=a[t];-1!==l.indexOf(t)&&(l=l.replaceAll(null==t?void 0:t.toString(),null==e?void 0:e.toString()))})),i=JSON.parse(l)}catch(t){}(n=t.list).unshift.apply(n,e.cloneDeep(i)),t.selectd=o}}catch(t){console.warn(t)}},updataShow:function(t,e){var n=ie(t.list,e);if("boolean"!=typeof n){var r=!n.isShow;de(n,"isShow",r,"")}},changeShow:function(t,e){var n=e.cid,r=e.flag,i=ie(t.list,n);i&&de(i,"isShow",r,"")},comToggle:function(t,e){var n=ie(t.list,e);n&&pe(n)},updataLock:function(t,e){var n=ie(t.list,e);if("boolean"!=typeof n){var r=!n.isLock;de(n,"isLock",r,"")}},breakUp:function(t,e){var n,r;try{if(!e)throw"Please pass in the component CID correctly!";var i=ae(t.list,e),o=ie(t.list,e),a=o.baseData;if(isNaN(a.left)||isNaN(a.top))throw new Error("top or left is NAN");var s=ge(o,t.list);if(s.map((function(t){return t.pid=""})),i){var l=i.children.findIndex((function(t){return t.cid==e}));i.children.splice(l,1),(n=i.children).push.apply(n,s.reverse())}else{l=t.list.findIndex((function(t){return t.cid==e}));t.list.splice(l,1),(r=t.list).push.apply(r,s.reverse())}}catch(t){console.error(t)}},editGroup:function(t,e){var n,r=e.groupId;e.status;try{if(!r)throw"Please pass in the component CID correctly!";var i=t.list.findIndex((function(t){return t.cid===r})),o=t.list[i],a=ge(o);a.map((function(t){return t.pid=""})),t.list.splice(i,1),(n=t.list).push.apply(n,a)}catch(t){console.error(t)}},combination:function(t){e.cloneDeep(t.list);var n,r,i=[],o=[],a=Oe(),s=ie(t.list,t.selectd[0]);s.pid?console.info("Sorry, only level 2 is supported group"):s.children&&1===t.selectd.length?console.info("Sorry, only level 2 is supported group"):(t.selectd.forEach((function(e){var n=t.list.findIndex((function(t){return t.cid===e}));if(n>-1){i.push(n);var r=t.list.splice(n,1)[0];r.pid=a,o.push(r)}})),n=i.sort((function(t,e){return t-e}))[0],r=1===o.length?e.cloneDeep(o[0].baseData):t.currentArea,Object.assign(r,{angle:0,opacity:100,rotate:0,rotateY:0}),me(r,o),t.list.splice(n,0,{cid:a,pid:"",isShow:!0,isLock:!1,editer:!1,baseData:r,z:0,toggle:!0,name:"群组",type:"folder",origin:"anov-ui",tmpData:{actions:null,option:null,source:Pe},children:o}),ue(t.list),t.selectd=[a])},moveUp:function(t,e){try{var n=t.list.findIndex((function(t){return t.cid===e}));n>=1?ee(t.list,n-1,n):re(t.list,"up",e)}catch(t){console.error(t)}},moveDown:function(t,e){try{var n=t.list.findIndex((function(t){return t.cid===e}));n>-1&&n<=t.list.length-2?ee(t.list,n+1,n):re(t.list,"down",e)}catch(t){console.error(t)}},moveTop:function(t,e){try{var n=t.list.findIndex((function(t){return t.cid===e}));n>-1&&0!==n?ee(t.list,0,n):re(t.list,"top",e)}catch(t){console.error(t)}},moveBottom:function(t,e){try{var n=t.list.findIndex((function(t){return t.cid===e})),r=t.list.length-1;n>-1&&n!==r?ee(t.list,r,n):re(t.list,"bottom",e)}catch(t){console.error(t)}}};function Zi(t){var n=[],r=[];ce(e.cloneDeep(t),(function(t){var e,i;if(null===(i=null===(e=null==t?void 0:t.tmpData)||void 0===e?void 0:e.actions)||void 0===i?void 0:i.length){var o=t.tmpData.actions.map((function(t){return t.eventType}));Ae({types:o,element:t,actions:n,events:r})}}));var i=r.filter((function(t){return t}));return{actions:n,events:i}}var Xi={addGlobalSource:function(t,e){var n=e.name,r=e.value,i=Oe();t.globalSource.push({key:i,name:n,value:r}),hi({key:i,name:n,value:r},t.globalVars,t.globalSource,t.list,(function(t){}))},editGlobalSource:function(t,e){var n=this,r=e.key,i=e.value,o=t.globalSource.find((function(t){return t.key==r}));o&&(o.name=e.name,o.value=i,hi(o,t.globalVars,t.globalSource,t.list,(function(t,e){n.commit("GoCom/updataSourceForComponent",{cid:t.cid,data:e})})))},delGlobalSource:function(t,e){try{var n=t.globalSource.findIndex((function(t){return t.key===e}));-1!==n&&t.globalSource.splice(n,1)}catch(t){console.error("删除错误",t)}},setSyncFlag:function(t,e){t.syncFlag=e},goUpShareVar:function(t,e){t.shareVariable[e.key]=u({},e)},addGoRunVar:function(t,e){try{var n=Ui(t.list,t.globalConstant,t.sysConst);t.globalVars=n.globalVars,t.eventsComs=n.eventsComs}catch(t){console.warn(t)}},copyGoVar:function(t,n){try{for(var r=n.mapField,i=(r.toString().trim(),t.globalConstant.filter((function(t){return t.mapField.includes(r)}))),o=1,a=0;a<i.length;a++)o++;var s="".concat(r," (").concat(o,")"),l=t.globalConstant.find((function(t){return t.mapField==r}));if(r&&l){var c=e.cloneDeep(l);c.mapField=s,t.globalConstant.push(c);var u=Ui(t.list,t.globalConstant,t.sysConst);t.globalVars=u.globalVars,t.eventsComs=u.eventsComs}}catch(t){console.warn(t)}},goDelShareVar:function(t,e){delete t.shareVariable[e]},signal:function(t,e){},goSynchroDataAll:function(t,n){t.list=e.cloneDeep(n)},goSynchroDataForOption:function(t,e){if(t){var n=e.cid,r=e.value,i=ie(t.list,n);"boolean"!=typeof i&&i&&fe(i,r)}this.commit("GoCom/execute")},goSynchroData:function(t,n){if(t){var r=n.cid,i=n.attr,o=n.value,a=n.attrModel,s=ie(t.list,r);if("boolean"!=typeof s){if(s&&de(s,i,o,a),"actions"===i.toLowerCase()){var l=t.list,c=e.uniqWith(e.concat(Zi(l).actions,Zi(t.caseList).actions),e.isEqual),u=e.uniqWith(e.concat(Zi(l).events,Zi(t.caseList).events),e.isEqual);pi.addVariables(c),t.globalVars=pi.getAllVariables(),t.globalEvents=u,t.pages[t.pageIndex]&&(t.pages[t.pageIndex].globalVars=c),t.pages[t.pageIndex]&&(t.pages[t.pageIndex].globalEvents=u)}if("source"===i){if(!s.tmpData.source)return!1;var h=s.tmpData.source,d=h.type;if("api"===d){var f=h[d].url.match(/{{[\w]*}}|(@)[\w]*/gm);if(f)for(var p=f.map((function(t){return t.replace(/{{|}}|@/gm,"")})),m=function(n){var r=p[n];if(!r||!t.globalVars||t.globalVars.findIndex((function(t){return t.mapField===r}))<0)return"continue";if(t.shareVariableTree||(t.shareVariableTree={}),t.shareVariableTree[r]&&e.isArray(t.shareVariableTree[r])){t.shareVariableTree[r].push(s.cid);var i=t.shareVariableTree[r];t.shareVariableTree[r]=e.uniq(i)}else t.shareVariableTree[r]=[],t.shareVariableTree[r].push(s.cid)},g=0;g<p.length;g++)m(g)}}}}this.commit("GoCom/execute")},goUpdataSysVars:function(t,e){var n={U_CITY:"cityCode",U_COUNTY:"countyCode",U_PROVINCE:"provinceCode",U_PHONE:"userPhone"},r=t.sysConst,i=Object.keys(n);r.map((function(t){if(t.originalValue=t.value,(null==t?void 0:t.name)&&(null==i?void 0:i.includes(t.name))){var r=n[t.name];t.value=e[r],t.originalValue=e[r]}return t})),pi.addVariables(r)},resetGlobalData:function(t){t.globalVars=t.sysConst,t.globalConstant=[],t.globalSource=[]},updateGlobalRelatedVars:function(t,e){var n=e.run,r=e.gvData;return n.length&&n.forEach((function(t){var e=r.filter((function(e){return e.mapField==t.mapField||e.fork&&e.forkValue==t.mapField}));if(e.length)for(var n=0,i=e;n<i.length;n++){var o=i[n],a=t.value;o.mapField==t.mapField?o.value=a:o.fork&&t.mapField==o.forkValue?(o.converter&&o.converterCode,o.originalValue=a):r.push(t)}})),r}},Ji={updataList:function(t,e){var n=e.cid,r=Pn(e.list,(function(t){var e=ie(t,n),r=e.pid,i=oe(t,n),o=function(t){for(var e=0;e<t.length;e++){var n=t[e];Te(n,n.baseData,0,!0)}},a=function(t){return t.reduce((function(t,e){return{left:t.left+e.baseData.left,top:t.top+e.baseData.top}}),{left:0,top:0})},s=function(t,e){void 0===e&&(e=t);for(var n=0;n<t.length;n++){var r=t[n];if(r.children&&Array.isArray(r.children))return 0===r.children.length?(e.splice(n,1),!0):(s(r.children,r.children)&&0===r.children.length&&e.splice(n,1),!0)}};if(i.length>0)if(e.pid=i[0].cid,r){var l=f([ie(t,r)],oe(t,r),!0),c=a(l),h=a(i);e.baseData=u(u({},e.baseData),be(e.baseData,c)),e.baseData=u(u({},e.baseData),be(e.baseData,h,1)),o(l),o(i)}else{h=a(i);e.baseData=u(u({},e.baseData),be(e.baseData,h,1)),o(i)}r&&0==i.length&&(e.pid="",function(e,n){var r=oe(t,n),i=ie(t,n);if(0===r.length)e.baseData=u(u({},e.baseData),be(e.baseData,i.baseData));else{r=f([i],r,!0);var s=a(r);e.baseData=u(u({},e.baseData),be(e.baseData,s))}o(f([i],r,!0))}(e,r)),s(t),ue(t)}));t.list=r},updataListForContrast:function(t,n){var r=n.cid,i=n.list,o=ie(i,r);ae(i,r);var a=ae(t.list,r);if(!o.pid){o.pid=a.cid;var s=e.cloneDeep(o.baseData),l=be(o.baseData,a.baseData,1);Object.assign(o.baseData,l),Te(a,s)}ue(t.list)},updateTree:function(t){for(var n=t.list,r=0;r<n.length;r++){var i=n[r];if(i.pid)(s=ie(n,i.pid))&&Object.assign(i.baseData,be(i.baseData,s.baseData));if(i.children)for(var o=0;o<i.children.length;o++){var a=i.children[o];if(a.pid!=i.cid){var s=ie(n,a.pid);if(e.cloneDeep(a.baseData),s){Object.assign(a.baseData,be(a.baseData,s.baseData));var l=be(a.baseData,i.baseData,1);Object.assign(a.baseData,l),Te(i,i.baseData)}a.pid=i.cid}}}ue(n)}},Qi=ri,to=function(t,e,n,r,i,o,a){return void 0===n&&(n=!0),h(void 0,void 0,void 0,(function(){var o;return d(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,oi(t,n,e,i,(function(t){r&&r(t)}),a)];case 1:return[2,s.sent()];case 2:return o=s.sent(),r&&r(o),console.log("error:11"+o),[3,3];case 3:return[2]}}))}))},eo=function(t,e,n,r,i,o){void 0===o&&(o=!0),t&&oi(t,o,e,[],(function(e){n({cid:t.clientWidth,data:e})}))},no=Object.freeze({__proto__:null,Http:function(t,e){return function(t,e){void 0===t&&(t="");var r=n.create({baseURL:t,timeout:3e4,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}});return r.interceptors.request.use((function(t){return sessionStorage.getItem("anov-go-token")&&"null"!=sessionStorage.getItem("anov-go-token")&&(t.headers["X-ANOV-ACCESS-TOKEN"]=sessionStorage.getItem("anov-go-token")),sessionStorage.getItem("unify-access-token")&&"null"!=sessionStorage.getItem("unify-access-token")&&(t.headers["X-UNIFY-ACCESS-TOKEN"]=sessionStorage.getItem("unify-access-token")),sessionStorage.getItem("dgcc_authorization")&&"null"!=sessionStorage.getItem("dgcc_authorization")&&(t.headers.dgcc_authorization=sessionStorage.getItem("dgcc_authorization")),"post"===t.method?(t.headers["Content-Type"]="application/json;",t):"get"===t.method?t:"put"===t.method?(t.headers["Content-Type"]="application/json; charset=UTF-8",t):"delete"===t.method?t:void 0}),(function(t){return Promise.reject(t)})),r.interceptors.response.use((function(t){return 200===t.status||t.data.code,e&&e(t),t.data}),(function(t){return e&&e(null==t?void 0:t.response),Promise.reject(t.response)})),r}(t,e)},autoUpdateComData:function(t,n,r){var i,o,a,s,l,c=null===(i=null==t?void 0:t.tmpData)||void 0===i?void 0:i.source,u=null===(a=null===(o=c[null==c?void 0:c.type])||void 0===o?void 0:o.autoUpdate)||void 0===a?void 0:a.open,h=null===(l=null===(s=c[null==c?void 0:c.type])||void 0===s?void 0:s.autoUpdate)||void 0===l?void 0:l.time;u&&e.isNumber(h)&&h>0&&setInterval((function(){to(t,n,!0,(function(e){r({cid:t.cid,data:e})}))}),1e3*h)},autoUpdateGlobalSource:function(t,n,r,i){var o,a,s,l,c,u=null===(o=null==t?void 0:t.value)||void 0===o?void 0:o.type,h=null===(s=null===(a=t.value[u])||void 0===a?void 0:a.autoUpdate)||void 0===s?void 0:s.open,d=null===(c=null===(l=t.value[u])||void 0===l?void 0:l.autoUpdate)||void 0===c?void 0:c.time;h&&e.isNumber(d)&&d>0&&setInterval((function(){hi(t,n,[t],r,i)}),1e3*d)},axios:n,filterData:Qi,getDataForEvaluator:y,parseSource:function(t,e,n,r,i,o,a,s){void 0===r&&(r=!0);oi(e,r,n,[],(function(t){i(t),("AnContainer"===(null==e?void 0:e.viewComName)&&r||"AnGridLayout"===(null==e?void 0:e.viewComName)&&r)&&Ve(e)}),s)},refreshData:eo,updateComData:to}),ro=function(t){return h(this,void 0,void 0,(function(){var e,n,r,i,o;return d(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),e=t.fontUrl,n=t.fontName,r="__custom_font__",(i=document.getElementById(r))?[3,2]:((i=document.createElement("style")).id=r,[4,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)]);case 1:a.sent(),a.label=2;case 2:return i.innerText+="@font-face{font-family:'".concat(n,"';src:url(").concat(e,");}"),[3,4];case 3:return o=a.sent(),console.warn(o),[3,4];case 4:return[2]}}))}))},io=function(t,e,n){return void 0===e&&(e="jspaths"),h(void 0,void 0,void 0,(function(){var r,i;return d(this,(function(o){switch(o.label){case 0:return r="csspaths"===e?"link":"script",i=document.createElement(r),"jspaths"===e?i.defer=!0:i.rel="stylesheet",i.className=e,i.src=t,(n||document.head||document.getElementsByTagName("head")[0]).appendChild(i),[4,new Promise((function(t,e){i.addEventListener("load",t),i.addEventListener("error",t)}))];case 1:return o.sent(),[2]}}))}))},oo=function(t,e){return void 0===e&&(e="jspaths"),h(void 0,void 0,void 0,(function(){var n;return d(this,(function(r){switch(r.label){case 0:return n="fonts"===e?ro:io,[4,Promise.all(t.map((function(t){return n(t)})))];case 1:return r.sent(),[2]}}))}))},ao=function(t){return h(void 0,void 0,void 0,(function(){return d(this,(function(e){switch(e.label){case 0:return t.fonts&&t.fonts.length?[4,oo(t.fonts,"fonts")]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},so=function(t){var n=t.jspaths,r=void 0===n?[]:n,i=t.csspaths,o=void 0===i?[]:i,a=t.fonts,s=void 0===a?[]:a;return h(void 0,void 0,void 0,(function(){var t;return d(this,(function(n){switch(n.label){case 0:return t=e.uniqBy(s,"fontName"),[4,Promise.all([oo(r,"jspaths"),oo(o,"csspaths"),oo(t,"fonts")])];case 1:return n.sent(),[2]}}))}))},lo=function(){var t;(null==(t=document.getElementById("__custom_font__"))?void 0:t.parentNode)&&t.parentNode.removeChild(t),Array.from(document.getElementsByTagName("script")).filter((function(t){return"jspaths"==t.className})).forEach((function(t){!function(t){for(var e,n=Array.from(document.getElementsByTagName("script")),r=0;r<n.length;r++)n[r]&&n[r].src&&-1!=n[r].src.indexOf(t)&&(null===(e=n[r])||void 0===e?void 0:e.parentNode)&&n[r].parentNode.removeChild(n[r])}(t.src)})),Array.from(document.getElementsByTagName("link")).filter((function(t){return"csspaths"==t.className})).forEach((function(t){!function(t){for(var e,n=Array.from(document.getElementsByTagName("link")),r=0;r<n.length;r++)n[r].href,n[r]&&n[r].href&&-1!=n[r].href.indexOf(t)&&(null===(e=n[r])||void 0===e?void 0:e.parentNode)&&n[r].parentNode.removeChild(n[r])}(t.href)}))};var co={reset:function(t){t.selectd=[],t.list=[],t.plant=null,t.tw=null,t.watermark=null,t.endnotes=null,t.globalConstant=[]},setFonts:function(t,e){t.resource.fonts.push({fontName:e.name,fontUrl:e.src}),ao(t.resource)},setCaseInfo:function(t,e){t.caseInfo=e},setPageId:function(t,e){t.pageId=e},pagePush:function(t,e){try{var n=e.type,r=e.value,i=e.option,o=["name","path","id"];if(!o.includes(n))throw new Error("页面跳转错误!".concat(n," 不是一个正确的参数 请填以下参数 ").concat(o.join(",")));if(!r)throw new Error("页面跳转错误!".concat(n," 不是一个正确的参数 请填正确的页面路径或者页面名称"));t.toPage=i?{type:n,value:r,option:i}:{type:n,value:r}}catch(t){console.warn(t)}},updatComs:function(t,e){var n=this,r=ie(t.list,e);if("boolean"!=typeof r){(null==r?void 0:r.children)&&(null==r||r.children),to(r,t.globalVars,!0,(function(t){n.commit("GoCom/updataSourceForComponent",{cid:r.cid,data:t})}),t.globalSource)}},updatComsForVar:function(t,n){var r=t.globalVars.map((function(t){var e,r;if((null===(e=null==t?void 0:t.forkValue)||void 0===e?void 0:e.length)&&(null===(r=null==t?void 0:t.forkValue)||void 0===r?void 0:r.includes(n))||t.forkValue==n)return t.mapField})).filter((function(t){return t})),i=[n];(null==r?void 0:r.length)&&(i=e.uniq(f([n],r,!0)));for(var o=[],a=0,s=i;a<s.length;a++){var l=s[a];t.shareVariableTree[l]&&o.push.apply(o,t.shareVariableTree[l])}if(null==o?void 0:o.length)for(var c=0,u=o;c<u.length;c++){var h=u[c];this.commit("GoCom/updatComs",h)}},addConstant:function(t,n){var r=e.find(t.constant,{name:n.name});r?Object.assign(r,n):t.constant.push(n)},editConstant:function(t,n){var r=e.find(t.constant,{name:n.name});r&&Object.assign(r,n)},delConstant:function(t,n){e.remove(t.constant,(function(t){return t.name==n}))},setResource:function(t,e){var n=e.type,r=e.value;t.resource[n]=r,lo(),so(t.resource)},updataResource:function(t){lo(),so(t.resource)},resetResource:function(t){t.resource={jspaths:[],csspaths:[],otherpaths:[]}},setData:function(t,e){t.selectd=e.selectd},setList:function(t,e){t.list=e,ue(t.list)},saveDynamicChildren:function(t,e){var n=e.cid,r=e.data,i=e.name,o=t.pages[t.pageIndex].list,a=ie(o,n);a&&(a.activeDynamic=i,a.dynamicChildren instanceof Array&&(a.dynamicChildren=new Map(a.dynamicChildren)),a.dynamicChildren.set(i,r))},setTheme:function(t,e){t.theme=e},setPlant:function(t,e){var n=e.attr,r=e.value;t.plant||(t.plant={name:"",theme:null,baseData:{width:1920,height:1080,left:0,top:0},option:null,optionDes:null}),t.plant[n]=r},setPlantHeight:function(t,e){t.plant&&(t.plant.baseData.height=t.plant.baseData.height+e)},reversal:function(t,n){t.undos=[],t.undoRedoPointer=-1;var r=e.cloneDeep(n.globalVars);delete n.globalVars,t=Object.assign(t,n),pi.addVariables(r),t.globalVars=pi.getAllVariables(),ue(t.list)},setComTmp:function(t,e){var n=t.list.find((function(t){return t.cid===e[0]}));n.com=e[1],n.tmp=e[2]},setLoading:function(t,e){var n=e.cid,r=e.flag,i=t.list.find((function(t){return t.cid===n}));i&&(i.loading=r)},setMultiple:function(t,e){t.multiple=e},setCaseList:function(t,e){t.caseList=e},updataComponentForList:function(t,e){var n=e.cid,r=e.data,i=t.list,o=ie(i,n);"boolean"!=typeof o&&Object.assign(o,r)},updataComponentForCaseList:function(t,e){var n=e.cid,r=e.data,i=t.caseList,o=ie(i,n);"boolean"!=typeof o&&Object.assign(o,r)},updataComponent:function(t,e){var n=e.cid,r=e.data,i=t.pages&&t.pages[0]&&t.pages[0].list&&t.pages[0].list.length?t.pages[0].list:t.list,o=ie(i,n);"boolean"!=typeof o&&Object.assign(o,r)},updataArea:function(t,e){t.currentArea.left+=e.deltaX,t.currentArea.top+=e.deltaY},updataSource:function(t,e){var n=e.cid,r=e.data,i=ie(t.list,n);"boolean"!=typeof i&&("indicatorCQ"===i.tmpData.source.type?i.tmpData.source.indicator.data=r:(console.log("更新数据:"+i.cid),i.tmpData.source[i.tmpData.source.type].data=r))},updataSourceForComponent:function(t,n){var r=n.cid,i=n.data;if(t.list.length){var o=ie(t.list,r);"boolean"!=typeof o&&(o.source=e.cloneDeep(i))}},updataAnimationForComponent:function(t,e){var n=e.cid,r=e.data;if(t.list.length){var i=ie(t.list,n);"boolean"!=typeof i&&(i.tw=r)}},updataWatermark:function(t,e){t.watermark=e},updataEndnotes:function(t,e){t.endnotes=e},updataAnimation:function(t,e){t.tw=e},setContext:function(t,e){var n=e.cid,r=e.data,i=ie(t.list,n);"boolean"!=typeof i&&(i.example=r)},setContextList:function(t,e){var n=e.cid,r=e.data;t.contextList[n]=r},setPosition:function(t,e){ye(t.list.find((function(t){return t.cid===e[0]})),e[1])},setSelect:function(t,e){t.cache=[],t.selectd=e instanceof Array?e:[e],t.selectd.length>1&&t.selectd.forEach((function(e){t.cache.push(t.list.find((function(t){return t.cid===e&&"Other.Plant.Normal"!==t.type})))}))},setActive:function(t,n){var r=e.cloneDeep(n),i=r.id,o=r.multiple,a=r.origin,s=r.ctr,l=e.cloneDeep(t.selectd);if(o){var c=l.includes(i);if(l.length>=1){var u=l.every((function(e){return le(t.list,e,n.id)}));if(!u)return void console.info("sorry Only sibling elements can be selected!")}c?l.splice(l.findIndex((function(t){return t===i})),1):l.push(i),t.selectd=l}else t.selectd=[i];t.selectd.forEach((function(e){var n=ie(t.list,e);if(n.pid){var r=ie(t.list,n.pid);r&&(r.toggle=!0)}s||(n.toggle=!0)})),t.selectdChangeOrigin=a||""},setCache:function(t){t.cache=[],t.selectd.length>1&&t.selectd.forEach((function(e){t.cache.push(t.list.find((function(t){return t.cid===e})))}))},clearActive:function(t){t.selectd=[]},setMultipleActive:function(t,e){t.selectd=e},syncMenuInfo:function(t){Ce(t.menuList,(function(e){var n=10*e.lv+e.index;t.list.filter((function(t){return t.cid===e.id}))[0].z=1e4-n}))},addComs:function(t,n){var r=n.com,i=n.isMobile;"MultiStateComponent"!=r.componentType||r.stateChildren||(r.stateChildren=[]),"dynamicComponent"!=r.componentType||r.dynamicChildren||(r.dynamicChildren=new Map,r.activeDynamic="状态1",r.dynamicChildren.set("状态1",[]),r.lines={h:[],v:[]},"AnGridLayout"==r.viewComName&&r.dynamicChildren.set("状态1",null==r?void 0:r.AnGridChildren)),i?t.list.push(r):t.list.unshift(r),t.menuList=e.cloneDeep(t.list),ue(t.list),this.commit("GoCom/execute")},addComsForParent:function(t,n){var r=n.com,i=n.isMobile,o=n.PID;if("MultiStateComponent"!=r.componentType||r.stateChildren||(r.stateChildren=[]),"dynamicComponent"!=r.componentType||r.dynamicChildren||(r.dynamicChildren=new Map,r.activeDynamic="状态1",r.dynamicChildren.set("状态1",[])),o){var a=ie(t.list,o);i?(a.children=[],a.children.push(r)):a.children.unshift(r)}else i?t.list.splice(0,1,r):t.list.unshift(r);t.menuList=e.cloneDeep(t.list),ue(t.list),this.commit("GoCom/execute")},addMyComs:function(t,n){var r;try{var i=n.data,o=n.shareVariableTree,a=n.globalVars,s=n.globalEvents;t.globalVars=e.uniq(e.concat(e.cloneDeep(t.globalVars),a)),t.globalEvents=e.uniq(e.concat(e.cloneDeep(t.globalEvents),s));var l=Object.keys(o),c=Object.keys(t.shareVariableTree),u=e.difference(l,c);u.length?u.forEach((function(n){t.shareVariableTree[n]=e.concat(e.cloneDeep(t.shareVariableTree[n]),o[n])})):t.shareVariableTree=Object.assign(e.cloneDeep(t.shareVariableTree),o),i instanceof Array?(he(i),(r=t.list).unshift.apply(r,i)):(he([i]),t.list.unshift(i)),t.menuList=e.cloneDeep(t.list),ue(t.list),this.commit("GoCom/execute")}catch(t){}},addStateChildren:function(t,e){var n=ie(t.list,e.pid);n&&n.stateChildren.push(e)},addDynamicChildren:function(t,e){var n=ie(t.list,e.pid);n&&n.dynamicChildren.push(e)},arraySwap:function(t,n){var r;try{if(!n||2!=n.length)throw new Error("参数错误,方法接受两个组件的CID组成的数组!");var i=e.cloneDeep(t.list),o=ie(i,n[0]),a=ie(i,n[1]),s=ie(i,o.pid),l={},c=0,u=0;if(a)if("selectContainer"==a.componentType){var h=ie(i,n[1]);s?(c=e.findIndex(s.children,(function(t){return t.cid==n[0]})),l=s.children[c],s.children=s.children.filter((function(t){return t.cid!==l.cid}))):(l=ie(i,n[0]),i=i.filter((function(t){return t.cid!==l.cid}))),l.cid=Oe(),l.pid=h.cid,h.children.push(l)}else if(o.pid||a.pid)if(s)if(c=e.findIndex(s.children,(function(t){return t.cid==n[0]})),l=s.children[c],o.pid!==a.pid){h=ie(i,a.pid);u=e.findIndex(h.children,(function(t){return t.cid==n[1]}));d=h.children[u];l.cid=Oe(),l.pid=h.cid,d.cid=Oe(),d.pid=s.cid,s.children.splice(c,1,d),h.children.splice(u,1,l)}else u=e.findIndex(s.children,(function(t){return t.cid==n[1]})),(r=s.children).splice.apply(r,f([u,1],s.children.splice(c,1,s.children[u]),!1));else{var h=ie(i,a.pid);c=e.findIndex(i,(function(t){return t.cid==n[0]})),u=e.findIndex(h.children,(function(t){return t.cid==n[1]})),l=ie(i,o.cid);var d=h.children[u];l.cid=Oe(),l.pid=h.cid,d.cid=Oe(),d.pid=null,i.splice(c,1,d),h.children.splice(u,1,l)}else ne(t.list,n[0],n[1]);else c=e.findIndex(s.children,(function(t){return t.cid==n[0]})),l=s.children[c],s.children.splice(c,1),l.cid=Oe(),l.pid=null,i.push(l);t.list=i,ue(t.list)}catch(t){console.warn("组件位置交换发生错误",t)}},changeDynamicState:function(t,e){var n=ie(t.list,e.cid);n&&"dynamicComponent"==n.componentType&&(n.dynamicChildren instanceof Array&&n.dynamicChildren.find((function(t){return t[0]==e.activeName}))||n.dynamicChildren instanceof Map&&n.dynamicChildren.has(e.activeName)?n.activeDynamic=e.activeName:console.error(e.activeName+"不是一个正确的状态"))},addAlternateData:function(t,e){t.alternateData[e.pid]||(t.alternateData[e.pid]=[]),t.alternateData[e.pid].push(e)},setOptionForCom:function(t,e){var n;try{var r=e.cid,i=e.key,o=e.value,a=ie(t.list,r);if(!a)return;if("string"!=typeof i)return void console.error("key:[".concat(i,"]格式错误"));var s=null===(n=null==a?void 0:a.tmpData)||void 0===n?void 0:n.option,l=i.split(".");s&&(null==l?void 0:l.length)&&l.forEach((function(t,e){s.hasOwnProperty(t)&&(e===l.length-1?s[t]=o:s=s[t])}))}catch(t){console.warn("同步属性发生错误:"+t)}},mergeConfig:function(t,n){n.length>0&&n.forEach((function(e){t.list.unshift(e)})),t.menuList=e.cloneDeep(t.list),ue(t.list),this.commit("GoCom/execute")},updataName:function(t,e){var n=ie(t.list,e.cid);n&&(n.name=e.name)},setDynamicActive:function(t,e){e.cid;var n=e.name,r=ie(t.list,e.cid);r&&"dynamicComponent"==r.componentType&&(r.activeDynamic=n)},updataScroll:function(t,e){e.cid;var n=e.data,r=ie(t.list,e.cid);r&&"dynamicComponent"==r.componentType&&(r.srcollInfo={use:!!(null==n?void 0:n.use)&&(null==n?void 0:n.use),data:(null==n?void 0:n.data)?null==n?void 0:n.data:null})},updataDySetting:function(t,e){e.cid;var n=e.data,r=ie(t.list,e.cid);r&&"dynamicComponent"==r.componentType&&(r.dyOption=n)},setCurrentEdited:function(t,e){if(e){var n=ie(t.list,e);if("boolean"!=typeof n){var r=ge(n);n.children=r}t.currentEditerCid=e}else t.currentEditerCid=""},setDynamicLine:function(t,n){var r=e.cloneDeep(t.list),i=ie(r,n.cid);r.length&&"boolean"!=typeof i&&(i.lines=Object.assign({},i.lines,n.lines)),t.list=r}},uo={layout:function(t,n){var r=function(t,n){try{var r=t.map((function(t){var e=ie(n,t);if("object"==typeof e)return e;throw"Please check whether the input and output parameters are correct!"}));if(e.every(r,Object))return r;throw"Please check whether the input and output parameters are correct!"}catch(t){return console.error(t),[]}}(t.selectd,t.list);switch(n){case"alignLeft":!function(t,n){1===t.length&&(t[0].baseData.left=0);var r=e.sortBy(t,(function(t){return t.baseData.left})),i=r[0].baseData.left;t.map((function(t){return t.baseData.left=i}))}(r);break;case"alignRight":!function(t,n){if(1===t.length){var r=n.plant?n.plant.baseData:{width:1920,height:1080};t[0].baseData.left=r.width-t[0].baseData.width}var i=e.sortBy(t,(function(t){return t.baseData.left})),o=1*i[i.length-1].baseData.left+1*i[i.length-1].baseData.width;t.map((function(t){return t.baseData.left=o-1*t.baseData.width}))}(r,t);break;case"horizontally":!function(t,n){if(1===t.length){var r=n.plant?n.plant.baseData:{width:1920,height:1080};t[0].baseData.left=r.width/2-t[0].baseData.width/2}var i=e.sortBy(t,(function(t){return t.baseData.left})),o=e.sortBy(t,(function(t){return 1*t.baseData.left+1*t.baseData.width})),a=(1*i[0].baseData.left+(1*o[o.length-1].baseData.left+1*o[o.length-1].baseData.width))/2;t.map((function(t){return t.baseData.left=a-t.baseData.width/2}))}(r,t);break;case"alignTop":!function(t,n){1===t.length&&(t[0].baseData.top=0);var r=e.sortBy(t,(function(t){return t.baseData.top})),i=1*r[0].baseData.top;t.map((function(t){return t.baseData.top=i}))}(r);break;case"alignBottom":!function(t,n){if(1===t.length){var r=n.plant?n.plant.baseData:{width:1920,height:1080};t[0].baseData.top=r.height-t[0].baseData.height}var i=e.sortBy(t,(function(t){return 1*t.baseData.top})),o=1*i[i.length-1].baseData.top+1*i[i.length-1].baseData.height;t.map((function(t){return t.baseData.top=o-1*t.baseData.height}))}(r,t);break;case"verticalCenter":!function(t,n){if(1===t.length){var r=n.plant?n.plant.baseData:{width:1920,height:1080};t[0].baseData.top=r.height/2-t[0].baseData.height/2}var i=e.sortBy(t,(function(t){return t.baseData.top})),o=e.sortBy(t,(function(t){return 1*t.baseData.top+1*t.baseData.height})),a=(1*i[0].baseData.top+(1*o[o.length-1].baseData.top+1*o[o.length-1].baseData.height))/2;t.map((function(t){return t.baseData.top=a-t.baseData.height/2}))}(r,t);break;case"topDistribution":!function(t){if(t.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var n=e.sortBy(t,(function(t){return t.baseData.top})),r=(n[n.length-1].baseData.top-n[0].baseData.top)/(n.length-1);n.map((function(t,e){e>0&&e<n.length-1&&(t.baseData.top=1*n[0].baseData.top+r*e)}))}(r);break;case"bottomDistribution":!function(t){if(t.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var n=e.sortBy(t,(function(t){return t.baseData.top+t.baseData.height})),r=(n[n.length-1].baseData.top+n[n.length-1].baseData.height-(n[0].baseData.top+n[0].baseData.height))/(n.length-1);n.map((function(t,e){e>0&&e<n.length-1&&(t.baseData.top=1*n[0].baseData.top+1*n[0].baseData.height-1*t.baseData.height+r*e)}))}(r);break;case"xCenterDistribution":!function(t){if(t.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var n=e.sortBy(t,(function(t){return t.baseData.left+t.baseData.width/2})),r=1*n[n.length-1].baseData.left+n[n.length-1].baseData.width/2,i=1*n[0].baseData.left+n[0].baseData.width/2,o=(r-i)/(n.length-1);n.map((function(t,e){e>0&&e<n.length-1&&(t.baseData.left=i-t.baseData.width/2+o*e)}))}(r);break;case"leftDistribution":!function(t){if(t.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var n=e.sortBy(t,(function(t){return t.baseData.left})),r=(n[n.length-1].baseData.left-n[0].baseData.left)/(n.length-1);n.map((function(t,e){e>0&&e<n.length-1&&(t.baseData.left=n[0].baseData.left+r*e)}))}(r);break;case"rightDistribution":!function(t){if(t.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var n=e.sortBy(t,(function(t){return t.baseData.left+t.baseData.width})),r=(n[n.length-1].baseData.left+n[n.length-1].baseData.width-(n[0].baseData.left+n[0].baseData.width))/(n.length-1);n.map((function(t,e){e>0&&e<n.length-1&&(t.baseData.left=n[0].baseData.left+n[0].baseData.width-t.baseData.width+r*e)}))}(r);break;case"yCenterDistribution":!function(t){if(t.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var n=e.sortBy(t,(function(t){return t.baseData.top+t.baseData.height/2})),r=1*n[n.length-1].baseData.top+n[n.length-1].baseData.height/2,i=1*n[0].baseData.top+n[0].baseData.height/2,o=(r-i)/(n.length-1);n.map((function(t,e){e>0&&e<n.length-1&&(t.baseData.top=i-t.baseData.height/2+o*e)}))}(r)}}},ho={setPageData:function(t,e){t.pages[0]=e},parasePages:function(t,e){e instanceof Array&&(t.pages=e.map((function(t,e){return t.name||(t.name="页面"+(e+1)),t.path||(t.path="page"+(e+1)),t})))},addPage:function(t,e){var n=t.pages.length+1;e.name="页面"+n,e.path="page"+n,t.pages.push(e),t.pageIndex=t.pages.length-1,t.resource={jspaths:[],csspaths:[],otherpaths:[]},t.globalVars=t.sysConst},setCurrentPageIndex:function(t,e){var n=t.globalEvents,r=t.globalVars,i=t.list,o=t.name,a=t.theme,s=t.plant,l=t.shareVariableTree,c=t.resource;t.pages[t.pageIndex]={globalEvents:n,globalVars:r,list:i,name:o,theme:a,plant:s,shareVariableTree:l,resource:c},t.pageIndex=e},setPageDataForIndex:function(t,e){var n=e.index,r=e.data;t.pages[n]=r},setPageName:function(t,e){t.name=e,t.pages[t.pageIndex].name=e},saveCurrentPageData:function(t){var e=t.globalEvents,n=t.globalVars,r=void 0===n?[]:n,i=t.list,o=t.name,a=t.theme,s=t.plant,l=t.shareVariableTree,c=t.resource;t.pages[t.pageIndex]={globalEvents:e,globalVars:r,list:i,name:o,theme:a,plant:s,shareVariableTree:l,resource:c}},getCurrentPageData:function(t){var e=t.globalEvents,n=t.globalVars,r=t.list,i=t.name,o=t.theme,a=t.plant,s=t.shareVariableTree,l=t.resource;t.pages[t.pageIndex]={globalEvents:e,globalVars:n,list:r,name:i,theme:o,plant:a,shareVariableTree:s,resource:l}}},fo={segmentationContainer:function(t,n){var r=e.cloneDeep(t.list),i=n.containerData,o=n.direction,a=[];if("del"==o)if(i.pid){var s=ie(r,i.pid),l=s.children.length;if(s)if(l<=2)(a=s.children.filter((function(t){return t.cid!==i.cid&&t.children.length}))).length?(s.direction=a[0].direction,s.children=a[0].children.map((function(t){return t.pid=s.pid||s.cid,t}))):s.children=[];else{var c=s.children.find((function(t){return t.cid===i.cid})),u=s.children.findIndex((function(t){return t.cid===i.cid}));s.children=s.children.filter((function(t){return t.cid!==i.cid}));var h=s.children[u>=s.children.length-1?s.children.length-1:u],d="col"==s.direction?"height":"width";h.baseData[d]=(parseFloat(h.baseData[d])+parseFloat(c.baseData[d])).toFixed(2)+"%"}}else r.length&&(r=r.filter((function(t){return t.cid!==i.cid})));else{var f=ie(r,i.cid);if(f){f.direction=o,1===f.children.length&&(a=f.children,f.children=[]);for(var p=(l=f.children.length)>=2?1:2,m=(d=l>=2?(100/(l+1)).toFixed(2)+"%":"50%",0);m<p;m++)f.children.push({isLock:!1,isShow:!0,baseData:{width:"col"==o?"100%":d,height:"col"==o?d:"100%",angle:0,penetrate:0,opacity:100},direction:o,componentType:"selectContainer",iconClass:"__vue_devtool_undefined__",isAssembly:"__vue_devtool_undefined__",source:[],comData:{actions:[],option:{grid:[{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"}],bgColor:{alpha:1,blue:0,green:0,red:0,flag:1,style:"transparent"},imgOpt:"",bgScaleOpt:3,borderRadius:[{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"}],margins:[{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"}]}},tmpData:{},dynamic:0,filePath:"/anov-prod/mgt/go/assembly/162-bgImage.png",origin:"anov-go",name:"容器组件",path:"/index.js",viewComName:"selectContainer",optionComName:"",dataComName:"",eventComName:"",assemblyDeveloper:"",devEmail:"",version:null,devDept:"",toggle:!0,cid:Oe(),pid:f.cid,nestIndex:0,children:[],isTop:!1,isCol:"col"==o,isRow:"col"!=o,isDragged:!1,grandParentId:i.pid});a.length&&(a[0].cid=Oe(),a[0].pid=f.children[0].cid,f.children[0].children=a)}}t.list=r,0==r.length&&(t.selectd=[])}},po={goEditShareCom:function(t,e){var n=e.name,r=e.mapping;t.shareComs||(t.shareComs=new Map),t.shareComs.set(n,r)},delShareCom:function(t,e){var n=e.key;t.shareComs&&t.shareComs.has(n)&&t.shareComs.delete(n)}},mo={mutation:{addGoVar:function(t,e){try{pi.addVariable(e,(function(){t.globalVars=pi.getAllVariables()}))}catch(t){console.warn(t)}},delGoVar:function(t,e){try{var n=e.mapField;console.log(n,"mapFieldmapField"),pi.delVariable(n,(function(){t.globalVars=pi.getAllVariables()}))}catch(t){console.warn(t)}},editGoVar:function(t,e){var n=this;try{pi.editVariable(e,(function(r){t.globalVars=pi.getAllVariables(),ui(t.globalSource,e.mapField,t.globalVars,t.list,(function(t){n.commit("GoCom/updatComs",t.cid)})),(null==e?void 0:e.delayUpdate)||n.commit("GoCom/updatComsForVar",e.mapField)}))}catch(t){console.warn(t)}},goEditVar:function(t,e){var n=e.key,r=e.value,i=t.globalVars.find((function(t){return t.mapField==n}));i&&(i.originalValue=r,i.update=!0,this.commit("GoCom/editGoVar",i))},goUpdataSysVars:function(t,e){var n={U_CITY:"cityCode",U_COUNTY:"countyCode",U_PROVINCE:"provinceCode",U_PHONE:"userPhone"},r=t.sysConst,i=Object.keys(n);r.map((function(t){if(t.originalValue=t.value,(null==t?void 0:t.name)&&(null==i?void 0:i.includes(t.name))){var r=n[t.name];t.value=e[r],t.originalValue=e[r]}return t})),pi.addVariables(r)},updateGlobalVars:function(t,e){t.globalVars=e},updataVariables:function(t){t.globalVars=pi.getAllVariables()}},actions:{updateGlobalVarsAction:function(t){(0,t.commit)("updateGlobalVars",pi.getAllVariables())},goEditVar:function(t,e){(0,t.commit)("editGoVar",{mapField:e.key,originalValue:e.value})}}},go=u(u(u(u(u(u(u(u(u(u(u({},p),Vn),Ki),Xi),Ji),co),uo),ho),fo),po),mo.mutation),vo=u({updataList:function(t,e){var n=t.commit;e&&n("updataList",e),n("updateTree")},updataBaseData:function(t,e){var n=t.commit;e&&n("updataBaseData",e)},setActive:function(t,e){var n=t.commit;e&&n("setActive",e)},setSyncFlag:function(t,e){var n=t.commit;e&&n("setSyncFlag",e)},execute:function(t,e){var n=t.commit;e&&n("execute",e)},updataAnimationForComponent:function(t,e){var n=t.commit;e&&n("updataAnimationForComponent",e)},updataAnimation:function(t,e){(0,t.commit)("updataAnimation",e)},setOptionForCom:function(t,e){(0,t.commit)("setOptionForCom",e)},updatComs:function(t,e){var n=t.commit;setTimeout((function(){n("updatComs",e)}))},updatComsForVar:function(t,n){var r=t.dispatch,i=t.state,o=i.globalVars.map((function(t){var e,r;if((null===(e=null==t?void 0:t.forkValue)||void 0===e?void 0:e.length)&&(null===(r=null==t?void 0:t.forkValue)||void 0===r?void 0:r.includes(n))||t.forkValue==n)return t.mapField})).filter((function(t){return t})),a=[n];(null==o?void 0:o.length)&&(a=e.uniq(f([n],o,!0)));for(var s=[],l=0,c=a;l<c.length;l++){var u=c[l];i.shareVariableTree[u]&&s.push.apply(s,i.shareVariableTree[u])}if(null==s?void 0:s.length)for(var h=0,d=s;h<d.length;h++){r("updatComs",d[h])}},goEditShareCom:function(t,e){var n=t.commit;t.state,n("goEditShareCom",e)},delShareCom:function(t,e){var n=t.commit;t.state,n("delShareCom",e)},updataSource:function(t,e){var n=t.commit;t.state,n("updataSource",e)}},mo.actions),yo={getCurrentPage:function(t){return t.pages.length?t.pages[t.pageIndex]:[]},globalSourceTree:function(t){if(t.list.length&&t.globalSource.length){var n=[];return ce(e.cloneDeep(t.list),(function(t){var e,r,i;if("globalData"==(null===(r=null===(e=null==t?void 0:t.tmpData)||void 0===e?void 0:e.source)||void 0===r?void 0:r.type)){var o=null===(i=null==t?void 0:t.tmpData)||void 0===i?void 0:i.source.globalData;n.push({name:t.name,cid:t.cid,sourceId:o.id,viewComName:t.viewComName})}})),n}return[]}},bo={namespaced:!0,state:l,mutations:go,actions:vo,getters:yo},wo=function(){function t(){}return t.setAppStore=function(e){t.store=e},t.prototype.getState=function(){return t.store.state[t.storeModule]},t.prototype.mapState=function(e){return _o(t.storeModule,e)},t.prototype.mapGetters=function(e){return So(t.storeModule,e)},t.prototype.mapMutations=function(e){return Do(t.storeModule,e)},t.prototype.callState=function(e){return t.store.state[t.storeModule][e]},t.prototype.callGetter=function(e,n){return t.store.getters[t.storeModule+"/"+e]},t.prototype.callMutation=function(e,n,r){r?t.store.commit(t.storeModule+"/"+e,n,!0):t.store.commit(t.storeModule+"/"+e,n)},t.prototype.callAction=function(e,n){t.store.dispatch(t.storeModule+"/"+e,n)},t.storeModule="GoCom",t}(),_o=ko((function(t,e){var n;return xo(e).forEach((function(e){var r=e.key,i=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=To(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"==typeof i?i.call(this,e,n):e[i]},n[r].VuexServer=!0})),n})),Do=ko((function(t,e){var n;return xo(e).forEach((function(e){var r=e.key,i=e.val;n[r]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=this.$store.commit;if(t){var o=To(this.$store,"mapMutations",t);if(!o)return;r=o.context.commit}return"function"==typeof i?i.apply(this,[r].concat(e)):r.apply(this.$store,[i].concat(e))}})),n})),So=ko((function(t,e){var n={};return xo(e).forEach((function(e){var r=e.key,i=e.val;i=t+i,n[r]=function(){if(!t||To(this.$store,"mapGetters",t)){if("production"===process.env.NODE_ENV||i in this.$store.getters)return this.$store.getters[i];console.error("[VuexServer] unknown getter: ".concat(i))}},n[r].VuexServer=!0})),n}));function xo(t){return Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}}))}function ko(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function To(t,e,n){var r=t._modulesNamespaceMap[n];return"production"===process.env.NODE_ENV||r||console.error("[VuexServer] module namespace not found in ".concat(e,"(): ").concat(n)),r}var Co=function(){function t(t){var e=this;if(this.isLock=!1,this.isShow=!0,this.baseData={left:0,top:0,width:300,height:200,angle:0,opacity:100,rotate:0,rotateY:0},this.componentType="BaseComponent",this.cid=Oe(),t){Object.keys(t).forEach((function(n){e[n]=t[n]}));["AnEchartsMap","AnMaptalks","AnEchartsMap1","AnArcgisMapBase","AnAMap1","AnCesium","AnThreeMap3DChina","AnThreeMapForCesium","AnThreeMap","AnGisMap","AnMineMap","MineMapMarkerLayer","MineMapClusterLayer","AnChina3D","AncsAnovGis"].includes(t.viewComName)&&(this.componentType="MultiStateComponent"),"AnDynamic"!==t.viewComName&&"AmDynamic"!==t.viewComName&&"AnContainer"!==t.viewComName&&"AnGridLayout"!==t.viewComName||(this.componentType="dynamicComponent")}}return t.prototype.setIndex=function(t){this.z=t},t}(),Oo=function(){function t(t){this.vueServer=t,this.loadScript=io}return t.setStore=function(t){this.store=t},t.prototype.loadComponents=function(t){var n=t&&t.list?t.list:[];ce(n,(function(t){t.viewComName&&(t&&t.path&&t.path,t.origin,t.viewComName?t.viewComName:t.rawData.viewComName)})),t&&this.vueServer.callMutation("reversal",e.cloneDeep(t))},t.prototype.addStore=function(t){this.vueServer.callMutation("setActive",{id:t}),this.vueServer.callMutation("addComs",this)},t.prototype._addPlantStore=function(){this.vueServer.callMutation("setPlant",this)},t.prototype._loadComTmp=function(t,e){return h(this,void 0,void 0,(function(){var n,r,i=this;return d(this,(function(o){switch(o.label){case 0:if(window[e])return[3,5];n=function(e){var n;return d(this,(function(r){switch(r.label){case 0:return n=t[e],[4,new Promise((function(t){t(i._load(n))}))];case 1:return r.sent(),[2]}}))},r=0,o.label=1;case 1:return r<t.length?[5,n(r)]:[3,4];case 2:o.sent(),o.label=3;case 3:return r++,[3,1];case 4:window[e]=e,o.label=5;case 5:return[2]}}))}))},t.prototype._load=function(t){return h(this,void 0,void 0,(function(){var e=this;return d(this,(function(n){return[2,new Promise((function(n){n(e.loadScript(t))}))]}))}))},t}(),Ao=function(){function t(t){var e=t.dbName,n=t.tables,r=t.version,i=void 0===r?1:r,o=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}(t,["dbName","tables","version"]);this.dbName=e,this.tables=n,this.version=i,this.openDB(u({dbName:e,tables:n,version:i},o))}return t.deleteDB=function(t){var e;null===(e=window.indexedDB)||void 0===e||e.deleteDatabase(t)},t.prototype.deleteItem=function(t,e,n){var r=this.storage.transaction(t,"readwrite").objectStore(t).delete(e);return r.onsuccess=function(t){"function"==typeof n&&n(t)},r},t.prototype.getItem=function(t,e,n){var r=this.storage.transaction(t,"readwrite").objectStore(t),i=null;return(i=e?r.get(e):r.getAll()).onsuccess=function(t){var e;"function"==typeof n&&n(null===(e=null==t?void 0:t.target)||void 0===e?void 0:e.result)},i.onerror=function(t){console.error(t),n(t)},i},t.prototype.setItem=function(t,e,n,r){var i=this.storage.transaction(t,"readwrite").objectStore(t).put(n,e);return i.onsuccess=function(t){"function"==typeof r&&r(t)},i.onerror=function(t){"function"==typeof r&&r(t)},i},t.prototype.get=function(t,e){return this.getItem(this.tables[0],t,e)},t.prototype.set=function(t,e,n){return this.setItem(this.tables[0],t,e,n)},t.prototype.delete=function(t,e){return this.deleteItem(this.tables[0],t,e)},t.prototype.clear=function(t,e){var n=this.storage.transaction(this.dbName,"readwrite").objectStore(t).clear();return n.onsuccess=function(t){"function"==typeof e&&e(t)},n},t.prototype.getDB=function(){return this.storage},t.prototype.closeDB=function(){this.storage.close()},t.prototype.openDB=function(t){var e=this,n=t.dbName,r=t.tables,i=t.version,o=t.callback,a=window.indexedDB;if(a)if((null==r?void 0:r.length)<1)console.error("表名不能为空");else{var s=a.open(n,i);s.onerror=function(t){var e,n;console.error("打开数据库失败: ".concat(null===(n=null===(e=t.currentTarget)||void 0===e?void 0:e.error)||void 0===n?void 0:n.message)),"function"==typeof o&&o(t)},s.onsuccess=function(t){var n;e.storage=null===(n=t.target)||void 0===n?void 0:n.result,"function"==typeof o&&o(t)},s.onupgradeneeded=function(t){var n;e.storage=null===(n=t.target)||void 0===n?void 0:n.result,r.forEach((function(n){e.storage.objectStoreNames.contains(n)||(e.storage.createObjectStore(n),"function"==typeof o&&o(t))}))}}else console.error("你的浏览器不支持indexedDB")},t}(),Eo=function(){function t(){this.VueServer=new wo}return t.getInstance=function(){return this.instance||(this.db=new Ao({dbName:"AnovGo",tables:["logs"]}),this.instance=new t),this.instance},t.prototype.getAppStore=function(){return t.store},t.setAppStore=function(e){t.store=e,wo.setAppStore(e),Oo.setStore(e)},t.prototype.add=function(t,e,n){e.MultiState?this.VueServer.callMutation("addStateChildren",e):(this.VueServer.callMutation("addComs",{com:e,isMobile:n}),this.VueServer.callMutation("setActive",{id:t}))},t.prototype.addForParent=function(t,e,n,r){this.VueServer.callMutation("addComsForParent",{com:e,PID:n,isMobile:r}),this.VueServer.callMutation("setActive",{id:t})},t.prototype.render=function(t,e){var n=new Co(t);e?this.add(n.cid,n,!0):this.add(n.cid,n)},t.prototype.renderForParent=function(t,e,n){var r=new Co(t);void 0!==n?this.addForParent(r.cid,r,e,n):this.addForParent(r.cid,r,e)},t.prototype.reversal=function(t){new Oo(new wo).loadComponents(t)},t.prototype.emitEvent=function(t,e){var n=this,r=this.VueServer.callState("globalEvents"),i=(this.VueServer.callState("globalVars"),this.VueServer.callState("shareVariableTree")),o=this.VueServer.callState("globalSource");this.VueServer.callState("globalConstant");var a=this.VueServer.callState("list");yi(r,0,i,a,t,(function(t){n.VueServer.callMutation("changeShow",t)}),(function(t){n.VueServer.callMutation("updataSourceForComponent",t)}),e,o)},t}(),Mo=Object.defineProperty,No=Object.getOwnPropertySymbols,Po=Object.prototype.hasOwnProperty,Vo=Object.prototype.propertyIsEnumerable,Ro=(t,e,n)=>e in t?Mo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Bo=(t,e)=>{for(var n in e||(e={}))Po.call(e,n)&&Ro(t,n,e[n]);if(No)for(var n of No(e))Vo.call(e,n)&&Ro(t,n,e[n]);return t},Io=(t,e,n)=>(Ro(t,"symbol"!=typeof e?e+"":e,n),n),Fo=(t,e,n)=>new Promise(((r,i)=>{var o=t=>{try{s(n.next(t))}catch(t){i(t)}},a=t=>{try{s(n.throw(t))}catch(t){i(t)}},s=t=>t.done?r(t.value):Promise.resolve(t.value).then(o,a);s((n=n.apply(t,e)).next())})),jo={gapX:100,gapY:100,offsetLeft:0,offsetTop:0,width:120,height:64,opacity:.15,rotate:-22,fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"300",fontColor:"#000",fontFamily:"sans-serif",textAlign:"center",textBaseline:"alphabetic",monitor:!0,zIndex:9999,mode:"interval",pack:!0,blindFontSize:16,blindOpacity:.005},Lo="data-watermark-tag",zo={childList:!0,subtree:!0,attributeFilter:["style","class",Lo]};var Yo=t=>{let e="";return Object.keys(t).forEach((n=>{const r=n.replace(/([A-Z])/g,"-$1").toLowerCase();e+=`${r}:${t[n]};`})),e},Ho=(t="")=>{return`${e=t,window.btoa(decodeURI(encodeURIComponent(e)))}-${(new Date).getTime()}-${Math.floor(Math.random()*Math.pow(10,8))}`;var e};var Uo=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,qo=a((function(t,e){!function(){function e(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}function n(t,e,n){var r=new XMLHttpRequest;r.open("GET",t),r.responseType="blob",r.onload=function(){l(r.response,e,n)},r.onerror=function(){console.error("could not download file")},r.send()}function i(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return 200<=e.status&&299>=e.status}function o(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(n){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof r&&r.global===r?r:void 0,s=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(t,e,r){var s=a.URL||a.webkitURL,l=document.createElement("a");e=e||t.name||"download",l.download=e,l.rel="noopener","string"==typeof t?(l.href=t,l.origin===location.origin?o(l):i(l.href)?n(t,e,r):o(l,l.target="_blank")):(l.href=s.createObjectURL(t),setTimeout((function(){s.revokeObjectURL(l.href)}),4e4),setTimeout((function(){o(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,r,a){if(r=r||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(e(t,a),r);else if(i(t))n(t,r,a);else{var s=document.createElement("a");s.href=t,s.target="_blank",setTimeout((function(){o(s)}))}}:function(t,e,r,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof t)return n(t,e,r);var o="application/octet-stream"===t.type,l=/constructor/i.test(a.HTMLElement)||a.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||o&&l||s)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var t=u.result;t=c?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=t:location=t,i=null},u.readAsDataURL(t)}else{var h=a.URL||a.webkitURL,d=h.createObjectURL(t);i?i.location=d:location.href=d,i=null,setTimeout((function(){h.revokeObjectURL(d)}),4e4)}});a.saveAs=l.saveAs=l,t.exports=l}()})),Go=function(t){if(0===t.length)return[];var n=function(t){for(var r,i,o,a,s=0;s<t.length;s++)t[s].tmpData&&(t[s]=Object.assign({},(i=t[s],o=void 0,a=void 0,o=e.cloneDeep(i),a=e.omit(o,["comData","source"]),u({},a)))),t[s]&&t[s].children&&(null===(r=t[s])||void 0===r?void 0:r.children.length)?n(t[s].children):t[s]&&t[s].dynamicChildren&&Array.from(t[s].dynamicChildren).forEach((function(t,e){n(t[1])}))};return n(t),t},Wo=function(t){var n=e.cloneDeep(t)?e.cloneDeep(t):{};"string"==typeof t&&(n=JSON.parse(t));var r=[];if(n instanceof Array)n.forEach((function(t,e){var n=JSON.parse(t.caseDetailData)?JSON.parse(t.caseDetailData):{},i=t.caseDetailPath,o=t.caseDetailName,a=n.theme,s=void 0===a?null:a,l=n.globalVars,c=void 0===l?null:l,u=n.shareVariableTree,h=void 0===u?null:u,d=n.plant,f=void 0===d?null:d,p=n.list,m=void 0===p?[]:p,g=n.path,v=void 0===g?"":g;n.name;var y=n.resource,b=void 0===y?{jspaths:[],csspaths:[],otherpaths:[]}:y,w=n.watermark,_=void 0===w?null:w,D=n.tw,S=void 0===D?null:D,x=n.globalSource,k=void 0===x?[]:x,T=n.globalEvents,C=void 0===T?[]:T,O=n.globalConstant,A=void 0===O?[]:O;r.push({path:v||i,theme:s,name:o,resource:b,tw:S,watermark:_,globalSource:k,globalVars:c,globalEvents:C,globalConstant:A,shareVariableTree:h,plant:f,list:Go(m)})}));else{var i=n.theme,o=void 0===i?null:i,a=n.globalVars,s=void 0===a?null:a,l=n.shareVariableTree,c=void 0===l?null:l,u=n.plant,h=void 0===u?null:u,d=n.list,f=void 0===d?[]:d,p=n.resource,m=void 0===p?{jspaths:[],csspaths:[],otherpaths:[]}:p,g=n.watermark,v=void 0===g?null:g,y=n.tw,b=void 0===y?null:y,w=n.globalSource,_=void 0===w?[]:w,D=n.globalEvents,S=void 0===D?[]:D,x=n.globalConstant,k=void 0===x?[]:x;r.push({resource:m,tw:b,watermark:v,globalSource:_,theme:o,globalVars:s,globalEvents:S,shareVariableTree:c,globalConstant:k,plant:h,list:Go(f)})}return r};function $o(t,e){throw new Error("".concat(t,":Expected HTMLElement, got ").concat(e))}var Ko=function(){function t(t){this.option=t,this.option.isResize&&window.addEventListener("resize",this.resize.bind(this))}return Object.defineProperty(t,"defaultOption",{get:function(){return t._defaultOption},set:function(e){t._defaultOption=e},enumerable:!1,configurable:!0}),t.getInstance=function(e){return t.instance||(t.instance=new t(e)),t.instance},t.prototype.removeResize=function(){window.removeEventListener("resize",this.resize.bind(this))},t.prototype.resize=function(){var t=this.option,e=t.isEqualScale,n=t.wrapSelector,r=t.viewSelector,i=t.designWidth,o=t.designHeight,a=t.horizontal,s=t.vertical,l=document.querySelector(n);l||$o("wrap",l);var c=l.clientWidth,u=l.clientHeight,h=document.querySelector(r);h||$o("view",h),h.style.position="absolute",h.style.width=i+"px",h.style.height=o+"px";var d,f,p,m,g=Math.min(c/i,u/o);if(e){switch(h.style.transform="scale(".concat(g,")"),a){case"center":d=(c-i)/2+"px";break;case"left":d=(g-1)/2*i+"px";break;case"right":p=(g-1)/2*i+"px"}switch(s){case"center":f=(u-o)/2+"px";break;case"top":f=(g-1)/2*o+"px";break;case"bottom":m=(g-1)/2*o+"px"}}else h.style.transform="scale('".concat(c/i,", ").concat(u/o,"')"),d=(c-i)/2+"px",f=(u-o)/2+"px";f?h.style.top=f:m&&(h.style.bottom=m),d?h.style.left=d:p&&(h.style.right=p)},t._defaultOption={isEqualScale:!0,designWidth:1920,designHeight:1080,wrapSelector:"body",viewSelector:"#app",horizontal:"center",vertical:"center",isResize:!0},t}(),Zo=function(){function t(t){this.wrap=null,this.target=null,this.type=0,this.minRatio=1,this.outSize={w:0,h:0},this.inSize={w:0,h:0};var e=t.wrap,n=t.target,r=t.type,i=t.size,o=t.callback;this.size=i,this.type=r,this.initOptions(e,n,i),this.initSize(i),this.layout(),this.scale(o),window.addEventListener("resize",this.reset.bind(this,o))}return t.prototype.reset=function(t){this.initSize(this.size),this.layout(),t?this.scale(t):this.scale()},t.getInstance=function(e){return t.instance||(t.instance=new t(e)),t.instance},t.prototype.removeResize=function(){window.removeEventListener("resize",this.reset.bind(this,void 0))},t.prototype.getDom=function(t){if(e.isElement(t))return t;var n=document.querySelector(t);return e.isElement(n)?n:null},t.prototype.initOptions=function(t,e,n){this.wrap=this.getDom(t),this.target=this.getDom(e),this.target.style.width=n.w+"px",this.target.style.height=n.h+"px",this.verificationDom()},t.prototype.initSize=function(t){this.outSize.w=this.wrap.clientWidth,this.outSize.h=this.wrap.clientHeight,this.inSize=t},t.prototype.verificationDom=function(){null!=this.wrap&&null!=this.target&&this.isChildOf(this.wrap,this.target)||console.warn("Please pass in the DOM element correctly!")},t.prototype.layout=function(){if(0==this.type||3==this.type){var t=(this.outSize.w-this.inSize.w)/2,e=(this.outSize.h-this.inSize.h)/2;this.target.style.top=e+"px",this.target.style.left=t+"px"}else this.wrap.style.display="flex",this.wrap.style["align-items"]="center",this.wrap.style["justify-content"]="center",this.target.style.position="static",1==this.type?(this.wrap.style["overflow-y"]="auto",this.wrap.style["overflow-x"]="hidden"):2==this.type&&(this.wrap.style["overflow-y"]="hidden",this.wrap.style["overflow-x"]="auto")},t.prototype.isChildOf=function(t,e){var n;if(t&&e)for(n=t.parentNode;n;){if(e===n)return!0;n=n.parentNode}return!1},t.prototype.scale=function(t){var e=1,n=1;switch(this.type){case 0:e=Math.min(this.outSize.w/this.inSize.w,this.outSize.h/this.inSize.h),n=Math.min(this.outSize.w/this.inSize.w,this.outSize.h/this.inSize.h);break;case 1:n=e=this.outSize.w/this.inSize.w;break;case 2:e=n=this.outSize.h/this.inSize.h;break;case 3:e=this.outSize.w/this.inSize.w,n=this.outSize.h/this.inSize.h}t&&t([e,n]),this.target.style.transform="scale(".concat(e,",").concat(n,")")},t.prototype.resize=function(){},t}(),Xo=a((function(t){!function(e){var n=function(){return{escape:function(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:t,mimeType:function(e){var n=t(e).toLowerCase();return(r="application/font-woff",i="image/jpeg",{woff:r,woff2:r,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:i,jpeg:i,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[n]||"";var r,i},dataAsUrl:function(t,e){return"data:"+e+";base64,"+t},isDataUrl:function(t){return-1!==t.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):function(t){return new Promise((function(e){for(var n=window.atob(t.toDataURL().split(",")[1]),r=n.length,i=new Uint8Array(r),o=0;o<r;o++)i[o]=n.charCodeAt(o);e(new Blob([i],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var i=n.createElement("a");return n.body.appendChild(i),r.href=e,i.href=t,i.href},getAndEncode:function(t){var e=3e4;s.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());return new Promise((function(n){var r,i=new XMLHttpRequest;if(i.onreadystatechange=a,i.ontimeout=l,i.responseType="blob",i.timeout=e,i.open("GET",t,!0),i.send(),s.impl.options.imagePlaceholder){var o=s.impl.options.imagePlaceholder.split(/,/);o&&o[1]&&(r=o[1])}function a(){if(4===i.readyState)if(200===i.status){var e=new FileReader;e.onloadend=function(){var t=e.result.split(/,/)[1];n(t)},e.readAsDataURL(i.response)}else r?n(r):c("cannot fetch resource: "+t+", status: "+i.status)}function l(){r?n(r):c("timeout of "+e+"ms occured while fetching resource: "+t)}function c(t){console.error(t),n("")}}))},uid:function(){var t=0;return function(){return"u"+e()+t++;function e(){return("0000"+(Math.random()*Math.pow(36,4)|0).toString(36)).slice(-4)}}}(),delay:function(t){return function(e){return new Promise((function(n){setTimeout((function(){n(e)}),t)}))}},asArray:function(t){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e},escapeXhtml:function(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){e(r)},r.onerror=n,r.src=t}))},width:function(t){var n=e(t,"border-left-width"),r=e(t,"border-right-width");return t.scrollWidth+n+r},height:function(t){var n=e(t,"border-top-width"),r=e(t,"border-bottom-width");return t.scrollHeight+n+r}};function t(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function e(t,e){var n=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(n.replace("px",""))}}(),r=function(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(t,n,o){return a()?Promise.resolve(t):Promise.resolve(t).then(r).then((function(e){var r=Promise.resolve(t);return e.forEach((function(t){r=r.then((function(e){return i(e,t,n,o)}))})),r}));function a(){return!e(t)}},shouldProcess:e,impl:{readUrls:r,inline:i}};function e(e){return-1!==e.search(t)}function r(e){for(var r,i=[];null!==(r=t.exec(e));)i.push(r[1]);return i.filter((function(t){return!n.isDataUrl(t)}))}function i(t,e,r,i){return Promise.resolve(e).then((function(t){return r?n.resolveUrl(t,r):t})).then(i||n.getAndEncode).then((function(t){return n.dataAsUrl(t,n.mimeType(e))})).then((function(r){return t.replace(function(t){return new RegExp("(url\\(['\"]?)("+n.escape(t)+")(['\"]?\\))","g")}(e),"$1"+r+"$3")}))}}(),i=function(){return{resolveAll:function(){return t().then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))},impl:{readAll:t}};function t(){return Promise.resolve(n.asArray(document.styleSheets)).then((function(t){var e=[];return t.forEach((function(t){try{n.asArray(t.cssRules||[]).forEach(e.push.bind(e))}catch(e){console.log("Error while reading CSS rules from "+t.href,e.toString())}})),e})).then((function(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return r.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return r.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}(),o=function(){return{inlineAll:function e(i){return i instanceof Element?o(i).then((function(){return i instanceof HTMLImageElement?t(i).inline():Promise.all(n.asArray(i.childNodes).map((function(t){return e(t)})))})):Promise.resolve(i);function o(t){var e=t.style.getPropertyValue("background");return e?r.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}},impl:{newImage:t}};function t(t){return{inline:function(e){return n.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||n.getAndEncode).then((function(e){return n.dataAsUrl(e,n.mimeType(t.src))})).then((function(e){return new Promise((function(n,r){t.onload=n,t.onerror=r,t.src=e}))}))}}}}(),a={imagePlaceholder:void 0,cacheBust:!1},s={toSvg:l,toPng:function(t,e){return c(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return c(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return c(t,e||{}).then(n.canvasToBlob)},toPixelData:function(t,e){return c(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,n.width(t),n.height(t)).data}))},impl:{fontFaces:i,images:o,util:n,inliner:r,options:{}}};function l(t,e){return function(t){void 0===t.imagePlaceholder?s.impl.options.imagePlaceholder=a.imagePlaceholder:s.impl.options.imagePlaceholder=t.imagePlaceholder;void 0===t.cacheBust?s.impl.options.cacheBust=a.cacheBust:s.impl.options.cacheBust=t.cacheBust}(e=e||{}),Promise.resolve(t).then((function(t){return u(t,e.filter,!0)})).then(h).then((function(t){e.bgcolor&&(t.style.backgroundColor=e.bgcolor);e.width&&(t.style.width=e.width+"px");e.height&&(t.style.height=e.height+"px");e.style&&Object.keys(e.style).forEach((function(n){t.style[n]=e.style[n]}));return t})).then((function(r){return function(t,e,r){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(n.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+r+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}(r,e.width||n.width(t),e.height||n.height(t))}))}function c(t,e){return l(t,e).then(n.makeImage).then(n.delay(100)).then((function(r){var i=function(t){var r=document.createElement("canvas");if(r.width=e.width||n.width(t),r.height=e.height||n.height(t),e.bgcolor){var i=r.getContext("2d");i.fillStyle=e.bgcolor,i.fillRect(0,0,r.width,r.height)}return r}(t);return i.getContext("2d").drawImage(r,0,0),i}))}function u(t,e,r){return r||!e||e(t)?Promise.resolve(t).then((function(t){return t instanceof HTMLCanvasElement?n.makeImage(t.toDataURL()):t.cloneNode(!1)})).then((function(r){return function(t,e,r){var i=t.childNodes;return 0===i.length?Promise.resolve(e):o(e,n.asArray(i),r).then((function(){return e}));function o(t,e,n){var r=Promise.resolve();return e.forEach((function(e){r=r.then((function(){return u(e,n)})).then((function(e){e&&t.appendChild(e)}))})),r}}(t,r,e)})).then((function(e){return function(t,e){var r=e;return r instanceof Element?Promise.resolve().then(i).then(o).then(a).then(s).then(l).then((function(){return r})):r;function i(){if(r instanceof HTMLVideoElement){var e=window.getComputedStyle(t),n=document.createElement("canvas");n.width=parseInt(e.width,10),n.height=parseInt(e.height,10);var i=Math.max(t.videoWidth/n.width,t.videoHeight/n.height),o=t.videoWidth/i,a=t.videoHeight/i,s=n.width/2-o/2,l=n.height/2-a/2;n.getContext("2d").drawImage(t,s,l,o,a);var c=r=document.createElement("img");try{c.src=n.toDataURL()}catch(t){c.src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="}}}function o(){function e(t,e){function r(t,e){n.asArray(t).forEach((function(n){e.setProperty(n,t.getPropertyValue(n),t.getPropertyPriority(n))}))}t.cssText?e.cssText=t.cssText:r(t,e)}e(window.getComputedStyle(t),r.style)}function a(){function e(e){var i=window.getComputedStyle(t,e),o=i.getPropertyValue("content");if(""!==o&&"none"!==o){var a=n.uid();r.className=r.className+" "+a;var s=document.createElement("style");s.appendChild(l(a,e,i)),r.appendChild(s)}function l(t,e,r){var i="."+t+":"+e,o=r.cssText?a(r):s(r);return document.createTextNode(i+"{"+o+"}");function a(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function s(t){return n.asArray(t).map(e).join("; ")+";";function e(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")}}}}[":before",":after"].forEach((function(t){e(t)}))}function s(){t instanceof HTMLTextAreaElement&&(r.innerHTML=t.value),t instanceof HTMLInputElement&&r.setAttribute("value",t.value)}function l(){r instanceof SVGElement&&(r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r instanceof SVGRectElement&&["width","height"].forEach((function(t){var e=r.getAttribute(t);e&&r.style.setProperty(t,e)})))}}(t,e)})):Promise.resolve()}function h(t){return o.inlineAll(t).then((function(){return t}))}t.exports=s}()})),Jo=function(t){if(!t)return!1;return 1==new RegExp(/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/).test(t)},Qo=function(t){for(var e="",n=new Uint8Array(t),r=n.byteLength,i=0;i<r;i++)e+=String.fromCharCode(n[i]);return"data:image/jpeg;base64,".concat(window.btoa(e))},ta=function(t,e){void 0===e&&(e="screenshot.jpeg");try{for(var n=t.split(","),r=n[0].match(/:(.*?);/)[1],i=atob(n[1]),o=i.length,a=new Uint8Array(o);o--;)a[o]=i.charCodeAt(o);return new File([a],e,{type:r})}catch(t){console.error("dataURLtoFile:数据转换错误 : "+t)}},ea=function(t,e){return h(void 0,void 0,void 0,(function(){var n;return d(this,(function(r){switch(r.label){case 0:return r.trys.push([0,11,,12]),"File"!=e||"string"!=typeof t?[3,2]:[4,ta(t)];case 1:case 3:case 5:case 7:return[2,r.sent()];case 2:return"File"!=e||"[object ArrayBuffer]"!=t.toString()?[3,4]:[4,new File([t],"screenshot.jpeg")];case 4:return"Base64"!=e||"string"!=typeof t?[3,6]:[4,t];case 6:return"Base64"!=e||"[object ArrayBuffer]"!=t.toString()?[3,8]:[4,Qo(t)];case 8:return[4,new Error("transformData: 转换发生错误")];case 9:throw r.sent();case 10:return[3,12];case 11:return n=r.sent(),console.log(n),[3,12];case 12:return[2]}}))}))},na=function(t,e,r,i){return h(void 0,void 0,void 0,(function(){return d(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,n({url:t,method:"GET",responseType:"arraybuffer",params:{url:e,dom:r,quality:i}})];case 1:return[2,o.sent()];case 2:return o.sent(),console.warn("请求截图服务器发生错误,请检查地址及参数是否正确!",{url:t,path:e,dom:r,quality:i}),[2,null];case 3:return[2]}}))}))},ra=function(t,e){return h(void 0,void 0,void 0,(function(){var n,r;return d(this,(function(i){switch(i.label){case 0:if(i.trys.push([0,2,,3]),!(n=document.querySelector(t)))throw new Error("domToImg:"+t+" dom未被找到!");return[4,Xo.toJpeg(n,{style:{transform:"scale(1)",position:"static"},quality:e})];case 1:return[2,i.sent()];case 2:return r=i.sent(),console.warn(r),[3,3];case 3:return[2]}}))}))},ia=function(t){return"".concat(t>15?"":0).concat(t.toString(16))},oa=function(t){var e=t.r,n=t.g,r=t.b,i=t.a,o=void 0===i?1:i;return"#".concat(ia(e)).concat(ia(n)).concat(ia(r)).concat(1===o?"":ia(Math.floor(255*o)))},aa=function(t){var e=t.r,n=t.g,r=t.b;return"rgb(".concat(e,",").concat(n,",").concat(r,")")},sa=function(t,e){void 0===e&&(e=1e4);var n=t.r,r=t.g,i=t.b,o=t.a,a=void 0===o?1:o;return"rgba(".concat(n,",").concat(r,",").concat(i,",").concat(Math.floor(a*e)/e,")")},la=function(t){var e=t.slice(1),n=1;3===e.length&&(e="".concat(e[0]).concat(e[0]).concat(e[1]).concat(e[1]).concat(e[2]).concat(e[2])),8===e.length&&(n=parseInt(e.slice(6),16)/255,e=e.slice(0,6));var r=parseInt(e,16);return{r:r>>16&255,g:r>>8&255,b:255&r,a:n}},ca=function(t){var e=t.match(/(\d(\.\d+)?)+/g)||[],n=e.map((function(t){return parseInt(t,10)}));return{r:n[0],g:n[1],b:n[2],a:parseFloat(e[3])}},ua=function(t){if(t.startsWith("#"))return la(t);if(t.startsWith("rgb"))return ca(t);if("transparent"===t)return la("#00000000");throw new Error("color string error: ".concat(t))},ha=new Map([["E1001","系统未知错误"],["E1002","vue逻辑错误"],["E1003","JavaScript错误"],["E1004","静态资源加载错误"],["E1005","请求错误"],["E1006","Promise错误"]]),da=function(t,e,n,r){void 0===r&&(r="null"),fa({code:t,type:ha.get("".concat(t)),msg:e,router:n.currentRoute.value.fullPath,file:r,createTime:(new Date).toLocaleString()})},fa=function(t){var e=localStorage.getItem("ERROR");if(e){var n=JSON.parse(e);pa(n),n.length>50?(n[0]=t,pa(n)):n.push(t),localStorage.setItem("ERROR",JSON.stringify(n))}else localStorage.setItem("ERROR",JSON.stringify([t]))},pa=function(t){t.sort((function(t,e){return t.createTime>e.createTime?1:-1}))},ma=Object.freeze({__proto__:null,RecursiveList:Ce,Scale:Zo,SizeAdaption:Ko,UpdataForContainer:Ve,Watermark:class{constructor(t={}){Io(this,"options"),Io(this,"container"),Io(this,"watermarkContent"),Io(this,"watermarkDom"),Io(this,"style"),Io(this,"watermarkTag"),Io(this,"shadowRoot"),Io(this,"mutationObserver"),Io(this,"_isAgainRender",(t=>{if("attributes"===t.type){if(t.attributeName===Lo)return!0;if(this.watermarkTag===this._getNodeRandomId(t.target))return!0}return!(!t.removedNodes.length||this.watermarkTag!==this._getNodeRandomId(t.removedNodes[0]))})),Io(this,"_getNodeRandomId",(t=>{var e,n;return null==(e=null==t?void 0:t.dataset)?void 0:e[(n=Lo,n.split("-").slice(1).reduce(((t,e,n)=>0===n?e:`${t}${e[0].toUpperCase()+e.slice(1)}`)))]})),Io(this,"_destroyMutationObserver",(()=>{this.mutationObserver&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.mutationObserver=null)})),Io(this,"_getWatermarkDom",(t=>Fo(this,null,(function*(){this.watermarkDom||(this.watermarkDom=document.createElement("div")),"number"==typeof t&&t&&(this.style.height=`${t}px`);const e=yield function(t){const{text:e,gapX:n,gapY:r,offsetTop:i,offsetLeft:o,width:a,height:s,rotate:l,opacity:c,fontSize:u,fontStyle:h,fontVariant:d,fontWeight:f,fontFamily:p,fontColor:m,textAlign:g,textBaseline:v,image:y,blindText:b,blindFontSize:w,blindOpacity:_}=t;return new Promise(((t,D)=>{const S=document.createElement("canvas"),x=S.getContext("2d"),k=1*(Number(n)+Number(a)),T=1*(Number(r)+Number(s)),C=Number(o)||Number(n)/2,O=Number(i)||Number(r)/2;if(S.setAttribute("width",`${k}px`),S.setAttribute("height",`${T}px`),x){const n=1*a,r=1*s;if(x.translate(1*C,1*O),x.rotate(Math.PI/180*Number(l)),b&&(x.globalAlpha=_,x.font=`${w}px normal`,x.fillText(b,0,0)),x.globalAlpha=c,y){const e=new Image;return e.crossOrigin="anonymous",e.referrerPolicy="no-referrer",e.src=y,void(e.onload=()=>{x.drawImage(e,0,0,n,r),t({url:x.canvas.toDataURL(),width:k,height:T})})}const i=Array.isArray(e)?e:[e],o=i.map((t=>x.measureText(t).width)),h=Math.max(...o),d=1*Number(u);x.textAlign=g,x.textBaseline=v,x.fillStyle=m,x.font=A(`${d}px`),h>a&&(x.font=A(d/2+"px"));const f=d+5;let p=(r-(u*i.length+5*(i.length-1)))/2;p=p<0?0:p;for(let t=0;t<i.length;t++)x.fillText(i[t]||"",n/2,p+f*t);t({url:x.canvas.toDataURL(),width:k,height:T})}function A(t){return`${h} ${d} ${f} ${t} ${p}`}return D()}))}(this.options);if(null==e?void 0:e.url){const t=e.url;"repeat"===this.options.mode?this.style.backgroundImage=`url(${t})`:(this.style.backgroundImage=`url(${t}), url(${t})`,this.style.backgroundRepeat="repeat, repeat",this.style.backgroundPosition=`${e.width/2}px ${e.height/2}px, 0 0`),this.options.container||(this.style.position="fixed",this.style.height=void 0),this.watermarkDom.setAttribute("style",Yo(this.style))}return this.watermarkDom.setAttribute(Lo,this.watermarkTag),this.watermarkDom})))),Io(this,"_getWatermarkHeight",(()=>{if(!this.container)return 0;let t=0;const{scrollHeight:e=0,clientHeight:n=0}=this.options.container?this.container.parentNode:this.container;return e>n&&(t=Math.max(e,n)),t})),this.options=Object.assign({},jo,t),this.style={position:"absolute",left:0,top:0,right:0,bottom:0,pointerEvents:"none",overflow:"hidden",backgroundColor:"transparent",backgroundRepeat:"repeat"},this.style.zIndex=this.options.zIndex,this.watermarkTag=Ho("watermark"),this.mutationObserver=null,this._render()}update(t={}){this.options=Bo(Bo({},this.options),t),this.style.zIndex=this.options.zIndex,this._render()}show(){this.watermarkDom&&(this.style.display="block",this.watermarkDom.setAttribute("style",Yo(this.style)))}hide(){this.watermarkDom&&(this.style.display="none",this.watermarkDom.setAttribute("style",Yo(this.style)))}destroy(){this.shadowRoot=void 0,this.watermarkContent&&(this.watermarkContent.remove(),this.watermarkContent=void 0),this.watermarkDom&&(this.watermarkDom.remove(),this.watermarkDom=void 0),this._destroyMutationObserver()}_render(){return Fo(this,null,(function*(){this._destroyMutationObserver(),this.container=((t,e,n={},r)=>{let i;if("string"==typeof t){if(i=document.getElementById(t),!i)throw new Error(`水印挂载节点未找到,请检查#${t}是否存在`)}else i=null!=t?t:document.body;i.setAttribute(Lo,e);const o=Bo({position:"relative"},n);return r||delete o.position,i.setAttribute("style",Yo(o)),i})(this.options.container,this.watermarkTag,this.options.containerStyle,this.options.pack),this.watermarkContent||(this.watermarkContent=(t=>{const e=document.createElement("div");return e.setAttribute("style",Yo({pointerEvents:"none"})),e.setAttribute(Lo,t),e})(this.watermarkTag),this.container.append(this.watermarkContent));const t=this._getWatermarkHeight();if(this.watermarkDom=yield this._getWatermarkDom(t),this.watermarkContent){const t=this.watermarkContent.childNodes||[];for(let e=0;e<t.length;e++)this.watermarkContent.removeChild(t[e])}"function"==typeof this.watermarkContent.attachShadow?this.shadowRoot||(this.shadowRoot=this.watermarkContent.attachShadow({mode:"open"})):this.shadowRoot=this.watermarkContent,this.shadowRoot.append(this.watermarkDom),Uo&&this.options.monitor&&(this.mutationObserver=new Uo((t=>{t.forEach((t=>{if(this._isAgainRender(t))return this.destroy(),void this._render()}))})),this.mutationObserver.observe(this.container,zo),this.shadowRoot&&this.mutationObserver.observe(this.shadowRoot,zo))}))}},arraySwap:ee,arraySwapDeep:re,arraySwapForId:ne,breakUp:ge,checkBaseData:te,checkVar:function(t,e){var n,r,i,o=!1,a=t.type,s=t.converse,l=t[a];if((null==s?void 0:s.use)&&(null===(n=null==s?void 0:s.data)||void 0===n?void 0:n.length))for(var c=0,u=s.data;c<u.length;c++){if((null==(v=u[c])?void 0:v.use)&&v.dependVars.includes(e)){o=!0;break}}if(o)return o;var h="",d="",f="";"api"==a&&(h=l.url,(null===(r=l.headers)||void 0===r?void 0:r.use)&&(d=l.headers.value),f=l.params),"datasource"==a&&(h=l.inputSql),"indicator"==a&&((null===(i=l.headers)||void 0===i?void 0:i.use)&&(d=l.headers.value),f=l.params);for(var p=/({{[\w]*}})|((@)[\w]*)/gm,m=0,g=[h,d,f];m<g.length;m++){var v,y=(v=g[m]).match(p);if((null==y?void 0:y.length)&&y.find((function(t){return t=="{{".concat(e,"}}")||t=="@".concat(e)}))){o=!0;break}}return o},comToggle:pe,decrypAES:function(t){var e=Jt.enc.Utf8.parse(Ee),n=Jt.enc.Utf8.parse(Me);return Jt.AES.encrypt(t,e,{iv:n,mode:Jt.mode.CBC,padding:Jt.pad.Pkcs7}).toString()},decrypt:function(t){var e=new Kt;return e.setPrivateKey("MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQClaeLu4thVXyLI\nM9NHpmxqP7YEcKfjFPMV5UcAPNN20GIUf2Lh8p4MrQh9s9X/1MZ5Fg1+XSpJ90u1\nT7VkjOamoemlp26SaTn41sEbheb+UBmBW3d1QitLJqbFWPCfKY3s8t3FpI5L+aBT\npIMYyE1MzvoBcplldYwrXZQJe8qSH5OQa59xfMt7su2u8c8s6BycQQPYKRYBO4T2\nDwr2PhN44zGElwcFSZcuBToKG59ricF53bz30TuPElrXj4nUgNrZqGsMUtk3sf/9\nmy/CderFVvGbSTmPJap8KmDXdXvMPcPE1aWjcwiHZ8+0gRQNWG6Co93SM+aqq6p0\nE1Oe7YgZAgMBAAECggEABN8LadGQYWM92Pt9u1xxUOezaooOx6c0SW7JGn6wE42r\ndcMSnGjSsrjdySXkpXYUqjg2CYSg3DDGL/667s0fdcTK5q/5l6I1rNhWM4NL/C1L\nsv2IlRFvyPTIcINgAq/smA/G7C0ea6pcSFpN6grsC9kEj8paLhy6FgTZeTYGDyuG\nwI3D7XWZNzWfyQlAsoWEYAmDx72rOuEaeK4W4SMf3BB2g1hJ6fZoKT3ehHozAGcJ\nB7R8k3tGALVYdOqQgXhj8t3vNu1OATG0Q6d4z28e4TwsVunxReTyRcofrgOVwpry\nEmb4C5RYaN/rWxRrL8aW+nB3wAD/PFDacVBz/8RvaQKBgQDX90jqlLtLRVAsqbiS\nSHmX67CqQzNNDWgysQLmF2YmmkGyth4QR+cNEenIEeSSt+vc0VMAbxYY5SVzVCRl\nSZHoKHNlLGmepd3aJw5ZcFnpU86J7aG8fhvgZGEmCR+1JOZU7pUbpTvka0WQC3AK\n2+O7nUYIU65xeOaJVZvUu6My+wKBgQDEE6DrFVMNgI3dDZM0buHMYDJ2mL9F1DZb\n2URxYAlmvjkpaQb9Vq1VXV0ApZ3ItXgIX6cVrJB+MILmrsoxAamFOl/9AYiKnpnb\nYMxxqFYPuME7fzEli041915j6CpMmOwrAq6SrLiZ//hNlobJf76dAY9qyX91BTC8\nBfEWVhnk+wKBgQDT5kb+G+bVSPIMkI6PwVrE7DWQKZV5YdE+A55TgtvwvmP95GEF\nGneixFO8wYmjR6C+LgihoV1uGc+wI/v+AbyOrLnkqDoNtrNB7BZRPUKLBHbfsHCE\nELxrZDJJ7qPUyZrR9LIKyQpF6db8KazKiswc9oiTfP/pSHXyhDP8/Ap55wKBgQC6\njDI9dzxdTEGsXo3/BL+vQpbAXvMb7JsLJ9sGQuiu56xayaHsxdqDrSAezXMg0gYx\ncU/2Pwf6Bw2DjCiyF3LBXpiUjjDqMZsQLThVqmK28oBlqs2HetIeZgtX4jrcRWHs\nSdDtm4bGfdIvf1cdvnwLxMA+SRcKrrV/LegB6EkaoQKBgEwE4rllfRxOSGaF47ew\nRxTLGphZmxhLDsx0fMOHflx/BnGnxruBLEhdv3mlp12YMmb2s6kwFJvngLq4fZll\nTmC7BW3Z9h8XsL9j2xtID+5gsxYHHOCcdbzGuQV5KWb51cBym7EP9qk/3NP8w3/+\nH0iKrgAII5Ym0yh41dGL5HCo"),e.decrypt(t)},encrypt:function(t){var e=new Kt;return e.setPublicKey("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApWni7uLYVV8iyDPTR6Zs\naj+2BHCn4xTzFeVHADzTdtBiFH9i4fKeDK0IfbPV/9TGeRYNfl0qSfdLtU+1ZIzm\npqHppadukmk5+NbBG4Xm/lAZgVt3dUIrSyamxVjwnymN7PLdxaSOS/mgU6SDGMhN\nTM76AXKZZXWMK12UCXvKkh+TkGufcXzLe7LtrvHPLOgcnEED2CkWATuE9g8K9j4T\neOMxhJcHBUmXLgU6Chufa4nBed2899E7jxJa14+J1IDa2ahrDFLZN7H//ZsvwnXq\nxVbxm0k5jyWqfCpg13V7zD3DxNWlo3MIh2fPtIEUDVhugqPd0jPmqquqdBNTnu2I\nGQIDAQAB"),e.encrypt(t)},errorHandler:da,executeFilter:function(t){return t.hasOwnProperty("originalValue")||(t.originalValue=t.value),t.converter&&t.converterCode?t.value=Ne(t.converterCode,t.originalValue):t.value=t.originalValue,t},exportJson:function(t){var e=t.caseName,n=void 0===e?"case-name":e,r=t.caseImg,i=void 0===r?"":r,o=t.caseRemark,a=void 0===o?"":o,l=t.details,c=t.caseClientType,u=void 0===c?"":c,h=t.id,d={caseClientType:u,caseName:n,caseImg:i,caseRemark:a,caseId:void 0===h?"":h,createTime:s().format("YYYY-MM-DD , h:mm:ss"),caseData:Wo(l)},f=new Blob([JSON.stringify(d)],{type:"json"});qo.saveAs(f,n+".json")},findItem:se,findItemDeep:ie,findItemIndexDeep:function(t,e){for(var n,r=0,i=0;i<t.length;i++){var o=t[i];if(r+=1,o.cid==e)break;if(null===(n=null==o?void 0:o.children)||void 0===n?void 0:n.length)for(var a=0;a<(null==o?void 0:o.children.length);a++){if(r+=1,(null==o?void 0:o.children[a]).cid==e)return r}}return r},findParentDeep:ae,genCopyName:function(t,e,n){var r,i;void 0===n&&(n=" copy");var o=new RegExp("".concat(n,"( \\d+)?$")).exec(t);o?(r=o[1]?parseInt(o[1]):0,i=t.slice(0,o.index)):(r=0,i=t);var a=new RegExp("^".concat(i).concat(n,"( [1-9][0-9]*)?$")),s=[];e.forEach((function(t){if(o=a.exec(t)){var e=o[1]?parseInt(o[1]):1;s.push(e)}})),s.sort((function(t,e){return t-e})),r++;for(var l=0,c=s.length;l<c;l++)if(s[l]===r)r++;else if(s[l]>r)break;return i+n+" "+r},genID:Oe,generateCaseDataJson:Wo,generateComponentList:Go,generateJson:function(t){var e=t.caseName,n=void 0===e?"":e,r=t.caseData;return t.plangInfoForPsd,{caseName:n,createTime:s().format("YYYY-MM-DD , h:mm:ss"),caseData:Wo(r)}},generatePageData:function(t){var e={},n=e.theme,r=void 0===n?null:n,i=e.globalVars,o=void 0===i?null:i,a=e.shareVariableTree,s=void 0===a?null:a,l=e.plant,c=void 0===l?null:l,u=e.list,h=void 0===u?[]:u,d=e.undos,f=void 0===d?[]:d,p=e.undoRedoPointer,m=void 0===p?-1:p,g=e.globalEvents,v=void 0===g?[]:g;return t&&(r=t.theme,c=t.plant),{theme:r,globalVars:o,globalEvents:v,shareVariableTree:s,plant:c,undos:f,undoRedoPointer:m,list:Go(h)}},getAncestorsNodes:oe,getColorInfo:function(t){var e=ua(t);return{hex:oa(e),rgba:sa(e),rgb:aa(e),rgbaObj:e}},getDataForEvaluator:y,getInteractive:Ui,getInteractive2:function(t,n,r,i,o){var a;try{var s={},l=[],c=[],u=[],h=e.cloneDeep(t);return(null===(a=null===window||void 0===window?void 0:window.go)||void 0===a?void 0:a.dev)&&ce(t,(function(t){var e,n,r;if(null===(n=null===(e=null==t?void 0:t.tmpData)||void 0===e?void 0:e.actions)||void 0===n?void 0:n.length)for(var i=0,o=null===(r=null==t?void 0:t.tmpData)||void 0===r?void 0:r.actions;i<o.length;i++){var a=o[i];if("toggle"==a.behave){var s=a.toggle;if(null==s?void 0:s.length)for(var l=0,c=s;l<c.length;l++){var u=c[l],h=u.value;(null==h?void 0:h.length)&&(u.value=u.value.map((function(t){return{cid:t.cid,viewComName:t.viewComName,name:t.name,visible:t.visible}})))}}}})),ce(h,(function(t){var e,n;if(null===(n=null===(e=null==t?void 0:t.tmpData)||void 0===e?void 0:e.actions)||void 0===n?void 0:n.length){var r=t.tmpData.actions.map((function(t){return t.eventType}));Ae({types:r,element:t,actions:l,events:c,eventsComs:u})}})),n&&n.length&&(l=f(f([],l,!0),n,!0)),r&&r.length&&(l=f(f([],l,!0),r,!0)),i&&i.length&&(l=f(f([],l,!0),i,!0)),ce(h,(function(t){var e,n=null===(e=null==t?void 0:t.tmpData)||void 0===e?void 0:e.source;qi(n,l,t,s)})),l.filter((function(t){if(t.fork){var e=l.find((function(e){return e.mapField==t.forkValue||Array.isArray(t.forkValue)&&t.forkValue.includes(e.mapField)}));(o?o==t.forkValue||Array.isArray(t.forkValue)&&t.forkValue.includes(o):!!e)&&(Array.isArray(t.forkValue)?t.originalValue=t.forkValue.map((function(t){var e=l.find((function(e){return e.mapField==t}));if(e)return e.value})):t.originalValue=e.value)}})),{shareVariableTree:s,globalVars:l.filter((function(t){return o?(o==t.forkValue||Array.isArray(t.forkValue)&&t.forkValue.includes(o))&&(t.hasOwnProperty("originalValue")||(t.originalValue=t.value),t.converter&&t.converterCode?t.value=Ne(t.converterCode,t.originalValue):t.value=t.originalValue):(t.hasOwnProperty("originalValue")||(t.originalValue=t.value),t.converter&&t.converterCode?t.value=Ne(t.converterCode,t.originalValue):t.value=t.originalValue),t})),globalEvents:c.filter((function(t){return t})),eventsComs:u}}catch(t){return console.error("error",t),{}}},getLength:function(t){var e=0,n=function(t){for(var r=function(r){if(t[r].isShow&&t[r].children)n(t[r].children);else if(t[r].isShow&&t[r].dynamicChildren){if(t[r].dynamicChildren instanceof Map){for(var i=Array.from(t[r].dynamicChildren),o=0;o<i.length;o++)if(i[o]instanceof Array){var a=i[o][1];n(a)}}else if(t[r].isShow&&t[r].dynamicChildren instanceof Array){var s=t[r].dynamicChildren.find((function(e){return e[0]=t[r].activeDynamic}));s&&s.length&&n(s[1])}}else t[r].isShow&&t[r].stateChildren?n(t[r].stateChildren):t[r].isShow&&e++},i=0;i<t.length;i++)r(i)};return n(t),e||!1},getPosition:Se,getSessionData:function(t){var e=sessionStorage.getItem(t);return e?JSON.parse(e):null},getShareTree:function(t,e){try{var n={},r=[],i=[];return ce(t,(function(t){var o,a,s,l=null===(o=null==t?void 0:t.tmpData)||void 0===o?void 0:o.source;if(qi(l,e,t,n),null===(s=null===(a=null==t?void 0:t.tmpData)||void 0===a?void 0:a.actions)||void 0===s?void 0:s.length){var c=t.tmpData.actions.map((function(t){return t.eventType}));Ae({types:c,element:t,actions:r,events:i})}})),n}catch(t){return console.error(t),{}}},getStandardData:function(t,e){return void 0===e&&(e=!1),e?$i(t)?t:JSON.stringify(t):$i(t)?JSON.parse(t):t},getUrlParams:function(t,e){try{var n=e||window.location.href;if(-1!=n.indexOf("?")){var r={};return n.slice(n.indexOf("?")+1).split("&").forEach((function(t){var e=t.split("=");r[e[0]]=e[1]})),t?r[t]?r[t]:null:r}return console.log("没有参数"),null}catch(t){console.error(t)}},globalSourceTemp:Pe,hasVar:function(t,e,n){var r,i,o,a,s=e[null==e?void 0:e.type],l=null==e?void 0:e.converse,c=!1;if(l&&l.use&&l.data.length)for(var u=0,h=l.data;u<h.length;u++){var d=h[u];if((null==d?void 0:d.dependVars)&&(null===(r=null==d?void 0:d.dependVars)||void 0===r?void 0:r.length)&&(null==d?void 0:d.dependVars.includes(t)))return c=!0}return(null==s?void 0:s.inputSql)&&(c=Gi(null==s?void 0:s.inputSql,n)),(null==s?void 0:s.url)&&(c=Gi(s.url,n)),(null==s?void 0:s.headers)&&(null===(i=null==s?void 0:s.headers)||void 0===i?void 0:i.use)&&(null===(o=null==s?void 0:s.headers)||void 0===o?void 0:o.value)&&(c=Gi(null===(a=null==s?void 0:s.headers)||void 0===a?void 0:a.value,n)),(null==s?void 0:s.params)&&(c=Gi(null==s?void 0:s.params,n)),c},hexToRgba:function(t){var e=ua(t);return sa(e)},isJSON:$i,isPeer:le,loadFont:ao,loadFontResource:ro,loadFontTag:function(t){var n=t.fonts,r=void 0===n?[]:n;return h(void 0,void 0,void 0,(function(){var t;return d(this,(function(n){switch(n.label){case 0:return t=e.uniqBy(r,"fontName"),[4,Promise.all([oo(t,"fonts")])];case 1:return n.sent(),[2]}}))}))},loadScript:io,loadTag:so,parseColorString:ua,parseHexColor:la,parseRgbaColor:ca,recursion:ce,removeTag:lo,resetID:he,resetPositionForGroup:function(t,e){var n=e.map((function(t){return t.cid}));e.forEach((function(e){e.pid&&ye(e,t)}));var r=De(n,e);return me(r,e),{left:r.left,top:r.top,width:r.width,height:r.height}},resizeListPosition:function(t,e){var n=function(t,r){for(var i,o=0;o<t.length;o++){var a=t[o];if(a.pid!=r){var s=we(e,a.cid),l=we(e,a.pid);a.baseData.left=s.left-l.left,a.baseData.top=s.top-l.top}(null===(i=null==a?void 0:a.children)||void 0===i?void 0:i.length)&&n(a.children,a.cid)}};n(t,e)},resizePosition:we,resziePositionForGroup:function(t,n,r,i){var o=t.baseData.left,a=t.baseData.top,s=n.left,l=n.top,c=e.cloneDeep(t.children),u=r||"";if(s-o<0)for(var h=0;h<c.length;h++){(d=c[h]).cid!==u&&(d.baseData.left=d.baseData.left+(o-s))}if(l-a<0)for(h=0;h<c.length;h++){var d;(d=c[h]).cid!==u&&(d.baseData.top=d.baseData.top+(a-l))}t.children=c},rgbaToHex:function(t){var e=ua(t);return oa(e)},safeConvertToNumber:xe,safeEval:Ne,screenshot:function(t){return h(void 0,void 0,void 0,(function(){var e,n,r,i,o,a,s,l;return d(this,(function(c){switch(c.label){case 0:return c.trys.push([0,11,,12]),e=t.dom,n=t.servePath,r=t.targetPath,i=t.quality,o=t.type,a=void 0,Jo(n)&&Jo(r)?[4,na(n,r,e,i||.5)]:[3,5];case 1:return(s=c.sent())&&200==s.status&&s.data?(a=s.data,[3,4]):[3,2];case 2:return console.warn("截取错误,请检查网络或服务地址配置是否正确,已转换为dom-to-img."),[4,ra(e,i||.5)];case 3:a=c.sent(),c.label=4;case 4:return[3,7];case 5:return console.warn("地址错误,请检查传入的地址是否争取,已转换为dom-to-img."),[4,ra(e,i||.5)];case 6:a=c.sent(),c.label=7;case 7:return a?[4,ea(a,o)]:[3,9];case 8:return[2,c.sent()];case 9:return[2,null];case 10:return[3,12];case 11:return l=c.sent(),console.error("截图发生错误:"+l),[2,null];case 12:return[2]}}))}))},selectdArea:De,setActions:Ae,setAttr:function(t,e,n){for(var r,i=0;i<t.length;i++)(r=t[i]).cid!==e&&r.id!==e||(r[n]=!r[n])},setIndex:ue,setPorp:function(t,e,n){var r=e.find((function(e){return e.cid===t}));"folder"===r.type?r.children.length&&r.children.forEach((function(t){t[n]=!t[n]})):r[n]=!r[n]},setPositionForGroup:me,setPositionForWorld:ye,setSessionData:function(t,e){var n=JSON.stringify(e);sessionStorage.setItem(t,n)},toHex:ia,toHexString:oa,toRgbString:aa,toRgbaString:sa,transformPosition:be,upDataGroup:Te,upDataGroupChildren:function(t,n,r){var i=t.children,o=e.cloneDeep(n),a=e.cloneDeep(Se(i)),s=o.left,l=o.top;o.width,o.height;var c=a.left,u=a.top,h=a.width,d=a.height,f={left:s+c,top:l+u,width:h,height:d,angle:n.angle?n.angle:0};return i.forEach((function(t){var n=e.cloneDeep(t.baseData);t.baseData.left<0?n.left=0:n.left=n.left-c,t.baseData.top<0?n.top=0:n.top=n.top-u,t.baseData=n})),t.children=i,f},updataAttribute:de,updataAttributeForOption:fe,updataSizeDeep:Qt,validateAndFixObject:ke,watchError:function(t,e){t.config.errorHandler=function(t){console.error("监测到E1002错误"),console.error(t.filename),da("E1002",t.name+":"+t.message,e)},window.addEventListener("error",(function(t){t.message?(console.error("监测到E1003错误"),da("E1003",t.message,t.filename,e)):(console.error("监测到E1004错误"),da("E1004",t.target.currentSrc,t.filename,e))}),!0)}});function ga(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function va(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}
|
|
45
33
|
/*!
|
|
46
34
|
* GSAP 3.12.5
|
|
47
35
|
* https://gsap.com
|
|
@@ -50,7 +38,7 @@ function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=i.create([0,1,2,
|
|
|
50
38
|
* Subject to the terms at https://gsap.com/standard-license or for
|
|
51
39
|
* Club GSAP members, the agreement issued with that membership.
|
|
52
40
|
* @author: Jack Doyle, jack@greensock.com
|
|
53
|
-
*/var _config={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},_defaults={duration:.5,overwrite:!1,delay:0},_suppressOverwrites,_reverting$1,_context,_bigNum$1=1e8,_tinyNum=1/_bigNum$1,_2PI=2*Math.PI,_HALF_PI=_2PI/4,_gsID=0,_sqrt=Math.sqrt,_cos=Math.cos,_sin=Math.sin,_isString=function(e){return"string"==typeof e},_isFunction=function(e){return"function"==typeof e},_isNumber=function(e){return"number"==typeof e},_isUndefined=function(e){return void 0===e},_isObject=function(e){return"object"==typeof e},_isNotFalse=function(e){return!1!==e},_windowExists$1=function(){return"undefined"!=typeof window},_isFuncOrString=function(e){return _isFunction(e)||_isString(e)},_isTypedArray="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},_isArray=Array.isArray,_strictNumExp=/(?:-?\.?\d|\.)+/gi,_numExp=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,_numWithUnitExp=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,_complexStringNumExp=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,_relExp=/[+-]=-?[.\d]+/,_delimitedValueExp=/[^,'"\[\]\s]+/gi,_unitExp=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,_globalTimeline,_win$1,_coreInitted,_doc$1,_globals={},_installScope={},_coreReady,_install=function(e){return(_installScope=_merge(e,_globals))&&gsap},_missingPlugin=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},_warn=function(e,t){return!t&&console.warn(e)},_addGlobal=function(e,t){return e&&(_globals[e]=t)&&_installScope&&(_installScope[e]=t)||_globals},_emptyFunc=function(){return 0},_startAtRevertConfig={suppressEvents:!0,isStart:!0,kill:!1},_revertConfigNoKill={suppressEvents:!0,kill:!1},_revertConfig={suppressEvents:!0},_reservedProps={},_lazyTweens=[],_lazyLookup={},_lastRenderedFrame,_plugins={},_effects={},_nextGCFrame=30,_harnessPlugins=[],_callbackNames="",_harness=function(e){var t,r,n=e[0];if(_isObject(n)||_isFunction(n)||(e=[e]),!(t=(n._gsap||{}).harness)){for(r=_harnessPlugins.length;r--&&!_harnessPlugins[r].targetTest(n););t=_harnessPlugins[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new GSCache(e[r],t)))||e.splice(r,1);return e},_getCache=function(e){return e._gsap||_harness(toArray(e))[0]._gsap},_getProperty=function(e,t,r){return(r=e[t])&&_isFunction(r)?e[t]():_isUndefined(r)&&e.getAttribute&&e.getAttribute(t)||r},_forEachName=function(e,t){return(e=e.split(",")).forEach(t)||e},_round=function(e){return Math.round(1e5*e)/1e5||0},_roundPrecise=function(e){return Math.round(1e7*e)/1e7||0},_parseRelative=function(e,t){var r=t.charAt(0),n=parseFloat(t.substr(2));return e=parseFloat(e),"+"===r?e+n:"-"===r?e-n:"*"===r?e*n:e/n},_arrayContainsAny=function(e,t){for(var r=t.length,n=0;e.indexOf(t[n])<0&&++n<r;);return n<r},_lazyRender=function(){var e,t,r=_lazyTweens.length,n=_lazyTweens.slice(0);for(_lazyLookup={},_lazyTweens.length=0,e=0;e<r;e++)(t=n[e])&&t._lazy&&(t.render(t._lazy[0],t._lazy[1],!0)._lazy=0)},_lazySafeRender=function(e,t,r,n){_lazyTweens.length&&!_reverting$1&&_lazyRender(),e.render(t,r,n||_reverting$1&&t<0&&(e._initted||e._startAt)),_lazyTweens.length&&!_reverting$1&&_lazyRender()},_numericIfPossible=function(e){var t=parseFloat(e);return(t||0===t)&&(e+"").match(_delimitedValueExp).length<2?t:_isString(e)?e.trim():e},_passThrough=function(e){return e},_setDefaults=function(e,t){for(var r in t)r in e||(e[r]=t[r]);return e},_setKeyframeDefaults=function(e){return function(t,r){for(var n in r)n in t||"duration"===n&&e||"ease"===n||(t[n]=r[n])}},_merge=function(e,t){for(var r in t)e[r]=t[r];return e},_mergeDeep=function e(t,r){for(var n in r)"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(t[n]=_isObject(r[n])?e(t[n]||(t[n]={}),r[n]):r[n]);return t},_copyExcluding=function(e,t){var r,n={};for(r in e)r in t||(n[r]=e[r]);return n},_inheritDefaults=function(e){var t=e.parent||_globalTimeline,r=e.keyframes?_setKeyframeDefaults(_isArray(e.keyframes)):_setDefaults;if(_isNotFalse(e.inherit))for(;t;)r(e,t.vars.defaults),t=t.parent||t._dp;return e},_arraysMatch=function(e,t){for(var r=e.length,n=r===t.length;n&&r--&&e[r]===t[r];);return r<0},_addLinkedListItem=function(e,t,r,n,i){void 0===r&&(r="_first"),void 0===n&&(n="_last");var o,a=e[n];if(i)for(o=t[i];a&&a[i]>o;)a=a._prev;return a?(t._next=a._next,a._next=t):(t._next=e[r],e[r]=t),t._next?t._next._prev=t:e[n]=t,t._prev=a,t.parent=t._dp=e,t},_removeLinkedListItem=function(e,t,r,n){void 0===r&&(r="_first"),void 0===n&&(n="_last");var i=t._prev,o=t._next;i?i._next=o:e[r]===t&&(e[r]=o),o?o._prev=i:e[n]===t&&(e[n]=i),t._next=t._prev=t.parent=null},_removeFromParent=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},_uncache=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var r=e;r;)r._dirty=1,r=r.parent;return e},_recacheAncestors=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},_rewindStartAt=function(e,t,r,n){return e._startAt&&(_reverting$1?e._startAt.revert(_revertConfigNoKill):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,n))},_hasNoPausedAncestors=function e(t){return!t||t._ts&&e(t.parent)},_elapsedCycleDuration=function(e){return e._repeat?_animationCycle(e._tTime,e=e.duration()+e._rDelay)*e:0},_animationCycle=function(e,t){var r=Math.floor(e/=t);return e&&r===e?r-1:r},_parentToChildTotalTime=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},_setEnd=function(e){return e._end=_roundPrecise(e._start+(e._tDur/Math.abs(e._ts||e._rts||_tinyNum)||0))},_alignPlayhead=function(e,t){var r=e._dp;return r&&r.smoothChildTiming&&e._ts&&(e._start=_roundPrecise(r._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),_setEnd(e),r._dirty||_uncache(r,e)),e},_postAddChecks=function(e,t){var r;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(r=_parentToChildTotalTime(e.rawTime(),t),(!t._dur||_clamp(0,t.totalDuration(),r)-t._tTime>_tinyNum)&&t.render(r,!0)),_uncache(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(r=e;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;e._zTime=-_tinyNum}},_addToTimeline=function(e,t,r,n){return t.parent&&_removeFromParent(t),t._start=_roundPrecise((_isNumber(r)?r:r||e!==_globalTimeline?_parsePosition(e,r,t):e._time)+t._delay),t._end=_roundPrecise(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),_addLinkedListItem(e,t,"_first","_last",e._sort?"_start":0),_isFromOrFromStart(t)||(e._recent=t),n||_postAddChecks(e,t),e._ts<0&&_alignPlayhead(e,e._tTime),e},_scrollTrigger=function(e,t){return(_globals.ScrollTrigger||_missingPlugin("scrollTrigger",t))&&_globals.ScrollTrigger.create(t,e)},_attemptInitTween=function(e,t,r,n,i){return _initTween(e,t,i),e._initted?!r&&e._pt&&!_reverting$1&&(e._dur&&!1!==e.vars.lazy||!e._dur&&e.vars.lazy)&&_lastRenderedFrame!==_ticker.frame?(_lazyTweens.push(e),e._lazy=[i,n],1):void 0:1},_parentPlayheadIsBeforeStart=function e(t){var r=t.parent;return r&&r._ts&&r._initted&&!r._lock&&(r.rawTime()<0||e(r))},_isFromOrFromStart=function(e){var t=e.data;return"isFromStart"===t||"isStart"===t},_renderZeroDurationTween=function(e,t,r,n){var i,o,a,s=e.ratio,l=t<0||!t&&(!e._start&&_parentPlayheadIsBeforeStart(e)&&(e._initted||!_isFromOrFromStart(e))||(e._ts<0||e._dp._ts<0)&&!_isFromOrFromStart(e))?0:1,c=e._rDelay,u=0;if(c&&e._repeat&&(u=_clamp(0,e._tDur,t),o=_animationCycle(u,c),e._yoyo&&1&o&&(l=1-l),o!==_animationCycle(e._tTime,c)&&(s=1-l,e.vars.repeatRefresh&&e._initted&&e.invalidate())),l!==s||_reverting$1||n||e._zTime===_tinyNum||!t&&e._zTime){if(!e._initted&&_attemptInitTween(e,t,n,r,u))return;for(a=e._zTime,e._zTime=t||(r?_tinyNum:0),r||(r=t&&!a),e.ratio=l,e._from&&(l=1-l),e._time=0,e._tTime=u,i=e._pt;i;)i.r(l,i.d),i=i._next;t<0&&_rewindStartAt(e,t,r,!0),e._onUpdate&&!r&&_callback(e,"onUpdate"),u&&e._repeat&&!r&&e.parent&&_callback(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===l&&(l&&_removeFromParent(e,1),r||_reverting$1||(_callback(e,l?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},_findNextPauseTween=function(e,t,r){var n;if(r>t)for(n=e._first;n&&n._start<=r;){if("isPause"===n.data&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=r;){if("isPause"===n.data&&n._start<t)return n;n=n._prev}},_setDuration=function(e,t,r,n){var i=e._repeat,o=_roundPrecise(t)||0,a=e._tTime/e._tDur;return a&&!n&&(e._time*=o/e._dur),e._dur=o,e._tDur=i?i<0?1e10:_roundPrecise(o*(i+1)+e._rDelay*i):o,a>0&&!n&&_alignPlayhead(e,e._tTime=e._tDur*a),e.parent&&_setEnd(e),r||_uncache(e.parent,e),e},_onUpdateTotalDuration=function(e){return e instanceof Timeline?_uncache(e):_setDuration(e,e._dur)},_zeroPosition={_start:0,endTime:_emptyFunc,totalDuration:_emptyFunc},_parsePosition=function e(t,r,n){var i,o,a,s=t.labels,l=t._recent||_zeroPosition,c=t.duration()>=_bigNum$1?l.endTime(!1):t._dur;return _isString(r)&&(isNaN(r)||r in s)?(o=r.charAt(0),a="%"===r.substr(-1),i=r.indexOf("="),"<"===o||">"===o?(i>=0&&(r=r.replace(/=/,"")),("<"===o?l._start:l.endTime(l._repeat>=0))+(parseFloat(r.substr(1))||0)*(a?(i<0?l:n).totalDuration()/100:1)):i<0?(r in s||(s[r]=c),s[r]):(o=parseFloat(r.charAt(i-1)+r.substr(i+1)),a&&n&&(o=o/100*(_isArray(n)?n[0]:n).totalDuration()),i>1?e(t,r.substr(0,i-1),n)+o:c+o)):null==r?c:+r},_createTweenType=function(e,t,r){var n,i,o=_isNumber(t[1]),a=(o?2:1)+(e<2?0:1),s=t[a];if(o&&(s.duration=t[1]),s.parent=r,e){for(n=s,i=r;i&&!("immediateRender"in n);)n=i.vars.defaults||{},i=_isNotFalse(i.vars.inherit)&&i.parent;s.immediateRender=_isNotFalse(n.immediateRender),e<2?s.runBackwards=1:s.startAt=t[a-1]}return new Tween(t[0],s,t[a+1])},_conditionalReturn=function(e,t){return e||0===e?t(e):t},_clamp=function(e,t,r){return r<e?e:r>t?t:r},getUnit=function(e,t){return _isString(e)&&(t=_unitExp.exec(e))?t[1]:""},clamp=function(e,t,r){return _conditionalReturn(r,(function(r){return _clamp(e,t,r)}))},_slice=[].slice,_isArrayLike=function(e,t){return e&&_isObject(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&_isObject(e[0]))&&!e.nodeType&&e!==_win$1},_flatten=function(e,t,r){return void 0===r&&(r=[]),e.forEach((function(e){var n;return _isString(e)&&!t||_isArrayLike(e,1)?(n=r).push.apply(n,toArray(e)):r.push(e)}))||r},toArray=function(e,t,r){return _context&&!t&&_context.selector?_context.selector(e):!_isString(e)||r||!_coreInitted&&_wake()?_isArray(e)?_flatten(e,r):_isArrayLike(e)?_slice.call(e,0):e?[e]:[]:_slice.call((t||_doc$1).querySelectorAll(e),0)},selector=function(e){return e=toArray(e)[0]||_warn("Invalid scope")||{},function(t){var r=e.current||e.nativeElement||e;return toArray(t,r.querySelectorAll?r:r===e?_warn("Invalid scope")||_doc$1.createElement("div"):e)}},shuffle=function(e){return e.sort((function(){return.5-Math.random()}))},distribute=function(e){if(_isFunction(e))return e;var t=_isObject(e)?e:{each:e},r=_parseEase(t.ease),n=t.from||0,i=parseFloat(t.base)||0,o={},a=n>0&&n<1,s=isNaN(n)||a,l=t.axis,c=n,u=n;return _isString(n)?c=u={center:.5,edges:.5,end:1}[n]||0:!a&&s&&(c=n[0],u=n[1]),function(e,a,h){var d,f,p,m,g,v,y,_,b,w=(h||t).length,D=o[w];if(!D){if(!(b="auto"===t.grid?0:(t.grid||[1,_bigNum$1])[1])){for(y=-_bigNum$1;y<(y=h[b++].getBoundingClientRect().left)&&b<w;);b<w&&b--}for(D=o[w]=[],d=s?Math.min(b,w)*c-.5:n%b,f=b===_bigNum$1?0:s?w*u/b-.5:n/b|0,y=0,_=_bigNum$1,v=0;v<w;v++)p=v%b-d,m=f-(v/b|0),D[v]=g=l?Math.abs("y"===l?m:p):_sqrt(p*p+m*m),g>y&&(y=g),g<_&&(_=g);"random"===n&&shuffle(D),D.max=y-_,D.min=_,D.v=w=(parseFloat(t.amount)||parseFloat(t.each)*(b>w?w-1:l?"y"===l?w/b:b:Math.max(b,w/b))||0)*("edges"===n?-1:1),D.b=w<0?i-w:i,D.u=getUnit(t.amount||t.each)||0,r=r&&w<0?_invertEase(r):r}return w=(D[e]-D.min)/D.max||0,_roundPrecise(D.b+(r?r(w):w)*D.v)+D.u}},_roundModifier=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(r){var n=_roundPrecise(Math.round(parseFloat(r)/e)*e*t);return(n-n%1)/t+(_isNumber(r)?0:getUnit(r))}},snap=function(e,t){var r,n,i=_isArray(e);return!i&&_isObject(e)&&(r=i=e.radius||_bigNum$1,e.values?(e=toArray(e.values),(n=!_isNumber(e[0]))&&(r*=r)):e=_roundModifier(e.increment)),_conditionalReturn(t,i?_isFunction(e)?function(t){return n=e(t),Math.abs(n-t)<=r?n:t}:function(t){for(var i,o,a=parseFloat(n?t.x:t),s=parseFloat(n?t.y:0),l=_bigNum$1,c=0,u=e.length;u--;)(i=n?(i=e[u].x-a)*i+(o=e[u].y-s)*o:Math.abs(e[u]-a))<l&&(l=i,c=u);return c=!r||l<=r?e[c]:t,n||c===t||_isNumber(t)?c:c+getUnit(t)}:_roundModifier(e))},random=function(e,t,r,n){return _conditionalReturn(_isArray(e)?!t:!0===r?!!(r=0):!n,(function(){return _isArray(e)?e[~~(Math.random()*e.length)]:(r=r||1e-5)&&(n=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((e-r/2+Math.random()*(t-e+.99*r))/r)*r*n)/n}))},pipe=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduce((function(e,t){return t(e)}),e)}},unitize=function(e,t){return function(r){return e(parseFloat(r))+(t||getUnit(r))}},normalize=function(e,t,r){return mapRange(e,t,0,1,r)},_wrapArray=function(e,t,r){return _conditionalReturn(r,(function(r){return e[~~t(r)]}))},wrap=function e(t,r,n){var i=r-t;return _isArray(t)?_wrapArray(t,e(0,t.length),r):_conditionalReturn(n,(function(e){return(i+(e-t)%i)%i+t}))},wrapYoyo=function e(t,r,n){var i=r-t,o=2*i;return _isArray(t)?_wrapArray(t,e(0,t.length-1),r):_conditionalReturn(n,(function(e){return t+((e=(o+(e-t)%o)%o||0)>i?o-e:e)}))},_replaceRandom=function(e){for(var t,r,n,i,o=0,a="";~(t=e.indexOf("random(",o));)n=e.indexOf(")",t),i="["===e.charAt(t+7),r=e.substr(t+7,n-t-7).match(i?_delimitedValueExp:_strictNumExp),a+=e.substr(o,t-o)+random(i?r:+r[0],i?0:+r[1],+r[2]||1e-5),o=n+1;return a+e.substr(o,e.length-o)},mapRange=function(e,t,r,n,i){var o=t-e,a=n-r;return _conditionalReturn(i,(function(t){return r+((t-e)/o*a||0)}))},interpolate=function e(t,r,n,i){var o=isNaN(t+r)?0:function(e){return(1-e)*t+e*r};if(!o){var a,s,l,c,u,h=_isString(t),d={};if(!0===n&&(i=1)&&(n=null),h)t={p:t},r={p:r};else if(_isArray(t)&&!_isArray(r)){for(l=[],c=t.length,u=c-2,s=1;s<c;s++)l.push(e(t[s-1],t[s]));c--,o=function(e){e*=c;var t=Math.min(u,~~e);return l[t](e-t)},n=r}else i||(t=_merge(_isArray(t)?[]:{},t));if(!l){for(a in r)_addPropTween.call(d,t,a,"get",r[a]);o=function(e){return _renderPropTweens(e,d)||(h?t.p:t)}}}return _conditionalReturn(n,o)},_getLabelInDirection=function(e,t,r){var n,i,o,a=e.labels,s=_bigNum$1;for(n in a)(i=a[n]-t)<0==!!r&&i&&s>(i=Math.abs(i))&&(o=n,s=i);return o},_callback=function(e,t,r){var n,i,o,a=e.vars,s=a[t],l=_context,c=e._ctx;if(s)return n=a[t+"Params"],i=a.callbackScope||e,r&&_lazyTweens.length&&_lazyRender(),c&&(_context=c),o=n?s.apply(i,n):s.call(i),_context=l,o},_interrupt=function(e){return _removeFromParent(e),e.scrollTrigger&&e.scrollTrigger.kill(!!_reverting$1),e.progress()<1&&_callback(e,"onInterrupt"),e},_quickTween,_registerPluginQueue=[],_createPlugin=function(e){if(e)if(e=!e.name&&e.default||e,_windowExists$1()||e.headless){var t=e.name,r=_isFunction(e),n=t&&!r&&e.init?function(){this._props=[]}:e,i={init:_emptyFunc,render:_renderPropTweens,add:_addPropTween,kill:_killPropTweensOf,modifier:_addPluginModifier,rawVars:0},o={targetTest:0,get:0,getSetter:_getSetter,aliases:{},register:0};if(_wake(),e!==n){if(_plugins[t])return;_setDefaults(n,_setDefaults(_copyExcluding(e,i),o)),_merge(n.prototype,_merge(i,_copyExcluding(e,o))),_plugins[n.prop=t]=n,e.targetTest&&(_harnessPlugins.push(n),_reservedProps[t]=1),t=("css"===t?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}_addGlobal(t,n),e.register&&e.register(gsap,n,PropTween)}else _registerPluginQueue.push(e)},_255=255,_colorLookup={aqua:[0,_255,_255],lime:[0,_255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,_255],navy:[0,0,128],white:[_255,_255,_255],olive:[128,128,0],yellow:[_255,_255,0],orange:[_255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[_255,0,0],pink:[_255,192,203],cyan:[0,_255,_255],transparent:[_255,_255,_255,0]},_hue=function(e,t,r){return(6*(e+=e<0?1:e>1?-1:0)<1?t+(r-t)*e*6:e<.5?r:3*e<2?t+(r-t)*(2/3-e)*6:t)*_255+.5|0},splitColor=function(e,t,r){var n,i,o,a,s,l,c,u,h,d,f=e?_isNumber(e)?[e>>16,e>>8&_255,e&_255]:0:_colorLookup.black;if(!f){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),_colorLookup[e])f=_colorLookup[e];else if("#"===e.charAt(0)){if(e.length<6&&(n=e.charAt(1),i=e.charAt(2),o=e.charAt(3),e="#"+n+n+i+i+o+o+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(f=parseInt(e.substr(1,6),16))>>16,f>>8&_255,f&_255,parseInt(e.substr(7),16)/255];f=[(e=parseInt(e.substr(1),16))>>16,e>>8&_255,e&_255]}else if("hsl"===e.substr(0,3))if(f=d=e.match(_strictNumExp),t){if(~e.indexOf("="))return f=e.match(_numExp),r&&f.length<4&&(f[3]=1),f}else a=+f[0]%360/360,s=+f[1]/100,n=2*(l=+f[2]/100)-(i=l<=.5?l*(s+1):l+s-l*s),f.length>3&&(f[3]*=1),f[0]=_hue(a+1/3,n,i),f[1]=_hue(a,n,i),f[2]=_hue(a-1/3,n,i);else f=e.match(_strictNumExp)||_colorLookup.transparent;f=f.map(Number)}return t&&!d&&(n=f[0]/_255,i=f[1]/_255,o=f[2]/_255,l=((c=Math.max(n,i,o))+(u=Math.min(n,i,o)))/2,c===u?a=s=0:(h=c-u,s=l>.5?h/(2-c-u):h/(c+u),a=c===n?(i-o)/h+(i<o?6:0):c===i?(o-n)/h+2:(n-i)/h+4,a*=60),f[0]=~~(a+.5),f[1]=~~(100*s+.5),f[2]=~~(100*l+.5)),r&&f.length<4&&(f[3]=1),f},_colorOrderData=function(e){var t=[],r=[],n=-1;return e.split(_colorExp).forEach((function(e){var i=e.match(_numWithUnitExp)||[];t.push.apply(t,i),r.push(n+=i.length+1)})),t.c=r,t},_formatColors=function(e,t,r){var n,i,o,a,s="",l=(e+s).match(_colorExp),c=t?"hsla(":"rgba(",u=0;if(!l)return e;if(l=l.map((function(e){return(e=splitColor(e,t,1))&&c+(t?e[0]+","+e[1]+"%,"+e[2]+"%,"+e[3]:e.join(","))+")"})),r&&(o=_colorOrderData(e),(n=r.c).join(s)!==o.c.join(s)))for(a=(i=e.replace(_colorExp,"1").split(_numWithUnitExp)).length-1;u<a;u++)s+=i[u]+(~n.indexOf(u)?l.shift()||c+"0,0,0,0)":(o.length?o:l.length?l:r).shift());if(!i)for(a=(i=e.split(_colorExp)).length-1;u<a;u++)s+=i[u]+l[u];return s+i[a]},_colorExp=function(){var e,t="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(e in _colorLookup)t+="|"+e+"\\b";return new RegExp(t+")","gi")}(),_hslExp=/hsl[a]?\(/,_colorStringFilter=function(e){var t,r=e.join(" ");if(_colorExp.lastIndex=0,_colorExp.test(r))return t=_hslExp.test(r),e[1]=_formatColors(e[1],t),e[0]=_formatColors(e[0],t,_colorOrderData(e[1])),!0},_tickerActive,_ticker=function(){var e,t,r,n,i,o,a=Date.now,s=500,l=33,c=a(),u=c,h=1e3/240,d=h,f=[],p=function r(p){var m,g,v,y,_=a()-u,b=!0===p;if((_>s||_<0)&&(c+=_-l),((m=(v=(u+=_)-c)-d)>0||b)&&(y=++n.frame,i=v-1e3*n.time,n.time=v/=1e3,d+=m+(m>=h?4:h-m),g=1),b||(e=t(r)),g)for(o=0;o<f.length;o++)f[o](v,i,y,p)};return n={time:0,frame:0,tick:function(){p(!0)},deltaRatio:function(e){return i/(1e3/(e||60))},wake:function(){_coreReady&&(!_coreInitted&&_windowExists$1()&&(_win$1=_coreInitted=window,_doc$1=_win$1.document||{},_globals.gsap=gsap,(_win$1.gsapVersions||(_win$1.gsapVersions=[])).push(gsap.version),_install(_installScope||_win$1.GreenSockGlobals||!_win$1.gsap&&_win$1||{}),_registerPluginQueue.forEach(_createPlugin)),r="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,e&&n.sleep(),t=r||function(e){return setTimeout(e,d-1e3*n.time+1|0)},_tickerActive=1,p(2))},sleep:function(){(r?cancelAnimationFrame:clearTimeout)(e),_tickerActive=0,t=_emptyFunc},lagSmoothing:function(e,t){s=e||1/0,l=Math.min(t||33,s)},fps:function(e){h=1e3/(e||240),d=1e3*n.time+h},add:function(e,t,r){var i=t?function(t,r,o,a){e(t,r,o,a),n.remove(i)}:e;return n.remove(e),f[r?"unshift":"push"](i),_wake(),i},remove:function(e,t){~(t=f.indexOf(e))&&f.splice(t,1)&&o>=t&&o--},_listeners:f},n}(),_wake=function(){return!_tickerActive&&_ticker.wake()},_easeMap={},_customEaseExp=/^[\d.\-M][\d.\-,\s]/,_quotesExp=/["']/g,_parseObjectInString=function(e){for(var t,r,n,i={},o=e.substr(1,e.length-3).split(":"),a=o[0],s=1,l=o.length;s<l;s++)r=o[s],t=s!==l-1?r.lastIndexOf(","):r.length,n=r.substr(0,t),i[a]=isNaN(n)?n.replace(_quotesExp,"").trim():+n,a=r.substr(t+1).trim();return i},_valueInParentheses=function(e){var t=e.indexOf("(")+1,r=e.indexOf(")"),n=e.indexOf("(",t);return e.substring(t,~n&&n<r?e.indexOf(")",r+1):r)},_configEaseFromString=function(e){var t=(e+"").split("("),r=_easeMap[t[0]];return r&&t.length>1&&r.config?r.config.apply(null,~e.indexOf("{")?[_parseObjectInString(t[1])]:_valueInParentheses(e).split(",").map(_numericIfPossible)):_easeMap._CE&&_customEaseExp.test(e)?_easeMap._CE("",e):r},_invertEase=function(e){return function(t){return 1-e(1-t)}},_propagateYoyoEase=function e(t,r){for(var n,i=t._first;i;)i instanceof Timeline?e(i,r):!i.vars.yoyoEase||i._yoyo&&i._repeat||i._yoyo===r||(i.timeline?e(i.timeline,r):(n=i._ease,i._ease=i._yEase,i._yEase=n,i._yoyo=r)),i=i._next},_parseEase=function(e,t){return e&&(_isFunction(e)?e:_easeMap[e]||_configEaseFromString(e))||t},_insertEase=function(e,t,r,n){void 0===r&&(r=function(e){return 1-t(1-e)}),void 0===n&&(n=function(e){return e<.5?t(2*e)/2:1-t(2*(1-e))/2});var i,o={easeIn:t,easeOut:r,easeInOut:n};return _forEachName(e,(function(e){for(var t in _easeMap[e]=_globals[e]=o,_easeMap[i=e.toLowerCase()]=r,o)_easeMap[i+("easeIn"===t?".in":"easeOut"===t?".out":".inOut")]=_easeMap[e+"."+t]=o[t]})),o},_easeInOutFromOut=function(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}},_configElastic=function e(t,r,n){var i=r>=1?r:1,o=(n||(t?.3:.45))/(r<1?r:1),a=o/_2PI*(Math.asin(1/i)||0),s=function(e){return 1===e?1:i*Math.pow(2,-10*e)*_sin((e-a)*o)+1},l="out"===t?s:"in"===t?function(e){return 1-s(1-e)}:_easeInOutFromOut(s);return o=_2PI/o,l.config=function(r,n){return e(t,r,n)},l},_configBack=function e(t,r){void 0===r&&(r=1.70158);var n=function(e){return e?--e*e*((r+1)*e+r)+1:0},i="out"===t?n:"in"===t?function(e){return 1-n(1-e)}:_easeInOutFromOut(n);return i.config=function(r){return e(t,r)},i};_forEachName("Linear,Quad,Cubic,Quart,Quint,Strong",(function(e,t){var r=t<5?t+1:t;_insertEase(e+",Power"+(r-1),t?function(e){return Math.pow(e,r)}:function(e){return e},(function(e){return 1-Math.pow(1-e,r)}),(function(e){return e<.5?Math.pow(2*e,r)/2:1-Math.pow(2*(1-e),r)/2}))})),_easeMap.Linear.easeNone=_easeMap.none=_easeMap.Linear.easeIn,_insertEase("Elastic",_configElastic("in"),_configElastic("out"),_configElastic()),function(e,t){var r=1/t,n=2*r,i=2.5*r,o=function(o){return o<r?e*o*o:o<n?e*Math.pow(o-1.5/t,2)+.75:o<i?e*(o-=2.25/t)*o+.9375:e*Math.pow(o-2.625/t,2)+.984375};_insertEase("Bounce",(function(e){return 1-o(1-e)}),o)}(7.5625,2.75),_insertEase("Expo",(function(e){return e?Math.pow(2,10*(e-1)):0})),_insertEase("Circ",(function(e){return-(_sqrt(1-e*e)-1)})),_insertEase("Sine",(function(e){return 1===e?1:1-_cos(e*_HALF_PI)})),_insertEase("Back",_configBack("in"),_configBack("out"),_configBack()),_easeMap.SteppedEase=_easeMap.steps=_globals.SteppedEase={config:function(e,t){void 0===e&&(e=1);var r=1/e,n=e+(t?0:1),i=t?1:0,o=1-_tinyNum;return function(e){return((n*_clamp(0,o,e)|0)+i)*r}}},_defaults.ease=_easeMap["quad.out"],_forEachName("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(e){return _callbackNames+=e+","+e+"Params,"}));var GSCache=function(e,t){this.id=_gsID++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:_getProperty,this.set=t?t.getSetter:_getSetter},Animation=function(){function e(e){this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat===1/0?-2:e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,_setDuration(this,+e.duration,1,1),this.data=e.data,_context&&(this._ctx=_context,_context.data.push(this)),_tickerActive||_ticker.wake()}var t=e.prototype;return t.delay=function(e){return e||0===e?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+e-this._delay),this._delay=e,this):this._delay},t.duration=function(e){return arguments.length?this.totalDuration(this._repeat>0?e+(e+this._rDelay)*this._repeat:e):this.totalDuration()&&this._dur},t.totalDuration=function(e){return arguments.length?(this._dirty=0,_setDuration(this,this._repeat<0?e:(e-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(e,t){if(_wake(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(_alignPlayhead(this,e),!r._dp||r.parent||_postAddChecks(r,this);r&&r.parent;)r.parent._time!==r._start+(r._ts>=0?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&e<this._tDur||this._ts<0&&e>0||!this._tDur&&!e)&&_addToTimeline(this._dp,this,this._start-this._delay)}return(this._tTime!==e||!this._dur&&!t||this._initted&&Math.abs(this._zTime)===_tinyNum||!e&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=e),_lazySafeRender(this,e,t)),this},t.time=function(e,t){return arguments.length?this.totalTime(Math.min(this.totalDuration(),e+_elapsedCycleDuration(this))%(this._dur+this._rDelay)||(e?this._dur:0),t):this._time},t.totalProgress=function(e,t){return arguments.length?this.totalTime(this.totalDuration()*e,t):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},t.progress=function(e,t){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?e:1-e)+_elapsedCycleDuration(this),t):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},t.iteration=function(e,t){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(e-1)*r,t):this._repeat?_animationCycle(this._tTime,r)+1:1},t.timeScale=function(e,t){if(!arguments.length)return this._rts===-_tinyNum?0:this._rts;if(this._rts===e)return this;var r=this.parent&&this._ts?_parentToChildTotalTime(this.parent._time,this):this._tTime;return this._rts=+e||0,this._ts=this._ps||e===-_tinyNum?0:this._rts,this.totalTime(_clamp(-Math.abs(this._delay),this._tDur,r),!1!==t),_setEnd(this),_recacheAncestors(this)},t.paused=function(e){return arguments.length?(this._ps!==e&&(this._ps=e,e?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(_wake(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==_tinyNum&&(this._tTime-=_tinyNum)))),this):this._ps},t.startTime=function(e){if(arguments.length){this._start=e;var t=this.parent||this._dp;return t&&(t._sort||!this.parent)&&_addToTimeline(t,this,e-this._delay),this}return this._start},t.endTime=function(e){return this._start+(_isNotFalse(e)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(e){var t=this.parent||this._dp;return t?e&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?_parentToChildTotalTime(t.rawTime(e),this):this._tTime:this._tTime},t.revert=function(e){void 0===e&&(e=_revertConfig);var t=_reverting$1;return _reverting$1=e,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(e),this.totalTime(-.01,e.suppressEvents)),"nested"!==this.data&&!1!==e.kill&&this.kill(),_reverting$1=t,this},t.globalTime=function(e){for(var t=this,r=arguments.length?e:t.rawTime();t;)r=t._start+r/(Math.abs(t._ts)||1),t=t._dp;return!this.parent&&this._sat?this._sat.globalTime(e):r},t.repeat=function(e){return arguments.length?(this._repeat=e===1/0?-2:e,_onUpdateTotalDuration(this)):-2===this._repeat?1/0:this._repeat},t.repeatDelay=function(e){if(arguments.length){var t=this._time;return this._rDelay=e,_onUpdateTotalDuration(this),t?this.time(t):this}return this._rDelay},t.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},t.seek=function(e,t){return this.totalTime(_parsePosition(this,e),_isNotFalse(t))},t.restart=function(e,t){return this.play().totalTime(e?-this._delay:0,_isNotFalse(t))},t.play=function(e,t){return null!=e&&this.seek(e,t),this.reversed(!1).paused(!1)},t.reverse=function(e,t){return null!=e&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1)},t.pause=function(e,t){return null!=e&&this.seek(e,t),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(e){return arguments.length?(!!e!==this.reversed()&&this.timeScale(-this._rts||(e?-_tinyNum:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-_tinyNum,this},t.isActive=function(){var e,t=this.parent||this._dp,r=this._start;return!(t&&!(this._ts&&this._initted&&t.isActive()&&(e=t.rawTime(!0))>=r&&e<this.endTime(!0)-_tinyNum))},t.eventCallback=function(e,t,r){var n=this.vars;return arguments.length>1?(t?(n[e]=t,r&&(n[e+"Params"]=r),"onUpdate"===e&&(this._onUpdate=t)):delete n[e],this):n[e]},t.then=function(e){var t=this;return new Promise((function(r){var n=_isFunction(e)?e:_passThrough,i=function(){var e=t.then;t.then=null,_isFunction(n)&&(n=n(t))&&(n.then||n===t)&&(t.then=e),r(n),t.then=e};t._initted&&1===t.totalProgress()&&t._ts>=0||!t._tTime&&t._ts<0?i():t._prom=i}))},t.kill=function(){_interrupt(this)},e}();_setDefaults(Animation.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-_tinyNum,_prom:0,_ps:!1,_rts:1});var Timeline=function(e){function t(t,r){var n;return void 0===t&&(t={}),(n=e.call(this,t)||this).labels={},n.smoothChildTiming=!!t.smoothChildTiming,n.autoRemoveChildren=!!t.autoRemoveChildren,n._sort=_isNotFalse(t.sortChildren),_globalTimeline&&_addToTimeline(t.parent||_globalTimeline,_assertThisInitialized(n),r),t.reversed&&n.reverse(),t.paused&&n.paused(!0),t.scrollTrigger&&_scrollTrigger(_assertThisInitialized(n),t.scrollTrigger),n}_inheritsLoose(t,e);var r=t.prototype;return r.to=function(e,t,r){return _createTweenType(0,arguments,this),this},r.from=function(e,t,r){return _createTweenType(1,arguments,this),this},r.fromTo=function(e,t,r,n){return _createTweenType(2,arguments,this),this},r.set=function(e,t,r){return t.duration=0,t.parent=this,_inheritDefaults(t).repeatDelay||(t.repeat=0),t.immediateRender=!!t.immediateRender,new Tween(e,t,_parsePosition(this,r),1),this},r.call=function(e,t,r){return _addToTimeline(this,Tween.delayedCall(0,e,t),r)},r.staggerTo=function(e,t,r,n,i,o,a){return r.duration=t,r.stagger=r.stagger||n,r.onComplete=o,r.onCompleteParams=a,r.parent=this,new Tween(e,r,_parsePosition(this,i)),this},r.staggerFrom=function(e,t,r,n,i,o,a){return r.runBackwards=1,_inheritDefaults(r).immediateRender=_isNotFalse(r.immediateRender),this.staggerTo(e,t,r,n,i,o,a)},r.staggerFromTo=function(e,t,r,n,i,o,a,s){return n.startAt=r,_inheritDefaults(n).immediateRender=_isNotFalse(n.immediateRender),this.staggerTo(e,t,n,i,o,a,s)},r.render=function(e,t,r){var n,i,o,a,s,l,c,u,h,d,f,p,m=this._time,g=this._dirty?this.totalDuration():this._tDur,v=this._dur,y=e<=0?0:_roundPrecise(e),_=this._zTime<0!=e<0&&(this._initted||!v);if(this!==_globalTimeline&&y>g&&e>=0&&(y=g),y!==this._tTime||r||_){if(m!==this._time&&v&&(y+=this._time-m,e+=this._time-m),n=y,h=this._start,l=!(u=this._ts),_&&(v||(m=this._zTime),(e||!t)&&(this._zTime=e)),this._repeat){if(f=this._yoyo,s=v+this._rDelay,this._repeat<-1&&e<0)return this.totalTime(100*s+e,t,r);if(n=_roundPrecise(y%s),y===g?(a=this._repeat,n=v):((a=~~(y/s))&&a===y/s&&(n=v,a--),n>v&&(n=v)),d=_animationCycle(this._tTime,s),!m&&this._tTime&&d!==a&&this._tTime-d*s-this._dur<=0&&(d=a),f&&1&a&&(n=v-n,p=1),a!==d&&!this._lock){var b=f&&1&d,w=b===(f&&1&a);if(a<d&&(b=!b),m=b?0:y%v?v:y,this._lock=1,this.render(m||(p?0:_roundPrecise(a*s)),t,!v)._lock=0,this._tTime=y,!t&&this.parent&&_callback(this,"onRepeat"),this.vars.repeatRefresh&&!p&&(this.invalidate()._lock=1),m&&m!==this._time||l!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(v=this._dur,g=this._tDur,w&&(this._lock=2,m=b?v:-1e-4,this.render(m,!0),this.vars.repeatRefresh&&!p&&this.invalidate()),this._lock=0,!this._ts&&!l)return this;_propagateYoyoEase(this,p)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(c=_findNextPauseTween(this,_roundPrecise(m),_roundPrecise(n)))&&(y-=n-(n=c._start)),this._tTime=y,this._time=n,this._act=!u,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=e,m=0),!m&&n&&!t&&!a&&(_callback(this,"onStart"),this._tTime!==y))return this;if(n>=m&&e>=0)for(i=this._first;i;){if(o=i._next,(i._act||n>=i._start)&&i._ts&&c!==i){if(i.parent!==this)return this.render(e,t,r);if(i.render(i._ts>0?(n-i._start)*i._ts:(i._dirty?i.totalDuration():i._tDur)+(n-i._start)*i._ts,t,r),n!==this._time||!this._ts&&!l){c=0,o&&(y+=this._zTime=-_tinyNum);break}}i=o}else{i=this._last;for(var D=e<0?e:n;i;){if(o=i._prev,(i._act||D<=i._end)&&i._ts&&c!==i){if(i.parent!==this)return this.render(e,t,r);if(i.render(i._ts>0?(D-i._start)*i._ts:(i._dirty?i.totalDuration():i._tDur)+(D-i._start)*i._ts,t,r||_reverting$1&&(i._initted||i._startAt)),n!==this._time||!this._ts&&!l){c=0,o&&(y+=this._zTime=D?-_tinyNum:_tinyNum);break}}i=o}}if(c&&!t&&(this.pause(),c.render(n>=m?0:-_tinyNum)._zTime=n>=m?1:-1,this._ts))return this._start=h,_setEnd(this),this.render(e,t,r);this._onUpdate&&!t&&_callback(this,"onUpdate",!0),(y===g&&this._tTime>=this.totalDuration()||!y&&m)&&(h!==this._start&&Math.abs(u)===Math.abs(this._ts)||this._lock||((e||!v)&&(y===g&&this._ts>0||!y&&this._ts<0)&&_removeFromParent(this,1),t||e<0&&!m||!y&&!m&&g||(_callback(this,y===g&&e>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(y<g&&this.timeScale()>0)&&this._prom())))}return this},r.add=function(e,t){var r=this;if(_isNumber(t)||(t=_parsePosition(this,t,e)),!(e instanceof Animation)){if(_isArray(e))return e.forEach((function(e){return r.add(e,t)})),this;if(_isString(e))return this.addLabel(e,t);if(!_isFunction(e))return this;e=Tween.delayedCall(0,e)}return this!==e?_addToTimeline(this,e,t):this},r.getChildren=function(e,t,r,n){void 0===e&&(e=!0),void 0===t&&(t=!0),void 0===r&&(r=!0),void 0===n&&(n=-_bigNum$1);for(var i=[],o=this._first;o;)o._start>=n&&(o instanceof Tween?t&&i.push(o):(r&&i.push(o),e&&i.push.apply(i,o.getChildren(!0,t,r)))),o=o._next;return i},r.getById=function(e){for(var t=this.getChildren(1,1,1),r=t.length;r--;)if(t[r].vars.id===e)return t[r]},r.remove=function(e){return _isString(e)?this.removeLabel(e):_isFunction(e)?this.killTweensOf(e):(_removeLinkedListItem(this,e),e===this._recent&&(this._recent=this._last),_uncache(this))},r.totalTime=function(t,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=_roundPrecise(_ticker.time-(this._ts>0?t/this._ts:(this.totalDuration()-t)/-this._ts))),e.prototype.totalTime.call(this,t,r),this._forcing=0,this):this._tTime},r.addLabel=function(e,t){return this.labels[e]=_parsePosition(this,t),this},r.removeLabel=function(e){return delete this.labels[e],this},r.addPause=function(e,t,r){var n=Tween.delayedCall(0,t||_emptyFunc,r);return n.data="isPause",this._hasPause=1,_addToTimeline(this,n,_parsePosition(this,e))},r.removePause=function(e){var t=this._first;for(e=_parsePosition(this,e);t;)t._start===e&&"isPause"===t.data&&_removeFromParent(t),t=t._next},r.killTweensOf=function(e,t,r){for(var n=this.getTweensOf(e,r),i=n.length;i--;)_overwritingTween!==n[i]&&n[i].kill(e,t);return this},r.getTweensOf=function(e,t){for(var r,n=[],i=toArray(e),o=this._first,a=_isNumber(t);o;)o instanceof Tween?_arrayContainsAny(o._targets,i)&&(a?(!_overwritingTween||o._initted&&o._ts)&&o.globalTime(0)<=t&&o.globalTime(o.totalDuration())>t:!t||o.isActive())&&n.push(o):(r=o.getTweensOf(i,t)).length&&n.push.apply(n,r),o=o._next;return n},r.tweenTo=function(e,t){t=t||{};var r,n=this,i=_parsePosition(n,e),o=t,a=o.startAt,s=o.onStart,l=o.onStartParams,c=o.immediateRender,u=Tween.to(n,_setDefaults({ease:t.ease||"none",lazy:!1,immediateRender:!1,time:i,overwrite:"auto",duration:t.duration||Math.abs((i-(a&&"time"in a?a.time:n._time))/n.timeScale())||_tinyNum,onStart:function(){if(n.pause(),!r){var e=t.duration||Math.abs((i-(a&&"time"in a?a.time:n._time))/n.timeScale());u._dur!==e&&_setDuration(u,e,0,1).render(u._time,!0,!0),r=1}s&&s.apply(u,l||[])}},t));return c?u.render(0):u},r.tweenFromTo=function(e,t,r){return this.tweenTo(t,_setDefaults({startAt:{time:_parsePosition(this,e)}},r))},r.recent=function(){return this._recent},r.nextLabel=function(e){return void 0===e&&(e=this._time),_getLabelInDirection(this,_parsePosition(this,e))},r.previousLabel=function(e){return void 0===e&&(e=this._time),_getLabelInDirection(this,_parsePosition(this,e),1)},r.currentLabel=function(e){return arguments.length?this.seek(e,!0):this.previousLabel(this._time+_tinyNum)},r.shiftChildren=function(e,t,r){void 0===r&&(r=0);for(var n,i=this._first,o=this.labels;i;)i._start>=r&&(i._start+=e,i._end+=e),i=i._next;if(t)for(n in o)o[n]>=r&&(o[n]+=e);return _uncache(this)},r.invalidate=function(t){var r=this._first;for(this._lock=0;r;)r.invalidate(t),r=r._next;return e.prototype.invalidate.call(this,t)},r.clear=function(e){void 0===e&&(e=!0);for(var t,r=this._first;r;)t=r._next,this.remove(r),r=t;return this._dp&&(this._time=this._tTime=this._pTime=0),e&&(this.labels={}),_uncache(this)},r.totalDuration=function(e){var t,r,n,i=0,o=this,a=o._last,s=_bigNum$1;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-e:e));if(o._dirty){for(n=o.parent;a;)t=a._prev,a._dirty&&a.totalDuration(),(r=a._start)>s&&o._sort&&a._ts&&!o._lock?(o._lock=1,_addToTimeline(o,a,r-a._delay,1)._lock=0):s=r,r<0&&a._ts&&(i-=r,(!n&&!o._dp||n&&n.smoothChildTiming)&&(o._start+=r/o._ts,o._time-=r,o._tTime-=r),o.shiftChildren(-r,!1,-Infinity),s=0),a._end>i&&a._ts&&(i=a._end),a=t;_setDuration(o,o===_globalTimeline&&o._time>i?o._time:i,1,1),o._dirty=0}return o._tDur},t.updateRoot=function(e){if(_globalTimeline._ts&&(_lazySafeRender(_globalTimeline,_parentToChildTotalTime(e,_globalTimeline)),_lastRenderedFrame=_ticker.frame),_ticker.frame>=_nextGCFrame){_nextGCFrame+=_config.autoSleep||120;var t=_globalTimeline._first;if((!t||!t._ts)&&_config.autoSleep&&_ticker._listeners.length<2){for(;t&&!t._ts;)t=t._next;t||_ticker.sleep()}}},t}(Animation);_setDefaults(Timeline.prototype,{_lock:0,_hasPause:0,_forcing:0});var _addComplexStringPropTween=function(e,t,r,n,i,o,a){var s,l,c,u,h,d,f,p,m=new PropTween(this._pt,e,t,0,1,_renderComplexString,null,i),g=0,v=0;for(m.b=r,m.e=n,r+="",(f=~(n+="").indexOf("random("))&&(n=_replaceRandom(n)),o&&(o(p=[r,n],e,t),r=p[0],n=p[1]),l=r.match(_complexStringNumExp)||[];s=_complexStringNumExp.exec(n);)u=s[0],h=n.substring(g,s.index),c?c=(c+1)%5:"rgba("===h.substr(-5)&&(c=1),u!==l[v++]&&(d=parseFloat(l[v-1])||0,m._pt={_next:m._pt,p:h||1===v?h:",",s:d,c:"="===u.charAt(1)?_parseRelative(d,u)-d:parseFloat(u)-d,m:c&&c<4?Math.round:0},g=_complexStringNumExp.lastIndex);return m.c=g<n.length?n.substring(g,n.length):"",m.fp=a,(_relExp.test(n)||f)&&(m.e=0),this._pt=m,m},_addPropTween=function(e,t,r,n,i,o,a,s,l,c){_isFunction(n)&&(n=n(i||0,e,o));var u,h=e[t],d="get"!==r?r:_isFunction(h)?l?e[t.indexOf("set")||!_isFunction(e["get"+t.substr(3)])?t:"get"+t.substr(3)](l):e[t]():h,f=_isFunction(h)?l?_setterFuncWithParam:_setterFunc:_setterPlain;if(_isString(n)&&(~n.indexOf("random(")&&(n=_replaceRandom(n)),"="===n.charAt(1)&&((u=_parseRelative(d,n)+(getUnit(d)||0))||0===u)&&(n=u)),!c||d!==n||_forceAllPropTweens)return isNaN(d*n)||""===n?(!h&&!(t in e)&&_missingPlugin(t,n),_addComplexStringPropTween.call(this,e,t,d,n,f,s||_config.stringFilter,l)):(u=new PropTween(this._pt,e,t,+d||0,n-(d||0),"boolean"==typeof h?_renderBoolean:_renderPlain,0,f),l&&(u.fp=l),a&&u.modifier(a,this,e),this._pt=u)},_processVars=function(e,t,r,n,i){if(_isFunction(e)&&(e=_parseFuncOrString(e,i,t,r,n)),!_isObject(e)||e.style&&e.nodeType||_isArray(e)||_isTypedArray(e))return _isString(e)?_parseFuncOrString(e,i,t,r,n):e;var o,a={};for(o in e)a[o]=_parseFuncOrString(e[o],i,t,r,n);return a},_checkPlugin=function(e,t,r,n,i,o){var a,s,l,c;if(_plugins[e]&&!1!==(a=new _plugins[e]).init(i,a.rawVars?t[e]:_processVars(t[e],n,i,o,r),r,n,o)&&(r._pt=s=new PropTween(r._pt,i,e,0,1,a.render,a,0,a.priority),r!==_quickTween))for(l=r._ptLookup[r._targets.indexOf(i)],c=a._props.length;c--;)l[a._props[c]]=s;return a},_overwritingTween,_forceAllPropTweens,_initTween=function e(t,r,n){var i,o,a,s,l,c,u,h,d,f,p,m,g,v=t.vars,y=v.ease,_=v.startAt,b=v.immediateRender,w=v.lazy,D=v.onUpdate,x=v.runBackwards,S=v.yoyoEase,k=v.keyframes,T=v.autoRevert,P=t._dur,E=t._startAt,A=t._targets,C=t.parent,O=C&&"nested"===C.data?C.vars.targets:A,M="auto"===t._overwrite&&!_suppressOverwrites,R=t.timeline;if(R&&(!k||!y)&&(y="none"),t._ease=_parseEase(y,_defaults.ease),t._yEase=S?_invertEase(_parseEase(!0===S?y:S,_defaults.ease)):0,S&&t._yoyo&&!t._repeat&&(S=t._yEase,t._yEase=t._ease,t._ease=S),t._from=!R&&!!v.runBackwards,!R||k&&!v.stagger){if(m=(h=A[0]?_getCache(A[0]).harness:0)&&v[h.prop],i=_copyExcluding(v,_reservedProps),E&&(E._zTime<0&&E.progress(1),r<0&&x&&b&&!T?E.render(-1,!0):E.revert(x&&P?_revertConfigNoKill:_startAtRevertConfig),E._lazy=0),_){if(_removeFromParent(t._startAt=Tween.set(A,_setDefaults({data:"isStart",overwrite:!1,parent:C,immediateRender:!0,lazy:!E&&_isNotFalse(w),startAt:null,delay:0,onUpdate:D&&function(){return _callback(t,"onUpdate")},stagger:0},_))),t._startAt._dp=0,t._startAt._sat=t,r<0&&(_reverting$1||!b&&!T)&&t._startAt.revert(_revertConfigNoKill),b&&P&&r<=0&&n<=0)return void(r&&(t._zTime=r))}else if(x&&P&&!E)if(r&&(b=!1),a=_setDefaults({overwrite:!1,data:"isFromStart",lazy:b&&!E&&_isNotFalse(w),immediateRender:b,stagger:0,parent:C},i),m&&(a[h.prop]=m),_removeFromParent(t._startAt=Tween.set(A,a)),t._startAt._dp=0,t._startAt._sat=t,r<0&&(_reverting$1?t._startAt.revert(_revertConfigNoKill):t._startAt.render(-1,!0)),t._zTime=r,b){if(!r)return}else e(t._startAt,_tinyNum,_tinyNum);for(t._pt=t._ptCache=0,w=P&&_isNotFalse(w)||w&&!P,o=0;o<A.length;o++){if(u=(l=A[o])._gsap||_harness(A)[o]._gsap,t._ptLookup[o]=f={},_lazyLookup[u.id]&&_lazyTweens.length&&_lazyRender(),p=O===A?o:O.indexOf(l),h&&!1!==(d=new h).init(l,m||i,t,p,O)&&(t._pt=s=new PropTween(t._pt,l,d.name,0,1,d.render,d,0,d.priority),d._props.forEach((function(e){f[e]=s})),d.priority&&(c=1)),!h||m)for(a in i)_plugins[a]&&(d=_checkPlugin(a,i,t,p,l,O))?d.priority&&(c=1):f[a]=s=_addPropTween.call(t,l,a,"get",i[a],p,O,0,v.stringFilter);t._op&&t._op[o]&&t.kill(l,t._op[o]),M&&t._pt&&(_overwritingTween=t,_globalTimeline.killTweensOf(l,f,t.globalTime(r)),g=!t.parent,_overwritingTween=0),t._pt&&w&&(_lazyLookup[u.id]=1)}c&&_sortPropTweensByPriority(t),t._onInit&&t._onInit(t)}t._onUpdate=D,t._initted=(!t._op||t._pt)&&!g,k&&r<=0&&R.render(_bigNum$1,!0,!0)},_updatePropTweens=function(e,t,r,n,i,o,a,s){var l,c,u,h,d=(e._pt&&e._ptCache||(e._ptCache={}))[t];if(!d)for(d=e._ptCache[t]=[],u=e._ptLookup,h=e._targets.length;h--;){if((l=u[h][t])&&l.d&&l.d._pt)for(l=l.d._pt;l&&l.p!==t&&l.fp!==t;)l=l._next;if(!l)return _forceAllPropTweens=1,e.vars[t]="+=0",_initTween(e,a),_forceAllPropTweens=0,s?_warn(t+" not eligible for reset"):1;d.push(l)}for(h=d.length;h--;)(l=(c=d[h])._pt||c).s=!n&&0!==n||i?l.s+(n||0)+o*l.c:n,l.c=r-l.s,c.e&&(c.e=_round(r)+getUnit(c.e)),c.b&&(c.b=l.s+getUnit(c.b))},_addAliasesToVars=function(e,t){var r,n,i,o,a=e[0]?_getCache(e[0]).harness:0,s=a&&a.aliases;if(!s)return t;for(n in r=_merge({},t),s)if(n in r)for(i=(o=s[n].split(",")).length;i--;)r[o[i]]=r[n];return r},_parseKeyframe=function(e,t,r,n){var i,o,a=t.ease||n||"power1.inOut";if(_isArray(t))o=r[e]||(r[e]=[]),t.forEach((function(e,r){return o.push({t:r/(t.length-1)*100,v:e,e:a})}));else for(i in t)o=r[i]||(r[i]=[]),"ease"===i||o.push({t:parseFloat(e),v:t[i],e:a})},_parseFuncOrString=function(e,t,r,n,i){return _isFunction(e)?e.call(t,r,n,i):_isString(e)&&~e.indexOf("random(")?_replaceRandom(e):e},_staggerTweenProps=_callbackNames+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",_staggerPropsToSkip={};_forEachName(_staggerTweenProps+",id,stagger,delay,duration,paused,scrollTrigger",(function(e){return _staggerPropsToSkip[e]=1}));var Tween=function(e){function t(t,r,n,i){var o;"number"==typeof r&&(n.duration=r,r=n,n=null);var a,s,l,c,u,h,d,f,p=(o=e.call(this,i?r:_inheritDefaults(r))||this).vars,m=p.duration,g=p.delay,v=p.immediateRender,y=p.stagger,_=p.overwrite,b=p.keyframes,w=p.defaults,D=p.scrollTrigger,x=p.yoyoEase,S=r.parent||_globalTimeline,k=(_isArray(t)||_isTypedArray(t)?_isNumber(t[0]):"length"in r)?[t]:toArray(t);if(o._targets=k.length?_harness(k):_warn("GSAP target "+t+" not found. https://gsap.com",!_config.nullTargetWarn)||[],o._ptLookup=[],o._overwrite=_,b||y||_isFuncOrString(m)||_isFuncOrString(g)){if(r=o.vars,(a=o.timeline=new Timeline({data:"nested",defaults:w||{},targets:S&&"nested"===S.data?S.vars.targets:k})).kill(),a.parent=a._dp=_assertThisInitialized(o),a._start=0,y||_isFuncOrString(m)||_isFuncOrString(g)){if(c=k.length,d=y&&distribute(y),_isObject(y))for(u in y)~_staggerTweenProps.indexOf(u)&&(f||(f={}),f[u]=y[u]);for(s=0;s<c;s++)(l=_copyExcluding(r,_staggerPropsToSkip)).stagger=0,x&&(l.yoyoEase=x),f&&_merge(l,f),h=k[s],l.duration=+_parseFuncOrString(m,_assertThisInitialized(o),s,h,k),l.delay=(+_parseFuncOrString(g,_assertThisInitialized(o),s,h,k)||0)-o._delay,!y&&1===c&&l.delay&&(o._delay=g=l.delay,o._start+=g,l.delay=0),a.to(h,l,d?d(s,h,k):0),a._ease=_easeMap.none;a.duration()?m=g=0:o.timeline=0}else if(b){_inheritDefaults(_setDefaults(a.vars.defaults,{ease:"none"})),a._ease=_parseEase(b.ease||r.ease||"none");var T,P,E,A=0;if(_isArray(b))b.forEach((function(e){return a.to(k,e,">")})),a.duration();else{for(u in l={},b)"ease"===u||"easeEach"===u||_parseKeyframe(u,b[u],l,b.easeEach);for(u in l)for(T=l[u].sort((function(e,t){return e.t-t.t})),A=0,s=0;s<T.length;s++)(E={ease:(P=T[s]).e,duration:(P.t-(s?T[s-1].t:0))/100*m})[u]=P.v,a.to(k,E,A),A+=E.duration;a.duration()<m&&a.to({},{duration:m-a.duration()})}}m||o.duration(m=a.duration())}else o.timeline=0;return!0!==_||_suppressOverwrites||(_overwritingTween=_assertThisInitialized(o),_globalTimeline.killTweensOf(k),_overwritingTween=0),_addToTimeline(S,_assertThisInitialized(o),n),r.reversed&&o.reverse(),r.paused&&o.paused(!0),(v||!m&&!b&&o._start===_roundPrecise(S._time)&&_isNotFalse(v)&&_hasNoPausedAncestors(_assertThisInitialized(o))&&"nested"!==S.data)&&(o._tTime=-_tinyNum,o.render(Math.max(0,-g)||0)),D&&_scrollTrigger(_assertThisInitialized(o),D),o}_inheritsLoose(t,e);var r=t.prototype;return r.render=function(e,t,r){var n,i,o,a,s,l,c,u,h,d=this._time,f=this._tDur,p=this._dur,m=e<0,g=e>f-_tinyNum&&!m?f:e<_tinyNum?0:e;if(p){if(g!==this._tTime||!e||r||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==m){if(n=g,u=this.timeline,this._repeat){if(a=p+this._rDelay,this._repeat<-1&&m)return this.totalTime(100*a+e,t,r);if(n=_roundPrecise(g%a),g===f?(o=this._repeat,n=p):((o=~~(g/a))&&o===_roundPrecise(g/a)&&(n=p,o--),n>p&&(n=p)),(l=this._yoyo&&1&o)&&(h=this._yEase,n=p-n),s=_animationCycle(this._tTime,a),n===d&&!r&&this._initted&&o===s)return this._tTime=g,this;o!==s&&(u&&this._yEase&&_propagateYoyoEase(u,l),this.vars.repeatRefresh&&!l&&!this._lock&&this._time!==a&&this._initted&&(this._lock=r=1,this.render(_roundPrecise(a*o),!0).invalidate()._lock=0))}if(!this._initted){if(_attemptInitTween(this,m?e:n,r,t,g))return this._tTime=0,this;if(!(d===this._time||r&&this.vars.repeatRefresh&&o!==s))return this;if(p!==this._dur)return this.render(e,t,r)}if(this._tTime=g,this._time=n,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=c=(h||this._ease)(n/p),this._from&&(this.ratio=c=1-c),n&&!d&&!t&&!o&&(_callback(this,"onStart"),this._tTime!==g))return this;for(i=this._pt;i;)i.r(c,i.d),i=i._next;u&&u.render(e<0?e:u._dur*u._ease(n/this._dur),t,r)||this._startAt&&(this._zTime=e),this._onUpdate&&!t&&(m&&_rewindStartAt(this,e,t,r),_callback(this,"onUpdate")),this._repeat&&o!==s&&this.vars.onRepeat&&!t&&this.parent&&_callback(this,"onRepeat"),g!==this._tDur&&g||this._tTime!==g||(m&&!this._onUpdate&&_rewindStartAt(this,e,!0,!0),(e||!p)&&(g===this._tDur&&this._ts>0||!g&&this._ts<0)&&_removeFromParent(this,1),t||m&&!d||!(g||d||l)||(_callback(this,g===f?"onComplete":"onReverseComplete",!0),this._prom&&!(g<f&&this.timeScale()>0)&&this._prom()))}}else _renderZeroDurationTween(this,e,t,r);return this},r.targets=function(){return this._targets},r.invalidate=function(t){return(!t||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),e.prototype.invalidate.call(this,t)},r.resetTo=function(e,t,r,n,i){_tickerActive||_ticker.wake(),this._ts||this.play();var o,a=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||_initTween(this,a),o=this._ease(a/this._dur),_updatePropTweens(this,e,t,r,n,o,a,i)?this.resetTo(e,t,r,n,1):(_alignPlayhead(this,0),this.parent||_addLinkedListItem(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},r.kill=function(e,t){if(void 0===t&&(t="all"),!(e||t&&"all"!==t))return this._lazy=this._pt=0,this.parent?_interrupt(this):this;if(this.timeline){var r=this.timeline.totalDuration();return this.timeline.killTweensOf(e,t,_overwritingTween&&!0!==_overwritingTween.vars.overwrite)._first||_interrupt(this),this.parent&&r!==this.timeline.totalDuration()&&_setDuration(this,this._dur*this.timeline._tDur/r,0,1),this}var n,i,o,a,s,l,c,u=this._targets,h=e?toArray(e):u,d=this._ptLookup,f=this._pt;if((!t||"all"===t)&&_arraysMatch(u,h))return"all"===t&&(this._pt=0),_interrupt(this);for(n=this._op=this._op||[],"all"!==t&&(_isString(t)&&(s={},_forEachName(t,(function(e){return s[e]=1})),t=s),t=_addAliasesToVars(u,t)),c=u.length;c--;)if(~h.indexOf(u[c]))for(s in i=d[c],"all"===t?(n[c]=t,a=i,o={}):(o=n[c]=n[c]||{},a=t),a)(l=i&&i[s])&&("kill"in l.d&&!0!==l.d.kill(s)||_removeLinkedListItem(this,l,"_pt"),delete i[s]),"all"!==o&&(o[s]=1);return this._initted&&!this._pt&&f&&_interrupt(this),this},t.to=function(e,r){return new t(e,r,arguments[2])},t.from=function(e,t){return _createTweenType(1,arguments)},t.delayedCall=function(e,r,n,i){return new t(r,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:e,onComplete:r,onReverseComplete:r,onCompleteParams:n,onReverseCompleteParams:n,callbackScope:i})},t.fromTo=function(e,t,r){return _createTweenType(2,arguments)},t.set=function(e,r){return r.duration=0,r.repeatDelay||(r.repeat=0),new t(e,r)},t.killTweensOf=function(e,t,r){return _globalTimeline.killTweensOf(e,t,r)},t}(Animation);_setDefaults(Tween.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),_forEachName("staggerTo,staggerFrom,staggerFromTo",(function(e){Tween[e]=function(){var t=new Timeline,r=_slice.call(arguments,0);return r.splice("staggerFromTo"===e?5:4,0,0),t[e].apply(t,r)}}));var _setterPlain=function(e,t,r){return e[t]=r},_setterFunc=function(e,t,r){return e[t](r)},_setterFuncWithParam=function(e,t,r,n){return e[t](n.fp,r)},_setterAttribute=function(e,t,r){return e.setAttribute(t,r)},_getSetter=function(e,t){return _isFunction(e[t])?_setterFunc:_isUndefined(e[t])&&e.setAttribute?_setterAttribute:_setterPlain},_renderPlain=function(e,t){return t.set(t.t,t.p,Math.round(1e6*(t.s+t.c*e))/1e6,t)},_renderBoolean=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},_renderComplexString=function(e,t){var r=t._pt,n="";if(!e&&t.b)n=t.b;else if(1===e&&t.e)n=t.e;else{for(;r;)n=r.p+(r.m?r.m(r.s+r.c*e):Math.round(1e4*(r.s+r.c*e))/1e4)+n,r=r._next;n+=t.c}t.set(t.t,t.p,n,t)},_renderPropTweens=function(e,t){for(var r=t._pt;r;)r.r(e,r.d),r=r._next},_addPluginModifier=function(e,t,r,n){for(var i,o=this._pt;o;)i=o._next,o.p===n&&o.modifier(e,t,r),o=i},_killPropTweensOf=function(e){for(var t,r,n=this._pt;n;)r=n._next,n.p===e&&!n.op||n.op===e?_removeLinkedListItem(this,n,"_pt"):n.dep||(t=1),n=r;return!t},_setterWithModifier=function(e,t,r,n){n.mSet(e,t,n.m.call(n.tween,r,n.mt),n)},_sortPropTweensByPriority=function(e){for(var t,r,n,i,o=e._pt;o;){for(t=o._next,r=n;r&&r.pr>o.pr;)r=r._next;(o._prev=r?r._prev:i)?o._prev._next=o:n=o,(o._next=r)?r._prev=o:i=o,o=t}e._pt=n},PropTween=function(){function e(e,t,r,n,i,o,a,s,l){this.t=t,this.s=n,this.c=i,this.p=r,this.r=o||_renderPlain,this.d=a||this,this.set=s||_setterPlain,this.pr=l||0,this._next=e,e&&(e._prev=this)}return e.prototype.modifier=function(e,t,r){this.mSet=this.mSet||this.set,this.set=_setterWithModifier,this.m=e,this.mt=r,this.tween=t},e}();_forEachName(_callbackNames+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",(function(e){return _reservedProps[e]=1})),_globals.TweenMax=_globals.TweenLite=Tween,_globals.TimelineLite=_globals.TimelineMax=Timeline,_globalTimeline=new Timeline({sortChildren:!1,defaults:_defaults,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),_config.stringFilter=_colorStringFilter;var _media=[],_listeners={},_emptyArray=[],_lastMediaTime=0,_contextID=0,_dispatch=function(e){return(_listeners[e]||_emptyArray).map((function(e){return e()}))},_onMediaChange=function(){var e=Date.now(),t=[];e-_lastMediaTime>2&&(_dispatch("matchMediaInit"),_media.forEach((function(e){var r,n,i,o,a=e.queries,s=e.conditions;for(n in a)(r=_win$1.matchMedia(a[n]).matches)&&(i=1),r!==s[n]&&(s[n]=r,o=1);o&&(e.revert(),i&&t.push(e))})),_dispatch("matchMediaRevert"),t.forEach((function(e){return e.onMatch(e,(function(t){return e.add(null,t)}))})),_lastMediaTime=e,_dispatch("matchMedia"))},Context=function(){function e(e,t){this.selector=t&&selector(t),this.data=[],this._r=[],this.isReverted=!1,this.id=_contextID++,e&&this.add(e)}var t=e.prototype;return t.add=function(e,t,r){_isFunction(e)&&(r=t,t=e,e=_isFunction);var n=this,i=function(){var e,i=_context,o=n.selector;return i&&i!==n&&i.data.push(n),r&&(n.selector=selector(r)),_context=n,e=t.apply(n,arguments),_isFunction(e)&&n._r.push(e),_context=i,n.selector=o,n.isReverted=!1,e};return n.last=i,e===_isFunction?i(n,(function(e){return n.add(null,e)})):e?n[e]=i:i},t.ignore=function(e){var t=_context;_context=null,e(this),_context=t},t.getTweens=function(){var t=[];return this.data.forEach((function(r){return r instanceof e?t.push.apply(t,r.getTweens()):r instanceof Tween&&!(r.parent&&"nested"===r.parent.data)&&t.push(r)})),t},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(e,t){var r=this;if(e?function(){for(var t,n=r.getTweens(),i=r.data.length;i--;)"isFlip"===(t=r.data[i]).data&&(t.revert(),t.getChildren(!0,!0,!1).forEach((function(e){return n.splice(n.indexOf(e),1)})));for(n.map((function(e){return{g:e._dur||e._delay||e._sat&&!e._sat.vars.immediateRender?e.globalTime(0):-1/0,t:e}})).sort((function(e,t){return t.g-e.g||-1/0})).forEach((function(t){return t.t.revert(e)})),i=r.data.length;i--;)(t=r.data[i])instanceof Timeline?"nested"!==t.data&&(t.scrollTrigger&&t.scrollTrigger.revert(),t.kill()):!(t instanceof Tween)&&t.revert&&t.revert(e);r._r.forEach((function(t){return t(e,r)})),r.isReverted=!0}():this.data.forEach((function(e){return e.kill&&e.kill()})),this.clear(),t)for(var n=_media.length;n--;)_media[n].id===this.id&&_media.splice(n,1)},t.revert=function(e){this.kill(e||{})},e}(),MatchMedia=function(){function e(e){this.contexts=[],this.scope=e,_context&&_context.data.push(this)}var t=e.prototype;return t.add=function(e,t,r){_isObject(e)||(e={matches:e});var n,i,o,a=new Context(0,r||this.scope),s=a.conditions={};for(i in _context&&!a.selector&&(a.selector=_context.selector),this.contexts.push(a),t=a.add("onMatch",t),a.queries=e,e)"all"===i?o=1:(n=_win$1.matchMedia(e[i]))&&(_media.indexOf(a)<0&&_media.push(a),(s[i]=n.matches)&&(o=1),n.addListener?n.addListener(_onMediaChange):n.addEventListener("change",_onMediaChange));return o&&t(a,(function(e){return a.add(null,e)})),this},t.revert=function(e){this.kill(e||{})},t.kill=function(e){this.contexts.forEach((function(t){return t.kill(e,!0)}))},e}(),_gsap={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];t.forEach((function(e){return _createPlugin(e)}))},timeline:function(e){return new Timeline(e)},getTweensOf:function(e,t){return _globalTimeline.getTweensOf(e,t)},getProperty:function(e,t,r,n){_isString(e)&&(e=toArray(e)[0]);var i=_getCache(e||{}).get,o=r?_passThrough:_numericIfPossible;return"native"===r&&(r=""),e?t?o((_plugins[t]&&_plugins[t].get||i)(e,t,r,n)):function(t,r,n){return o((_plugins[t]&&_plugins[t].get||i)(e,t,r,n))}:e},quickSetter:function(e,t,r){if((e=toArray(e)).length>1){var n=e.map((function(e){return gsap.quickSetter(e,t,r)})),i=n.length;return function(e){for(var t=i;t--;)n[t](e)}}e=e[0]||{};var o=_plugins[t],a=_getCache(e),s=a.harness&&(a.harness.aliases||{})[t]||t,l=o?function(t){var n=new o;_quickTween._pt=0,n.init(e,r?t+r:t,_quickTween,0,[e]),n.render(1,n),_quickTween._pt&&_renderPropTweens(1,_quickTween)}:a.set(e,s);return o?l:function(t){return l(e,s,r?t+r:t,a,1)}},quickTo:function(e,t,r){var n,i=gsap.to(e,_merge(((n={})[t]="+=0.1",n.paused=!0,n),r||{})),o=function(e,r,n){return i.resetTo(t,e,r,n)};return o.tween=i,o},isTweening:function(e){return _globalTimeline.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=_parseEase(e.ease,_defaults.ease)),_mergeDeep(_defaults,e||{})},config:function(e){return _mergeDeep(_config,e||{})},registerEffect:function(e){var t=e.name,r=e.effect,n=e.plugins,i=e.defaults,o=e.extendTimeline;(n||"").split(",").forEach((function(e){return e&&!_plugins[e]&&!_globals[e]&&_warn(t+" effect requires "+e+" plugin.")})),_effects[t]=function(e,t,n){return r(toArray(e),_setDefaults(t||{},i),n)},o&&(Timeline.prototype[t]=function(e,r,n){return this.add(_effects[t](e,_isObject(r)?r:(n=r)&&{},this),n)})},registerEase:function(e,t){_easeMap[e]=_parseEase(t)},parseEase:function(e,t){return arguments.length?_parseEase(e,t):_easeMap},getById:function(e){return _globalTimeline.getById(e)},exportRoot:function(e,t){void 0===e&&(e={});var r,n,i=new Timeline(e);for(i.smoothChildTiming=_isNotFalse(e.smoothChildTiming),_globalTimeline.remove(i),i._dp=0,i._time=i._tTime=_globalTimeline._time,r=_globalTimeline._first;r;)n=r._next,!t&&!r._dur&&r instanceof Tween&&r.vars.onComplete===r._targets[0]||_addToTimeline(i,r,r._start-r._delay),r=n;return _addToTimeline(_globalTimeline,i,0),i},context:function(e,t){return e?new Context(e,t):_context},matchMedia:function(e){return new MatchMedia(e)},matchMediaRefresh:function(){return _media.forEach((function(e){var t,r,n=e.conditions;for(r in n)n[r]&&(n[r]=!1,t=1);t&&e.revert()}))||_onMediaChange()},addEventListener:function(e,t){var r=_listeners[e]||(_listeners[e]=[]);~r.indexOf(t)||r.push(t)},removeEventListener:function(e,t){var r=_listeners[e],n=r&&r.indexOf(t);n>=0&&r.splice(n,1)},utils:{wrap:wrap,wrapYoyo:wrapYoyo,distribute:distribute,random:random,snap:snap,normalize:normalize,getUnit:getUnit,clamp:clamp,splitColor:splitColor,toArray:toArray,selector:selector,mapRange:mapRange,pipe:pipe,unitize:unitize,interpolate:interpolate,shuffle:shuffle},install:_install,effects:_effects,ticker:_ticker,updateRoot:Timeline.updateRoot,plugins:_plugins,globalTimeline:_globalTimeline,core:{PropTween:PropTween,globals:_addGlobal,Tween:Tween,Timeline:Timeline,Animation:Animation,getCache:_getCache,_removeLinkedListItem:_removeLinkedListItem,reverting:function(){return _reverting$1},context:function(e){return e&&_context&&(_context.data.push(e),e._ctx=_context),_context},suppressOverwrites:function(e){return _suppressOverwrites=e}}};_forEachName("to,from,fromTo,delayedCall,set,killTweensOf",(function(e){return _gsap[e]=Tween[e]})),_ticker.add(Timeline.updateRoot),_quickTween=_gsap.to({},{duration:0});var _getPluginPropTween=function(e,t){for(var r=e._pt;r&&r.p!==t&&r.op!==t&&r.fp!==t;)r=r._next;return r},_addModifiers=function(e,t){var r,n,i,o=e._targets;for(r in t)for(n=o.length;n--;)(i=e._ptLookup[n][r])&&(i=i.d)&&(i._pt&&(i=_getPluginPropTween(i,r)),i&&i.modifier&&i.modifier(t[r],e,o[n],r))},_buildModifierPlugin=function(e,t){return{name:e,rawVars:1,init:function(e,r,n){n._onInit=function(e){var n,i;if(_isString(r)&&(n={},_forEachName(r,(function(e){return n[e]=1})),r=n),t){for(i in n={},r)n[i]=t(r[i]);r=n}_addModifiers(e,r)}}}},gsap=_gsap.registerPlugin({name:"attr",init:function(e,t,r,n,i){var o,a,s;for(o in this.tween=r,t)s=e.getAttribute(o)||"",(a=this.add(e,"setAttribute",(s||0)+"",t[o],n,i,0,0,o)).op=o,a.b=s,this._props.push(o)},render:function(e,t){for(var r=t._pt;r;)_reverting$1?r.set(r.t,r.p,r.b,r):r.r(e,r.d),r=r._next}},{name:"endArray",init:function(e,t){for(var r=t.length;r--;)this.add(e,r,e[r]||0,t[r],0,0,0,0,0,1)}},_buildModifierPlugin("roundProps",_roundModifier),_buildModifierPlugin("modifiers"),_buildModifierPlugin("snap",snap))||_gsap;Tween.version=Timeline.version=gsap.version="3.12.5",_coreReady=1,_windowExists$1()&&_wake(),_easeMap.Power0,_easeMap.Power1,_easeMap.Power2,_easeMap.Power3,_easeMap.Power4,_easeMap.Linear,_easeMap.Quad,_easeMap.Cubic,_easeMap.Quart,_easeMap.Quint,_easeMap.Strong,_easeMap.Elastic,_easeMap.Back,_easeMap.SteppedEase,_easeMap.Bounce,_easeMap.Sine,_easeMap.Expo,_easeMap.Circ;
|
|
41
|
+
*/var ya,ba,wa,_a,Da,Sa,xa,ka,Ta,Ca,Oa,Aa={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Ea={duration:.5,overwrite:!1,delay:0},Ma=1e8,Na=1e-8,Pa=2*Math.PI,Va=Pa/4,Ra=0,Ba=Math.sqrt,Ia=Math.cos,Fa=Math.sin,ja=function(t){return"string"==typeof t},La=function(t){return"function"==typeof t},za=function(t){return"number"==typeof t},Ya=function(t){return void 0===t},Ha=function(t){return"object"==typeof t},Ua=function(t){return!1!==t},qa=function(){return"undefined"!=typeof window},Ga=function(t){return La(t)||ja(t)},Wa="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},$a=Array.isArray,Ka=/(?:-?\.?\d|\.)+/gi,Za=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Xa=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Ja=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Qa=/[+-]=-?[.\d]+/,ts=/[^,'"\[\]\s]+/gi,es=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ns={},rs={},is=function(t){return(rs=Ps(t,ns))&&Vc},os=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},as=function(t,e){return!e&&console.warn(t)},ss=function(t,e){return t&&(ns[t]=e)&&rs&&(rs[t]=e)||ns},ls=function(){return 0},cs={suppressEvents:!0,isStart:!0,kill:!1},us={suppressEvents:!0,kill:!1},hs={suppressEvents:!0},ds={},fs=[],ps={},ms={},gs={},vs=30,ys=[],bs="",ws=function(t){var e,n,r=t[0];if(Ha(r)||La(r)||(t=[t]),!(e=(r._gsap||{}).harness)){for(n=ys.length;n--&&!ys[n].targetTest(r););e=ys[n]}for(n=t.length;n--;)t[n]&&(t[n]._gsap||(t[n]._gsap=new $l(t[n],e)))||t.splice(n,1);return t},_s=function(t){return t._gsap||ws(hl(t))[0]._gsap},Ds=function(t,e,n){return(n=t[e])&&La(n)?t[e]():Ya(n)&&t.getAttribute&&t.getAttribute(e)||n},Ss=function(t,e){return(t=t.split(",")).forEach(e)||t},xs=function(t){return Math.round(1e5*t)/1e5||0},ks=function(t){return Math.round(1e7*t)/1e7||0},Ts=function(t,e){var n=e.charAt(0),r=parseFloat(e.substr(2));return t=parseFloat(t),"+"===n?t+r:"-"===n?t-r:"*"===n?t*r:t/r},Cs=function(t,e){for(var n=e.length,r=0;t.indexOf(e[r])<0&&++r<n;);return r<n},Os=function(){var t,e,n=fs.length,r=fs.slice(0);for(ps={},fs.length=0,t=0;t<n;t++)(e=r[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)},As=function(t,e,n,r){fs.length&&!ba&&Os(),t.render(e,n,r||ba&&e<0&&(t._initted||t._startAt)),fs.length&&!ba&&Os()},Es=function(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(ts).length<2?e:ja(t)?t.trim():t},Ms=function(t){return t},Ns=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},Ps=function(t,e){for(var n in e)t[n]=e[n];return t},Vs=function t(e,n){for(var r in n)"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(e[r]=Ha(n[r])?t(e[r]||(e[r]={}),n[r]):n[r]);return e},Rs=function(t,e){var n,r={};for(n in t)n in e||(r[n]=t[n]);return r},Bs=function(t){var e,n=t.parent||_a,r=t.keyframes?(e=$a(t.keyframes),function(t,n){for(var r in n)r in t||"duration"===r&&e||"ease"===r||(t[r]=n[r])}):Ns;if(Ua(t.inherit))for(;n;)r(t,n.vars.defaults),n=n.parent||n._dp;return t},Is=function(t,e,n,r,i){void 0===n&&(n="_first"),void 0===r&&(r="_last");var o,a=t[r];if(i)for(o=e[i];a&&a[i]>o;)a=a._prev;return a?(e._next=a._next,a._next=e):(e._next=t[n],t[n]=e),e._next?e._next._prev=e:t[r]=e,e._prev=a,e.parent=e._dp=t,e},Fs=function(t,e,n,r){void 0===n&&(n="_first"),void 0===r&&(r="_last");var i=e._prev,o=e._next;i?i._next=o:t[n]===e&&(t[n]=o),o?o._prev=i:t[r]===e&&(t[r]=i),e._next=e._prev=e.parent=null},js=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},Ls=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var n=t;n;)n._dirty=1,n=n.parent;return t},zs=function(t,e,n,r){return t._startAt&&(ba?t._startAt.revert(us):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,r))},Ys=function t(e){return!e||e._ts&&t(e.parent)},Hs=function(t){return t._repeat?Us(t._tTime,t=t.duration()+t._rDelay)*t:0},Us=function(t,e){var n=Math.floor(t/=e);return t&&n===t?n-1:n},qs=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},Gs=function(t){return t._end=ks(t._start+(t._tDur/Math.abs(t._ts||t._rts||Na)||0))},Ws=function(t,e){var n=t._dp;return n&&n.smoothChildTiming&&t._ts&&(t._start=ks(n._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Gs(t),n._dirty||Ls(n,t)),t},$s=function(t,e){var n;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(n=qs(t.rawTime(),e),(!e._dur||al(0,e.totalDuration(),n)-e._tTime>Na)&&e.render(n,!0)),Ls(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(n=t;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;t._zTime=-1e-8}},Ks=function(t,e,n,r){return e.parent&&js(e),e._start=ks((za(n)?n:n||t!==_a?rl(t,n,e):t._time)+e._delay),e._end=ks(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),Is(t,e,"_first","_last",t._sort?"_start":0),Qs(e)||(t._recent=e),r||$s(t,e),t._ts<0&&Ws(t,t._tTime),t},Zs=function(t,e){return(ns.ScrollTrigger||os("scrollTrigger",e))&&ns.ScrollTrigger.create(e,t)},Xs=function(t,e,n,r,i){return nc(t,e,i),t._initted?!n&&t._pt&&!ba&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&Ta!==Rl.frame?(fs.push(t),t._lazy=[i,r],1):void 0:1},Js=function t(e){var n=e.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||t(n))},Qs=function(t){var e=t.data;return"isFromStart"===e||"isStart"===e},tl=function(t,e,n,r){var i=t._repeat,o=ks(e)||0,a=t._tTime/t._tDur;return a&&!r&&(t._time*=o/t._dur),t._dur=o,t._tDur=i?i<0?1e10:ks(o*(i+1)+t._rDelay*i):o,a>0&&!r&&Ws(t,t._tTime=t._tDur*a),t.parent&&Gs(t),n||Ls(t.parent,t),t},el=function(t){return t instanceof Zl?Ls(t):tl(t,t._dur)},nl={_start:0,endTime:ls,totalDuration:ls},rl=function t(e,n,r){var i,o,a,s=e.labels,l=e._recent||nl,c=e.duration()>=Ma?l.endTime(!1):e._dur;return ja(n)&&(isNaN(n)||n in s)?(o=n.charAt(0),a="%"===n.substr(-1),i=n.indexOf("="),"<"===o||">"===o?(i>=0&&(n=n.replace(/=/,"")),("<"===o?l._start:l.endTime(l._repeat>=0))+(parseFloat(n.substr(1))||0)*(a?(i<0?l:r).totalDuration()/100:1)):i<0?(n in s||(s[n]=c),s[n]):(o=parseFloat(n.charAt(i-1)+n.substr(i+1)),a&&r&&(o=o/100*($a(r)?r[0]:r).totalDuration()),i>1?t(e,n.substr(0,i-1),r)+o:c+o)):null==n?c:+n},il=function(t,e,n){var r,i,o=za(e[1]),a=(o?2:1)+(t<2?0:1),s=e[a];if(o&&(s.duration=e[1]),s.parent=n,t){for(r=s,i=n;i&&!("immediateRender"in r);)r=i.vars.defaults||{},i=Ua(i.vars.inherit)&&i.parent;s.immediateRender=Ua(r.immediateRender),t<2?s.runBackwards=1:s.startAt=e[a-1]}return new sc(e[0],s,e[a+1])},ol=function(t,e){return t||0===t?e(t):e},al=function(t,e,n){return n<t?t:n>e?e:n},sl=function(t,e){return ja(t)&&(e=es.exec(t))?e[1]:""},ll=[].slice,cl=function(t,e){return t&&Ha(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&Ha(t[0]))&&!t.nodeType&&t!==Da},ul=function(t,e,n){return void 0===n&&(n=[]),t.forEach((function(t){var r;return ja(t)&&!e||cl(t,1)?(r=n).push.apply(r,hl(t)):n.push(t)}))||n},hl=function(t,e,n){return wa&&!e&&wa.selector?wa.selector(t):!ja(t)||n||!Sa&&Bl()?$a(t)?ul(t,n):cl(t)?ll.call(t,0):t?[t]:[]:ll.call((e||xa).querySelectorAll(t),0)},dl=function(t){return t=hl(t)[0]||as("Invalid scope")||{},function(e){var n=t.current||t.nativeElement||t;return hl(e,n.querySelectorAll?n:n===t?as("Invalid scope")||xa.createElement("div"):t)}},fl=function(t){return t.sort((function(){return.5-Math.random()}))},pl=function(t){if(La(t))return t;var e=Ha(t)?t:{each:t},n=Hl(e.ease),r=e.from||0,i=parseFloat(e.base)||0,o={},a=r>0&&r<1,s=isNaN(r)||a,l=e.axis,c=r,u=r;return ja(r)?c=u={center:.5,edges:.5,end:1}[r]||0:!a&&s&&(c=r[0],u=r[1]),function(t,a,h){var d,f,p,m,g,v,y,b,w,_=(h||e).length,D=o[_];if(!D){if(!(w="auto"===e.grid?0:(e.grid||[1,Ma])[1])){for(y=-1e8;y<(y=h[w++].getBoundingClientRect().left)&&w<_;);w<_&&w--}for(D=o[_]=[],d=s?Math.min(w,_)*c-.5:r%w,f=w===Ma?0:s?_*u/w-.5:r/w|0,y=0,b=Ma,v=0;v<_;v++)p=v%w-d,m=f-(v/w|0),D[v]=g=l?Math.abs("y"===l?m:p):Ba(p*p+m*m),g>y&&(y=g),g<b&&(b=g);"random"===r&&fl(D),D.max=y-b,D.min=b,D.v=_=(parseFloat(e.amount)||parseFloat(e.each)*(w>_?_-1:l?"y"===l?_/w:w:Math.max(w,_/w))||0)*("edges"===r?-1:1),D.b=_<0?i-_:i,D.u=sl(e.amount||e.each)||0,n=n&&_<0?zl(n):n}return _=(D[t]-D.min)/D.max||0,ks(D.b+(n?n(_):_)*D.v)+D.u}},ml=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(n){var r=ks(Math.round(parseFloat(n)/t)*t*e);return(r-r%1)/e+(za(n)?0:sl(n))}},gl=function(t,e){var n,r,i=$a(t);return!i&&Ha(t)&&(n=i=t.radius||Ma,t.values?(t=hl(t.values),(r=!za(t[0]))&&(n*=n)):t=ml(t.increment)),ol(e,i?La(t)?function(e){return r=t(e),Math.abs(r-e)<=n?r:e}:function(e){for(var i,o,a=parseFloat(r?e.x:e),s=parseFloat(r?e.y:0),l=Ma,c=0,u=t.length;u--;)(i=r?(i=t[u].x-a)*i+(o=t[u].y-s)*o:Math.abs(t[u]-a))<l&&(l=i,c=u);return c=!n||l<=n?t[c]:e,r||c===e||za(e)?c:c+sl(e)}:ml(t))},vl=function(t,e,n,r){return ol($a(t)?!e:!0===n?!!(n=0):!r,(function(){return $a(t)?t[~~(Math.random()*t.length)]:(n=n||1e-5)&&(r=n<1?Math.pow(10,(n+"").length-2):1)&&Math.floor(Math.round((t-n/2+Math.random()*(e-t+.99*n))/n)*n*r)/r}))},yl=function(t,e,n){return ol(n,(function(n){return t[~~e(n)]}))},bl=function(t){for(var e,n,r,i,o=0,a="";~(e=t.indexOf("random(",o));)r=t.indexOf(")",e),i="["===t.charAt(e+7),n=t.substr(e+7,r-e-7).match(i?ts:Ka),a+=t.substr(o,e-o)+vl(i?n:+n[0],i?0:+n[1],+n[2]||1e-5),o=r+1;return a+t.substr(o,t.length-o)},wl=function(t,e,n,r,i){var o=e-t,a=r-n;return ol(i,(function(e){return n+((e-t)/o*a||0)}))},_l=function(t,e,n){var r,i,o,a=t.labels,s=Ma;for(r in a)(i=a[r]-e)<0==!!n&&i&&s>(i=Math.abs(i))&&(o=r,s=i);return o},Dl=function(t,e,n){var r,i,o,a=t.vars,s=a[e],l=wa,c=t._ctx;if(s)return r=a[e+"Params"],i=a.callbackScope||t,n&&fs.length&&Os(),c&&(wa=c),o=r?s.apply(i,r):s.call(i),wa=l,o},Sl=function(t){return js(t),t.scrollTrigger&&t.scrollTrigger.kill(!!ba),t.progress()<1&&Dl(t,"onInterrupt"),t},xl=[],kl=function(t){if(t)if(t=!t.name&&t.default||t,qa()||t.headless){var e=t.name,n=La(t),r=e&&!n&&t.init?function(){this._props=[]}:t,i={init:ls,render:gc,add:tc,kill:yc,modifier:vc,rawVars:0},o={targetTest:0,get:0,getSetter:dc,aliases:{},register:0};if(Bl(),t!==r){if(ms[e])return;Ns(r,Ns(Rs(t,i),o)),Ps(r.prototype,Ps(i,Rs(t,o))),ms[r.prop=e]=r,t.targetTest&&(ys.push(r),ds[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}ss(e,r),t.register&&t.register(Vc,r,_c)}else xl.push(t)},Tl=255,Cl={aqua:[0,Tl,Tl],lime:[0,Tl,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Tl],navy:[0,0,128],white:[Tl,Tl,Tl],olive:[128,128,0],yellow:[Tl,Tl,0],orange:[Tl,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Tl,0,0],pink:[Tl,192,203],cyan:[0,Tl,Tl],transparent:[Tl,Tl,Tl,0]},Ol=function(t,e,n){return(6*(t+=t<0?1:t>1?-1:0)<1?e+(n-e)*t*6:t<.5?n:3*t<2?e+(n-e)*(2/3-t)*6:e)*Tl+.5|0},Al=function(t,e,n){var r,i,o,a,s,l,c,u,h,d,f=t?za(t)?[t>>16,t>>8&Tl,t&Tl]:0:Cl.black;if(!f){if(","===t.substr(-1)&&(t=t.substr(0,t.length-1)),Cl[t])f=Cl[t];else if("#"===t.charAt(0)){if(t.length<6&&(r=t.charAt(1),i=t.charAt(2),o=t.charAt(3),t="#"+r+r+i+i+o+o+(5===t.length?t.charAt(4)+t.charAt(4):"")),9===t.length)return[(f=parseInt(t.substr(1,6),16))>>16,f>>8&Tl,f&Tl,parseInt(t.substr(7),16)/255];f=[(t=parseInt(t.substr(1),16))>>16,t>>8&Tl,t&Tl]}else if("hsl"===t.substr(0,3))if(f=d=t.match(Ka),e){if(~t.indexOf("="))return f=t.match(Za),n&&f.length<4&&(f[3]=1),f}else a=+f[0]%360/360,s=+f[1]/100,r=2*(l=+f[2]/100)-(i=l<=.5?l*(s+1):l+s-l*s),f.length>3&&(f[3]*=1),f[0]=Ol(a+1/3,r,i),f[1]=Ol(a,r,i),f[2]=Ol(a-1/3,r,i);else f=t.match(Ka)||Cl.transparent;f=f.map(Number)}return e&&!d&&(r=f[0]/Tl,i=f[1]/Tl,o=f[2]/Tl,l=((c=Math.max(r,i,o))+(u=Math.min(r,i,o)))/2,c===u?a=s=0:(h=c-u,s=l>.5?h/(2-c-u):h/(c+u),a=c===r?(i-o)/h+(i<o?6:0):c===i?(o-r)/h+2:(r-i)/h+4,a*=60),f[0]=~~(a+.5),f[1]=~~(100*s+.5),f[2]=~~(100*l+.5)),n&&f.length<4&&(f[3]=1),f},El=function(t){var e=[],n=[],r=-1;return t.split(Nl).forEach((function(t){var i=t.match(Xa)||[];e.push.apply(e,i),n.push(r+=i.length+1)})),e.c=n,e},Ml=function(t,e,n){var r,i,o,a,s="",l=(t+s).match(Nl),c=e?"hsla(":"rgba(",u=0;if(!l)return t;if(l=l.map((function(t){return(t=Al(t,e,1))&&c+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"})),n&&(o=El(t),(r=n.c).join(s)!==o.c.join(s)))for(a=(i=t.replace(Nl,"1").split(Xa)).length-1;u<a;u++)s+=i[u]+(~r.indexOf(u)?l.shift()||c+"0,0,0,0)":(o.length?o:l.length?l:n).shift());if(!i)for(a=(i=t.split(Nl)).length-1;u<a;u++)s+=i[u]+l[u];return s+i[a]},Nl=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in Cl)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),Pl=/hsl[a]?\(/,Vl=function(t){var e,n=t.join(" ");if(Nl.lastIndex=0,Nl.test(n))return e=Pl.test(n),t[1]=Ml(t[1],e),t[0]=Ml(t[0],e,El(t[1])),!0},Rl=function(){var t,e,n,r,i,o,a=Date.now,s=500,l=33,c=a(),u=c,h=1e3/240,d=h,f=[],p=function n(p){var m,g,v,y,b=a()-u,w=!0===p;if((b>s||b<0)&&(c+=b-l),((m=(v=(u+=b)-c)-d)>0||w)&&(y=++r.frame,i=v-1e3*r.time,r.time=v/=1e3,d+=m+(m>=h?4:h-m),g=1),w||(t=e(n)),g)for(o=0;o<f.length;o++)f[o](v,i,y,p)};return r={time:0,frame:0,tick:function(){p(!0)},deltaRatio:function(t){return i/(1e3/(t||60))},wake:function(){ka&&(!Sa&&qa()&&(Da=Sa=window,xa=Da.document||{},ns.gsap=Vc,(Da.gsapVersions||(Da.gsapVersions=[])).push(Vc.version),is(rs||Da.GreenSockGlobals||!Da.gsap&&Da||{}),xl.forEach(kl)),n="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,t&&r.sleep(),e=n||function(t){return setTimeout(t,d-1e3*r.time+1|0)},Oa=1,p(2))},sleep:function(){(n?cancelAnimationFrame:clearTimeout)(t),Oa=0,e=ls},lagSmoothing:function(t,e){s=t||1/0,l=Math.min(e||33,s)},fps:function(t){h=1e3/(t||240),d=1e3*r.time+h},add:function(t,e,n){var i=e?function(e,n,o,a){t(e,n,o,a),r.remove(i)}:t;return r.remove(t),f[n?"unshift":"push"](i),Bl(),i},remove:function(t,e){~(e=f.indexOf(t))&&f.splice(e,1)&&o>=e&&o--},_listeners:f},r}(),Bl=function(){return!Oa&&Rl.wake()},Il={},Fl=/^[\d.\-M][\d.\-,\s]/,jl=/["']/g,Ll=function(t){for(var e,n,r,i={},o=t.substr(1,t.length-3).split(":"),a=o[0],s=1,l=o.length;s<l;s++)n=o[s],e=s!==l-1?n.lastIndexOf(","):n.length,r=n.substr(0,e),i[a]=isNaN(r)?r.replace(jl,"").trim():+r,a=n.substr(e+1).trim();return i},zl=function(t){return function(e){return 1-t(1-e)}},Yl=function t(e,n){for(var r,i=e._first;i;)i instanceof Zl?t(i,n):!i.vars.yoyoEase||i._yoyo&&i._repeat||i._yoyo===n||(i.timeline?t(i.timeline,n):(r=i._ease,i._ease=i._yEase,i._yEase=r,i._yoyo=n)),i=i._next},Hl=function(t,e){return t&&(La(t)?t:Il[t]||function(t){var e=(t+"").split("("),n=Il[e[0]];return n&&e.length>1&&n.config?n.config.apply(null,~t.indexOf("{")?[Ll(e[1])]:function(t){var e=t.indexOf("(")+1,n=t.indexOf(")"),r=t.indexOf("(",e);return t.substring(e,~r&&r<n?t.indexOf(")",n+1):n)}(t).split(",").map(Es)):Il._CE&&Fl.test(t)?Il._CE("",t):n}(t))||e},Ul=function(t,e,n,r){void 0===n&&(n=function(t){return 1-e(1-t)}),void 0===r&&(r=function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var i,o={easeIn:e,easeOut:n,easeInOut:r};return Ss(t,(function(t){for(var e in Il[t]=ns[t]=o,Il[i=t.toLowerCase()]=n,o)Il[i+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Il[t+"."+e]=o[e]})),o},ql=function(t){return function(e){return e<.5?(1-t(1-2*e))/2:.5+t(2*(e-.5))/2}},Gl=function t(e,n,r){var i=n>=1?n:1,o=(r||(e?.3:.45))/(n<1?n:1),a=o/Pa*(Math.asin(1/i)||0),s=function(t){return 1===t?1:i*Math.pow(2,-10*t)*Fa((t-a)*o)+1},l="out"===e?s:"in"===e?function(t){return 1-s(1-t)}:ql(s);return o=Pa/o,l.config=function(n,r){return t(e,n,r)},l},Wl=function t(e,n){void 0===n&&(n=1.70158);var r=function(t){return t?--t*t*((n+1)*t+n)+1:0},i="out"===e?r:"in"===e?function(t){return 1-r(1-t)}:ql(r);return i.config=function(n){return t(e,n)},i};Ss("Linear,Quad,Cubic,Quart,Quint,Strong",(function(t,e){var n=e<5?e+1:e;Ul(t+",Power"+(n-1),e?function(t){return Math.pow(t,n)}:function(t){return t},(function(t){return 1-Math.pow(1-t,n)}),(function(t){return t<.5?Math.pow(2*t,n)/2:1-Math.pow(2*(1-t),n)/2}))})),Il.Linear.easeNone=Il.none=Il.Linear.easeIn,Ul("Elastic",Gl("in"),Gl("out"),Gl()),function(t,e){var n=1/e,r=2*n,i=2.5*n,o=function(o){return o<n?t*o*o:o<r?t*Math.pow(o-1.5/e,2)+.75:o<i?t*(o-=2.25/e)*o+.9375:t*Math.pow(o-2.625/e,2)+.984375};Ul("Bounce",(function(t){return 1-o(1-t)}),o)}(7.5625,2.75),Ul("Expo",(function(t){return t?Math.pow(2,10*(t-1)):0})),Ul("Circ",(function(t){return-(Ba(1-t*t)-1)})),Ul("Sine",(function(t){return 1===t?1:1-Ia(t*Va)})),Ul("Back",Wl("in"),Wl("out"),Wl()),Il.SteppedEase=Il.steps=ns.SteppedEase={config:function(t,e){void 0===t&&(t=1);var n=1/t,r=t+(e?0:1),i=e?1:0;return function(t){return((r*al(0,.99999999,t)|0)+i)*n}}},Ea.ease=Il["quad.out"],Ss("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(t){return bs+=t+","+t+"Params,"}));var $l=function(t,e){this.id=Ra++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:Ds,this.set=e?e.getSetter:dc},Kl=function(){function t(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,tl(this,+t.duration,1,1),this.data=t.data,wa&&(this._ctx=wa,wa.data.push(this)),Oa||Rl.wake()}var e=t.prototype;return e.delay=function(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},e.duration=function(t){return arguments.length?this.totalDuration(this._repeat>0?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},e.totalDuration=function(t){return arguments.length?(this._dirty=0,tl(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(t,e){if(Bl(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(Ws(this,t),!n._dp||n.parent||$s(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&t<this._tDur||this._ts<0&&t>0||!this._tDur&&!t)&&Ks(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&Math.abs(this._zTime)===Na||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),As(this,t,e)),this},e.time=function(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+Hs(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},e.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},e.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+Hs(this),e):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(t,e){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*n,e):this._repeat?Us(this._tTime,n)+1:1},e.timeScale=function(t,e){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===t)return this;var n=this.parent&&this._ts?qs(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||-1e-8===t?0:this._rts,this.totalTime(al(-Math.abs(this._delay),this._tDur,n),!1!==e),Gs(this),function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t}(this)},e.paused=function(t){return arguments.length?(this._ps!==t&&(this._ps=t,t?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Bl(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==Na&&(this._tTime-=Na)))),this):this._ps},e.startTime=function(t){if(arguments.length){this._start=t;var e=this.parent||this._dp;return e&&(e._sort||!this.parent)&&Ks(e,this,t-this._delay),this}return this._start},e.endTime=function(t){return this._start+(Ua(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?qs(e.rawTime(t),this):this._tTime:this._tTime},e.revert=function(t){void 0===t&&(t=hs);var e=ba;return ba=t,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),ba=e,this},e.globalTime=function(t){for(var e=this,n=arguments.length?t:e.rawTime();e;)n=e._start+n/(Math.abs(e._ts)||1),e=e._dp;return!this.parent&&this._sat?this._sat.globalTime(t):n},e.repeat=function(t){return arguments.length?(this._repeat=t===1/0?-2:t,el(this)):-2===this._repeat?1/0:this._repeat},e.repeatDelay=function(t){if(arguments.length){var e=this._time;return this._rDelay=t,el(this),e?this.time(e):this}return this._rDelay},e.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},e.seek=function(t,e){return this.totalTime(rl(this,t),Ua(e))},e.restart=function(t,e){return this.play().totalTime(t?-this._delay:0,Ua(e))},e.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},e.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},e.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-1e-8:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},e.isActive=function(){var t,e=this.parent||this._dp,n=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=n&&t<this.endTime(!0)-Na))},e.eventCallback=function(t,e,n){var r=this.vars;return arguments.length>1?(e?(r[t]=e,n&&(r[t+"Params"]=n),"onUpdate"===t&&(this._onUpdate=e)):delete r[t],this):r[t]},e.then=function(t){var e=this;return new Promise((function(n){var r=La(t)?t:Ms,i=function(){var t=e.then;e.then=null,La(r)&&(r=r(e))&&(r.then||r===e)&&(e.then=t),n(r),e.then=t};e._initted&&1===e.totalProgress()&&e._ts>=0||!e._tTime&&e._ts<0?i():e._prom=i}))},e.kill=function(){Sl(this)},t}();Ns(Kl.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-1e-8,_prom:0,_ps:!1,_rts:1});var Zl=function(t){function e(e,n){var r;return void 0===e&&(e={}),(r=t.call(this,e)||this).labels={},r.smoothChildTiming=!!e.smoothChildTiming,r.autoRemoveChildren=!!e.autoRemoveChildren,r._sort=Ua(e.sortChildren),_a&&Ks(e.parent||_a,ga(r),n),e.reversed&&r.reverse(),e.paused&&r.paused(!0),e.scrollTrigger&&Zs(ga(r),e.scrollTrigger),r}va(e,t);var n=e.prototype;return n.to=function(t,e,n){return il(0,arguments,this),this},n.from=function(t,e,n){return il(1,arguments,this),this},n.fromTo=function(t,e,n,r){return il(2,arguments,this),this},n.set=function(t,e,n){return e.duration=0,e.parent=this,Bs(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new sc(t,e,rl(this,n),1),this},n.call=function(t,e,n){return Ks(this,sc.delayedCall(0,t,e),n)},n.staggerTo=function(t,e,n,r,i,o,a){return n.duration=e,n.stagger=n.stagger||r,n.onComplete=o,n.onCompleteParams=a,n.parent=this,new sc(t,n,rl(this,i)),this},n.staggerFrom=function(t,e,n,r,i,o,a){return n.runBackwards=1,Bs(n).immediateRender=Ua(n.immediateRender),this.staggerTo(t,e,n,r,i,o,a)},n.staggerFromTo=function(t,e,n,r,i,o,a,s){return r.startAt=n,Bs(r).immediateRender=Ua(r.immediateRender),this.staggerTo(t,e,r,i,o,a,s)},n.render=function(t,e,n){var r,i,o,a,s,l,c,u,h,d,f,p,m=this._time,g=this._dirty?this.totalDuration():this._tDur,v=this._dur,y=t<=0?0:ks(t),b=this._zTime<0!=t<0&&(this._initted||!v);if(this!==_a&&y>g&&t>=0&&(y=g),y!==this._tTime||n||b){if(m!==this._time&&v&&(y+=this._time-m,t+=this._time-m),r=y,h=this._start,l=!(u=this._ts),b&&(v||(m=this._zTime),(t||!e)&&(this._zTime=t)),this._repeat){if(f=this._yoyo,s=v+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*s+t,e,n);if(r=ks(y%s),y===g?(a=this._repeat,r=v):((a=~~(y/s))&&a===y/s&&(r=v,a--),r>v&&(r=v)),d=Us(this._tTime,s),!m&&this._tTime&&d!==a&&this._tTime-d*s-this._dur<=0&&(d=a),f&&1&a&&(r=v-r,p=1),a!==d&&!this._lock){var w=f&&1&d,_=w===(f&&1&a);if(a<d&&(w=!w),m=w?0:y%v?v:y,this._lock=1,this.render(m||(p?0:ks(a*s)),e,!v)._lock=0,this._tTime=y,!e&&this.parent&&Dl(this,"onRepeat"),this.vars.repeatRefresh&&!p&&(this.invalidate()._lock=1),m&&m!==this._time||l!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(v=this._dur,g=this._tDur,_&&(this._lock=2,m=w?v:-1e-4,this.render(m,!0),this.vars.repeatRefresh&&!p&&this.invalidate()),this._lock=0,!this._ts&&!l)return this;Yl(this,p)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(c=function(t,e,n){var r;if(n>e)for(r=t._first;r&&r._start<=n;){if("isPause"===r.data&&r._start>e)return r;r=r._next}else for(r=t._last;r&&r._start>=n;){if("isPause"===r.data&&r._start<e)return r;r=r._prev}}(this,ks(m),ks(r)),c&&(y-=r-(r=c._start))),this._tTime=y,this._time=r,this._act=!u,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,m=0),!m&&r&&!e&&!a&&(Dl(this,"onStart"),this._tTime!==y))return this;if(r>=m&&t>=0)for(i=this._first;i;){if(o=i._next,(i._act||r>=i._start)&&i._ts&&c!==i){if(i.parent!==this)return this.render(t,e,n);if(i.render(i._ts>0?(r-i._start)*i._ts:(i._dirty?i.totalDuration():i._tDur)+(r-i._start)*i._ts,e,n),r!==this._time||!this._ts&&!l){c=0,o&&(y+=this._zTime=-1e-8);break}}i=o}else{i=this._last;for(var D=t<0?t:r;i;){if(o=i._prev,(i._act||D<=i._end)&&i._ts&&c!==i){if(i.parent!==this)return this.render(t,e,n);if(i.render(i._ts>0?(D-i._start)*i._ts:(i._dirty?i.totalDuration():i._tDur)+(D-i._start)*i._ts,e,n||ba&&(i._initted||i._startAt)),r!==this._time||!this._ts&&!l){c=0,o&&(y+=this._zTime=D?-1e-8:Na);break}}i=o}}if(c&&!e&&(this.pause(),c.render(r>=m?0:-1e-8)._zTime=r>=m?1:-1,this._ts))return this._start=h,Gs(this),this.render(t,e,n);this._onUpdate&&!e&&Dl(this,"onUpdate",!0),(y===g&&this._tTime>=this.totalDuration()||!y&&m)&&(h!==this._start&&Math.abs(u)===Math.abs(this._ts)||this._lock||((t||!v)&&(y===g&&this._ts>0||!y&&this._ts<0)&&js(this,1),e||t<0&&!m||!y&&!m&&g||(Dl(this,y===g&&t>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(y<g&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(t,e){var n=this;if(za(e)||(e=rl(this,e,t)),!(t instanceof Kl)){if($a(t))return t.forEach((function(t){return n.add(t,e)})),this;if(ja(t))return this.addLabel(t,e);if(!La(t))return this;t=sc.delayedCall(0,t)}return this!==t?Ks(this,t,e):this},n.getChildren=function(t,e,n,r){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===n&&(n=!0),void 0===r&&(r=-1e8);for(var i=[],o=this._first;o;)o._start>=r&&(o instanceof sc?e&&i.push(o):(n&&i.push(o),t&&i.push.apply(i,o.getChildren(!0,e,n)))),o=o._next;return i},n.getById=function(t){for(var e=this.getChildren(1,1,1),n=e.length;n--;)if(e[n].vars.id===t)return e[n]},n.remove=function(t){return ja(t)?this.removeLabel(t):La(t)?this.killTweensOf(t):(Fs(this,t),t===this._recent&&(this._recent=this._last),Ls(this))},n.totalTime=function(e,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ks(Rl.time-(this._ts>0?e/this._ts:(this.totalDuration()-e)/-this._ts))),t.prototype.totalTime.call(this,e,n),this._forcing=0,this):this._tTime},n.addLabel=function(t,e){return this.labels[t]=rl(this,e),this},n.removeLabel=function(t){return delete this.labels[t],this},n.addPause=function(t,e,n){var r=sc.delayedCall(0,e||ls,n);return r.data="isPause",this._hasPause=1,Ks(this,r,rl(this,t))},n.removePause=function(t){var e=this._first;for(t=rl(this,t);e;)e._start===t&&"isPause"===e.data&&js(e),e=e._next},n.killTweensOf=function(t,e,n){for(var r=this.getTweensOf(t,n),i=r.length;i--;)Xl!==r[i]&&r[i].kill(t,e);return this},n.getTweensOf=function(t,e){for(var n,r=[],i=hl(t),o=this._first,a=za(e);o;)o instanceof sc?Cs(o._targets,i)&&(a?(!Xl||o._initted&&o._ts)&&o.globalTime(0)<=e&&o.globalTime(o.totalDuration())>e:!e||o.isActive())&&r.push(o):(n=o.getTweensOf(i,e)).length&&r.push.apply(r,n),o=o._next;return r},n.tweenTo=function(t,e){e=e||{};var n,r=this,i=rl(r,t),o=e,a=o.startAt,s=o.onStart,l=o.onStartParams,c=o.immediateRender,u=sc.to(r,Ns({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:i,overwrite:"auto",duration:e.duration||Math.abs((i-(a&&"time"in a?a.time:r._time))/r.timeScale())||Na,onStart:function(){if(r.pause(),!n){var t=e.duration||Math.abs((i-(a&&"time"in a?a.time:r._time))/r.timeScale());u._dur!==t&&tl(u,t,0,1).render(u._time,!0,!0),n=1}s&&s.apply(u,l||[])}},e));return c?u.render(0):u},n.tweenFromTo=function(t,e,n){return this.tweenTo(e,Ns({startAt:{time:rl(this,t)}},n))},n.recent=function(){return this._recent},n.nextLabel=function(t){return void 0===t&&(t=this._time),_l(this,rl(this,t))},n.previousLabel=function(t){return void 0===t&&(t=this._time),_l(this,rl(this,t),1)},n.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+Na)},n.shiftChildren=function(t,e,n){void 0===n&&(n=0);for(var r,i=this._first,o=this.labels;i;)i._start>=n&&(i._start+=t,i._end+=t),i=i._next;if(e)for(r in o)o[r]>=n&&(o[r]+=t);return Ls(this)},n.invalidate=function(e){var n=this._first;for(this._lock=0;n;)n.invalidate(e),n=n._next;return t.prototype.invalidate.call(this,e)},n.clear=function(t){void 0===t&&(t=!0);for(var e,n=this._first;n;)e=n._next,this.remove(n),n=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Ls(this)},n.totalDuration=function(t){var e,n,r,i=0,o=this,a=o._last,s=Ma;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-t:t));if(o._dirty){for(r=o.parent;a;)e=a._prev,a._dirty&&a.totalDuration(),(n=a._start)>s&&o._sort&&a._ts&&!o._lock?(o._lock=1,Ks(o,a,n-a._delay,1)._lock=0):s=n,n<0&&a._ts&&(i-=n,(!r&&!o._dp||r&&r.smoothChildTiming)&&(o._start+=n/o._ts,o._time-=n,o._tTime-=n),o.shiftChildren(-n,!1,-Infinity),s=0),a._end>i&&a._ts&&(i=a._end),a=e;tl(o,o===_a&&o._time>i?o._time:i,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(t){if(_a._ts&&(As(_a,qs(t,_a)),Ta=Rl.frame),Rl.frame>=vs){vs+=Aa.autoSleep||120;var e=_a._first;if((!e||!e._ts)&&Aa.autoSleep&&Rl._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Rl.sleep()}}},e}(Kl);Ns(Zl.prototype,{_lock:0,_hasPause:0,_forcing:0});var Xl,Jl,Ql=function(t,e,n,r,i,o,a){var s,l,c,u,h,d,f,p,m=new _c(this._pt,t,e,0,1,mc,null,i),g=0,v=0;for(m.b=n,m.e=r,n+="",(f=~(r+="").indexOf("random("))&&(r=bl(r)),o&&(o(p=[n,r],t,e),n=p[0],r=p[1]),l=n.match(Ja)||[];s=Ja.exec(r);)u=s[0],h=r.substring(g,s.index),c?c=(c+1)%5:"rgba("===h.substr(-5)&&(c=1),u!==l[v++]&&(d=parseFloat(l[v-1])||0,m._pt={_next:m._pt,p:h||1===v?h:",",s:d,c:"="===u.charAt(1)?Ts(d,u)-d:parseFloat(u)-d,m:c&&c<4?Math.round:0},g=Ja.lastIndex);return m.c=g<r.length?r.substring(g,r.length):"",m.fp=a,(Qa.test(r)||f)&&(m.e=0),this._pt=m,m},tc=function(t,e,n,r,i,o,a,s,l,c){La(r)&&(r=r(i||0,t,o));var u,h=t[e],d="get"!==n?n:La(h)?l?t[e.indexOf("set")||!La(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():h,f=La(h)?l?uc:cc:lc;if(ja(r)&&(~r.indexOf("random(")&&(r=bl(r)),"="===r.charAt(1)&&((u=Ts(d,r)+(sl(d)||0))||0===u)&&(r=u)),!c||d!==r||Jl)return isNaN(d*r)||""===r?(!h&&!(e in t)&&os(e,r),Ql.call(this,t,e,d,r,f,s||Aa.stringFilter,l)):(u=new _c(this._pt,t,e,+d||0,r-(d||0),"boolean"==typeof h?pc:fc,0,f),l&&(u.fp=l),a&&u.modifier(a,this,t),this._pt=u)},ec=function(t,e,n,r,i,o){var a,s,l,c;if(ms[t]&&!1!==(a=new ms[t]).init(i,a.rawVars?e[t]:function(t,e,n,r,i){if(La(t)&&(t=ic(t,i,e,n,r)),!Ha(t)||t.style&&t.nodeType||$a(t)||Wa(t))return ja(t)?ic(t,i,e,n,r):t;var o,a={};for(o in t)a[o]=ic(t[o],i,e,n,r);return a}(e[t],r,i,o,n),n,r,o)&&(n._pt=s=new _c(n._pt,i,t,0,1,a.render,a,0,a.priority),n!==Ca))for(l=n._ptLookup[n._targets.indexOf(i)],c=a._props.length;c--;)l[a._props[c]]=s;return a},nc=function t(e,n,r){var i,o,a,s,l,c,u,h,d,f,p,m,g,v=e.vars,y=v.ease,b=v.startAt,w=v.immediateRender,_=v.lazy,D=v.onUpdate,S=v.runBackwards,x=v.yoyoEase,k=v.keyframes,T=v.autoRevert,C=e._dur,O=e._startAt,A=e._targets,E=e.parent,M=E&&"nested"===E.data?E.vars.targets:A,N="auto"===e._overwrite&&!ya,P=e.timeline;if(P&&(!k||!y)&&(y="none"),e._ease=Hl(y,Ea.ease),e._yEase=x?zl(Hl(!0===x?y:x,Ea.ease)):0,x&&e._yoyo&&!e._repeat&&(x=e._yEase,e._yEase=e._ease,e._ease=x),e._from=!P&&!!v.runBackwards,!P||k&&!v.stagger){if(m=(h=A[0]?_s(A[0]).harness:0)&&v[h.prop],i=Rs(v,ds),O&&(O._zTime<0&&O.progress(1),n<0&&S&&w&&!T?O.render(-1,!0):O.revert(S&&C?us:cs),O._lazy=0),b){if(js(e._startAt=sc.set(A,Ns({data:"isStart",overwrite:!1,parent:E,immediateRender:!0,lazy:!O&&Ua(_),startAt:null,delay:0,onUpdate:D&&function(){return Dl(e,"onUpdate")},stagger:0},b))),e._startAt._dp=0,e._startAt._sat=e,n<0&&(ba||!w&&!T)&&e._startAt.revert(us),w&&C&&n<=0&&r<=0)return void(n&&(e._zTime=n))}else if(S&&C&&!O)if(n&&(w=!1),a=Ns({overwrite:!1,data:"isFromStart",lazy:w&&!O&&Ua(_),immediateRender:w,stagger:0,parent:E},i),m&&(a[h.prop]=m),js(e._startAt=sc.set(A,a)),e._startAt._dp=0,e._startAt._sat=e,n<0&&(ba?e._startAt.revert(us):e._startAt.render(-1,!0)),e._zTime=n,w){if(!n)return}else t(e._startAt,Na,Na);for(e._pt=e._ptCache=0,_=C&&Ua(_)||_&&!C,o=0;o<A.length;o++){if(u=(l=A[o])._gsap||ws(A)[o]._gsap,e._ptLookup[o]=f={},ps[u.id]&&fs.length&&Os(),p=M===A?o:M.indexOf(l),h&&!1!==(d=new h).init(l,m||i,e,p,M)&&(e._pt=s=new _c(e._pt,l,d.name,0,1,d.render,d,0,d.priority),d._props.forEach((function(t){f[t]=s})),d.priority&&(c=1)),!h||m)for(a in i)ms[a]&&(d=ec(a,i,e,p,l,M))?d.priority&&(c=1):f[a]=s=tc.call(e,l,a,"get",i[a],p,M,0,v.stringFilter);e._op&&e._op[o]&&e.kill(l,e._op[o]),N&&e._pt&&(Xl=e,_a.killTweensOf(l,f,e.globalTime(n)),g=!e.parent,Xl=0),e._pt&&_&&(ps[u.id]=1)}c&&wc(e),e._onInit&&e._onInit(e)}e._onUpdate=D,e._initted=(!e._op||e._pt)&&!g,k&&n<=0&&P.render(Ma,!0,!0)},rc=function(t,e,n,r){var i,o,a=e.ease||r||"power1.inOut";if($a(e))o=n[t]||(n[t]=[]),e.forEach((function(t,n){return o.push({t:n/(e.length-1)*100,v:t,e:a})}));else for(i in e)o=n[i]||(n[i]=[]),"ease"===i||o.push({t:parseFloat(t),v:e[i],e:a})},ic=function(t,e,n,r,i){return La(t)?t.call(e,n,r,i):ja(t)&&~t.indexOf("random(")?bl(t):t},oc=bs+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",ac={};Ss(oc+",id,stagger,delay,duration,paused,scrollTrigger",(function(t){return ac[t]=1}));var sc=function(t){function e(e,n,r,i){var o;"number"==typeof n&&(r.duration=n,n=r,r=null);var a,s,l,c,u,h,d,f,p=(o=t.call(this,i?n:Bs(n))||this).vars,m=p.duration,g=p.delay,v=p.immediateRender,y=p.stagger,b=p.overwrite,w=p.keyframes,_=p.defaults,D=p.scrollTrigger,S=p.yoyoEase,x=n.parent||_a,k=($a(e)||Wa(e)?za(e[0]):"length"in n)?[e]:hl(e);if(o._targets=k.length?ws(k):as("GSAP target "+e+" not found. https://gsap.com",!Aa.nullTargetWarn)||[],o._ptLookup=[],o._overwrite=b,w||y||Ga(m)||Ga(g)){if(n=o.vars,(a=o.timeline=new Zl({data:"nested",defaults:_||{},targets:x&&"nested"===x.data?x.vars.targets:k})).kill(),a.parent=a._dp=ga(o),a._start=0,y||Ga(m)||Ga(g)){if(c=k.length,d=y&&pl(y),Ha(y))for(u in y)~oc.indexOf(u)&&(f||(f={}),f[u]=y[u]);for(s=0;s<c;s++)(l=Rs(n,ac)).stagger=0,S&&(l.yoyoEase=S),f&&Ps(l,f),h=k[s],l.duration=+ic(m,ga(o),s,h,k),l.delay=(+ic(g,ga(o),s,h,k)||0)-o._delay,!y&&1===c&&l.delay&&(o._delay=g=l.delay,o._start+=g,l.delay=0),a.to(h,l,d?d(s,h,k):0),a._ease=Il.none;a.duration()?m=g=0:o.timeline=0}else if(w){Bs(Ns(a.vars.defaults,{ease:"none"})),a._ease=Hl(w.ease||n.ease||"none");var T,C,O,A=0;if($a(w))w.forEach((function(t){return a.to(k,t,">")})),a.duration();else{for(u in l={},w)"ease"===u||"easeEach"===u||rc(u,w[u],l,w.easeEach);for(u in l)for(T=l[u].sort((function(t,e){return t.t-e.t})),A=0,s=0;s<T.length;s++)(O={ease:(C=T[s]).e,duration:(C.t-(s?T[s-1].t:0))/100*m})[u]=C.v,a.to(k,O,A),A+=O.duration;a.duration()<m&&a.to({},{duration:m-a.duration()})}}m||o.duration(m=a.duration())}else o.timeline=0;return!0!==b||ya||(Xl=ga(o),_a.killTweensOf(k),Xl=0),Ks(x,ga(o),r),n.reversed&&o.reverse(),n.paused&&o.paused(!0),(v||!m&&!w&&o._start===ks(x._time)&&Ua(v)&&Ys(ga(o))&&"nested"!==x.data)&&(o._tTime=-1e-8,o.render(Math.max(0,-g)||0)),D&&Zs(ga(o),D),o}va(e,t);var n=e.prototype;return n.render=function(t,e,n){var r,i,o,a,s,l,c,u,h,d=this._time,f=this._tDur,p=this._dur,m=t<0,g=t>f-Na&&!m?f:t<Na?0:t;if(p){if(g!==this._tTime||!t||n||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==m){if(r=g,u=this.timeline,this._repeat){if(a=p+this._rDelay,this._repeat<-1&&m)return this.totalTime(100*a+t,e,n);if(r=ks(g%a),g===f?(o=this._repeat,r=p):((o=~~(g/a))&&o===ks(g/a)&&(r=p,o--),r>p&&(r=p)),(l=this._yoyo&&1&o)&&(h=this._yEase,r=p-r),s=Us(this._tTime,a),r===d&&!n&&this._initted&&o===s)return this._tTime=g,this;o!==s&&(u&&this._yEase&&Yl(u,l),this.vars.repeatRefresh&&!l&&!this._lock&&this._time!==a&&this._initted&&(this._lock=n=1,this.render(ks(a*o),!0).invalidate()._lock=0))}if(!this._initted){if(Xs(this,m?t:r,n,e,g))return this._tTime=0,this;if(!(d===this._time||n&&this.vars.repeatRefresh&&o!==s))return this;if(p!==this._dur)return this.render(t,e,n)}if(this._tTime=g,this._time=r,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=c=(h||this._ease)(r/p),this._from&&(this.ratio=c=1-c),r&&!d&&!e&&!o&&(Dl(this,"onStart"),this._tTime!==g))return this;for(i=this._pt;i;)i.r(c,i.d),i=i._next;u&&u.render(t<0?t:u._dur*u._ease(r/this._dur),e,n)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(m&&zs(this,t,0,n),Dl(this,"onUpdate")),this._repeat&&o!==s&&this.vars.onRepeat&&!e&&this.parent&&Dl(this,"onRepeat"),g!==this._tDur&&g||this._tTime!==g||(m&&!this._onUpdate&&zs(this,t,0,!0),(t||!p)&&(g===this._tDur&&this._ts>0||!g&&this._ts<0)&&js(this,1),e||m&&!d||!(g||d||l)||(Dl(this,g===f?"onComplete":"onReverseComplete",!0),this._prom&&!(g<f&&this.timeScale()>0)&&this._prom()))}}else!function(t,e,n,r){var i,o,a,s=t.ratio,l=e<0||!e&&(!t._start&&Js(t)&&(t._initted||!Qs(t))||(t._ts<0||t._dp._ts<0)&&!Qs(t))?0:1,c=t._rDelay,u=0;if(c&&t._repeat&&(u=al(0,t._tDur,e),o=Us(u,c),t._yoyo&&1&o&&(l=1-l),o!==Us(t._tTime,c)&&(s=1-l,t.vars.repeatRefresh&&t._initted&&t.invalidate())),l!==s||ba||r||t._zTime===Na||!e&&t._zTime){if(!t._initted&&Xs(t,e,r,n,u))return;for(a=t._zTime,t._zTime=e||(n?Na:0),n||(n=e&&!a),t.ratio=l,t._from&&(l=1-l),t._time=0,t._tTime=u,i=t._pt;i;)i.r(l,i.d),i=i._next;e<0&&zs(t,e,0,!0),t._onUpdate&&!n&&Dl(t,"onUpdate"),u&&t._repeat&&!n&&t.parent&&Dl(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===l&&(l&&js(t,1),n||ba||(Dl(t,l?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,n);return this},n.targets=function(){return this._targets},n.invalidate=function(e){return(!e||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(e),t.prototype.invalidate.call(this,e)},n.resetTo=function(t,e,n,r,i){Oa||Rl.wake(),this._ts||this.play();var o=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||nc(this,o),function(t,e,n,r,i,o,a,s){var l,c,u,h,d=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!d)for(d=t._ptCache[e]=[],u=t._ptLookup,h=t._targets.length;h--;){if((l=u[h][e])&&l.d&&l.d._pt)for(l=l.d._pt;l&&l.p!==e&&l.fp!==e;)l=l._next;if(!l)return Jl=1,t.vars[e]="+=0",nc(t,a),Jl=0,s?as(e+" not eligible for reset"):1;d.push(l)}for(h=d.length;h--;)(l=(c=d[h])._pt||c).s=!r&&0!==r||i?l.s+(r||0)+o*l.c:r,l.c=n-l.s,c.e&&(c.e=xs(n)+sl(c.e)),c.b&&(c.b=l.s+sl(c.b))}(this,t,e,n,r,this._ease(o/this._dur),o,i)?this.resetTo(t,e,n,r,1):(Ws(this,0),this.parent||Is(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},n.kill=function(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?Sl(this):this;if(this.timeline){var n=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,Xl&&!0!==Xl.vars.overwrite)._first||Sl(this),this.parent&&n!==this.timeline.totalDuration()&&tl(this,this._dur*this.timeline._tDur/n,0,1),this}var r,i,o,a,s,l,c,u=this._targets,h=t?hl(t):u,d=this._ptLookup,f=this._pt;if((!e||"all"===e)&&function(t,e){for(var n=t.length,r=n===e.length;r&&n--&&t[n]===e[n];);return n<0}(u,h))return"all"===e&&(this._pt=0),Sl(this);for(r=this._op=this._op||[],"all"!==e&&(ja(e)&&(s={},Ss(e,(function(t){return s[t]=1})),e=s),e=function(t,e){var n,r,i,o,a=t[0]?_s(t[0]).harness:0,s=a&&a.aliases;if(!s)return e;for(r in n=Ps({},e),s)if(r in n)for(i=(o=s[r].split(",")).length;i--;)n[o[i]]=n[r];return n}(u,e)),c=u.length;c--;)if(~h.indexOf(u[c]))for(s in i=d[c],"all"===e?(r[c]=e,a=i,o={}):(o=r[c]=r[c]||{},a=e),a)(l=i&&i[s])&&("kill"in l.d&&!0!==l.d.kill(s)||Fs(this,l,"_pt"),delete i[s]),"all"!==o&&(o[s]=1);return this._initted&&!this._pt&&f&&Sl(this),this},e.to=function(t,n){return new e(t,n,arguments[2])},e.from=function(t,e){return il(1,arguments)},e.delayedCall=function(t,n,r,i){return new e(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:n,onReverseComplete:n,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},e.fromTo=function(t,e,n){return il(2,arguments)},e.set=function(t,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new e(t,n)},e.killTweensOf=function(t,e,n){return _a.killTweensOf(t,e,n)},e}(Kl);Ns(sc.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),Ss("staggerTo,staggerFrom,staggerFromTo",(function(t){sc[t]=function(){var e=new Zl,n=ll.call(arguments,0);return n.splice("staggerFromTo"===t?5:4,0,0),e[t].apply(e,n)}}));var lc=function(t,e,n){return t[e]=n},cc=function(t,e,n){return t[e](n)},uc=function(t,e,n,r){return t[e](r.fp,n)},hc=function(t,e,n){return t.setAttribute(e,n)},dc=function(t,e){return La(t[e])?cc:Ya(t[e])&&t.setAttribute?hc:lc},fc=function(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},pc=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},mc=function(t,e){var n=e._pt,r="";if(!t&&e.b)r=e.b;else if(1===t&&e.e)r=e.e;else{for(;n;)r=n.p+(n.m?n.m(n.s+n.c*t):Math.round(1e4*(n.s+n.c*t))/1e4)+r,n=n._next;r+=e.c}e.set(e.t,e.p,r,e)},gc=function(t,e){for(var n=e._pt;n;)n.r(t,n.d),n=n._next},vc=function(t,e,n,r){for(var i,o=this._pt;o;)i=o._next,o.p===r&&o.modifier(t,e,n),o=i},yc=function(t){for(var e,n,r=this._pt;r;)n=r._next,r.p===t&&!r.op||r.op===t?Fs(this,r,"_pt"):r.dep||(e=1),r=n;return!e},bc=function(t,e,n,r){r.mSet(t,e,r.m.call(r.tween,n,r.mt),r)},wc=function(t){for(var e,n,r,i,o=t._pt;o;){for(e=o._next,n=r;n&&n.pr>o.pr;)n=n._next;(o._prev=n?n._prev:i)?o._prev._next=o:r=o,(o._next=n)?n._prev=o:i=o,o=e}t._pt=r},_c=function(){function t(t,e,n,r,i,o,a,s,l){this.t=e,this.s=r,this.c=i,this.p=n,this.r=o||fc,this.d=a||this,this.set=s||lc,this.pr=l||0,this._next=t,t&&(t._prev=this)}return t.prototype.modifier=function(t,e,n){this.mSet=this.mSet||this.set,this.set=bc,this.m=t,this.mt=n,this.tween=e},t}();Ss(bs+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",(function(t){return ds[t]=1})),ns.TweenMax=ns.TweenLite=sc,ns.TimelineLite=ns.TimelineMax=Zl,_a=new Zl({sortChildren:!1,defaults:Ea,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),Aa.stringFilter=Vl;var Dc=[],Sc={},xc=[],kc=0,Tc=0,Cc=function(t){return(Sc[t]||xc).map((function(t){return t()}))},Oc=function(){var t=Date.now(),e=[];t-kc>2&&(Cc("matchMediaInit"),Dc.forEach((function(t){var n,r,i,o,a=t.queries,s=t.conditions;for(r in a)(n=Da.matchMedia(a[r]).matches)&&(i=1),n!==s[r]&&(s[r]=n,o=1);o&&(t.revert(),i&&e.push(t))})),Cc("matchMediaRevert"),e.forEach((function(t){return t.onMatch(t,(function(e){return t.add(null,e)}))})),kc=t,Cc("matchMedia"))},Ac=function(){function t(t,e){this.selector=e&&dl(e),this.data=[],this._r=[],this.isReverted=!1,this.id=Tc++,t&&this.add(t)}var e=t.prototype;return e.add=function(t,e,n){La(t)&&(n=e,e=t,t=La);var r=this,i=function(){var t,i=wa,o=r.selector;return i&&i!==r&&i.data.push(r),n&&(r.selector=dl(n)),wa=r,t=e.apply(r,arguments),La(t)&&r._r.push(t),wa=i,r.selector=o,r.isReverted=!1,t};return r.last=i,t===La?i(r,(function(t){return r.add(null,t)})):t?r[t]=i:i},e.ignore=function(t){var e=wa;wa=null,t(this),wa=e},e.getTweens=function(){var e=[];return this.data.forEach((function(n){return n instanceof t?e.push.apply(e,n.getTweens()):n instanceof sc&&!(n.parent&&"nested"===n.parent.data)&&e.push(n)})),e},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(t,e){var n=this;if(t?function(){for(var e,r=n.getTweens(),i=n.data.length;i--;)"isFlip"===(e=n.data[i]).data&&(e.revert(),e.getChildren(!0,!0,!1).forEach((function(t){return r.splice(r.indexOf(t),1)})));for(r.map((function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-1/0,t:t}})).sort((function(t,e){return e.g-t.g||-1/0})).forEach((function(e){return e.t.revert(t)})),i=n.data.length;i--;)(e=n.data[i])instanceof Zl?"nested"!==e.data&&(e.scrollTrigger&&e.scrollTrigger.revert(),e.kill()):!(e instanceof sc)&&e.revert&&e.revert(t);n._r.forEach((function(e){return e(t,n)})),n.isReverted=!0}():this.data.forEach((function(t){return t.kill&&t.kill()})),this.clear(),e)for(var r=Dc.length;r--;)Dc[r].id===this.id&&Dc.splice(r,1)},e.revert=function(t){this.kill(t||{})},t}(),Ec=function(){function t(t){this.contexts=[],this.scope=t,wa&&wa.data.push(this)}var e=t.prototype;return e.add=function(t,e,n){Ha(t)||(t={matches:t});var r,i,o,a=new Ac(0,n||this.scope),s=a.conditions={};for(i in wa&&!a.selector&&(a.selector=wa.selector),this.contexts.push(a),e=a.add("onMatch",e),a.queries=t,t)"all"===i?o=1:(r=Da.matchMedia(t[i]))&&(Dc.indexOf(a)<0&&Dc.push(a),(s[i]=r.matches)&&(o=1),r.addListener?r.addListener(Oc):r.addEventListener("change",Oc));return o&&e(a,(function(t){return a.add(null,t)})),this},e.revert=function(t){this.kill(t||{})},e.kill=function(t){this.contexts.forEach((function(e){return e.kill(t,!0)}))},t}(),Mc={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach((function(t){return kl(t)}))},timeline:function(t){return new Zl(t)},getTweensOf:function(t,e){return _a.getTweensOf(t,e)},getProperty:function(t,e,n,r){ja(t)&&(t=hl(t)[0]);var i=_s(t||{}).get,o=n?Ms:Es;return"native"===n&&(n=""),t?e?o((ms[e]&&ms[e].get||i)(t,e,n,r)):function(e,n,r){return o((ms[e]&&ms[e].get||i)(t,e,n,r))}:t},quickSetter:function(t,e,n){if((t=hl(t)).length>1){var r=t.map((function(t){return Vc.quickSetter(t,e,n)})),i=r.length;return function(t){for(var e=i;e--;)r[e](t)}}t=t[0]||{};var o=ms[e],a=_s(t),s=a.harness&&(a.harness.aliases||{})[e]||e,l=o?function(e){var r=new o;Ca._pt=0,r.init(t,n?e+n:e,Ca,0,[t]),r.render(1,r),Ca._pt&&gc(1,Ca)}:a.set(t,s);return o?l:function(e){return l(t,s,n?e+n:e,a,1)}},quickTo:function(t,e,n){var r,i=Vc.to(t,Ps(((r={})[e]="+=0.1",r.paused=!0,r),n||{})),o=function(t,n,r){return i.resetTo(e,t,n,r)};return o.tween=i,o},isTweening:function(t){return _a.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=Hl(t.ease,Ea.ease)),Vs(Ea,t||{})},config:function(t){return Vs(Aa,t||{})},registerEffect:function(t){var e=t.name,n=t.effect,r=t.plugins,i=t.defaults,o=t.extendTimeline;(r||"").split(",").forEach((function(t){return t&&!ms[t]&&!ns[t]&&as(e+" effect requires "+t+" plugin.")})),gs[e]=function(t,e,r){return n(hl(t),Ns(e||{},i),r)},o&&(Zl.prototype[e]=function(t,n,r){return this.add(gs[e](t,Ha(n)?n:(r=n)&&{},this),r)})},registerEase:function(t,e){Il[t]=Hl(e)},parseEase:function(t,e){return arguments.length?Hl(t,e):Il},getById:function(t){return _a.getById(t)},exportRoot:function(t,e){void 0===t&&(t={});var n,r,i=new Zl(t);for(i.smoothChildTiming=Ua(t.smoothChildTiming),_a.remove(i),i._dp=0,i._time=i._tTime=_a._time,n=_a._first;n;)r=n._next,!e&&!n._dur&&n instanceof sc&&n.vars.onComplete===n._targets[0]||Ks(i,n,n._start-n._delay),n=r;return Ks(_a,i,0),i},context:function(t,e){return t?new Ac(t,e):wa},matchMedia:function(t){return new Ec(t)},matchMediaRefresh:function(){return Dc.forEach((function(t){var e,n,r=t.conditions;for(n in r)r[n]&&(r[n]=!1,e=1);e&&t.revert()}))||Oc()},addEventListener:function(t,e){var n=Sc[t]||(Sc[t]=[]);~n.indexOf(e)||n.push(e)},removeEventListener:function(t,e){var n=Sc[t],r=n&&n.indexOf(e);r>=0&&n.splice(r,1)},utils:{wrap:function t(e,n,r){var i=n-e;return $a(e)?yl(e,t(0,e.length),n):ol(r,(function(t){return(i+(t-e)%i)%i+e}))},wrapYoyo:function t(e,n,r){var i=n-e,o=2*i;return $a(e)?yl(e,t(0,e.length-1),n):ol(r,(function(t){return e+((t=(o+(t-e)%o)%o||0)>i?o-t:t)}))},distribute:pl,random:vl,snap:gl,normalize:function(t,e,n){return wl(t,e,0,1,n)},getUnit:sl,clamp:function(t,e,n){return ol(n,(function(n){return al(t,e,n)}))},splitColor:Al,toArray:hl,selector:dl,mapRange:wl,pipe:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return e.reduce((function(t,e){return e(t)}),t)}},unitize:function(t,e){return function(n){return t(parseFloat(n))+(e||sl(n))}},interpolate:function t(e,n,r,i){var o=isNaN(e+n)?0:function(t){return(1-t)*e+t*n};if(!o){var a,s,l,c,u,h=ja(e),d={};if(!0===r&&(i=1)&&(r=null),h)e={p:e},n={p:n};else if($a(e)&&!$a(n)){for(l=[],c=e.length,u=c-2,s=1;s<c;s++)l.push(t(e[s-1],e[s]));c--,o=function(t){t*=c;var e=Math.min(u,~~t);return l[e](t-e)},r=n}else i||(e=Ps($a(e)?[]:{},e));if(!l){for(a in n)tc.call(d,e,a,"get",n[a]);o=function(t){return gc(t,d)||(h?e.p:e)}}}return ol(r,o)},shuffle:fl},install:is,effects:gs,ticker:Rl,updateRoot:Zl.updateRoot,plugins:ms,globalTimeline:_a,core:{PropTween:_c,globals:ss,Tween:sc,Timeline:Zl,Animation:Kl,getCache:_s,_removeLinkedListItem:Fs,reverting:function(){return ba},context:function(t){return t&&wa&&(wa.data.push(t),t._ctx=wa),wa},suppressOverwrites:function(t){return ya=t}}};Ss("to,from,fromTo,delayedCall,set,killTweensOf",(function(t){return Mc[t]=sc[t]})),Rl.add(Zl.updateRoot),Ca=Mc.to({},{duration:0});var Nc=function(t,e){for(var n=t._pt;n&&n.p!==e&&n.op!==e&&n.fp!==e;)n=n._next;return n},Pc=function(t,e){return{name:t,rawVars:1,init:function(t,n,r){r._onInit=function(t){var r,i;if(ja(n)&&(r={},Ss(n,(function(t){return r[t]=1})),n=r),e){for(i in r={},n)r[i]=e(n[i]);n=r}!function(t,e){var n,r,i,o=t._targets;for(n in e)for(r=o.length;r--;)(i=t._ptLookup[r][n])&&(i=i.d)&&(i._pt&&(i=Nc(i,n)),i&&i.modifier&&i.modifier(e[n],t,o[r],n))}(t,n)}}}},Vc=Mc.registerPlugin({name:"attr",init:function(t,e,n,r,i){var o,a,s;for(o in this.tween=n,e)s=t.getAttribute(o)||"",(a=this.add(t,"setAttribute",(s||0)+"",e[o],r,i,0,0,o)).op=o,a.b=s,this._props.push(o)},render:function(t,e){for(var n=e._pt;n;)ba?n.set(n.t,n.p,n.b,n):n.r(t,n.d),n=n._next}},{name:"endArray",init:function(t,e){for(var n=e.length;n--;)this.add(t,n,t[n]||0,e[n],0,0,0,0,0,1)}},Pc("roundProps",ml),Pc("modifiers"),Pc("snap",gl))||Mc;sc.version=Zl.version=Vc.version="3.12.5",ka=1,qa()&&Bl(),Il.Power0,Il.Power1,Il.Power2,Il.Power3,Il.Power4,Il.Linear,Il.Quad,Il.Cubic,Il.Quart,Il.Quint,Il.Strong,Il.Elastic,Il.Back,Il.SteppedEase,Il.Bounce,Il.Sine,Il.Expo,Il.Circ;
|
|
54
42
|
/*!
|
|
55
43
|
* CSSPlugin 3.12.5
|
|
56
44
|
* https://gsap.com
|
|
@@ -60,5 +48,5 @@ function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=i.create([0,1,2,
|
|
|
60
48
|
* Club GSAP members, the agreement issued with that membership.
|
|
61
49
|
* @author: Jack Doyle, jack@greensock.com
|
|
62
50
|
*/
|
|
63
|
-
var _win,_doc,_docElement,_pluginInitted,_tempDiv,_recentSetterPlugin,_reverting,_windowExists=function(){return"undefined"!=typeof window},_transformProps={},_RAD2DEG=180/Math.PI,_DEG2RAD=Math.PI/180,_atan2=Math.atan2,_bigNum=1e8,_capsExp=/([A-Z])/g,_horizontalExp=/(left|right|width|margin|padding|x)/i,_complexExp=/[\s,\(]\S/,_propertyAliases={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_renderCSSProp=function(e,t){return t.set(t.t,t.p,Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},_renderPropWithEnd=function(e,t){return t.set(t.t,t.p,1===e?t.e:Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},_renderCSSPropWithBeginning=function(e,t){return t.set(t.t,t.p,e?Math.round(1e4*(t.s+t.c*e))/1e4+t.u:t.b,t)},_renderRoundedCSSProp=function(e,t){var r=t.s+t.c*e;t.set(t.t,t.p,~~(r+(r<0?-.5:.5))+t.u,t)},_renderNonTweeningValue=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},_renderNonTweeningValueOnlyAtEnd=function(e,t){return t.set(t.t,t.p,1!==e?t.b:t.e,t)},_setterCSSStyle=function(e,t,r){return e.style[t]=r},_setterCSSProp=function(e,t,r){return e.style.setProperty(t,r)},_setterTransform=function(e,t,r){return e._gsap[t]=r},_setterScale=function(e,t,r){return e._gsap.scaleX=e._gsap.scaleY=r},_setterScaleWithRender=function(e,t,r,n,i){var o=e._gsap;o.scaleX=o.scaleY=r,o.renderTransform(i,o)},_setterTransformWithRender=function(e,t,r,n,i){var o=e._gsap;o[t]=r,o.renderTransform(i,o)},_transformProp="transform",_transformOriginProp=_transformProp+"Origin",_saveStyle=function e(t,r){var n=this,i=this.target,o=i.style,a=i._gsap;if(t in _transformProps&&o){if(this.tfm=this.tfm||{},"transform"===t)return _propertyAliases.transform.split(",").forEach((function(t){return e.call(n,t,r)}));if(~(t=_propertyAliases[t]||t).indexOf(",")?t.split(",").forEach((function(e){return n.tfm[e]=_get(i,e)})):this.tfm[t]=a.x?a[t]:_get(i,t),t===_transformOriginProp&&(this.tfm.zOrigin=a.zOrigin),this.props.indexOf(_transformProp)>=0)return;a.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(_transformOriginProp,r,"")),t=_transformProp}(o||r)&&this.props.push(t,r,o[t])},_removeIndependentTransforms=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},_revertStyle=function(){var e,t,r=this.props,n=this.target,i=n.style,o=n._gsap;for(e=0;e<r.length;e+=3)r[e+1]?n[r[e]]=r[e+2]:r[e+2]?i[r[e]]=r[e+2]:i.removeProperty("--"===r[e].substr(0,2)?r[e]:r[e].replace(_capsExp,"-$1").toLowerCase());if(this.tfm){for(t in this.tfm)o[t]=this.tfm[t];o.svg&&(o.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),(e=_reverting())&&e.isStart||i[_transformProp]||(_removeIndependentTransforms(i),o.zOrigin&&i[_transformOriginProp]&&(i[_transformOriginProp]+=" "+o.zOrigin+"px",o.zOrigin=0,o.renderTransform()),o.uncache=1)}},_getStyleSaver=function(e,t){var r={target:e,props:[],revert:_revertStyle,save:_saveStyle};return e._gsap||gsap.core.getCache(e),t&&t.split(",").forEach((function(e){return r.save(e)})),r},_supports3D,_createElement=function(e,t){var r=_doc.createElementNS?_doc.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):_doc.createElement(e);return r&&r.style?r:_doc.createElement(e)},_getComputedProperty=function e(t,r,n){var i=getComputedStyle(t);return i[r]||i.getPropertyValue(r.replace(_capsExp,"-$1").toLowerCase())||i.getPropertyValue(r)||!n&&e(t,_checkPropPrefix(r)||r,1)||""},_prefixes="O,Moz,ms,Ms,Webkit".split(","),_checkPropPrefix=function(e,t,r){var n=(t||_tempDiv).style,i=5;if(e in n&&!r)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);i--&&!(_prefixes[i]+e in n););return i<0?null:(3===i?"ms":i>=0?_prefixes[i]:"")+e},_initCore=function(){_windowExists()&&window.document&&(_win=window,_doc=_win.document,_docElement=_doc.documentElement,_tempDiv=_createElement("div")||{style:{}},_createElement("div"),_transformProp=_checkPropPrefix(_transformProp),_transformOriginProp=_transformProp+"Origin",_tempDiv.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",_supports3D=!!_checkPropPrefix("perspective"),_reverting=gsap.core.reverting,_pluginInitted=1)},_getBBoxHack=function e(t){var r,n=_createElement("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,o=this.nextSibling,a=this.style.cssText;if(_docElement.appendChild(n),n.appendChild(this),this.style.display="block",t)try{r=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=e}catch(e){}else this._gsapBBox&&(r=this._gsapBBox());return i&&(o?i.insertBefore(this,o):i.appendChild(this)),_docElement.removeChild(n),this.style.cssText=a,r},_getAttributeFallbacks=function(e,t){for(var r=t.length;r--;)if(e.hasAttribute(t[r]))return e.getAttribute(t[r])},_getBBox=function(e){var t;try{t=e.getBBox()}catch(r){t=_getBBoxHack.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===_getBBoxHack||(t=_getBBoxHack.call(e,!0)),!t||t.width||t.x||t.y?t:{x:+_getAttributeFallbacks(e,["x","cx","x1"])||0,y:+_getAttributeFallbacks(e,["y","cy","y1"])||0,width:0,height:0}},_isSVG=function(e){return!(!e.getCTM||e.parentNode&&!e.ownerSVGElement||!_getBBox(e))},_removeProperty=function(e,t){if(t){var r,n=e.style;t in _transformProps&&t!==_transformOriginProp&&(t=_transformProp),n.removeProperty?("ms"!==(r=t.substr(0,2))&&"webkit"!==t.substr(0,6)||(t="-"+t),n.removeProperty("--"===r?t:t.replace(_capsExp,"-$1").toLowerCase())):n.removeAttribute(t)}},_addNonTweeningPT=function(e,t,r,n,i,o){var a=new PropTween(e._pt,t,r,0,1,o?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue);return e._pt=a,a.b=n,a.e=i,e._props.push(r),a},_nonConvertibleUnits={deg:1,rad:1,turn:1},_nonStandardLayouts={grid:1,flex:1},_convertToUnit=function e(t,r,n,i){var o,a,s,l,c=parseFloat(n)||0,u=(n+"").trim().substr((c+"").length)||"px",h=_tempDiv.style,d=_horizontalExp.test(r),f="svg"===t.tagName.toLowerCase(),p=(f?"client":"offset")+(d?"Width":"Height"),m=100,g="px"===i,v="%"===i;if(i===u||!c||_nonConvertibleUnits[i]||_nonConvertibleUnits[u])return c;if("px"!==u&&!g&&(c=e(t,r,n,"px")),l=t.getCTM&&_isSVG(t),(v||"%"===u)&&(_transformProps[r]||~r.indexOf("adius")))return o=l?t.getBBox()[d?"width":"height"]:t[p],_round(v?c/o*m:c/100*o);if(h[d?"width":"height"]=m+(g?u:i),a=~r.indexOf("adius")||"em"===i&&t.appendChild&&!f?t:t.parentNode,l&&(a=(t.ownerSVGElement||{}).parentNode),a&&a!==_doc&&a.appendChild||(a=_doc.body),(s=a._gsap)&&v&&s.width&&d&&s.time===_ticker.time&&!s.uncache)return _round(c/s.width*m);if(!v||"height"!==r&&"width"!==r)(v||"%"===u)&&!_nonStandardLayouts[_getComputedProperty(a,"display")]&&(h.position=_getComputedProperty(t,"position")),a===t&&(h.position="static"),a.appendChild(_tempDiv),o=_tempDiv[p],a.removeChild(_tempDiv),h.position="absolute";else{var y=t.style[r];t.style[r]=m+i,o=t[p],y?t.style[r]=y:_removeProperty(t,r)}return d&&v&&((s=_getCache(a)).time=_ticker.time,s.width=a[p]),_round(g?o*c/m:o&&c?m/o*c:0)},_get=function(e,t,r,n){var i;return _pluginInitted||_initCore(),t in _propertyAliases&&"transform"!==t&&~(t=_propertyAliases[t]).indexOf(",")&&(t=t.split(",")[0]),_transformProps[t]&&"transform"!==t?(i=_parseTransform(e,n),i="transformOrigin"!==t?i[t]:i.svg?i.origin:_firstTwoOnly(_getComputedProperty(e,_transformOriginProp))+" "+i.zOrigin+"px"):(!(i=e.style[t])||"auto"===i||n||~(i+"").indexOf("calc("))&&(i=_specialProps[t]&&_specialProps[t](e,t,r)||_getComputedProperty(e,t)||_getProperty(e,t)||("opacity"===t?1:0)),r&&!~(i+"").trim().indexOf(" ")?_convertToUnit(e,t,i,r)+r:i},_tweenComplexCSSString=function(e,t,r,n){if(!r||"none"===r){var i=_checkPropPrefix(t,e,1),o=i&&_getComputedProperty(e,i,1);o&&o!==r?(t=i,r=o):"borderColor"===t&&(r=_getComputedProperty(e,"borderTopColor"))}var a,s,l,c,u,h,d,f,p,m,g,v=new PropTween(this._pt,e.style,t,0,1,_renderComplexString),y=0,_=0;if(v.b=r,v.e=n,r+="","auto"===(n+="")&&(h=e.style[t],e.style[t]=n,n=_getComputedProperty(e,t)||n,h?e.style[t]=h:_removeProperty(e,t)),_colorStringFilter(a=[r,n]),n=a[1],l=(r=a[0]).match(_numWithUnitExp)||[],(n.match(_numWithUnitExp)||[]).length){for(;s=_numWithUnitExp.exec(n);)d=s[0],p=n.substring(y,s.index),u?u=(u+1)%5:"rgba("!==p.substr(-5)&&"hsla("!==p.substr(-5)||(u=1),d!==(h=l[_++]||"")&&(c=parseFloat(h)||0,g=h.substr((c+"").length),"="===d.charAt(1)&&(d=_parseRelative(c,d)+g),f=parseFloat(d),m=d.substr((f+"").length),y=_numWithUnitExp.lastIndex-m.length,m||(m=m||_config.units[t]||g,y===n.length&&(n+=m,v.e+=m)),g!==m&&(c=_convertToUnit(e,t,h,m)||0),v._pt={_next:v._pt,p:p||1===_?p:",",s:c,c:f-c,m:u&&u<4||"zIndex"===t?Math.round:0});v.c=y<n.length?n.substring(y,n.length):""}else v.r="display"===t&&"none"===n?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue;return _relExp.test(n)&&(v.e=0),this._pt=v,v},_keywordToPercent={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},_convertKeywordsToPercentages=function(e){var t=e.split(" "),r=t[0],n=t[1]||"50%";return"top"!==r&&"bottom"!==r&&"left"!==n&&"right"!==n||(e=r,r=n,n=e),t[0]=_keywordToPercent[r]||r,t[1]=_keywordToPercent[n]||n,t.join(" ")},_renderClearProps=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var r,n,i,o=t.t,a=o.style,s=t.u,l=o._gsap;if("all"===s||!0===s)a.cssText="",n=1;else for(i=(s=s.split(",")).length;--i>-1;)r=s[i],_transformProps[r]&&(n=1,r="transformOrigin"===r?_transformOriginProp:_transformProp),_removeProperty(o,r);n&&(_removeProperty(o,_transformProp),l&&(l.svg&&o.removeAttribute("transform"),_parseTransform(o,1),l.uncache=1,_removeIndependentTransforms(a)))}},_specialProps={clearProps:function(e,t,r,n,i){if("isFromStart"!==i.data){var o=e._pt=new PropTween(e._pt,t,r,0,0,_renderClearProps);return o.u=n,o.pr=-10,o.tween=i,e._props.push(r),1}}},_identity2DMatrix=[1,0,0,1,0,0],_rotationalProperties={},_isNullTransform=function(e){return"matrix(1, 0, 0, 1, 0, 0)"===e||"none"===e||!e},_getComputedTransformMatrixAsArray=function(e){var t=_getComputedProperty(e,_transformProp);return _isNullTransform(t)?_identity2DMatrix:t.substr(7).match(_numExp).map(_round)},_getMatrix=function(e,t){var r,n,i,o,a=e._gsap||_getCache(e),s=e.style,l=_getComputedTransformMatrixAsArray(e);return a.svg&&e.getAttribute("transform")?"1,0,0,1,0,0"===(l=[(i=e.transform.baseVal.consolidate().matrix).a,i.b,i.c,i.d,i.e,i.f]).join(",")?_identity2DMatrix:l:(l!==_identity2DMatrix||e.offsetParent||e===_docElement||a.svg||(i=s.display,s.display="block",(r=e.parentNode)&&e.offsetParent||(o=1,n=e.nextElementSibling,_docElement.appendChild(e)),l=_getComputedTransformMatrixAsArray(e),i?s.display=i:_removeProperty(e,"display"),o&&(n?r.insertBefore(e,n):r?r.appendChild(e):_docElement.removeChild(e))),t&&l.length>6?[l[0],l[1],l[4],l[5],l[12],l[13]]:l)},_applySVGOrigin=function(e,t,r,n,i,o){var a,s,l,c=e._gsap,u=i||_getMatrix(e,!0),h=c.xOrigin||0,d=c.yOrigin||0,f=c.xOffset||0,p=c.yOffset||0,m=u[0],g=u[1],v=u[2],y=u[3],_=u[4],b=u[5],w=t.split(" "),D=parseFloat(w[0])||0,x=parseFloat(w[1])||0;r?u!==_identity2DMatrix&&(s=m*y-g*v)&&(l=D*(-g/s)+x*(m/s)-(m*b-g*_)/s,D=D*(y/s)+x*(-v/s)+(v*b-y*_)/s,x=l):(D=(a=_getBBox(e)).x+(~w[0].indexOf("%")?D/100*a.width:D),x=a.y+(~(w[1]||w[0]).indexOf("%")?x/100*a.height:x)),n||!1!==n&&c.smooth?(_=D-h,b=x-d,c.xOffset=f+(_*m+b*v)-_,c.yOffset=p+(_*g+b*y)-b):c.xOffset=c.yOffset=0,c.xOrigin=D,c.yOrigin=x,c.smooth=!!n,c.origin=t,c.originIsAbsolute=!!r,e.style[_transformOriginProp]="0px 0px",o&&(_addNonTweeningPT(o,c,"xOrigin",h,D),_addNonTweeningPT(o,c,"yOrigin",d,x),_addNonTweeningPT(o,c,"xOffset",f,c.xOffset),_addNonTweeningPT(o,c,"yOffset",p,c.yOffset)),e.setAttribute("data-svg-origin",D+" "+x)},_parseTransform=function(e,t){var r=e._gsap||new GSCache(e);if("x"in r&&!t&&!r.uncache)return r;var n,i,o,a,s,l,c,u,h,d,f,p,m,g,v,y,_,b,w,D,x,S,k,T,P,E,A,C,O,M,R,I,N=e.style,B=r.scaleX<0,F="px",j="deg",$=getComputedStyle(e),V=_getComputedProperty(e,_transformOriginProp)||"0";return n=i=o=l=c=u=h=d=f=0,a=s=1,r.svg=!(!e.getCTM||!_isSVG(e)),$.translate&&("none"===$.translate&&"none"===$.scale&&"none"===$.rotate||(N[_transformProp]=("none"!==$.translate?"translate3d("+($.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==$.rotate?"rotate("+$.rotate+") ":"")+("none"!==$.scale?"scale("+$.scale.split(" ").join(",")+") ":"")+("none"!==$[_transformProp]?$[_transformProp]:"")),N.scale=N.rotate=N.translate="none"),g=_getMatrix(e,r.svg),r.svg&&(r.uncache?(P=e.getBBox(),V=r.xOrigin-P.x+"px "+(r.yOrigin-P.y)+"px",T=""):T=!t&&e.getAttribute("data-svg-origin"),_applySVGOrigin(e,T||V,!!T||r.originIsAbsolute,!1!==r.smooth,g)),p=r.xOrigin||0,m=r.yOrigin||0,g!==_identity2DMatrix&&(b=g[0],w=g[1],D=g[2],x=g[3],n=S=g[4],i=k=g[5],6===g.length?(a=Math.sqrt(b*b+w*w),s=Math.sqrt(x*x+D*D),l=b||w?_atan2(w,b)*_RAD2DEG:0,(h=D||x?_atan2(D,x)*_RAD2DEG+l:0)&&(s*=Math.abs(Math.cos(h*_DEG2RAD))),r.svg&&(n-=p-(p*b+m*D),i-=m-(p*w+m*x))):(I=g[6],M=g[7],A=g[8],C=g[9],O=g[10],R=g[11],n=g[12],i=g[13],o=g[14],c=(v=_atan2(I,O))*_RAD2DEG,v&&(T=S*(y=Math.cos(-v))+A*(_=Math.sin(-v)),P=k*y+C*_,E=I*y+O*_,A=S*-_+A*y,C=k*-_+C*y,O=I*-_+O*y,R=M*-_+R*y,S=T,k=P,I=E),u=(v=_atan2(-D,O))*_RAD2DEG,v&&(y=Math.cos(-v),R=x*(_=Math.sin(-v))+R*y,b=T=b*y-A*_,w=P=w*y-C*_,D=E=D*y-O*_),l=(v=_atan2(w,b))*_RAD2DEG,v&&(T=b*(y=Math.cos(v))+w*(_=Math.sin(v)),P=S*y+k*_,w=w*y-b*_,k=k*y-S*_,b=T,S=P),c&&Math.abs(c)+Math.abs(l)>359.9&&(c=l=0,u=180-u),a=_round(Math.sqrt(b*b+w*w+D*D)),s=_round(Math.sqrt(k*k+I*I)),v=_atan2(S,k),h=Math.abs(v)>2e-4?v*_RAD2DEG:0,f=R?1/(R<0?-R:R):0),r.svg&&(T=e.getAttribute("transform"),r.forceCSS=e.setAttribute("transform","")||!_isNullTransform(_getComputedProperty(e,_transformProp)),T&&e.setAttribute("transform",T))),Math.abs(h)>90&&Math.abs(h)<270&&(B?(a*=-1,h+=l<=0?180:-180,l+=l<=0?180:-180):(s*=-1,h+=h<=0?180:-180)),t=t||r.uncache,r.x=n-((r.xPercent=n&&(!t&&r.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-n)?-50:0)))?e.offsetWidth*r.xPercent/100:0)+F,r.y=i-((r.yPercent=i&&(!t&&r.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-i)?-50:0)))?e.offsetHeight*r.yPercent/100:0)+F,r.z=o+F,r.scaleX=_round(a),r.scaleY=_round(s),r.rotation=_round(l)+j,r.rotationX=_round(c)+j,r.rotationY=_round(u)+j,r.skewX=h+j,r.skewY=d+j,r.transformPerspective=f+F,(r.zOrigin=parseFloat(V.split(" ")[2])||!t&&r.zOrigin||0)&&(N[_transformOriginProp]=_firstTwoOnly(V)),r.xOffset=r.yOffset=0,r.force3D=_config.force3D,r.renderTransform=r.svg?_renderSVGTransforms:_supports3D?_renderCSSTransforms:_renderNon3DTransforms,r.uncache=0,r},_firstTwoOnly=function(e){return(e=e.split(" "))[0]+" "+e[1]},_addPxTranslate=function(e,t,r){var n=getUnit(t);return _round(parseFloat(t)+parseFloat(_convertToUnit(e,"x",r+"px",n)))+n},_renderNon3DTransforms=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,_renderCSSTransforms(e,t)},_zeroDeg="0deg",_zeroPx="0px",_endParenthesis=") ",_renderCSSTransforms=function(e,t){var r=t||this,n=r.xPercent,i=r.yPercent,o=r.x,a=r.y,s=r.z,l=r.rotation,c=r.rotationY,u=r.rotationX,h=r.skewX,d=r.skewY,f=r.scaleX,p=r.scaleY,m=r.transformPerspective,g=r.force3D,v=r.target,y=r.zOrigin,_="",b="auto"===g&&e&&1!==e||!0===g;if(y&&(u!==_zeroDeg||c!==_zeroDeg)){var w,D=parseFloat(c)*_DEG2RAD,x=Math.sin(D),S=Math.cos(D);D=parseFloat(u)*_DEG2RAD,w=Math.cos(D),o=_addPxTranslate(v,o,x*w*-y),a=_addPxTranslate(v,a,-Math.sin(D)*-y),s=_addPxTranslate(v,s,S*w*-y+y)}m!==_zeroPx&&(_+="perspective("+m+_endParenthesis),(n||i)&&(_+="translate("+n+"%, "+i+"%) "),(b||o!==_zeroPx||a!==_zeroPx||s!==_zeroPx)&&(_+=s!==_zeroPx||b?"translate3d("+o+", "+a+", "+s+") ":"translate("+o+", "+a+_endParenthesis),l!==_zeroDeg&&(_+="rotate("+l+_endParenthesis),c!==_zeroDeg&&(_+="rotateY("+c+_endParenthesis),u!==_zeroDeg&&(_+="rotateX("+u+_endParenthesis),h===_zeroDeg&&d===_zeroDeg||(_+="skew("+h+", "+d+_endParenthesis),1===f&&1===p||(_+="scale("+f+", "+p+_endParenthesis),v.style[_transformProp]=_||"translate(0, 0)"},_renderSVGTransforms=function(e,t){var r,n,i,o,a,s=t||this,l=s.xPercent,c=s.yPercent,u=s.x,h=s.y,d=s.rotation,f=s.skewX,p=s.skewY,m=s.scaleX,g=s.scaleY,v=s.target,y=s.xOrigin,_=s.yOrigin,b=s.xOffset,w=s.yOffset,D=s.forceCSS,x=parseFloat(u),S=parseFloat(h);d=parseFloat(d),f=parseFloat(f),(p=parseFloat(p))&&(f+=p=parseFloat(p),d+=p),d||f?(d*=_DEG2RAD,f*=_DEG2RAD,r=Math.cos(d)*m,n=Math.sin(d)*m,i=Math.sin(d-f)*-g,o=Math.cos(d-f)*g,f&&(p*=_DEG2RAD,a=Math.tan(f-p),i*=a=Math.sqrt(1+a*a),o*=a,p&&(a=Math.tan(p),r*=a=Math.sqrt(1+a*a),n*=a)),r=_round(r),n=_round(n),i=_round(i),o=_round(o)):(r=m,o=g,n=i=0),(x&&!~(u+"").indexOf("px")||S&&!~(h+"").indexOf("px"))&&(x=_convertToUnit(v,"x",u,"px"),S=_convertToUnit(v,"y",h,"px")),(y||_||b||w)&&(x=_round(x+y-(y*r+_*i)+b),S=_round(S+_-(y*n+_*o)+w)),(l||c)&&(a=v.getBBox(),x=_round(x+l/100*a.width),S=_round(S+c/100*a.height)),a="matrix("+r+","+n+","+i+","+o+","+x+","+S+")",v.setAttribute("transform",a),D&&(v.style[_transformProp]=a)},_addRotationalPropTween=function(e,t,r,n,i){var o,a,s=360,l=_isString(i),c=parseFloat(i)*(l&&~i.indexOf("rad")?_RAD2DEG:1)-n,u=n+c+"deg";return l&&("short"===(o=i.split("_")[1])&&(c%=s)!==c%180&&(c+=c<0?s:-360),"cw"===o&&c<0?c=(c+s*_bigNum)%s-~~(c/s)*s:"ccw"===o&&c>0&&(c=(c-s*_bigNum)%s-~~(c/s)*s)),e._pt=a=new PropTween(e._pt,t,r,n,c,_renderPropWithEnd),a.e=u,a.u="deg",e._props.push(r),a},_assign=function(e,t){for(var r in t)e[r]=t[r];return e},_addRawTransformPTs=function(e,t,r){var n,i,o,a,s,l,c,u=_assign({},r._gsap),h=r.style;for(i in u.svg?(o=r.getAttribute("transform"),r.setAttribute("transform",""),h[_transformProp]=t,n=_parseTransform(r,1),_removeProperty(r,_transformProp),r.setAttribute("transform",o)):(o=getComputedStyle(r)[_transformProp],h[_transformProp]=t,n=_parseTransform(r,1),h[_transformProp]=o),_transformProps)(o=u[i])!==(a=n[i])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(i)<0&&(s=getUnit(o)!==(c=getUnit(a))?_convertToUnit(r,i,o,c):parseFloat(o),l=parseFloat(a),e._pt=new PropTween(e._pt,n,i,s,l-s,_renderCSSProp),e._pt.u=c||0,e._props.push(i));_assign(n,u)};_forEachName("padding,margin,Width,Radius",(function(e,t){var r="Top",n="Right",i="Bottom",o="Left",a=(t<3?[r,n,i,o]:[r+o,r+n,i+n,i+o]).map((function(r){return t<2?e+r:"border"+r+e}));_specialProps[t>1?"border"+e:e]=function(e,t,r,n,i){var o,s;if(arguments.length<4)return o=a.map((function(t){return _get(e,t,r)})),5===(s=o.join(" ")).split(o[0]).length?o[0]:s;o=(n+"").split(" "),s={},a.forEach((function(e,t){return s[e]=o[t]=o[t]||o[(t-1)/2|0]})),e.init(t,s,i)}}));var CSSPlugin={name:"css",register:_initCore,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,r,n,i){var o,a,s,l,c,u,h,d,f,p,m,g,v,y,_,b,w=this._props,D=e.style,x=r.vars.startAt;for(h in _pluginInitted||_initCore(),this.styles=this.styles||_getStyleSaver(e),b=this.styles.props,this.tween=r,t)if("autoRound"!==h&&(a=t[h],!_plugins[h]||!_checkPlugin(h,t,r,n,e,i)))if(c=typeof a,u=_specialProps[h],"function"===c&&(c=typeof(a=a.call(r,n,e,i))),"string"===c&&~a.indexOf("random(")&&(a=_replaceRandom(a)),u)u(this,e,h,a,r)&&(_=1);else if("--"===h.substr(0,2))o=(getComputedStyle(e).getPropertyValue(h)+"").trim(),a+="",_colorExp.lastIndex=0,_colorExp.test(o)||(d=getUnit(o),f=getUnit(a)),f?d!==f&&(o=_convertToUnit(e,h,o,f)+f):d&&(a+=d),this.add(D,"setProperty",o,a,n,i,0,0,h),w.push(h),b.push(h,0,D[h]);else if("undefined"!==c){if(x&&h in x?(o="function"==typeof x[h]?x[h].call(r,n,e,i):x[h],_isString(o)&&~o.indexOf("random(")&&(o=_replaceRandom(o)),getUnit(o+"")||"auto"===o||(o+=_config.units[h]||getUnit(_get(e,h))||""),"="===(o+"").charAt(1)&&(o=_get(e,h))):o=_get(e,h),l=parseFloat(o),(p="string"===c&&"="===a.charAt(1)&&a.substr(0,2))&&(a=a.substr(2)),s=parseFloat(a),h in _propertyAliases&&("autoAlpha"===h&&(1===l&&"hidden"===_get(e,"visibility")&&s&&(l=0),b.push("visibility",0,D.visibility),_addNonTweeningPT(this,D,"visibility",l?"inherit":"hidden",s?"inherit":"hidden",!s)),"scale"!==h&&"transform"!==h&&~(h=_propertyAliases[h]).indexOf(",")&&(h=h.split(",")[0])),m=h in _transformProps)if(this.styles.save(h),g||((v=e._gsap).renderTransform&&!t.parseTransform||_parseTransform(e,t.parseTransform),y=!1!==t.smoothOrigin&&v.smooth,(g=this._pt=new PropTween(this._pt,D,_transformProp,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===h)this._pt=new PropTween(this._pt,v,"scaleY",v.scaleY,(p?_parseRelative(v.scaleY,p+s):s)-v.scaleY||0,_renderCSSProp),this._pt.u=0,w.push("scaleY",h),h+="X";else{if("transformOrigin"===h){b.push(_transformOriginProp,0,D[_transformOriginProp]),a=_convertKeywordsToPercentages(a),v.svg?_applySVGOrigin(e,a,0,y,0,this):((f=parseFloat(a.split(" ")[2])||0)!==v.zOrigin&&_addNonTweeningPT(this,v,"zOrigin",v.zOrigin,f),_addNonTweeningPT(this,D,h,_firstTwoOnly(o),_firstTwoOnly(a)));continue}if("svgOrigin"===h){_applySVGOrigin(e,a,1,y,0,this);continue}if(h in _rotationalProperties){_addRotationalPropTween(this,v,h,l,p?_parseRelative(l,p+a):a);continue}if("smoothOrigin"===h){_addNonTweeningPT(this,v,"smooth",v.smooth,a);continue}if("force3D"===h){v[h]=a;continue}if("transform"===h){_addRawTransformPTs(this,a,e);continue}}else h in D||(h=_checkPropPrefix(h)||h);if(m||(s||0===s)&&(l||0===l)&&!_complexExp.test(a)&&h in D)s||(s=0),(d=(o+"").substr((l+"").length))!==(f=getUnit(a)||(h in _config.units?_config.units[h]:d))&&(l=_convertToUnit(e,h,o,f)),this._pt=new PropTween(this._pt,m?v:D,h,l,(p?_parseRelative(l,p+s):s)-l,m||"px"!==f&&"zIndex"!==h||!1===t.autoRound?_renderCSSProp:_renderRoundedCSSProp),this._pt.u=f||0,d!==f&&"%"!==f&&(this._pt.b=o,this._pt.r=_renderCSSPropWithBeginning);else if(h in D)_tweenComplexCSSString.call(this,e,h,o,p?p+a:a);else if(h in e)this.add(e,h,o||e[h],p?p+a:a,n,i);else if("parseTransform"!==h){_missingPlugin(h,a);continue}m||(h in D?b.push(h,0,D[h]):b.push(h,1,o||e[h])),w.push(h)}_&&_sortPropTweensByPriority(this)},render:function(e,t){if(t.tween._time||!_reverting())for(var r=t._pt;r;)r.r(e,r.d),r=r._next;else t.styles.revert()},get:_get,aliases:_propertyAliases,getSetter:function(e,t,r){var n=_propertyAliases[t];return n&&n.indexOf(",")<0&&(t=n),t in _transformProps&&t!==_transformOriginProp&&(e._gsap.x||_get(e,"x"))?r&&_recentSetterPlugin===r?"scale"===t?_setterScale:_setterTransform:(_recentSetterPlugin=r||{})&&("scale"===t?_setterScaleWithRender:_setterTransformWithRender):e.style&&!_isUndefined(e.style[t])?_setterCSSStyle:~t.indexOf("-")?_setterCSSProp:_getSetter(e,t)},core:{_removeProperty:_removeProperty,_getMatrix:_getMatrix}},positionAndScale,rotation,all;gsap.utils.checkPrefix=_checkPropPrefix,gsap.core.getStyleSaver=_getStyleSaver,positionAndScale="x,y,z,scale,scaleX,scaleY,xPercent,yPercent",rotation="rotation,rotationX,rotationY,skewX,skewY",all=_forEachName(positionAndScale+","+rotation+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(e){_transformProps[e]=1})),_forEachName(rotation,(function(e){_config.units[e]="deg",_rotationalProperties[e]=1})),_propertyAliases[all[13]]=positionAndScale+","+rotation,_forEachName("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(e){var t=e.split(":");_propertyAliases[t[1]]=all[t[0]]})),_forEachName("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(e){_config.units[e]="px"})),gsap.registerPlugin(CSSPlugin);var gsapWithCSS=gsap.registerPlugin(CSSPlugin)||gsap;gsapWithCSS.core.Tween;var GoAnimation=function(){function e(){this.startPoisiton={x:0,y:0},this.endPoisiton={x:1920,y:0},this.curtain={width:1920,height:1080},this.totalTime=5,this.timeLine=gsapWithCSS.timeline()}return e.getInstance=function(){return this.instance||(this.instance=new e),this.instance},e.prototype.init=function(e,t){var r;null===(r=this.timeLine)||void 0===r||r.clear();var n=t.curtain,i=t.totalTime,o=t.admissionMode;i&&(this.totalTime=i),this.setEndPoisiton(n);var a=this.filterData(e,o);this.goAnimationParams=t;for(var s=0;s<a.length;s++){var l=a[s];if(l instanceof Array)for(var c=0;c<l.length;c++){var u=this.totalTime/l.length,h=l[c],d=this._creatTl("#wrap"+h.cid);this._add(d,c*u)}else{u=this.totalTime/a.length,d=this._creatTl("#wrap"+l.cid);this._add(d,s*u)}}return this.timeLine},e.prototype.filterData=function(e,t){var r;if("left"==t)r=_$1.orderBy(e,["baseData.left"],["asc"]);else if("top"==t)r=_$1.orderBy(e,["baseData.top"],["asc"]);else if("topLeft"==t){var n=this.setSpacing(e,"left");r=_$1.orderBy(n,["spacing"],["asc"])}else if("topRight"==t){var i=this.setSpacing(e,"right");r=_$1.orderBy(i,["spacing"],["asc"])}else if("center"==t){var o=this.splitArrayForCenter(e,"left");r=[_$1.orderBy(o.true,["center.x"],["asc"]),_$1.orderBy(o.false,["center.x"],["desc"])]}else if("spaceBetween"==t){o=this.splitArrayForCenter(e,"left");r=[_$1.orderBy(o.true,["center.x"],["desc"]),_$1.orderBy(o.false,["center.x"],["asc"])]}else r=_$1.orderBy(e,["baseData.left"],["asc"]);return r},e.prototype.getSpacing=function(e,t){var r=e.x,n=e.y,i=t.x,o=t.y,a=Math.abs(r-i),s=Math.abs(n-o);return Math.sqrt(a*a+s*s)},e.prototype.creatPosition=function(e,t){var r=0,n=0;return e?("left"===t?(r=e.left,n=e.top):"right"===t&&(r=e.left+e.width,n=e.top),{x:r,y:n}):{x:r,y:n}},e.prototype.setEndPoisiton=function(e){if(e){var t=e.width,r=e.height;this.curtain=e,this.endPoisiton.x=t,this.endPoisiton.y=r}},e.prototype.setSpacing=function(e,t){var r,n=this;return"left"===t?r=this.startPoisiton:"right"===t&&(r=this.endPoisiton),e.forEach((function(e){var i=e.baseData;if(i){var o=n.creatPosition(i,t),a=n.getSpacing(o,r);e.spacing=a}})),e},e.prototype.setCenter=function(e){return e.forEach((function(e){if(e.baseData){var t=e.baseData.left+e.baseData.width/2,r=e.baseData.top+e.baseData.height/2;e.center={x:t,y:r}}})),e},e.prototype.splitArrayForCenter=function(e,t){var r,n=this,i=this.setCenter(e);return"left"!=t&&"right"!=t||(r=_$1.groupBy(i,(function(e){return e.center.x>=n.curtain.width/2}))),"top"!=t&&"bottom"!=t||(r=_$1.groupBy(i,(function(e){return e.center.y>=n.curtain.height/2}))),r},e.prototype._add=function(e,t){this.timeLine.add(e,t)},e.prototype._creatTl=function(e){var t=gsapWithCSS.timeline();return t.add(this._creatTw(e)),t},e.prototype._creatTw=function(e){var t=this.goAnimationParams.params,r=t.delay,n=t.duration,i=t.repeat,o=t.type,a=t.value;return a&&a.length&&a.forEach((function(e){e.delay=r||0,e.repeat=i||0})),gsapWithCSS[o](e,n,a[0],a[1])},e.prototype.in=function(){},e.prototype.out=function(){},e}(),index=GoAnimation.getInstance(),findItemDeep=function(e,t,r){var n=!1,i=function(e){for(var o=0;o<e.length;o++){if(e[o].cid==t){n=e[o],r&&_$1.remove(e,(function(e){return e.cid==t}));break}if(e[o].children)i(e[o].children);else if(e[o].dynamicChildren){if(e[o].dynamicChildren instanceof Map){for(var a=Array.from(e[o].dynamicChildren),s=0;s<a.length;s++)if(a[s]instanceof Array){var l=a[s][1];i(l)}}else if(e[o].dynamicChildren instanceof Array)for(a=e[o].dynamicChildren,s=0;s<a.length;s++)if(a[s]instanceof Array){l=a[s][1];i(l)}}else e[o].stateChildren&&i(e[o].stateChildren)}};return i(e),n||!1};function mitt(e,t){return e=e||new Map,__assign$1(__assign$1({},t),{EventType:e,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);if(n){var i=n.slice().map((function(e){return e(r)}));if(i&&1==i.length)return i[0]}(n=e.get("*"))&&n.slice().map((function(e){e(t,r)}))}})}var RuntimeServer=function(){function e(e){this.root=null,this.vuex=Go.getInstance().VueServer,this.eventType=new Map,(null==e?void 0:e.root)&&(this.root=e.root);var t={setGlobalVar:this.setGlobalVar.bind(this),showComponent:this._showComponent.bind(this),hideComponent:this._hideComponent.bind(this),pageChange:this.pageChange.bind(this),changeDynamicState:this.changeDynamicState.bind(this)};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.eventType.set(r,[t[r]])}return e.prototype.findComponentDownward=function(e,t){var r=e.$children;if(r.length)for(var n=0,i=r;n<i.length;n++){var o=i[n];o.$options&&o.$options.propsData&&o.$options.propsData.cid&&(t[o.$options.propsData.cid]=o),o.$children&&o.$children.length&&this.findComponentDownward(o,t)}return t},e.prototype.getAllComponents=function(){var e={};return this.findComponentDownward(this.root,e),e},e.prototype.getComponentByCid=function(e){try{var t=this.getAllComponents()[e];if(!t)throw new Error("The instance was not found");return t}catch(e){console.warn(e)}},e.prototype.getElementByCid=function(e){try{if(!e)throw new Error("Please input the parameters correctly");var t=this.getComponentByCid(e);if(!t)throw new Error("The element was not found");return t.$el}catch(e){console.warn(e)}},e.prototype.setGlobalVar=function(e){try{var t=e.key,r=e.value;if(!(e&&t&&r))throw new Error("An error occurred. Please check whether the incoming parameters are correct! The correct format of data is an object containing key and value");this.setVars(e)}catch(e){console.warn(e)}},e.prototype._showComponent=function(e){try{if(!e)throw new Error("Please input the parameters correctly");this.changeVis({cid:e,flag:!0})}catch(e){console.warn(e)}},e.prototype._hideComponent=function(e){try{if(!e)throw new Error("Please input the parameters correctly");this.changeVis({cid:e,flag:!1})}catch(e){console.warn(e)}},e.prototype.getList=function(e){return e&&"id"===e?this.vuex.callState("list").map((function(e){return e.cid})):this.vuex.callState("list")},e.prototype.getTheme=function(e){var t=this.vuex.callState("theme");return e&&e(t),t},e.prototype.getElement=function(e){var t=this.vuex.callState("list");return findItemDeep(t,e)},e.prototype.changeVis=function(e){return this.vuex.callMutation("changeShow",e)},e.prototype.comToggle=function(e){return this.vuex.callMutation("comToggle",e)},e.prototype.getPageInfo=function(e){var t=this.vuex.callState("caseInfo");return e&&e(t),(null==t?void 0:t.details)?t.details.map((function(e){return{name:e.caseDetailName,path:e.caseDetailPath,id:e.id}})):t},e.prototype.updateComp=function(e){return this.vuex.callMutation("updatComs",e)},e.prototype.changeDynamicState=function(e){return this.vuex.callMutation("changeDynamicState",e)},e.prototype.pageChange=function(e){return this.vuex.callMutation("setPageId",e)},e.prototype.pagePush=function(e,t,r){return void 0===r&&(r={}),this.vuex.callMutation("pagePush",{type:e,value:t,option:r})},e.prototype.activeState=function(e,t){return this.vuex.callMutation("setDynamicActive",{cid:e,name:t})},e.prototype.getVars=function(e){var t=Ae.getAllVariables();return e&&e(t),t},e.prototype.setVars=function(e){var t=Ae.getVariable(e.key);if(2!=(null==t?void 0:t.model))return this.vuex.callAction("goEditVar",e);console.warn("系统变量禁止修改!")},e}(),Run=function(e){function t(t){var r=e.call(this,t)||this,n=mitt(r.eventType);return r.$emit=n.emit,r.$on=n.on,r.$off=n.off,r}return __extends$2(t,e),Object.defineProperty(t.prototype,"Theme",{get:function(){return this.getTheme()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Components",{get:function(){return this.getAllComponents()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"GlobalVars",{get:function(){return this.getVars()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Pages",{get:function(){return this.getPageInfo()},enumerable:!1,configurable:!0}),t.prototype.getElementById=function(e){this.getElementByCid(e)},t.prototype.getComponentById=function(e){this.getComponentByCid(e)},t.prototype.getPage=function(){},t}(RuntimeServer),G=function(){function e(e){this.$action=new GoEvent(e),this.instance=new Run(e)}return e.prototype.getGlobalvars=function(){for(var e=Ae.getAllVariables(),t=e.map((function(e){return e.mapField})),r={},n=function(t){var n=e.find((function(e){return e.mapField==t}));n&&(r[t]=n.value)},i=0,o=t;i<o.length;i++){n(o[i])}var a=this.instance;return new Proxy(r,{has:function(e,t){return!t&&t in e},get:function(e,t){if(t in e)return e[t];throw new ReferenceError('Prop name "'+t+'" does not exist.')},set:function(e,t,r){if(!e[t])return console.log("变量不存在/不能被修改"),!1;if(e[t]=r,!t||"string"!=typeof t)throw new Error("Invalid key");a.setGlobalVar({key:t,value:r})}})},Object.defineProperty(e.prototype,"globalvars",{get:function(){return this.getGlobalvars()},enumerable:!1,configurable:!0}),e}(),GoEvent=function(e){var t=this;this.setGlobalVars=function(e,r){if(!e||"string"!=typeof e)throw new Error("Invalid key");t.instance.setGlobalVar({key:e,value:r})},this.skipTo=function(e){var r=null==e?void 0:e.params;if(!e||0===Object.keys(e).length)throw new Error("事件跳转发生错误:参数:".concat(e," 不正确,请正确填写!doc: https://anov.cucloud.cn/anov-go-doc/"));if(e.name)t.instance.pagePush("name",e.name,r);else if(e.path)t.instance.pagePush("path",e.path,r);else{if(!e.url)throw new Error("事件跳转发生错误:参数:".concat(e," 不正确,请正确填写!doc: https://anov.cucloud.cn/anov-go-doc/"));window.open(e.url)}},this.toggle=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e)if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance.comToggle(i):console.warn("请传入正确的参数!")}else console.warn("请传入正确的参数!");else t.instance.comToggle(e);else console.warn("请传入正确的参数!")},this.show=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e){if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance._showComponent(i.toString()):console.warn("请传入正确的参数!")}}else t.instance._showComponent(e.toString());else console.warn("请传入正确的参数!")},this.hide=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e){if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance._hideComponent(i):console.warn("请传入正确的参数!")}}else t.instance._hideComponent(e);else console.warn("请传入正确的参数!")},this.activeState=function(e,r){t.instance.activeState(e,r)},this.updateComp=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e){if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance.updateComp(i):console.warn("请传入正确的参数!")}}else t.instance.updateComp(e);else console.warn("请传入正确的参数!")},this.instance=new Run(e)},run=function(e){return new G(e)},getDataForRelease=function(e,t){console.log("弃用")},createComponent=function(e,t){return t&&e?Go.getInstance().render(e,t):e?Go.getInstance().render(e):void 0},createComponentForParent=function(e,t,r){return void 0!==r&&e?Go.getInstance().renderForParent(e,t,r):e?Go.getInstance().renderForParent(e,t):void 0},emitEvent=function(e,t){return Go.getInstance().emitEvent(e,t||function(){})},log=function(){};exports.Go=Go,exports.GoAnimation=index,exports.Tool=index$1,exports.createComponent=createComponent,exports.createComponentForParent=createComponentForParent,exports.emitEvent=emitEvent,exports.fxhr=index$2,exports.getDataForRelease=getDataForRelease,exports.goUtils=index$3,exports.log=log,exports.refreshData=refreshData,exports.run=run,exports.store=store}));
|
|
51
|
+
var Rc,Bc,Ic,Fc,jc,Lc,zc,Yc,Hc={},Uc=180/Math.PI,qc=Math.PI/180,Gc=Math.atan2,Wc=/([A-Z])/g,$c=/(left|right|width|margin|padding|x)/i,Kc=/[\s,\(]\S/,Zc={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Xc=function(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},Jc=function(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},Qc=function(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)},tu=function(t,e){var n=e.s+e.c*t;e.set(e.t,e.p,~~(n+(n<0?-.5:.5))+e.u,e)},eu=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},nu=function(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)},ru=function(t,e,n){return t.style[e]=n},iu=function(t,e,n){return t.style.setProperty(e,n)},ou=function(t,e,n){return t._gsap[e]=n},au=function(t,e,n){return t._gsap.scaleX=t._gsap.scaleY=n},su=function(t,e,n,r,i){var o=t._gsap;o.scaleX=o.scaleY=n,o.renderTransform(i,o)},lu=function(t,e,n,r,i){var o=t._gsap;o[e]=n,o.renderTransform(i,o)},cu="transform",uu=cu+"Origin",hu=function t(e,n){var r=this,i=this.target,o=i.style,a=i._gsap;if(e in Hc&&o){if(this.tfm=this.tfm||{},"transform"===e)return Zc.transform.split(",").forEach((function(e){return t.call(r,e,n)}));if(~(e=Zc[e]||e).indexOf(",")?e.split(",").forEach((function(t){return r.tfm[t]=Au(i,t)})):this.tfm[e]=a.x?a[e]:Au(i,e),e===uu&&(this.tfm.zOrigin=a.zOrigin),this.props.indexOf(cu)>=0)return;a.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(uu,n,"")),e=cu}(o||n)&&this.props.push(e,n,o[e])},du=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},fu=function(){var t,e,n=this.props,r=this.target,i=r.style,o=r._gsap;for(t=0;t<n.length;t+=3)n[t+1]?r[n[t]]=n[t+2]:n[t+2]?i[n[t]]=n[t+2]:i.removeProperty("--"===n[t].substr(0,2)?n[t]:n[t].replace(Wc,"-$1").toLowerCase());if(this.tfm){for(e in this.tfm)o[e]=this.tfm[e];o.svg&&(o.renderTransform(),r.setAttribute("data-svg-origin",this.svgo||"")),(t=zc())&&t.isStart||i[cu]||(du(i),o.zOrigin&&i[uu]&&(i[uu]+=" "+o.zOrigin+"px",o.zOrigin=0,o.renderTransform()),o.uncache=1)}},pu=function(t,e){var n={target:t,props:[],revert:fu,save:hu};return t._gsap||Vc.core.getCache(t),e&&e.split(",").forEach((function(t){return n.save(t)})),n},mu=function(t,e){var n=Bc.createElementNS?Bc.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Bc.createElement(t);return n&&n.style?n:Bc.createElement(t)},gu=function t(e,n,r){var i=getComputedStyle(e);return i[n]||i.getPropertyValue(n.replace(Wc,"-$1").toLowerCase())||i.getPropertyValue(n)||!r&&t(e,yu(n)||n,1)||""},vu="O,Moz,ms,Ms,Webkit".split(","),yu=function(t,e,n){var r=(e||jc).style,i=5;if(t in r&&!n)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);i--&&!(vu[i]+t in r););return i<0?null:(3===i?"ms":i>=0?vu[i]:"")+t},bu=function(){"undefined"!=typeof window&&window.document&&(Rc=window,Bc=Rc.document,Ic=Bc.documentElement,jc=mu("div")||{style:{}},mu("div"),cu=yu(cu),uu=cu+"Origin",jc.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Yc=!!yu("perspective"),zc=Vc.core.reverting,Fc=1)},wu=function t(e){var n,r=mu("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,o=this.nextSibling,a=this.style.cssText;if(Ic.appendChild(r),r.appendChild(this),this.style.display="block",e)try{n=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=t}catch(t){}else this._gsapBBox&&(n=this._gsapBBox());return i&&(o?i.insertBefore(this,o):i.appendChild(this)),Ic.removeChild(r),this.style.cssText=a,n},_u=function(t,e){for(var n=e.length;n--;)if(t.hasAttribute(e[n]))return t.getAttribute(e[n])},Du=function(t){var e;try{e=t.getBBox()}catch(n){e=wu.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===wu||(e=wu.call(t,!0)),!e||e.width||e.x||e.y?e:{x:+_u(t,["x","cx","x1"])||0,y:+_u(t,["y","cy","y1"])||0,width:0,height:0}},Su=function(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!Du(t))},xu=function(t,e){if(e){var n,r=t.style;e in Hc&&e!==uu&&(e=cu),r.removeProperty?("ms"!==(n=e.substr(0,2))&&"webkit"!==e.substr(0,6)||(e="-"+e),r.removeProperty("--"===n?e:e.replace(Wc,"-$1").toLowerCase())):r.removeAttribute(e)}},ku=function(t,e,n,r,i,o){var a=new _c(t._pt,e,n,0,1,o?nu:eu);return t._pt=a,a.b=r,a.e=i,t._props.push(n),a},Tu={deg:1,rad:1,turn:1},Cu={grid:1,flex:1},Ou=function t(e,n,r,i){var o,a,s,l,c=parseFloat(r)||0,u=(r+"").trim().substr((c+"").length)||"px",h=jc.style,d=$c.test(n),f="svg"===e.tagName.toLowerCase(),p=(f?"client":"offset")+(d?"Width":"Height"),m=100,g="px"===i,v="%"===i;if(i===u||!c||Tu[i]||Tu[u])return c;if("px"!==u&&!g&&(c=t(e,n,r,"px")),l=e.getCTM&&Su(e),(v||"%"===u)&&(Hc[n]||~n.indexOf("adius")))return o=l?e.getBBox()[d?"width":"height"]:e[p],xs(v?c/o*m:c/100*o);if(h[d?"width":"height"]=m+(g?u:i),a=~n.indexOf("adius")||"em"===i&&e.appendChild&&!f?e:e.parentNode,l&&(a=(e.ownerSVGElement||{}).parentNode),a&&a!==Bc&&a.appendChild||(a=Bc.body),(s=a._gsap)&&v&&s.width&&d&&s.time===Rl.time&&!s.uncache)return xs(c/s.width*m);if(!v||"height"!==n&&"width"!==n)(v||"%"===u)&&!Cu[gu(a,"display")]&&(h.position=gu(e,"position")),a===e&&(h.position="static"),a.appendChild(jc),o=jc[p],a.removeChild(jc),h.position="absolute";else{var y=e.style[n];e.style[n]=m+i,o=e[p],y?e.style[n]=y:xu(e,n)}return d&&v&&((s=_s(a)).time=Rl.time,s.width=a[p]),xs(g?o*c/m:o&&c?m/o*c:0)},Au=function(t,e,n,r){var i;return Fc||bu(),e in Zc&&"transform"!==e&&~(e=Zc[e]).indexOf(",")&&(e=e.split(",")[0]),Hc[e]&&"transform"!==e?(i=zu(t,r),i="transformOrigin"!==e?i[e]:i.svg?i.origin:Yu(gu(t,uu))+" "+i.zOrigin+"px"):(!(i=t.style[e])||"auto"===i||r||~(i+"").indexOf("calc("))&&(i=Vu[e]&&Vu[e](t,e,n)||gu(t,e)||Ds(t,e)||("opacity"===e?1:0)),n&&!~(i+"").trim().indexOf(" ")?Ou(t,e,i,n)+n:i},Eu=function(t,e,n,r){if(!n||"none"===n){var i=yu(e,t,1),o=i&&gu(t,i,1);o&&o!==n?(e=i,n=o):"borderColor"===e&&(n=gu(t,"borderTopColor"))}var a,s,l,c,u,h,d,f,p,m,g,v=new _c(this._pt,t.style,e,0,1,mc),y=0,b=0;if(v.b=n,v.e=r,n+="","auto"===(r+="")&&(h=t.style[e],t.style[e]=r,r=gu(t,e)||r,h?t.style[e]=h:xu(t,e)),Vl(a=[n,r]),r=a[1],l=(n=a[0]).match(Xa)||[],(r.match(Xa)||[]).length){for(;s=Xa.exec(r);)d=s[0],p=r.substring(y,s.index),u?u=(u+1)%5:"rgba("!==p.substr(-5)&&"hsla("!==p.substr(-5)||(u=1),d!==(h=l[b++]||"")&&(c=parseFloat(h)||0,g=h.substr((c+"").length),"="===d.charAt(1)&&(d=Ts(c,d)+g),f=parseFloat(d),m=d.substr((f+"").length),y=Xa.lastIndex-m.length,m||(m=m||Aa.units[e]||g,y===r.length&&(r+=m,v.e+=m)),g!==m&&(c=Ou(t,e,h,m)||0),v._pt={_next:v._pt,p:p||1===b?p:",",s:c,c:f-c,m:u&&u<4||"zIndex"===e?Math.round:0});v.c=y<r.length?r.substring(y,r.length):""}else v.r="display"===e&&"none"===r?nu:eu;return Qa.test(r)&&(v.e=0),this._pt=v,v},Mu={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Nu=function(t){var e=t.split(" "),n=e[0],r=e[1]||"50%";return"top"!==n&&"bottom"!==n&&"left"!==r&&"right"!==r||(t=n,n=r,r=t),e[0]=Mu[n]||n,e[1]=Mu[r]||r,e.join(" ")},Pu=function(t,e){if(e.tween&&e.tween._time===e.tween._dur){var n,r,i,o=e.t,a=o.style,s=e.u,l=o._gsap;if("all"===s||!0===s)a.cssText="",r=1;else for(i=(s=s.split(",")).length;--i>-1;)n=s[i],Hc[n]&&(r=1,n="transformOrigin"===n?uu:cu),xu(o,n);r&&(xu(o,cu),l&&(l.svg&&o.removeAttribute("transform"),zu(o,1),l.uncache=1,du(a)))}},Vu={clearProps:function(t,e,n,r,i){if("isFromStart"!==i.data){var o=t._pt=new _c(t._pt,e,n,0,0,Pu);return o.u=r,o.pr=-10,o.tween=i,t._props.push(n),1}}},Ru=[1,0,0,1,0,0],Bu={},Iu=function(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t},Fu=function(t){var e=gu(t,cu);return Iu(e)?Ru:e.substr(7).match(Za).map(xs)},ju=function(t,e){var n,r,i,o,a=t._gsap||_s(t),s=t.style,l=Fu(t);return a.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(l=[(i=t.transform.baseVal.consolidate().matrix).a,i.b,i.c,i.d,i.e,i.f]).join(",")?Ru:l:(l!==Ru||t.offsetParent||t===Ic||a.svg||(i=s.display,s.display="block",(n=t.parentNode)&&t.offsetParent||(o=1,r=t.nextElementSibling,Ic.appendChild(t)),l=Fu(t),i?s.display=i:xu(t,"display"),o&&(r?n.insertBefore(t,r):n?n.appendChild(t):Ic.removeChild(t))),e&&l.length>6?[l[0],l[1],l[4],l[5],l[12],l[13]]:l)},Lu=function(t,e,n,r,i,o){var a,s,l,c=t._gsap,u=i||ju(t,!0),h=c.xOrigin||0,d=c.yOrigin||0,f=c.xOffset||0,p=c.yOffset||0,m=u[0],g=u[1],v=u[2],y=u[3],b=u[4],w=u[5],_=e.split(" "),D=parseFloat(_[0])||0,S=parseFloat(_[1])||0;n?u!==Ru&&(s=m*y-g*v)&&(l=D*(-g/s)+S*(m/s)-(m*w-g*b)/s,D=D*(y/s)+S*(-v/s)+(v*w-y*b)/s,S=l):(D=(a=Du(t)).x+(~_[0].indexOf("%")?D/100*a.width:D),S=a.y+(~(_[1]||_[0]).indexOf("%")?S/100*a.height:S)),r||!1!==r&&c.smooth?(b=D-h,w=S-d,c.xOffset=f+(b*m+w*v)-b,c.yOffset=p+(b*g+w*y)-w):c.xOffset=c.yOffset=0,c.xOrigin=D,c.yOrigin=S,c.smooth=!!r,c.origin=e,c.originIsAbsolute=!!n,t.style[uu]="0px 0px",o&&(ku(o,c,"xOrigin",h,D),ku(o,c,"yOrigin",d,S),ku(o,c,"xOffset",f,c.xOffset),ku(o,c,"yOffset",p,c.yOffset)),t.setAttribute("data-svg-origin",D+" "+S)},zu=function(t,e){var n=t._gsap||new $l(t);if("x"in n&&!e&&!n.uncache)return n;var r,i,o,a,s,l,c,u,h,d,f,p,m,g,v,y,b,w,_,D,S,x,k,T,C,O,A,E,M,N,P,V,R=t.style,B=n.scaleX<0,I="px",F="deg",j=getComputedStyle(t),L=gu(t,uu)||"0";return r=i=o=l=c=u=h=d=f=0,a=s=1,n.svg=!(!t.getCTM||!Su(t)),j.translate&&("none"===j.translate&&"none"===j.scale&&"none"===j.rotate||(R[cu]=("none"!==j.translate?"translate3d("+(j.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==j.rotate?"rotate("+j.rotate+") ":"")+("none"!==j.scale?"scale("+j.scale.split(" ").join(",")+") ":"")+("none"!==j[cu]?j[cu]:"")),R.scale=R.rotate=R.translate="none"),g=ju(t,n.svg),n.svg&&(n.uncache?(C=t.getBBox(),L=n.xOrigin-C.x+"px "+(n.yOrigin-C.y)+"px",T=""):T=!e&&t.getAttribute("data-svg-origin"),Lu(t,T||L,!!T||n.originIsAbsolute,!1!==n.smooth,g)),p=n.xOrigin||0,m=n.yOrigin||0,g!==Ru&&(w=g[0],_=g[1],D=g[2],S=g[3],r=x=g[4],i=k=g[5],6===g.length?(a=Math.sqrt(w*w+_*_),s=Math.sqrt(S*S+D*D),l=w||_?Gc(_,w)*Uc:0,(h=D||S?Gc(D,S)*Uc+l:0)&&(s*=Math.abs(Math.cos(h*qc))),n.svg&&(r-=p-(p*w+m*D),i-=m-(p*_+m*S))):(V=g[6],N=g[7],A=g[8],E=g[9],M=g[10],P=g[11],r=g[12],i=g[13],o=g[14],c=(v=Gc(V,M))*Uc,v&&(T=x*(y=Math.cos(-v))+A*(b=Math.sin(-v)),C=k*y+E*b,O=V*y+M*b,A=x*-b+A*y,E=k*-b+E*y,M=V*-b+M*y,P=N*-b+P*y,x=T,k=C,V=O),u=(v=Gc(-D,M))*Uc,v&&(y=Math.cos(-v),P=S*(b=Math.sin(-v))+P*y,w=T=w*y-A*b,_=C=_*y-E*b,D=O=D*y-M*b),l=(v=Gc(_,w))*Uc,v&&(T=w*(y=Math.cos(v))+_*(b=Math.sin(v)),C=x*y+k*b,_=_*y-w*b,k=k*y-x*b,w=T,x=C),c&&Math.abs(c)+Math.abs(l)>359.9&&(c=l=0,u=180-u),a=xs(Math.sqrt(w*w+_*_+D*D)),s=xs(Math.sqrt(k*k+V*V)),v=Gc(x,k),h=Math.abs(v)>2e-4?v*Uc:0,f=P?1/(P<0?-P:P):0),n.svg&&(T=t.getAttribute("transform"),n.forceCSS=t.setAttribute("transform","")||!Iu(gu(t,cu)),T&&t.setAttribute("transform",T))),Math.abs(h)>90&&Math.abs(h)<270&&(B?(a*=-1,h+=l<=0?180:-180,l+=l<=0?180:-180):(s*=-1,h+=h<=0?180:-180)),e=e||n.uncache,n.x=r-((n.xPercent=r&&(!e&&n.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-r)?-50:0)))?t.offsetWidth*n.xPercent/100:0)+I,n.y=i-((n.yPercent=i&&(!e&&n.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-i)?-50:0)))?t.offsetHeight*n.yPercent/100:0)+I,n.z=o+I,n.scaleX=xs(a),n.scaleY=xs(s),n.rotation=xs(l)+F,n.rotationX=xs(c)+F,n.rotationY=xs(u)+F,n.skewX=h+F,n.skewY=d+F,n.transformPerspective=f+I,(n.zOrigin=parseFloat(L.split(" ")[2])||!e&&n.zOrigin||0)&&(R[uu]=Yu(L)),n.xOffset=n.yOffset=0,n.force3D=Aa.force3D,n.renderTransform=n.svg?Ku:Yc?$u:Uu,n.uncache=0,n},Yu=function(t){return(t=t.split(" "))[0]+" "+t[1]},Hu=function(t,e,n){var r=sl(e);return xs(parseFloat(e)+parseFloat(Ou(t,"x",n+"px",r)))+r},Uu=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,$u(t,e)},qu="0deg",Gu="0px",Wu=") ",$u=function(t,e){var n=e||this,r=n.xPercent,i=n.yPercent,o=n.x,a=n.y,s=n.z,l=n.rotation,c=n.rotationY,u=n.rotationX,h=n.skewX,d=n.skewY,f=n.scaleX,p=n.scaleY,m=n.transformPerspective,g=n.force3D,v=n.target,y=n.zOrigin,b="",w="auto"===g&&t&&1!==t||!0===g;if(y&&(u!==qu||c!==qu)){var _,D=parseFloat(c)*qc,S=Math.sin(D),x=Math.cos(D);D=parseFloat(u)*qc,_=Math.cos(D),o=Hu(v,o,S*_*-y),a=Hu(v,a,-Math.sin(D)*-y),s=Hu(v,s,x*_*-y+y)}m!==Gu&&(b+="perspective("+m+Wu),(r||i)&&(b+="translate("+r+"%, "+i+"%) "),(w||o!==Gu||a!==Gu||s!==Gu)&&(b+=s!==Gu||w?"translate3d("+o+", "+a+", "+s+") ":"translate("+o+", "+a+Wu),l!==qu&&(b+="rotate("+l+Wu),c!==qu&&(b+="rotateY("+c+Wu),u!==qu&&(b+="rotateX("+u+Wu),h===qu&&d===qu||(b+="skew("+h+", "+d+Wu),1===f&&1===p||(b+="scale("+f+", "+p+Wu),v.style[cu]=b||"translate(0, 0)"},Ku=function(t,e){var n,r,i,o,a,s=e||this,l=s.xPercent,c=s.yPercent,u=s.x,h=s.y,d=s.rotation,f=s.skewX,p=s.skewY,m=s.scaleX,g=s.scaleY,v=s.target,y=s.xOrigin,b=s.yOrigin,w=s.xOffset,_=s.yOffset,D=s.forceCSS,S=parseFloat(u),x=parseFloat(h);d=parseFloat(d),f=parseFloat(f),(p=parseFloat(p))&&(f+=p=parseFloat(p),d+=p),d||f?(d*=qc,f*=qc,n=Math.cos(d)*m,r=Math.sin(d)*m,i=Math.sin(d-f)*-g,o=Math.cos(d-f)*g,f&&(p*=qc,a=Math.tan(f-p),i*=a=Math.sqrt(1+a*a),o*=a,p&&(a=Math.tan(p),n*=a=Math.sqrt(1+a*a),r*=a)),n=xs(n),r=xs(r),i=xs(i),o=xs(o)):(n=m,o=g,r=i=0),(S&&!~(u+"").indexOf("px")||x&&!~(h+"").indexOf("px"))&&(S=Ou(v,"x",u,"px"),x=Ou(v,"y",h,"px")),(y||b||w||_)&&(S=xs(S+y-(y*n+b*i)+w),x=xs(x+b-(y*r+b*o)+_)),(l||c)&&(a=v.getBBox(),S=xs(S+l/100*a.width),x=xs(x+c/100*a.height)),a="matrix("+n+","+r+","+i+","+o+","+S+","+x+")",v.setAttribute("transform",a),D&&(v.style[cu]=a)},Zu=function(t,e,n,r,i){var o,a,s=360,l=ja(i),c=parseFloat(i)*(l&&~i.indexOf("rad")?Uc:1)-r,u=r+c+"deg";return l&&("short"===(o=i.split("_")[1])&&(c%=s)!==c%180&&(c+=c<0?s:-360),"cw"===o&&c<0?c=(c+36e9)%s-~~(c/s)*s:"ccw"===o&&c>0&&(c=(c-36e9)%s-~~(c/s)*s)),t._pt=a=new _c(t._pt,e,n,r,c,Jc),a.e=u,a.u="deg",t._props.push(n),a},Xu=function(t,e){for(var n in e)t[n]=e[n];return t},Ju=function(t,e,n){var r,i,o,a,s,l,c,u=Xu({},n._gsap),h=n.style;for(i in u.svg?(o=n.getAttribute("transform"),n.setAttribute("transform",""),h[cu]=e,r=zu(n,1),xu(n,cu),n.setAttribute("transform",o)):(o=getComputedStyle(n)[cu],h[cu]=e,r=zu(n,1),h[cu]=o),Hc)(o=u[i])!==(a=r[i])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(i)<0&&(s=sl(o)!==(c=sl(a))?Ou(n,i,o,c):parseFloat(o),l=parseFloat(a),t._pt=new _c(t._pt,r,i,s,l-s,Xc),t._pt.u=c||0,t._props.push(i));Xu(r,u)};Ss("padding,margin,Width,Radius",(function(t,e){var n="Top",r="Right",i="Bottom",o="Left",a=(e<3?[n,r,i,o]:[n+o,n+r,i+r,i+o]).map((function(n){return e<2?t+n:"border"+n+t}));Vu[e>1?"border"+t:t]=function(t,e,n,r,i){var o,s;if(arguments.length<4)return o=a.map((function(e){return Au(t,e,n)})),5===(s=o.join(" ")).split(o[0]).length?o[0]:s;o=(r+"").split(" "),s={},a.forEach((function(t,e){return s[t]=o[e]=o[e]||o[(e-1)/2|0]})),t.init(e,s,i)}}));var Qu,th,eh,nh={name:"css",register:bu,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,n,r,i){var o,a,s,l,c,u,h,d,f,p,m,g,v,y,b,w,_=this._props,D=t.style,S=n.vars.startAt;for(h in Fc||bu(),this.styles=this.styles||pu(t),w=this.styles.props,this.tween=n,e)if("autoRound"!==h&&(a=e[h],!ms[h]||!ec(h,e,n,r,t,i)))if(c=typeof a,u=Vu[h],"function"===c&&(c=typeof(a=a.call(n,r,t,i))),"string"===c&&~a.indexOf("random(")&&(a=bl(a)),u)u(this,t,h,a,n)&&(b=1);else if("--"===h.substr(0,2))o=(getComputedStyle(t).getPropertyValue(h)+"").trim(),a+="",Nl.lastIndex=0,Nl.test(o)||(d=sl(o),f=sl(a)),f?d!==f&&(o=Ou(t,h,o,f)+f):d&&(a+=d),this.add(D,"setProperty",o,a,r,i,0,0,h),_.push(h),w.push(h,0,D[h]);else if("undefined"!==c){if(S&&h in S?(o="function"==typeof S[h]?S[h].call(n,r,t,i):S[h],ja(o)&&~o.indexOf("random(")&&(o=bl(o)),sl(o+"")||"auto"===o||(o+=Aa.units[h]||sl(Au(t,h))||""),"="===(o+"").charAt(1)&&(o=Au(t,h))):o=Au(t,h),l=parseFloat(o),(p="string"===c&&"="===a.charAt(1)&&a.substr(0,2))&&(a=a.substr(2)),s=parseFloat(a),h in Zc&&("autoAlpha"===h&&(1===l&&"hidden"===Au(t,"visibility")&&s&&(l=0),w.push("visibility",0,D.visibility),ku(this,D,"visibility",l?"inherit":"hidden",s?"inherit":"hidden",!s)),"scale"!==h&&"transform"!==h&&~(h=Zc[h]).indexOf(",")&&(h=h.split(",")[0])),m=h in Hc)if(this.styles.save(h),g||((v=t._gsap).renderTransform&&!e.parseTransform||zu(t,e.parseTransform),y=!1!==e.smoothOrigin&&v.smooth,(g=this._pt=new _c(this._pt,D,cu,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===h)this._pt=new _c(this._pt,v,"scaleY",v.scaleY,(p?Ts(v.scaleY,p+s):s)-v.scaleY||0,Xc),this._pt.u=0,_.push("scaleY",h),h+="X";else{if("transformOrigin"===h){w.push(uu,0,D[uu]),a=Nu(a),v.svg?Lu(t,a,0,y,0,this):((f=parseFloat(a.split(" ")[2])||0)!==v.zOrigin&&ku(this,v,"zOrigin",v.zOrigin,f),ku(this,D,h,Yu(o),Yu(a)));continue}if("svgOrigin"===h){Lu(t,a,1,y,0,this);continue}if(h in Bu){Zu(this,v,h,l,p?Ts(l,p+a):a);continue}if("smoothOrigin"===h){ku(this,v,"smooth",v.smooth,a);continue}if("force3D"===h){v[h]=a;continue}if("transform"===h){Ju(this,a,t);continue}}else h in D||(h=yu(h)||h);if(m||(s||0===s)&&(l||0===l)&&!Kc.test(a)&&h in D)s||(s=0),(d=(o+"").substr((l+"").length))!==(f=sl(a)||(h in Aa.units?Aa.units[h]:d))&&(l=Ou(t,h,o,f)),this._pt=new _c(this._pt,m?v:D,h,l,(p?Ts(l,p+s):s)-l,m||"px"!==f&&"zIndex"!==h||!1===e.autoRound?Xc:tu),this._pt.u=f||0,d!==f&&"%"!==f&&(this._pt.b=o,this._pt.r=Qc);else if(h in D)Eu.call(this,t,h,o,p?p+a:a);else if(h in t)this.add(t,h,o||t[h],p?p+a:a,r,i);else if("parseTransform"!==h){os(h,a);continue}m||(h in D?w.push(h,0,D[h]):w.push(h,1,o||t[h])),_.push(h)}b&&wc(this)},render:function(t,e){if(e.tween._time||!zc())for(var n=e._pt;n;)n.r(t,n.d),n=n._next;else e.styles.revert()},get:Au,aliases:Zc,getSetter:function(t,e,n){var r=Zc[e];return r&&r.indexOf(",")<0&&(e=r),e in Hc&&e!==uu&&(t._gsap.x||Au(t,"x"))?n&&Lc===n?"scale"===e?au:ou:(Lc=n||{})&&("scale"===e?su:lu):t.style&&!Ya(t.style[e])?ru:~e.indexOf("-")?iu:dc(t,e)},core:{_removeProperty:xu,_getMatrix:ju}};Vc.utils.checkPrefix=yu,Vc.core.getStyleSaver=pu,eh=Ss((Qu="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(th="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(t){Hc[t]=1})),Ss(th,(function(t){Aa.units[t]="deg",Bu[t]=1})),Zc[eh[13]]=Qu+","+th,Ss("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(t){var e=t.split(":");Zc[e[1]]=eh[e[0]]})),Ss("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(t){Aa.units[t]="px"})),Vc.registerPlugin(nh);var rh=Vc.registerPlugin(nh)||Vc;rh.core.Tween;var ih=function(){function t(){this.startPoisiton={x:0,y:0},this.endPoisiton={x:1920,y:0},this.curtain={width:1920,height:1080},this.totalTime=5,this.timeLine=rh.timeline()}return t.getInstance=function(){return this.instance||(this.instance=new t),this.instance},t.prototype.init=function(t,e){var n;null===(n=this.timeLine)||void 0===n||n.clear();var r=e.curtain,i=e.totalTime,o=e.admissionMode;i&&(this.totalTime=i),this.setEndPoisiton(r);var a=this.filterData(t,o);this.goAnimationParams=e;for(var s=0;s<a.length;s++){var l=a[s];if(l instanceof Array)for(var c=0;c<l.length;c++){var u=this.totalTime/l.length,h=l[c],d=this._creatTl("#wrap"+h.cid);this._add(d,c*u)}else{u=this.totalTime/a.length,d=this._creatTl("#wrap"+l.cid);this._add(d,s*u)}}return this.timeLine},t.prototype.filterData=function(t,n){var r;if("left"==n)r=e.orderBy(t,["baseData.left"],["asc"]);else if("top"==n)r=e.orderBy(t,["baseData.top"],["asc"]);else if("topLeft"==n){var i=this.setSpacing(t,"left");r=e.orderBy(i,["spacing"],["asc"])}else if("topRight"==n){var o=this.setSpacing(t,"right");r=e.orderBy(o,["spacing"],["asc"])}else if("center"==n){var a=this.splitArrayForCenter(t,"left");r=[e.orderBy(a.true,["center.x"],["asc"]),e.orderBy(a.false,["center.x"],["desc"])]}else if("spaceBetween"==n){a=this.splitArrayForCenter(t,"left");r=[e.orderBy(a.true,["center.x"],["desc"]),e.orderBy(a.false,["center.x"],["asc"])]}else r=e.orderBy(t,["baseData.left"],["asc"]);return r},t.prototype.getSpacing=function(t,e){var n=t.x,r=t.y,i=e.x,o=e.y,a=Math.abs(n-i),s=Math.abs(r-o);return Math.sqrt(a*a+s*s)},t.prototype.creatPosition=function(t,e){var n=0,r=0;return t?("left"===e?(n=t.left,r=t.top):"right"===e&&(n=t.left+t.width,r=t.top),{x:n,y:r}):{x:n,y:r}},t.prototype.setEndPoisiton=function(t){if(t){var e=t.width,n=t.height;this.curtain=t,this.endPoisiton.x=e,this.endPoisiton.y=n}},t.prototype.setSpacing=function(t,e){var n,r=this;return"left"===e?n=this.startPoisiton:"right"===e&&(n=this.endPoisiton),t.forEach((function(t){var i=t.baseData;if(i){var o=r.creatPosition(i,e),a=r.getSpacing(o,n);t.spacing=a}})),t},t.prototype.setCenter=function(t){return t.forEach((function(t){if(t.baseData){var e=t.baseData.left+t.baseData.width/2,n=t.baseData.top+t.baseData.height/2;t.center={x:e,y:n}}})),t},t.prototype.splitArrayForCenter=function(t,n){var r,i=this,o=this.setCenter(t);return"left"!=n&&"right"!=n||(r=e.groupBy(o,(function(t){return t.center.x>=i.curtain.width/2}))),"top"!=n&&"bottom"!=n||(r=e.groupBy(o,(function(t){return t.center.y>=i.curtain.height/2}))),r},t.prototype._add=function(t,e){this.timeLine.add(t,e)},t.prototype._creatTl=function(t){var e=rh.timeline();return e.add(this._creatTw(t)),e},t.prototype._creatTw=function(t){var e=this.goAnimationParams.params,n=e.delay,r=e.duration,i=e.repeat,o=e.type,a=e.value;return a&&a.length&&a.forEach((function(t){t.delay=n||0,t.repeat=i||0})),rh[o](t,r,a[0],a[1])},t.prototype.in=function(){},t.prototype.out=function(){},t}(),oh=ih.getInstance();var ah=function(){function t(t){this.root=null,this.vuex=Eo.getInstance().VueServer,this.eventType=new Map,(null==t?void 0:t.root)&&(this.root=t.root);var e={setGlobalVar:this.setGlobalVar.bind(this),showComponent:this._showComponent.bind(this),hideComponent:this._hideComponent.bind(this),pageChange:this.pageChange.bind(this),changeDynamicState:this.changeDynamicState.bind(this)};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.eventType.set(n,[e[n]])}return t.prototype.findComponentDownward=function(t,e){var n=t.$children;if(n.length)for(var r=0,i=n;r<i.length;r++){var o=i[r];o.$options&&o.$options.propsData&&o.$options.propsData.cid&&(e[o.$options.propsData.cid]=o),o.$children&&o.$children.length&&this.findComponentDownward(o,e)}return e},t.prototype.getAllComponents=function(){var t={};return this.findComponentDownward(this.root,t),t},t.prototype.getComponentByCid=function(t){try{var e=this.getAllComponents()[t];if(!e)throw new Error("The instance was not found");return e}catch(t){console.warn(t)}},t.prototype.getElementByCid=function(t){try{if(!t)throw new Error("Please input the parameters correctly");var e=this.getComponentByCid(t);if(!e)throw new Error("The element was not found");return e.$el}catch(t){console.warn(t)}},t.prototype.setGlobalVar=function(t){try{var e=t.key,n=t.value;if(!(t&&e&&n))throw new Error("An error occurred. Please check whether the incoming parameters are correct! The correct format of data is an object containing key and value");this.setVars(t)}catch(t){console.warn(t)}},t.prototype._showComponent=function(t){try{if(!t)throw new Error("Please input the parameters correctly");this.changeVis({cid:t,flag:!0})}catch(t){console.warn(t)}},t.prototype._hideComponent=function(t){try{if(!t)throw new Error("Please input the parameters correctly");this.changeVis({cid:t,flag:!1})}catch(t){console.warn(t)}},t.prototype.getList=function(t){return t&&"id"===t?this.vuex.callState("list").map((function(t){return t.cid})):this.vuex.callState("list")},t.prototype.getTheme=function(t){var e=this.vuex.callState("theme");return t&&t(e),e},t.prototype.getElement=function(t){var n=function(t,n,r){var i=!1,o=function(t){for(var a=0;a<t.length;a++){if(t[a].cid==n){i=t[a],r&&e.remove(t,(function(t){return t.cid==n}));break}if(t[a].children)o(t[a].children);else if(t[a].dynamicChildren){if(t[a].dynamicChildren instanceof Map){for(var s=Array.from(t[a].dynamicChildren),l=0;l<s.length;l++)if(s[l]instanceof Array){var c=s[l][1];o(c)}}else if(t[a].dynamicChildren instanceof Array)for(s=t[a].dynamicChildren,l=0;l<s.length;l++)s[l]instanceof Array&&(c=s[l][1],o(c))}else t[a].stateChildren&&o(t[a].stateChildren)}};return o(t),i||!1}(this.vuex.callState("list"),t);return n},t.prototype.changeVis=function(t){return this.vuex.callMutation("changeShow",t)},t.prototype.comToggle=function(t){return this.vuex.callMutation("comToggle",t)},t.prototype.getPageInfo=function(t){var e=this.vuex.callState("caseInfo");return t&&t(e),(null==e?void 0:e.details)?e.details.map((function(t){return{name:t.caseDetailName,path:t.caseDetailPath,id:t.id}})):e},t.prototype.updateComp=function(t){return this.vuex.callMutation("updatComs",t)},t.prototype.changeDynamicState=function(t){return this.vuex.callMutation("changeDynamicState",t)},t.prototype.pageChange=function(t){return this.vuex.callMutation("setPageId",t)},t.prototype.pagePush=function(t,e,n){return void 0===n&&(n={}),this.vuex.callMutation("pagePush",{type:t,value:e,option:n})},t.prototype.activeState=function(t,e){return this.vuex.callMutation("setDynamicActive",{cid:t,name:e})},t.prototype.getVars=function(t){var e=pi.getAllVariables();return t&&t(e),e},t.prototype.setVars=function(t){var e=pi.getVariable(t.key);if(2!=(null==e?void 0:e.model))return this.vuex.callAction("goEditVar",t);console.warn("系统变量禁止修改!")},t}(),sh=function(t){function e(e){var n,r,i=t.call(this,e)||this,o=(n=(n=i.eventType)||new Map,u(u({},r),{EventType:n,on:function(t,e){var r=n.get(t);r?r.push(e):n.set(t,[e])},off:function(t,e){var r=n.get(t);r&&(e?r.splice(r.indexOf(e)>>>0,1):n.set(t,[]))},emit:function(t,e){var r=n.get(t);if(r){var i=r.slice().map((function(t){return t(e)}));if(i&&1==i.length)return i[0]}(r=n.get("*"))&&r.slice().map((function(n){n(t,e)}))}}));return i.$emit=o.emit,i.$on=o.on,i.$off=o.off,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e.prototype,"Theme",{get:function(){return this.getTheme()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Components",{get:function(){return this.getAllComponents()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"GlobalVars",{get:function(){return this.getVars()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Pages",{get:function(){return this.getPageInfo()},enumerable:!1,configurable:!0}),e.prototype.getElementById=function(t){this.getElementByCid(t)},e.prototype.getComponentById=function(t){this.getComponentByCid(t)},e.prototype.getPage=function(){},e}(ah),lh=function(){function t(t){this.$action=new ch(t),this.instance=new sh(t)}return t.prototype.getGlobalvars=function(){for(var t=pi.getAllVariables(),e=t.map((function(t){return t.mapField})),n={},r=function(e){var r=t.find((function(t){return t.mapField==e}));r&&(n[e]=r.value)},i=0,o=e;i<o.length;i++){r(o[i])}var a=this.instance;return new Proxy(n,{has:function(t,e){return!e&&e in t},get:function(t,e){if(e in t)return t[e];throw new ReferenceError('Prop name "'+e+'" does not exist.')},set:function(t,e,n){if(!t[e])return console.log("变量不存在/不能被修改"),!1;if(t[e]=n,!e||"string"!=typeof e)throw new Error("Invalid key");a.setGlobalVar({key:e,value:n})}})},Object.defineProperty(t.prototype,"globalvars",{get:function(){return this.getGlobalvars()},enumerable:!1,configurable:!0}),t}(),ch=function(t){var e=this;this.setGlobalVars=function(t,n){if(!t||"string"!=typeof t)throw new Error("Invalid key");e.instance.setGlobalVar({key:t,value:n})},this.skipTo=function(t){var n=null==t?void 0:t.params;if(!t||0===Object.keys(t).length)throw new Error("事件跳转发生错误:参数:".concat(t," 不正确,请正确填写!doc: https://anov.cucloud.cn/anov-go-doc/"));if(t.name)e.instance.pagePush("name",t.name,n);else if(t.path)e.instance.pagePush("path",t.path,n);else{if(!t.url)throw new Error("事件跳转发生错误:参数:".concat(t," 不正确,请正确填写!doc: https://anov.cucloud.cn/anov-go-doc/"));window.open(t.url)}},this.toggle=function(t){if(t)if("string"!=typeof t&&"number"!=typeof t)if(Array.isArray(t))for(var n=0,r=t;n<r.length;n++){var i=r[n];"string"==typeof i||"number"==typeof i?e.instance.comToggle(i):console.warn("请传入正确的参数!")}else console.warn("请传入正确的参数!");else e.instance.comToggle(t);else console.warn("请传入正确的参数!")},this.show=function(t){if(t)if("string"!=typeof t&&"number"!=typeof t){if(Array.isArray(t))for(var n=0,r=t;n<r.length;n++){var i=r[n];"string"==typeof i||"number"==typeof i?e.instance._showComponent(i.toString()):console.warn("请传入正确的参数!")}}else e.instance._showComponent(t.toString());else console.warn("请传入正确的参数!")},this.hide=function(t){if(t)if("string"!=typeof t&&"number"!=typeof t){if(Array.isArray(t))for(var n=0,r=t;n<r.length;n++){var i=r[n];"string"==typeof i||"number"==typeof i?e.instance._hideComponent(i):console.warn("请传入正确的参数!")}}else e.instance._hideComponent(t);else console.warn("请传入正确的参数!")},this.activeState=function(t,n){e.instance.activeState(t,n)},this.updateComp=function(t){if(t)if("string"!=typeof t&&"number"!=typeof t){if(Array.isArray(t))for(var n=0,r=t;n<r.length;n++){var i=r[n];"string"==typeof i||"number"==typeof i?e.instance.updateComp(i):console.warn("请传入正确的参数!")}}else e.instance.updateComp(t);else console.warn("请传入正确的参数!")},this.instance=new sh(t)};t.Go=Eo,t.GoAnimation=oh,t.Tool=ma,t.createComponent=function(t,e){return e&&t?Eo.getInstance().render(t,e):t?Eo.getInstance().render(t):void 0},t.createComponentForParent=function(t,e,n){return void 0!==n&&t?Eo.getInstance().renderForParent(t,e,n):t?Eo.getInstance().renderForParent(t,e):void 0},t.emitEvent=function(t,e){return Eo.getInstance().emitEvent(t,e||function(){})},t.fxhr=no,t.getDataForRelease=function(t,e){console.log("弃用")},t.goUtils=Hi,t.log=function(){},t.refreshData=eo,t.run=function(t){return new lh(t)},t.store=bo}));
|
|
64
52
|
//# sourceMappingURL=code.umd.js.map
|