pixel-react 1.20.51 → 1.20.53

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.
@@ -313,27 +313,7 @@ const Editor = forwardRef(({ width = '100%', height = '100%', VariableDropdownHe
313
313
  const editor = editorRef.current;
314
314
  const position = editor.getPosition();
315
315
  if (position) {
316
- const dollarSyntax = `{${option?.parentVariableType === 'STEPGROUP'
317
- ? 'SGV'
318
- : option.type === 'LOCAL'
319
- ? 'LV'
320
- : option.type === 'GLOBAL'
321
- ? 'GV'
322
- : option.type === 'GROUP'
323
- ? 'SGV'
324
- : [
325
- String(option?._id ?? ''),
326
- String(option?.id ?? ''),
327
- ].some((val) => val.includes('PARAMETER'))
328
- ? 'SGP'
329
- : option.type === '_startforloop'
330
- ? 'FLV_for:'
331
- : option.type === 'DATAPROVIDER'
332
- ? 'DPV'
333
- : 'PEV'}${option?.type === '_startforloop' ? '' : '_'}${option?.type === 'DATAPROVIDER'
334
- ? option?.dpName + ':' + option?.varname
335
- : option.name}}`;
336
- const textToInsert = `'$${dollarSyntax}'`;
316
+ const textToInsert = `'${option.name}'`;
337
317
  const currentPostion = varRef?.current ?? 0;
338
318
  editor.executeEdits('', [
339
319
  {
@@ -1 +1 @@
1
- {"version":3,"file":"Editor.js","sourceRoot":"","sources":["../../../src/components/Editor/Editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,MAAM,EACN,QAAQ,EACR,SAAS,EACT,UAAU,EACV,mBAAmB,GACpB,MAAM,OAAO,CAAC;AACf,OAAO,YAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,EAAE,IAAI,UAAU,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC;AAErE,OAAO,eAAe,CAAC;AACvB,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,MAAM,MAAM,GAAG,UAAU,CACvB,C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AC9B,WAAW,EAAE,uBAAuB,EACpC,gBAAgB,EAAE,oBAAoB,EACtC,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,oBAAoB,GAC5B,CACH,IACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Editor.js","sourceRoot":"","sources":["../../../src/components/Editor/Editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,MAAM,EACN,QAAQ,EACR,SAAS,EACT,UAAU,EACV,mBAAmB,GACpB,MAAM,OAAO,CAAC;AACf,OAAO,YAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,EAAE,IAAI,UAAU,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC;AAErE,OAAO,eAAe,CAAC;AACvB,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,MAAM,MAAM,GAAG,UAAU,CACvB,CACE,EACE,KAAK,GAAG,MAAM,EACd,MAAM,GAAG,MAAM,EACf,sBAAsB,GAAG,OAAO,EAChC,QAAQ,GAAG,KAAK,EAChB,KAAK,GAAG,EAAE,EACV,YAAY,EACZ,QAAQ,EACR,mBAAmB,GAAG,EAAE,EACxB,gBAAgB,GAAG,KAAK,EACxB,QAAQ,GAAG,MAAM,EACjB,KAAK,GAAG,OAAO,EACf,eAAe,GAAG,KAAK,EACvB,OAAO,EACP,oBAAoB,GAAG,IAAI,EAC3B,YAAY,EACZ,aAAa,GAAG,EAAE,EAClB,oBAAoB,GAAG,KAAK,EAC5B,WAAW,GAAG,IAAI,EAClB,OAAO,GAAG,KAAK,GAChB,EACD,GAAG,EACH,EAAE;IACF,MAAM,SAAS,GAAG,MAAM,CAAgC,IAAI,CAAC,CAAC;IAC9D,MAAM,cAAc,GAAG,MAAM,CAAW,EAAE,CAAC,CAAC;IAC5C,MAAM,MAAM,GAAG,MAAM,CAA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S,CAAC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;YAChD,CAAC;QACH,CAAC;KACF,CAAC,CAAC,CAAC;IAEJ,OAAO,CACL,eAAK,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,SAAS,EAAC,qBAAqB,aAC5D,KAAC,YAAY,IACX,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE;oBACP,OAAO,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;oBACjC,WAAW,EAAE,IAAI;oBACjB,QAAQ,EAAE,IAAI;oBACd,mBAAmB,EAAE,QAAQ;oBAC7B,oBAAoB,EAAE,KAAK;oBAC3B,QAAQ;oBACR,MAAM,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE;oBAC9B,GAAG,aAAa;iBACjB,EACD,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,EAC5D,KAAK,EAAE,KAAK,GACZ,EACD,YAAY,IAAI,gBAAgB,IAAI,oBAAoB,IAAI,CAC3D,KAAC,gBAAgB,IACf,QAAQ,EAAC,UAAU,EACnB,KAAK,EAAC,OAAO,EACb,MAAM,EAAE,sBAAsB,EAC9B,WAAW,EAAE,uBAAuB,EACpC,gBAAgB,EAAE,oBAAoB,EACtC,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,oBAAoB,GAC5B,CACH,IACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
package/lib/index.js CHANGED
@@ -33,7 +33,7 @@ object-assign
33
33
  * @version asn1 1.0.13 (2017-Jun-02)
34
34
  * @since jsrsasign 2.1
35
35
  * @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
36
- */var GL={};void 0!==GL.asn1&&GL.asn1||(GL.asn1={}),GL.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.substring(0,1))t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var n=t.substring(1).length;n%2==1?n+=1:t.match(/^[0-7]/)||(n+=2);for(var r="",i=0;i<n;i++)r+="f";t=new lL(r,16).xor(e).add(lL.ONE).toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(e,t){return hextopem(e,t)},this.newObject=function(e){var t=GL.asn1,n=t.DERBoolean,r=t.DERInteger,i=t.DERBitString,o=t.DEROctetString,a=t.DERNull,l=t.DERObjectIdentifier,s=t.DEREnumerated,c=t.DERUTF8String,d=t.DERNumericString,u=t.DERPrintableString,f=t.DERTeletexString,h=t.DERIA5String,p=t.DERUTCTime,C=t.DERGeneralizedTime,m=t.DERSequence,g=t.DERSet,v=t.DERTaggedObject,A=t.ASN1Util.newObject,y=Object.keys(e);if(1!=y.length)throw"key of param shall be only one.";var w=y[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 n(e[w]);if("int"==w)return new r(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 l(e[w]);if("enum"==w)return new s(e[w]);if("utf8str"==w)return new c(e[w]);if("numstr"==w)return new d(e[w]);if("prnstr"==w)return new u(e[w]);if("telstr"==w)return new f(e[w]);if("ia5str"==w)return new h(e[w]);if("utctime"==w)return new p(e[w]);if("gentime"==w)return new C(e[w]);if("seq"==w){for(var b=e[w],E=[],M=0;M<b.length;M++){var x=A(b[M]);E.push(x)}return new m({array:E})}if("set"==w){for(b=e[w],E=[],M=0;M<b.length;M++){x=A(b[M]);E.push(x)}return new g({array:E})}if("tag"==w){var L=e[w];if("[object Array]"===Object.prototype.toString.call(L)&&3==L.length){var H=A(L[2]);return new v({tag:L[0],explicit:L[1],obj:H})}var k={};if(void 0!==L.explicit&&(k.explicit=L.explicit),void 0!==L.tag&&(k.tag=L.tag),void 0===L.obj)throw"obj shall be specified for 'tag'.";return k.obj=A(L.obj),new v(k)}},this.jsonToASN1HEX=function(e){return this.newObject(e).getEncodedHex()}},GL.asn1.ASN1Util.oidHexToInt=function(e){for(var t="",n=parseInt(e.substring(0,2),16),r=(t=Math.floor(n/40)+"."+n%40,""),i=2;i<e.length;i+=2){var o=("00000000"+parseInt(e.substring(i,i+2),16).toString(2)).slice(-8);if(r+=o.substring(1,8),"0"==o.substring(0,1))t=t+"."+new lL(r,2).toString(10),r=""}return t},GL.asn1.ASN1Util.oidIntToHex=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},n=function(e){var n="",r=new lL(e,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 l=r.substring(a,a+7);a!=r.length-7&&(l="1"+l),n+=t(parseInt(l,2))}return n};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var r="",i=e.split("."),o=40*parseInt(i[0])+parseInt(i[1]);r+=t(o),i.splice(0,2);for(var a=0;a<i.length;a++)r+=n(i[a]);return r},GL.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 n=t.length/2;if(n>15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);return(128+n).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""}},GL.asn1.DERAbstractString=function(e){GL.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))},QL(GL.asn1.DERAbstractString,GL.asn1.ASN1Object),GL.asn1.DERAbstractTime=function(e){GL.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,n){var r=this.zeroPadding,i=this.localDateToUTC(e),o=String(i.getFullYear());"utc"==t&&(o=o.substring(2,4));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 l=i.getMilliseconds();if(0!=l){var s=r(String(l),3);a=a+"."+(s=s.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,n,r,i,o){var a=new Date(Date.UTC(e,t-1,n,r,i,o,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},QL(GL.asn1.DERAbstractTime,GL.asn1.ASN1Object),GL.asn1.DERAbstractStructured=function(e){GL.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)},QL(GL.asn1.DERAbstractStructured,GL.asn1.ASN1Object),GL.asn1.DERBoolean=function(){GL.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},QL(GL.asn1.DERBoolean,GL.asn1.ASN1Object),GL.asn1.DERInteger=function(e){GL.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=GL.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new lL(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))},QL(GL.asn1.DERInteger,GL.asn1.ASN1Object),GL.asn1.DERBitString=function(e){if(void 0!==e&&void 0!==e.obj){var t=GL.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.getEncodedHex()}GL.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 n="0"+e;this.hTLV=null,this.isModified=!0,this.hV=n+t},this.setByBinaryString=function(e){var t=8-(e=e.replace(/0+$/,"")).length%8;8==t&&(t=0);for(var n=0;n<=t;n++)e+="0";var r="";for(n=0;n<e.length-1;n+=8){var i=e.substring(n,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"+t+r},this.setByBooleanArray=function(e){for(var t="",n=0;n<e.length;n++)1==e[n]?t+="1":t+="0";this.setByBinaryString(t)},this.newFalseArray=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=!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))},QL(GL.asn1.DERBitString,GL.asn1.ASN1Object),GL.asn1.DEROctetString=function(e){if(void 0!==e&&void 0!==e.obj){var t=GL.asn1.ASN1Util.newObject(e.obj);e.hex=t.getEncodedHex()}GL.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"},QL(GL.asn1.DEROctetString,GL.asn1.DERAbstractString),GL.asn1.DERNull=function(){GL.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},QL(GL.asn1.DERNull,GL.asn1.ASN1Object),GL.asn1.DERObjectIdentifier=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},n=function(e){var n="",r=new lL(e,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 l=r.substring(a,a+7);a!=r.length-7&&(l="1"+l),n+=t(parseInt(l,2))}return n};GL.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 r="",i=e.split("."),o=40*parseInt(i[0])+parseInt(i[1]);r+=t(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(e){var t=GL.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))},QL(GL.asn1.DERObjectIdentifier,GL.asn1.ASN1Object),GL.asn1.DEREnumerated=function(e){GL.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=GL.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new lL(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))},QL(GL.asn1.DEREnumerated,GL.asn1.ASN1Object),GL.asn1.DERUTF8String=function(e){GL.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"},QL(GL.asn1.DERUTF8String,GL.asn1.DERAbstractString),GL.asn1.DERNumericString=function(e){GL.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"},QL(GL.asn1.DERNumericString,GL.asn1.DERAbstractString),GL.asn1.DERPrintableString=function(e){GL.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"},QL(GL.asn1.DERPrintableString,GL.asn1.DERAbstractString),GL.asn1.DERTeletexString=function(e){GL.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"},QL(GL.asn1.DERTeletexString,GL.asn1.DERAbstractString),GL.asn1.DERIA5String=function(e){GL.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"},QL(GL.asn1.DERIA5String,GL.asn1.DERAbstractString),GL.asn1.DERUTCTime=function(e){GL.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))},QL(GL.asn1.DERUTCTime,GL.asn1.DERAbstractTime),GL.asn1.DERGeneralizedTime=function(e){GL.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))},QL(GL.asn1.DERGeneralizedTime,GL.asn1.DERAbstractTime),GL.asn1.DERSequence=function(e){GL.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}},QL(GL.asn1.DERSequence,GL.asn1.DERAbstractStructured),GL.asn1.DERSet=function(e){GL.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 n=this.asn1Array[t];e.push(n.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)},QL(GL.asn1.DERSet,GL.asn1.DERAbstractStructured),GL.asn1.DERTaggedObject=function(e){GL.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(e,t,n){this.hT=t,this.isExplicit=e,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(/^../,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)))},QL(GL.asn1.DERTaggedObject,GL.asn1.ASN1Object);var KL,YL,JL=window&&window.__extends||(KL=function(e,t){return KL=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},KL(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}KL(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),$L=function(e){function t(n){var r=e.call(this)||this;return n&&("string"==typeof n?r.parseKey(n):(t.hasPrivateKeyProperty(n)||t.hasPublicKeyProperty(n))&&r.parsePropertiesFrom(n)),r}return JL(t,e),t.prototype.parseKey=function(e){try{var t=0,n=0,r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e)?Qx(e):Gx.unarmor(e),i=rL.decode(r);if(3===i.sub.length&&(i=i.sub[2].sub[0]),9===i.sub.length){t=i.sub[1].getHexStringValue(),this.n=hL(t,16),n=i.sub[2].getHexStringValue(),this.e=parseInt(n,16);var o=i.sub[3].getHexStringValue();this.d=hL(o,16);var a=i.sub[4].getHexStringValue();this.p=hL(a,16);var l=i.sub[5].getHexStringValue();this.q=hL(l,16);var s=i.sub[6].getHexStringValue();this.dmp1=hL(s,16);var c=i.sub[7].getHexStringValue();this.dmq1=hL(c,16);var d=i.sub[8].getHexStringValue();this.coeff=hL(d,16)}else{if(2!==i.sub.length)return!1;if(i.sub[0].sub){var u=i.sub[1].sub[0];t=u.sub[0].getHexStringValue(),this.n=hL(t,16),n=u.sub[1].getHexStringValue(),this.e=parseInt(n,16)}else t=i.sub[0].getHexStringValue(),this.n=hL(t,16),n=i.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(e){return!1}},t.prototype.getPrivateBaseKey=function(){var e={array:[new GL.asn1.DERInteger({int:0}),new GL.asn1.DERInteger({bigint:this.n}),new GL.asn1.DERInteger({int:this.e}),new GL.asn1.DERInteger({bigint:this.d}),new GL.asn1.DERInteger({bigint:this.p}),new GL.asn1.DERInteger({bigint:this.q}),new GL.asn1.DERInteger({bigint:this.dmp1}),new GL.asn1.DERInteger({bigint:this.dmq1}),new GL.asn1.DERInteger({bigint:this.coeff})]};return new GL.asn1.DERSequence(e).getEncodedHex()},t.prototype.getPrivateBaseKeyB64=function(){return Ux(this.getPrivateBaseKey())},t.prototype.getPublicBaseKey=function(){var e=new GL.asn1.DERSequence({array:[new GL.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new GL.asn1.DERNull]}),t=new GL.asn1.DERSequence({array:[new GL.asn1.DERInteger({bigint:this.n}),new GL.asn1.DERInteger({int:this.e})]}),n=new GL.asn1.DERBitString({hex:"00"+t.getEncodedHex()});return new GL.asn1.DERSequence({array:[e,n]}).getEncodedHex()},t.prototype.getPublicBaseKeyB64=function(){return Ux(this.getPublicBaseKey())},t.wordwrap=function(e,t){if(!e)return e;var n="(.{1,"+(t=t||64)+"})( +|$\n?)|(.{1,"+t+"})";return e.match(RegExp(n,"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}(WL),eH="undefined"!=typeof process?null===(YL=process.env)||void 0===YL?void 0:YL.npm_package_version:void 0,tH=function(){function e(e){void 0===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=e.key||null}return e.prototype.setKey=function(e){e?(this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new $L(e)):!this.key&&this.log&&console.error("A key was not set.")},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(Wx(e))}catch(e){return!1}},e.prototype.encrypt=function(e){try{return Ux(this.getKey().encrypt(e))}catch(e){return!1}},e.prototype.encryptOAEP=function(e){try{return Ux(this.getKey().encrypt(e,UL))}catch(e){return!1}},e.prototype.sign=function(e,t,n){void 0===t&&(t=function(e){return e}),void 0===n&&(n="");try{return Ux(this.getKey().sign(e,t,n))}catch(e){return!1}},e.prototype.signSha256=function(e){return this.sign(e,function(e){return zL(OL(e))},"sha256")},e.prototype.verify=function(e,t,n){void 0===n&&(n=function(e){return e});try{return this.getKey().verify(e,Wx(t),n)}catch(e){return!1}},e.prototype.verifySha256=function(e,t){return this.verify(e,t,function(e){return zL(OL(e))})},e.prototype.getKey=function(e){if(!this.key){if(this.key=new $L,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=eH,e}();async function nH(e,t,n="https"){if("http"===n){const n=new tH;n.setPublicKey(t);const r=n.encrypt(e);if(!r)throw new Error("JSEncrypt failed: Encryption returned false (check key or data length).");return r}{const n=Uint8Array.from(atob(t),e=>e.charCodeAt(0)),r=await crypto.subtle.importKey("spki",n,{name:"RSA-OAEP",hash:"SHA-256"},!1,["encrypt"]),i=(new TextEncoder).encode(e),o=await crypto.subtle.encrypt({name:"RSA-OAEP"},r,i);return btoa(String.fromCharCode(...new Uint8Array(o)))}}const rH=e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"gb":return 1024*n*1024*1024;case"mb":return 1024*n*1024;case"kb":return 1024*n;default:return n}},iH=e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"gb":default:return n;case"mb":return n/1024;case"kb":return n/1048576;case"b":return n/1073741824}},oH=({data:r,isYaxisSticky:i=!1,barWidth:o,height:s,barGap:d=20,colors:u=[],xAxisLabel:f,isTruncateText:h=!0,yAxisLabel:p,padding:C=20,yAxisDivisions:m=5,barBorderRadius:g=0,legend:v=!0,showXAxisLabels:A=!0,icons:y=[],iconSize:w,legendPosition:b="bottom",legendGap:E=5,extendBarChartRightWidth:M=0,isYAxisValuePercentage:x=!1,selectedBar:L,setSelectedBar:H,onSelectedBar:k=e=>{},totalLabel:V="Total Execution",customToolTip:S=!1,isOnclick:O=!1,isDashboardVersions:z,type:N="",isMemory:I,tooltipWidth:T="fit-content"})=>{const D=a(null),[Z,_]=c(null),[R,j]=c(!1);l(()=>{const e=()=>{const e=D.current;e&&R&&(e.style.display="none")};return window.addEventListener("scroll",e,!0),()=>window.removeEventListener("scroll",e,!0)},[R]);const B=(e=>{const t=["TB","GB","MB","KB"];for(const n of t){if(e.some(e=>"string"==typeof e.value&&e.value.toLowerCase().includes(n.toLowerCase())))return n}return null})(r),P=r.map(e=>{if("string"==typeof e.value){let t=0;if("memory"===N)t=iH(e.value);else if(I)switch(B){case"TB":t=(e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"tb":default:return n;case"gb":return n/1024;case"mb":return n/1048576;case"kb":return n/1073741824;case"b":return n/1099511627776}})(e.value);break;case"GB":t=iH(e.value);break;case"MB":t=(e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"mb":default:return n;case"gb":return 1024*n;case"tb":return 1024*n*1024;case"kb":return n/1024;case"b":return n/1048576}})(e.value);break;case"KB":t=(e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"kb":default:return n;case"mb":return 1024*n;case"gb":return 1024*n*1024;case"tb":return 1024*n*1024*1024;case"b":return n/1024}})(e.value)}else t=parseFloat(e.value);return{...e,normalizedValue:t}}return{...e,normalizedValue:e.value}});let U=0;"memory"===N&&(U=r.reduce((e,t)=>"string"==typeof t.value?e+rH(t.value):e+1024*Number(t.value)*1024*1024,0));const W=U/1048576,X=W<1024?`${Math.round(W)} mb`:`${(W/1024).toFixed(1)} gb`;let Q=Math.max(...P.map(e=>e.normalizedValue));Q="memory"===N?Math.max(Q,1):Math.max(Q,m);const G=40,K=40,Y=P.length*o+(P.length-1)*d+(i?K:90)+M,J=Date.now(),$=t=>t.filter(e=>e.length>1).map((t,n)=>e("defs",{children:e("linearGradient",{id:`gradient-${J}-${N}-${n}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:t.map((r,i)=>e("stop",{offset:i/(t.length-1)*100+"%",stopColor:r},`${n}-${i}`))})},n)),ee=e=>{if(!u.length)return"grey";const t=u[e%u.length];return 1===t?.length?t[0]:`url(#gradient-${J}-${N}-${e%u.length})`},te=(e,t,n,r,i)=>{j(!0);const o=D.current;if(o)if(o.style.display="block",S)o.innerHTML=`<div>\n <div><Typography fontWeight='semi-bold'>${e}</Typography></div>\n <div><Typography>${n||""}</Typography></div>\n <div><Typography>${V} : ${t} ${r?"("+r+"%)":""}</Typography></div>\n </div>`;else if(z){const e=i?i.join(", "):"";o.innerHTML=`\n <div>\n <div><Typography>${V} : ${t}</Typography></div>\n ${e?`<div><Typography>Versions : ${e}</Typography></div>`:""}\n </div>`}else o.innerHTML="memory"===N?`<strong>${e}</strong>: ${t} / ${X}`:`<strong>${e}</strong>: ${t} ${x?"%":""}`},ne=(e,t=!1)=>{const n=D.current;if(n){const r=n.parentElement?.getBoundingClientRect(),i=window.scrollX,o=window.scrollY,a=1===P?.length||!t?e.clientX-(r?.left||0)+i+10:e.clientX-(r?.left||0)+i-n?.offsetWidth-10,l=e.clientY-(r?.top||0)+o-20;n.style.left=`${a}px`,n.style.top=`${l}px`}},re=()=>{j(!1);const e=D.current;e&&(e.style.display="none")},ie=e=>{H&&(H(e),O&&k(e))},oe=e=>{if(h){if(xn(e,10).endsWith("...")){const t=D.current;t&&(t.style.display="block",t.innerHTML=e)}}},ae=(e,t,n)=>{if(h){xn(t,10).endsWith("...")&&ne(e,n===P.length-1)}};return n("div",{className:"ff-bar-chart-container",children:[e("div",{ref:D,className:"ff-bar-chart-tooltip",style:{width:T}}),v&&"top"===b&&e("div",{className:"ff-legend-container",children:e("div",{className:"ff-bar-chart-legend",style:{gap:`${E}px`},children:P.map((t,r)=>n("div",{className:"ff-bar-chart-legend-item",onMouseEnter:()=>_(r),onMouseLeave:()=>_(null),children:[y[r]&&"string"==typeof y[r]?e(F,{name:String(y[r]),width:w,height:w}):e("span",{className:"ff-bar-chart-legend-item-circle",style:{backgroundColor:u[r%u.length]?.[0]||"grey"}}),e(q,{as:"div",fontSize:10,fontWeight:"regular",className:"ff-legend-label",children:t.label})]},t.label))})}),i?n("div",{className:"ff-bar-chart-wrapper",children:[e("div",{className:"ff-y-axis",children:e("svg",{width:60,height:s+G+(f?20:0),children:n(t,{children:[Array.from({length:m+1}).map((t,n)=>{const r=s-n/m*s+G+4,i=n*Q/m,o="memory"===N?i.toFixed(1):x?`${i.toFixed(0).padStart(2,"0")}%`:i.toFixed(0).padStart(2,"0");return e("text",{x:50,y:r,fill:"black",textAnchor:"middle",className:"ff-bar-chart-labels",children:o},n)}),p&&e("text",{x:-(s/2+35),y:i?20:10,transform:"rotate(-90)",fill:"black",textAnchor:"middle",alignmentBaseline:"middle",className:"ff-bar-chart-labels",children:p})]})})}),e("div",{className:"ff-chart-scrollable",children:n("svg",{width:Y,height:s+G+5+(A?20:0)+(f?20:0),children:[Array.isArray(u)&&u.length>0&&$(u),P.map((t,r)=>{const i=t.normalizedValue/Q*s,a=t.normalizedValue<1?2:i,l=r*(o+d)+C,c=s-a+G,u=w||20,f=l+o/2-u/2,p=c-u,m=L===t.label,v=Z===r;return n("g",{children:[y[r]&&"string"==typeof y[r]&&e("g",{onMouseEnter:()=>te(t.label,"memory"===N?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===P.length-1),onMouseLeave:re,children:e(F,{name:String(y[r]),x:String(f),y:String(p),width:u,height:u,chartIcon:!0})}),e("rect",{x:l,y:c,width:o,height:a,fill:ee(r),rx:g,ry:g,style:{strokeWidth:m?3:0,opacity:null===Z||v?1:.3,cursor:O?"pointer":"default",transition:"opacity 0.5s ease"},onMouseEnter:()=>te(t.label,"memory"===N||I?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===P.length-1),onMouseLeave:re,onClick:()=>ie(t.label)}),m&&O&&e("rect",{x:l,y:c,width:o,height:a,fill:"var(--select-chart-highlight-color)",rx:g,ry:g,onMouseEnter:()=>te(t.label,"memory"===N?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===P.length-1),onMouseLeave:re}),A&&e("text",{onMouseEnter:()=>oe(t.label),onMouseMove:e=>ae(e,t.label,r),onMouseLeave:re,x:0===r?l:r===P.length-1?l+o:l+o/2,y:s+G+15,className:"ff-bar-chart-labels",fill:m?"var(--brand-color)":"black",fontWeight:m?"bold":"normal",textAnchor:0===r?"start":"middle",children:h?xn(t.label,10):t.label})]},r)}),e("line",{x1:i?0:C,y1:s+G,x2:Y,y2:s+G,stroke:"#D9D9D9",strokeWidth:"1"}),!i&&f&&e("text",{x:Y/2,y:s+G+(A?40:20),fontSize:"12",fill:"black",textAnchor:"middle",className:"ff-bar-chart-labels",children:f})]})}),e("div",{className:"ff-bar-chart-x-axis-label",children:f})]}):e("div",{children:n("svg",{width:Y,height:s+G+5+(A?20:0)+(f?20:0),children:[Array.isArray(u)&&u.length>0&&$(u),Array.from({length:m+1}).map((t,n)=>{const r=s-n/m*s+G+4,i=n*Q/m,o="memory"===N?i.toFixed(1):x?`${i.toFixed(0).padStart(2,"0")}%`:i.toFixed(0).padStart(2,"0");return e("text",{x:K,y:r,fill:"black",textAnchor:"middle",className:"ff-bar-chart-labels",children:o},n)}),P.map((t,r)=>{const i=t.normalizedValue/Q*s,a=t.normalizedValue<1?2:i,l=r*(o+d)+K+C,c=s-a+G,u=w||20,f=l+o/2-u/2,p=c-u,m=L===t.label,v=Z===r;return n("g",{children:[y[r]&&"string"==typeof y[r]&&e("g",{onMouseEnter:()=>te(t.label,"memory"===N?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===P.length-1),onMouseLeave:re,children:e(F,{name:String(y[r]),x:String(f),y:String(p),width:u,height:u,chartIcon:!0})}),e("rect",{x:l,y:c,width:o,height:a,fill:ee(r),rx:g,ry:g,style:{strokeWidth:m?3:0,opacity:null===Z||v?1:.3,cursor:O?"pointer":"default",transition:"opacity 0.5s ease"},onMouseEnter:()=>te(t.label,"memory"===N||I?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===P.length-1),onMouseLeave:re,onClick:()=>ie(t.label)}),m&&O&&e("rect",{x:l,y:c,width:o,height:a,fill:"var(--select-chart-highlight-color)",rx:g,ry:g,onMouseEnter:()=>te(t.label,"memory"===N?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===P.length-1),onMouseLeave:re}),A&&e("g",{children:e("text",{x:0===r?l:r===P.length-1?l+o:l+o/2,y:s+G+15,className:"ff-bar-chart-labels",fill:m?"var(--brand-color)":"black",fontWeight:m?"bold":"normal",textAnchor:0===r?"start":"middle",onMouseEnter:()=>oe(t.label),onMouseMove:e=>ae(e,t.label,r),onMouseLeave:re,children:h?xn(t.label,10):t.label})})]},r)}),e("line",{x1:60,y1:s+G,x2:Y,y2:s+G,stroke:"#D9D9D9",strokeWidth:"1"}),f&&e("text",{x:Y/2,y:s+G+(A?40:20),fontSize:"12",fill:"black",textAnchor:"middle",className:"ff-bar-chart-labels",children:f}),p&&e("text",{x:-(s/2+35),y:10,transform:"rotate(-90)",fill:"black",textAnchor:"middle",alignmentBaseline:"middle",className:"ff-bar-chart-labels",children:p})]})}),v&&"bottom"===b&&e("div",{className:"ff-legend-container",children:e("div",{className:"ff-bar-chart-legend",style:{gap:`${E}px`},children:r.map((t,r)=>n("div",{className:"ff-bar-chart-legend-item",onMouseEnter:()=>_(r),onMouseLeave:()=>_(null),children:[y[r]&&"string"==typeof y[r]?e(F,{name:String(y[r]),width:w,height:w}):e("span",{className:"ff-bar-chart-legend-item-circle",style:{backgroundColor:u[r%u.length]?.[0]||"grey"}}),e("div",{children:e(q,{as:"div",fontSize:10,fontWeight:"regular",className:"ff-legend-label",children:t.label})})]},t.label))})})]})},aH=(e,t,n,r,i)=>{const o=e+n*Math.cos(r),a=t+n*Math.sin(r),l=e+n*Math.cos(i),s=t+n*Math.sin(i);return`M ${o} ${a} A ${n} ${n} 0 ${i-r>Math.PI?1:0} 1 ${l} ${s}`},lH=({radius:r,lineWidth:i,lineCap:o,barValues:a,labelHeading:l,legendType:s="numberLegend",isLegendDetails:d=!0,isPillValueVisible:u=!0,chartToLegendGap:f="16px",legendGap:h="8px",labelFontSize:p=12,subLabelFontSize:C=8,gapBetweenArch:m=10,capsuleStyle:g={padding:"4px"}})=>{const[v,A]=c({visible:!1,x:0,y:0,content:"",isArc:!1}),[y,w]=c(null),b=(e,t)=>Array.isArray(e.arcColor)?`url(#gradient-${t})`:e.arcColor,E=e=>Array.isArray(e.arcColor)?e.arcColor[0]:e.arcColor,M=a.map(e=>{if("string"==typeof e.value){const t=(e=>{if("string"!=typeof e)return e;{const t=e.trim().match(/^([\d.]+)\s*([a-zA-Z%]*)$/);if(!t)return 0;const n=parseFloat(t[1]??"0"),r=t[2]?.toUpperCase()||"";if(isNaN(n))return 0;switch(r){case"TB":return 1024*n*1024;case"GB":return 1024*n;case"MB":default:return n;case"KB":return n/1024}}})(e.value),n=isNaN(t)?0:t;return{...e,normalizedValue:n,labelValue:Number.isInteger(n)?n:n.toFixed(2)}}return{...e,normalizedValue:e.value,labelValue:Number.isInteger(e.value)?e.value:e.value?.toFixed(2)}}),x=M.reduce((e,t)=>e+t.normalizedValue,0),L=r,H=i+m,k=2*(L+H*(M.length-1)+i),V=[...M].reverse(),S=l.trim().split(" "),O=(e,t,n)=>{const{clientX:r,clientY:i}=e;A({visible:!0,x:r,y:i,content:t,isArc:n})},z=e=>{const{clientX:t,clientY:n}=e;A(e=>({...e,x:t,y:n}))},N=()=>{A({visible:!1,x:0,y:0,content:"",isArc:!1})};return n("div",{className:"ff-multi-radial-chart-container "+("numberLegend"===s?"ff-multi-radial-chart-number":"ff-multi-radial-chart-pill"),style:{gap:f},children:[e("div",{className:"relative",style:{width:k,height:k},children:n("svg",{width:k,height:k,viewBox:`0 0 ${k} ${k}`,className:"absolute top-0 left-0",children:[e("defs",{children:a.map((t,n)=>Array.isArray(t.arcColor)?e("linearGradient",{id:`gradient-${n}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientTransform:"rotate(90)",children:t.arcColor.map((n,r)=>e("stop",{offset:r/(t.arcColor.length-1)*100+"%",stopColor:n},r))},`gradient-${n}`):null)}),n("g",{transform:`translate(${k/2+1}, ${k/2+1})`,children:[V.map((t,r)=>{const a=M.length-1-r,l=2*(t.normalizedValue/x)*Math.PI;let s=-Math.PI/2,c=s+l;t.normalizedValue===x&&(s=0,c=2*Math.PI);const d=L+H*a,u=aH(0,0,d,0,2*Math.PI),f={opacity:null!==y?t.barLabel===y?1:.2:1,transition:"opacity 0.3s ease"};if(0===t.normalizedValue){const r=d*Math.cos(-Math.PI/2),o=d*Math.sin(-Math.PI/2);return n("g",{children:[e("path",{d:u,fill:"none",stroke:t.arcBackgroundColor,strokeWidth:i,className:"transition-all duration-300",style:f}),e("circle",{cx:r,cy:o,r:i+1,fill:b({...t,label:t.barLabel||"",key:t.labelValue?.toString()||""},a),onMouseEnter:e=>O(e,`${t.barLabel||"Data"}: ${t.value}`,!0),onMouseMove:z,onMouseLeave:N,style:f})]},a)}const h=aH(0,0,d,s,c);return n("g",{children:[e("path",{d:u,fill:"none",stroke:t.arcBackgroundColor,strokeWidth:i,className:"transition-all duration-300",style:f}),e("path",{d:h,fill:"none",stroke:b({...t,label:t.barLabel||"",key:t.labelValue?.toString()||""},a),strokeWidth:i,strokeLinecap:"square"===o?"butt":"round",onMouseEnter:e=>O(e,`${t.barLabel||"Data"}: ${t.value}`,!0),onMouseMove:z,onMouseLeave:N,style:{pointerEvents:"stroke",...f}})]},a)}),e("text",{x:"0",y:`-${i+m+2}`,fill:(()=>{if(!v.visible)return"";const e=v.content.split(":")[0]?.trim();if(void 0===e)return"";const t=M.find(t=>t.barLabel===e);if(!t)return"";const n={...t,label:t.barLabel,key:t.labelValue?.toString()??""};return E(n)})(),textAnchor:"middle",dominantBaseline:"central",children:v.visible?n(t,{children:[e("tspan",{x:"0",dy:"0",className:"ff-center-text-tooltip",children:(I=v.content.split(":")[1]?.trim()||"",T=9,I.length>T?I.slice(0,T)+"...":I)}),v.content.split(":")[0]?.split(" ").map((t,n)=>e("tspan",{x:"0",dy:0===n?`${i+m+5}`:18,className:"ff-center-text-tooltip",children:t},n))]}):e(t,{children:S.map((t,r)=>{if(0===r){const[i,...o]=t.split(" ");return n("tspan",{children:[e("tspan",{x:"0",dy:"0",style:{fontSize:`${p}px`},className:"ff-center-first-text",children:i}),e("tspan",{x:"0",dy:18,style:{fontSize:`${C}px`},className:"ff-center-text",children:o.join(" ")})]},r)}return e("tspan",{x:"0",dy:0===r?0:18,className:"ff-center-text",style:{fontSize:`${C}px`},children:t},r)})})})]})]})}),v.visible&&e("div",{className:"ff-multi-radial-tooltip",style:{position:"fixed",top:`${v.y+10}px`,left:`${v.x+15}px`,zIndex:1e3,pointerEvents:"none"},children:v.content}),d&&((t,r)=>{switch(r){case"numberLegend":return e("div",{className:"ff-legend-container ff-number-legend",style:{gap:h},children:t.map((t,r)=>n("div",{className:"ff-legend-item",onMouseEnter:e=>{w(t.barLabel||t.label),O(e,`${t.barLabel||"Data"}: ${t.value}`,!1)},onMouseMove:z,onMouseLeave:()=>{w(null),N()},children:[e(q,{fontSize:20,fontWeight:"semi-bold",className:"ff-legend-value",color:E(t),children:t.key.padStart(2,"0")}),e(q,{fontSize:10,className:"ff-legend-key",color:"var(--text-color)",children:t.label})]},r))});case"pillLegend":return e("div",{className:"ff-legend-container ff-pill-legend",style:{gap:h},children:t.slice().reverse().map((t,r)=>n("div",{className:"ff-legend-item",onMouseEnter:e=>{w(t.barLabel||t.label),O(e,`${t.barLabel||"Data"}: ${t.value}`,!1)},onMouseMove:z,onMouseLeave:()=>{w(null),N()},children:[e("span",{className:"ff-legend-capsule",style:{backgroundColor:E(t)},children:e(q,{fontSize:10,color:"var(--tooltip-text-color)",style:g,children:u&&t.value})}),e(q,{className:"ff-legend-key",children:t.label})]},r))});default:return null}})(M.map(e=>({...e,label:e?.barLabel,key:e.labelValue?.toString()})),s)]});var I,T};var sH,cH={exports:{}},dH={},uH={exports:{}},fH={},hH={};function pH(){if(sH)return hH;function e(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function t(e,t){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=new Array(e.indent_size+1).join(e.indent_char)),t=t||"",e.indent_level>0&&(t=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=t,this.__base_string_length=t.length}function n(n,r){this.__indent_cache=new t(n,r),this.raw=!1,this._end_with_newline=n.end_with_newline,this.indent_size=n.indent_size,this.wrap_line_length=n.wrap_line_length,this.indent_empty_lines=n.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}return sH=1,e.prototype.clone_empty=function(){var t=new e(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},e.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},e.prototype.has_match=function(e){for(var t=this.__items.length-1;t>=0;t--)if(this.__items[t].match(e))return!0;return!1},e.prototype.set_indent=function(e,t){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=t||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},e.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===e.__items[0]&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf("\n");-1!==t?this.__character_count=e.length-t:this.__character_count+=e.length},e.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e},t.prototype.get_indent_size=function(e,t){var n=this.__base_string_length;return t=t||0,e<0&&(n=0),n+=e*this.__indent_size,n+=t},t.prototype.get_indent_string=function(e,t){var n=this.__base_string;return t=t||0,e<0&&(e=0,n=""),t+=e*this.__indent_size,this.__ensure_cache(t),n+=this.__cache[t]},t.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},t.prototype.__add_column=function(){var e=this.__cache.length,t=0,n="";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,n=new Array(t+1).join(this.__indent_string)),e&&(n+=new Array(e+1).join(" ")),this.__cache.push(n)},n.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},n.prototype.get_line_number=function(){return this.__lines.length},n.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)},n.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)},n.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},n.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},n.prototype.get_code=function(e){this.trim(!0);var t=this.current_line.pop();t&&("\n"===t[t.length-1]&&(t=t.replace(/\n+$/g,"")),this.current_line.push(t)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==e&&(n=n.replace(/[\n]/g,e)),n},n.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},n.prototype.set_indent=function(e,t){return e=e||0,t=t||0,this.next_line.set_indent(e,t),this.__lines.length>1?(this.current_line.set_indent(e,t),!0):(this.current_line.set_indent(),!1)},n.prototype.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},n.prototype.add_token=function(e){this.__add_space_before_token(),this.current_line.push(e),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},n.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},n.prototype.remove_indent=function(e){for(var t=this.__lines.length;e<t;)this.__lines[e]._remove_indent(),e++;this.current_line._remove_wrap_indent()},n.prototype.trim=function(e){for(e=void 0!==e&&e,this.current_line.trim();e&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},n.prototype.just_added_newline=function(){return this.current_line.is_empty()},n.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},n.prototype.ensure_empty_line_above=function(t,n){for(var r=this.__lines.length-2;r>=0;){var i=this.__lines[r];if(i.is_empty())break;if(0!==i.item(0).indexOf(t)&&i.item(-1)!==n){this.__lines.splice(r+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},hH.Output=n,hH}var CH,mH={};function gH(){if(CH)return mH;return CH=1,mH.Token=function(e,t,n,r){this.type=e,this.text=t,this.comments_before=null,this.newlines=n||0,this.whitespace_before=r||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null},mH}var vH,AH={};function yH(){return vH||(vH=1,o="(?:"+(i="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}")+"|[\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a"+(n="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\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0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc")+"])",a="(?:"+i+"|["+(t="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a")+n+(r="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f")+"])*",(e=AH).identifier=new RegExp(o+a,"g"),e.identifierStart=new RegExp(o),e.identifierMatch=new RegExp("(?:"+i+"|["+t+n+r+"])+"),e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=new RegExp("\r\n|"+e.newline.source),e.allLineBreaks=new RegExp(e.lineBreak.source,"g")),AH;var e,t,n,r,i,o,a}var wH,bH,EH={},MH={};function xH(){if(wH)return MH;function e(e,n){this.raw_options=t(e,n),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}function t(e,t){var r,i={};for(r in e=n(e))r!==t&&(i[r]=e[r]);if(t&&e[t])for(r in e[t])i[r]=e[t][r];return i}function n(e){var t,n={};for(t in e){n[t.replace(/-/g,"_")]=e[t]}return n}return wH=1,e.prototype._get_array=function(e,t){var n=this.raw_options[e],r=t||[];return"object"==typeof n?null!==n&&"function"==typeof n.concat&&(r=n.concat()):"string"==typeof n&&(r=n.split(/[^a-zA-Z0-9_\/\-]+/)),r},e.prototype._get_boolean=function(e,t){var n=this.raw_options[e];return void 0===n?!!t:!!n},e.prototype._get_characters=function(e,t){var n=this.raw_options[e],r=t||"";return"string"==typeof n&&(r=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),r},e.prototype._get_number=function(e,t){var n=this.raw_options[e];t=parseInt(t,10),isNaN(t)&&(t=0);var r=parseInt(n,10);return isNaN(r)&&(r=t),r},e.prototype._get_selection=function(e,t,n){var r=this._get_selection_list(e,t,n);if(1!==r.length)throw new Error("Invalid Option Value: The option '"+e+"' can only be one of the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return r[0]},e.prototype._get_selection_list=function(e,t,n){if(!t||0===t.length)throw new Error("Selection list cannot be empty.");if(n=n||[t[0]],!this._is_valid_selection(n,t))throw new Error("Invalid Default Value!");var r=this._get_array(e,n);if(!this._is_valid_selection(r,t))throw new Error("Invalid Option Value: The option '"+e+"' can contain only the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return r},e.prototype._is_valid_selection=function(e,t){return e.length&&t.length&&!e.some(function(e){return-1===t.indexOf(e)})},MH.Options=e,MH.normalizeOpts=n,MH.mergeOpts=t,MH}function LH(){if(bH)return EH;bH=1;var e=xH().Options,t=["before-newline","after-newline","preserve-newline"];function n(n){e.call(this,n,"js");var r=this.raw_options.brace_style||null;"expand-strict"===r?this.raw_options.brace_style="expand":"collapse-preserve-inline"===r?this.raw_options.brace_style="collapse,preserve-inline":void 0!==this.raw_options.braces_on_own_line&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var i=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var o=0;o<i.length;o++)"preserve-inline"===i[o]?this.brace_preserve_inline=!0:this.brace_style=i[o];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",t),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}return n.prototype=new e,EH.Options=n,EH}var HH,kH={},VH={};function SH(){if(HH)return VH;HH=1;var e=RegExp.prototype.hasOwnProperty("sticky");function t(e){this.__input=e||"",this.__input_length=this.__input.length,this.__position=0}return t.prototype.restart=function(){this.__position=0},t.prototype.back=function(){this.__position>0&&(this.__position-=1)},t.prototype.hasNext=function(){return this.__position<this.__input_length},t.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__input.charAt(this.__position),this.__position+=1),e},t.prototype.peek=function(e){var t=null;return e=e||0,(e+=this.__position)>=0&&e<this.__input_length&&(t=this.__input.charAt(e)),t},t.prototype.__match=function(t,n){t.lastIndex=n;var r=t.exec(this.__input);return!r||e&&t.sticky||r.index!==n&&(r=null),r},t.prototype.test=function(e,t){return t=t||0,(t+=this.__position)>=0&&t<this.__input_length&&!!this.__match(e,t)},t.prototype.testChar=function(e,t){var n=this.peek(t);return e.lastIndex=0,null!==n&&e.test(n)},t.prototype.match=function(e){var t=this.__match(e,this.__position);return t?this.__position+=t[0].length:t=null,t},t.prototype.read=function(e,t,n){var r,i="";return e&&(r=this.match(e))&&(i+=r[0]),!t||!r&&e||(i+=this.readUntil(t,n)),i},t.prototype.readUntil=function(e,t){var n,r=this.__position;e.lastIndex=this.__position;var i=e.exec(this.__input);return i?(r=i.index,t&&(r+=i[0].length)):r=this.__input_length,n=this.__input.substring(this.__position,r),this.__position=r,n},t.prototype.readUntilAfter=function(e){return this.readUntil(e,!0)},t.prototype.get_regexp=function(t,n){var r=null,i="g";return n&&e&&(i="y"),"string"==typeof t&&""!==t?r=new RegExp(t,i):t&&(r=new RegExp(t.source,i)),r},t.prototype.get_literal_regexp=function(e){return RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},t.prototype.peekUntilAfter=function(e){var t=this.__position,n=this.readUntilAfter(e);return this.__position=t,n},t.prototype.lookBack=function(e){var t=this.__position-1;return t>=e.length&&this.__input.substring(t-e.length,t).toLowerCase()===e},VH.InputScanner=t,VH}var OH,zH={},NH={};var IH,TH,DH,ZH={},_H={};function RH(){if(IH)return _H;function e(e,t){this._input=e,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,t&&(this._starting_pattern=this._input.get_regexp(t._starting_pattern,!0),this._match_pattern=this._input.get_regexp(t._match_pattern,!0),this._until_pattern=this._input.get_regexp(t._until_pattern),this._until_after=t._until_after)}return IH=1,e.prototype.read=function(){var e=this._input.read(this._starting_pattern);return this._starting_pattern&&!e||(e+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),e},e.prototype.read_match=function(){return this._input.match(this._match_pattern)},e.prototype.until_after=function(e){var t=this._create();return t._until_after=!0,t._until_pattern=this._input.get_regexp(e),t._update(),t},e.prototype.until=function(e){var t=this._create();return t._until_after=!1,t._until_pattern=this._input.get_regexp(e),t._update(),t},e.prototype.starting_with=function(e){var t=this._create();return t._starting_pattern=this._input.get_regexp(e,!0),t._update(),t},e.prototype.matching=function(e){var t=this._create();return t._match_pattern=this._input.get_regexp(e,!0),t._update(),t},e.prototype._create=function(){return new e(this._input,this)},e.prototype._update=function(){},_H.Pattern=e,_H}function jH(){if(DH)return zH;DH=1;var e=SH().InputScanner,t=gH().Token,n=function(){if(OH)return NH;function e(e){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=e}return OH=1,e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return 0===this.__tokens_length},e.prototype.hasNext=function(){return this.__position<this.__tokens_length},e.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__tokens[this.__position],this.__position+=1),e},e.prototype.peek=function(e){var t=null;return e=e||0,(e+=this.__position)>=0&&e<this.__tokens_length&&(t=this.__tokens[e]),t},e.prototype.add=function(e){this.__parent_token&&(e.parent=this.__parent_token),this.__tokens.push(e),this.__tokens_length+=1},NH.TokenStream=e,NH}().TokenStream,r=function(){if(TH)return ZH;TH=1;var e=RH().Pattern;function t(t,n){e.call(this,t,n),n?this._line_regexp=this._input.get_regexp(n._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}return t.prototype=new e,t.prototype.__set_whitespace_patterns=function(e,t){e+="\\t ",t+="\\n\\r",this._match_pattern=this._input.get_regexp("["+e+t+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+t+"]")},t.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var e=this._input.read(this._match_pattern);if(" "===e)this.whitespace_before_token=" ";else if(e){var t=this.__split(this._newline_regexp,e);this.newline_count=t.length-1,this.whitespace_before_token=t[this.newline_count]}return e},t.prototype.matching=function(e,t){var n=this._create();return n.__set_whitespace_patterns(e,t),n._update(),n},t.prototype._create=function(){return new t(this._input,this)},t.prototype.__split=function(e,t){e.lastIndex=0;for(var n=0,r=[],i=e.exec(t);i;)r.push(t.substring(n,i.index)),n=i.index+i[0].length,i=e.exec(t);return n<t.length?r.push(t.substring(n,t.length)):r.push(""),r},ZH.WhitespacePattern=t,ZH}().WhitespacePattern,i={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(t,n){this._input=new e(t),this._options=n||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new r(this._input)};return o.prototype.tokenize=function(){var e;this._input.restart(),this.__tokens=new n,this._reset();for(var r=new t(i.START,""),o=null,a=[],l=new n;r.type!==i.EOF;){for(e=this._get_next_token(r,o);this._is_comment(e);)l.add(e),e=this._get_next_token(r,o);l.isEmpty()||(e.comments_before=l,l=new n),e.parent=o,this._is_opening(e)?(a.push(o),o=e):o&&this._is_closing(e,o)&&(e.opened=o,o.closed=e,o=a.pop(),e.parent=o),e.previous=r,r.next=e,this.__tokens.add(e),r=e}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(e,t){this._readWhitespace();var n=this._input.read(/.+/g);return n?this._create_token(i.RAW,n):this._create_token(i.EOF,"")},o.prototype._is_comment=function(e){return!1},o.prototype._is_opening=function(e){return!1},o.prototype._is_closing=function(e,t){return!1},o.prototype._create_token=function(e,n){return new t(e,n,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},o.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},zH.Tokenizer=o,zH.TOKEN=i,zH}var BH,PH={};function FH(){if(BH)return PH;function e(e,t){e="string"==typeof e?e:e.source,t="string"==typeof t?t:t.source,this.__directives_block_pattern=new RegExp(e+/ beautify( \w+[:]\w+)+ /.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(e+/\sbeautify\signore:end\s/.source+t,"g")}return BH=1,e.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var t={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(e);n;)t[n[1]]=n[2],n=this.__directive_pattern.exec(e);return t},e.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},PH.Directives=e,PH}var qH,UH,WH,XH,QH={};function GH(){if(qH)return QH;qH=1;var e=RH().Pattern,t={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function n(n,r){e.call(this,n,r),this.__template_pattern=null,this._disabled=Object.assign({},t),this._excluded=Object.assign({},t),r&&(this.__template_pattern=this._input.get_regexp(r.__template_pattern),this._excluded=Object.assign(this._excluded,r._excluded),this._disabled=Object.assign(this._disabled,r._disabled));var i=new e(n);this.__patterns={handlebars_comment:i.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:i.starting_with(/{{{/).until_after(/}}}/),handlebars:i.starting_with(/{{/).until_after(/}}/),php:i.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:i.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:i.starting_with(/{%/).until_after(/%}/),django_value:i.starting_with(/{{/).until_after(/}}/),django_comment:i.starting_with(/{#/).until_after(/#}/),smarty:i.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:i.starting_with(/{\*/).until_after(/\*}/),smarty_literal:i.starting_with(/{literal}/).until_after(/{\/literal}/)}}return n.prototype=new e,n.prototype._create=function(){return new n(this._input,this)},n.prototype._update=function(){this.__set_templated_pattern()},n.prototype.disable=function(e){var t=this._create();return t._disabled[e]=!0,t._update(),t},n.prototype.read_options=function(e){var n=this._create();for(var r in t)n._disabled[r]=-1===e.templating.indexOf(r);return n._update(),n},n.prototype.exclude=function(e){var t=this._create();return t._excluded[e]=!0,t._update(),t},n.prototype.read=function(){var e="";e=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);for(var t=this._read_template();t;)this._match_pattern?t+=this._input.read(this._match_pattern):t+=this._input.readUntil(this.__template_pattern),e+=t,t=this._read_template();return this._until_after&&(e+=this._input.readUntilAfter(this._until_pattern)),e},n.prototype.__set_templated_pattern=function(){var e=[];this._disabled.php||e.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||e.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||e.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||e.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(e.push(this.__patterns.django._starting_pattern.source),e.push(this.__patterns.django_value._starting_pattern.source),e.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||e.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&e.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+e.join("|")+")")},n.prototype._read_template=function(){var e="",t=this._input.peek();if("<"===t){var n=this._input.peek(1);this._disabled.php||this._excluded.php||"?"!==n||(e=e||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||"%"!==n||(e=e||this.__patterns.erb.read())}else"{"===t&&(this._disabled.handlebars||this._excluded.handlebars||(e=(e=(e=e||this.__patterns.handlebars_comment.read())||this.__patterns.handlebars_unescaped.read())||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(e=e||this.__patterns.django_value.read()),this._excluded.django||(e=(e=e||this.__patterns.django_comment.read())||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(e=(e=(e=e||this.__patterns.smarty_comment.read())||this.__patterns.smarty_literal.read())||this.__patterns.smarty.read()));return e},QH.TemplatablePattern=n,QH}function KH(){if(UH)return kH;UH=1;var e=SH().InputScanner,t=jH().Tokenizer,n=jH().TOKEN,r=FH().Directives,i=yH(),o=RH().Pattern,a=GH().TemplatablePattern;function l(e,t){return-1!==t.indexOf(e)}var s={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:n.START,RAW:n.RAW,EOF:n.EOF},c=new r(/\/\*/,/\*\//),d=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,u=/[0-9]/,f=/[^\d\.]/,h=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),p=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";p=(p="\\?\\.(?!\\d) "+(p=p.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"))).replace(/ /g,"|");var C,m=new RegExp(p),g="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),v=g.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),A=new RegExp("^(?:"+v.join("|")+")$"),y=function(e,n){t.call(this,e,n),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var r=new o(this._input),l=new a(this._input).read_options(this._options);this.__patterns={template:l,identifier:l.starting_with(i.identifier).matching(i.identifierMatch),number:r.matching(d),punct:r.matching(m),comment:r.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:r.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:r.matching(/<!--/),html_comment_end:r.matching(/-->/),include:r.starting_with(/#include/).until_after(i.lineBreak),shebang:r.starting_with(/#!/).until_after(i.lineBreak),xml:r.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:l.until(/['\\\n\r\u2028\u2029]/),double_quote:l.until(/["\\\n\r\u2028\u2029]/),template_text:l.until(/[`\\$]/),template_expression:l.until(/[`}\\]/)}};return(y.prototype=new t)._is_comment=function(e){return e.type===s.COMMENT||e.type===s.BLOCK_COMMENT||e.type===s.UNKNOWN},y.prototype._is_opening=function(e){return e.type===s.START_BLOCK||e.type===s.START_EXPR},y.prototype._is_closing=function(e,t){return(e.type===s.END_BLOCK||e.type===s.END_EXPR)&&t&&("]"===e.text&&"["===t.text||")"===e.text&&"("===t.text||"}"===e.text&&"{"===t.text)},y.prototype._reset=function(){C=!1},y.prototype._get_next_token=function(e,t){var n=null;this._readWhitespace();var r=this._input.peek();return null===r?this._create_token(s.EOF,""):n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n||this._read_non_javascript(r))||this._read_string(r))||this._read_pair(r,this._input.peek(1)))||this._read_word(e))||this._read_singles(r))||this._read_comment(r))||this._read_regexp(r,e))||this._read_xml(r,e))||this._read_punctuation())||this._create_token(s.UNKNOWN,this._input.next())},y.prototype._read_word=function(e){var t;return""!==(t=this.__patterns.identifier.read())?(t=t.replace(i.allLineBreaks,"\n"),e.type!==s.DOT&&(e.type!==s.RESERVED||"set"!==e.text&&"get"!==e.text)&&A.test(t)?"in"!==t&&"of"!==t||e.type!==s.WORD&&e.type!==s.STRING?this._create_token(s.RESERVED,t):this._create_token(s.OPERATOR,t):this._create_token(s.WORD,t)):""!==(t=this.__patterns.number.read())?this._create_token(s.WORD,t):void 0},y.prototype._read_singles=function(e){var t=null;return"("===e||"["===e?t=this._create_token(s.START_EXPR,e):")"===e||"]"===e?t=this._create_token(s.END_EXPR,e):"{"===e?t=this._create_token(s.START_BLOCK,e):"}"===e?t=this._create_token(s.END_BLOCK,e):";"===e?t=this._create_token(s.SEMICOLON,e):"."===e&&f.test(this._input.peek(1))?t=this._create_token(s.DOT,e):","===e&&(t=this._create_token(s.COMMA,e)),t&&this._input.next(),t},y.prototype._read_pair=function(e,t){var n=null;return"#"===e&&"{"===t&&(n=this._create_token(s.START_BLOCK,e+t)),n&&(this._input.next(),this._input.next()),n},y.prototype._read_punctuation=function(){var e=this.__patterns.punct.read();if(""!==e)return"="===e?this._create_token(s.EQUALS,e):"?."===e?this._create_token(s.DOT,e):this._create_token(s.OPERATOR,e)},y.prototype._read_non_javascript=function(e){var t="";if("#"===e){if(this._is_first_token()&&(t=this.__patterns.shebang.read()))return this._create_token(s.UNKNOWN,t.trim()+"\n");if(t=this.__patterns.include.read())return this._create_token(s.UNKNOWN,t.trim()+"\n");e=this._input.next();var n="#";if(this._input.hasNext()&&this._input.testChar(u)){do{n+=e=this._input.next()}while(this._input.hasNext()&&"#"!==e&&"="!==e);return"#"===e||("["===this._input.peek()&&"]"===this._input.peek(1)?(n+="[]",this._input.next(),this._input.next()):"{"===this._input.peek()&&"}"===this._input.peek(1)&&(n+="{}",this._input.next(),this._input.next())),this._create_token(s.WORD,n)}this._input.back()}else if("<"===e&&this._is_first_token()){if(t=this.__patterns.html_comment_start.read()){for(;this._input.hasNext()&&!this._input.testChar(i.newline);)t+=this._input.next();return C=!0,this._create_token(s.COMMENT,t)}}else if(C&&"-"===e&&(t=this.__patterns.html_comment_end.read()))return C=!1,this._create_token(s.COMMENT,t);return null},y.prototype._read_comment=function(e){var t=null;if("/"===e){var n="";if("*"===this._input.peek(1)){n=this.__patterns.block_comment.read();var r=c.get_directives(n);r&&"start"===r.ignore&&(n+=c.readIgnored(this._input)),n=n.replace(i.allLineBreaks,"\n"),(t=this._create_token(s.BLOCK_COMMENT,n)).directives=r}else"/"===this._input.peek(1)&&(n=this.__patterns.comment.read(),t=this._create_token(s.COMMENT,n))}return t},y.prototype._read_string=function(t){if("`"===t||"'"===t||'"'===t){var n=this._input.next();return this.has_char_escapes=!1,n+="`"===t?this._read_string_recursive("`",!0,"${"):this._read_string_recursive(t),this.has_char_escapes&&this._options.unescape_strings&&(n=function(t){var n="",r=0,i=new e(t),o=null;for(;i.hasNext();)if((o=i.match(/([\s]|[^\\]|\\\\)+/g))&&(n+=o[0]),"\\"===i.peek()){if(i.next(),"x"===i.peek())o=i.match(/x([0-9A-Fa-f]{2})/g);else{if("u"!==i.peek()){n+="\\",i.hasNext()&&(n+=i.next());continue}(o=i.match(/u([0-9A-Fa-f]{4})/g))||(o=i.match(/u\{([0-9A-Fa-f]+)\}/g))}if(!o)return t;if((r=parseInt(o[1],16))>126&&r<=255&&0===o[0].indexOf("x"))return t;n+=r>=0&&r<32||r>1114111?"\\"+o[0]:34===r||39===r||92===r?"\\"+String.fromCharCode(r):String.fromCharCode(r)}return n}(n)),this._input.peek()===t&&(n+=this._input.next()),n=n.replace(i.allLineBreaks,"\n"),this._create_token(s.STRING,n)}return null},y.prototype._allow_regexp_or_xml=function(e){return e.type===s.RESERVED&&l(e.text,["return","case","throw","else","do","typeof","yield"])||e.type===s.END_EXPR&&")"===e.text&&e.opened.previous.type===s.RESERVED&&l(e.opened.previous.text,["if","while","for"])||l(e.type,[s.COMMENT,s.START_EXPR,s.START_BLOCK,s.START,s.END_BLOCK,s.OPERATOR,s.EQUALS,s.EOF,s.SEMICOLON,s.COMMA])},y.prototype._read_regexp=function(e,t){if("/"===e&&this._allow_regexp_or_xml(t)){for(var n=this._input.next(),r=!1,o=!1;this._input.hasNext()&&(r||o||this._input.peek()!==e)&&!this._input.testChar(i.newline);)n+=this._input.peek(),r?r=!1:(r="\\"===this._input.peek(),"["===this._input.peek()?o=!0:"]"===this._input.peek()&&(o=!1)),this._input.next();return this._input.peek()===e&&(n+=this._input.next(),n+=this._input.read(i.identifier)),this._create_token(s.STRING,n)}return null},y.prototype._read_xml=function(e,t){if(this._options.e4x&&"<"===e&&this._allow_regexp_or_xml(t)){var n="",r=this.__patterns.xml.read_match();if(r){for(var o=r[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),a=0===o.indexOf("{"),l=0;r;){var c=!!r[1],d=r[2];if(!(!!r[r.length-1]||"![CDATA["===d.slice(0,8))&&(d===o||a&&d.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(c?--l:++l),n+=r[0],l<=0)break;r=this.__patterns.xml.read_match()}return r||(n+=this._input.match(/[\s\S]*/g)[0]),n=n.replace(i.allLineBreaks,"\n"),this._create_token(s.STRING,n)}}return null},y.prototype._read_string_recursive=function(e,t,n){var r,o;"'"===e?o=this.__patterns.single_quote:'"'===e?o=this.__patterns.double_quote:"`"===e?o=this.__patterns.template_text:"}"===e&&(o=this.__patterns.template_expression);for(var a=o.read(),l="";this._input.hasNext();){if((l=this._input.next())===e||!t&&i.newline.test(l)){this._input.back();break}"\\"===l&&this._input.hasNext()?("x"===(r=this._input.peek())||"u"===r?this.has_char_escapes=!0:"\r"===r&&"\n"===this._input.peek(1)&&this._input.next(),l+=this._input.next()):n&&("${"===n&&"$"===l&&"{"===this._input.peek()&&(l+=this._input.next()),n===l&&(l+="`"===e?this._read_string_recursive("}",t,"`"):this._read_string_recursive("`",t,"${"),this._input.hasNext()&&(l+=this._input.next()))),a+=l+=o.read()}return a},kH.Tokenizer=y,kH.TOKEN=s,kH.positionable_operators=h.slice(),kH.line_starters=g.slice(),kH}function YH(){if(WH)return fH;WH=1;var e=pH().Output,t=gH().Token,n=yH(),r=LH().Options,i=KH().Tokenizer,o=KH().line_starters,a=KH().positionable_operators,l=KH().TOKEN;function s(e,t){return-1!==t.indexOf(e)}function c(e){return e.replace(/^\s+/g,"")}function d(e,t){return e&&e.type===l.RESERVED&&e.text===t}function u(e,t){return e&&e.type===l.RESERVED&&s(e.text,t)}var f=["case","return","do","if","throw","else","await","break","continue","async"],h=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].replace(/-/g,"_")]=e[n];return t}(["before-newline","after-newline","preserve-newline"]),p=[h.before_newline,h.preserve_newline],C="BlockStatement",m="Statement",g="ObjectLiteral",v="ArrayLiteral",A="ForInitializer",y="Conditional",w="Expression";function b(e,t){t.multiline_frame||t.mode===A||t.mode===y||e.remove_indent(t.start_line_index)}function E(e){return e===v}function M(e){return s(e,[w,A,y])}function x(e,t){t=t||{},this._source_text=e||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new r(t)}x.prototype.create_flags=function(e,n){var r=0;return e&&(r=e.indentation_level,!this._output.just_added_newline()&&e.line_indent_level>r&&(r=e.line_indent_level)),{mode:n,parent:e,last_token:e?e.last_token:new t(l.START_BLOCK,""),last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:r,alignment:0,line_indent_level:e?e.line_indent_level:r,start_line_index:this._output.get_line_number(),ternary_depth:0}},x.prototype._reset=function(t){var n=t.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new e(this._options,n),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(C);var r=new i(t,this._options);return this._tokens=r.tokenize(),t},x.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._reset(this._source_text),t=this._options.eol;"auto"===this._options.eol&&(t="\n",e&&n.lineBreak.test(e||"")&&(t=e.match(n.lineBreak)[0]));for(var r=this._tokens.next();r;)this.handle_token(r),this._last_last_text=this._flags.last_token.text,this._flags.last_token=r,r=this._tokens.next();return this._output.get_code(t)},x.prototype.handle_token=function(e,t){e.type===l.START_EXPR?this.handle_start_expr(e):e.type===l.END_EXPR?this.handle_end_expr(e):e.type===l.START_BLOCK?this.handle_start_block(e):e.type===l.END_BLOCK?this.handle_end_block(e):e.type===l.WORD||e.type===l.RESERVED?this.handle_word(e):e.type===l.SEMICOLON?this.handle_semicolon(e):e.type===l.STRING?this.handle_string(e):e.type===l.EQUALS?this.handle_equals(e):e.type===l.OPERATOR?this.handle_operator(e):e.type===l.COMMA?this.handle_comma(e):e.type===l.BLOCK_COMMENT?this.handle_block_comment(e,t):e.type===l.COMMENT?this.handle_comment(e,t):e.type===l.DOT?this.handle_dot(e):e.type===l.EOF?this.handle_eof(e):(e.type,l.UNKNOWN,this.handle_unknown(e,t))},x.prototype.handle_whitespace_and_comments=function(e,t){var n=e.newlines,r=this._options.keep_array_indentation&&E(this._flags.mode);if(e.comments_before)for(var i=e.comments_before.next();i;)this.handle_whitespace_and_comments(i,t),this.handle_token(i,t),i=e.comments_before.next();if(r)for(var o=0;o<n;o+=1)this.print_newline(o>0,t);else if(this._options.max_preserve_newlines&&n>this._options.max_preserve_newlines&&(n=this._options.max_preserve_newlines),this._options.preserve_newlines&&n>1){this.print_newline(!1,t);for(var a=1;a<n;a+=1)this.print_newline(!0,t)}};var L=["async","break","continue","return","throw","yield"];return x.prototype.allow_wrap_or_preserved_newline=function(e,t){if(t=void 0!==t&&t,!this._output.just_added_newline()){var n=this._options.preserve_newlines&&e.newlines||t;if(s(this._flags.last_token.text,a)||s(e.text,a)){var r=s(this._flags.last_token.text,a)&&s(this._options.operator_position,p)||s(e.text,a);n=n&&r}if(n)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(u(this._flags.last_token,L))return;this._output.set_wrap_point()}}},x.prototype.print_newline=function(e,t){if(!t&&";"!==this._flags.last_token.text&&","!==this._flags.last_token.text&&"="!==this._flags.last_token.text&&(this._flags.last_token.type!==l.OPERATOR||"--"===this._flags.last_token.text||"++"===this._flags.last_token.text))for(var n=this._tokens.peek();!(this._flags.mode!==m||this._flags.if_block&&d(n,"else")||this._flags.do_block);)this.restore_mode();this._output.add_new_line(e)&&(this._flags.multiline_frame=!0)},x.prototype.print_token_line_indentation=function(e){this._output.just_added_newline()&&(this._options.keep_array_indentation&&e.newlines&&("["===e.text||E(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(e.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},x.prototype.print_token=function(e){if(this._output.raw)this._output.add_raw_token(e);else{if(this._options.comma_first&&e.previous&&e.previous.type===l.COMMA&&this._output.just_added_newline()&&","===this._output.previous_line.last()){var t=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(t),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(e),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(e),this._output.non_breaking_space=!0,this._output.add_token(e.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)}},x.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},x.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},x.prototype.set_mode=function(e){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,e),this._flags=this.create_flags(this._previous_flags,e),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},x.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===m&&b(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},x.prototype.start_of_object_property=function(){return this._flags.parent.mode===g&&this._flags.mode===m&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||u(this._flags.last_token,["get","set"]))},x.prototype.start_of_statement=function(e){var t=!1;return!!(t=(t=(t=(t=(t=(t=(t=t||u(this._flags.last_token,["var","let","const"])&&e.type===l.WORD)||d(this._flags.last_token,"do"))||!(this._flags.parent.mode===g&&this._flags.mode===m)&&u(this._flags.last_token,L)&&!e.newlines)||d(this._flags.last_token,"else")&&!(d(e,"if")&&!e.comments_before))||this._flags.last_token.type===l.END_EXPR&&(this._previous_flags.mode===A||this._previous_flags.mode===y))||this._flags.last_token.type===l.WORD&&this._flags.mode===C&&!this._flags.in_case&&!("--"===e.text||"++"===e.text)&&"function"!==this._last_last_text&&e.type!==l.WORD&&e.type!==l.RESERVED)||this._flags.mode===g&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||u(this._flags.last_token,["get","set"])))&&(this.set_mode(m),this.indent(),this.handle_whitespace_and_comments(e,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e,u(e,["do","for","if","while"])),!0)},x.prototype.handle_start_expr=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e);var t=w;if("["===e.text){if(this._flags.last_token.type===l.WORD||")"===this._flags.last_token.text)return u(this._flags.last_token,o)&&(this._output.space_before_token=!0),this.print_token(e),this.set_mode(t),this.indent(),void(this._options.space_in_paren&&(this._output.space_before_token=!0));t=v,E(this._flags.mode)&&("["!==this._flags.last_token.text&&(","!==this._flags.last_token.text||"]"!==this._last_last_text&&"}"!==this._last_last_text)||this._options.keep_array_indentation||this.print_newline()),s(this._flags.last_token.type,[l.START_EXPR,l.END_EXPR,l.WORD,l.OPERATOR,l.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===l.RESERVED)"for"===this._flags.last_token.text?(this._output.space_before_token=this._options.space_before_conditional,t=A):s(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,t=y):s(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:"import"===this._flags.last_token.text&&""===e.whitespace_before?this._output.space_before_token=!1:(s(this._flags.last_token.text,o)||"catch"===this._flags.last_token.text)&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e);else if(this._flags.last_token.type===l.WORD){this._output.space_before_token=!1;var n=this._tokens.peek(-3);if(this._options.space_after_named_function&&n){var r=this._tokens.peek(-4);u(n,["async","function"])||"*"===n.text&&u(r,["async","function"])?this._output.space_before_token=!0:this._flags.mode===g?"{"!==n.text&&","!==n.text&&("*"!==n.text||"{"!==r.text&&","!==r.text)||(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(e);(this._flags.last_token.type===l.RESERVED&&("function"===this._flags.last_word||"typeof"===this._flags.last_word)||"*"===this._flags.last_token.text&&(s(this._last_last_text,["function","yield"])||this._flags.mode===g&&s(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}";"===this._flags.last_token.text||this._flags.last_token.type===l.START_BLOCK?this.print_newline():this._flags.last_token.type!==l.END_EXPR&&this._flags.last_token.type!==l.START_EXPR&&this._flags.last_token.type!==l.END_BLOCK&&"."!==this._flags.last_token.text&&this._flags.last_token.type!==l.COMMA||this.allow_wrap_or_preserved_newline(e,e.newlines),this.print_token(e),this.set_mode(t),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},x.prototype.handle_end_expr=function(e){for(;this._flags.mode===m;)this.restore_mode();this.handle_whitespace_and_comments(e),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(e,"]"===e.text&&E(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type!==l.START_EXPR||this._options.space_in_empty_paren?this._output.space_before_token=!0:(this._output.trim(),this._output.space_before_token=!1)),this.deindent(),this.print_token(e),this.restore_mode(),b(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===y&&(this._previous_flags.mode=w,this._flags.do_block=!1,this._flags.do_while=!1)},x.prototype.handle_start_block=function(e){this.handle_whitespace_and_comments(e);var t=this._tokens.peek(),n=this._tokens.peek(1);"switch"===this._flags.last_word&&this._flags.last_token.type===l.END_EXPR?(this.set_mode(C),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(C):n&&(s(n.text,[":",","])&&s(t.type,[l.STRING,l.WORD,l.RESERVED])||s(t.text,["get","set","..."])&&s(n.type,[l.WORD,l.RESERVED]))?s(this._last_last_text,["class","interface"])&&!s(n.text,[":",","])?this.set_mode(C):this.set_mode(g):this._flags.last_token.type===l.OPERATOR&&"=>"===this._flags.last_token.text?this.set_mode(C):s(this._flags.last_token.type,[l.EQUALS,l.START_EXPR,l.COMMA,l.OPERATOR])||u(this._flags.last_token,["return","throw","import","default"])?this.set_mode(g):this.set_mode(C),this._flags.last_token&&u(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var r=!t.comments_before&&"}"===t.text,i=r&&"function"===this._flags.last_word&&this._flags.last_token.type===l.END_EXPR;if(this._options.brace_preserve_inline){var o=0,a=null;this._flags.inline_frame=!0;do{if(o+=1,(a=this._tokens.peek(o-1)).newlines){this._flags.inline_frame=!1;break}}while(a.type!==l.EOF&&(a.type!==l.END_BLOCK||a.opened!==e))}("expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==l.OPERATOR&&(i||this._flags.last_token.type===l.EQUALS||u(this._flags.last_token,f)&&"else"!==this._flags.last_token.text)?this._output.space_before_token=!0:this.print_newline(!1,!0):(!E(this._previous_flags.mode)||this._flags.last_token.type!==l.START_EXPR&&this._flags.last_token.type!==l.COMMA||((this._flags.last_token.type===l.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(e),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==l.OPERATOR&&this._flags.last_token.type!==l.START_EXPR&&(s(this._flags.last_token.type,[l.START_BLOCK,l.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(e),this.indent(),r||this._options.brace_preserve_inline&&this._flags.inline_frame||this.print_newline()},x.prototype.handle_end_block=function(e){for(this.handle_whitespace_and_comments(e);this._flags.mode===m;)this.restore_mode();var t=this._flags.last_token.type===l.START_BLOCK;this._flags.inline_frame&&!t?this._output.space_before_token=!0:"expand"===this._options.brace_style?t||this.print_newline():t||(E(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(e)},x.prototype.handle_word=function(e){if(e.type===l.RESERVED)if(s(e.text,["set","get"])&&this._flags.mode!==g)e.type=l.WORD;else if("import"===e.text&&s(this._tokens.peek().text,["(","."]))e.type=l.WORD;else if(s(e.text,["as","from"])&&!this._flags.import_block)e.type=l.WORD;else if(this._flags.mode===g){":"===this._tokens.peek().text&&(e.type=l.WORD)}if(this.start_of_statement(e)?u(this._flags.last_token,["var","let","const"])&&e.type===l.WORD&&(this._flags.declaration_statement=!0):!e.newlines||M(this._flags.mode)||this._flags.last_token.type===l.OPERATOR&&"--"!==this._flags.last_token.text&&"++"!==this._flags.last_token.text||this._flags.last_token.type===l.EQUALS||!this._options.preserve_newlines&&u(this._flags.last_token,["var","let","const","set","get"])?this.handle_whitespace_and_comments(e):(this.handle_whitespace_and_comments(e),this.print_newline()),this._flags.do_block&&!this._flags.do_while){if(d(e,"while"))return this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0,void(this._flags.do_while=!0);this.print_newline(),this._flags.do_block=!1}if(this._flags.if_block)if(!this._flags.else_block&&d(e,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===m;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&u(e,["case","default"]))return this.print_newline(),this._flags.case_block||!this._flags.case_body&&!this._options.jslint_happy||this.deindent(),this._flags.case_body=!1,this.print_token(e),void(this._flags.in_case=!0);if(this._flags.last_token.type!==l.COMMA&&this._flags.last_token.type!==l.START_EXPR&&this._flags.last_token.type!==l.EQUALS&&this._flags.last_token.type!==l.OPERATOR||this.start_of_object_property()||s(this._flags.last_token.text,["+","-"])&&":"===this._last_last_text&&this._flags.parent.mode===g||this.allow_wrap_or_preserved_newline(e),d(e,"function"))return(s(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!s(this._flags.last_token.text,["(","[","{",":","=",","])&&this._flags.last_token.type!==l.OPERATOR)&&(this._output.just_added_blankline()||e.comments_before||(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD?u(this._flags.last_token,["get","set","new","export"])||u(this._flags.last_token,L)||d(this._flags.last_token,"default")&&"export"===this._last_last_text||"declare"===this._flags.last_token.text?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===l.OPERATOR||"="===this._flags.last_token.text?this._output.space_before_token=!0:(this._flags.multiline_frame||!M(this._flags.mode)&&!E(this._flags.mode))&&this.print_newline(),this.print_token(e),void(this._flags.last_word=e.text);var t="NONE";(this._flags.last_token.type===l.END_BLOCK?this._previous_flags.inline_frame?t="SPACE":u(e,["else","catch","finally","from"])?"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines?t="NEWLINE":(t="SPACE",this._output.space_before_token=!0):t="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&this._flags.mode===C?t="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&M(this._flags.mode)?t="SPACE":this._flags.last_token.type===l.STRING?t="NEWLINE":this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||"*"===this._flags.last_token.text&&(s(this._last_last_text,["function","yield"])||this._flags.mode===g&&s(this._last_last_text,["{",","]))?t="SPACE":this._flags.last_token.type===l.START_BLOCK?t=this._flags.inline_frame?"SPACE":"NEWLINE":this._flags.last_token.type===l.END_EXPR&&(this._output.space_before_token=!0,t="NEWLINE"),u(e,o)&&")"!==this._flags.last_token.text&&(t=this._flags.inline_frame||"else"===this._flags.last_token.text||"export"===this._flags.last_token.text?"SPACE":"NEWLINE"),u(e,["else","catch","finally"]))?(this._flags.last_token.type!==l.END_BLOCK||this._previous_flags.mode!==C||"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines)&&!this._flags.inline_frame?this.print_newline():(this._output.trim(!0),"}"!==this._output.current_line.last()&&this.print_newline(),this._output.space_before_token=!0):"NEWLINE"===t?u(this._flags.last_token,f)||"declare"===this._flags.last_token.text&&u(e,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==l.END_EXPR?this._flags.last_token.type===l.START_EXPR&&u(e,["var","let","const"])||":"===this._flags.last_token.text||(d(e,"if")&&d(e.previous,"else")?this._output.space_before_token=!0:this.print_newline()):u(e,o)&&")"!==this._flags.last_token.text&&this.print_newline():this._flags.multiline_frame&&E(this._flags.mode)&&","===this._flags.last_token.text&&"}"===this._last_last_text?this.print_newline():"SPACE"===t&&(this._output.space_before_token=!0);!e.previous||e.previous.type!==l.WORD&&e.previous.type!==l.RESERVED||(this._output.space_before_token=!0),this.print_token(e),this._flags.last_word=e.text,e.type===l.RESERVED&&("do"===e.text?this._flags.do_block=!0:"if"===e.text?this._flags.if_block=!0:"import"===e.text?this._flags.import_block=!0:this._flags.import_block&&d(e,"from")&&(this._flags.import_block=!1))},x.prototype.handle_semicolon=function(e){this.start_of_statement(e)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(e);for(var t=this._tokens.peek();!(this._flags.mode!==m||this._flags.if_block&&d(t,"else")||this._flags.do_block);)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(e)},x.prototype.handle_string=function(e){(!e.text.startsWith("`")||0!==e.newlines||""!==e.whitespace_before||")"!==e.previous.text&&this._flags.last_token.type!==l.WORD)&&(this.start_of_statement(e)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(e),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e):!e.text.startsWith("`")||this._flags.last_token.type!==l.END_EXPR||"]"!==e.previous.text&&")"!==e.previous.text||0!==e.newlines?this.print_newline():this._output.space_before_token=!0)),this.print_token(e)},x.prototype.handle_equals=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0},x.prototype.handle_comma=function(e){this.handle_whitespace_and_comments(e,!0),this.print_token(e),this._output.space_before_token=!0,this._flags.declaration_statement?(M(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)):this._flags.mode===g||this._flags.mode===m&&this._flags.parent.mode===g?(this._flags.mode===m&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)},x.prototype.handle_operator=function(e){var t="*"===e.text&&(u(this._flags.last_token,["function","yield"])||s(this._flags.last_token.type,[l.START_BLOCK,l.COMMA,l.END_BLOCK,l.SEMICOLON])),n=s(e.text,["-","+"])&&(s(this._flags.last_token.type,[l.START_BLOCK,l.START_EXPR,l.EQUALS,l.OPERATOR])||s(this._flags.last_token.text,o)||","===this._flags.last_token.text);if(this.start_of_statement(e));else{var r=!t;this.handle_whitespace_and_comments(e,r)}if("*"!==e.text||this._flags.last_token.type!==l.DOT)if("::"!==e.text)if(s(e.text,["-","+"])&&this.start_of_object_property())this.print_token(e);else{if(this._flags.last_token.type===l.OPERATOR&&s(this._options.operator_position,p)&&this.allow_wrap_or_preserved_newline(e),":"===e.text&&this._flags.in_case)return this.print_token(e),this._flags.in_case=!1,this._flags.case_body=!0,void(this._tokens.peek().type!==l.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0));var i=!0,c=!0,d=!1;if(":"===e.text?0===this._flags.ternary_depth?i=!1:(this._flags.ternary_depth-=1,d=!0):"?"===e.text&&(this._flags.ternary_depth+=1),!n&&!t&&this._options.preserve_newlines&&s(e.text,a)){var g=":"===e.text,v=g&&d,A=g&&!d;switch(this._options.operator_position){case h.before_newline:return this._output.space_before_token=!A,this.print_token(e),g&&!v||this.allow_wrap_or_preserved_newline(e),void(this._output.space_before_token=!0);case h.after_newline:return this._output.space_before_token=!0,!g||v?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(e):this._output.space_before_token=!1,this.print_token(e),void(this._output.space_before_token=!0);case h.preserve_newline:return A||this.allow_wrap_or_preserved_newline(e),i=!(this._output.just_added_newline()||A),this._output.space_before_token=i,this.print_token(e),void(this._output.space_before_token=!0)}}if(t){this.allow_wrap_or_preserved_newline(e),i=!1;var y=this._tokens.peek();c=y&&s(y.type,[l.WORD,l.RESERVED])}else if("..."===e.text)this.allow_wrap_or_preserved_newline(e),i=this._flags.last_token.type===l.START_BLOCK,c=!1;else if(s(e.text,["--","++","!","~"])||n){if(this._flags.last_token.type!==l.COMMA&&this._flags.last_token.type!==l.START_EXPR||this.allow_wrap_or_preserved_newline(e),i=!1,c=!1,e.newlines&&("--"===e.text||"++"===e.text||"~"===e.text)){var w=u(this._flags.last_token,f)&&e.newlines;w&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(w,!0)}";"===this._flags.last_token.text&&M(this._flags.mode)&&(i=!0),this._flags.last_token.type===l.RESERVED?i=!0:this._flags.last_token.type===l.END_EXPR?i=!("]"===this._flags.last_token.text&&("--"===e.text||"++"===e.text)):this._flags.last_token.type===l.OPERATOR&&(i=s(e.text,["--","-","++","+"])&&s(this._flags.last_token.text,["--","-","++","+"]),s(e.text,["+","-"])&&s(this._flags.last_token.text,["--","++"])&&(c=!0)),(this._flags.mode!==C||this._flags.inline_frame)&&this._flags.mode!==m||"{"!==this._flags.last_token.text&&";"!==this._flags.last_token.text||this.print_newline()}this._output.space_before_token=this._output.space_before_token||i,this.print_token(e),this._output.space_before_token=c}else this.print_token(e);else this.print_token(e)},x.prototype.handle_block_comment=function(e,t){return this._output.raw?(this._output.add_raw_token(e),void(e.directives&&"end"===e.directives.preserve&&(this._output.raw=this._options.test_output_raw))):e.directives?(this.print_newline(!1,t),this.print_token(e),"start"===e.directives.preserve&&(this._output.raw=!0),void this.print_newline(!1,!0)):n.newline.test(e.text)||e.newlines?void this.print_block_commment(e,t):(this._output.space_before_token=!0,this.print_token(e),void(this._output.space_before_token=!0))},x.prototype.print_block_commment=function(e,t){var r,i=function(e){for(var t=[],r=(e=e.replace(n.allLineBreaks,"\n")).indexOf("\n");-1!==r;)t.push(e.substring(0,r)),r=(e=e.substring(r+1)).indexOf("\n");return e.length&&t.push(e),t}(e.text),o=!1,a=!1,l=e.whitespace_before,s=l.length;if(this.print_newline(!1,t),this.print_token_line_indentation(e),this._output.add_token(i[0]),this.print_newline(!1,t),i.length>1){for(o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].trim().charAt(0)!==t)return!1;return!0}(i=i.slice(1),"*"),a=function(e,t){for(var n,r=0,i=e.length;r<i;r++)if((n=e[r])&&0!==n.indexOf(t))return!1;return!0}(i,l),o&&(this._flags.alignment=1),r=0;r<i.length;r++)o?(this.print_token_line_indentation(e),this._output.add_token(c(i[r]))):a&&i[r]?(this.print_token_line_indentation(e),this._output.add_token(i[r].substring(s))):(this._output.current_line.set_indent(-1),this._output.add_token(i[r])),this.print_newline(!1,t);this._flags.alignment=0}},x.prototype.handle_comment=function(e,t){e.newlines?this.print_newline(!1,t):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(e),this.print_newline(!1,t)},x.prototype.handle_dot=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),u(this._flags.last_token,f)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(e,")"===this._flags.last_token.text&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(e)},x.prototype.handle_unknown=function(e,t){this.print_token(e),"\n"===e.text[e.text.length-1]&&this.print_newline(!1,t)},x.prototype.handle_eof=function(e){for(;this._flags.mode===m;)this.restore_mode();this.handle_whitespace_and_comments(e)},fH.Beautifier=x,fH}var JH,$H,ek,tk={exports:{}},nk={},rk={};function ik(){if(JH)return rk;JH=1;var e=xH().Options;function t(t){e.call(this,t,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var n=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||n;var r=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var i=0;i<r.length;i++)"expand"!==r[i]?this.brace_style="collapse":this.brace_style=r[i]}return t.prototype=new e,rk.Options=t,rk}function ok(){if(ek)return tk.exports;ek=1;var e=function(){if($H)return nk;$H=1;var e=ik().Options,t=pH().Output,n=SH().InputScanner,r=new(0,FH().Directives)(/\/\*/,/\*\//),i=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,a=/\s/,l=/(?:\s|\n)+/g,s=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,c=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function d(t,n){this._source_text=t||"",this._options=new e(n),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}return d.prototype.eatString=function(e){var t="";for(this._ch=this._input.next();this._ch;){if(t+=this._ch,"\\"===this._ch)t+=this._input.next();else if(-1!==e.indexOf(this._ch)||"\n"===this._ch)break;this._ch=this._input.next()}return t},d.prototype.eatWhitespace=function(e){for(var t=a.test(this._input.peek()),n=0;a.test(this._input.peek());)this._ch=this._input.next(),e&&"\n"===this._ch&&(0===n||n<this._options.max_preserve_newlines)&&(n++,this._output.add_new_line(!0));return t},d.prototype.foundNestedPseudoClass=function(){for(var e=0,t=1,n=this._input.peek(t);n;){if("{"===n)return!0;if("("===n)e+=1;else if(")"===n){if(0===e)return!1;e-=1}else if(";"===n||"}"===n)return!1;t++,n=this._input.peek(t)}return!1},d.prototype.print_string=function(e){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(e)},d.prototype.preserveSingleSpace=function(e){e&&(this._output.space_before_token=!0)},d.prototype.indent=function(){this._indentLevel++},d.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},d.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,d=this._options.eol;"auto"===d&&(d="\n",e&&i.test(e||"")&&(d=e.match(i)[0]));var u=(e=e.replace(o,"\n")).match(/^[\t ]*/)[0];this._output=new t(this._options,u),this._input=new n(e),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var f,h,p=0,C=!1,m=!1,g=!1,v=!1,A=!1,y=this._ch,w=!1;f=""!==this._input.read(l),h=y,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),y=this._ch,this._ch;)if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var b=this._input.read(s),E=r.get_directives(b);E&&"start"===E.ignore&&(b+=r.readIgnored(this._input)),this.print_string(b),this.eatWhitespace(!0),this._output.add_new_line()}else if("/"===this._ch&&"/"===this._input.peek())this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(c)),this.eatWhitespace(!0);else if("$"===this._ch){this.preserveSingleSpace(f),this.print_string(this._ch);var M=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);M.match(/[ :]$/)&&(M=this.eatString(": ").replace(/\s+$/,""),this.print_string(M),this._output.space_before_token=!0),0===p&&-1!==M.indexOf(":")&&(m=!0,this.indent())}else if("@"===this._ch)if(this.preserveSingleSpace(f),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var x=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);x.match(/[ :]$/)&&(x=this.eatString(": ").replace(/\s+$/,""),this.print_string(x),this._output.space_before_token=!0),0===p&&-1!==x.indexOf(":")?(m=!0,this.indent()):x in this.NESTED_AT_RULE?(this._nestedLevel+=1,x in this.CONDITIONAL_GROUP_RULE&&(g=!0)):0!==p||m||(v=!0)}else if("#"===this._ch&&"{"===this._input.peek())this.preserveSingleSpace(f),this.print_string(this._ch+this.eatString("}"));else if("{"===this._ch)m&&(m=!1,this.outdent()),v=!1,g?(g=!1,C=this._indentLevel>=this._nestedLevel):C=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&C&&this._output.previous_line&&"{"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,"expand"===this._options.brace_style?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):("("===h?this._output.space_before_token=!1:","!==h&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if("}"===this._ch)this.outdent(),this._output.add_new_line(),"{"===h&&this._output.trim(!0),m&&(this.outdent(),m=!1),this.print_string(this._ch),C=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&"}"!==this._input.peek()&&this._output.add_new_line(!0),")"===this._input.peek()&&(this._output.trim(!0),"expand"===this._options.brace_style&&this._output.add_new_line(!0));else if(":"===this._ch){for(var L=0;L<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;L++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[L])){w=!0;break}!C&&!g||this._input.lookBack("&")||this.foundNestedPseudoClass()||this._input.lookBack("(")||v||0!==p?(this._input.lookBack(" ")&&(this._output.space_before_token=!0),":"===this._input.peek()?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):(this.print_string(":"),m||(m=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent()))}else if('"'===this._ch||"'"===this._ch){var H='"'===h||"'"===h;this.preserveSingleSpace(H||f),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(";"===this._ch)w=!1,0===p?(m&&(this.outdent(),m=!1),v=!1,this.print_string(this._ch),this.eatWhitespace(!0),"/"!==this._input.peek()&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if("("===this._ch)if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),p++,this.indent(),this._ch=this._input.next(),")"===this._ch||'"'===this._ch||"'"===this._ch?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),p&&(p--,this.outdent()));else{var k=!1;this._input.lookBack("with")&&(k=!0),this.preserveSingleSpace(f||k),this.print_string(this._ch),m&&"$"===h&&this._options.selector_separator_newline?(this._output.add_new_line(),A=!0):(this.eatWhitespace(),p++,this.indent())}else if(")"===this._ch)p&&(p--,this.outdent()),A&&";"===this._input.peek()&&this._options.selector_separator_newline&&(A=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(","===this._ch)this.print_string(this._ch),this.eatWhitespace(!0),!this._options.selector_separator_newline||m&&!A||0!==p||v?this._output.space_before_token=!0:this._output.add_new_line();else if(">"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||m||0!==p)if("]"===this._ch)this.print_string(this._ch);else if("["===this._ch)this.preserveSingleSpace(f),this.print_string(this._ch);else if("="===this._ch)this.eatWhitespace(),this.print_string("="),a.test(this._ch)&&(this._ch="");else if("!"!==this._ch||this._input.lookBack("\\")){var V='"'===h||"'"===h;this.preserveSingleSpace(V||f),this.print_string(this._ch),!this._output.just_added_newline()&&"\n"===this._input.peek()&&w&&this._output.add_new_line()}else this._output.space_before_token=!0,this.print_string(this._ch);else this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&a.test(this._ch)&&(this._ch=""));return this._output.get_code(d)},nk.Beautifier=d,nk}().Beautifier,t=ik().Options;return tk.exports=function(t,n){return new e(t,n).beautify()},tk.exports.defaultOptions=function(){return new t},tk.exports}var ak,lk={exports:{}},sk={},ck={};function dk(){if(ak)return ck;ak=1;var e=xH().Options;function t(t){e.call(this,t,"html"),1===this.templating.length&&"auto"===this.templating[0]&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}return t.prototype=new e,ck.Options=t,ck}var uk,fk,hk,pk,Ck,mk={};function gk(){if(uk)return mk;uk=1;var e=jH().Tokenizer,t=jH().TOKEN,n=FH().Directives,r=GH().TemplatablePattern,i=RH().Pattern,o={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:t.START,RAW:t.RAW,EOF:t.EOF},a=new n(/<\!--/,/-->/),l=function(t,n){e.call(this,t,n),this._current_tag_name="";var o=new r(this._input).read_options(this._options),a=new i(this._input);if(this.__patterns={word:o.until(/[\n\r\t <]/),word_control_flow_close_excluded:o.until(/[\n\r\t <}]/),single_quote:o.until_after(/'/),double_quote:o.until_after(/"/),attribute:o.until(/[\n\r\t =>]|\/>/),element_name:o.until(/[\n\r\t >\/]/),angular_control_flow_start:a.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:a.starting_with(/{{!--/).until_after(/--}}/),handlebars:a.starting_with(/{{/).until_after(/}}/),handlebars_open:a.until(/[\n\r\t }]/),handlebars_raw_close:a.until(/}}/),comment:a.starting_with(/<!--/).until_after(/-->/),cdata:a.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:a.starting_with(/<!\[/).until_after(/]>/),processing:a.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var l=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=a.matching(l).until_after(l)}};return(l.prototype=new e)._is_comment=function(e){return!1},l.prototype._is_opening=function(e){return e.type===o.TAG_OPEN||e.type===o.CONTROL_FLOW_OPEN},l.prototype._is_closing=function(e,t){return e.type===o.TAG_CLOSE&&t&&((">"===e.text||"/>"===e.text)&&"<"===t.text[0]||"}}"===e.text&&"{"===t.text[0]&&"{"===t.text[1])||e.type===o.CONTROL_FLOW_CLOSE&&"}"===e.text&&t.text.endsWith("{")},l.prototype._reset=function(){this._current_tag_name=""},l.prototype._get_next_token=function(e,t){var n=null;this._readWhitespace();var r=this._input.peek();return null===r?this._create_token(o.EOF,""):n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n||this._read_open_handlebars(r,t))||this._read_attribute(r,e,t))||this._read_close(r,t))||this._read_script_and_style(r,e))||this._read_control_flows(r,t))||this._read_raw_content(r,e,t))||this._read_content_word(r,t))||this._read_comment_or_cdata(r))||this._read_processing(r))||this._read_open(r,t))||this._create_token(o.UNKNOWN,this._input.next())},l.prototype._read_comment_or_cdata=function(e){var t=null,n=null,r=null;"<"===e&&("!"===this._input.peek(1)&&((n=this.__patterns.comment.read())?(r=a.get_directives(n))&&"start"===r.ignore&&(n+=a.readIgnored(this._input)):n=this.__patterns.cdata.read()),n&&((t=this._create_token(o.COMMENT,n)).directives=r));return t},l.prototype._read_processing=function(e){var t=null,n=null;if("<"===e){var r=this._input.peek(1);"!"!==r&&"?"!==r||(n=(n=this.__patterns.conditional_comment.read())||this.__patterns.processing.read()),n&&((t=this._create_token(o.COMMENT,n)).directives=null)}return t},l.prototype._read_open=function(e,t){var n=null,r=null;return t&&t.type!==o.CONTROL_FLOW_OPEN||"<"===e&&(n=this._input.next(),"/"===this._input.peek()&&(n+=this._input.next()),n+=this.__patterns.element_name.read(),r=this._create_token(o.TAG_OPEN,n)),r},l.prototype._read_open_handlebars=function(e,t){var n=null,r=null;return t&&t.type!==o.CONTROL_FLOW_OPEN||(this._options.templating.includes("angular")||this._options.indent_handlebars)&&"{"===e&&"{"===this._input.peek(1)&&(this._options.indent_handlebars&&"!"===this._input.peek(2)?(n=(n=this.__patterns.handlebars_comment.read())||this.__patterns.handlebars.read(),r=this._create_token(o.COMMENT,n)):(n=this.__patterns.handlebars_open.read(),r=this._create_token(o.TAG_OPEN,n))),r},l.prototype._read_control_flows=function(e,t){var n="",r=null;if(!this._options.templating.includes("angular"))return r;if("@"===e){if(""===(n=this.__patterns.angular_control_flow_start.read()))return r;for(var i=n.endsWith("(")?1:0,a=0;!n.endsWith("{")||i!==a;){var l=this._input.next();if(null===l)break;"("===l?i++:")"===l&&a++,n+=l}r=this._create_token(o.CONTROL_FLOW_OPEN,n)}else"}"===e&&t&&t.type===o.CONTROL_FLOW_OPEN&&(n=this._input.next(),r=this._create_token(o.CONTROL_FLOW_CLOSE,n));return r},l.prototype._read_close=function(e,t){var n=null,r=null;return t&&t.type===o.TAG_OPEN&&("<"===t.text[0]&&(">"===e||"/"===e&&">"===this._input.peek(1))?(n=this._input.next(),"/"===e&&(n+=this._input.next()),r=this._create_token(o.TAG_CLOSE,n)):"{"===t.text[0]&&"}"===e&&"}"===this._input.peek(1)&&(this._input.next(),this._input.next(),r=this._create_token(o.TAG_CLOSE,"}}"))),r},l.prototype._read_attribute=function(e,t,n){var r=null,i="";if(n&&"<"===n.text[0])if("="===e)r=this._create_token(o.EQUALS,this._input.next());else if('"'===e||"'"===e){var a=this._input.next();a+='"'===e?this.__patterns.double_quote.read():this.__patterns.single_quote.read(),r=this._create_token(o.VALUE,a)}else(i=this.__patterns.attribute.read())&&(r=t.type===o.EQUALS?this._create_token(o.VALUE,i):this._create_token(o.ATTRIBUTE,i));return r},l.prototype._is_content_unformatted=function(e){return-1===this._options.void_elements.indexOf(e)&&(-1!==this._options.content_unformatted.indexOf(e)||-1!==this._options.unformatted.indexOf(e))},l.prototype._read_raw_content=function(e,t,n){var r="";if(n&&"{"===n.text[0])r=this.__patterns.handlebars_raw_close.read();else if(t.type===o.TAG_CLOSE&&"<"===t.opened.text[0]&&"/"!==t.text[0]){var i=t.opened.text.substr(1).toLowerCase();this._is_content_unformatted(i)&&(r=this._input.readUntil(new RegExp("</"+i+"[\\n\\r\\t ]*?>","ig")))}return r?this._create_token(o.TEXT,r):null},l.prototype._read_script_and_style=function(e,t){if(t.type===o.TAG_CLOSE&&"<"===t.opened.text[0]&&"/"!==t.text[0]){var n=t.opened.text.substr(1).toLowerCase();if("script"===n||"style"===n){var r=this._read_comment_or_cdata(e);if(r)return r.type=o.TEXT,r;var i=this._input.readUntil(new RegExp("</"+n+"[\\n\\r\\t ]*?>","ig"));if(i)return this._create_token(o.TEXT,i)}}return null},l.prototype._read_content_word=function(e,t){var n="";return this._options.unformatted_content_delimiter&&e===this._options.unformatted_content_delimiter[0]&&(n=this.__patterns.unformatted_content_delimiter.read()),n||(n=t&&t.type===o.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),n?this._create_token(o.TEXT,n):null},mk.Tokenizer=l,mk.TOKEN=o,mk}function vk(){if(fk)return sk;fk=1;var e=dk().Options,t=pH().Output,n=gk().Tokenizer,r=gk().TOKEN,i=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,a=function(e,n){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=e.max_preserve_newlines,this.preserve_newlines=e.preserve_newlines,this._output=new t(e,n)};a.prototype.current_line_has_match=function(e){return this._output.current_line.has_match(e)},a.prototype.set_space_before_token=function(e,t){this._output.space_before_token=e,this._output.non_breaking_space=t},a.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},a.prototype.add_raw_token=function(e){this._output.add_raw_token(e)},a.prototype.print_preserved_newlines=function(e){var t=0;e.type!==r.TEXT&&e.previous.type!==r.TEXT&&(t=e.newlines?1:0),this.preserve_newlines&&(t=e.newlines<this.max_preserve_newlines+1?e.newlines:this.max_preserve_newlines+1);for(var n=0;n<t;n++)this.print_newline(n>0);return 0!==t},a.prototype.traverse_whitespace=function(e){return!(!e.whitespace_before&&!e.newlines)&&(this.print_preserved_newlines(e)||(this._output.space_before_token=!0),!0)},a.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},a.prototype.print_newline=function(e){this._output.add_new_line(e)},a.prototype.print_token=function(e){e.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(e.text))},a.prototype.indent=function(){this.indent_level++},a.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},a.prototype.get_full_indent=function(e){return(e=this.indent_level+(e||0))<1?"":this._output.get_indent_string(e)};var l=function(e,t){var n=null,i=null;return t.closed?("script"===e?n="text/javascript":"style"===e&&(n="text/css"),n=function(e){for(var t=null,n=e.next;n.type!==r.EOF&&e.closed!==n;){if(n.type===r.ATTRIBUTE&&"type"===n.text){n.next&&n.next.type===r.EQUALS&&n.next.next&&n.next.next.type===r.VALUE&&(t=n.next.next.text);break}n=n.next}return t}(t)||n,n.search("text/css")>-1?i="css":n.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?i="javascript":n.search(/(text|application|dojo)\/(x-)?(html)/)>-1?i="html":n.search(/test\/null/)>-1&&(i="null"),i):null};function s(e,t){return-1!==t.indexOf(e)}function c(e,t,n){this.parent=e||null,this.tag=t?t.tag_name:"",this.indent_level=n||0,this.parser_token=t||null}function d(e){this._printer=e,this._current_frame=null}function u(t,n,r,i){this._source_text=t||"",n=n||{},this._js_beautify=r,this._css_beautify=i,this._tag_stack=null;var o=new e(n,"html");this._options=o,this._is_wrap_attributes_force="force"===this._options.wrap_attributes.substr(0,5),this._is_wrap_attributes_force_expand_multiline="force-expand-multiline"===this._options.wrap_attributes,this._is_wrap_attributes_force_aligned="force-aligned"===this._options.wrap_attributes,this._is_wrap_attributes_aligned_multiple="aligned-multiple"===this._options.wrap_attributes,this._is_wrap_attributes_preserve="preserve"===this._options.wrap_attributes.substr(0,8),this._is_wrap_attributes_preserve_aligned="preserve-aligned"===this._options.wrap_attributes}d.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},d.prototype.record_tag=function(e){var t=new c(this._current_frame,e,this._printer.indent_level);this._current_frame=t},d.prototype._try_pop_frame=function(e){var t=null;return e&&(t=e.parser_token,this._printer.indent_level=e.indent_level,this._current_frame=e.parent),t},d.prototype._get_frame=function(e,t){for(var n=this._current_frame;n&&-1===e.indexOf(n.tag);){if(t&&-1!==t.indexOf(n.tag)){n=null;break}n=n.parent}return n},d.prototype.try_pop=function(e,t){var n=this._get_frame([e],t);return this._try_pop_frame(n)},d.prototype.indent_to_tag=function(e){var t=this._get_frame(e);t&&(this._printer.indent_level=t.indent_level)},u.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,t=this._options.eol;"auto"===this._options.eol&&(t="\n",e&&i.test(e)&&(t=e.match(i)[0]));var l=(e=e.replace(o,"\n")).match(/^[\t ]*/)[0],s={text:"",type:""},c=new f(this._options),u=new a(this._options,l),h=new n(e,this._options).tokenize();this._tag_stack=new d(u);for(var p=null,C=h.next();C.type!==r.EOF;)C.type===r.TAG_OPEN||C.type===r.COMMENT?c=p=this._handle_tag_open(u,C,c,s,h):C.type===r.ATTRIBUTE||C.type===r.EQUALS||C.type===r.VALUE||C.type===r.TEXT&&!c.tag_complete?p=this._handle_inside_tag(u,C,c,s):C.type===r.TAG_CLOSE?p=this._handle_tag_close(u,C,c):C.type===r.TEXT?p=this._handle_text(u,C,c):C.type===r.CONTROL_FLOW_OPEN?p=this._handle_control_flow_open(u,C):C.type===r.CONTROL_FLOW_CLOSE?p=this._handle_control_flow_close(u,C):u.add_raw_token(C),s=p,C=h.next();return u._output.get_code(t)},u.prototype._handle_control_flow_open=function(e,t){var n={text:t.text,type:t.type};return e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),t.newlines?e.print_preserved_newlines(t):e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),e.print_token(t),e.indent(),n},u.prototype._handle_control_flow_close=function(e,t){var n={text:t.text,type:t.type};return e.deindent(),t.newlines?e.print_preserved_newlines(t):e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),e.print_token(t),n},u.prototype._handle_tag_close=function(e,t,n){var r={text:t.text,type:t.type};return e.alignment_size=0,n.tag_complete=!0,e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),n.is_unformatted?e.add_raw_token(t):("<"===n.tag_start_char&&(e.set_space_before_token("/"===t.text[0],!0),this._is_wrap_attributes_force_expand_multiline&&n.has_wrapped_attrs&&e.print_newline(!1)),e.print_token(t)),!n.indent_content||n.is_unformatted||n.is_content_unformatted||(e.indent(),n.indent_content=!1),n.is_inline_element||n.is_unformatted||n.is_content_unformatted||e.set_wrap_point(),r},u.prototype._handle_inside_tag=function(e,t,n,i){var o=n.has_wrapped_attrs,a={text:t.text,type:t.type};return e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),n.is_unformatted?e.add_raw_token(t):"{"===n.tag_start_char&&t.type===r.TEXT?e.print_preserved_newlines(t)?(t.newlines=0,e.add_raw_token(t)):e.print_token(t):(t.type===r.ATTRIBUTE?e.set_space_before_token(!0):(t.type===r.EQUALS||t.type===r.VALUE&&t.previous.type===r.EQUALS)&&e.set_space_before_token(!1),t.type===r.ATTRIBUTE&&"<"===n.tag_start_char&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(e.traverse_whitespace(t),o=o||0!==t.newlines),this._is_wrap_attributes_force&&n.attr_count>=this._options.wrap_attributes_min_attrs&&(i.type!==r.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(e.print_newline(!1),o=!0)),e.print_token(t),o=o||e.previous_token_wrapped(),n.has_wrapped_attrs=o),a},u.prototype._handle_text=function(e,t,n){var r={text:t.text,type:"TK_CONTENT"};return n.custom_beautifier_name?this._print_custom_beatifier_text(e,t,n):n.is_unformatted||n.is_content_unformatted?e.add_raw_token(t):(e.traverse_whitespace(t),e.print_token(t)),r},u.prototype._print_custom_beatifier_text=function(e,t,n){var r=this;if(""!==t.text){var i,o=t.text,a=1,l="",s="";"javascript"===n.custom_beautifier_name&&"function"==typeof this._js_beautify?i=this._js_beautify:"css"===n.custom_beautifier_name&&"function"==typeof this._css_beautify?i=this._css_beautify:"html"===n.custom_beautifier_name&&(i=function(e,t){return new u(e,t,r._js_beautify,r._css_beautify).beautify()}),"keep"===this._options.indent_scripts?a=0:"separate"===this._options.indent_scripts&&(a=-e.indent_level);var c=e.get_full_indent(a);if(o=o.replace(/\n[ \t]*$/,""),"html"!==n.custom_beautifier_name&&"<"===o[0]&&o.match(/^(<!--|<!\[CDATA\[)/)){var d=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(o);if(!d)return void e.add_raw_token(t);l=c+d[1]+"\n",o=d[4],d[5]&&(s=c+d[5]),o=o.replace(/\n[ \t]*$/,""),(d[2]||-1!==d[3].indexOf("\n"))&&(d=d[3].match(/[ \t]+$/))&&(t.whitespace_before=d[0])}if(o)if(i){var f=function(){this.eol="\n"};f.prototype=this._options.raw_options,o=i(c+o,new f)}else{var h=t.whitespace_before;h&&(o=o.replace(new RegExp("\n("+h+")?","g"),"\n")),o=c+o.replace(/\n/g,"\n"+c)}l&&(o=o?l+o+"\n"+s:l+s),e.print_newline(!1),o&&(t.text=o,t.whitespace_before="",t.newlines=0,e.add_raw_token(t),e.print_newline(!0))}},u.prototype._handle_tag_open=function(e,t,n,i,o){var a=this._get_tag_open_token(t);if(!n.is_unformatted&&!n.is_content_unformatted||n.is_empty_element||t.type!==r.TAG_OPEN||a.is_start_tag?(e.traverse_whitespace(t),this._set_tag_position(e,t,a,n,i),a.is_inline_element||e.set_wrap_point(),e.print_token(t)):(e.add_raw_token(t),a.start_tag_token=this._tag_stack.try_pop(a.tag_name)),a.is_start_tag&&this._is_wrap_attributes_force){var l,s=0;do{(l=o.peek(s)).type===r.ATTRIBUTE&&(a.attr_count+=1),s+=1}while(l.type!==r.EOF&&l.type!==r.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(a.alignment_size=t.text.length+1),a.tag_complete||a.is_unformatted||(e.alignment_size=a.alignment_size),a};var f=function(e,t,n){if(this.parent=t||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",n){var i;this.tag_start_char=n.text[0],this.text=n.text,"<"===this.tag_start_char?(i=n.text.match(/^<([^\s>]*)/),this.tag_check=i?i[1]:""):(i=n.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=i?i[1]:"",(n.text.startsWith("{{#>")||n.text.startsWith("{{~#>"))&&">"===this.tag_check[0]&&(">"===this.tag_check&&null!==n.next?this.tag_check=n.next.text.split(" ")[0]:this.tag_check=n.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),n.type===r.COMMENT&&(this.tag_complete=!0),this.is_start_tag="/"!==this.tag_check.charAt(0),this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||n.closed&&"/>"===n.closed.text;var o=2;"{"===this.tag_start_char&&this.text.length>=3&&"~"===this.text.charAt(2)&&(o=3),this.is_end_tag=this.is_end_tag||"{"===this.tag_start_char&&(!e.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(o)))}else this.tag_complete=!0};u.prototype._get_tag_open_token=function(e){var t=new f(this._options,this._tag_stack.get_parser_token(),e);return t.alignment_size=this._options.wrap_attributes_indent_size,t.is_end_tag=t.is_end_tag||s(t.tag_check,this._options.void_elements),t.is_empty_element=t.tag_complete||t.is_start_tag&&t.is_end_tag,t.is_unformatted=!t.tag_complete&&s(t.tag_check,this._options.unformatted),t.is_content_unformatted=!t.is_empty_element&&s(t.tag_check,this._options.content_unformatted),t.is_inline_element=s(t.tag_name,this._options.inline)||this._options.inline_custom_elements&&t.tag_name.includes("-")||"{"===t.tag_start_char,t},u.prototype._set_tag_position=function(e,t,n,i,o){if(n.is_empty_element||(n.is_end_tag?n.start_tag_token=this._tag_stack.try_pop(n.tag_name):(this._do_optional_end_element(n)&&(n.is_inline_element||e.print_newline(!1)),this._tag_stack.record_tag(n),"script"!==n.tag_name&&"style"!==n.tag_name||n.is_unformatted||n.is_content_unformatted||(n.custom_beautifier_name=l(n.tag_check,t)))),s(n.tag_check,this._options.extra_liners)&&(e.print_newline(!1),e._output.just_added_blankline()||e.print_newline(!0)),n.is_empty_element){if("{"===n.tag_start_char&&"else"===n.tag_check)this._tag_stack.indent_to_tag(["if","unless","each"]),n.indent_content=!0,e.current_line_has_match(/{{#if/)||e.print_newline(!1);"!--"===n.tag_name&&o.type===r.TAG_CLOSE&&i.is_end_tag&&-1===n.text.indexOf("\n")||(n.is_inline_element||n.is_unformatted||e.print_newline(!1),this._calcluate_parent_multiline(e,n))}else if(n.is_end_tag){var a=!1;a=(a=n.start_tag_token&&n.start_tag_token.multiline_content)||!n.is_inline_element&&!(i.is_inline_element||i.is_unformatted)&&!(o.type===r.TAG_CLOSE&&n.start_tag_token===i)&&"TK_CONTENT"!==o.type,(n.is_content_unformatted||n.is_unformatted)&&(a=!1),a&&e.print_newline(!1)}else n.indent_content=!n.custom_beautifier_name,"<"===n.tag_start_char&&("html"===n.tag_name?n.indent_content=this._options.indent_inner_html:"head"===n.tag_name?n.indent_content=this._options.indent_head_inner_html:"body"===n.tag_name&&(n.indent_content=this._options.indent_body_inner_html)),n.is_inline_element||n.is_unformatted||"TK_CONTENT"===o.type&&!n.is_content_unformatted||e.print_newline(!1),this._calcluate_parent_multiline(e,n)},u.prototype._calcluate_parent_multiline=function(e,t){!t.parent||!e._output.just_added_newline()||(t.is_inline_element||t.is_unformatted)&&t.parent.is_inline_element||(t.parent.multiline_content=!0)};var h=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],p=["a","audio","del","ins","map","noscript","video"];return u.prototype._do_optional_end_element=function(e){var t=null;if(!e.is_empty_element&&e.is_start_tag&&e.parent){if("body"===e.tag_name)t=t||this._tag_stack.try_pop("head");else if("li"===e.tag_name)t=t||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if("dd"===e.tag_name||"dt"===e.tag_name)t=(t=t||this._tag_stack.try_pop("dt",["dl"]))||this._tag_stack.try_pop("dd",["dl"]);else if("p"===e.parent.tag_name&&-1!==h.indexOf(e.tag_name)){var n=e.parent.parent;n&&-1!==p.indexOf(n.tag_name)||(t=t||this._tag_stack.try_pop("p"))}else"rp"===e.tag_name||"rt"===e.tag_name?t=(t=t||this._tag_stack.try_pop("rt",["ruby","rtc"]))||this._tag_stack.try_pop("rp",["ruby","rtc"]):"optgroup"===e.tag_name?t=t||this._tag_stack.try_pop("optgroup",["select"]):"option"===e.tag_name?t=t||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):"colgroup"===e.tag_name?t=t||this._tag_stack.try_pop("caption",["table"]):"thead"===e.tag_name?t=(t=t||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]):"tbody"===e.tag_name||"tfoot"===e.tag_name?t=(t=(t=(t=t||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("thead",["table"]))||this._tag_stack.try_pop("tbody",["table"]):"tr"===e.tag_name?t=(t=(t=t||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"]):"th"!==e.tag_name&&"td"!==e.tag_name||(t=(t=t||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]))||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return e.parent=this._tag_stack.get_parser_token(),t}},sk.Beautifier=u,sk}function Ak(){if(pk)return dH;pk=1;var e=function(){if(XH)return uH.exports;XH=1;var e=YH().Beautifier,t=LH().Options;return uH.exports=function(t,n){return new e(t,n).beautify()},uH.exports.defaultOptions=function(){return new t},uH.exports}(),t=ok(),n=function(){if(hk)return lk.exports;hk=1;var e=vk().Beautifier,t=dk().Options;return lk.exports=function(t,n,r,i){return new e(t,n,r,i).beautify()},lk.exports.defaultOptions=function(){return new t},lk.exports}();function r(r,i,o,a){return n(r,i,o=o||e,a=a||t)}return r.defaultOptions=n.defaultOptions,dH.js=e,dH.css=t,dH.html=r,dH}var yk=(Ck||(Ck=1,function(e){var t,n,r,i,o=Ak();o.js_beautify=o.js,o.css_beautify=o.css,o.html_beautify=o.html,e.exports=(t=o,n=o,r=o,i=function(e,n){return t.js_beautify(e,n)},i.js=t.js_beautify,i.css=n.css_beautify,i.html=r.html_beautify,i.js_beautify=t.js_beautify,i.css_beautify=n.css_beautify,i.html_beautify=r.html_beautify,i)}(cH)),cH.exports);const wk=(e,t,n=150)=>{if(!e||!t)return{top:0,left:0};const{top:r,left:i}=e,o=t.getBoundingClientRect();let a=r,l=i;return a-=a+n>t.clientHeight-n+130?Math.floor(n/2)+n-35:10,i>.6*o.width?l-=n+50:i<.5*o.width+n&&(l-=42),{top:a,left:l}},bk=o(({width:t="100%",height:r="100%",VariableDropdownHeight:i="160px",readOnly:o=!1,value:s="",handleChange:d,setValue:u,variableOptionsList:f=[],addForloopPrefix:h=!1,language:p="json",theme:C="light",isRequisiteType:m=!1,onPaste:g,showVariableDropdown:v=!0,defaultValue:A,customOptions:y={},editorVariableZindex:b=99999,showMinimap:E=!0,isFocus:M=!1},x)=>{const H=a(null),k=a([]),V=a(null),S=a(null),[O,z]=c(0),[N,I]=c(!1),[T,D]=c(!1),[Z,_]=c({top:0,left:0}),[R,j]=c([]),B=a(f);l(()=>{B.current=f},[f]);l(()=>{const e=H.current;if(!e)return;const t=e.onDidBlurEditorWidget(()=>{D(!1),V.current=null,S.current=null,k.current=[],z(0)}),n=t=>{const n=e.getDomNode(),r=n&&n.contains(t.target);if(!r||r&&!t.target.closest(".view-line, .monaco-editor-textarea")){const e=n?.querySelector("textarea");e&&e.blur()}};return document.addEventListener("mousedown",n),()=>{t.dispose(),document.removeEventListener("mousedown",n)}},[T]),l(()=>{const e=H.current;if(!e||!O)return;const t=[],n=[];N?n.push({range:{startLineNumber:O,startColumn:1,endLineNumber:O,endColumn:1},options:{isWholeLine:!1,linesDecorationsClassName:"active-line-number"}}):t.push({range:{startLineNumber:O,startColumn:1,endLineNumber:O,endColumn:1},options:{isWholeLine:!0,className:"current-line-background"}}),k.current=e.deltaDecorations(k.current,[...t,...n])},[O,N]);const P=(e,t)=>{switch(t){case"json":case"javascript":return yk.js(e,{indent_size:4,indent_char:" ",max_preserve_newlines:5,preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!0,brace_style:"collapse",space_before_conditional:!0,unescape_strings:!0,jslint_happy:!0,end_with_newline:!0,wrap_line_length:0,comma_first:!1,e4x:!0,indent_empty_lines:!0});case"html":case"xml":return yk.html(e,{indent_size:4,indent_char:" ",max_preserve_newlines:5,preserve_newlines:!0,end_with_newline:!0,wrap_line_length:0,indent_empty_lines:!0});default:return e}};return w(x,()=>({getEditorInstance:()=>H.current,focus:()=>{H.current?.focus()},beautify:()=>{if(H.current){const e=H.current.getValue(),t=H.current.getModel()?.getLanguageId(),n=P(e,t||"json");H.current.setValue(n)}}})),n("div",{style:{width:t,height:r},className:"ff-editor-container",children:[e(L,{defaultValue:A,height:r,width:t,language:p,value:s,options:{minimap:{enabled:E},lineNumbers:"on",wordWrap:"on",autoClosingBrackets:"always",scrollBeyondLastLine:!1,readOnly:o,guides:{indentation:!1},...y},onMount:(e,t)=>{H.current=e,M&&setTimeout(()=>{e.focus()},0),e.onDidChangeCursorPosition(t=>{z(t.position.lineNumber);const n=e.getPosition(),r=e.getModel();if(!n||!r)return;const i=r.getLineContent(n.lineNumber),o=n.column-1;if(0===o)return void D(!1);const a=i.lastIndexOf("$",o-1),l=i.lastIndexOf("${",o-1),s=-1!==l?i.indexOf("}",l+2):-1,c=-1!==l&&-1!==s&&o-1>l&&o-1<s,d=!/\}/.test(i.slice(a+1,o));if(-1!==a&&o>a&&!/\s/.test(i.slice(a+1,o))&&!c&&d){V.current=a,S.current=i.slice(a+1,o);const r=(S.current??"").toLowerCase(),l=B.current.filter(e=>("_startforloop"===e.type&&h?`FLV_for:${e.name}`:e.name).toLowerCase().includes(r));j(l);const s=e.getScrolledVisiblePosition(n),c=e.getDomNode();_(wk(s,c,150)),["keyboard","mouse","deleteLeft"].includes(t?.source||"")&&D(!0)}else D(!1),V.current=null,S.current=null}),e.onMouseDown(()=>{setTimeout(()=>{const e=H.current;if(!e)return;const t=e.getPosition(),n=e.getModel();if(!t||!n)return;const r=n.getLineContent(t.lineNumber),i=t.column-2;"$"===r[i]?(V.current=i,S.current=""):(V.current=null,S.current=null)},0)}),e.onDidChangeCursorSelection(()=>{const t=(e.getSelections?.()||[]).some(e=>e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn);I(t)}),e.onDidChangeModelContent(()=>{const t=e.getValue();u(t);const n=e.getPosition(),r=e.getModel();if(!n||!r)return;const i=r.getLineContent(n.lineNumber),o=n.column-2;if("$"===i[V.current??o]){null===V.current&&(V.current=o),S.current=i.slice(V.current+1,o);const t=B.current.filter(e=>("_startforloop"===e.type&&h?`FLV_for:${e.name}`:e.name).toLowerCase().includes(S.current?.toLowerCase()));t.length?j(t):(j([]),V?.current!==o&&" "===i[o]&&(V.current=null,S.current=null,D(!1)));const r=e.getScrolledVisiblePosition(n),a=e.getDomNode();_(wk(r,a,150))}else V.current=null,S.current=null}),e.onDidPaste(()=>{const t=e.getValue();if(t){const n=P(t,p);e.setValue(n),g&&g(n)}}),t.languages.registerCompletionItemProvider(p,{triggerCharacters:["."],provideCompletionItems:(e,n)=>{const r=e.getValueInRange({startLineNumber:n.lineNumber,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column}),i=e.getWordAtPosition(n),o=i?new t.Range(n.lineNumber,i.startColumn,n.lineNumber,i.endColumn):new t.Range(n.lineNumber,n.column,n.lineNumber,n.column),a=[];return r.endsWith("ff.")&&a.push({label:"getVariable",kind:t.languages.CompletionItemKind.Method,insertText:"getVariable(${1:variableName})",insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,detail:"Get a variable value",range:o},{label:"setVariable",kind:t.languages.CompletionItemKind.Method,insertText:"setVariable(${1:variableName}, ${2:value})",insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,detail:"Set a variable value",range:o},{label:"sendRequest",kind:t.languages.CompletionItemKind.Method,insertText:'sendRequest({\n method: "GET",//add your method\n url: "https://fakestoreapi.com/products",//enter your url\n headers: { },//add your headers,\n params: params,//add your params,\n data: body,//add your request body,\n })',insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,detail:"Make your http requests",range:o}),{suggestions:a}}})},onChange:(e,t)=>d(e,t),theme:C}),T&&Z&&v&&e(BM,{position:"absolute",width:"300px",height:i,optionsList:R,onSelectVariable:e=>{if(m&&H.current){const t=H.current,n=t.getPosition();if(n){const r=`'$${`{${"STEPGROUP"===e?.parentVariableType?"SGV":"LOCAL"===e.type?"LV":"GLOBAL"===e.type?"GV":"GROUP"===e.type?"SGV":[String(e?._id??""),String(e?.id??"")].some(e=>e.includes("PARAMETER"))?"SGP":"_startforloop"===e.type?"FLV_for:":"DATAPROVIDER"===e.type?"DPV":"PEV"}${"_startforloop"===e?.type?"":"_"}${"DATAPROVIDER"===e?.type?e?.dpName+":"+e?.varname:e.name}}`}'`,i=V?.current??0;t.executeEdits("",[{range:{startLineNumber:n.lineNumber,startColumn:i+1,endLineNumber:n.lineNumber,endColumn:i+(n.column-i)},text:r,forceMoveMarkers:!0}]),S.current=null,V.current=null,D(!1)}}else((e,t)=>{if(H.current){const n=H.current,r=n.getPosition();if(r){const i=`{${t}${"FLV_for:"===t?"":"_"}${e}}`,o=V?.current??0;n.executeEdits("",[{range:{startLineNumber:r.lineNumber,startColumn:o+2,endLineNumber:r.lineNumber,endColumn:o+(r.column-o)},text:i,forceMoveMarkers:!1}]);const a=[];a.push({range:{startLineNumber:O,startColumn:1,endLineNumber:O,endColumn:1},options:{isWholeLine:!1}}),k.current=n.deltaDecorations(k.current,a),S.current=null,V.current=null,D(!1)}}})("DATAPROVIDER"===e?.type?e?.dpName+":"+e?.varname:e?.name,"STEPGROUP"===e.parentVariableType?"SGV":"GLOBAL"===e?.type?"GV":"LOCAL"===e?.type?"LV":(e?._id??e?.id??"").includes("PARAMETER")?"SGP":"_startforloop"===e?.type?"FLV_for:":"DATAPROVIDER"===e?.type?"DPV":"PEV")},dropdownPosition:Z,zIndex:b})]})}),Ek=e=>e.flatMap(e=>e.runLevelExecutionDataSets.map((t,n)=>{const{runLevelExecutionDataSets:r,...i}=e;return{...i,...t,runCount:n+1}}));var Mk,xk={exports:{}};var Lk,Hk=(Mk||(Mk=1,"undefined"!=typeof self&&self,xk.exports=(Lk=i,function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="lib/",n(n.s=5)}([function(e,t){e.exports=Lk},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ArcherContainerContextProvider=t.ArcherContainerContext=void 0;var i=r(n(0));t.ArcherContainerContext=i.default.createContext(null),t.ArcherContainerContextProvider=t.ArcherContainerContext.Provider},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeId=void 0,t.encodeId=function(e){return encodeURI(e).replace(/%/g,"_")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getMarkerId=t.createShapeObj=t.getSourceToTargets=t.getEndShapeFromStyle=void 0;var r=["arrow","circle"];t.getEndShapeFromStyle=function(e){return e.endShape&&Object.keys(e.endShape).filter(function(e){return r.includes(e)})[0]||r[0]},t.getSourceToTargets=function(e){var t=Object.keys(e).map(function(t){return e[t]});return[].concat.apply([],t).sort(function(e,t){return e.order-t.order})},t.createShapeObj=function(e,n){return{arrow:function(){var t;return{arrow:Object.assign(Object.assign({},null==n?void 0:n.arrow),null===(t=e.endShape)||void 0===t?void 0:t.arrow)}},circle:function(){var t;return{circle:Object.assign(Object.assign({},null==n?void 0:n.circle),null===(t=e.endShape)||void 0===t?void 0:t.circle)}}}[(0,t.getEndShapeFromStyle)(e)]()},t.getMarkerId=function(e,t,n){return"".concat(e).concat(t.id).concat(n.id)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.endShapeDefaultProp=void 0,t.endShapeDefaultProp={arrow:{arrowLength:10,arrowThickness:6},circle:{radius:2,fillColor:"#f00",strokeColor:"#0ff",strokeWidth:1}}},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ArcherContainer=t.ArcherElement=void 0;var i=n(6);Object.defineProperty(t,"ArcherElement",{enumerable:!0,get:function(){return r(i).default}});var o=n(11);Object.defineProperty(t,"ArcherContainer",{enumerable:!0,get:function(){return r(o).default}})},function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&("get"in i?t.__esModule:!i.writable&&!i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var a=o(n(0)),l=n(7),s=n(1),c=n(2),d=n(8),u=n(10);t.default=function(e){var t=e.id,n=e.relations,r=void 0===n?[]:n,i=e.children,o=(0,a.useMemo)(function(){return(0,c.encodeId)(t)},[t]),f=(0,a.useContext)(s.ArcherContainerContext),h=(0,a.useRef)(),p=(0,a.useCallback)(function(e){var t=(0,u.generateSourceToTarget)(o,e);(0,u.assertContextExists)(f),f.registerTransitions(o,t)},[f,o]),C=(0,a.useCallback)(function(){(0,u.assertContextExists)(f),f.unregisterTransitions(o)},[f,o]),m=(0,a.useCallback)(function(e){e&&((0,u.assertContextExists)(f),f.registerChild(o,e))},[o,f]),g=(0,a.useCallback)(function(){(0,u.assertContextExists)(f),f.unregisterChild(o)},[f,o]);(0,l.useIsomorphicLayoutEffect)(function(){return m(h.current),function(){return g()}},[m,g]),(0,d.useDeepCompareEffect)(function(){return p(r),function(){return C()}},[p,r,C]),a.default.Children.only(i);var v=i;return a.default.cloneElement(v,Object.assign(Object.assign({},v.props),{ref:h}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.useIsomorphicLayoutEffect=void 0;var r=n(0);t.useIsomorphicLayoutEffect="undefined"!=typeof window?r.useLayoutEffect:r.useEffect},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useDeepCompareEffect=void 0;var i=n(0),o=r(n(9));function a(e){var t=(0,i.useRef)();return(0,o.default)(e,t.current)||(t.current=e),t.current}t.useDeepCompareEffect=function(e,t){(0,i.useEffect)(e,t.map(a))}},function(e,t,n){var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty,a="undefined"!=typeof Element;e.exports=function(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var l,s,c,d=r(t),u=r(n);if(d&&u){if((s=t.length)!=n.length)return!1;for(l=s;0!=l--;)if(!e(t[l],n[l]))return!1;return!0}if(d!=u)return!1;var f=t instanceof Date,h=n instanceof Date;if(f!=h)return!1;if(f&&h)return t.getTime()==n.getTime();var p=t instanceof RegExp,C=n instanceof RegExp;if(p!=C)return!1;if(p&&C)return t.toString()==n.toString();var m=i(t);if((s=m.length)!==i(n).length)return!1;for(l=s;0!=l--;)if(!o.call(n,m[l]))return!1;if(a&&t instanceof Element&&n instanceof Element)return t===n;for(l=s;0!=l--;)if(!("_owner"===(c=m[l])&&t.$$typeof||e(t[c],n[c])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.generateSourceToTarget=t.assertContextExists=void 0;var r=n(2);t.assertContextExists=function(e){if(!e)throw new Error("Could not find ArcherContainerContext in <ArcherElement>. Please wrap the component in a <ArcherContainer>.")},t.generateSourceToTarget=function(e,t){return t.map(function(t){var n=t.targetId,i=t.sourceAnchor,o=t.targetAnchor,a=t.label,l=t.className,s=t.style,c=t.order,d=void 0===c?0:c,u=t.domAttributes,f=t.cursor,h=t.hitSlop;return{source:{id:(0,r.encodeId)(e),anchor:i},target:{id:(0,r.encodeId)(n),anchor:o},className:l,label:a,style:s,order:d,domAttributes:u,cursor:f,hitSlop:h}})}},function(e,t,n){function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){l=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var a=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&("get"in i?t.__esModule:!i.writable&&!i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),l=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return l(t,e),t},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var d=s(n(0)),u=c(n(12)),f=n(1),h=n(14),p=n(4),C=n(19),m=n(20),g={position:"absolute",width:"100%",height:"100%",top:0,left:0,pointerEvents:"none"},v=d.default.forwardRef(function(e,t){var n=e.endShape,o=void 0===n?p.endShapeDefaultProp:n,a=e.strokeColor,l=void 0===a?"#f00":a,s=e.strokeWidth,c=void 0===s?2:s,v=e.svgContainerStyle,A=void 0===v?{}:v,y=e.noCurves,w=e.children,b=e.className,E=e.endMarker,M=e.lineStyle,x=e.offset,L=e.startMarker,H=e.strokeDasharray,k=e.style,V=i((0,d.useState)({}),2),S=V[0],O=V[1],z=i((0,d.useState)({}),2),N=z[0],I=z[1],T=(0,d.useRef)(new u.default(function(){j()})).current,D=(0,d.useRef)(null),Z=i(d.default.useState(),2)[1],_=(0,d.useRef)("arrow".concat(Math.random().toString().slice(2))).current;(0,d.useImperativeHandle)(t,function(){return{refreshScreen:j,arrowMarkerUniquePrefix:_}});var R,j=d.default.useCallback(function(){return Z({})},[]),B=(0,d.useCallback)(function(e,t){I(function(n){return Object.assign(Object.assign({},n),r({},e,t))})},[]),P=(0,d.useCallback)(function(e){I(function(t){var n=Object.assign({},t);return delete n[e],n})},[]),F=(0,d.useCallback)(function(e,t){O(function(n){return n[e]===t?n:Object.assign(Object.assign({},n),r({},e,t))})},[]),q=(0,d.useCallback)(function(e){O(function(t){var n=Object.assign({},t);return delete n[e],n})},[]),U=(0,d.useMemo)(function(){return Object.assign(Object.assign({},g),A)},[A]);R="function"==typeof w?w(f.ArcherContainerContext):w,(0,m.useResizeListener)(j),(0,m.useObserveElements)(S,T);var W=(0,d.useMemo)(function(){return{registerTransitions:B,unregisterTransitions:P,registerChild:F,unregisterChild:q}},[B,P,F,q]);return d.default.createElement(f.ArcherContainerContextProvider,{value:W},d.default.createElement("div",{style:Object.assign(Object.assign({},k),{position:"relative"}),className:b},d.default.createElement("svg",{style:U},d.default.createElement("defs",null,d.default.createElement(C.ArrowMarkers,{endShape:o,sourceToTargetsMap:N,strokeColor:l,uniqueId:_})),d.default.createElement(h.SvgArrows,{startMarker:L,endMarker:E,endShape:o,strokeColor:l,strokeWidth:c,strokeDasharray:H,noCurves:y,lineStyle:M,offset:x,parentCurrent:D.current,refs:S,uniqueId:_,sourceToTargetsMap:N})),d.default.createElement("div",{style:{height:"100%"},ref:D},R)))});t.default=v},function(e,t,n){n.r(t),function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n+=1){var i=r[n];e.call(t,i[1],i[0])}},Object.defineProperties(t.prototype,n),t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==e&&e.Math===Math?e:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},a=2,l=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,c=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function l(){n&&(n=!1,e()),r&&c()}function s(){o(l)}function c(){var e=Date.now();if(n){if(e-i<a)return;r=!0}else n=!0,r=!1,setTimeout(s,t);i=e}return c}(this.refresh.bind(this),20)};c.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},c.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},c.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},c.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},c.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},c.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},c.prototype.onTransitionEnd_=function(e){var t=e.propertyName;void 0===t&&(t=""),l.some(function(e){return!!~t.indexOf(e)})&&this.refresh()},c.getInstance=function(){return this.instance_||(this.instance_=new c),this.instance_},c.instance_=null;var d=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n+=1){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},u=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},f=v(0,0,0,0);function h(e){return parseFloat(e)||0}function p(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return t.reduce(function(t,n){return t+h(e["border-"+n+"-width"])},0)}function C(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return f;var r=u(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n+=1){var i=r[n],o=e["padding-"+i];t[i]=h(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,l=h(r.width),s=h(r.height);if("border-box"===r.boxSizing&&(Math.round(l+o)!==t&&(l-=p(r,"left","right")+o),Math.round(s+a)!==n&&(s-=p(r,"top","bottom")+a)),!function(e){return e===u(e).document.documentElement}(e)){var c=Math.round(l+o)-t,d=Math.round(s+a)-n;1!==Math.abs(c)&&(l-=c),1!==Math.abs(d)&&(s-=d)}return v(i.left,i.top,l,s)}var m="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof u(e).SVGGraphicsElement}:function(e){return e instanceof u(e).SVGElement&&"function"==typeof e.getBBox};function g(e){return r?m(e)?function(e){var t=e.getBBox();return v(0,0,t.width,t.height)}(e):C(e):f}function v(e,t,n,r){return{x:e,y:t,width:n,height:r}}var A=function(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=e};A.prototype.isActive=function(){var e=g(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},A.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e};var y=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return d(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}(t);d(this,{target:e,contentRect:n})},w=function(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r};w.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new A(e)),this.controller_.addObserver(this),this.controller_.refresh())}},w.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},w.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},w.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},w.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new y(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},w.prototype.clearActive=function(){this.activeObservations_.splice(0)},w.prototype.hasActive=function(){return this.activeObservations_.length>0};var b="undefined"!=typeof WeakMap?new WeakMap:new n,E=function(e){if(!(this instanceof E))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=c.getInstance(),n=new w(e,t,this);b.set(this,n)};["observe","unobserve","disconnect"].forEach(function(e){E.prototype[e]=function(){return(t=b.get(this))[e].apply(t,arguments);var t}});var M=void 0!==i.ResizeObserver?i.ResizeObserver:E;t.default=M}.call(this,n(13))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SvgArrows=void 0;var i=r(n(0)),o=n(15),a=r(n(17)),l=n(3),s=function(e){var t,n,r=e.style||{},s=r.startMarker||e.startMarker,c=null===(n=null!==(t=r.endMarker)&&void 0!==t?t:e.endMarker)||void 0===n||n,d=(0,l.createShapeObj)(r,e.endShape),u=e.domAttributes,f=e.cursor,h=e.hitSlop,p=r.strokeColor||e.strokeColor,C=r.strokeWidth||e.strokeWidth,m=r.strokeDasharray||e.strokeDasharray,g=!(!r.noCurves&&!e.noCurves),v=r.lineStyle||e.lineStyle||(g?"angle":"curve"),A=e.offset||0,y=e.source.anchor,w=(0,o.getPointCoordinatesFromAnchorPosition)(e.source.anchor,e.source.id,e.parentCoordinates,e.refs),b=e.target.anchor,E=(0,o.getPointCoordinatesFromAnchorPosition)(e.target.anchor,e.target.id,e.parentCoordinates,e.refs);return w?E?i.default.createElement(a.default,{className:e.className,startingPoint:w,startingAnchorOrientation:y,endingPoint:E,endingAnchorOrientation:b,strokeColor:p,strokeWidth:C,strokeDasharray:m,arrowLabel:e.label,arrowMarkerId:(0,l.getMarkerId)(e.uniqueId,e.source,e.target),lineStyle:v,offset:A,enableStartMarker:!!s,disableEndMarker:!c,endShape:d,domAttributes:u,hitSlop:h,cursor:f}):(console.warn("[React Archer] Could not find target element! Not drawing the arrow."),null):(console.warn("[React Archer] Could not find starting point of element! Not drawing the arrow."),null)};t.SvgArrows=function(e){var t=(0,o.getPointFromElement)(e.parentCurrent);return t?i.default.createElement(i.default.Fragment,null,(0,l.getSourceToTargets)(e.sourceToTargetsMap).map(function(n){return i.default.createElement(s,{key:JSON.stringify({source:n.source,target:n.target}),source:n.source,target:n.target,className:n.className,label:n.label,style:n.style||{},domAttributes:n.domAttributes,hitSlop:n.hitSlop,cursor:n.cursor,startMarker:e.startMarker,endMarker:e.endMarker,endShape:e.endShape,strokeColor:e.strokeColor,strokeWidth:e.strokeWidth,strokeDasharray:e.strokeDasharray,noCurves:e.noCurves,lineStyle:e.lineStyle,offset:e.offset,parentCoordinates:t,refs:e.refs,uniqueId:e.uniqueId})})):null}},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getPointCoordinatesFromAnchorPosition=t.getPointFromElement=void 0;var i=r(n(16));function o(e){return new i.default(e.left,e.top)}var a=function(e){return e?e.getBoundingClientRect():null};t.getPointFromElement=function(e){var t=a(e);return t?o(t):null},t.getPointCoordinatesFromAnchorPosition=function(e,t,n,r){var l=a(r[t]);if(!l)return null;var s=function(e,t){switch(e){case"top":return o(t).add(new i.default(t.width/2,0));case"bottom":return o(t).add(new i.default(t.width/2,t.height));case"left":return o(t).add(new i.default(0,t.height/2));case"right":return o(t).add(new i.default(t.width,t.height/2));case"middle":return o(t).add(new i.default(t.width/2,t.height/2));default:return console.error("[React Archer] Invalid anchor position was provided. Not drawing the arrow."),null}}(e,l);return s?s.substract(n):null}},function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.x=t,this.y=n}return function(e,t){t&&r(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1})}(e,[{key:"add",value:function(t){return new e(this.x+t.x,this.y+t.y)}},{key:"substract",value:function(t){return new e(this.x-t.x,this.y-t.y)}}]),e}();t.default=i},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.computeLabelDimensions=t.computeEndingAnchorPosition=t.computeStartingAnchorPosition=t.computeArrowPointAccordingToArrowHead=void 0;var i=r(n(0)),o=n(18);function a(e,t,n,r,i,a,l,s){var c=(0,o.computeArrowDirectionVector)(i),d=c.arrowX,u=c.arrowY;if("straight"===a&&void 0!==l&&void 0!==s){var f=Math.atan2(s-t,l-e);d=Math.cos(f),u=Math.sin(f)}return{xPoint:e+d*n*r/2,yPoint:t+u*n*r/2}}function l(e,t,n,r,i){return"top"===i||"bottom"===i?{xAnchor1:e,yAnchor1:t+(r-t)/2}:"left"===i||"right"===i?{xAnchor1:e+(n-e)/2,yAnchor1:t}:{xAnchor1:e,yAnchor1:t}}function s(e,t,n,r,i){return"top"===i||"bottom"===i?{xAnchor2:n,yAnchor2:r-(r-t)/2}:"left"===i||"right"===i?{xAnchor2:n-(n-e)/2,yAnchor2:r}:{xAnchor2:n,yAnchor2:r}}function c(e,t,n,r){return{xLabel:n>e?e:n,yLabel:r>t?t:r,labelWidth:Math.max(Math.abs(n-e),1),labelHeight:Math.max(Math.abs(r-t),1)}}t.computeArrowPointAccordingToArrowHead=a,t.computeStartingAnchorPosition=l,t.computeEndingAnchorPosition=s,t.computeLabelDimensions=c,t.default=function(e){var t=e.className,n=e.startingPoint,r=e.startingAnchorOrientation,o=e.endingPoint,d=e.endingAnchorOrientation,u=e.strokeColor,f=e.strokeWidth,h=e.strokeDasharray,p=e.arrowLabel,C=e.arrowMarkerId,m=e.lineStyle,g=e.offset,v=e.enableStartMarker,A=e.disableEndMarker,y=e.endShape,w=e.domAttributes,b=e.hitSlop,E=void 0===b?10:b,M=e.cursor,x=void 0===M?"pointer":M,L=y.circle?2*y.circle.radius:2*y.arrow.arrowLength,H=a(n.x,n.y,v?L:0,f,r,m,o.x,o.y),k=H.xPoint,V=H.yPoint,S=a(o.x,o.y,A?0:L,f,d,m,n.x,n.y),O=S.xPoint,z=S.yPoint,N=l(k,V,O,z,r),I=N.xAnchor1,T=N.yAnchor1,D=s(k,V,O,z,d),Z=function(e){var t=e.xStart,n=e.yStart,r=e.xAnchor1,i=e.yAnchor1,o=e.xAnchor2,a=e.yAnchor2,l=e.xEnd,s=e.yEnd,c=e.lineStyle,d=e.offset;if(d&&0!==d){var u="straight"===c?Math.atan2(s-n,l-t):Math.atan2(i-n,r-t),f=d*Math.cos(u),h=d*Math.sin(u);"straight"!==c&&(t+=f,n+=h),l-=f,s-=h}var p="M".concat(t,",").concat(n," ");return["curve","angle"].includes(c)&&(p+="".concat("curve"===c?"C":"").concat(r,",").concat(i," ").concat(o,",").concat(a," ")),p+"".concat(l,",").concat(s)}({xStart:k,yStart:V,xAnchor1:I,yAnchor1:T,xAnchor2:D.xAnchor2,yAnchor2:D.yAnchor2,xEnd:O,yEnd:z,lineStyle:m,offset:g}),_=c(k,V,O,z),R=_.xLabel,j=_.yLabel,B=_.labelWidth,P=_.labelHeight,F="url(#".concat(C,")");return i.default.createElement("g",{className:t},i.default.createElement("path",{d:Z,style:{fill:"none",stroke:u,strokeWidth:f,strokeDasharray:h},markerStart:v?F:void 0,markerEnd:A?void 0:F}),w&&i.default.createElement("path",Object.assign({d:Z,style:{fill:"none",stroke:"rgba(0, 0, 0, 0)",strokeWidth:E,cursor:w?x:"initial",pointerEvents:"all"}},w)),p&&i.default.createElement("foreignObject",{x:R,y:j,width:B,height:P,style:{overflow:"visible",pointerEvents:"none"}},i.default.createElement("div",{style:{position:"absolute",left:"50%",top:"50%",transform:"translateX(-50%) translateY(-50%)",pointerEvents:"all"}},i.default.createElement("div",null,p))))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.computeArrowDirectionVector=void 0,t.computeArrowDirectionVector=function(e){switch(e){case"left":return{arrowX:-1,arrowY:0};case"right":return{arrowX:1,arrowY:0};case"top":return{arrowX:0,arrowY:-1};case"bottom":return{arrowX:0,arrowY:1};default:return{arrowX:0,arrowY:0}}}},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowMarkers=void 0;var i=r(n(0)),o=n(4),a=n(3),l=function(e,t){return function(){var n,r,a,l,s,c,d,u,f,h,p,C,m=(null===(r=null===(n=e.endShape)||void 0===n?void 0:n.circle)||void 0===r?void 0:r.radius)||(null===(a=t.circle)||void 0===a?void 0:a.radius)||o.endShapeDefaultProp.circle.radius,g=(null===(s=null===(l=e.endShape)||void 0===l?void 0:l.circle)||void 0===s?void 0:s.strokeWidth)||(null===(c=t.circle)||void 0===c?void 0:c.strokeWidth)||o.endShapeDefaultProp.circle.strokeWidth,v=(null===(u=null===(d=e.endShape)||void 0===d?void 0:d.circle)||void 0===u?void 0:u.strokeColor)||(null===(f=t.circle)||void 0===f?void 0:f.strokeColor)||o.endShapeDefaultProp.circle.strokeColor,A=(null===(p=null===(h=e.endShape)||void 0===h?void 0:h.circle)||void 0===p?void 0:p.fillColor)||(null===(C=t.circle)||void 0===C?void 0:C.fillColor)||o.endShapeDefaultProp.circle.fillColor;return{markerWidth:4*m,markerHeight:4*m,refX:2*m+g,refY:2*m,path:i.default.createElement("circle",{cx:2*m,cy:2*m,r:m,fill:A,stroke:v,strokeWidth:g})}}},s=function(e,t,n){return function(){var r,a,l,s,c,d,u,f,h=e.strokeColor||n,p=null!==(c=null!==(l=null===(a=null===(r=e.endShape)||void 0===r?void 0:r.arrow)||void 0===a?void 0:a.arrowLength)&&void 0!==l?l:null===(s=null==t?void 0:t.arrow)||void 0===s?void 0:s.arrowLength)&&void 0!==c?c:o.endShapeDefaultProp.arrow.arrowLength,C=(null===(u=null===(d=e.endShape)||void 0===d?void 0:d.arrow)||void 0===u?void 0:u.arrowThickness)||(null===(f=null==t?void 0:t.arrow)||void 0===f?void 0:f.arrowThickness)||o.endShapeDefaultProp.arrow.arrowThickness,m="M0,0 L0,".concat(C," L").concat(p,",").concat(C/2," z");return{markerWidth:p,markerHeight:C,refX:0,refY:C/2,path:i.default.createElement("path",{d:m,fill:h})}}};t.ArrowMarkers=function(e){var t=e.sourceToTargetsMap,n=e.endShape,r=e.strokeColor,o=e.uniqueId;return i.default.createElement(i.default.Fragment,null,(0,a.getSourceToTargets)(t).map(function(e){var t=e.source,c=e.target,d=e.style,u=function(e){var t=e.style,n=e.strokeColor,r=e.endShape,i=(0,a.getEndShapeFromStyle)(t);return{circle:l(t,r),arrow:s(t,r,n)}[i]()}({style:void 0===d?{}:d,endShape:n,strokeColor:r}),f=u.markerHeight,h=u.markerWidth,p=u.path,C=u.refX,m=u.refY;return i.default.createElement("marker",{id:(0,a.getMarkerId)(o,t,c),key:(0,a.getMarkerId)(o,t,c),markerWidth:h,markerHeight:f,refX:C,refY:m,orient:"auto-start-reverse",markerUnits:"strokeWidth"},p)}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.useResizeListener=t.useObserveElements=void 0;var r=n(0);t.useObserveElements=function(e,t){(0,r.useEffect)(function(){return Object.keys(e).map(function(n){t.observe(e[n])}),function(){Object.keys(e).map(function(n){t.unobserve(e[n])})}},[e,t])},t.useResizeListener=function(e){(0,r.useEffect)(function(){return window&&window.addEventListener("resize",e),function(){window&&window.removeEventListener("resize",e)}},[e])}}]))),xk.exports);const kk=({getChildNodeComponent:r,parentNodeIndex:i,parentNodeData:o,verticalLineHeight:a,datasetHeight:l,curveHeights:s,itemRefs:c,datasetRef:d,isReadOnlyMode:u,hideNodeAtLast:f})=>e(t,{children:0===o?.machineInstances?.length?e(t,{children:!u&&n(t,{children:[e("div",{className:"ff-selectedMachines-connecting-line",children:n("div",{className:"ff-line",children:[e("div",{className:"ff-left-icon ff-left-icon-aligned"}),e("div",{className:"ff-right-icon"})]})}),e("div",{className:"ff-machine-instance ff-machine-env-button",children:r({isButton:!0,parentNodeData:o,parentNodeIndex:i})})]})}):o?.machineInstances?.map((h,p)=>{const C=0===p;return n("div",{className:"ff-machine-instance-row",children:[n("div",{className:"ff-selectedMachines-connecting-line "+(C?"":"ff-second-line"),children:[n("div",{className:"ff-line",children:[e("div",{className:"ff-left-icon "+(C?"ff-left-icon-aligned":"")}),e("div",{className:"ff-right-icon"})]}),C&&e("div",{className:"ff-vertical-line",style:{height:`${a}px`}})]}),e("div",{className:"ff-machine-instance",children:h?.runLevelExecutionDataSets?.map((a,u)=>e("div",{className:"ff-run-level-execution-dataset",ref:0===u?d:null,children:n("div",{className:"ff-execution-item",ref:e=>c.current[u]=e,children:[e("div",{className:"ff-curved-connector",style:{top:-l+"px"},children:n("div",{className:`ff-curve ff-connector-${u}`,style:{height:`${s[u]}px`},children:[e("div",{className:`ff-curve-right-icon ff-curve-right-icon-${u}`}),Number(h?.runScriptCount)?e("div",{className:"ff-selectedMachines-connecting-line-text",children:e(q,{fontSize:8,fontWeight:"regular",children:`${[0,"0",null].includes(h.runScriptCount)?"":h.runScriptCount} Script${1!==h.runScriptCount?"s":""}`})}):e(t,{})]})}),e("div",{className:"ff-run-data-box",children:r({isButton:!1,childNodeData:h,childNodeIndex:p,runLevelExecutionDataSet:a,runLevelExecutionDataSetIndex:u,parentNodeData:o,parentNodeIndex:i})})]})},a?.runLevelExecutionDataSetId))}),p===o?.machineInstances.length-1&&!f&&e(t,{children:!u&&n(t,{children:[e("div",{className:"ff-selectedMachines-connecting-line ff-second-line",children:n("div",{className:"ff-line",children:[e("div",{className:"ff-left-icon"}),e("div",{className:"ff-right-icon"})]})}),e("div",{className:"ff-machine-instance ff-machine-env-button",children:r({isButton:!0,parentNodeData:o,parentNodeIndex:i,childNodeIndex:p+1})})]})})]},p)})}),Vk=({data:t,noOfScripts:r,getChildNodeComponent:o,getParentNodeComponent:s,getParentNodeComponentActionItems:d,childNodeCurveHeight:u=1.28,isReadOnlyMode:f=!1,hideNodeAtLast:h=!0})=>{const p=a(null),[C,m]=c(0),[g,v]=c([]),A=a([]);l(()=>{p.current&&m(p.current.offsetHeight)},[t]);l(()=>{(()=>{const e=A.current.map((e,t)=>0===t?0:C*u);v(e)})()},[C,t]);const y=e=>1+(e.machineInstances?.length+1||0);let w=1;const b=t?.machines?.selectedMachines.reduce((e,t)=>f&&h?e+(e=>!e?.machineInstances||G(e.machineInstances)?1:e.machineInstances.length)(t):e+y(t),0),E=Math.round(b/2);let M=1===E&&f&&2===b||1===E&&!f&&2===b;return e("div",{className:"connecting-branch-container",children:e(Hk.ArcherContainer,{strokeColor:"var(--brand-color)",strokeWidth:1,startMarker:!0,endMarker:!1,noCurves:!0,children:n("div",{className:"ff-connecting-branch-grid-container",children:[e(Hk.ArcherElement,{id:"rootNode",children:e("div",{className:"ff-grid-item ff-dynamic-item",style:{gridRow:E,top:M?"44px":""},children:e("div",{className:"ff-script-count-container",children:n("div",{className:"ff-script-count-box",children:[e(q,{children:r}),e(q,{children:"Scripts"})]})})})}),t?.machines?.selectedMachines.map((t,r)=>{const a=w,l=y(t);w+=l;const c=((e,t,n)=>1===e.length&&(f||h)?0:e.reduce((t,n,r)=>t+((r!==e.length-1||!f&&!h)&&n.runLevelExecutionDataSets?.length||0),0)*(t+n))(t?.machineInstances,C,16);return e(i.Fragment,{children:n("div",{className:"ff-selectedMachines",style:{gridRow:`${a} / span ${l}`},children:[e("div",{className:"ff-selectedMachines-input",children:n("div",{className:"ff-input-box-container "+(t?.machineInstances.length?"":"ff-input-box-aligned"),children:[e(Hk.ArcherElement,{id:`parentnode${r}`,relations:[{targetId:"rootNode",targetAnchor:"left",sourceAnchor:"left"}],children:s({isMultiSelect:!1,parentNodeData:t,parentNodeIndex:r})}),d({parentNodeData:t,parentNodeIndex:r})]})}),e(kk,{parentNodeIndex:r,parentNodeData:t,verticalLineHeight:c,datasetHeight:C,curveHeights:g,itemRefs:A,datasetRef:p,getChildNodeComponent:o,isReadOnlyMode:f,hideNodeAtLast:h})]})},r)}),!f&&e("div",{className:"ff-select-machine-input",style:{gridRow:`${w}`},children:e(Hk.ArcherElement,{id:"lastNode",relations:[{targetId:"rootNode",targetAnchor:"left",sourceAnchor:"left"}],children:e("div",{children:s({isMultiSelect:!0})})})})]})})})},Sk=(e,t)=>{if(!(e&&e instanceof Blob))throw console.error("Invalid Blob object"),new Error("Invalid Blob object");const n=window.navigator;if(n.msSaveOrOpenBlob){const r=n.msSaveOrOpenBlob;r&&r(e,t)}else{const n=document.createElement("a");document.body.appendChild(n);const r=window.URL.createObjectURL(e);n.href=r,n.download=t,n.click(),setTimeout(()=>{window.URL.revokeObjectURL(r),document.body.removeChild(n)},0)}},Ok=({hasAtSymbol:t,usersObj:n,optionClicked:r,charsAfterAt:i,mentionUserRef:o})=>{const[s,d]=c(0),u=a([]);if(!t)return null;const f=n.filter(e=>!i||e.name.toLowerCase().startsWith(i.toLowerCase()));l(()=>{d(0)},[i]);const h=p(e=>{if(t&&0!==f.length)switch(e.key){case"ArrowDown":e.preventDefault(),d(e=>(e+1)%f.length);break;case"ArrowUp":e.preventDefault(),d(e=>0===e?f.length-1:e-1);break;case"Enter":e.preventDefault();const t=f[s];t&&r(t.name,t.emailId)}},[f,s,t,r]);return l(()=>{u.current[s]&&u.current[s]?.scrollIntoView({behavior:"smooth",block:"nearest"})},[s]),l(()=>(document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)),[h]),e("div",{className:"select-section",onMouseDown:e=>e.preventDefault(),children:e("div",{className:"select-group",ref:o,children:f.length?f.map((t,n)=>e("div",{ref:e=>u.current[n]=e,className:"mention-option "+(n===s?"hovered":""),onClick:()=>r(t.name,t.emailId),onMouseDown:e=>e.preventDefault(),children:e(q,{children:t.name})},t.id)):e("div",{className:"user-not-found",children:e(q,{children:"No user name found"})})})})},zk=e=>e&&Array.isArray(e)?e.map(({user:e})=>({id:e.id,name:e.name,emailId:e.emailId})):[],Nk=(e,t)=>{const n=t.find(t=>`@${t.name.replace(/\s+/g,"")}`===e);return n?n.emailId:null},Ik=({handleInsertNode:t,handleEditNode:r,handleDeleteNode:i,comment:o,depth:s=0,isDisable:d,userDetails:u,isEditDeleteActionAllowed:h=!0,createdByID:p,rowBreakCharCount:C=83,isVewMode:m=!1,deleteEnable:g=!0})=>{const[v,A]=c(""),[y,w]=c(!1),[b,E]=c(!1),[M,x]=c(!0),[L,H]=c([]),[k,V]=c(!1),[S,O]=c([]),[z,N]=c({top:0,left:0}),[I,T]=c(""),D=a(null),Z=a(null),_=a(null);l(()=>{y&&o?.description&&A(o?.description)},[y,o.description]),l(()=>{const e=zk(u);H(e)},[u]),l(()=>{const e=(v.match(Qr)||[]).map(e=>Nk(e,L)).filter(Boolean);O(e)},[v]),l(()=>{const e=e=>{const t=Z.current&&!Z.current.contains(e.target)&&D.current&&!D.current.contains(e.target),n=_.current&&!_.current.contains(e.target)&&D.current&&!D.current.contains(e.target);(t||n)&&(V(!1),A(e=>e.replace(/(?:^|\s)(@\w*)$/,"")))};return k&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[k]);const{modifiedByUname:R,createdByUname:j,modifiedOn:B,createdOn:P}=o||{},U=B??P??(new Date).toLocaleString(),W=R??j??"Anonymous",X=s>2,Q=W?W.charAt(0).toUpperCase():"A";l(()=>{y&&o.description&&A(o.description)},[y,o.description]);const G=()=>{0!==v.trim().length&&(y?(r(o.id,v,S),E(!1),A("")):(x(!0),t(o.id,v,S),E(!1),A("")),y&&w(!1))};l(()=>{(()=>{if(!D.current)return;const e=D?.current,t=y?Z?.current:_?.current,n=D.current.selectionStart,r=((e,t)=>{const n=document.createElement("div"),r=getComputedStyle(e);n.style.cssText=`\n position: absolute;\n visibility: hidden;\n white-space: pre-wrap;\n word-wrap: break-word;\n overflow: auto;\n width: ${e.offsetWidth}px;\n height: ${e.offsetHeight}px;\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n padding: ${r.padding};\n border: ${r.border};\n box-sizing: ${r.boxSizing};\n line-height: ${r.lineHeight};\n `,n.scrollTop=e.scrollTop,n.scrollLeft=e.scrollLeft,document.body.appendChild(n);const i=e.value.slice(0,t);n.textContent=i||".";const o=document.createElement("span");o.textContent=".",n.appendChild(o);const a=o.getBoundingClientRect();return document.body.removeChild(n),{top:a.top-20,left:a.left}})(e,n),i=t?.getBoundingClientRect().height??0,o=e?.getBoundingClientRect();if(!o)return;const a=window.innerHeight-o.bottom,l=o.top;N({top:a<i&&l>i?n-i-16:n+32,left:r.left+10})})()},[v]);const Y=e=>{const t=e.target.value;A(t);const n=(t.match(/@\S+/g)||[]).map(e=>Nk(e,L)).filter(e=>null!==e);O(n);const r=e.target.selectionStart,i=t.slice(0,r),o=i.match(ti);T(o?.[1]||"");const a=ei.test(i);V(!!a)},J=e=>{if("@"===e.key)V(!0);else if("Backspace"===e.key&&D.current){const t=D.current.selectionStart,n=v.slice(0,t);n.endsWith("@")&&V(!1);const r=n.match(Yr);if(r){e.preventDefault();const i=r[1],o=n.lastIndexOf(i||""),a=v.slice(0,o)+v.slice(t);A(a),V(!1),O(()=>(a.match(/@\w+/g)||[]).map(e=>e.slice(1)).map(e=>Nk(e,L)).filter(Boolean)),setTimeout(()=>{D.current?.setSelectionRange(o,o)},0)}}},$=e=>{if(!D.current)return;const t=D.current.selectionStart,n=v.slice(0,t),r=n.match(Gr);if(r){const i=n.lastIndexOf(r[1]||""),o=v.slice(t),a=`@${e.replace(/\s+/g,"")} `,l=v.slice(0,i)+a+o;A(l),V(!1),setTimeout(()=>{D.current?.focus(),D.current?.setSelectionRange(i+a.length+1,i+a.length+1)},0),O(()=>(l.match(/@\w+/g)||[]).map(e=>e.slice(1)).map(e=>Nk(e,L)).filter(Boolean))}};return e("div",{className:"commentsContainer",children:n("div",{className:"comment-wrapper",children:[n("div",{className:"commentContainer",children:[e("div",{className:"commentContainer__avatar",children:o?.profileImage?e("img",{height:30,width:30,src:`data:image/jpeg;base64,${o?.profileImage}`}):Q}),n("div",{className:"ff-message-container",children:[n("div",{className:"ff-message",children:[e("div",{className:"ff-message-name",children:W}),e("div",{className:"ff-message-time",children:U})]}),n("div",{className:"ff-editable-container",children:[!y&&e(q,{className:"typography-text",children:o?.description?.split(ni).map((t,n)=>t.startsWith("@")?e("b",{children:t},`highlight-${n}`):e(f,{children:t},`text-${n}`))}),y&&n("div",{className:"inputContainer",children:[e("textarea",{rows:v.length<C?1:3,className:"inputContainer_input first_input",value:v,autoFocus:!0,placeholder:"Edit comment",ref:D,onChange:e=>Y(e),onKeyDown:J}),k&&e("div",{id:"mention-user",style:{position:"absolute",top:`${z.top}px`,left:`${z.left}px`},children:e(Ok,{hasAtSymbol:k,usersObj:L,optionClicked:$,charsAfterAt:I,mentionUserRef:Z})}),n("div",{className:"edit-comment",children:[e("div",{className:"reply",children:e(K,{title:y?"Update":"Add",children:e(F,{name:"comment_reply",hoverEffect:!0,disabled:y&&v.trim()===(o?.description?.trim()??"")||0===v.trim().length,onClick:()=>{G(),w(!1),E(!1)}})})}),e("div",{className:"reply",onClick:()=>{w(!1),E(!1),A("")},children:e(K,{title:y?"Cancel":"Close",children:e(F,{name:"close",color:"var(--ff-delete-button-attachment)",hoverEffect:!0})})})]})]}),n("div",{className:"comment-actions",children:[!X&&s<2&&o.comments?.length>0&&e("div",{className:"action-icon",onClick:()=>x(e=>!e),children:e(K,{title:""+(M?"collapse":"expand"),children:e(F,{name:M?"collapse-arrow":"expand-arrow",disabled:y||b,hoverEffect:!0})})}),!X&&s<2&&0===o.comments?.length&&e("div",{className:"action-icon",children:e(F,{name:"expand-arrow",disabled:!0})}),!m&&n("div",{className:"ff-comment-action-item",children:[s<2&&e("div",{className:"action-icon",children:e(K,{title:"Reply",children:e(F,{name:"comment_icon",disabled:y||d,hoverEffect:!0,onClick:()=>{E(!0)}})})}),h&&e("div",{className:"action-icon",children:e(K,{title:"Edit",children:e(F,{name:"edit",disabled:b||d,hoverEffect:!0,onClick:()=>w(!0)})})}),h&&g&&e("div",{className:"action-icon",children:e(K,{title:"Delete",children:e(F,{name:"delete",color:"var(--ff-delete-button-attachment)",onClick:()=>{b||i(o.id)},disabled:y||b||d,hoverEffect:!0})})})]})]})]})]})]}),e("div",{className:"comment-reply-container",children:b&&n("div",{className:"inputContainer",children:[e("textarea",{rows:v.length<C?1:3,className:"inputContainer_input first_input",value:v,autoFocus:!0,placeholder:"Add reply comments",ref:D,onChange:e=>Y(e),onKeyDown:J}),k&&e("div",{id:"mention-user",style:{position:"absolute",top:`${z.top}px`,left:`${z.left}px`},children:e(Ok,{hasAtSymbol:k,usersObj:L,optionClicked:$,charsAfterAt:I,mentionUserRef:_})}),n("div",{className:"edit-comment",children:[e("div",{className:"reply",onClick:()=>{G(),w(!1),E(!1)},children:e(K,{title:"Reply",children:e(F,{name:"comment_reply",hoverEffect:!0,disabled:Boolean(!v.length)})})}),e("div",{className:"reply",onClick:()=>{w(!1),E(!1),A("")},children:e(K,{title:"Cancel",children:e(F,{name:"close",color:"var(--ff-delete-button-attachment)",hoverEffect:!0})})})]})]})}),M&&o.comments?.length>0&&e("div",{className:`child-comments ${0===s?"first-level-child":""} ${1===s?"second-level-child":""}`,children:o.comments.map(n=>e("div",{className:`child-comments child-comments-${s+1}`,children:e(Ik,{handleInsertNode:t,handleEditNode:r,handleDeleteNode:i,comment:n,depth:s+1,isDisable:d,userDetails:u,isEditDeleteActionAllowed:o.createdBy===p,createdByID:p,isVewMode:m})},n.id))})]})})},Tk=({commentsData:t,handleAddComment:r,handleEditComment:i,handleDeleteComment:o,onCommentsDataChange:s,currentUser:d,isDisable:u=!1,userDetails:f,createdByID:h,rowBreakCharCount:C=83,isVewMode:m=!1,deleteEnable:g=!0,showTextarea:v=!1,autoFocus:A=!1})=>{const[y,w]=c(""),[b,E]=c([]),[M,x]=c(!1),[L,H]=c([]),[k,V]=c({top:0,left:0}),[S,O]=c(""),z=a(null),N=a(null),[I,T]=c(!1);l(()=>{const e=zk(f);H(e)},[f]);const D=(e,t)=>{for(const n of e){if(n.id===t)return n;const e=D(n.comments,t);if(e)return e}return null};l(()=>{t&&E(t)},[t]),l(()=>{const e=e=>{N.current&&!N.current.contains(e.target)&&(x(!1),w(e=>{const t=e.split(" ");return t.length>0&&t?.[t?.length-1]?.startsWith("@")?t.slice(0,-1).join(" "):e}))};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]);const{insertNode:Z,editNode:_,deleteNode:R}=(()=>{const e=(t,n,r)=>t.map(t=>t.id===n?{...t,comments:[...t.comments,{id:pi(),description:r.description,comments:[],createdBy:t.createdBy,modifiedBy:t.modifiedBy,createdByUname:t.createdByUname,modifiedByUname:t.modifiedByUname,createdOn:(new Date).toLocaleString(),modifiedOn:(new Date).toLocaleString(),commentParentId:n}]}:{...t,comments:e(t.comments,n,r)}),t=(e,n,r)=>e.map(e=>({...e,description:e.id===n?r:e.description,comments:t(e.comments,n,r)})),n=(e,t)=>e.filter(e=>e.id!==t).map(e=>({...e,comments:n(e.comments,t)}));return{insertNode:e,editNode:t,deleteNode:n}})(),j=(e,t,n)=>{if(!t.trim())return;const i={id:pi(),description:t,commentParentId:e,emailId:n,comments:[],createdBy:d?.createdBy,modifiedBy:d?.modifiedBy,createdByUname:d?.createdByUname,modifiedByUname:d?.modifiedByUname,createdOn:(new Date).toISOString(),modifiedOn:(new Date).toISOString()};E(t=>Z(t,e,i)),r&&r(i,D(b,e))},B=p((e,t,n)=>{const r=_(b,e,t);E(r);const o=D(r,e);i&&i(e,t,o,n)},[b,_,i]),P=p(async e=>{try{if(o){const t=await o(e);if(t?.success){const t=R(b,e);E(t)}}}catch(e){console.error("Error deleting comment:",e)}},[R,o]);l(()=>{s&&s(b)},[b,s]);l(()=>{(()=>{if(!z.current)return;const e=z?.current,t=N?.current,n=z.current.selectionStart,r=((e,t)=>{const n=document.createElement("div"),r=getComputedStyle(e);n.style.cssText=`\n position: absolute;\n visibility: hidden;\n white-space: pre-wrap;\n word-wrap: break-word;\n overflow: auto;\n width: ${e.offsetWidth}px;\n height: ${e.offsetHeight}px;\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n padding: ${r.padding};\n border: ${r.border};\n box-sizing: ${r.boxSizing};\n line-height: ${r.lineHeight};\n `,n.scrollTop=e.scrollTop,n.scrollLeft=e.scrollLeft,document.body.appendChild(n);const i=e.value.slice(0,t);n.textContent=i||".";const o=document.createElement("span");o.textContent=".",n.appendChild(o);const a=o.getBoundingClientRect();return document.body.removeChild(n),{top:a.top,left:a.left}})(e,n),i=t?.getBoundingClientRect().height??0,o=e?.getBoundingClientRect();if(!o)return;const a=window.innerHeight-o.bottom,l=o.top;V({top:a<i&&l>i?n-i-16:n+32,left:r.left+10})})()},[y]);l(()=>{y.includes("\n")||T(!1)},[y]);return n("div",{className:"ff-comments-container-box",children:[!m&&n("div",{className:"ff-first-comment "+(v?"no-border":""),children:[e(q,{fontWeight:"semi-bold",className:"ff-comment-heading",children:"Comments"}),!v&&n("div",{className:"input-wrapper",children:[e("textarea",{className:"inputContainer_input first_input",rows:I?3:y.length<C?1:3,autoFocus:A,value:y,onChange:e=>(e=>{const t=e.target.value;w(t);const n=e.target.selectionStart,r=t.slice(0,n),i=r.match(ti);O(i?.[1]||"");const o=ei.test(r);x(!!o),t||T(!1)})(e),placeholder:"Add a comment",disabled:u,ref:z,onKeyDown:e=>{if("@"===e.key)x(!0);else if("Backspace"===e.key&&z.current){const t=z.current.selectionStart;if(y.slice(0,t).endsWith("@")&&x(!1),M){e.preventDefault();const n=y.slice(0,t-1)+y.slice(t);w(n);const r=t-1,i=n.slice(0,r).match(ti);O(i?.[1]||""),x(!!i),setTimeout(()=>{z.current?.setSelectionRange(r,r)},0)}}"Enter"===e.key&&T(!0)}}),M&&e("div",{id:"mention-user",style:{position:"absolute",top:`${k.top}px`,left:`${k.left}px`},children:e(Ok,{hasAtSymbol:M,usersObj:L,optionClicked:e=>{if(!z.current)return;const t=z.current.selectionStart,n=y.slice(0,t),r=n.match(Kr);if(r){const i=n.lastIndexOf(r[1]??""),o=y.slice(t),a=`@${e} `,l=y.slice(0,i)+a+o;w(l),x(!1),setTimeout(()=>{z.current?.focus();const e=i+a.length+1;z.current?.setSelectionRange(e,e)},0)}},charsAfterAt:S,mentionUserRef:N})}),e("span",{className:"reply-comment",children:e(K,{title:"Add",children:e(F,{name:"comment_reply",onClick:()=>{if(!y.trim())return;const e=L.filter(e=>new RegExp(`@${e.name}\\b`,"i").test(y)).map(e=>e.emailId),t={id:pi(),description:y,comments:[],createdBy:d?.createdBy,modifiedBy:d?.modifiedBy,createdByUname:d?.createdByUname,modifiedByUname:d?.modifiedByUname,createdOn:(new Date).toISOString(),modifiedOn:(new Date).toISOString(),commentParentId:"",emailId:e};r&&r(t,null),E(e=>[...e,t]),w("")},hoverEffect:!0,disabled:Boolean(!y.length)})})})]})]}),b.length>0&&b.map(t=>e(Ik,{handleInsertNode:j,handleEditNode:B,handleDeleteNode:P,comment:t,depth:0,isDisable:u,userDetails:f,isEditDeleteActionAllowed:t.createdBy===h,createdByID:h,isVewMode:m,deleteEnable:g},t.id))]})},Dk=()=>{const e=a(!0);return{canTrigger:()=>e.current,setTriggered:()=>{e.current=!1},resetTrigger:()=>{e.current=!0}}},Zk=({isOpen:t,onClose:r,onContinue:i,titleMessage:o="Warning!",subTitleMessage:a="Unsaved Changes.",iconName:l,modalMessage:s="Your web service data will be lost. Are you sure you want to exit?",firstButtonLabel:c="Cancel",secondButtonLabel:d="Continue",buttonVariant:u="warning",border:f="1px solid var(--warning-modal-border-color)",popupWidth:h="420",popupHeight:p="226",colorForTitleMessage:C="var(--status-button-bg-warning)",footerContent:m,firstButtonDisabled:g=!1,secondButtonDisabled:v=!1,zIndex:A=1100,iconSize:y=94})=>e(LC,{overlayClassName:"custom-overlay",isOpen:t,onClose:r,isHeaderDisplayed:!1,zIndex:A,children:n("div",{className:"warning_modal_container",children:[n("div",{className:"warning_modal_content",children:[e(F,{name:l,className:"warning_modal_icon",width:y,height:y}),n("div",{className:"warning_modal_message",children:[n(q,{fontSize:20,fontWeight:"semi-bold",className:"warning_modal_title_wrapper",children:[" ",n(q,{color:`${C}`,fontSize:20,fontWeight:"semi-bold",children:[" ",o," "]})," ",a]}),n("div",{className:"warning_modal_message_wrapper",children:[e(q,{fontSize:16,children:s}),e(q,{as:"div",children:m})]})]})]}),n("div",{className:"warning_modal_footer_button",children:[e(U,{buttonHeight:"24px",variant:"secondary",label:c,onClick:r,disabled:g}),d&&e(U,{buttonHeight:"24px",variant:u||"warning",label:d,onClick:i,disabled:v})]})]}),ariaHideApp:!0,isFooterDisplayed:!1,customWidth:`${h}px`,customHeight:`${p}px`,boxShadow:"0px 1px 4px 0px var(--toaster-boxshadow)",border:f});function _k(e,t=[]){return t.reduce((e,t)=>e.replace(new RegExp(function(e){return e.replace(Zr,"\\$&")}(t),"gi"),""),e).replace(/([A-Z])/g," $1").trim().replace(/^./,e=>e.toUpperCase())}function Rk(e,t=[]){return e.toUpperCase()===e&&(e=e.toLowerCase()),e.includes("_")?function(e){return e.toLowerCase().replace(/_/g," ").replace(/^./,e=>e.toUpperCase())}(e):_k(e,t)}const jk=({onSelectVariable:t,dropdownPosition:r,filteredOptions:i=[],position:o="relative",width:a="300px",zIndex:l=1e3,height:s="160px",truncateTextValue:c=34,isTruncateText:d=!1})=>n("div",{className:I("ff-variable-dropdown",o),style:r?{top:r.top+30,left:r.left-30,width:a,zIndex:l}:{width:a,zIndex:l,height:s},children:[i?.map(n=>{const r=d?xn(n?.name,c,"pixel"):n?.name,i=!!d&&Ln(n?.name,c,"pixel");return e("div",{className:"ff-variable-option",onClick:()=>t(n),children:d?e(K,{title:i?n?.name:"",children:e(q,{children:r})}):e(q,{children:r})},n?.id)}),0===i?.length&&e("div",{className:"ff-variable-option .ff-variable-option-no-data ",children:e(q,{as:"span",fontSize:14,children:"No Option"})})]}),Bk=o(({label:t="",hashInputValue:r="",setHashInputValue:i,variableList:o=[],addForloopPrefix:s=!1,placeholder:d="Enter text",onChange:u,onCreateVariableClick:f,value:h="",dropdownWidth:p="inherit",isHash:C=!1,dataFiles:m=[],showAddVariableIcon:g=!0,helperText:v="",error:A,autoComplete:y="off",showHidePasswordIcon:b=!0,required:E=!1,formProps:M={},onlyDropdown:x=!1,type:L,onFocus:H,onBlur:k,readOnly:V=!1,height:S="160px",truncateTextValue:O=34,isTruncateText:z=!1,...N},I)=>{const[T,D]=c(!1),[Z,_]=c(!1),[R,j]=c(!1),[B,P]=c(null),[U,W]=c(0),[X,Q]=c(!1),[Y,J]=c(!1),[$,ee]=c([]),te=a(null);w(I,()=>te.current),l(()=>{null!==B&&te.current&&(te.current.setSelectionRange(B,B),te.current.focus())},[B]),l(()=>{if(C?D(h.startsWith("#")):J(!h?.includes("$")),h.startsWith("#")&&C){const e=h.slice(1).toLowerCase(),t=m.filter(t=>t.name.toLowerCase().includes(e));ee(t),D(!0)}},[h]),l(()=>{if(!X&&x){const e=m.filter(e=>e.toLowerCase().includes(h.toLowerCase())).map((e,t)=>({id:t+1,name:e}));ee(e),D(e.length>0)}Q(!1)},[h]);const ne=()=>{te.current&&W(te.current.selectionStart||0)},re=ne,ie=ne;l(()=>{te.current&&W(te.current.selectionStart||0)},[h]);const oe=e=>{if(te.current){const{selectionStart:t,selectionEnd:n}=te.current,r=`{${"STEPGROUP"===e.parentVariableType?"SGV":"LOCAL"===e.type?"LV":"GLOBAL"===e.type?"GV":"GROUP"===e.type?"SGV":[String(e?._id??""),String(e?.id??"")].some(e=>e.includes("PARAMETER"))?"SGP":"_startforloop"===e.type?"FLV_for:":"DATAPROVIDER"===e.type?"DPV":"PEV"}${"_startforloop"===e?.type?"":"_"}${"DATAPROVIDER"===e?.type?e?.dpName+":"+e?.varname:e.name}}`;let o;if(o=C&&"#"===h[0]||x&&!e?.type?e.name+h.slice(n||1):h.slice(0,function(e,t){const n=e.lastIndexOf("$",t-1),r=e.indexOf("$",t);return-1===n&&-1===r?-1:-1===n?r:-1===r||Math.abs(t-n)<=Math.abs(r-t)?n:r}(h,U)||0)+"$"+r+h.slice(n||0),u){u({target:{value:o}},e)}te.current.value=o,i?.(e),P((t||0)+r.length),D(!1),Q(!0),_(!0)}};const ae=function(e,t,n){let r=!1,i="";const o="}"===h[t-1];if(t<0||t>e.length)return{showDropdown:r,searchString:i};const a=e.lastIndexOf("$",t-1),l=e.indexOf("$",t);if(-1!==a&&(t===a+1?(r=!0,i=""):(i=e.slice(a+1,-1===l?void 0:l),t>a+1&&(i=e.slice(a+1,t)),r=!0),Z&&o&&(r=!1),(/[{}]/.test(i)||0===t)&&(r=!1,i=""),i)){n.some(e=>("_startforloop"===e.type&&s?`FLV_for:${e.name}`:e.name).toLowerCase().includes(i.toLowerCase()))||(r=!1,i="")}return{showDropdown:r,searchString:i}}(h,U,o),[le,se]=c(!1);return n("div",{className:"ff-add-variable-container",children:[n("div",{className:"ff-add-variable-input",children:[e(xi,{readOnly:V,...N,name:"add_variable",ref:te,type:((e,t)=>"password"===e?t?"text":"password":e??"text")(L,le),value:h,onChange:u,variant:"primary",label:t,placeholder:d,onClick:re,onKeyUp:ie,onFocus:e=>{setTimeout(()=>{j(!0),H?.(e)},500)},onBlur:e=>{(e=>{e.relatedTarget&&e.relatedTarget.closest(".dropdown-container")||j(!1)})(e),k?.(e)},autoComplete:y,helperText:v,error:A,required:E,...M}),"password"===L&&b&&e(K,{title:le?"Hide":"Show",children:e(q,{as:"span",className:"ff-password-icon",children:e(F,{onClick:()=>{se(e=>!e)},name:le?"hide_access_icon":"view_access_icon",width:16,height:16,hoverEffect:!0})})}),!G(h)&&!C&&Y&&g&&e(K,{title:"Add Variable",children:e(F,{onClick:f,name:"add_variable",width:24,height:24,hoverEffect:!0})})]}),ae?.showDropdown&&R&&e(BM,{position:"absolute",width:p,optionsList:o.filter(e=>("_startforloop"===e.type&&s?`FLV_for:${e.name}`:e.name).toLowerCase().includes(ae?.searchString.toLowerCase())),onSelectVariable:oe,height:S}),T&&(C||x)&&e(jk,{position:"relative",width:p,filteredOptions:$,zIndex:2e3,onSelectVariable:oe,height:S,isTruncateText:z,truncateTextValue:O})]})}),Pk=(e,t)=>{const n=new Set;for(const r of e){const e=t?r[t]:JSON.stringify(r);if(n.has(e))return!0;n.add(e)}return!1};var Fk,qk;var Uk=(qk||(qk=1,Fk=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(e,t){e.exports=i},function(e,t,n){var r;
36
+ */var GL={};void 0!==GL.asn1&&GL.asn1||(GL.asn1={}),GL.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.substring(0,1))t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var n=t.substring(1).length;n%2==1?n+=1:t.match(/^[0-7]/)||(n+=2);for(var r="",i=0;i<n;i++)r+="f";t=new lL(r,16).xor(e).add(lL.ONE).toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(e,t){return hextopem(e,t)},this.newObject=function(e){var t=GL.asn1,n=t.DERBoolean,r=t.DERInteger,i=t.DERBitString,o=t.DEROctetString,a=t.DERNull,l=t.DERObjectIdentifier,s=t.DEREnumerated,c=t.DERUTF8String,d=t.DERNumericString,u=t.DERPrintableString,f=t.DERTeletexString,h=t.DERIA5String,p=t.DERUTCTime,C=t.DERGeneralizedTime,m=t.DERSequence,g=t.DERSet,v=t.DERTaggedObject,A=t.ASN1Util.newObject,y=Object.keys(e);if(1!=y.length)throw"key of param shall be only one.";var w=y[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 n(e[w]);if("int"==w)return new r(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 l(e[w]);if("enum"==w)return new s(e[w]);if("utf8str"==w)return new c(e[w]);if("numstr"==w)return new d(e[w]);if("prnstr"==w)return new u(e[w]);if("telstr"==w)return new f(e[w]);if("ia5str"==w)return new h(e[w]);if("utctime"==w)return new p(e[w]);if("gentime"==w)return new C(e[w]);if("seq"==w){for(var b=e[w],E=[],M=0;M<b.length;M++){var x=A(b[M]);E.push(x)}return new m({array:E})}if("set"==w){for(b=e[w],E=[],M=0;M<b.length;M++){x=A(b[M]);E.push(x)}return new g({array:E})}if("tag"==w){var L=e[w];if("[object Array]"===Object.prototype.toString.call(L)&&3==L.length){var H=A(L[2]);return new v({tag:L[0],explicit:L[1],obj:H})}var k={};if(void 0!==L.explicit&&(k.explicit=L.explicit),void 0!==L.tag&&(k.tag=L.tag),void 0===L.obj)throw"obj shall be specified for 'tag'.";return k.obj=A(L.obj),new v(k)}},this.jsonToASN1HEX=function(e){return this.newObject(e).getEncodedHex()}},GL.asn1.ASN1Util.oidHexToInt=function(e){for(var t="",n=parseInt(e.substring(0,2),16),r=(t=Math.floor(n/40)+"."+n%40,""),i=2;i<e.length;i+=2){var o=("00000000"+parseInt(e.substring(i,i+2),16).toString(2)).slice(-8);if(r+=o.substring(1,8),"0"==o.substring(0,1))t=t+"."+new lL(r,2).toString(10),r=""}return t},GL.asn1.ASN1Util.oidIntToHex=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},n=function(e){var n="",r=new lL(e,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 l=r.substring(a,a+7);a!=r.length-7&&(l="1"+l),n+=t(parseInt(l,2))}return n};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var r="",i=e.split("."),o=40*parseInt(i[0])+parseInt(i[1]);r+=t(o),i.splice(0,2);for(var a=0;a<i.length;a++)r+=n(i[a]);return r},GL.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 n=t.length/2;if(n>15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);return(128+n).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""}},GL.asn1.DERAbstractString=function(e){GL.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))},QL(GL.asn1.DERAbstractString,GL.asn1.ASN1Object),GL.asn1.DERAbstractTime=function(e){GL.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,n){var r=this.zeroPadding,i=this.localDateToUTC(e),o=String(i.getFullYear());"utc"==t&&(o=o.substring(2,4));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 l=i.getMilliseconds();if(0!=l){var s=r(String(l),3);a=a+"."+(s=s.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,n,r,i,o){var a=new Date(Date.UTC(e,t-1,n,r,i,o,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},QL(GL.asn1.DERAbstractTime,GL.asn1.ASN1Object),GL.asn1.DERAbstractStructured=function(e){GL.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)},QL(GL.asn1.DERAbstractStructured,GL.asn1.ASN1Object),GL.asn1.DERBoolean=function(){GL.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},QL(GL.asn1.DERBoolean,GL.asn1.ASN1Object),GL.asn1.DERInteger=function(e){GL.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=GL.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new lL(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))},QL(GL.asn1.DERInteger,GL.asn1.ASN1Object),GL.asn1.DERBitString=function(e){if(void 0!==e&&void 0!==e.obj){var t=GL.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.getEncodedHex()}GL.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 n="0"+e;this.hTLV=null,this.isModified=!0,this.hV=n+t},this.setByBinaryString=function(e){var t=8-(e=e.replace(/0+$/,"")).length%8;8==t&&(t=0);for(var n=0;n<=t;n++)e+="0";var r="";for(n=0;n<e.length-1;n+=8){var i=e.substring(n,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"+t+r},this.setByBooleanArray=function(e){for(var t="",n=0;n<e.length;n++)1==e[n]?t+="1":t+="0";this.setByBinaryString(t)},this.newFalseArray=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=!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))},QL(GL.asn1.DERBitString,GL.asn1.ASN1Object),GL.asn1.DEROctetString=function(e){if(void 0!==e&&void 0!==e.obj){var t=GL.asn1.ASN1Util.newObject(e.obj);e.hex=t.getEncodedHex()}GL.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"},QL(GL.asn1.DEROctetString,GL.asn1.DERAbstractString),GL.asn1.DERNull=function(){GL.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},QL(GL.asn1.DERNull,GL.asn1.ASN1Object),GL.asn1.DERObjectIdentifier=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},n=function(e){var n="",r=new lL(e,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 l=r.substring(a,a+7);a!=r.length-7&&(l="1"+l),n+=t(parseInt(l,2))}return n};GL.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 r="",i=e.split("."),o=40*parseInt(i[0])+parseInt(i[1]);r+=t(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(e){var t=GL.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))},QL(GL.asn1.DERObjectIdentifier,GL.asn1.ASN1Object),GL.asn1.DEREnumerated=function(e){GL.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=GL.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new lL(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))},QL(GL.asn1.DEREnumerated,GL.asn1.ASN1Object),GL.asn1.DERUTF8String=function(e){GL.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"},QL(GL.asn1.DERUTF8String,GL.asn1.DERAbstractString),GL.asn1.DERNumericString=function(e){GL.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"},QL(GL.asn1.DERNumericString,GL.asn1.DERAbstractString),GL.asn1.DERPrintableString=function(e){GL.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"},QL(GL.asn1.DERPrintableString,GL.asn1.DERAbstractString),GL.asn1.DERTeletexString=function(e){GL.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"},QL(GL.asn1.DERTeletexString,GL.asn1.DERAbstractString),GL.asn1.DERIA5String=function(e){GL.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"},QL(GL.asn1.DERIA5String,GL.asn1.DERAbstractString),GL.asn1.DERUTCTime=function(e){GL.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))},QL(GL.asn1.DERUTCTime,GL.asn1.DERAbstractTime),GL.asn1.DERGeneralizedTime=function(e){GL.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))},QL(GL.asn1.DERGeneralizedTime,GL.asn1.DERAbstractTime),GL.asn1.DERSequence=function(e){GL.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}},QL(GL.asn1.DERSequence,GL.asn1.DERAbstractStructured),GL.asn1.DERSet=function(e){GL.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 n=this.asn1Array[t];e.push(n.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)},QL(GL.asn1.DERSet,GL.asn1.DERAbstractStructured),GL.asn1.DERTaggedObject=function(e){GL.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(e,t,n){this.hT=t,this.isExplicit=e,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(/^../,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)))},QL(GL.asn1.DERTaggedObject,GL.asn1.ASN1Object);var KL,YL,JL=window&&window.__extends||(KL=function(e,t){return KL=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},KL(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}KL(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),$L=function(e){function t(n){var r=e.call(this)||this;return n&&("string"==typeof n?r.parseKey(n):(t.hasPrivateKeyProperty(n)||t.hasPublicKeyProperty(n))&&r.parsePropertiesFrom(n)),r}return JL(t,e),t.prototype.parseKey=function(e){try{var t=0,n=0,r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e)?Qx(e):Gx.unarmor(e),i=rL.decode(r);if(3===i.sub.length&&(i=i.sub[2].sub[0]),9===i.sub.length){t=i.sub[1].getHexStringValue(),this.n=hL(t,16),n=i.sub[2].getHexStringValue(),this.e=parseInt(n,16);var o=i.sub[3].getHexStringValue();this.d=hL(o,16);var a=i.sub[4].getHexStringValue();this.p=hL(a,16);var l=i.sub[5].getHexStringValue();this.q=hL(l,16);var s=i.sub[6].getHexStringValue();this.dmp1=hL(s,16);var c=i.sub[7].getHexStringValue();this.dmq1=hL(c,16);var d=i.sub[8].getHexStringValue();this.coeff=hL(d,16)}else{if(2!==i.sub.length)return!1;if(i.sub[0].sub){var u=i.sub[1].sub[0];t=u.sub[0].getHexStringValue(),this.n=hL(t,16),n=u.sub[1].getHexStringValue(),this.e=parseInt(n,16)}else t=i.sub[0].getHexStringValue(),this.n=hL(t,16),n=i.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(e){return!1}},t.prototype.getPrivateBaseKey=function(){var e={array:[new GL.asn1.DERInteger({int:0}),new GL.asn1.DERInteger({bigint:this.n}),new GL.asn1.DERInteger({int:this.e}),new GL.asn1.DERInteger({bigint:this.d}),new GL.asn1.DERInteger({bigint:this.p}),new GL.asn1.DERInteger({bigint:this.q}),new GL.asn1.DERInteger({bigint:this.dmp1}),new GL.asn1.DERInteger({bigint:this.dmq1}),new GL.asn1.DERInteger({bigint:this.coeff})]};return new GL.asn1.DERSequence(e).getEncodedHex()},t.prototype.getPrivateBaseKeyB64=function(){return Ux(this.getPrivateBaseKey())},t.prototype.getPublicBaseKey=function(){var e=new GL.asn1.DERSequence({array:[new GL.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new GL.asn1.DERNull]}),t=new GL.asn1.DERSequence({array:[new GL.asn1.DERInteger({bigint:this.n}),new GL.asn1.DERInteger({int:this.e})]}),n=new GL.asn1.DERBitString({hex:"00"+t.getEncodedHex()});return new GL.asn1.DERSequence({array:[e,n]}).getEncodedHex()},t.prototype.getPublicBaseKeyB64=function(){return Ux(this.getPublicBaseKey())},t.wordwrap=function(e,t){if(!e)return e;var n="(.{1,"+(t=t||64)+"})( +|$\n?)|(.{1,"+t+"})";return e.match(RegExp(n,"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}(WL),eH="undefined"!=typeof process?null===(YL=process.env)||void 0===YL?void 0:YL.npm_package_version:void 0,tH=function(){function e(e){void 0===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=e.key||null}return e.prototype.setKey=function(e){e?(this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new $L(e)):!this.key&&this.log&&console.error("A key was not set.")},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(Wx(e))}catch(e){return!1}},e.prototype.encrypt=function(e){try{return Ux(this.getKey().encrypt(e))}catch(e){return!1}},e.prototype.encryptOAEP=function(e){try{return Ux(this.getKey().encrypt(e,UL))}catch(e){return!1}},e.prototype.sign=function(e,t,n){void 0===t&&(t=function(e){return e}),void 0===n&&(n="");try{return Ux(this.getKey().sign(e,t,n))}catch(e){return!1}},e.prototype.signSha256=function(e){return this.sign(e,function(e){return zL(OL(e))},"sha256")},e.prototype.verify=function(e,t,n){void 0===n&&(n=function(e){return e});try{return this.getKey().verify(e,Wx(t),n)}catch(e){return!1}},e.prototype.verifySha256=function(e,t){return this.verify(e,t,function(e){return zL(OL(e))})},e.prototype.getKey=function(e){if(!this.key){if(this.key=new $L,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=eH,e}();async function nH(e,t,n="https"){if("http"===n){const n=new tH;n.setPublicKey(t);const r=n.encrypt(e);if(!r)throw new Error("JSEncrypt failed: Encryption returned false (check key or data length).");return r}{const n=Uint8Array.from(atob(t),e=>e.charCodeAt(0)),r=await crypto.subtle.importKey("spki",n,{name:"RSA-OAEP",hash:"SHA-256"},!1,["encrypt"]),i=(new TextEncoder).encode(e),o=await crypto.subtle.encrypt({name:"RSA-OAEP"},r,i);return btoa(String.fromCharCode(...new Uint8Array(o)))}}const rH=e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"gb":return 1024*n*1024*1024;case"mb":return 1024*n*1024;case"kb":return 1024*n;default:return n}},iH=e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"gb":default:return n;case"mb":return n/1024;case"kb":return n/1048576;case"b":return n/1073741824}},oH=({data:r,isYaxisSticky:i=!1,barWidth:o,height:s,barGap:d=20,colors:u=[],xAxisLabel:f,isTruncateText:h=!0,yAxisLabel:p,padding:C=20,yAxisDivisions:m=5,barBorderRadius:g=0,legend:v=!0,showXAxisLabels:A=!0,icons:y=[],iconSize:w,legendPosition:b="bottom",legendGap:E=5,extendBarChartRightWidth:M=0,isYAxisValuePercentage:x=!1,selectedBar:L,setSelectedBar:H,onSelectedBar:k=e=>{},totalLabel:V="Total Execution",customToolTip:S=!1,isOnclick:O=!1,isDashboardVersions:z,type:N="",isMemory:I,tooltipWidth:T="fit-content"})=>{const D=a(null),[Z,_]=c(null),[R,j]=c(!1);l(()=>{const e=()=>{const e=D.current;e&&R&&(e.style.display="none")};return window.addEventListener("scroll",e,!0),()=>window.removeEventListener("scroll",e,!0)},[R]);const B=(e=>{const t=["TB","GB","MB","KB"];for(const n of t){if(e.some(e=>"string"==typeof e.value&&e.value.toLowerCase().includes(n.toLowerCase())))return n}return null})(r),P=r.map(e=>{if("string"==typeof e.value){let t=0;if("memory"===N)t=iH(e.value);else if(I)switch(B){case"TB":t=(e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"tb":default:return n;case"gb":return n/1024;case"mb":return n/1048576;case"kb":return n/1073741824;case"b":return n/1099511627776}})(e.value);break;case"GB":t=iH(e.value);break;case"MB":t=(e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"mb":default:return n;case"gb":return 1024*n;case"tb":return 1024*n*1024;case"kb":return n/1024;case"b":return n/1048576}})(e.value);break;case"KB":t=(e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"kb":default:return n;case"mb":return 1024*n;case"gb":return 1024*n*1024;case"tb":return 1024*n*1024*1024;case"b":return n/1024}})(e.value)}else t=parseFloat(e.value);return{...e,normalizedValue:t}}return{...e,normalizedValue:e.value}});let U=0;"memory"===N&&(U=r.reduce((e,t)=>"string"==typeof t.value?e+rH(t.value):e+1024*Number(t.value)*1024*1024,0));const W=U/1048576,X=W<1024?`${Math.round(W)} mb`:`${(W/1024).toFixed(1)} gb`;let Q=Math.max(...P.map(e=>e.normalizedValue));Q="memory"===N?Math.max(Q,1):Math.max(Q,m);const G=40,K=40,Y=P.length*o+(P.length-1)*d+(i?K:90)+M,J=Date.now(),$=t=>t.filter(e=>e.length>1).map((t,n)=>e("defs",{children:e("linearGradient",{id:`gradient-${J}-${N}-${n}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:t.map((r,i)=>e("stop",{offset:i/(t.length-1)*100+"%",stopColor:r},`${n}-${i}`))})},n)),ee=e=>{if(!u.length)return"grey";const t=u[e%u.length];return 1===t?.length?t[0]:`url(#gradient-${J}-${N}-${e%u.length})`},te=(e,t,n,r,i)=>{j(!0);const o=D.current;if(o)if(o.style.display="block",S)o.innerHTML=`<div>\n <div><Typography fontWeight='semi-bold'>${e}</Typography></div>\n <div><Typography>${n||""}</Typography></div>\n <div><Typography>${V} : ${t} ${r?"("+r+"%)":""}</Typography></div>\n </div>`;else if(z){const e=i?i.join(", "):"";o.innerHTML=`\n <div>\n <div><Typography>${V} : ${t}</Typography></div>\n ${e?`<div><Typography>Versions : ${e}</Typography></div>`:""}\n </div>`}else o.innerHTML="memory"===N?`<strong>${e}</strong>: ${t} / ${X}`:`<strong>${e}</strong>: ${t} ${x?"%":""}`},ne=(e,t=!1)=>{const n=D.current;if(n){const r=n.parentElement?.getBoundingClientRect(),i=window.scrollX,o=window.scrollY,a=1===P?.length||!t?e.clientX-(r?.left||0)+i+10:e.clientX-(r?.left||0)+i-n?.offsetWidth-10,l=e.clientY-(r?.top||0)+o-20;n.style.left=`${a}px`,n.style.top=`${l}px`}},re=()=>{j(!1);const e=D.current;e&&(e.style.display="none")},ie=e=>{H&&(H(e),O&&k(e))},oe=e=>{if(h){if(xn(e,10).endsWith("...")){const t=D.current;t&&(t.style.display="block",t.innerHTML=e)}}},ae=(e,t,n)=>{if(h){xn(t,10).endsWith("...")&&ne(e,n===P.length-1)}};return n("div",{className:"ff-bar-chart-container",children:[e("div",{ref:D,className:"ff-bar-chart-tooltip",style:{width:T}}),v&&"top"===b&&e("div",{className:"ff-legend-container",children:e("div",{className:"ff-bar-chart-legend",style:{gap:`${E}px`},children:P.map((t,r)=>n("div",{className:"ff-bar-chart-legend-item",onMouseEnter:()=>_(r),onMouseLeave:()=>_(null),children:[y[r]&&"string"==typeof y[r]?e(F,{name:String(y[r]),width:w,height:w}):e("span",{className:"ff-bar-chart-legend-item-circle",style:{backgroundColor:u[r%u.length]?.[0]||"grey"}}),e(q,{as:"div",fontSize:10,fontWeight:"regular",className:"ff-legend-label",children:t.label})]},t.label))})}),i?n("div",{className:"ff-bar-chart-wrapper",children:[e("div",{className:"ff-y-axis",children:e("svg",{width:60,height:s+G+(f?20:0),children:n(t,{children:[Array.from({length:m+1}).map((t,n)=>{const r=s-n/m*s+G+4,i=n*Q/m,o="memory"===N?i.toFixed(1):x?`${i.toFixed(0).padStart(2,"0")}%`:i.toFixed(0).padStart(2,"0");return e("text",{x:50,y:r,fill:"black",textAnchor:"middle",className:"ff-bar-chart-labels",children:o},n)}),p&&e("text",{x:-(s/2+35),y:i?20:10,transform:"rotate(-90)",fill:"black",textAnchor:"middle",alignmentBaseline:"middle",className:"ff-bar-chart-labels",children:p})]})})}),e("div",{className:"ff-chart-scrollable",children:n("svg",{width:Y,height:s+G+5+(A?20:0)+(f?20:0),children:[Array.isArray(u)&&u.length>0&&$(u),P.map((t,r)=>{const i=t.normalizedValue/Q*s,a=t.normalizedValue<1?2:i,l=r*(o+d)+C,c=s-a+G,u=w||20,f=l+o/2-u/2,p=c-u,m=L===t.label,v=Z===r;return n("g",{children:[y[r]&&"string"==typeof y[r]&&e("g",{onMouseEnter:()=>te(t.label,"memory"===N?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===P.length-1),onMouseLeave:re,children:e(F,{name:String(y[r]),x:String(f),y:String(p),width:u,height:u,chartIcon:!0})}),e("rect",{x:l,y:c,width:o,height:a,fill:ee(r),rx:g,ry:g,style:{strokeWidth:m?3:0,opacity:null===Z||v?1:.3,cursor:O?"pointer":"default",transition:"opacity 0.5s ease"},onMouseEnter:()=>te(t.label,"memory"===N||I?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===P.length-1),onMouseLeave:re,onClick:()=>ie(t.label)}),m&&O&&e("rect",{x:l,y:c,width:o,height:a,fill:"var(--select-chart-highlight-color)",rx:g,ry:g,onMouseEnter:()=>te(t.label,"memory"===N?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===P.length-1),onMouseLeave:re}),A&&e("text",{onMouseEnter:()=>oe(t.label),onMouseMove:e=>ae(e,t.label,r),onMouseLeave:re,x:0===r?l:r===P.length-1?l+o:l+o/2,y:s+G+15,className:"ff-bar-chart-labels",fill:m?"var(--brand-color)":"black",fontWeight:m?"bold":"normal",textAnchor:0===r?"start":"middle",children:h?xn(t.label,10):t.label})]},r)}),e("line",{x1:i?0:C,y1:s+G,x2:Y,y2:s+G,stroke:"#D9D9D9",strokeWidth:"1"}),!i&&f&&e("text",{x:Y/2,y:s+G+(A?40:20),fontSize:"12",fill:"black",textAnchor:"middle",className:"ff-bar-chart-labels",children:f})]})}),e("div",{className:"ff-bar-chart-x-axis-label",children:f})]}):e("div",{children:n("svg",{width:Y,height:s+G+5+(A?20:0)+(f?20:0),children:[Array.isArray(u)&&u.length>0&&$(u),Array.from({length:m+1}).map((t,n)=>{const r=s-n/m*s+G+4,i=n*Q/m,o="memory"===N?i.toFixed(1):x?`${i.toFixed(0).padStart(2,"0")}%`:i.toFixed(0).padStart(2,"0");return e("text",{x:K,y:r,fill:"black",textAnchor:"middle",className:"ff-bar-chart-labels",children:o},n)}),P.map((t,r)=>{const i=t.normalizedValue/Q*s,a=t.normalizedValue<1?2:i,l=r*(o+d)+K+C,c=s-a+G,u=w||20,f=l+o/2-u/2,p=c-u,m=L===t.label,v=Z===r;return n("g",{children:[y[r]&&"string"==typeof y[r]&&e("g",{onMouseEnter:()=>te(t.label,"memory"===N?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===P.length-1),onMouseLeave:re,children:e(F,{name:String(y[r]),x:String(f),y:String(p),width:u,height:u,chartIcon:!0})}),e("rect",{x:l,y:c,width:o,height:a,fill:ee(r),rx:g,ry:g,style:{strokeWidth:m?3:0,opacity:null===Z||v?1:.3,cursor:O?"pointer":"default",transition:"opacity 0.5s ease"},onMouseEnter:()=>te(t.label,"memory"===N||I?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===P.length-1),onMouseLeave:re,onClick:()=>ie(t.label)}),m&&O&&e("rect",{x:l,y:c,width:o,height:a,fill:"var(--select-chart-highlight-color)",rx:g,ry:g,onMouseEnter:()=>te(t.label,"memory"===N?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===P.length-1),onMouseLeave:re}),A&&e("g",{children:e("text",{x:0===r?l:r===P.length-1?l+o:l+o/2,y:s+G+15,className:"ff-bar-chart-labels",fill:m?"var(--brand-color)":"black",fontWeight:m?"bold":"normal",textAnchor:0===r?"start":"middle",onMouseEnter:()=>oe(t.label),onMouseMove:e=>ae(e,t.label,r),onMouseLeave:re,children:h?xn(t.label,10):t.label})})]},r)}),e("line",{x1:60,y1:s+G,x2:Y,y2:s+G,stroke:"#D9D9D9",strokeWidth:"1"}),f&&e("text",{x:Y/2,y:s+G+(A?40:20),fontSize:"12",fill:"black",textAnchor:"middle",className:"ff-bar-chart-labels",children:f}),p&&e("text",{x:-(s/2+35),y:10,transform:"rotate(-90)",fill:"black",textAnchor:"middle",alignmentBaseline:"middle",className:"ff-bar-chart-labels",children:p})]})}),v&&"bottom"===b&&e("div",{className:"ff-legend-container",children:e("div",{className:"ff-bar-chart-legend",style:{gap:`${E}px`},children:r.map((t,r)=>n("div",{className:"ff-bar-chart-legend-item",onMouseEnter:()=>_(r),onMouseLeave:()=>_(null),children:[y[r]&&"string"==typeof y[r]?e(F,{name:String(y[r]),width:w,height:w}):e("span",{className:"ff-bar-chart-legend-item-circle",style:{backgroundColor:u[r%u.length]?.[0]||"grey"}}),e("div",{children:e(q,{as:"div",fontSize:10,fontWeight:"regular",className:"ff-legend-label",children:t.label})})]},t.label))})})]})},aH=(e,t,n,r,i)=>{const o=e+n*Math.cos(r),a=t+n*Math.sin(r),l=e+n*Math.cos(i),s=t+n*Math.sin(i);return`M ${o} ${a} A ${n} ${n} 0 ${i-r>Math.PI?1:0} 1 ${l} ${s}`},lH=({radius:r,lineWidth:i,lineCap:o,barValues:a,labelHeading:l,legendType:s="numberLegend",isLegendDetails:d=!0,isPillValueVisible:u=!0,chartToLegendGap:f="16px",legendGap:h="8px",labelFontSize:p=12,subLabelFontSize:C=8,gapBetweenArch:m=10,capsuleStyle:g={padding:"4px"}})=>{const[v,A]=c({visible:!1,x:0,y:0,content:"",isArc:!1}),[y,w]=c(null),b=(e,t)=>Array.isArray(e.arcColor)?`url(#gradient-${t})`:e.arcColor,E=e=>Array.isArray(e.arcColor)?e.arcColor[0]:e.arcColor,M=a.map(e=>{if("string"==typeof e.value){const t=(e=>{if("string"!=typeof e)return e;{const t=e.trim().match(/^([\d.]+)\s*([a-zA-Z%]*)$/);if(!t)return 0;const n=parseFloat(t[1]??"0"),r=t[2]?.toUpperCase()||"";if(isNaN(n))return 0;switch(r){case"TB":return 1024*n*1024;case"GB":return 1024*n;case"MB":default:return n;case"KB":return n/1024}}})(e.value),n=isNaN(t)?0:t;return{...e,normalizedValue:n,labelValue:Number.isInteger(n)?n:n.toFixed(2)}}return{...e,normalizedValue:e.value,labelValue:Number.isInteger(e.value)?e.value:e.value?.toFixed(2)}}),x=M.reduce((e,t)=>e+t.normalizedValue,0),L=r,H=i+m,k=2*(L+H*(M.length-1)+i),V=[...M].reverse(),S=l.trim().split(" "),O=(e,t,n)=>{const{clientX:r,clientY:i}=e;A({visible:!0,x:r,y:i,content:t,isArc:n})},z=e=>{const{clientX:t,clientY:n}=e;A(e=>({...e,x:t,y:n}))},N=()=>{A({visible:!1,x:0,y:0,content:"",isArc:!1})};return n("div",{className:"ff-multi-radial-chart-container "+("numberLegend"===s?"ff-multi-radial-chart-number":"ff-multi-radial-chart-pill"),style:{gap:f},children:[e("div",{className:"relative",style:{width:k,height:k},children:n("svg",{width:k,height:k,viewBox:`0 0 ${k} ${k}`,className:"absolute top-0 left-0",children:[e("defs",{children:a.map((t,n)=>Array.isArray(t.arcColor)?e("linearGradient",{id:`gradient-${n}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientTransform:"rotate(90)",children:t.arcColor.map((n,r)=>e("stop",{offset:r/(t.arcColor.length-1)*100+"%",stopColor:n},r))},`gradient-${n}`):null)}),n("g",{transform:`translate(${k/2+1}, ${k/2+1})`,children:[V.map((t,r)=>{const a=M.length-1-r,l=2*(t.normalizedValue/x)*Math.PI;let s=-Math.PI/2,c=s+l;t.normalizedValue===x&&(s=0,c=2*Math.PI);const d=L+H*a,u=aH(0,0,d,0,2*Math.PI),f={opacity:null!==y?t.barLabel===y?1:.2:1,transition:"opacity 0.3s ease"};if(0===t.normalizedValue){const r=d*Math.cos(-Math.PI/2),o=d*Math.sin(-Math.PI/2);return n("g",{children:[e("path",{d:u,fill:"none",stroke:t.arcBackgroundColor,strokeWidth:i,className:"transition-all duration-300",style:f}),e("circle",{cx:r,cy:o,r:i+1,fill:b({...t,label:t.barLabel||"",key:t.labelValue?.toString()||""},a),onMouseEnter:e=>O(e,`${t.barLabel||"Data"}: ${t.value}`,!0),onMouseMove:z,onMouseLeave:N,style:f})]},a)}const h=aH(0,0,d,s,c);return n("g",{children:[e("path",{d:u,fill:"none",stroke:t.arcBackgroundColor,strokeWidth:i,className:"transition-all duration-300",style:f}),e("path",{d:h,fill:"none",stroke:b({...t,label:t.barLabel||"",key:t.labelValue?.toString()||""},a),strokeWidth:i,strokeLinecap:"square"===o?"butt":"round",onMouseEnter:e=>O(e,`${t.barLabel||"Data"}: ${t.value}`,!0),onMouseMove:z,onMouseLeave:N,style:{pointerEvents:"stroke",...f}})]},a)}),e("text",{x:"0",y:`-${i+m+2}`,fill:(()=>{if(!v.visible)return"";const e=v.content.split(":")[0]?.trim();if(void 0===e)return"";const t=M.find(t=>t.barLabel===e);if(!t)return"";const n={...t,label:t.barLabel,key:t.labelValue?.toString()??""};return E(n)})(),textAnchor:"middle",dominantBaseline:"central",children:v.visible?n(t,{children:[e("tspan",{x:"0",dy:"0",className:"ff-center-text-tooltip",children:(I=v.content.split(":")[1]?.trim()||"",T=9,I.length>T?I.slice(0,T)+"...":I)}),v.content.split(":")[0]?.split(" ").map((t,n)=>e("tspan",{x:"0",dy:0===n?`${i+m+5}`:18,className:"ff-center-text-tooltip",children:t},n))]}):e(t,{children:S.map((t,r)=>{if(0===r){const[i,...o]=t.split(" ");return n("tspan",{children:[e("tspan",{x:"0",dy:"0",style:{fontSize:`${p}px`},className:"ff-center-first-text",children:i}),e("tspan",{x:"0",dy:18,style:{fontSize:`${C}px`},className:"ff-center-text",children:o.join(" ")})]},r)}return e("tspan",{x:"0",dy:0===r?0:18,className:"ff-center-text",style:{fontSize:`${C}px`},children:t},r)})})})]})]})}),v.visible&&e("div",{className:"ff-multi-radial-tooltip",style:{position:"fixed",top:`${v.y+10}px`,left:`${v.x+15}px`,zIndex:1e3,pointerEvents:"none"},children:v.content}),d&&((t,r)=>{switch(r){case"numberLegend":return e("div",{className:"ff-legend-container ff-number-legend",style:{gap:h},children:t.map((t,r)=>n("div",{className:"ff-legend-item",onMouseEnter:e=>{w(t.barLabel||t.label),O(e,`${t.barLabel||"Data"}: ${t.value}`,!1)},onMouseMove:z,onMouseLeave:()=>{w(null),N()},children:[e(q,{fontSize:20,fontWeight:"semi-bold",className:"ff-legend-value",color:E(t),children:t.key.padStart(2,"0")}),e(q,{fontSize:10,className:"ff-legend-key",color:"var(--text-color)",children:t.label})]},r))});case"pillLegend":return e("div",{className:"ff-legend-container ff-pill-legend",style:{gap:h},children:t.slice().reverse().map((t,r)=>n("div",{className:"ff-legend-item",onMouseEnter:e=>{w(t.barLabel||t.label),O(e,`${t.barLabel||"Data"}: ${t.value}`,!1)},onMouseMove:z,onMouseLeave:()=>{w(null),N()},children:[e("span",{className:"ff-legend-capsule",style:{backgroundColor:E(t)},children:e(q,{fontSize:10,color:"var(--tooltip-text-color)",style:g,children:u&&t.value})}),e(q,{className:"ff-legend-key",children:t.label})]},r))});default:return null}})(M.map(e=>({...e,label:e?.barLabel,key:e.labelValue?.toString()})),s)]});var I,T};var sH,cH={exports:{}},dH={},uH={exports:{}},fH={},hH={};function pH(){if(sH)return hH;function e(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function t(e,t){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=new Array(e.indent_size+1).join(e.indent_char)),t=t||"",e.indent_level>0&&(t=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=t,this.__base_string_length=t.length}function n(n,r){this.__indent_cache=new t(n,r),this.raw=!1,this._end_with_newline=n.end_with_newline,this.indent_size=n.indent_size,this.wrap_line_length=n.wrap_line_length,this.indent_empty_lines=n.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}return sH=1,e.prototype.clone_empty=function(){var t=new e(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},e.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},e.prototype.has_match=function(e){for(var t=this.__items.length-1;t>=0;t--)if(this.__items[t].match(e))return!0;return!1},e.prototype.set_indent=function(e,t){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=t||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},e.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===e.__items[0]&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf("\n");-1!==t?this.__character_count=e.length-t:this.__character_count+=e.length},e.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e},t.prototype.get_indent_size=function(e,t){var n=this.__base_string_length;return t=t||0,e<0&&(n=0),n+=e*this.__indent_size,n+=t},t.prototype.get_indent_string=function(e,t){var n=this.__base_string;return t=t||0,e<0&&(e=0,n=""),t+=e*this.__indent_size,this.__ensure_cache(t),n+=this.__cache[t]},t.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},t.prototype.__add_column=function(){var e=this.__cache.length,t=0,n="";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,n=new Array(t+1).join(this.__indent_string)),e&&(n+=new Array(e+1).join(" ")),this.__cache.push(n)},n.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},n.prototype.get_line_number=function(){return this.__lines.length},n.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)},n.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)},n.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},n.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},n.prototype.get_code=function(e){this.trim(!0);var t=this.current_line.pop();t&&("\n"===t[t.length-1]&&(t=t.replace(/\n+$/g,"")),this.current_line.push(t)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==e&&(n=n.replace(/[\n]/g,e)),n},n.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},n.prototype.set_indent=function(e,t){return e=e||0,t=t||0,this.next_line.set_indent(e,t),this.__lines.length>1?(this.current_line.set_indent(e,t),!0):(this.current_line.set_indent(),!1)},n.prototype.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},n.prototype.add_token=function(e){this.__add_space_before_token(),this.current_line.push(e),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},n.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},n.prototype.remove_indent=function(e){for(var t=this.__lines.length;e<t;)this.__lines[e]._remove_indent(),e++;this.current_line._remove_wrap_indent()},n.prototype.trim=function(e){for(e=void 0!==e&&e,this.current_line.trim();e&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},n.prototype.just_added_newline=function(){return this.current_line.is_empty()},n.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},n.prototype.ensure_empty_line_above=function(t,n){for(var r=this.__lines.length-2;r>=0;){var i=this.__lines[r];if(i.is_empty())break;if(0!==i.item(0).indexOf(t)&&i.item(-1)!==n){this.__lines.splice(r+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},hH.Output=n,hH}var CH,mH={};function gH(){if(CH)return mH;return CH=1,mH.Token=function(e,t,n,r){this.type=e,this.text=t,this.comments_before=null,this.newlines=n||0,this.whitespace_before=r||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null},mH}var vH,AH={};function yH(){return vH||(vH=1,o="(?:"+(i="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}")+"|[\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a"+(n="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc")+"])",a="(?:"+i+"|["+(t="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a")+n+(r="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f")+"])*",(e=AH).identifier=new RegExp(o+a,"g"),e.identifierStart=new RegExp(o),e.identifierMatch=new RegExp("(?:"+i+"|["+t+n+r+"])+"),e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=new RegExp("\r\n|"+e.newline.source),e.allLineBreaks=new RegExp(e.lineBreak.source,"g")),AH;var e,t,n,r,i,o,a}var wH,bH,EH={},MH={};function xH(){if(wH)return MH;function e(e,n){this.raw_options=t(e,n),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}function t(e,t){var r,i={};for(r in e=n(e))r!==t&&(i[r]=e[r]);if(t&&e[t])for(r in e[t])i[r]=e[t][r];return i}function n(e){var t,n={};for(t in e){n[t.replace(/-/g,"_")]=e[t]}return n}return wH=1,e.prototype._get_array=function(e,t){var n=this.raw_options[e],r=t||[];return"object"==typeof n?null!==n&&"function"==typeof n.concat&&(r=n.concat()):"string"==typeof n&&(r=n.split(/[^a-zA-Z0-9_\/\-]+/)),r},e.prototype._get_boolean=function(e,t){var n=this.raw_options[e];return void 0===n?!!t:!!n},e.prototype._get_characters=function(e,t){var n=this.raw_options[e],r=t||"";return"string"==typeof n&&(r=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),r},e.prototype._get_number=function(e,t){var n=this.raw_options[e];t=parseInt(t,10),isNaN(t)&&(t=0);var r=parseInt(n,10);return isNaN(r)&&(r=t),r},e.prototype._get_selection=function(e,t,n){var r=this._get_selection_list(e,t,n);if(1!==r.length)throw new Error("Invalid Option Value: The option '"+e+"' can only be one of the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return r[0]},e.prototype._get_selection_list=function(e,t,n){if(!t||0===t.length)throw new Error("Selection list cannot be empty.");if(n=n||[t[0]],!this._is_valid_selection(n,t))throw new Error("Invalid Default Value!");var r=this._get_array(e,n);if(!this._is_valid_selection(r,t))throw new Error("Invalid Option Value: The option '"+e+"' can contain only the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return r},e.prototype._is_valid_selection=function(e,t){return e.length&&t.length&&!e.some(function(e){return-1===t.indexOf(e)})},MH.Options=e,MH.normalizeOpts=n,MH.mergeOpts=t,MH}function LH(){if(bH)return EH;bH=1;var e=xH().Options,t=["before-newline","after-newline","preserve-newline"];function n(n){e.call(this,n,"js");var r=this.raw_options.brace_style||null;"expand-strict"===r?this.raw_options.brace_style="expand":"collapse-preserve-inline"===r?this.raw_options.brace_style="collapse,preserve-inline":void 0!==this.raw_options.braces_on_own_line&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var i=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var o=0;o<i.length;o++)"preserve-inline"===i[o]?this.brace_preserve_inline=!0:this.brace_style=i[o];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",t),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}return n.prototype=new e,EH.Options=n,EH}var HH,kH={},VH={};function SH(){if(HH)return VH;HH=1;var e=RegExp.prototype.hasOwnProperty("sticky");function t(e){this.__input=e||"",this.__input_length=this.__input.length,this.__position=0}return t.prototype.restart=function(){this.__position=0},t.prototype.back=function(){this.__position>0&&(this.__position-=1)},t.prototype.hasNext=function(){return this.__position<this.__input_length},t.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__input.charAt(this.__position),this.__position+=1),e},t.prototype.peek=function(e){var t=null;return e=e||0,(e+=this.__position)>=0&&e<this.__input_length&&(t=this.__input.charAt(e)),t},t.prototype.__match=function(t,n){t.lastIndex=n;var r=t.exec(this.__input);return!r||e&&t.sticky||r.index!==n&&(r=null),r},t.prototype.test=function(e,t){return t=t||0,(t+=this.__position)>=0&&t<this.__input_length&&!!this.__match(e,t)},t.prototype.testChar=function(e,t){var n=this.peek(t);return e.lastIndex=0,null!==n&&e.test(n)},t.prototype.match=function(e){var t=this.__match(e,this.__position);return t?this.__position+=t[0].length:t=null,t},t.prototype.read=function(e,t,n){var r,i="";return e&&(r=this.match(e))&&(i+=r[0]),!t||!r&&e||(i+=this.readUntil(t,n)),i},t.prototype.readUntil=function(e,t){var n,r=this.__position;e.lastIndex=this.__position;var i=e.exec(this.__input);return i?(r=i.index,t&&(r+=i[0].length)):r=this.__input_length,n=this.__input.substring(this.__position,r),this.__position=r,n},t.prototype.readUntilAfter=function(e){return this.readUntil(e,!0)},t.prototype.get_regexp=function(t,n){var r=null,i="g";return n&&e&&(i="y"),"string"==typeof t&&""!==t?r=new RegExp(t,i):t&&(r=new RegExp(t.source,i)),r},t.prototype.get_literal_regexp=function(e){return RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},t.prototype.peekUntilAfter=function(e){var t=this.__position,n=this.readUntilAfter(e);return this.__position=t,n},t.prototype.lookBack=function(e){var t=this.__position-1;return t>=e.length&&this.__input.substring(t-e.length,t).toLowerCase()===e},VH.InputScanner=t,VH}var OH,zH={},NH={};var IH,TH,DH,ZH={},_H={};function RH(){if(IH)return _H;function e(e,t){this._input=e,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,t&&(this._starting_pattern=this._input.get_regexp(t._starting_pattern,!0),this._match_pattern=this._input.get_regexp(t._match_pattern,!0),this._until_pattern=this._input.get_regexp(t._until_pattern),this._until_after=t._until_after)}return IH=1,e.prototype.read=function(){var e=this._input.read(this._starting_pattern);return this._starting_pattern&&!e||(e+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),e},e.prototype.read_match=function(){return this._input.match(this._match_pattern)},e.prototype.until_after=function(e){var t=this._create();return t._until_after=!0,t._until_pattern=this._input.get_regexp(e),t._update(),t},e.prototype.until=function(e){var t=this._create();return t._until_after=!1,t._until_pattern=this._input.get_regexp(e),t._update(),t},e.prototype.starting_with=function(e){var t=this._create();return t._starting_pattern=this._input.get_regexp(e,!0),t._update(),t},e.prototype.matching=function(e){var t=this._create();return t._match_pattern=this._input.get_regexp(e,!0),t._update(),t},e.prototype._create=function(){return new e(this._input,this)},e.prototype._update=function(){},_H.Pattern=e,_H}function jH(){if(DH)return zH;DH=1;var e=SH().InputScanner,t=gH().Token,n=function(){if(OH)return NH;function e(e){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=e}return OH=1,e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return 0===this.__tokens_length},e.prototype.hasNext=function(){return this.__position<this.__tokens_length},e.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__tokens[this.__position],this.__position+=1),e},e.prototype.peek=function(e){var t=null;return e=e||0,(e+=this.__position)>=0&&e<this.__tokens_length&&(t=this.__tokens[e]),t},e.prototype.add=function(e){this.__parent_token&&(e.parent=this.__parent_token),this.__tokens.push(e),this.__tokens_length+=1},NH.TokenStream=e,NH}().TokenStream,r=function(){if(TH)return ZH;TH=1;var e=RH().Pattern;function t(t,n){e.call(this,t,n),n?this._line_regexp=this._input.get_regexp(n._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}return t.prototype=new e,t.prototype.__set_whitespace_patterns=function(e,t){e+="\\t ",t+="\\n\\r",this._match_pattern=this._input.get_regexp("["+e+t+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+t+"]")},t.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var e=this._input.read(this._match_pattern);if(" "===e)this.whitespace_before_token=" ";else if(e){var t=this.__split(this._newline_regexp,e);this.newline_count=t.length-1,this.whitespace_before_token=t[this.newline_count]}return e},t.prototype.matching=function(e,t){var n=this._create();return n.__set_whitespace_patterns(e,t),n._update(),n},t.prototype._create=function(){return new t(this._input,this)},t.prototype.__split=function(e,t){e.lastIndex=0;for(var n=0,r=[],i=e.exec(t);i;)r.push(t.substring(n,i.index)),n=i.index+i[0].length,i=e.exec(t);return n<t.length?r.push(t.substring(n,t.length)):r.push(""),r},ZH.WhitespacePattern=t,ZH}().WhitespacePattern,i={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(t,n){this._input=new e(t),this._options=n||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new r(this._input)};return o.prototype.tokenize=function(){var e;this._input.restart(),this.__tokens=new n,this._reset();for(var r=new t(i.START,""),o=null,a=[],l=new n;r.type!==i.EOF;){for(e=this._get_next_token(r,o);this._is_comment(e);)l.add(e),e=this._get_next_token(r,o);l.isEmpty()||(e.comments_before=l,l=new n),e.parent=o,this._is_opening(e)?(a.push(o),o=e):o&&this._is_closing(e,o)&&(e.opened=o,o.closed=e,o=a.pop(),e.parent=o),e.previous=r,r.next=e,this.__tokens.add(e),r=e}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(e,t){this._readWhitespace();var n=this._input.read(/.+/g);return n?this._create_token(i.RAW,n):this._create_token(i.EOF,"")},o.prototype._is_comment=function(e){return!1},o.prototype._is_opening=function(e){return!1},o.prototype._is_closing=function(e,t){return!1},o.prototype._create_token=function(e,n){return new t(e,n,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},o.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},zH.Tokenizer=o,zH.TOKEN=i,zH}var BH,PH={};function FH(){if(BH)return PH;function e(e,t){e="string"==typeof e?e:e.source,t="string"==typeof t?t:t.source,this.__directives_block_pattern=new RegExp(e+/ beautify( \w+[:]\w+)+ /.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(e+/\sbeautify\signore:end\s/.source+t,"g")}return BH=1,e.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var t={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(e);n;)t[n[1]]=n[2],n=this.__directive_pattern.exec(e);return t},e.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},PH.Directives=e,PH}var qH,UH,WH,XH,QH={};function GH(){if(qH)return QH;qH=1;var e=RH().Pattern,t={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function n(n,r){e.call(this,n,r),this.__template_pattern=null,this._disabled=Object.assign({},t),this._excluded=Object.assign({},t),r&&(this.__template_pattern=this._input.get_regexp(r.__template_pattern),this._excluded=Object.assign(this._excluded,r._excluded),this._disabled=Object.assign(this._disabled,r._disabled));var i=new e(n);this.__patterns={handlebars_comment:i.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:i.starting_with(/{{{/).until_after(/}}}/),handlebars:i.starting_with(/{{/).until_after(/}}/),php:i.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:i.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:i.starting_with(/{%/).until_after(/%}/),django_value:i.starting_with(/{{/).until_after(/}}/),django_comment:i.starting_with(/{#/).until_after(/#}/),smarty:i.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:i.starting_with(/{\*/).until_after(/\*}/),smarty_literal:i.starting_with(/{literal}/).until_after(/{\/literal}/)}}return n.prototype=new e,n.prototype._create=function(){return new n(this._input,this)},n.prototype._update=function(){this.__set_templated_pattern()},n.prototype.disable=function(e){var t=this._create();return t._disabled[e]=!0,t._update(),t},n.prototype.read_options=function(e){var n=this._create();for(var r in t)n._disabled[r]=-1===e.templating.indexOf(r);return n._update(),n},n.prototype.exclude=function(e){var t=this._create();return t._excluded[e]=!0,t._update(),t},n.prototype.read=function(){var e="";e=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);for(var t=this._read_template();t;)this._match_pattern?t+=this._input.read(this._match_pattern):t+=this._input.readUntil(this.__template_pattern),e+=t,t=this._read_template();return this._until_after&&(e+=this._input.readUntilAfter(this._until_pattern)),e},n.prototype.__set_templated_pattern=function(){var e=[];this._disabled.php||e.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||e.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||e.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||e.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(e.push(this.__patterns.django._starting_pattern.source),e.push(this.__patterns.django_value._starting_pattern.source),e.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||e.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&e.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+e.join("|")+")")},n.prototype._read_template=function(){var e="",t=this._input.peek();if("<"===t){var n=this._input.peek(1);this._disabled.php||this._excluded.php||"?"!==n||(e=e||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||"%"!==n||(e=e||this.__patterns.erb.read())}else"{"===t&&(this._disabled.handlebars||this._excluded.handlebars||(e=(e=(e=e||this.__patterns.handlebars_comment.read())||this.__patterns.handlebars_unescaped.read())||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(e=e||this.__patterns.django_value.read()),this._excluded.django||(e=(e=e||this.__patterns.django_comment.read())||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(e=(e=(e=e||this.__patterns.smarty_comment.read())||this.__patterns.smarty_literal.read())||this.__patterns.smarty.read()));return e},QH.TemplatablePattern=n,QH}function KH(){if(UH)return kH;UH=1;var e=SH().InputScanner,t=jH().Tokenizer,n=jH().TOKEN,r=FH().Directives,i=yH(),o=RH().Pattern,a=GH().TemplatablePattern;function l(e,t){return-1!==t.indexOf(e)}var s={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:n.START,RAW:n.RAW,EOF:n.EOF},c=new r(/\/\*/,/\*\//),d=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,u=/[0-9]/,f=/[^\d\.]/,h=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),p=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";p=(p="\\?\\.(?!\\d) "+(p=p.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"))).replace(/ /g,"|");var C,m=new RegExp(p),g="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),v=g.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),A=new RegExp("^(?:"+v.join("|")+")$"),y=function(e,n){t.call(this,e,n),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var r=new o(this._input),l=new a(this._input).read_options(this._options);this.__patterns={template:l,identifier:l.starting_with(i.identifier).matching(i.identifierMatch),number:r.matching(d),punct:r.matching(m),comment:r.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:r.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:r.matching(/<!--/),html_comment_end:r.matching(/-->/),include:r.starting_with(/#include/).until_after(i.lineBreak),shebang:r.starting_with(/#!/).until_after(i.lineBreak),xml:r.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:l.until(/['\\\n\r\u2028\u2029]/),double_quote:l.until(/["\\\n\r\u2028\u2029]/),template_text:l.until(/[`\\$]/),template_expression:l.until(/[`}\\]/)}};return(y.prototype=new t)._is_comment=function(e){return e.type===s.COMMENT||e.type===s.BLOCK_COMMENT||e.type===s.UNKNOWN},y.prototype._is_opening=function(e){return e.type===s.START_BLOCK||e.type===s.START_EXPR},y.prototype._is_closing=function(e,t){return(e.type===s.END_BLOCK||e.type===s.END_EXPR)&&t&&("]"===e.text&&"["===t.text||")"===e.text&&"("===t.text||"}"===e.text&&"{"===t.text)},y.prototype._reset=function(){C=!1},y.prototype._get_next_token=function(e,t){var n=null;this._readWhitespace();var r=this._input.peek();return null===r?this._create_token(s.EOF,""):n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n||this._read_non_javascript(r))||this._read_string(r))||this._read_pair(r,this._input.peek(1)))||this._read_word(e))||this._read_singles(r))||this._read_comment(r))||this._read_regexp(r,e))||this._read_xml(r,e))||this._read_punctuation())||this._create_token(s.UNKNOWN,this._input.next())},y.prototype._read_word=function(e){var t;return""!==(t=this.__patterns.identifier.read())?(t=t.replace(i.allLineBreaks,"\n"),e.type!==s.DOT&&(e.type!==s.RESERVED||"set"!==e.text&&"get"!==e.text)&&A.test(t)?"in"!==t&&"of"!==t||e.type!==s.WORD&&e.type!==s.STRING?this._create_token(s.RESERVED,t):this._create_token(s.OPERATOR,t):this._create_token(s.WORD,t)):""!==(t=this.__patterns.number.read())?this._create_token(s.WORD,t):void 0},y.prototype._read_singles=function(e){var t=null;return"("===e||"["===e?t=this._create_token(s.START_EXPR,e):")"===e||"]"===e?t=this._create_token(s.END_EXPR,e):"{"===e?t=this._create_token(s.START_BLOCK,e):"}"===e?t=this._create_token(s.END_BLOCK,e):";"===e?t=this._create_token(s.SEMICOLON,e):"."===e&&f.test(this._input.peek(1))?t=this._create_token(s.DOT,e):","===e&&(t=this._create_token(s.COMMA,e)),t&&this._input.next(),t},y.prototype._read_pair=function(e,t){var n=null;return"#"===e&&"{"===t&&(n=this._create_token(s.START_BLOCK,e+t)),n&&(this._input.next(),this._input.next()),n},y.prototype._read_punctuation=function(){var e=this.__patterns.punct.read();if(""!==e)return"="===e?this._create_token(s.EQUALS,e):"?."===e?this._create_token(s.DOT,e):this._create_token(s.OPERATOR,e)},y.prototype._read_non_javascript=function(e){var t="";if("#"===e){if(this._is_first_token()&&(t=this.__patterns.shebang.read()))return this._create_token(s.UNKNOWN,t.trim()+"\n");if(t=this.__patterns.include.read())return this._create_token(s.UNKNOWN,t.trim()+"\n");e=this._input.next();var n="#";if(this._input.hasNext()&&this._input.testChar(u)){do{n+=e=this._input.next()}while(this._input.hasNext()&&"#"!==e&&"="!==e);return"#"===e||("["===this._input.peek()&&"]"===this._input.peek(1)?(n+="[]",this._input.next(),this._input.next()):"{"===this._input.peek()&&"}"===this._input.peek(1)&&(n+="{}",this._input.next(),this._input.next())),this._create_token(s.WORD,n)}this._input.back()}else if("<"===e&&this._is_first_token()){if(t=this.__patterns.html_comment_start.read()){for(;this._input.hasNext()&&!this._input.testChar(i.newline);)t+=this._input.next();return C=!0,this._create_token(s.COMMENT,t)}}else if(C&&"-"===e&&(t=this.__patterns.html_comment_end.read()))return C=!1,this._create_token(s.COMMENT,t);return null},y.prototype._read_comment=function(e){var t=null;if("/"===e){var n="";if("*"===this._input.peek(1)){n=this.__patterns.block_comment.read();var r=c.get_directives(n);r&&"start"===r.ignore&&(n+=c.readIgnored(this._input)),n=n.replace(i.allLineBreaks,"\n"),(t=this._create_token(s.BLOCK_COMMENT,n)).directives=r}else"/"===this._input.peek(1)&&(n=this.__patterns.comment.read(),t=this._create_token(s.COMMENT,n))}return t},y.prototype._read_string=function(t){if("`"===t||"'"===t||'"'===t){var n=this._input.next();return this.has_char_escapes=!1,n+="`"===t?this._read_string_recursive("`",!0,"${"):this._read_string_recursive(t),this.has_char_escapes&&this._options.unescape_strings&&(n=function(t){var n="",r=0,i=new e(t),o=null;for(;i.hasNext();)if((o=i.match(/([\s]|[^\\]|\\\\)+/g))&&(n+=o[0]),"\\"===i.peek()){if(i.next(),"x"===i.peek())o=i.match(/x([0-9A-Fa-f]{2})/g);else{if("u"!==i.peek()){n+="\\",i.hasNext()&&(n+=i.next());continue}(o=i.match(/u([0-9A-Fa-f]{4})/g))||(o=i.match(/u\{([0-9A-Fa-f]+)\}/g))}if(!o)return t;if((r=parseInt(o[1],16))>126&&r<=255&&0===o[0].indexOf("x"))return t;n+=r>=0&&r<32||r>1114111?"\\"+o[0]:34===r||39===r||92===r?"\\"+String.fromCharCode(r):String.fromCharCode(r)}return n}(n)),this._input.peek()===t&&(n+=this._input.next()),n=n.replace(i.allLineBreaks,"\n"),this._create_token(s.STRING,n)}return null},y.prototype._allow_regexp_or_xml=function(e){return e.type===s.RESERVED&&l(e.text,["return","case","throw","else","do","typeof","yield"])||e.type===s.END_EXPR&&")"===e.text&&e.opened.previous.type===s.RESERVED&&l(e.opened.previous.text,["if","while","for"])||l(e.type,[s.COMMENT,s.START_EXPR,s.START_BLOCK,s.START,s.END_BLOCK,s.OPERATOR,s.EQUALS,s.EOF,s.SEMICOLON,s.COMMA])},y.prototype._read_regexp=function(e,t){if("/"===e&&this._allow_regexp_or_xml(t)){for(var n=this._input.next(),r=!1,o=!1;this._input.hasNext()&&(r||o||this._input.peek()!==e)&&!this._input.testChar(i.newline);)n+=this._input.peek(),r?r=!1:(r="\\"===this._input.peek(),"["===this._input.peek()?o=!0:"]"===this._input.peek()&&(o=!1)),this._input.next();return this._input.peek()===e&&(n+=this._input.next(),n+=this._input.read(i.identifier)),this._create_token(s.STRING,n)}return null},y.prototype._read_xml=function(e,t){if(this._options.e4x&&"<"===e&&this._allow_regexp_or_xml(t)){var n="",r=this.__patterns.xml.read_match();if(r){for(var o=r[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),a=0===o.indexOf("{"),l=0;r;){var c=!!r[1],d=r[2];if(!(!!r[r.length-1]||"![CDATA["===d.slice(0,8))&&(d===o||a&&d.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(c?--l:++l),n+=r[0],l<=0)break;r=this.__patterns.xml.read_match()}return r||(n+=this._input.match(/[\s\S]*/g)[0]),n=n.replace(i.allLineBreaks,"\n"),this._create_token(s.STRING,n)}}return null},y.prototype._read_string_recursive=function(e,t,n){var r,o;"'"===e?o=this.__patterns.single_quote:'"'===e?o=this.__patterns.double_quote:"`"===e?o=this.__patterns.template_text:"}"===e&&(o=this.__patterns.template_expression);for(var a=o.read(),l="";this._input.hasNext();){if((l=this._input.next())===e||!t&&i.newline.test(l)){this._input.back();break}"\\"===l&&this._input.hasNext()?("x"===(r=this._input.peek())||"u"===r?this.has_char_escapes=!0:"\r"===r&&"\n"===this._input.peek(1)&&this._input.next(),l+=this._input.next()):n&&("${"===n&&"$"===l&&"{"===this._input.peek()&&(l+=this._input.next()),n===l&&(l+="`"===e?this._read_string_recursive("}",t,"`"):this._read_string_recursive("`",t,"${"),this._input.hasNext()&&(l+=this._input.next()))),a+=l+=o.read()}return a},kH.Tokenizer=y,kH.TOKEN=s,kH.positionable_operators=h.slice(),kH.line_starters=g.slice(),kH}function YH(){if(WH)return fH;WH=1;var e=pH().Output,t=gH().Token,n=yH(),r=LH().Options,i=KH().Tokenizer,o=KH().line_starters,a=KH().positionable_operators,l=KH().TOKEN;function s(e,t){return-1!==t.indexOf(e)}function c(e){return e.replace(/^\s+/g,"")}function d(e,t){return e&&e.type===l.RESERVED&&e.text===t}function u(e,t){return e&&e.type===l.RESERVED&&s(e.text,t)}var f=["case","return","do","if","throw","else","await","break","continue","async"],h=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].replace(/-/g,"_")]=e[n];return t}(["before-newline","after-newline","preserve-newline"]),p=[h.before_newline,h.preserve_newline],C="BlockStatement",m="Statement",g="ObjectLiteral",v="ArrayLiteral",A="ForInitializer",y="Conditional",w="Expression";function b(e,t){t.multiline_frame||t.mode===A||t.mode===y||e.remove_indent(t.start_line_index)}function E(e){return e===v}function M(e){return s(e,[w,A,y])}function x(e,t){t=t||{},this._source_text=e||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new r(t)}x.prototype.create_flags=function(e,n){var r=0;return e&&(r=e.indentation_level,!this._output.just_added_newline()&&e.line_indent_level>r&&(r=e.line_indent_level)),{mode:n,parent:e,last_token:e?e.last_token:new t(l.START_BLOCK,""),last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:r,alignment:0,line_indent_level:e?e.line_indent_level:r,start_line_index:this._output.get_line_number(),ternary_depth:0}},x.prototype._reset=function(t){var n=t.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new e(this._options,n),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(C);var r=new i(t,this._options);return this._tokens=r.tokenize(),t},x.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._reset(this._source_text),t=this._options.eol;"auto"===this._options.eol&&(t="\n",e&&n.lineBreak.test(e||"")&&(t=e.match(n.lineBreak)[0]));for(var r=this._tokens.next();r;)this.handle_token(r),this._last_last_text=this._flags.last_token.text,this._flags.last_token=r,r=this._tokens.next();return this._output.get_code(t)},x.prototype.handle_token=function(e,t){e.type===l.START_EXPR?this.handle_start_expr(e):e.type===l.END_EXPR?this.handle_end_expr(e):e.type===l.START_BLOCK?this.handle_start_block(e):e.type===l.END_BLOCK?this.handle_end_block(e):e.type===l.WORD||e.type===l.RESERVED?this.handle_word(e):e.type===l.SEMICOLON?this.handle_semicolon(e):e.type===l.STRING?this.handle_string(e):e.type===l.EQUALS?this.handle_equals(e):e.type===l.OPERATOR?this.handle_operator(e):e.type===l.COMMA?this.handle_comma(e):e.type===l.BLOCK_COMMENT?this.handle_block_comment(e,t):e.type===l.COMMENT?this.handle_comment(e,t):e.type===l.DOT?this.handle_dot(e):e.type===l.EOF?this.handle_eof(e):(e.type,l.UNKNOWN,this.handle_unknown(e,t))},x.prototype.handle_whitespace_and_comments=function(e,t){var n=e.newlines,r=this._options.keep_array_indentation&&E(this._flags.mode);if(e.comments_before)for(var i=e.comments_before.next();i;)this.handle_whitespace_and_comments(i,t),this.handle_token(i,t),i=e.comments_before.next();if(r)for(var o=0;o<n;o+=1)this.print_newline(o>0,t);else if(this._options.max_preserve_newlines&&n>this._options.max_preserve_newlines&&(n=this._options.max_preserve_newlines),this._options.preserve_newlines&&n>1){this.print_newline(!1,t);for(var a=1;a<n;a+=1)this.print_newline(!0,t)}};var L=["async","break","continue","return","throw","yield"];return x.prototype.allow_wrap_or_preserved_newline=function(e,t){if(t=void 0!==t&&t,!this._output.just_added_newline()){var n=this._options.preserve_newlines&&e.newlines||t;if(s(this._flags.last_token.text,a)||s(e.text,a)){var r=s(this._flags.last_token.text,a)&&s(this._options.operator_position,p)||s(e.text,a);n=n&&r}if(n)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(u(this._flags.last_token,L))return;this._output.set_wrap_point()}}},x.prototype.print_newline=function(e,t){if(!t&&";"!==this._flags.last_token.text&&","!==this._flags.last_token.text&&"="!==this._flags.last_token.text&&(this._flags.last_token.type!==l.OPERATOR||"--"===this._flags.last_token.text||"++"===this._flags.last_token.text))for(var n=this._tokens.peek();!(this._flags.mode!==m||this._flags.if_block&&d(n,"else")||this._flags.do_block);)this.restore_mode();this._output.add_new_line(e)&&(this._flags.multiline_frame=!0)},x.prototype.print_token_line_indentation=function(e){this._output.just_added_newline()&&(this._options.keep_array_indentation&&e.newlines&&("["===e.text||E(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(e.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},x.prototype.print_token=function(e){if(this._output.raw)this._output.add_raw_token(e);else{if(this._options.comma_first&&e.previous&&e.previous.type===l.COMMA&&this._output.just_added_newline()&&","===this._output.previous_line.last()){var t=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(t),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(e),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(e),this._output.non_breaking_space=!0,this._output.add_token(e.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)}},x.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},x.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},x.prototype.set_mode=function(e){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,e),this._flags=this.create_flags(this._previous_flags,e),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},x.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===m&&b(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},x.prototype.start_of_object_property=function(){return this._flags.parent.mode===g&&this._flags.mode===m&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||u(this._flags.last_token,["get","set"]))},x.prototype.start_of_statement=function(e){var t=!1;return!!(t=(t=(t=(t=(t=(t=(t=t||u(this._flags.last_token,["var","let","const"])&&e.type===l.WORD)||d(this._flags.last_token,"do"))||!(this._flags.parent.mode===g&&this._flags.mode===m)&&u(this._flags.last_token,L)&&!e.newlines)||d(this._flags.last_token,"else")&&!(d(e,"if")&&!e.comments_before))||this._flags.last_token.type===l.END_EXPR&&(this._previous_flags.mode===A||this._previous_flags.mode===y))||this._flags.last_token.type===l.WORD&&this._flags.mode===C&&!this._flags.in_case&&!("--"===e.text||"++"===e.text)&&"function"!==this._last_last_text&&e.type!==l.WORD&&e.type!==l.RESERVED)||this._flags.mode===g&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||u(this._flags.last_token,["get","set"])))&&(this.set_mode(m),this.indent(),this.handle_whitespace_and_comments(e,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e,u(e,["do","for","if","while"])),!0)},x.prototype.handle_start_expr=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e);var t=w;if("["===e.text){if(this._flags.last_token.type===l.WORD||")"===this._flags.last_token.text)return u(this._flags.last_token,o)&&(this._output.space_before_token=!0),this.print_token(e),this.set_mode(t),this.indent(),void(this._options.space_in_paren&&(this._output.space_before_token=!0));t=v,E(this._flags.mode)&&("["!==this._flags.last_token.text&&(","!==this._flags.last_token.text||"]"!==this._last_last_text&&"}"!==this._last_last_text)||this._options.keep_array_indentation||this.print_newline()),s(this._flags.last_token.type,[l.START_EXPR,l.END_EXPR,l.WORD,l.OPERATOR,l.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===l.RESERVED)"for"===this._flags.last_token.text?(this._output.space_before_token=this._options.space_before_conditional,t=A):s(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,t=y):s(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:"import"===this._flags.last_token.text&&""===e.whitespace_before?this._output.space_before_token=!1:(s(this._flags.last_token.text,o)||"catch"===this._flags.last_token.text)&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e);else if(this._flags.last_token.type===l.WORD){this._output.space_before_token=!1;var n=this._tokens.peek(-3);if(this._options.space_after_named_function&&n){var r=this._tokens.peek(-4);u(n,["async","function"])||"*"===n.text&&u(r,["async","function"])?this._output.space_before_token=!0:this._flags.mode===g?"{"!==n.text&&","!==n.text&&("*"!==n.text||"{"!==r.text&&","!==r.text)||(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(e);(this._flags.last_token.type===l.RESERVED&&("function"===this._flags.last_word||"typeof"===this._flags.last_word)||"*"===this._flags.last_token.text&&(s(this._last_last_text,["function","yield"])||this._flags.mode===g&&s(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}";"===this._flags.last_token.text||this._flags.last_token.type===l.START_BLOCK?this.print_newline():this._flags.last_token.type!==l.END_EXPR&&this._flags.last_token.type!==l.START_EXPR&&this._flags.last_token.type!==l.END_BLOCK&&"."!==this._flags.last_token.text&&this._flags.last_token.type!==l.COMMA||this.allow_wrap_or_preserved_newline(e,e.newlines),this.print_token(e),this.set_mode(t),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},x.prototype.handle_end_expr=function(e){for(;this._flags.mode===m;)this.restore_mode();this.handle_whitespace_and_comments(e),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(e,"]"===e.text&&E(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type!==l.START_EXPR||this._options.space_in_empty_paren?this._output.space_before_token=!0:(this._output.trim(),this._output.space_before_token=!1)),this.deindent(),this.print_token(e),this.restore_mode(),b(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===y&&(this._previous_flags.mode=w,this._flags.do_block=!1,this._flags.do_while=!1)},x.prototype.handle_start_block=function(e){this.handle_whitespace_and_comments(e);var t=this._tokens.peek(),n=this._tokens.peek(1);"switch"===this._flags.last_word&&this._flags.last_token.type===l.END_EXPR?(this.set_mode(C),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(C):n&&(s(n.text,[":",","])&&s(t.type,[l.STRING,l.WORD,l.RESERVED])||s(t.text,["get","set","..."])&&s(n.type,[l.WORD,l.RESERVED]))?s(this._last_last_text,["class","interface"])&&!s(n.text,[":",","])?this.set_mode(C):this.set_mode(g):this._flags.last_token.type===l.OPERATOR&&"=>"===this._flags.last_token.text?this.set_mode(C):s(this._flags.last_token.type,[l.EQUALS,l.START_EXPR,l.COMMA,l.OPERATOR])||u(this._flags.last_token,["return","throw","import","default"])?this.set_mode(g):this.set_mode(C),this._flags.last_token&&u(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var r=!t.comments_before&&"}"===t.text,i=r&&"function"===this._flags.last_word&&this._flags.last_token.type===l.END_EXPR;if(this._options.brace_preserve_inline){var o=0,a=null;this._flags.inline_frame=!0;do{if(o+=1,(a=this._tokens.peek(o-1)).newlines){this._flags.inline_frame=!1;break}}while(a.type!==l.EOF&&(a.type!==l.END_BLOCK||a.opened!==e))}("expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==l.OPERATOR&&(i||this._flags.last_token.type===l.EQUALS||u(this._flags.last_token,f)&&"else"!==this._flags.last_token.text)?this._output.space_before_token=!0:this.print_newline(!1,!0):(!E(this._previous_flags.mode)||this._flags.last_token.type!==l.START_EXPR&&this._flags.last_token.type!==l.COMMA||((this._flags.last_token.type===l.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(e),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==l.OPERATOR&&this._flags.last_token.type!==l.START_EXPR&&(s(this._flags.last_token.type,[l.START_BLOCK,l.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(e),this.indent(),r||this._options.brace_preserve_inline&&this._flags.inline_frame||this.print_newline()},x.prototype.handle_end_block=function(e){for(this.handle_whitespace_and_comments(e);this._flags.mode===m;)this.restore_mode();var t=this._flags.last_token.type===l.START_BLOCK;this._flags.inline_frame&&!t?this._output.space_before_token=!0:"expand"===this._options.brace_style?t||this.print_newline():t||(E(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(e)},x.prototype.handle_word=function(e){if(e.type===l.RESERVED)if(s(e.text,["set","get"])&&this._flags.mode!==g)e.type=l.WORD;else if("import"===e.text&&s(this._tokens.peek().text,["(","."]))e.type=l.WORD;else if(s(e.text,["as","from"])&&!this._flags.import_block)e.type=l.WORD;else if(this._flags.mode===g){":"===this._tokens.peek().text&&(e.type=l.WORD)}if(this.start_of_statement(e)?u(this._flags.last_token,["var","let","const"])&&e.type===l.WORD&&(this._flags.declaration_statement=!0):!e.newlines||M(this._flags.mode)||this._flags.last_token.type===l.OPERATOR&&"--"!==this._flags.last_token.text&&"++"!==this._flags.last_token.text||this._flags.last_token.type===l.EQUALS||!this._options.preserve_newlines&&u(this._flags.last_token,["var","let","const","set","get"])?this.handle_whitespace_and_comments(e):(this.handle_whitespace_and_comments(e),this.print_newline()),this._flags.do_block&&!this._flags.do_while){if(d(e,"while"))return this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0,void(this._flags.do_while=!0);this.print_newline(),this._flags.do_block=!1}if(this._flags.if_block)if(!this._flags.else_block&&d(e,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===m;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&u(e,["case","default"]))return this.print_newline(),this._flags.case_block||!this._flags.case_body&&!this._options.jslint_happy||this.deindent(),this._flags.case_body=!1,this.print_token(e),void(this._flags.in_case=!0);if(this._flags.last_token.type!==l.COMMA&&this._flags.last_token.type!==l.START_EXPR&&this._flags.last_token.type!==l.EQUALS&&this._flags.last_token.type!==l.OPERATOR||this.start_of_object_property()||s(this._flags.last_token.text,["+","-"])&&":"===this._last_last_text&&this._flags.parent.mode===g||this.allow_wrap_or_preserved_newline(e),d(e,"function"))return(s(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!s(this._flags.last_token.text,["(","[","{",":","=",","])&&this._flags.last_token.type!==l.OPERATOR)&&(this._output.just_added_blankline()||e.comments_before||(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD?u(this._flags.last_token,["get","set","new","export"])||u(this._flags.last_token,L)||d(this._flags.last_token,"default")&&"export"===this._last_last_text||"declare"===this._flags.last_token.text?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===l.OPERATOR||"="===this._flags.last_token.text?this._output.space_before_token=!0:(this._flags.multiline_frame||!M(this._flags.mode)&&!E(this._flags.mode))&&this.print_newline(),this.print_token(e),void(this._flags.last_word=e.text);var t="NONE";(this._flags.last_token.type===l.END_BLOCK?this._previous_flags.inline_frame?t="SPACE":u(e,["else","catch","finally","from"])?"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines?t="NEWLINE":(t="SPACE",this._output.space_before_token=!0):t="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&this._flags.mode===C?t="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&M(this._flags.mode)?t="SPACE":this._flags.last_token.type===l.STRING?t="NEWLINE":this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||"*"===this._flags.last_token.text&&(s(this._last_last_text,["function","yield"])||this._flags.mode===g&&s(this._last_last_text,["{",","]))?t="SPACE":this._flags.last_token.type===l.START_BLOCK?t=this._flags.inline_frame?"SPACE":"NEWLINE":this._flags.last_token.type===l.END_EXPR&&(this._output.space_before_token=!0,t="NEWLINE"),u(e,o)&&")"!==this._flags.last_token.text&&(t=this._flags.inline_frame||"else"===this._flags.last_token.text||"export"===this._flags.last_token.text?"SPACE":"NEWLINE"),u(e,["else","catch","finally"]))?(this._flags.last_token.type!==l.END_BLOCK||this._previous_flags.mode!==C||"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines)&&!this._flags.inline_frame?this.print_newline():(this._output.trim(!0),"}"!==this._output.current_line.last()&&this.print_newline(),this._output.space_before_token=!0):"NEWLINE"===t?u(this._flags.last_token,f)||"declare"===this._flags.last_token.text&&u(e,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==l.END_EXPR?this._flags.last_token.type===l.START_EXPR&&u(e,["var","let","const"])||":"===this._flags.last_token.text||(d(e,"if")&&d(e.previous,"else")?this._output.space_before_token=!0:this.print_newline()):u(e,o)&&")"!==this._flags.last_token.text&&this.print_newline():this._flags.multiline_frame&&E(this._flags.mode)&&","===this._flags.last_token.text&&"}"===this._last_last_text?this.print_newline():"SPACE"===t&&(this._output.space_before_token=!0);!e.previous||e.previous.type!==l.WORD&&e.previous.type!==l.RESERVED||(this._output.space_before_token=!0),this.print_token(e),this._flags.last_word=e.text,e.type===l.RESERVED&&("do"===e.text?this._flags.do_block=!0:"if"===e.text?this._flags.if_block=!0:"import"===e.text?this._flags.import_block=!0:this._flags.import_block&&d(e,"from")&&(this._flags.import_block=!1))},x.prototype.handle_semicolon=function(e){this.start_of_statement(e)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(e);for(var t=this._tokens.peek();!(this._flags.mode!==m||this._flags.if_block&&d(t,"else")||this._flags.do_block);)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(e)},x.prototype.handle_string=function(e){(!e.text.startsWith("`")||0!==e.newlines||""!==e.whitespace_before||")"!==e.previous.text&&this._flags.last_token.type!==l.WORD)&&(this.start_of_statement(e)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(e),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e):!e.text.startsWith("`")||this._flags.last_token.type!==l.END_EXPR||"]"!==e.previous.text&&")"!==e.previous.text||0!==e.newlines?this.print_newline():this._output.space_before_token=!0)),this.print_token(e)},x.prototype.handle_equals=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0},x.prototype.handle_comma=function(e){this.handle_whitespace_and_comments(e,!0),this.print_token(e),this._output.space_before_token=!0,this._flags.declaration_statement?(M(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)):this._flags.mode===g||this._flags.mode===m&&this._flags.parent.mode===g?(this._flags.mode===m&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)},x.prototype.handle_operator=function(e){var t="*"===e.text&&(u(this._flags.last_token,["function","yield"])||s(this._flags.last_token.type,[l.START_BLOCK,l.COMMA,l.END_BLOCK,l.SEMICOLON])),n=s(e.text,["-","+"])&&(s(this._flags.last_token.type,[l.START_BLOCK,l.START_EXPR,l.EQUALS,l.OPERATOR])||s(this._flags.last_token.text,o)||","===this._flags.last_token.text);if(this.start_of_statement(e));else{var r=!t;this.handle_whitespace_and_comments(e,r)}if("*"!==e.text||this._flags.last_token.type!==l.DOT)if("::"!==e.text)if(s(e.text,["-","+"])&&this.start_of_object_property())this.print_token(e);else{if(this._flags.last_token.type===l.OPERATOR&&s(this._options.operator_position,p)&&this.allow_wrap_or_preserved_newline(e),":"===e.text&&this._flags.in_case)return this.print_token(e),this._flags.in_case=!1,this._flags.case_body=!0,void(this._tokens.peek().type!==l.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0));var i=!0,c=!0,d=!1;if(":"===e.text?0===this._flags.ternary_depth?i=!1:(this._flags.ternary_depth-=1,d=!0):"?"===e.text&&(this._flags.ternary_depth+=1),!n&&!t&&this._options.preserve_newlines&&s(e.text,a)){var g=":"===e.text,v=g&&d,A=g&&!d;switch(this._options.operator_position){case h.before_newline:return this._output.space_before_token=!A,this.print_token(e),g&&!v||this.allow_wrap_or_preserved_newline(e),void(this._output.space_before_token=!0);case h.after_newline:return this._output.space_before_token=!0,!g||v?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(e):this._output.space_before_token=!1,this.print_token(e),void(this._output.space_before_token=!0);case h.preserve_newline:return A||this.allow_wrap_or_preserved_newline(e),i=!(this._output.just_added_newline()||A),this._output.space_before_token=i,this.print_token(e),void(this._output.space_before_token=!0)}}if(t){this.allow_wrap_or_preserved_newline(e),i=!1;var y=this._tokens.peek();c=y&&s(y.type,[l.WORD,l.RESERVED])}else if("..."===e.text)this.allow_wrap_or_preserved_newline(e),i=this._flags.last_token.type===l.START_BLOCK,c=!1;else if(s(e.text,["--","++","!","~"])||n){if(this._flags.last_token.type!==l.COMMA&&this._flags.last_token.type!==l.START_EXPR||this.allow_wrap_or_preserved_newline(e),i=!1,c=!1,e.newlines&&("--"===e.text||"++"===e.text||"~"===e.text)){var w=u(this._flags.last_token,f)&&e.newlines;w&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(w,!0)}";"===this._flags.last_token.text&&M(this._flags.mode)&&(i=!0),this._flags.last_token.type===l.RESERVED?i=!0:this._flags.last_token.type===l.END_EXPR?i=!("]"===this._flags.last_token.text&&("--"===e.text||"++"===e.text)):this._flags.last_token.type===l.OPERATOR&&(i=s(e.text,["--","-","++","+"])&&s(this._flags.last_token.text,["--","-","++","+"]),s(e.text,["+","-"])&&s(this._flags.last_token.text,["--","++"])&&(c=!0)),(this._flags.mode!==C||this._flags.inline_frame)&&this._flags.mode!==m||"{"!==this._flags.last_token.text&&";"!==this._flags.last_token.text||this.print_newline()}this._output.space_before_token=this._output.space_before_token||i,this.print_token(e),this._output.space_before_token=c}else this.print_token(e);else this.print_token(e)},x.prototype.handle_block_comment=function(e,t){return this._output.raw?(this._output.add_raw_token(e),void(e.directives&&"end"===e.directives.preserve&&(this._output.raw=this._options.test_output_raw))):e.directives?(this.print_newline(!1,t),this.print_token(e),"start"===e.directives.preserve&&(this._output.raw=!0),void this.print_newline(!1,!0)):n.newline.test(e.text)||e.newlines?void this.print_block_commment(e,t):(this._output.space_before_token=!0,this.print_token(e),void(this._output.space_before_token=!0))},x.prototype.print_block_commment=function(e,t){var r,i=function(e){for(var t=[],r=(e=e.replace(n.allLineBreaks,"\n")).indexOf("\n");-1!==r;)t.push(e.substring(0,r)),r=(e=e.substring(r+1)).indexOf("\n");return e.length&&t.push(e),t}(e.text),o=!1,a=!1,l=e.whitespace_before,s=l.length;if(this.print_newline(!1,t),this.print_token_line_indentation(e),this._output.add_token(i[0]),this.print_newline(!1,t),i.length>1){for(o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].trim().charAt(0)!==t)return!1;return!0}(i=i.slice(1),"*"),a=function(e,t){for(var n,r=0,i=e.length;r<i;r++)if((n=e[r])&&0!==n.indexOf(t))return!1;return!0}(i,l),o&&(this._flags.alignment=1),r=0;r<i.length;r++)o?(this.print_token_line_indentation(e),this._output.add_token(c(i[r]))):a&&i[r]?(this.print_token_line_indentation(e),this._output.add_token(i[r].substring(s))):(this._output.current_line.set_indent(-1),this._output.add_token(i[r])),this.print_newline(!1,t);this._flags.alignment=0}},x.prototype.handle_comment=function(e,t){e.newlines?this.print_newline(!1,t):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(e),this.print_newline(!1,t)},x.prototype.handle_dot=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),u(this._flags.last_token,f)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(e,")"===this._flags.last_token.text&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(e)},x.prototype.handle_unknown=function(e,t){this.print_token(e),"\n"===e.text[e.text.length-1]&&this.print_newline(!1,t)},x.prototype.handle_eof=function(e){for(;this._flags.mode===m;)this.restore_mode();this.handle_whitespace_and_comments(e)},fH.Beautifier=x,fH}var JH,$H,ek,tk={exports:{}},nk={},rk={};function ik(){if(JH)return rk;JH=1;var e=xH().Options;function t(t){e.call(this,t,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var n=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||n;var r=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var i=0;i<r.length;i++)"expand"!==r[i]?this.brace_style="collapse":this.brace_style=r[i]}return t.prototype=new e,rk.Options=t,rk}function ok(){if(ek)return tk.exports;ek=1;var e=function(){if($H)return nk;$H=1;var e=ik().Options,t=pH().Output,n=SH().InputScanner,r=new(0,FH().Directives)(/\/\*/,/\*\//),i=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,a=/\s/,l=/(?:\s|\n)+/g,s=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,c=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function d(t,n){this._source_text=t||"",this._options=new e(n),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}return d.prototype.eatString=function(e){var t="";for(this._ch=this._input.next();this._ch;){if(t+=this._ch,"\\"===this._ch)t+=this._input.next();else if(-1!==e.indexOf(this._ch)||"\n"===this._ch)break;this._ch=this._input.next()}return t},d.prototype.eatWhitespace=function(e){for(var t=a.test(this._input.peek()),n=0;a.test(this._input.peek());)this._ch=this._input.next(),e&&"\n"===this._ch&&(0===n||n<this._options.max_preserve_newlines)&&(n++,this._output.add_new_line(!0));return t},d.prototype.foundNestedPseudoClass=function(){for(var e=0,t=1,n=this._input.peek(t);n;){if("{"===n)return!0;if("("===n)e+=1;else if(")"===n){if(0===e)return!1;e-=1}else if(";"===n||"}"===n)return!1;t++,n=this._input.peek(t)}return!1},d.prototype.print_string=function(e){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(e)},d.prototype.preserveSingleSpace=function(e){e&&(this._output.space_before_token=!0)},d.prototype.indent=function(){this._indentLevel++},d.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},d.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,d=this._options.eol;"auto"===d&&(d="\n",e&&i.test(e||"")&&(d=e.match(i)[0]));var u=(e=e.replace(o,"\n")).match(/^[\t ]*/)[0];this._output=new t(this._options,u),this._input=new n(e),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var f,h,p=0,C=!1,m=!1,g=!1,v=!1,A=!1,y=this._ch,w=!1;f=""!==this._input.read(l),h=y,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),y=this._ch,this._ch;)if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var b=this._input.read(s),E=r.get_directives(b);E&&"start"===E.ignore&&(b+=r.readIgnored(this._input)),this.print_string(b),this.eatWhitespace(!0),this._output.add_new_line()}else if("/"===this._ch&&"/"===this._input.peek())this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(c)),this.eatWhitespace(!0);else if("$"===this._ch){this.preserveSingleSpace(f),this.print_string(this._ch);var M=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);M.match(/[ :]$/)&&(M=this.eatString(": ").replace(/\s+$/,""),this.print_string(M),this._output.space_before_token=!0),0===p&&-1!==M.indexOf(":")&&(m=!0,this.indent())}else if("@"===this._ch)if(this.preserveSingleSpace(f),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var x=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);x.match(/[ :]$/)&&(x=this.eatString(": ").replace(/\s+$/,""),this.print_string(x),this._output.space_before_token=!0),0===p&&-1!==x.indexOf(":")?(m=!0,this.indent()):x in this.NESTED_AT_RULE?(this._nestedLevel+=1,x in this.CONDITIONAL_GROUP_RULE&&(g=!0)):0!==p||m||(v=!0)}else if("#"===this._ch&&"{"===this._input.peek())this.preserveSingleSpace(f),this.print_string(this._ch+this.eatString("}"));else if("{"===this._ch)m&&(m=!1,this.outdent()),v=!1,g?(g=!1,C=this._indentLevel>=this._nestedLevel):C=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&C&&this._output.previous_line&&"{"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,"expand"===this._options.brace_style?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):("("===h?this._output.space_before_token=!1:","!==h&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if("}"===this._ch)this.outdent(),this._output.add_new_line(),"{"===h&&this._output.trim(!0),m&&(this.outdent(),m=!1),this.print_string(this._ch),C=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&"}"!==this._input.peek()&&this._output.add_new_line(!0),")"===this._input.peek()&&(this._output.trim(!0),"expand"===this._options.brace_style&&this._output.add_new_line(!0));else if(":"===this._ch){for(var L=0;L<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;L++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[L])){w=!0;break}!C&&!g||this._input.lookBack("&")||this.foundNestedPseudoClass()||this._input.lookBack("(")||v||0!==p?(this._input.lookBack(" ")&&(this._output.space_before_token=!0),":"===this._input.peek()?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):(this.print_string(":"),m||(m=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent()))}else if('"'===this._ch||"'"===this._ch){var H='"'===h||"'"===h;this.preserveSingleSpace(H||f),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(";"===this._ch)w=!1,0===p?(m&&(this.outdent(),m=!1),v=!1,this.print_string(this._ch),this.eatWhitespace(!0),"/"!==this._input.peek()&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if("("===this._ch)if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),p++,this.indent(),this._ch=this._input.next(),")"===this._ch||'"'===this._ch||"'"===this._ch?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),p&&(p--,this.outdent()));else{var k=!1;this._input.lookBack("with")&&(k=!0),this.preserveSingleSpace(f||k),this.print_string(this._ch),m&&"$"===h&&this._options.selector_separator_newline?(this._output.add_new_line(),A=!0):(this.eatWhitespace(),p++,this.indent())}else if(")"===this._ch)p&&(p--,this.outdent()),A&&";"===this._input.peek()&&this._options.selector_separator_newline&&(A=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(","===this._ch)this.print_string(this._ch),this.eatWhitespace(!0),!this._options.selector_separator_newline||m&&!A||0!==p||v?this._output.space_before_token=!0:this._output.add_new_line();else if(">"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||m||0!==p)if("]"===this._ch)this.print_string(this._ch);else if("["===this._ch)this.preserveSingleSpace(f),this.print_string(this._ch);else if("="===this._ch)this.eatWhitespace(),this.print_string("="),a.test(this._ch)&&(this._ch="");else if("!"!==this._ch||this._input.lookBack("\\")){var V='"'===h||"'"===h;this.preserveSingleSpace(V||f),this.print_string(this._ch),!this._output.just_added_newline()&&"\n"===this._input.peek()&&w&&this._output.add_new_line()}else this._output.space_before_token=!0,this.print_string(this._ch);else this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&a.test(this._ch)&&(this._ch=""));return this._output.get_code(d)},nk.Beautifier=d,nk}().Beautifier,t=ik().Options;return tk.exports=function(t,n){return new e(t,n).beautify()},tk.exports.defaultOptions=function(){return new t},tk.exports}var ak,lk={exports:{}},sk={},ck={};function dk(){if(ak)return ck;ak=1;var e=xH().Options;function t(t){e.call(this,t,"html"),1===this.templating.length&&"auto"===this.templating[0]&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}return t.prototype=new e,ck.Options=t,ck}var uk,fk,hk,pk,Ck,mk={};function gk(){if(uk)return mk;uk=1;var e=jH().Tokenizer,t=jH().TOKEN,n=FH().Directives,r=GH().TemplatablePattern,i=RH().Pattern,o={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:t.START,RAW:t.RAW,EOF:t.EOF},a=new n(/<\!--/,/-->/),l=function(t,n){e.call(this,t,n),this._current_tag_name="";var o=new r(this._input).read_options(this._options),a=new i(this._input);if(this.__patterns={word:o.until(/[\n\r\t <]/),word_control_flow_close_excluded:o.until(/[\n\r\t <}]/),single_quote:o.until_after(/'/),double_quote:o.until_after(/"/),attribute:o.until(/[\n\r\t =>]|\/>/),element_name:o.until(/[\n\r\t >\/]/),angular_control_flow_start:a.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:a.starting_with(/{{!--/).until_after(/--}}/),handlebars:a.starting_with(/{{/).until_after(/}}/),handlebars_open:a.until(/[\n\r\t }]/),handlebars_raw_close:a.until(/}}/),comment:a.starting_with(/<!--/).until_after(/-->/),cdata:a.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:a.starting_with(/<!\[/).until_after(/]>/),processing:a.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var l=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=a.matching(l).until_after(l)}};return(l.prototype=new e)._is_comment=function(e){return!1},l.prototype._is_opening=function(e){return e.type===o.TAG_OPEN||e.type===o.CONTROL_FLOW_OPEN},l.prototype._is_closing=function(e,t){return e.type===o.TAG_CLOSE&&t&&((">"===e.text||"/>"===e.text)&&"<"===t.text[0]||"}}"===e.text&&"{"===t.text[0]&&"{"===t.text[1])||e.type===o.CONTROL_FLOW_CLOSE&&"}"===e.text&&t.text.endsWith("{")},l.prototype._reset=function(){this._current_tag_name=""},l.prototype._get_next_token=function(e,t){var n=null;this._readWhitespace();var r=this._input.peek();return null===r?this._create_token(o.EOF,""):n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n||this._read_open_handlebars(r,t))||this._read_attribute(r,e,t))||this._read_close(r,t))||this._read_script_and_style(r,e))||this._read_control_flows(r,t))||this._read_raw_content(r,e,t))||this._read_content_word(r,t))||this._read_comment_or_cdata(r))||this._read_processing(r))||this._read_open(r,t))||this._create_token(o.UNKNOWN,this._input.next())},l.prototype._read_comment_or_cdata=function(e){var t=null,n=null,r=null;"<"===e&&("!"===this._input.peek(1)&&((n=this.__patterns.comment.read())?(r=a.get_directives(n))&&"start"===r.ignore&&(n+=a.readIgnored(this._input)):n=this.__patterns.cdata.read()),n&&((t=this._create_token(o.COMMENT,n)).directives=r));return t},l.prototype._read_processing=function(e){var t=null,n=null;if("<"===e){var r=this._input.peek(1);"!"!==r&&"?"!==r||(n=(n=this.__patterns.conditional_comment.read())||this.__patterns.processing.read()),n&&((t=this._create_token(o.COMMENT,n)).directives=null)}return t},l.prototype._read_open=function(e,t){var n=null,r=null;return t&&t.type!==o.CONTROL_FLOW_OPEN||"<"===e&&(n=this._input.next(),"/"===this._input.peek()&&(n+=this._input.next()),n+=this.__patterns.element_name.read(),r=this._create_token(o.TAG_OPEN,n)),r},l.prototype._read_open_handlebars=function(e,t){var n=null,r=null;return t&&t.type!==o.CONTROL_FLOW_OPEN||(this._options.templating.includes("angular")||this._options.indent_handlebars)&&"{"===e&&"{"===this._input.peek(1)&&(this._options.indent_handlebars&&"!"===this._input.peek(2)?(n=(n=this.__patterns.handlebars_comment.read())||this.__patterns.handlebars.read(),r=this._create_token(o.COMMENT,n)):(n=this.__patterns.handlebars_open.read(),r=this._create_token(o.TAG_OPEN,n))),r},l.prototype._read_control_flows=function(e,t){var n="",r=null;if(!this._options.templating.includes("angular"))return r;if("@"===e){if(""===(n=this.__patterns.angular_control_flow_start.read()))return r;for(var i=n.endsWith("(")?1:0,a=0;!n.endsWith("{")||i!==a;){var l=this._input.next();if(null===l)break;"("===l?i++:")"===l&&a++,n+=l}r=this._create_token(o.CONTROL_FLOW_OPEN,n)}else"}"===e&&t&&t.type===o.CONTROL_FLOW_OPEN&&(n=this._input.next(),r=this._create_token(o.CONTROL_FLOW_CLOSE,n));return r},l.prototype._read_close=function(e,t){var n=null,r=null;return t&&t.type===o.TAG_OPEN&&("<"===t.text[0]&&(">"===e||"/"===e&&">"===this._input.peek(1))?(n=this._input.next(),"/"===e&&(n+=this._input.next()),r=this._create_token(o.TAG_CLOSE,n)):"{"===t.text[0]&&"}"===e&&"}"===this._input.peek(1)&&(this._input.next(),this._input.next(),r=this._create_token(o.TAG_CLOSE,"}}"))),r},l.prototype._read_attribute=function(e,t,n){var r=null,i="";if(n&&"<"===n.text[0])if("="===e)r=this._create_token(o.EQUALS,this._input.next());else if('"'===e||"'"===e){var a=this._input.next();a+='"'===e?this.__patterns.double_quote.read():this.__patterns.single_quote.read(),r=this._create_token(o.VALUE,a)}else(i=this.__patterns.attribute.read())&&(r=t.type===o.EQUALS?this._create_token(o.VALUE,i):this._create_token(o.ATTRIBUTE,i));return r},l.prototype._is_content_unformatted=function(e){return-1===this._options.void_elements.indexOf(e)&&(-1!==this._options.content_unformatted.indexOf(e)||-1!==this._options.unformatted.indexOf(e))},l.prototype._read_raw_content=function(e,t,n){var r="";if(n&&"{"===n.text[0])r=this.__patterns.handlebars_raw_close.read();else if(t.type===o.TAG_CLOSE&&"<"===t.opened.text[0]&&"/"!==t.text[0]){var i=t.opened.text.substr(1).toLowerCase();this._is_content_unformatted(i)&&(r=this._input.readUntil(new RegExp("</"+i+"[\\n\\r\\t ]*?>","ig")))}return r?this._create_token(o.TEXT,r):null},l.prototype._read_script_and_style=function(e,t){if(t.type===o.TAG_CLOSE&&"<"===t.opened.text[0]&&"/"!==t.text[0]){var n=t.opened.text.substr(1).toLowerCase();if("script"===n||"style"===n){var r=this._read_comment_or_cdata(e);if(r)return r.type=o.TEXT,r;var i=this._input.readUntil(new RegExp("</"+n+"[\\n\\r\\t ]*?>","ig"));if(i)return this._create_token(o.TEXT,i)}}return null},l.prototype._read_content_word=function(e,t){var n="";return this._options.unformatted_content_delimiter&&e===this._options.unformatted_content_delimiter[0]&&(n=this.__patterns.unformatted_content_delimiter.read()),n||(n=t&&t.type===o.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),n?this._create_token(o.TEXT,n):null},mk.Tokenizer=l,mk.TOKEN=o,mk}function vk(){if(fk)return sk;fk=1;var e=dk().Options,t=pH().Output,n=gk().Tokenizer,r=gk().TOKEN,i=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,a=function(e,n){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=e.max_preserve_newlines,this.preserve_newlines=e.preserve_newlines,this._output=new t(e,n)};a.prototype.current_line_has_match=function(e){return this._output.current_line.has_match(e)},a.prototype.set_space_before_token=function(e,t){this._output.space_before_token=e,this._output.non_breaking_space=t},a.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},a.prototype.add_raw_token=function(e){this._output.add_raw_token(e)},a.prototype.print_preserved_newlines=function(e){var t=0;e.type!==r.TEXT&&e.previous.type!==r.TEXT&&(t=e.newlines?1:0),this.preserve_newlines&&(t=e.newlines<this.max_preserve_newlines+1?e.newlines:this.max_preserve_newlines+1);for(var n=0;n<t;n++)this.print_newline(n>0);return 0!==t},a.prototype.traverse_whitespace=function(e){return!(!e.whitespace_before&&!e.newlines)&&(this.print_preserved_newlines(e)||(this._output.space_before_token=!0),!0)},a.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},a.prototype.print_newline=function(e){this._output.add_new_line(e)},a.prototype.print_token=function(e){e.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(e.text))},a.prototype.indent=function(){this.indent_level++},a.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},a.prototype.get_full_indent=function(e){return(e=this.indent_level+(e||0))<1?"":this._output.get_indent_string(e)};var l=function(e,t){var n=null,i=null;return t.closed?("script"===e?n="text/javascript":"style"===e&&(n="text/css"),n=function(e){for(var t=null,n=e.next;n.type!==r.EOF&&e.closed!==n;){if(n.type===r.ATTRIBUTE&&"type"===n.text){n.next&&n.next.type===r.EQUALS&&n.next.next&&n.next.next.type===r.VALUE&&(t=n.next.next.text);break}n=n.next}return t}(t)||n,n.search("text/css")>-1?i="css":n.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?i="javascript":n.search(/(text|application|dojo)\/(x-)?(html)/)>-1?i="html":n.search(/test\/null/)>-1&&(i="null"),i):null};function s(e,t){return-1!==t.indexOf(e)}function c(e,t,n){this.parent=e||null,this.tag=t?t.tag_name:"",this.indent_level=n||0,this.parser_token=t||null}function d(e){this._printer=e,this._current_frame=null}function u(t,n,r,i){this._source_text=t||"",n=n||{},this._js_beautify=r,this._css_beautify=i,this._tag_stack=null;var o=new e(n,"html");this._options=o,this._is_wrap_attributes_force="force"===this._options.wrap_attributes.substr(0,5),this._is_wrap_attributes_force_expand_multiline="force-expand-multiline"===this._options.wrap_attributes,this._is_wrap_attributes_force_aligned="force-aligned"===this._options.wrap_attributes,this._is_wrap_attributes_aligned_multiple="aligned-multiple"===this._options.wrap_attributes,this._is_wrap_attributes_preserve="preserve"===this._options.wrap_attributes.substr(0,8),this._is_wrap_attributes_preserve_aligned="preserve-aligned"===this._options.wrap_attributes}d.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},d.prototype.record_tag=function(e){var t=new c(this._current_frame,e,this._printer.indent_level);this._current_frame=t},d.prototype._try_pop_frame=function(e){var t=null;return e&&(t=e.parser_token,this._printer.indent_level=e.indent_level,this._current_frame=e.parent),t},d.prototype._get_frame=function(e,t){for(var n=this._current_frame;n&&-1===e.indexOf(n.tag);){if(t&&-1!==t.indexOf(n.tag)){n=null;break}n=n.parent}return n},d.prototype.try_pop=function(e,t){var n=this._get_frame([e],t);return this._try_pop_frame(n)},d.prototype.indent_to_tag=function(e){var t=this._get_frame(e);t&&(this._printer.indent_level=t.indent_level)},u.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,t=this._options.eol;"auto"===this._options.eol&&(t="\n",e&&i.test(e)&&(t=e.match(i)[0]));var l=(e=e.replace(o,"\n")).match(/^[\t ]*/)[0],s={text:"",type:""},c=new f(this._options),u=new a(this._options,l),h=new n(e,this._options).tokenize();this._tag_stack=new d(u);for(var p=null,C=h.next();C.type!==r.EOF;)C.type===r.TAG_OPEN||C.type===r.COMMENT?c=p=this._handle_tag_open(u,C,c,s,h):C.type===r.ATTRIBUTE||C.type===r.EQUALS||C.type===r.VALUE||C.type===r.TEXT&&!c.tag_complete?p=this._handle_inside_tag(u,C,c,s):C.type===r.TAG_CLOSE?p=this._handle_tag_close(u,C,c):C.type===r.TEXT?p=this._handle_text(u,C,c):C.type===r.CONTROL_FLOW_OPEN?p=this._handle_control_flow_open(u,C):C.type===r.CONTROL_FLOW_CLOSE?p=this._handle_control_flow_close(u,C):u.add_raw_token(C),s=p,C=h.next();return u._output.get_code(t)},u.prototype._handle_control_flow_open=function(e,t){var n={text:t.text,type:t.type};return e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),t.newlines?e.print_preserved_newlines(t):e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),e.print_token(t),e.indent(),n},u.prototype._handle_control_flow_close=function(e,t){var n={text:t.text,type:t.type};return e.deindent(),t.newlines?e.print_preserved_newlines(t):e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),e.print_token(t),n},u.prototype._handle_tag_close=function(e,t,n){var r={text:t.text,type:t.type};return e.alignment_size=0,n.tag_complete=!0,e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),n.is_unformatted?e.add_raw_token(t):("<"===n.tag_start_char&&(e.set_space_before_token("/"===t.text[0],!0),this._is_wrap_attributes_force_expand_multiline&&n.has_wrapped_attrs&&e.print_newline(!1)),e.print_token(t)),!n.indent_content||n.is_unformatted||n.is_content_unformatted||(e.indent(),n.indent_content=!1),n.is_inline_element||n.is_unformatted||n.is_content_unformatted||e.set_wrap_point(),r},u.prototype._handle_inside_tag=function(e,t,n,i){var o=n.has_wrapped_attrs,a={text:t.text,type:t.type};return e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),n.is_unformatted?e.add_raw_token(t):"{"===n.tag_start_char&&t.type===r.TEXT?e.print_preserved_newlines(t)?(t.newlines=0,e.add_raw_token(t)):e.print_token(t):(t.type===r.ATTRIBUTE?e.set_space_before_token(!0):(t.type===r.EQUALS||t.type===r.VALUE&&t.previous.type===r.EQUALS)&&e.set_space_before_token(!1),t.type===r.ATTRIBUTE&&"<"===n.tag_start_char&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(e.traverse_whitespace(t),o=o||0!==t.newlines),this._is_wrap_attributes_force&&n.attr_count>=this._options.wrap_attributes_min_attrs&&(i.type!==r.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(e.print_newline(!1),o=!0)),e.print_token(t),o=o||e.previous_token_wrapped(),n.has_wrapped_attrs=o),a},u.prototype._handle_text=function(e,t,n){var r={text:t.text,type:"TK_CONTENT"};return n.custom_beautifier_name?this._print_custom_beatifier_text(e,t,n):n.is_unformatted||n.is_content_unformatted?e.add_raw_token(t):(e.traverse_whitespace(t),e.print_token(t)),r},u.prototype._print_custom_beatifier_text=function(e,t,n){var r=this;if(""!==t.text){var i,o=t.text,a=1,l="",s="";"javascript"===n.custom_beautifier_name&&"function"==typeof this._js_beautify?i=this._js_beautify:"css"===n.custom_beautifier_name&&"function"==typeof this._css_beautify?i=this._css_beautify:"html"===n.custom_beautifier_name&&(i=function(e,t){return new u(e,t,r._js_beautify,r._css_beautify).beautify()}),"keep"===this._options.indent_scripts?a=0:"separate"===this._options.indent_scripts&&(a=-e.indent_level);var c=e.get_full_indent(a);if(o=o.replace(/\n[ \t]*$/,""),"html"!==n.custom_beautifier_name&&"<"===o[0]&&o.match(/^(<!--|<!\[CDATA\[)/)){var d=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(o);if(!d)return void e.add_raw_token(t);l=c+d[1]+"\n",o=d[4],d[5]&&(s=c+d[5]),o=o.replace(/\n[ \t]*$/,""),(d[2]||-1!==d[3].indexOf("\n"))&&(d=d[3].match(/[ \t]+$/))&&(t.whitespace_before=d[0])}if(o)if(i){var f=function(){this.eol="\n"};f.prototype=this._options.raw_options,o=i(c+o,new f)}else{var h=t.whitespace_before;h&&(o=o.replace(new RegExp("\n("+h+")?","g"),"\n")),o=c+o.replace(/\n/g,"\n"+c)}l&&(o=o?l+o+"\n"+s:l+s),e.print_newline(!1),o&&(t.text=o,t.whitespace_before="",t.newlines=0,e.add_raw_token(t),e.print_newline(!0))}},u.prototype._handle_tag_open=function(e,t,n,i,o){var a=this._get_tag_open_token(t);if(!n.is_unformatted&&!n.is_content_unformatted||n.is_empty_element||t.type!==r.TAG_OPEN||a.is_start_tag?(e.traverse_whitespace(t),this._set_tag_position(e,t,a,n,i),a.is_inline_element||e.set_wrap_point(),e.print_token(t)):(e.add_raw_token(t),a.start_tag_token=this._tag_stack.try_pop(a.tag_name)),a.is_start_tag&&this._is_wrap_attributes_force){var l,s=0;do{(l=o.peek(s)).type===r.ATTRIBUTE&&(a.attr_count+=1),s+=1}while(l.type!==r.EOF&&l.type!==r.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(a.alignment_size=t.text.length+1),a.tag_complete||a.is_unformatted||(e.alignment_size=a.alignment_size),a};var f=function(e,t,n){if(this.parent=t||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",n){var i;this.tag_start_char=n.text[0],this.text=n.text,"<"===this.tag_start_char?(i=n.text.match(/^<([^\s>]*)/),this.tag_check=i?i[1]:""):(i=n.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=i?i[1]:"",(n.text.startsWith("{{#>")||n.text.startsWith("{{~#>"))&&">"===this.tag_check[0]&&(">"===this.tag_check&&null!==n.next?this.tag_check=n.next.text.split(" ")[0]:this.tag_check=n.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),n.type===r.COMMENT&&(this.tag_complete=!0),this.is_start_tag="/"!==this.tag_check.charAt(0),this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||n.closed&&"/>"===n.closed.text;var o=2;"{"===this.tag_start_char&&this.text.length>=3&&"~"===this.text.charAt(2)&&(o=3),this.is_end_tag=this.is_end_tag||"{"===this.tag_start_char&&(!e.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(o)))}else this.tag_complete=!0};u.prototype._get_tag_open_token=function(e){var t=new f(this._options,this._tag_stack.get_parser_token(),e);return t.alignment_size=this._options.wrap_attributes_indent_size,t.is_end_tag=t.is_end_tag||s(t.tag_check,this._options.void_elements),t.is_empty_element=t.tag_complete||t.is_start_tag&&t.is_end_tag,t.is_unformatted=!t.tag_complete&&s(t.tag_check,this._options.unformatted),t.is_content_unformatted=!t.is_empty_element&&s(t.tag_check,this._options.content_unformatted),t.is_inline_element=s(t.tag_name,this._options.inline)||this._options.inline_custom_elements&&t.tag_name.includes("-")||"{"===t.tag_start_char,t},u.prototype._set_tag_position=function(e,t,n,i,o){if(n.is_empty_element||(n.is_end_tag?n.start_tag_token=this._tag_stack.try_pop(n.tag_name):(this._do_optional_end_element(n)&&(n.is_inline_element||e.print_newline(!1)),this._tag_stack.record_tag(n),"script"!==n.tag_name&&"style"!==n.tag_name||n.is_unformatted||n.is_content_unformatted||(n.custom_beautifier_name=l(n.tag_check,t)))),s(n.tag_check,this._options.extra_liners)&&(e.print_newline(!1),e._output.just_added_blankline()||e.print_newline(!0)),n.is_empty_element){if("{"===n.tag_start_char&&"else"===n.tag_check)this._tag_stack.indent_to_tag(["if","unless","each"]),n.indent_content=!0,e.current_line_has_match(/{{#if/)||e.print_newline(!1);"!--"===n.tag_name&&o.type===r.TAG_CLOSE&&i.is_end_tag&&-1===n.text.indexOf("\n")||(n.is_inline_element||n.is_unformatted||e.print_newline(!1),this._calcluate_parent_multiline(e,n))}else if(n.is_end_tag){var a=!1;a=(a=n.start_tag_token&&n.start_tag_token.multiline_content)||!n.is_inline_element&&!(i.is_inline_element||i.is_unformatted)&&!(o.type===r.TAG_CLOSE&&n.start_tag_token===i)&&"TK_CONTENT"!==o.type,(n.is_content_unformatted||n.is_unformatted)&&(a=!1),a&&e.print_newline(!1)}else n.indent_content=!n.custom_beautifier_name,"<"===n.tag_start_char&&("html"===n.tag_name?n.indent_content=this._options.indent_inner_html:"head"===n.tag_name?n.indent_content=this._options.indent_head_inner_html:"body"===n.tag_name&&(n.indent_content=this._options.indent_body_inner_html)),n.is_inline_element||n.is_unformatted||"TK_CONTENT"===o.type&&!n.is_content_unformatted||e.print_newline(!1),this._calcluate_parent_multiline(e,n)},u.prototype._calcluate_parent_multiline=function(e,t){!t.parent||!e._output.just_added_newline()||(t.is_inline_element||t.is_unformatted)&&t.parent.is_inline_element||(t.parent.multiline_content=!0)};var h=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],p=["a","audio","del","ins","map","noscript","video"];return u.prototype._do_optional_end_element=function(e){var t=null;if(!e.is_empty_element&&e.is_start_tag&&e.parent){if("body"===e.tag_name)t=t||this._tag_stack.try_pop("head");else if("li"===e.tag_name)t=t||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if("dd"===e.tag_name||"dt"===e.tag_name)t=(t=t||this._tag_stack.try_pop("dt",["dl"]))||this._tag_stack.try_pop("dd",["dl"]);else if("p"===e.parent.tag_name&&-1!==h.indexOf(e.tag_name)){var n=e.parent.parent;n&&-1!==p.indexOf(n.tag_name)||(t=t||this._tag_stack.try_pop("p"))}else"rp"===e.tag_name||"rt"===e.tag_name?t=(t=t||this._tag_stack.try_pop("rt",["ruby","rtc"]))||this._tag_stack.try_pop("rp",["ruby","rtc"]):"optgroup"===e.tag_name?t=t||this._tag_stack.try_pop("optgroup",["select"]):"option"===e.tag_name?t=t||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):"colgroup"===e.tag_name?t=t||this._tag_stack.try_pop("caption",["table"]):"thead"===e.tag_name?t=(t=t||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]):"tbody"===e.tag_name||"tfoot"===e.tag_name?t=(t=(t=(t=t||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("thead",["table"]))||this._tag_stack.try_pop("tbody",["table"]):"tr"===e.tag_name?t=(t=(t=t||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"]):"th"!==e.tag_name&&"td"!==e.tag_name||(t=(t=t||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]))||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return e.parent=this._tag_stack.get_parser_token(),t}},sk.Beautifier=u,sk}function Ak(){if(pk)return dH;pk=1;var e=function(){if(XH)return uH.exports;XH=1;var e=YH().Beautifier,t=LH().Options;return uH.exports=function(t,n){return new e(t,n).beautify()},uH.exports.defaultOptions=function(){return new t},uH.exports}(),t=ok(),n=function(){if(hk)return lk.exports;hk=1;var e=vk().Beautifier,t=dk().Options;return lk.exports=function(t,n,r,i){return new e(t,n,r,i).beautify()},lk.exports.defaultOptions=function(){return new t},lk.exports}();function r(r,i,o,a){return n(r,i,o=o||e,a=a||t)}return r.defaultOptions=n.defaultOptions,dH.js=e,dH.css=t,dH.html=r,dH}var yk=(Ck||(Ck=1,function(e){var t,n,r,i,o=Ak();o.js_beautify=o.js,o.css_beautify=o.css,o.html_beautify=o.html,e.exports=(t=o,n=o,r=o,i=function(e,n){return t.js_beautify(e,n)},i.js=t.js_beautify,i.css=n.css_beautify,i.html=r.html_beautify,i.js_beautify=t.js_beautify,i.css_beautify=n.css_beautify,i.html_beautify=r.html_beautify,i)}(cH)),cH.exports);const wk=(e,t,n=150)=>{if(!e||!t)return{top:0,left:0};const{top:r,left:i}=e,o=t.getBoundingClientRect();let a=r,l=i;return a-=a+n>t.clientHeight-n+130?Math.floor(n/2)+n-35:10,i>.6*o.width?l-=n+50:i<.5*o.width+n&&(l-=42),{top:a,left:l}},bk=o(({width:t="100%",height:r="100%",VariableDropdownHeight:i="160px",readOnly:o=!1,value:s="",handleChange:d,setValue:u,variableOptionsList:f=[],addForloopPrefix:h=!1,language:p="json",theme:C="light",isRequisiteType:m=!1,onPaste:g,showVariableDropdown:v=!0,defaultValue:A,customOptions:y={},editorVariableZindex:b=99999,showMinimap:E=!0,isFocus:M=!1},x)=>{const H=a(null),k=a([]),V=a(null),S=a(null),[O,z]=c(0),[N,I]=c(!1),[T,D]=c(!1),[Z,_]=c({top:0,left:0}),[R,j]=c([]),B=a(f);l(()=>{B.current=f},[f]);l(()=>{const e=H.current;if(!e)return;const t=e.onDidBlurEditorWidget(()=>{D(!1),V.current=null,S.current=null,k.current=[],z(0)}),n=t=>{const n=e.getDomNode(),r=n&&n.contains(t.target);if(!r||r&&!t.target.closest(".view-line, .monaco-editor-textarea")){const e=n?.querySelector("textarea");e&&e.blur()}};return document.addEventListener("mousedown",n),()=>{t.dispose(),document.removeEventListener("mousedown",n)}},[T]),l(()=>{const e=H.current;if(!e||!O)return;const t=[],n=[];N?n.push({range:{startLineNumber:O,startColumn:1,endLineNumber:O,endColumn:1},options:{isWholeLine:!1,linesDecorationsClassName:"active-line-number"}}):t.push({range:{startLineNumber:O,startColumn:1,endLineNumber:O,endColumn:1},options:{isWholeLine:!0,className:"current-line-background"}}),k.current=e.deltaDecorations(k.current,[...t,...n])},[O,N]);const P=(e,t)=>{switch(t){case"json":case"javascript":return yk.js(e,{indent_size:4,indent_char:" ",max_preserve_newlines:5,preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!0,brace_style:"collapse",space_before_conditional:!0,unescape_strings:!0,jslint_happy:!0,end_with_newline:!0,wrap_line_length:0,comma_first:!1,e4x:!0,indent_empty_lines:!0});case"html":case"xml":return yk.html(e,{indent_size:4,indent_char:" ",max_preserve_newlines:5,preserve_newlines:!0,end_with_newline:!0,wrap_line_length:0,indent_empty_lines:!0});default:return e}};return w(x,()=>({getEditorInstance:()=>H.current,focus:()=>{H.current?.focus()},beautify:()=>{if(H.current){const e=H.current.getValue(),t=H.current.getModel()?.getLanguageId(),n=P(e,t||"json");H.current.setValue(n)}}})),n("div",{style:{width:t,height:r},className:"ff-editor-container",children:[e(L,{defaultValue:A,height:r,width:t,language:p,value:s,options:{minimap:{enabled:E},lineNumbers:"on",wordWrap:"on",autoClosingBrackets:"always",scrollBeyondLastLine:!1,readOnly:o,guides:{indentation:!1},...y},onMount:(e,t)=>{H.current=e,M&&setTimeout(()=>{e.focus()},0),e.onDidChangeCursorPosition(t=>{z(t.position.lineNumber);const n=e.getPosition(),r=e.getModel();if(!n||!r)return;const i=r.getLineContent(n.lineNumber),o=n.column-1;if(0===o)return void D(!1);const a=i.lastIndexOf("$",o-1),l=i.lastIndexOf("${",o-1),s=-1!==l?i.indexOf("}",l+2):-1,c=-1!==l&&-1!==s&&o-1>l&&o-1<s,d=!/\}/.test(i.slice(a+1,o));if(-1!==a&&o>a&&!/\s/.test(i.slice(a+1,o))&&!c&&d){V.current=a,S.current=i.slice(a+1,o);const r=(S.current??"").toLowerCase(),l=B.current.filter(e=>("_startforloop"===e.type&&h?`FLV_for:${e.name}`:e.name).toLowerCase().includes(r));j(l);const s=e.getScrolledVisiblePosition(n),c=e.getDomNode();_(wk(s,c,150)),["keyboard","mouse","deleteLeft"].includes(t?.source||"")&&D(!0)}else D(!1),V.current=null,S.current=null}),e.onMouseDown(()=>{setTimeout(()=>{const e=H.current;if(!e)return;const t=e.getPosition(),n=e.getModel();if(!t||!n)return;const r=n.getLineContent(t.lineNumber),i=t.column-2;"$"===r[i]?(V.current=i,S.current=""):(V.current=null,S.current=null)},0)}),e.onDidChangeCursorSelection(()=>{const t=(e.getSelections?.()||[]).some(e=>e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn);I(t)}),e.onDidChangeModelContent(()=>{const t=e.getValue();u(t);const n=e.getPosition(),r=e.getModel();if(!n||!r)return;const i=r.getLineContent(n.lineNumber),o=n.column-2;if("$"===i[V.current??o]){null===V.current&&(V.current=o),S.current=i.slice(V.current+1,o);const t=B.current.filter(e=>("_startforloop"===e.type&&h?`FLV_for:${e.name}`:e.name).toLowerCase().includes(S.current?.toLowerCase()));t.length?j(t):(j([]),V?.current!==o&&" "===i[o]&&(V.current=null,S.current=null,D(!1)));const r=e.getScrolledVisiblePosition(n),a=e.getDomNode();_(wk(r,a,150))}else V.current=null,S.current=null}),e.onDidPaste(()=>{const t=e.getValue();if(t){const n=P(t,p);e.setValue(n),g&&g(n)}}),t.languages.registerCompletionItemProvider(p,{triggerCharacters:["."],provideCompletionItems:(e,n)=>{const r=e.getValueInRange({startLineNumber:n.lineNumber,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column}),i=e.getWordAtPosition(n),o=i?new t.Range(n.lineNumber,i.startColumn,n.lineNumber,i.endColumn):new t.Range(n.lineNumber,n.column,n.lineNumber,n.column),a=[];return r.endsWith("ff.")&&a.push({label:"getVariable",kind:t.languages.CompletionItemKind.Method,insertText:"getVariable(${1:variableName})",insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,detail:"Get a variable value",range:o},{label:"setVariable",kind:t.languages.CompletionItemKind.Method,insertText:"setVariable(${1:variableName}, ${2:value})",insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,detail:"Set a variable value",range:o},{label:"sendRequest",kind:t.languages.CompletionItemKind.Method,insertText:'sendRequest({\n method: "GET",//add your method\n url: "https://fakestoreapi.com/products",//enter your url\n headers: { },//add your headers,\n params: params,//add your params,\n data: body,//add your request body,\n })',insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,detail:"Make your http requests",range:o}),{suggestions:a}}})},onChange:(e,t)=>d(e,t),theme:C}),T&&Z&&v&&e(BM,{position:"absolute",width:"300px",height:i,optionsList:R,onSelectVariable:e=>{if(m&&H.current){const t=H.current,n=t.getPosition();if(n){const r=`'${e.name}'`,i=V?.current??0;t.executeEdits("",[{range:{startLineNumber:n.lineNumber,startColumn:i+1,endLineNumber:n.lineNumber,endColumn:i+(n.column-i)},text:r,forceMoveMarkers:!0}]),S.current=null,V.current=null,D(!1)}}else((e,t)=>{if(H.current){const n=H.current,r=n.getPosition();if(r){const i=`{${t}${"FLV_for:"===t?"":"_"}${e}}`,o=V?.current??0;n.executeEdits("",[{range:{startLineNumber:r.lineNumber,startColumn:o+2,endLineNumber:r.lineNumber,endColumn:o+(r.column-o)},text:i,forceMoveMarkers:!1}]);const a=[];a.push({range:{startLineNumber:O,startColumn:1,endLineNumber:O,endColumn:1},options:{isWholeLine:!1}}),k.current=n.deltaDecorations(k.current,a),S.current=null,V.current=null,D(!1)}}})("DATAPROVIDER"===e?.type?e?.dpName+":"+e?.varname:e?.name,"STEPGROUP"===e.parentVariableType?"SGV":"GLOBAL"===e?.type?"GV":"LOCAL"===e?.type?"LV":(e?._id??e?.id??"").includes("PARAMETER")?"SGP":"_startforloop"===e?.type?"FLV_for:":"DATAPROVIDER"===e?.type?"DPV":"PEV")},dropdownPosition:Z,zIndex:b})]})}),Ek=e=>e.flatMap(e=>e.runLevelExecutionDataSets.map((t,n)=>{const{runLevelExecutionDataSets:r,...i}=e;return{...i,...t,runCount:n+1}}));var Mk,xk={exports:{}};var Lk,Hk=(Mk||(Mk=1,"undefined"!=typeof self&&self,xk.exports=(Lk=i,function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="lib/",n(n.s=5)}([function(e,t){e.exports=Lk},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ArcherContainerContextProvider=t.ArcherContainerContext=void 0;var i=r(n(0));t.ArcherContainerContext=i.default.createContext(null),t.ArcherContainerContextProvider=t.ArcherContainerContext.Provider},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeId=void 0,t.encodeId=function(e){return encodeURI(e).replace(/%/g,"_")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getMarkerId=t.createShapeObj=t.getSourceToTargets=t.getEndShapeFromStyle=void 0;var r=["arrow","circle"];t.getEndShapeFromStyle=function(e){return e.endShape&&Object.keys(e.endShape).filter(function(e){return r.includes(e)})[0]||r[0]},t.getSourceToTargets=function(e){var t=Object.keys(e).map(function(t){return e[t]});return[].concat.apply([],t).sort(function(e,t){return e.order-t.order})},t.createShapeObj=function(e,n){return{arrow:function(){var t;return{arrow:Object.assign(Object.assign({},null==n?void 0:n.arrow),null===(t=e.endShape)||void 0===t?void 0:t.arrow)}},circle:function(){var t;return{circle:Object.assign(Object.assign({},null==n?void 0:n.circle),null===(t=e.endShape)||void 0===t?void 0:t.circle)}}}[(0,t.getEndShapeFromStyle)(e)]()},t.getMarkerId=function(e,t,n){return"".concat(e).concat(t.id).concat(n.id)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.endShapeDefaultProp=void 0,t.endShapeDefaultProp={arrow:{arrowLength:10,arrowThickness:6},circle:{radius:2,fillColor:"#f00",strokeColor:"#0ff",strokeWidth:1}}},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ArcherContainer=t.ArcherElement=void 0;var i=n(6);Object.defineProperty(t,"ArcherElement",{enumerable:!0,get:function(){return r(i).default}});var o=n(11);Object.defineProperty(t,"ArcherContainer",{enumerable:!0,get:function(){return r(o).default}})},function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&("get"in i?t.__esModule:!i.writable&&!i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var a=o(n(0)),l=n(7),s=n(1),c=n(2),d=n(8),u=n(10);t.default=function(e){var t=e.id,n=e.relations,r=void 0===n?[]:n,i=e.children,o=(0,a.useMemo)(function(){return(0,c.encodeId)(t)},[t]),f=(0,a.useContext)(s.ArcherContainerContext),h=(0,a.useRef)(),p=(0,a.useCallback)(function(e){var t=(0,u.generateSourceToTarget)(o,e);(0,u.assertContextExists)(f),f.registerTransitions(o,t)},[f,o]),C=(0,a.useCallback)(function(){(0,u.assertContextExists)(f),f.unregisterTransitions(o)},[f,o]),m=(0,a.useCallback)(function(e){e&&((0,u.assertContextExists)(f),f.registerChild(o,e))},[o,f]),g=(0,a.useCallback)(function(){(0,u.assertContextExists)(f),f.unregisterChild(o)},[f,o]);(0,l.useIsomorphicLayoutEffect)(function(){return m(h.current),function(){return g()}},[m,g]),(0,d.useDeepCompareEffect)(function(){return p(r),function(){return C()}},[p,r,C]),a.default.Children.only(i);var v=i;return a.default.cloneElement(v,Object.assign(Object.assign({},v.props),{ref:h}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.useIsomorphicLayoutEffect=void 0;var r=n(0);t.useIsomorphicLayoutEffect="undefined"!=typeof window?r.useLayoutEffect:r.useEffect},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useDeepCompareEffect=void 0;var i=n(0),o=r(n(9));function a(e){var t=(0,i.useRef)();return(0,o.default)(e,t.current)||(t.current=e),t.current}t.useDeepCompareEffect=function(e,t){(0,i.useEffect)(e,t.map(a))}},function(e,t,n){var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty,a="undefined"!=typeof Element;e.exports=function(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var l,s,c,d=r(t),u=r(n);if(d&&u){if((s=t.length)!=n.length)return!1;for(l=s;0!=l--;)if(!e(t[l],n[l]))return!1;return!0}if(d!=u)return!1;var f=t instanceof Date,h=n instanceof Date;if(f!=h)return!1;if(f&&h)return t.getTime()==n.getTime();var p=t instanceof RegExp,C=n instanceof RegExp;if(p!=C)return!1;if(p&&C)return t.toString()==n.toString();var m=i(t);if((s=m.length)!==i(n).length)return!1;for(l=s;0!=l--;)if(!o.call(n,m[l]))return!1;if(a&&t instanceof Element&&n instanceof Element)return t===n;for(l=s;0!=l--;)if(!("_owner"===(c=m[l])&&t.$$typeof||e(t[c],n[c])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.generateSourceToTarget=t.assertContextExists=void 0;var r=n(2);t.assertContextExists=function(e){if(!e)throw new Error("Could not find ArcherContainerContext in <ArcherElement>. Please wrap the component in a <ArcherContainer>.")},t.generateSourceToTarget=function(e,t){return t.map(function(t){var n=t.targetId,i=t.sourceAnchor,o=t.targetAnchor,a=t.label,l=t.className,s=t.style,c=t.order,d=void 0===c?0:c,u=t.domAttributes,f=t.cursor,h=t.hitSlop;return{source:{id:(0,r.encodeId)(e),anchor:i},target:{id:(0,r.encodeId)(n),anchor:o},className:l,label:a,style:s,order:d,domAttributes:u,cursor:f,hitSlop:h}})}},function(e,t,n){function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){l=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var a=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&("get"in i?t.__esModule:!i.writable&&!i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),l=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return l(t,e),t},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var d=s(n(0)),u=c(n(12)),f=n(1),h=n(14),p=n(4),C=n(19),m=n(20),g={position:"absolute",width:"100%",height:"100%",top:0,left:0,pointerEvents:"none"},v=d.default.forwardRef(function(e,t){var n=e.endShape,o=void 0===n?p.endShapeDefaultProp:n,a=e.strokeColor,l=void 0===a?"#f00":a,s=e.strokeWidth,c=void 0===s?2:s,v=e.svgContainerStyle,A=void 0===v?{}:v,y=e.noCurves,w=e.children,b=e.className,E=e.endMarker,M=e.lineStyle,x=e.offset,L=e.startMarker,H=e.strokeDasharray,k=e.style,V=i((0,d.useState)({}),2),S=V[0],O=V[1],z=i((0,d.useState)({}),2),N=z[0],I=z[1],T=(0,d.useRef)(new u.default(function(){j()})).current,D=(0,d.useRef)(null),Z=i(d.default.useState(),2)[1],_=(0,d.useRef)("arrow".concat(Math.random().toString().slice(2))).current;(0,d.useImperativeHandle)(t,function(){return{refreshScreen:j,arrowMarkerUniquePrefix:_}});var R,j=d.default.useCallback(function(){return Z({})},[]),B=(0,d.useCallback)(function(e,t){I(function(n){return Object.assign(Object.assign({},n),r({},e,t))})},[]),P=(0,d.useCallback)(function(e){I(function(t){var n=Object.assign({},t);return delete n[e],n})},[]),F=(0,d.useCallback)(function(e,t){O(function(n){return n[e]===t?n:Object.assign(Object.assign({},n),r({},e,t))})},[]),q=(0,d.useCallback)(function(e){O(function(t){var n=Object.assign({},t);return delete n[e],n})},[]),U=(0,d.useMemo)(function(){return Object.assign(Object.assign({},g),A)},[A]);R="function"==typeof w?w(f.ArcherContainerContext):w,(0,m.useResizeListener)(j),(0,m.useObserveElements)(S,T);var W=(0,d.useMemo)(function(){return{registerTransitions:B,unregisterTransitions:P,registerChild:F,unregisterChild:q}},[B,P,F,q]);return d.default.createElement(f.ArcherContainerContextProvider,{value:W},d.default.createElement("div",{style:Object.assign(Object.assign({},k),{position:"relative"}),className:b},d.default.createElement("svg",{style:U},d.default.createElement("defs",null,d.default.createElement(C.ArrowMarkers,{endShape:o,sourceToTargetsMap:N,strokeColor:l,uniqueId:_})),d.default.createElement(h.SvgArrows,{startMarker:L,endMarker:E,endShape:o,strokeColor:l,strokeWidth:c,strokeDasharray:H,noCurves:y,lineStyle:M,offset:x,parentCurrent:D.current,refs:S,uniqueId:_,sourceToTargetsMap:N})),d.default.createElement("div",{style:{height:"100%"},ref:D},R)))});t.default=v},function(e,t,n){n.r(t),function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n+=1){var i=r[n];e.call(t,i[1],i[0])}},Object.defineProperties(t.prototype,n),t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==e&&e.Math===Math?e:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},a=2,l=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,c=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function l(){n&&(n=!1,e()),r&&c()}function s(){o(l)}function c(){var e=Date.now();if(n){if(e-i<a)return;r=!0}else n=!0,r=!1,setTimeout(s,t);i=e}return c}(this.refresh.bind(this),20)};c.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},c.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},c.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},c.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},c.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},c.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},c.prototype.onTransitionEnd_=function(e){var t=e.propertyName;void 0===t&&(t=""),l.some(function(e){return!!~t.indexOf(e)})&&this.refresh()},c.getInstance=function(){return this.instance_||(this.instance_=new c),this.instance_},c.instance_=null;var d=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n+=1){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},u=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},f=v(0,0,0,0);function h(e){return parseFloat(e)||0}function p(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return t.reduce(function(t,n){return t+h(e["border-"+n+"-width"])},0)}function C(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return f;var r=u(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n+=1){var i=r[n],o=e["padding-"+i];t[i]=h(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,l=h(r.width),s=h(r.height);if("border-box"===r.boxSizing&&(Math.round(l+o)!==t&&(l-=p(r,"left","right")+o),Math.round(s+a)!==n&&(s-=p(r,"top","bottom")+a)),!function(e){return e===u(e).document.documentElement}(e)){var c=Math.round(l+o)-t,d=Math.round(s+a)-n;1!==Math.abs(c)&&(l-=c),1!==Math.abs(d)&&(s-=d)}return v(i.left,i.top,l,s)}var m="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof u(e).SVGGraphicsElement}:function(e){return e instanceof u(e).SVGElement&&"function"==typeof e.getBBox};function g(e){return r?m(e)?function(e){var t=e.getBBox();return v(0,0,t.width,t.height)}(e):C(e):f}function v(e,t,n,r){return{x:e,y:t,width:n,height:r}}var A=function(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=e};A.prototype.isActive=function(){var e=g(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},A.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e};var y=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return d(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}(t);d(this,{target:e,contentRect:n})},w=function(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r};w.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new A(e)),this.controller_.addObserver(this),this.controller_.refresh())}},w.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},w.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},w.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},w.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new y(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},w.prototype.clearActive=function(){this.activeObservations_.splice(0)},w.prototype.hasActive=function(){return this.activeObservations_.length>0};var b="undefined"!=typeof WeakMap?new WeakMap:new n,E=function(e){if(!(this instanceof E))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=c.getInstance(),n=new w(e,t,this);b.set(this,n)};["observe","unobserve","disconnect"].forEach(function(e){E.prototype[e]=function(){return(t=b.get(this))[e].apply(t,arguments);var t}});var M=void 0!==i.ResizeObserver?i.ResizeObserver:E;t.default=M}.call(this,n(13))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SvgArrows=void 0;var i=r(n(0)),o=n(15),a=r(n(17)),l=n(3),s=function(e){var t,n,r=e.style||{},s=r.startMarker||e.startMarker,c=null===(n=null!==(t=r.endMarker)&&void 0!==t?t:e.endMarker)||void 0===n||n,d=(0,l.createShapeObj)(r,e.endShape),u=e.domAttributes,f=e.cursor,h=e.hitSlop,p=r.strokeColor||e.strokeColor,C=r.strokeWidth||e.strokeWidth,m=r.strokeDasharray||e.strokeDasharray,g=!(!r.noCurves&&!e.noCurves),v=r.lineStyle||e.lineStyle||(g?"angle":"curve"),A=e.offset||0,y=e.source.anchor,w=(0,o.getPointCoordinatesFromAnchorPosition)(e.source.anchor,e.source.id,e.parentCoordinates,e.refs),b=e.target.anchor,E=(0,o.getPointCoordinatesFromAnchorPosition)(e.target.anchor,e.target.id,e.parentCoordinates,e.refs);return w?E?i.default.createElement(a.default,{className:e.className,startingPoint:w,startingAnchorOrientation:y,endingPoint:E,endingAnchorOrientation:b,strokeColor:p,strokeWidth:C,strokeDasharray:m,arrowLabel:e.label,arrowMarkerId:(0,l.getMarkerId)(e.uniqueId,e.source,e.target),lineStyle:v,offset:A,enableStartMarker:!!s,disableEndMarker:!c,endShape:d,domAttributes:u,hitSlop:h,cursor:f}):(console.warn("[React Archer] Could not find target element! Not drawing the arrow."),null):(console.warn("[React Archer] Could not find starting point of element! Not drawing the arrow."),null)};t.SvgArrows=function(e){var t=(0,o.getPointFromElement)(e.parentCurrent);return t?i.default.createElement(i.default.Fragment,null,(0,l.getSourceToTargets)(e.sourceToTargetsMap).map(function(n){return i.default.createElement(s,{key:JSON.stringify({source:n.source,target:n.target}),source:n.source,target:n.target,className:n.className,label:n.label,style:n.style||{},domAttributes:n.domAttributes,hitSlop:n.hitSlop,cursor:n.cursor,startMarker:e.startMarker,endMarker:e.endMarker,endShape:e.endShape,strokeColor:e.strokeColor,strokeWidth:e.strokeWidth,strokeDasharray:e.strokeDasharray,noCurves:e.noCurves,lineStyle:e.lineStyle,offset:e.offset,parentCoordinates:t,refs:e.refs,uniqueId:e.uniqueId})})):null}},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getPointCoordinatesFromAnchorPosition=t.getPointFromElement=void 0;var i=r(n(16));function o(e){return new i.default(e.left,e.top)}var a=function(e){return e?e.getBoundingClientRect():null};t.getPointFromElement=function(e){var t=a(e);return t?o(t):null},t.getPointCoordinatesFromAnchorPosition=function(e,t,n,r){var l=a(r[t]);if(!l)return null;var s=function(e,t){switch(e){case"top":return o(t).add(new i.default(t.width/2,0));case"bottom":return o(t).add(new i.default(t.width/2,t.height));case"left":return o(t).add(new i.default(0,t.height/2));case"right":return o(t).add(new i.default(t.width,t.height/2));case"middle":return o(t).add(new i.default(t.width/2,t.height/2));default:return console.error("[React Archer] Invalid anchor position was provided. Not drawing the arrow."),null}}(e,l);return s?s.substract(n):null}},function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.x=t,this.y=n}return function(e,t){t&&r(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1})}(e,[{key:"add",value:function(t){return new e(this.x+t.x,this.y+t.y)}},{key:"substract",value:function(t){return new e(this.x-t.x,this.y-t.y)}}]),e}();t.default=i},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.computeLabelDimensions=t.computeEndingAnchorPosition=t.computeStartingAnchorPosition=t.computeArrowPointAccordingToArrowHead=void 0;var i=r(n(0)),o=n(18);function a(e,t,n,r,i,a,l,s){var c=(0,o.computeArrowDirectionVector)(i),d=c.arrowX,u=c.arrowY;if("straight"===a&&void 0!==l&&void 0!==s){var f=Math.atan2(s-t,l-e);d=Math.cos(f),u=Math.sin(f)}return{xPoint:e+d*n*r/2,yPoint:t+u*n*r/2}}function l(e,t,n,r,i){return"top"===i||"bottom"===i?{xAnchor1:e,yAnchor1:t+(r-t)/2}:"left"===i||"right"===i?{xAnchor1:e+(n-e)/2,yAnchor1:t}:{xAnchor1:e,yAnchor1:t}}function s(e,t,n,r,i){return"top"===i||"bottom"===i?{xAnchor2:n,yAnchor2:r-(r-t)/2}:"left"===i||"right"===i?{xAnchor2:n-(n-e)/2,yAnchor2:r}:{xAnchor2:n,yAnchor2:r}}function c(e,t,n,r){return{xLabel:n>e?e:n,yLabel:r>t?t:r,labelWidth:Math.max(Math.abs(n-e),1),labelHeight:Math.max(Math.abs(r-t),1)}}t.computeArrowPointAccordingToArrowHead=a,t.computeStartingAnchorPosition=l,t.computeEndingAnchorPosition=s,t.computeLabelDimensions=c,t.default=function(e){var t=e.className,n=e.startingPoint,r=e.startingAnchorOrientation,o=e.endingPoint,d=e.endingAnchorOrientation,u=e.strokeColor,f=e.strokeWidth,h=e.strokeDasharray,p=e.arrowLabel,C=e.arrowMarkerId,m=e.lineStyle,g=e.offset,v=e.enableStartMarker,A=e.disableEndMarker,y=e.endShape,w=e.domAttributes,b=e.hitSlop,E=void 0===b?10:b,M=e.cursor,x=void 0===M?"pointer":M,L=y.circle?2*y.circle.radius:2*y.arrow.arrowLength,H=a(n.x,n.y,v?L:0,f,r,m,o.x,o.y),k=H.xPoint,V=H.yPoint,S=a(o.x,o.y,A?0:L,f,d,m,n.x,n.y),O=S.xPoint,z=S.yPoint,N=l(k,V,O,z,r),I=N.xAnchor1,T=N.yAnchor1,D=s(k,V,O,z,d),Z=function(e){var t=e.xStart,n=e.yStart,r=e.xAnchor1,i=e.yAnchor1,o=e.xAnchor2,a=e.yAnchor2,l=e.xEnd,s=e.yEnd,c=e.lineStyle,d=e.offset;if(d&&0!==d){var u="straight"===c?Math.atan2(s-n,l-t):Math.atan2(i-n,r-t),f=d*Math.cos(u),h=d*Math.sin(u);"straight"!==c&&(t+=f,n+=h),l-=f,s-=h}var p="M".concat(t,",").concat(n," ");return["curve","angle"].includes(c)&&(p+="".concat("curve"===c?"C":"").concat(r,",").concat(i," ").concat(o,",").concat(a," ")),p+"".concat(l,",").concat(s)}({xStart:k,yStart:V,xAnchor1:I,yAnchor1:T,xAnchor2:D.xAnchor2,yAnchor2:D.yAnchor2,xEnd:O,yEnd:z,lineStyle:m,offset:g}),_=c(k,V,O,z),R=_.xLabel,j=_.yLabel,B=_.labelWidth,P=_.labelHeight,F="url(#".concat(C,")");return i.default.createElement("g",{className:t},i.default.createElement("path",{d:Z,style:{fill:"none",stroke:u,strokeWidth:f,strokeDasharray:h},markerStart:v?F:void 0,markerEnd:A?void 0:F}),w&&i.default.createElement("path",Object.assign({d:Z,style:{fill:"none",stroke:"rgba(0, 0, 0, 0)",strokeWidth:E,cursor:w?x:"initial",pointerEvents:"all"}},w)),p&&i.default.createElement("foreignObject",{x:R,y:j,width:B,height:P,style:{overflow:"visible",pointerEvents:"none"}},i.default.createElement("div",{style:{position:"absolute",left:"50%",top:"50%",transform:"translateX(-50%) translateY(-50%)",pointerEvents:"all"}},i.default.createElement("div",null,p))))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.computeArrowDirectionVector=void 0,t.computeArrowDirectionVector=function(e){switch(e){case"left":return{arrowX:-1,arrowY:0};case"right":return{arrowX:1,arrowY:0};case"top":return{arrowX:0,arrowY:-1};case"bottom":return{arrowX:0,arrowY:1};default:return{arrowX:0,arrowY:0}}}},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowMarkers=void 0;var i=r(n(0)),o=n(4),a=n(3),l=function(e,t){return function(){var n,r,a,l,s,c,d,u,f,h,p,C,m=(null===(r=null===(n=e.endShape)||void 0===n?void 0:n.circle)||void 0===r?void 0:r.radius)||(null===(a=t.circle)||void 0===a?void 0:a.radius)||o.endShapeDefaultProp.circle.radius,g=(null===(s=null===(l=e.endShape)||void 0===l?void 0:l.circle)||void 0===s?void 0:s.strokeWidth)||(null===(c=t.circle)||void 0===c?void 0:c.strokeWidth)||o.endShapeDefaultProp.circle.strokeWidth,v=(null===(u=null===(d=e.endShape)||void 0===d?void 0:d.circle)||void 0===u?void 0:u.strokeColor)||(null===(f=t.circle)||void 0===f?void 0:f.strokeColor)||o.endShapeDefaultProp.circle.strokeColor,A=(null===(p=null===(h=e.endShape)||void 0===h?void 0:h.circle)||void 0===p?void 0:p.fillColor)||(null===(C=t.circle)||void 0===C?void 0:C.fillColor)||o.endShapeDefaultProp.circle.fillColor;return{markerWidth:4*m,markerHeight:4*m,refX:2*m+g,refY:2*m,path:i.default.createElement("circle",{cx:2*m,cy:2*m,r:m,fill:A,stroke:v,strokeWidth:g})}}},s=function(e,t,n){return function(){var r,a,l,s,c,d,u,f,h=e.strokeColor||n,p=null!==(c=null!==(l=null===(a=null===(r=e.endShape)||void 0===r?void 0:r.arrow)||void 0===a?void 0:a.arrowLength)&&void 0!==l?l:null===(s=null==t?void 0:t.arrow)||void 0===s?void 0:s.arrowLength)&&void 0!==c?c:o.endShapeDefaultProp.arrow.arrowLength,C=(null===(u=null===(d=e.endShape)||void 0===d?void 0:d.arrow)||void 0===u?void 0:u.arrowThickness)||(null===(f=null==t?void 0:t.arrow)||void 0===f?void 0:f.arrowThickness)||o.endShapeDefaultProp.arrow.arrowThickness,m="M0,0 L0,".concat(C," L").concat(p,",").concat(C/2," z");return{markerWidth:p,markerHeight:C,refX:0,refY:C/2,path:i.default.createElement("path",{d:m,fill:h})}}};t.ArrowMarkers=function(e){var t=e.sourceToTargetsMap,n=e.endShape,r=e.strokeColor,o=e.uniqueId;return i.default.createElement(i.default.Fragment,null,(0,a.getSourceToTargets)(t).map(function(e){var t=e.source,c=e.target,d=e.style,u=function(e){var t=e.style,n=e.strokeColor,r=e.endShape,i=(0,a.getEndShapeFromStyle)(t);return{circle:l(t,r),arrow:s(t,r,n)}[i]()}({style:void 0===d?{}:d,endShape:n,strokeColor:r}),f=u.markerHeight,h=u.markerWidth,p=u.path,C=u.refX,m=u.refY;return i.default.createElement("marker",{id:(0,a.getMarkerId)(o,t,c),key:(0,a.getMarkerId)(o,t,c),markerWidth:h,markerHeight:f,refX:C,refY:m,orient:"auto-start-reverse",markerUnits:"strokeWidth"},p)}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.useResizeListener=t.useObserveElements=void 0;var r=n(0);t.useObserveElements=function(e,t){(0,r.useEffect)(function(){return Object.keys(e).map(function(n){t.observe(e[n])}),function(){Object.keys(e).map(function(n){t.unobserve(e[n])})}},[e,t])},t.useResizeListener=function(e){(0,r.useEffect)(function(){return window&&window.addEventListener("resize",e),function(){window&&window.removeEventListener("resize",e)}},[e])}}]))),xk.exports);const kk=({getChildNodeComponent:r,parentNodeIndex:i,parentNodeData:o,verticalLineHeight:a,datasetHeight:l,curveHeights:s,itemRefs:c,datasetRef:d,isReadOnlyMode:u,hideNodeAtLast:f})=>e(t,{children:0===o?.machineInstances?.length?e(t,{children:!u&&n(t,{children:[e("div",{className:"ff-selectedMachines-connecting-line",children:n("div",{className:"ff-line",children:[e("div",{className:"ff-left-icon ff-left-icon-aligned"}),e("div",{className:"ff-right-icon"})]})}),e("div",{className:"ff-machine-instance ff-machine-env-button",children:r({isButton:!0,parentNodeData:o,parentNodeIndex:i})})]})}):o?.machineInstances?.map((h,p)=>{const C=0===p;return n("div",{className:"ff-machine-instance-row",children:[n("div",{className:"ff-selectedMachines-connecting-line "+(C?"":"ff-second-line"),children:[n("div",{className:"ff-line",children:[e("div",{className:"ff-left-icon "+(C?"ff-left-icon-aligned":"")}),e("div",{className:"ff-right-icon"})]}),C&&e("div",{className:"ff-vertical-line",style:{height:`${a}px`}})]}),e("div",{className:"ff-machine-instance",children:h?.runLevelExecutionDataSets?.map((a,u)=>e("div",{className:"ff-run-level-execution-dataset",ref:0===u?d:null,children:n("div",{className:"ff-execution-item",ref:e=>c.current[u]=e,children:[e("div",{className:"ff-curved-connector",style:{top:-l+"px"},children:n("div",{className:`ff-curve ff-connector-${u}`,style:{height:`${s[u]}px`},children:[e("div",{className:`ff-curve-right-icon ff-curve-right-icon-${u}`}),Number(h?.runScriptCount)?e("div",{className:"ff-selectedMachines-connecting-line-text",children:e(q,{fontSize:8,fontWeight:"regular",children:`${[0,"0",null].includes(h.runScriptCount)?"":h.runScriptCount} Script${1!==h.runScriptCount?"s":""}`})}):e(t,{})]})}),e("div",{className:"ff-run-data-box",children:r({isButton:!1,childNodeData:h,childNodeIndex:p,runLevelExecutionDataSet:a,runLevelExecutionDataSetIndex:u,parentNodeData:o,parentNodeIndex:i})})]})},a?.runLevelExecutionDataSetId))}),p===o?.machineInstances.length-1&&!f&&e(t,{children:!u&&n(t,{children:[e("div",{className:"ff-selectedMachines-connecting-line ff-second-line",children:n("div",{className:"ff-line",children:[e("div",{className:"ff-left-icon"}),e("div",{className:"ff-right-icon"})]})}),e("div",{className:"ff-machine-instance ff-machine-env-button",children:r({isButton:!0,parentNodeData:o,parentNodeIndex:i,childNodeIndex:p+1})})]})})]},p)})}),Vk=({data:t,noOfScripts:r,getChildNodeComponent:o,getParentNodeComponent:s,getParentNodeComponentActionItems:d,childNodeCurveHeight:u=1.28,isReadOnlyMode:f=!1,hideNodeAtLast:h=!0})=>{const p=a(null),[C,m]=c(0),[g,v]=c([]),A=a([]);l(()=>{p.current&&m(p.current.offsetHeight)},[t]);l(()=>{(()=>{const e=A.current.map((e,t)=>0===t?0:C*u);v(e)})()},[C,t]);const y=e=>1+(e.machineInstances?.length+1||0);let w=1;const b=t?.machines?.selectedMachines.reduce((e,t)=>f&&h?e+(e=>!e?.machineInstances||G(e.machineInstances)?1:e.machineInstances.length)(t):e+y(t),0),E=Math.round(b/2);let M=1===E&&f&&2===b||1===E&&!f&&2===b;return e("div",{className:"connecting-branch-container",children:e(Hk.ArcherContainer,{strokeColor:"var(--brand-color)",strokeWidth:1,startMarker:!0,endMarker:!1,noCurves:!0,children:n("div",{className:"ff-connecting-branch-grid-container",children:[e(Hk.ArcherElement,{id:"rootNode",children:e("div",{className:"ff-grid-item ff-dynamic-item",style:{gridRow:E,top:M?"44px":""},children:e("div",{className:"ff-script-count-container",children:n("div",{className:"ff-script-count-box",children:[e(q,{children:r}),e(q,{children:"Scripts"})]})})})}),t?.machines?.selectedMachines.map((t,r)=>{const a=w,l=y(t);w+=l;const c=((e,t,n)=>1===e.length&&(f||h)?0:e.reduce((t,n,r)=>t+((r!==e.length-1||!f&&!h)&&n.runLevelExecutionDataSets?.length||0),0)*(t+n))(t?.machineInstances,C,16);return e(i.Fragment,{children:n("div",{className:"ff-selectedMachines",style:{gridRow:`${a} / span ${l}`},children:[e("div",{className:"ff-selectedMachines-input",children:n("div",{className:"ff-input-box-container "+(t?.machineInstances.length?"":"ff-input-box-aligned"),children:[e(Hk.ArcherElement,{id:`parentnode${r}`,relations:[{targetId:"rootNode",targetAnchor:"left",sourceAnchor:"left"}],children:s({isMultiSelect:!1,parentNodeData:t,parentNodeIndex:r})}),d({parentNodeData:t,parentNodeIndex:r})]})}),e(kk,{parentNodeIndex:r,parentNodeData:t,verticalLineHeight:c,datasetHeight:C,curveHeights:g,itemRefs:A,datasetRef:p,getChildNodeComponent:o,isReadOnlyMode:f,hideNodeAtLast:h})]})},r)}),!f&&e("div",{className:"ff-select-machine-input",style:{gridRow:`${w}`},children:e(Hk.ArcherElement,{id:"lastNode",relations:[{targetId:"rootNode",targetAnchor:"left",sourceAnchor:"left"}],children:e("div",{children:s({isMultiSelect:!0})})})})]})})})},Sk=(e,t)=>{if(!(e&&e instanceof Blob))throw console.error("Invalid Blob object"),new Error("Invalid Blob object");const n=window.navigator;if(n.msSaveOrOpenBlob){const r=n.msSaveOrOpenBlob;r&&r(e,t)}else{const n=document.createElement("a");document.body.appendChild(n);const r=window.URL.createObjectURL(e);n.href=r,n.download=t,n.click(),setTimeout(()=>{window.URL.revokeObjectURL(r),document.body.removeChild(n)},0)}},Ok=({hasAtSymbol:t,usersObj:n,optionClicked:r,charsAfterAt:i,mentionUserRef:o})=>{const[s,d]=c(0),u=a([]);if(!t)return null;const f=n.filter(e=>!i||e.name.toLowerCase().startsWith(i.toLowerCase()));l(()=>{d(0)},[i]);const h=p(e=>{if(t&&0!==f.length)switch(e.key){case"ArrowDown":e.preventDefault(),d(e=>(e+1)%f.length);break;case"ArrowUp":e.preventDefault(),d(e=>0===e?f.length-1:e-1);break;case"Enter":e.preventDefault();const t=f[s];t&&r(t.name,t.emailId)}},[f,s,t,r]);return l(()=>{u.current[s]&&u.current[s]?.scrollIntoView({behavior:"smooth",block:"nearest"})},[s]),l(()=>(document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)),[h]),e("div",{className:"select-section",onMouseDown:e=>e.preventDefault(),children:e("div",{className:"select-group",ref:o,children:f.length?f.map((t,n)=>e("div",{ref:e=>u.current[n]=e,className:"mention-option "+(n===s?"hovered":""),onClick:()=>r(t.name,t.emailId),onMouseDown:e=>e.preventDefault(),children:e(q,{children:t.name})},t.id)):e("div",{className:"user-not-found",children:e(q,{children:"No user name found"})})})})},zk=e=>e&&Array.isArray(e)?e.map(({user:e})=>({id:e.id,name:e.name,emailId:e.emailId})):[],Nk=(e,t)=>{const n=t.find(t=>`@${t.name.replace(/\s+/g,"")}`===e);return n?n.emailId:null},Ik=({handleInsertNode:t,handleEditNode:r,handleDeleteNode:i,comment:o,depth:s=0,isDisable:d,userDetails:u,isEditDeleteActionAllowed:h=!0,createdByID:p,rowBreakCharCount:C=83,isVewMode:m=!1,deleteEnable:g=!0})=>{const[v,A]=c(""),[y,w]=c(!1),[b,E]=c(!1),[M,x]=c(!0),[L,H]=c([]),[k,V]=c(!1),[S,O]=c([]),[z,N]=c({top:0,left:0}),[I,T]=c(""),D=a(null),Z=a(null),_=a(null);l(()=>{y&&o?.description&&A(o?.description)},[y,o.description]),l(()=>{const e=zk(u);H(e)},[u]),l(()=>{const e=(v.match(Qr)||[]).map(e=>Nk(e,L)).filter(Boolean);O(e)},[v]),l(()=>{const e=e=>{const t=Z.current&&!Z.current.contains(e.target)&&D.current&&!D.current.contains(e.target),n=_.current&&!_.current.contains(e.target)&&D.current&&!D.current.contains(e.target);(t||n)&&(V(!1),A(e=>e.replace(/(?:^|\s)(@\w*)$/,"")))};return k&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[k]);const{modifiedByUname:R,createdByUname:j,modifiedOn:B,createdOn:P}=o||{},U=B??P??(new Date).toLocaleString(),W=R??j??"Anonymous",X=s>2,Q=W?W.charAt(0).toUpperCase():"A";l(()=>{y&&o.description&&A(o.description)},[y,o.description]);const G=()=>{0!==v.trim().length&&(y?(r(o.id,v,S),E(!1),A("")):(x(!0),t(o.id,v,S),E(!1),A("")),y&&w(!1))};l(()=>{(()=>{if(!D.current)return;const e=D?.current,t=y?Z?.current:_?.current,n=D.current.selectionStart,r=((e,t)=>{const n=document.createElement("div"),r=getComputedStyle(e);n.style.cssText=`\n position: absolute;\n visibility: hidden;\n white-space: pre-wrap;\n word-wrap: break-word;\n overflow: auto;\n width: ${e.offsetWidth}px;\n height: ${e.offsetHeight}px;\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n padding: ${r.padding};\n border: ${r.border};\n box-sizing: ${r.boxSizing};\n line-height: ${r.lineHeight};\n `,n.scrollTop=e.scrollTop,n.scrollLeft=e.scrollLeft,document.body.appendChild(n);const i=e.value.slice(0,t);n.textContent=i||".";const o=document.createElement("span");o.textContent=".",n.appendChild(o);const a=o.getBoundingClientRect();return document.body.removeChild(n),{top:a.top-20,left:a.left}})(e,n),i=t?.getBoundingClientRect().height??0,o=e?.getBoundingClientRect();if(!o)return;const a=window.innerHeight-o.bottom,l=o.top;N({top:a<i&&l>i?n-i-16:n+32,left:r.left+10})})()},[v]);const Y=e=>{const t=e.target.value;A(t);const n=(t.match(/@\S+/g)||[]).map(e=>Nk(e,L)).filter(e=>null!==e);O(n);const r=e.target.selectionStart,i=t.slice(0,r),o=i.match(ti);T(o?.[1]||"");const a=ei.test(i);V(!!a)},J=e=>{if("@"===e.key)V(!0);else if("Backspace"===e.key&&D.current){const t=D.current.selectionStart,n=v.slice(0,t);n.endsWith("@")&&V(!1);const r=n.match(Yr);if(r){e.preventDefault();const i=r[1],o=n.lastIndexOf(i||""),a=v.slice(0,o)+v.slice(t);A(a),V(!1),O(()=>(a.match(/@\w+/g)||[]).map(e=>e.slice(1)).map(e=>Nk(e,L)).filter(Boolean)),setTimeout(()=>{D.current?.setSelectionRange(o,o)},0)}}},$=e=>{if(!D.current)return;const t=D.current.selectionStart,n=v.slice(0,t),r=n.match(Gr);if(r){const i=n.lastIndexOf(r[1]||""),o=v.slice(t),a=`@${e.replace(/\s+/g,"")} `,l=v.slice(0,i)+a+o;A(l),V(!1),setTimeout(()=>{D.current?.focus(),D.current?.setSelectionRange(i+a.length+1,i+a.length+1)},0),O(()=>(l.match(/@\w+/g)||[]).map(e=>e.slice(1)).map(e=>Nk(e,L)).filter(Boolean))}};return e("div",{className:"commentsContainer",children:n("div",{className:"comment-wrapper",children:[n("div",{className:"commentContainer",children:[e("div",{className:"commentContainer__avatar",children:o?.profileImage?e("img",{height:30,width:30,src:`data:image/jpeg;base64,${o?.profileImage}`}):Q}),n("div",{className:"ff-message-container",children:[n("div",{className:"ff-message",children:[e("div",{className:"ff-message-name",children:W}),e("div",{className:"ff-message-time",children:U})]}),n("div",{className:"ff-editable-container",children:[!y&&e(q,{className:"typography-text",children:o?.description?.split(ni).map((t,n)=>t.startsWith("@")?e("b",{children:t},`highlight-${n}`):e(f,{children:t},`text-${n}`))}),y&&n("div",{className:"inputContainer",children:[e("textarea",{rows:v.length<C?1:3,className:"inputContainer_input first_input",value:v,autoFocus:!0,placeholder:"Edit comment",ref:D,onChange:e=>Y(e),onKeyDown:J}),k&&e("div",{id:"mention-user",style:{position:"absolute",top:`${z.top}px`,left:`${z.left}px`},children:e(Ok,{hasAtSymbol:k,usersObj:L,optionClicked:$,charsAfterAt:I,mentionUserRef:Z})}),n("div",{className:"edit-comment",children:[e("div",{className:"reply",children:e(K,{title:y?"Update":"Add",children:e(F,{name:"comment_reply",hoverEffect:!0,disabled:y&&v.trim()===(o?.description?.trim()??"")||0===v.trim().length,onClick:()=>{G(),w(!1),E(!1)}})})}),e("div",{className:"reply",onClick:()=>{w(!1),E(!1),A("")},children:e(K,{title:y?"Cancel":"Close",children:e(F,{name:"close",color:"var(--ff-delete-button-attachment)",hoverEffect:!0})})})]})]}),n("div",{className:"comment-actions",children:[!X&&s<2&&o.comments?.length>0&&e("div",{className:"action-icon",onClick:()=>x(e=>!e),children:e(K,{title:""+(M?"collapse":"expand"),children:e(F,{name:M?"collapse-arrow":"expand-arrow",disabled:y||b,hoverEffect:!0})})}),!X&&s<2&&0===o.comments?.length&&e("div",{className:"action-icon",children:e(F,{name:"expand-arrow",disabled:!0})}),!m&&n("div",{className:"ff-comment-action-item",children:[s<2&&e("div",{className:"action-icon",children:e(K,{title:"Reply",children:e(F,{name:"comment_icon",disabled:y||d,hoverEffect:!0,onClick:()=>{E(!0)}})})}),h&&e("div",{className:"action-icon",children:e(K,{title:"Edit",children:e(F,{name:"edit",disabled:b||d,hoverEffect:!0,onClick:()=>w(!0)})})}),h&&g&&e("div",{className:"action-icon",children:e(K,{title:"Delete",children:e(F,{name:"delete",color:"var(--ff-delete-button-attachment)",onClick:()=>{b||i(o.id)},disabled:y||b||d,hoverEffect:!0})})})]})]})]})]})]}),e("div",{className:"comment-reply-container",children:b&&n("div",{className:"inputContainer",children:[e("textarea",{rows:v.length<C?1:3,className:"inputContainer_input first_input",value:v,autoFocus:!0,placeholder:"Add reply comments",ref:D,onChange:e=>Y(e),onKeyDown:J}),k&&e("div",{id:"mention-user",style:{position:"absolute",top:`${z.top}px`,left:`${z.left}px`},children:e(Ok,{hasAtSymbol:k,usersObj:L,optionClicked:$,charsAfterAt:I,mentionUserRef:_})}),n("div",{className:"edit-comment",children:[e("div",{className:"reply",onClick:()=>{G(),w(!1),E(!1)},children:e(K,{title:"Reply",children:e(F,{name:"comment_reply",hoverEffect:!0,disabled:Boolean(!v.length)})})}),e("div",{className:"reply",onClick:()=>{w(!1),E(!1),A("")},children:e(K,{title:"Cancel",children:e(F,{name:"close",color:"var(--ff-delete-button-attachment)",hoverEffect:!0})})})]})]})}),M&&o.comments?.length>0&&e("div",{className:`child-comments ${0===s?"first-level-child":""} ${1===s?"second-level-child":""}`,children:o.comments.map(n=>e("div",{className:`child-comments child-comments-${s+1}`,children:e(Ik,{handleInsertNode:t,handleEditNode:r,handleDeleteNode:i,comment:n,depth:s+1,isDisable:d,userDetails:u,isEditDeleteActionAllowed:o.createdBy===p,createdByID:p,isVewMode:m})},n.id))})]})})},Tk=({commentsData:t,handleAddComment:r,handleEditComment:i,handleDeleteComment:o,onCommentsDataChange:s,currentUser:d,isDisable:u=!1,userDetails:f,createdByID:h,rowBreakCharCount:C=83,isVewMode:m=!1,deleteEnable:g=!0,showTextarea:v=!1,autoFocus:A=!1})=>{const[y,w]=c(""),[b,E]=c([]),[M,x]=c(!1),[L,H]=c([]),[k,V]=c({top:0,left:0}),[S,O]=c(""),z=a(null),N=a(null),[I,T]=c(!1);l(()=>{const e=zk(f);H(e)},[f]);const D=(e,t)=>{for(const n of e){if(n.id===t)return n;const e=D(n.comments,t);if(e)return e}return null};l(()=>{t&&E(t)},[t]),l(()=>{const e=e=>{N.current&&!N.current.contains(e.target)&&(x(!1),w(e=>{const t=e.split(" ");return t.length>0&&t?.[t?.length-1]?.startsWith("@")?t.slice(0,-1).join(" "):e}))};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]);const{insertNode:Z,editNode:_,deleteNode:R}=(()=>{const e=(t,n,r)=>t.map(t=>t.id===n?{...t,comments:[...t.comments,{id:pi(),description:r.description,comments:[],createdBy:t.createdBy,modifiedBy:t.modifiedBy,createdByUname:t.createdByUname,modifiedByUname:t.modifiedByUname,createdOn:(new Date).toLocaleString(),modifiedOn:(new Date).toLocaleString(),commentParentId:n}]}:{...t,comments:e(t.comments,n,r)}),t=(e,n,r)=>e.map(e=>({...e,description:e.id===n?r:e.description,comments:t(e.comments,n,r)})),n=(e,t)=>e.filter(e=>e.id!==t).map(e=>({...e,comments:n(e.comments,t)}));return{insertNode:e,editNode:t,deleteNode:n}})(),j=(e,t,n)=>{if(!t.trim())return;const i={id:pi(),description:t,commentParentId:e,emailId:n,comments:[],createdBy:d?.createdBy,modifiedBy:d?.modifiedBy,createdByUname:d?.createdByUname,modifiedByUname:d?.modifiedByUname,createdOn:(new Date).toISOString(),modifiedOn:(new Date).toISOString()};E(t=>Z(t,e,i)),r&&r(i,D(b,e))},B=p((e,t,n)=>{const r=_(b,e,t);E(r);const o=D(r,e);i&&i(e,t,o,n)},[b,_,i]),P=p(async e=>{try{if(o){const t=await o(e);if(t?.success){const t=R(b,e);E(t)}}}catch(e){console.error("Error deleting comment:",e)}},[R,o]);l(()=>{s&&s(b)},[b,s]);l(()=>{(()=>{if(!z.current)return;const e=z?.current,t=N?.current,n=z.current.selectionStart,r=((e,t)=>{const n=document.createElement("div"),r=getComputedStyle(e);n.style.cssText=`\n position: absolute;\n visibility: hidden;\n white-space: pre-wrap;\n word-wrap: break-word;\n overflow: auto;\n width: ${e.offsetWidth}px;\n height: ${e.offsetHeight}px;\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n padding: ${r.padding};\n border: ${r.border};\n box-sizing: ${r.boxSizing};\n line-height: ${r.lineHeight};\n `,n.scrollTop=e.scrollTop,n.scrollLeft=e.scrollLeft,document.body.appendChild(n);const i=e.value.slice(0,t);n.textContent=i||".";const o=document.createElement("span");o.textContent=".",n.appendChild(o);const a=o.getBoundingClientRect();return document.body.removeChild(n),{top:a.top,left:a.left}})(e,n),i=t?.getBoundingClientRect().height??0,o=e?.getBoundingClientRect();if(!o)return;const a=window.innerHeight-o.bottom,l=o.top;V({top:a<i&&l>i?n-i-16:n+32,left:r.left+10})})()},[y]);l(()=>{y.includes("\n")||T(!1)},[y]);return n("div",{className:"ff-comments-container-box",children:[!m&&n("div",{className:"ff-first-comment "+(v?"no-border":""),children:[e(q,{fontWeight:"semi-bold",className:"ff-comment-heading",children:"Comments"}),!v&&n("div",{className:"input-wrapper",children:[e("textarea",{className:"inputContainer_input first_input",rows:I?3:y.length<C?1:3,autoFocus:A,value:y,onChange:e=>(e=>{const t=e.target.value;w(t);const n=e.target.selectionStart,r=t.slice(0,n),i=r.match(ti);O(i?.[1]||"");const o=ei.test(r);x(!!o),t||T(!1)})(e),placeholder:"Add a comment",disabled:u,ref:z,onKeyDown:e=>{if("@"===e.key)x(!0);else if("Backspace"===e.key&&z.current){const t=z.current.selectionStart;if(y.slice(0,t).endsWith("@")&&x(!1),M){e.preventDefault();const n=y.slice(0,t-1)+y.slice(t);w(n);const r=t-1,i=n.slice(0,r).match(ti);O(i?.[1]||""),x(!!i),setTimeout(()=>{z.current?.setSelectionRange(r,r)},0)}}"Enter"===e.key&&T(!0)}}),M&&e("div",{id:"mention-user",style:{position:"absolute",top:`${k.top}px`,left:`${k.left}px`},children:e(Ok,{hasAtSymbol:M,usersObj:L,optionClicked:e=>{if(!z.current)return;const t=z.current.selectionStart,n=y.slice(0,t),r=n.match(Kr);if(r){const i=n.lastIndexOf(r[1]??""),o=y.slice(t),a=`@${e} `,l=y.slice(0,i)+a+o;w(l),x(!1),setTimeout(()=>{z.current?.focus();const e=i+a.length+1;z.current?.setSelectionRange(e,e)},0)}},charsAfterAt:S,mentionUserRef:N})}),e("span",{className:"reply-comment",children:e(K,{title:"Add",children:e(F,{name:"comment_reply",onClick:()=>{if(!y.trim())return;const e=L.filter(e=>new RegExp(`@${e.name}\\b`,"i").test(y)).map(e=>e.emailId),t={id:pi(),description:y,comments:[],createdBy:d?.createdBy,modifiedBy:d?.modifiedBy,createdByUname:d?.createdByUname,modifiedByUname:d?.modifiedByUname,createdOn:(new Date).toISOString(),modifiedOn:(new Date).toISOString(),commentParentId:"",emailId:e};r&&r(t,null),E(e=>[...e,t]),w("")},hoverEffect:!0,disabled:Boolean(!y.length)})})})]})]}),b.length>0&&b.map(t=>e(Ik,{handleInsertNode:j,handleEditNode:B,handleDeleteNode:P,comment:t,depth:0,isDisable:u,userDetails:f,isEditDeleteActionAllowed:t.createdBy===h,createdByID:h,isVewMode:m,deleteEnable:g},t.id))]})},Dk=()=>{const e=a(!0);return{canTrigger:()=>e.current,setTriggered:()=>{e.current=!1},resetTrigger:()=>{e.current=!0}}},Zk=({isOpen:t,onClose:r,onContinue:i,titleMessage:o="Warning!",subTitleMessage:a="Unsaved Changes.",iconName:l,modalMessage:s="Your web service data will be lost. Are you sure you want to exit?",firstButtonLabel:c="Cancel",secondButtonLabel:d="Continue",buttonVariant:u="warning",border:f="1px solid var(--warning-modal-border-color)",popupWidth:h="420",popupHeight:p="226",colorForTitleMessage:C="var(--status-button-bg-warning)",footerContent:m,firstButtonDisabled:g=!1,secondButtonDisabled:v=!1,zIndex:A=1100,iconSize:y=94})=>e(LC,{overlayClassName:"custom-overlay",isOpen:t,onClose:r,isHeaderDisplayed:!1,zIndex:A,children:n("div",{className:"warning_modal_container",children:[n("div",{className:"warning_modal_content",children:[e(F,{name:l,className:"warning_modal_icon",width:y,height:y}),n("div",{className:"warning_modal_message",children:[n(q,{fontSize:20,fontWeight:"semi-bold",className:"warning_modal_title_wrapper",children:[" ",n(q,{color:`${C}`,fontSize:20,fontWeight:"semi-bold",children:[" ",o," "]})," ",a]}),n("div",{className:"warning_modal_message_wrapper",children:[e(q,{fontSize:16,children:s}),e(q,{as:"div",children:m})]})]})]}),n("div",{className:"warning_modal_footer_button",children:[e(U,{buttonHeight:"24px",variant:"secondary",label:c,onClick:r,disabled:g}),d&&e(U,{buttonHeight:"24px",variant:u||"warning",label:d,onClick:i,disabled:v})]})]}),ariaHideApp:!0,isFooterDisplayed:!1,customWidth:`${h}px`,customHeight:`${p}px`,boxShadow:"0px 1px 4px 0px var(--toaster-boxshadow)",border:f});function _k(e,t=[]){return t.reduce((e,t)=>e.replace(new RegExp(function(e){return e.replace(Zr,"\\$&")}(t),"gi"),""),e).replace(/([A-Z])/g," $1").trim().replace(/^./,e=>e.toUpperCase())}function Rk(e,t=[]){return e.toUpperCase()===e&&(e=e.toLowerCase()),e.includes("_")?function(e){return e.toLowerCase().replace(/_/g," ").replace(/^./,e=>e.toUpperCase())}(e):_k(e,t)}const jk=({onSelectVariable:t,dropdownPosition:r,filteredOptions:i=[],position:o="relative",width:a="300px",zIndex:l=1e3,height:s="160px",truncateTextValue:c=34,isTruncateText:d=!1})=>n("div",{className:I("ff-variable-dropdown",o),style:r?{top:r.top+30,left:r.left-30,width:a,zIndex:l}:{width:a,zIndex:l,height:s},children:[i?.map(n=>{const r=d?xn(n?.name,c,"pixel"):n?.name,i=!!d&&Ln(n?.name,c,"pixel");return e("div",{className:"ff-variable-option",onClick:()=>t(n),children:d?e(K,{title:i?n?.name:"",children:e(q,{children:r})}):e(q,{children:r})},n?.id)}),0===i?.length&&e("div",{className:"ff-variable-option .ff-variable-option-no-data ",children:e(q,{as:"span",fontSize:14,children:"No Option"})})]}),Bk=o(({label:t="",hashInputValue:r="",setHashInputValue:i,variableList:o=[],addForloopPrefix:s=!1,placeholder:d="Enter text",onChange:u,onCreateVariableClick:f,value:h="",dropdownWidth:p="inherit",isHash:C=!1,dataFiles:m=[],showAddVariableIcon:g=!0,helperText:v="",error:A,autoComplete:y="off",showHidePasswordIcon:b=!0,required:E=!1,formProps:M={},onlyDropdown:x=!1,type:L,onFocus:H,onBlur:k,readOnly:V=!1,height:S="160px",truncateTextValue:O=34,isTruncateText:z=!1,...N},I)=>{const[T,D]=c(!1),[Z,_]=c(!1),[R,j]=c(!1),[B,P]=c(null),[U,W]=c(0),[X,Q]=c(!1),[Y,J]=c(!1),[$,ee]=c([]),te=a(null);w(I,()=>te.current),l(()=>{null!==B&&te.current&&(te.current.setSelectionRange(B,B),te.current.focus())},[B]),l(()=>{if(C?D(h.startsWith("#")):J(!h?.includes("$")),h.startsWith("#")&&C){const e=h.slice(1).toLowerCase(),t=m.filter(t=>t.name.toLowerCase().includes(e));ee(t),D(!0)}},[h]),l(()=>{if(!X&&x){const e=m.filter(e=>e.toLowerCase().includes(h.toLowerCase())).map((e,t)=>({id:t+1,name:e}));ee(e),D(e.length>0)}Q(!1)},[h]);const ne=()=>{te.current&&W(te.current.selectionStart||0)},re=ne,ie=ne;l(()=>{te.current&&W(te.current.selectionStart||0)},[h]);const oe=e=>{if(te.current){const{selectionStart:t,selectionEnd:n}=te.current,r=`{${"STEPGROUP"===e.parentVariableType?"SGV":"LOCAL"===e.type?"LV":"GLOBAL"===e.type?"GV":"GROUP"===e.type?"SGV":[String(e?._id??""),String(e?.id??"")].some(e=>e.includes("PARAMETER"))?"SGP":"_startforloop"===e.type?"FLV_for:":"DATAPROVIDER"===e.type?"DPV":"PEV"}${"_startforloop"===e?.type?"":"_"}${"DATAPROVIDER"===e?.type?e?.dpName+":"+e?.varname:e.name}}`;let o;if(o=C&&"#"===h[0]||x&&!e?.type?e.name+h.slice(n||1):h.slice(0,function(e,t){const n=e.lastIndexOf("$",t-1),r=e.indexOf("$",t);return-1===n&&-1===r?-1:-1===n?r:-1===r||Math.abs(t-n)<=Math.abs(r-t)?n:r}(h,U)||0)+"$"+r+h.slice(n||0),u){u({target:{value:o}},e)}te.current.value=o,i?.(e),P((t||0)+r.length),D(!1),Q(!0),_(!0)}};const ae=function(e,t,n){let r=!1,i="";const o="}"===h[t-1];if(t<0||t>e.length)return{showDropdown:r,searchString:i};const a=e.lastIndexOf("$",t-1),l=e.indexOf("$",t);if(-1!==a&&(t===a+1?(r=!0,i=""):(i=e.slice(a+1,-1===l?void 0:l),t>a+1&&(i=e.slice(a+1,t)),r=!0),Z&&o&&(r=!1),(/[{}]/.test(i)||0===t)&&(r=!1,i=""),i)){n.some(e=>("_startforloop"===e.type&&s?`FLV_for:${e.name}`:e.name).toLowerCase().includes(i.toLowerCase()))||(r=!1,i="")}return{showDropdown:r,searchString:i}}(h,U,o),[le,se]=c(!1);return n("div",{className:"ff-add-variable-container",children:[n("div",{className:"ff-add-variable-input",children:[e(xi,{readOnly:V,...N,name:"add_variable",ref:te,type:((e,t)=>"password"===e?t?"text":"password":e??"text")(L,le),value:h,onChange:u,variant:"primary",label:t,placeholder:d,onClick:re,onKeyUp:ie,onFocus:e=>{setTimeout(()=>{j(!0),H?.(e)},500)},onBlur:e=>{(e=>{e.relatedTarget&&e.relatedTarget.closest(".dropdown-container")||j(!1)})(e),k?.(e)},autoComplete:y,helperText:v,error:A,required:E,...M}),"password"===L&&b&&e(K,{title:le?"Hide":"Show",children:e(q,{as:"span",className:"ff-password-icon",children:e(F,{onClick:()=>{se(e=>!e)},name:le?"hide_access_icon":"view_access_icon",width:16,height:16,hoverEffect:!0})})}),!G(h)&&!C&&Y&&g&&e(K,{title:"Add Variable",children:e(F,{onClick:f,name:"add_variable",width:24,height:24,hoverEffect:!0})})]}),ae?.showDropdown&&R&&e(BM,{position:"absolute",width:p,optionsList:o.filter(e=>("_startforloop"===e.type&&s?`FLV_for:${e.name}`:e.name).toLowerCase().includes(ae?.searchString.toLowerCase())),onSelectVariable:oe,height:S}),T&&(C||x)&&e(jk,{position:"relative",width:p,filteredOptions:$,zIndex:2e3,onSelectVariable:oe,height:S,isTruncateText:z,truncateTextValue:O})]})}),Pk=(e,t)=>{const n=new Set;for(const r of e){const e=t?r[t]:JSON.stringify(r);if(n.has(e))return!0;n.add(e)}return!1};var Fk,qk;var Uk=(qk||(qk=1,Fk=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(e,t){e.exports=i},function(e,t,n){var r;
37
37
  /*!
38
38
  Copyright (c) 2017 Jed Watson.
39
39
  Licensed under the MIT License (MIT), see
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pixel-react",
3
3
  "description": "Great for pixel-perfect, design-focused components in React",
4
- "version": "1.20.51",
4
+ "version": "1.20.53",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.js",
7
7
  "types": "lib/index.d.ts",