top-brains-ui 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/lib/index.cjs +1 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.esm.js +1 -1
- package/lib/index.esm.js.br +0 -0
- package/lib/index.esm.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/index.cjs
CHANGED
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
* @version asn1 1.0.13 (2017-Jun-02)
|
|
12
12
|
* @since jsrsasign 2.1
|
|
13
13
|
* @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
|
|
14
|
-
*/var xc={};void 0!==xc.asn1&&xc.asn1||(xc.asn1={}),xc.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="",o=0;o<n;o++)r+="f";t=new Di(r,16).xor(e).add(Di.ONE).toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(e,t){return hextopem(e,t)},this.newObject=function(e){var t=xc.asn1,n=t.DERBoolean,r=t.DERInteger,o=t.DERBitString,a=t.DEROctetString,i=t.DERNull,c=t.DERObjectIdentifier,l=t.DEREnumerated,s=t.DERUTF8String,f=t.DERNumericString,d=t.DERPrintableString,u=t.DERTeletexString,b=t.DERIA5String,p=t.DERUTCTime,h=t.DERGeneralizedTime,g=t.DERSequence,m=t.DERSet,x=t.DERTaggedObject,w=t.ASN1Util.newObject,v=Object.keys(e);if(1!=v.length)throw"key of param shall be only one.";var y=v[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+y+":"))throw"undefined key: "+y;if("bool"==y)return new n(e[y]);if("int"==y)return new r(e[y]);if("bitstr"==y)return new o(e[y]);if("octstr"==y)return new a(e[y]);if("null"==y)return new i(e[y]);if("oid"==y)return new c(e[y]);if("enum"==y)return new l(e[y]);if("utf8str"==y)return new s(e[y]);if("numstr"==y)return new f(e[y]);if("prnstr"==y)return new d(e[y]);if("telstr"==y)return new u(e[y]);if("ia5str"==y)return new b(e[y]);if("utctime"==y)return new p(e[y]);if("gentime"==y)return new h(e[y]);if("seq"==y){for(var C=e[y],k=[],L=0;L<C.length;L++){var M=w(C[L]);k.push(M)}return new g({array:k})}if("set"==y){for(C=e[y],k=[],L=0;L<C.length;L++){M=w(C[L]);k.push(M)}return new m({array:k})}if("tag"==y){var E=e[y];if("[object Array]"===Object.prototype.toString.call(E)&&3==E.length){var _=w(E[2]);return new x({tag:E[0],explicit:E[1],obj:_})}var z={};if(void 0!==E.explicit&&(z.explicit=E.explicit),void 0!==E.tag&&(z.tag=E.tag),void 0===E.obj)throw"obj shall be specified for 'tag'.";return z.obj=w(E.obj),new x(z)}},this.jsonToASN1HEX=function(e){return this.newObject(e).getEncodedHex()}},xc.asn1.ASN1Util.oidHexToInt=function(e){for(var t="",n=parseInt(e.substring(0,2),16),r=(t=Math.floor(n/40)+"."+n%40,""),o=2;o<e.length;o+=2){var a=("00000000"+parseInt(e.substring(o,o+2),16).toString(2)).slice(-8);if(r+=a.substring(1,8),"0"==a.substring(0,1))t=t+"."+new Di(r,2).toString(10),r=""}return t},xc.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 Di(e,10).toString(2),o=7-r.length%7;7==o&&(o=0);for(var a="",i=0;i<o;i++)a+="0";r=a+r;for(i=0;i<r.length-1;i+=7){var c=r.substring(i,i+7);i!=r.length-7&&(c="1"+c),n+=t(parseInt(c,2))}return n};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var r="",o=e.split("."),a=40*parseInt(o[0])+parseInt(o[1]);r+=t(a),o.splice(0,2);for(var i=0;i<o.length;i++)r+=n(o[i]);return r},xc.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""}},xc.asn1.DERAbstractString=function(e){xc.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))},mc(xc.asn1.DERAbstractString,xc.asn1.ASN1Object),xc.asn1.DERAbstractTime=function(e){xc.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,o=this.localDateToUTC(e),a=String(o.getFullYear());"utc"==t&&(a=a.substring(2,4));var i=a+r(String(o.getMonth()+1),2)+r(String(o.getDate()),2)+r(String(o.getHours()),2)+r(String(o.getMinutes()),2)+r(String(o.getSeconds()),2);if(!0===n){var c=o.getMilliseconds();if(0!=c){var l=r(String(c),3);i=i+"."+(l=l.replace(/[0]+$/,""))}}return i+"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,o,a){var i=new Date(Date.UTC(e,t-1,n,r,o,a,0));this.setByDate(i)},this.getFreshValueHex=function(){return this.hV}},mc(xc.asn1.DERAbstractTime,xc.asn1.ASN1Object),xc.asn1.DERAbstractStructured=function(e){xc.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)},mc(xc.asn1.DERAbstractStructured,xc.asn1.ASN1Object),xc.asn1.DERBoolean=function(){xc.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},mc(xc.asn1.DERBoolean,xc.asn1.ASN1Object),xc.asn1.DERInteger=function(e){xc.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=xc.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new Di(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))},mc(xc.asn1.DERInteger,xc.asn1.ASN1Object),xc.asn1.DERBitString=function(e){if(void 0!==e&&void 0!==e.obj){var t=xc.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.getEncodedHex()}xc.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 o=e.substring(n,n+8),a=parseInt(o,2).toString(16);1==a.length&&(a="0"+a),r+=a}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))},mc(xc.asn1.DERBitString,xc.asn1.ASN1Object),xc.asn1.DEROctetString=function(e){if(void 0!==e&&void 0!==e.obj){var t=xc.asn1.ASN1Util.newObject(e.obj);e.hex=t.getEncodedHex()}xc.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"},mc(xc.asn1.DEROctetString,xc.asn1.DERAbstractString),xc.asn1.DERNull=function(){xc.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},mc(xc.asn1.DERNull,xc.asn1.ASN1Object),xc.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 Di(e,10).toString(2),o=7-r.length%7;7==o&&(o=0);for(var a="",i=0;i<o;i++)a+="0";r=a+r;for(i=0;i<r.length-1;i+=7){var c=r.substring(i,i+7);i!=r.length-7&&(c="1"+c),n+=t(parseInt(c,2))}return n};xc.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="",o=e.split("."),a=40*parseInt(o[0])+parseInt(o[1]);r+=t(a),o.splice(0,2);for(var i=0;i<o.length;i++)r+=n(o[i]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueName=function(e){var t=xc.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))},mc(xc.asn1.DERObjectIdentifier,xc.asn1.ASN1Object),xc.asn1.DEREnumerated=function(e){xc.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=xc.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new Di(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))},mc(xc.asn1.DEREnumerated,xc.asn1.ASN1Object),xc.asn1.DERUTF8String=function(e){xc.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"},mc(xc.asn1.DERUTF8String,xc.asn1.DERAbstractString),xc.asn1.DERNumericString=function(e){xc.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"},mc(xc.asn1.DERNumericString,xc.asn1.DERAbstractString),xc.asn1.DERPrintableString=function(e){xc.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"},mc(xc.asn1.DERPrintableString,xc.asn1.DERAbstractString),xc.asn1.DERTeletexString=function(e){xc.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"},mc(xc.asn1.DERTeletexString,xc.asn1.DERAbstractString),xc.asn1.DERIA5String=function(e){xc.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"},mc(xc.asn1.DERIA5String,xc.asn1.DERAbstractString),xc.asn1.DERUTCTime=function(e){xc.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))},mc(xc.asn1.DERUTCTime,xc.asn1.DERAbstractTime),xc.asn1.DERGeneralizedTime=function(e){xc.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))},mc(xc.asn1.DERGeneralizedTime,xc.asn1.DERAbstractTime),xc.asn1.DERSequence=function(e){xc.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}},mc(xc.asn1.DERSequence,xc.asn1.DERAbstractStructured),xc.asn1.DERSet=function(e){xc.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)},mc(xc.asn1.DERSet,xc.asn1.DERAbstractStructured),xc.asn1.DERTaggedObject=function(e){xc.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)))},mc(xc.asn1.DERTaggedObject,xc.asn1.ASN1Object);var wc,vc,yc=window&&window.__extends||(wc=function(e,t){return wc=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])},wc(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}wc(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Cc=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 yc(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)?mi(e):xi.unarmor(e),o=Ei.decode(r);if(3===o.sub.length&&(o=o.sub[2].sub[0]),9===o.sub.length){t=o.sub[1].getHexStringValue(),this.n=Pi(t,16),n=o.sub[2].getHexStringValue(),this.e=parseInt(n,16);var a=o.sub[3].getHexStringValue();this.d=Pi(a,16);var i=o.sub[4].getHexStringValue();this.p=Pi(i,16);var c=o.sub[5].getHexStringValue();this.q=Pi(c,16);var l=o.sub[6].getHexStringValue();this.dmp1=Pi(l,16);var s=o.sub[7].getHexStringValue();this.dmq1=Pi(s,16);var f=o.sub[8].getHexStringValue();this.coeff=Pi(f,16)}else{if(2!==o.sub.length)return!1;if(o.sub[0].sub){var d=o.sub[1].sub[0];t=d.sub[0].getHexStringValue(),this.n=Pi(t,16),n=d.sub[1].getHexStringValue(),this.e=parseInt(n,16)}else t=o.sub[0].getHexStringValue(),this.n=Pi(t,16),n=o.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(e){return!1}},t.prototype.getPrivateBaseKey=function(){var e={array:[new xc.asn1.DERInteger({int:0}),new xc.asn1.DERInteger({bigint:this.n}),new xc.asn1.DERInteger({int:this.e}),new xc.asn1.DERInteger({bigint:this.d}),new xc.asn1.DERInteger({bigint:this.p}),new xc.asn1.DERInteger({bigint:this.q}),new xc.asn1.DERInteger({bigint:this.dmp1}),new xc.asn1.DERInteger({bigint:this.dmq1}),new xc.asn1.DERInteger({bigint:this.coeff})]};return new xc.asn1.DERSequence(e).getEncodedHex()},t.prototype.getPrivateBaseKeyB64=function(){return pi(this.getPrivateBaseKey())},t.prototype.getPublicBaseKey=function(){var e=new xc.asn1.DERSequence({array:[new xc.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new xc.asn1.DERNull]}),t=new xc.asn1.DERSequence({array:[new xc.asn1.DERInteger({bigint:this.n}),new xc.asn1.DERInteger({int:this.e})]}),n=new xc.asn1.DERBitString({hex:"00"+t.getEncodedHex()});return new xc.asn1.DERSequence({array:[e,n]}).getEncodedHex()},t.prototype.getPublicBaseKeyB64=function(){return pi(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}(hc),kc="undefined"!=typeof process?null===(vc=process.env)||void 0===vc?void 0:vc.npm_package_version:void 0,Lc=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 Cc(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(hi(e))}catch(e){return!1}},e.prototype.encrypt=function(e){try{return pi(this.getKey().encrypt(e))}catch(e){return!1}},e.prototype.encryptOAEP=function(e){try{return pi(this.getKey().encrypt(e,pc))}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 pi(this.getKey().sign(e,t,n))}catch(e){return!1}},e.prototype.signSha256=function(e){return this.sign(e,function(e){return tc(ec(e))},"sha256")},e.prototype.verify=function(e,t,n){void 0===n&&(n=function(e){return e});try{return this.getKey().verify(e,hi(t),n)}catch(e){return!1}},e.prototype.verifySha256=function(e,t){return this.verify(e,t,function(e){return tc(ec(e))})},e.prototype.getKey=function(e){if(!this.key){if(this.key=new Cc,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=kc,e}();const Mc=/[.*+?^${}()|[\]\\]/g;function Ec(e,t=[]){return t.reduce((e,t)=>e.replace(new RegExp(function(e){return e.replace(Mc,"\\$&")}(t),"gi"),""),e).replace(/([A-Z])/g," $1").trim().replace(/^./,e=>e.toUpperCase())}exports.AADHAAR_REGEX=/^\d{12}$/,exports.ALPHABET_ONLY_REGEX=/^[A-Za-z]+$/,exports.ALPHANUMERIC_REGEX=/^[A-Za-z0-9]+$/,exports.ALPHANUMERIC_WITH_ROUND_BRACES_REGEX=/^[a-zA-Z0-9-_() ]*$/,exports.Accordion=({headerTitle:n="",color:r,minHeight:o="32px",accordionContent:a=e.jsx(e.Fragment,{children:"This is accordion content"}),disable:i=!1,disableInfoMessage:c="",accordionStateIconName:l="arrow_down",AccordionStateIconWidth:s=12,AccordionStateIconHeight:f=12,isExpand:u,onClick:h,className:g="",iconColor:m="var(--brand-color)",headerRightContent:x,headerClassName:v=""})=>{const[y,C]=t.useState(!0);t.useEffect(()=>{void 0!==u&&C(u)},[u]);return e.jsxs("div",{className:`ff-accordion ${g}`,children:[e.jsxs("div",{className:`accordion-header ${i&&"ff-disabled"} ${y&&"expanded"} `,style:{color:r||"--tooltip-bg-color"},onClick:()=>{h&&h(),i||C(!y)},children:[e.jsxs("div",{className:`header-title-container ${v}`,children:[e.jsx(w,{title:c,children:e.jsx(p,{as:"div",className:"header-title",fontWeight:"semi-bold",lineHeight:"18px",children:n})}),x]}),e.jsx(b,{name:l,hoverEffect:!1,className:d("accordion-arrow",{expanded:y}),width:s,height:f,color:m})]}),!i&&y&&e.jsx("div",{style:{minHeight:o},className:"accordion-content",children:a})]})},exports.Avatar=({variant:t="small",iconName:n,iconColor:r="var(--avatar-icon-color)",customAvatarSize:o,customIconSize:a,backgroundColor:i,label:c,labelFontSize:l})=>{const s=c?.slice(0,2);return e.jsx("div",{className:`ff-avatar ff-avatar--${t}`,style:{height:`${o}px`,width:`${o}px`,backgroundColor:i},children:c?e.jsx("span",{className:"ff-avatar-label",style:{fontSize:l||"14px",color:r},children:s}):e.jsx(b,{name:n,height:a,width:a,color:r})})},exports.BASE64_REGEX=/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/,exports.BINARY_NUMBER_REGEX=/^[01]+$/,exports.Button=h,exports.CAMEL_CASE_REGEX=/(?:^\w|[A-Z]|\b\w|\s+)/g,exports.CERTIFICATES_NAME_REGEX=/^[^:;/\\@()=?{}[\]<>,.]*$/,exports.CREDIT_CARD_REGEX=/^\d{4}-?\d{4}-?\d{4}-?\d{4}$/,exports.CURRENCY_GENERIC_REGEX=/^[\u0024-\u20B9]?\d+(,\d{3})*(\.\d{1,2})?$/,exports.Checkbox=y,exports.Chip=({iconName:t,content:n,iconPlacement:r="left",className:o})=>e.jsx("div",{className:`"chip-with-icon" ${o}`,children:"right"===r?e.jsxs(e.Fragment,{children:["string"==typeof n?e.jsx(p,{children:n}):n,e.jsx(b,{name:t})]}):e.jsxs(e.Fragment,{children:[e.jsx(b,{name:t}),"string"==typeof n?e.jsx(p,{children:n}):n]})}),exports.Col=({children:t,size:n=12,className:r=""})=>{const o=`ff-col-${n}`;return e.jsx("div",{className:d(o,r),children:t})},exports.Container=({children:t,fluid:n=!1,gap:r="0px",className:o=""})=>{const a=n?"ff-container-fluid":"ff-container";return e.jsx("div",{className:d(a,o),style:{gap:r},children:t})},exports.CountChip=({count:t})=>e.jsx("div",{className:"chip-border",children:e.jsx(p,{color:"#434DB8",fontSize:12,fontWeight:"regular",children:t})}),exports.DATE_REGEX=/^\d{4}-\d{2}-\d{2}$/,exports.DECIMAL_NUMBER_REGEX=/^-?\d+(\.\d+)?$/,exports.DRIVING_LICENSE_REGEX=/^[A-Z]{2}-\d{2}-\d{4}-\d{7}$/,exports.DYNAMIC_VALUE_PATTERN_REGEX=/\{Dynamic Val[0-9]+\}/g,exports.DYNAMIC_VALUE_TYPE_REGEX=/{([^}]+)}/g,exports.DYNAMIC_VALUE_WITH_VALID_BRACKETS_REGEX=/\{Dynamic Val[A-Za-z0-9\s]+\}/g,exports.DYNAMIC_VALUE__PLACEHOLDER_REGEX=/Dynamic Val[0-9]+/g,exports.DatePicker=Qa,exports.DonutChart=({radius:n=60,lineWidth:r=15,resultStats:o=[],gapAngle:a=.06,legendDetailsType:i="",isLegendDetails:c=!0,totalCount:l})=>{const[s,f]=t.useState(null),{colorMapping:d,hoverMapping:u}={colorMapping:{passed:"var(--status-success-text-color)",failed:"var(--status-rejected-text-color)",warning:"var(--status-warning-text-color)",skipped:"var(--status-skipped-text-color)",default:"var(--brand-color)"},hoverMapping:{passed:"var(--status-success-bg-color)",failed:"var(--status-rejected-bg-color)",warning:"var(--status-warning-bg-color)",skipped:"var(--status-skipped-bg-color)",default:"var(--status-percentage-growth-bg-color)"}},b=o?.filter(({count:e})=>e>0),p=a*b.length;let h=2*Math.PI-p,g=-Math.PI/2;const m=2*Math.PI*.01;b.forEach(({count:e})=>{const t=e/l,n=Math.max(t*(2*Math.PI),m);h-=n});const x=e=>f(e),w=()=>f(null),v=2*(n+r)+8;return e.jsxs("div",{className:"ff-donut-chart-section",children:[e.jsx("div",{className:"ff-donut-chart-svg-container",children:e.jsx("svg",{width:v,height:v,viewBox:`0 0 ${v} ${v}`,children:e.jsxs("g",{transform:`translate(${n+r+4}, ${n+r+4})`,children:[b?.map((t,o)=>{const i=t.count/l;let c=Math.max(i*(2*Math.PI),m);c+=h*i;return((t,o,i)=>{const c=t?.status?.toLowerCase(),l=1===b.length,f=l?ri(0,0,n,0,2*Math.PI):ri(0,0,n,g,o),u=n+r-1,p=l?ri(0,0,u,0,2*Math.PI):ri(0,0,u,g,o);return g=o+a,e.jsxs("g",{children:[e.jsx("path",{d:f,fill:"none",stroke:d[c],strokeWidth:r,onMouseEnter:()=>x(c),onMouseLeave:w,strokeOpacity:null===s||s===c?.8:.3}),s===c&&e.jsx("path",{d:p,fill:"none",stroke:d[c],strokeWidth:4,strokeOpacity:.3})]},i)})(t,g+c,o)}),e.jsx("text",{x:"0",y:"-18",textAnchor:"middle",fill:d.default,children:s?s?.toUpperCase():"TOTAL"}),e.jsx("text",{x:"0",y:"5",textAnchor:"middle",fill:d.skipped,children:s?`${o?.find(e=>e?.status?.toLowerCase()===s)?.count} ${i}`:`${l} ${i}`}),e.jsx("rect",{x:-17,y:14,width:34,height:18,fill:s?u[s?.toLowerCase()]:u.default,rx:"5",ry:"5"}),e.jsx("text",{x:"0",y:"26",textAnchor:"middle",fill:s?d[s?.toLowerCase()]:d.default,children:s?`${(o?.find(e=>e?.status?.toLowerCase()===s)?.percentage||0)?.toFixed(2)}%`:"100%"})]})})}),c&&e.jsx("div",{className:"ff-status-container",children:["passed","failed","warning","skipped"]?.map(t=>(t=>{const n=o?.find(e=>e.status?.toLowerCase()===t?.toLowerCase());return e.jsxs("div",{className:"ff-status-item "+(null===s||s===t?"ff-highlighted":"ff-fade"),onMouseEnter:()=>x(t),onMouseLeave:w,children:[e.jsxs("div",{className:"ff-status-label",children:[e.jsx("div",{className:"ff-status-color",style:{backgroundColor:d[t]}}),e.jsx("div",{className:"ff-status-text",children:t?.charAt(0)?.toUpperCase()+t?.slice(1)?.toLowerCase()})]}),e.jsxs("div",{className:"ff-status-details",children:[e.jsxs("div",{className:"ff-status-details-script-count",children:[n?.count||0,e.jsx("span",{children:i})]}),e.jsxs("div",{className:"ff-status-details-script-percentage",children:["(",n?.percentage?.toFixed(2)||0,"%)"]})]})]},t)})(t))})]})},exports.ELEMENTS_TRAILING_SPACE_REGEX=/^\S.*\S$/,exports.ELEMENTS_WHITE_SPACE_REGEX=/.*\S.*/,exports.EMAIL_REGEX=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,exports.FILE_EXTENSION_REGEX=/\.(jpg|png|gif|bmp)$/i,exports.FILE_NAME_REGEX=/\.([^.@]+)$/,exports.FormatString=function(e,t=[]){return e.toUpperCase()===e&&(e=e.toLowerCase()),e.includes("_")?function(e){return e.toLowerCase().replace(/_/g," ").replace(/^./,e=>e.toUpperCase())}(e):Ec(e,t)},exports.GSTIN_REGEX=/^\d{2}[A-Z]{5}\d{4}[A-Z]{1}[A-Z\d]{1}[Z]{1}[A-Z\d]{1}$/,exports.HEXADECIMAL_NUMBER_REGEX=/^[0-9A-Fa-f]+$/,exports.HEX_COLOR_REGEX=/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6})$/,exports.HSL_COLOR_REGEX=/^hsl\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%\)$/,exports.HTML_ATTRIBUTE_REGEX=/\b[a-zA-Z-]+(="[^"]*"|='[^']*'|=[^\s>]*)?/g,exports.HTML_TAG_REGEX=/<\/?[\w\s=\"'\/\.:;#-]*>/g,exports.INDIAN_CURRENCY_REGEX=/^\u20B9?\s?\d{1,3}(,\d{3})*(\.\d{1,2})?$/,exports.INDIAN_PASSPORT_REGEX=/^[A-Z]{1}-?\d{7}$/,exports.INDIAN_PHONE_REGEX=/^[6-9]\d{9}$/,exports.INDIAN_PIN_CODE_REGEX=/^\d{6}$/,exports.INTERNATIONAL_PHONE_REGEX=/^\+?[1-9]\d{1,14}$/,exports.IPV4_REGEX=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,exports.IPV6_REGEX=/^(?:[a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4}$/,exports.Icon=b,exports.IconButton=Ja,exports.Input=z,exports.InputWithDropdown=ni,exports.LINKEDIN_PROFILE_REGEX=/^https?:\/\/(www\.)?linkedin\.com\/in\/([a-zA-Z0-9-]{5,30})$/,exports.LabelSelectInput=({label:n="Enter a value",onChange:r,required:o=!0,defaultValue:a=[],disabled:i=!1,errorMsg:c,validationType:l,enterOnSpace:s=!1,enterOnTab:f=!1})=>{const[d,u]=t.useState(""),[h,g]=t.useState(a),[m,x]=t.useState(!1),[w,v]=t.useState(0),[y,C]=t.useState(!1),k=t.useRef(null);t.useEffect(()=>{if(k.current){const e=k.current.offsetWidth;let t=0,n=0;const r=k.current.querySelectorAll(".ff-tag");for(const o of r){if(t+=o.offsetWidth,!(t<=.8*e))break;n++}const o=h.length-n;v(o>0?o:0)}0===h.length&&C(!1)},[h]);const L=e=>{if(i)return;const t=h.filter(t=>t!==e);g(t),r?.(t),0===t.length&&C(!1)},M=e=>{k.current&&!k.current.contains(e.target)&&C(!1)};t.useEffect(()=>(document.addEventListener("mousedown",M),()=>{document.removeEventListener("mousedown",M)}),[]);const E=h.slice(0,h.length-w),_=Boolean(c);return e.jsxs("div",{className:"ff-label-select-input",ref:k,children:[e.jsx("div",{className:`ff-label-select-input-container ${_?"ff-error":""} ${i?"ff-disabled":""}`,children:e.jsxs("div",{className:"ff-label-select-input-inner-container",children:[E.map((t,n)=>e.jsxs("span",{className:"ff-tag",children:[t,e.jsx(b,{name:"close_pill",onClick:()=>L(t)})]},n)),w>0&&e.jsxs("span",{className:"ff-tag ff-hidden-tag",onClick:()=>{h.length>0&&C(e=>!e)},children:["+",w]}),e.jsxs("div",{className:"ff-input-wrapper",children:[e.jsxs("label",{className:`ff-placeholder ${m||d||h.length?"ff-placeholder-active":""} ${_?"ff-placeholder-error":""}`,children:[o&&e.jsx("span",{className:"ff-required-asterisk",children:"*"})," ",n]}),e.jsx("input",{type:"text",className:`ff-input ${_?"ff-input-error":""} ${i?"ff-input-disabled":""}`,value:d,onFocus:i?void 0:()=>x(!0),onBlur:i?void 0:()=>{d||x(!1)},onChange:i?void 0:e=>{u(e.target.value)},onKeyDown:i?void 0:e=>{const t="Enter"===e.key,n=s&&" "===e.key,o=f&&"Tab"===e.key;if((t||n||o)&&d.trim()){if(e.preventDefault(),!h.includes(d.trim()))if("email"===l){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(d.trim()))return void dn.error("Invalid email");{const e=[...h,d.trim()];g(e),r?.(e),C(!1)}}else{const e=[...h,d.trim()];g(e),r?.(e),C(!1)}u("")}else if("Backspace"===e.key&&!d&&h.length>0){e.preventDefault();const t=h.slice(0,-1);g(t),r?.(t)}},required:o,disabled:i})]})]})}),c&&e.jsx(p,{fontSize:"10px",className:"ff-error-message",children:c}),y&&h.length>0&&e.jsx("div",{className:"ff-tag-box",children:h.map((t,n)=>e.jsxs("div",{className:"ff-tag-box-item",children:[t,e.jsx(b,{name:"close_pill",onClick:()=>L(t)})]},n))})]})},exports.MAC_ADDRESS_REGEX=/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/,exports.MEMORY_VALIDATION_REGEX=/^(\d+\.?\d*)\s*(GB|MB|KB)?$/i,exports.Modal=ei,exports.ModuleChip=({label:t="",isActive:n=!0,onClick:r=()=>{},isFilterChip:o=!1,className:a=""})=>{const i=o?"filter":"module";return e.jsx("div",{className:d("module-chip",{"filter-chip":o,[`${i}-chip--active`]:n,[`${i}-chip--hover`]:!n},a),onClick:r,children:e.jsx(p,{lineHeight:"18px",className:"module-typography",children:t})})},exports.MultiSelect=({options:r=[],type:o="text",selectedOptions:a=[],onChange:i=()=>{},acceptNewOption:c=!1,zIndex:l=100,label:s="",onSearch:f=()=>{},required:u=!1,disabled:h=!1,errorMessage:m="Fill this field",displayCount:x=!1,isAllSelected:v,onToggleAllSelect:y,displayAllSelectedAsText:M,isAllSelect:_,placeholderForSearching:z="Search",variant:S="default",onLabelPlusIconClick:D=async()=>{},className:N="",onSelectButtonClick:T=()=>{},labelAccessor:q="label",valueAccessor:Z="value",withSelectButton:j="machines"===S,loadMoreOptions:P=()=>{},onEnter:R=()=>{},maxVisibleChips:O=2,onBlur:A=()=>{},maxDropdownHeight:I=160,showTooltip:H=!1,tooltipCharCount:B=0})=>{const[V,F]=t.useState(!1),[W,$]=t.useState(r),[Y,X]=t.useState(""),[U,G]=t.useState(!1),[K,Q]=t.useState(""),[J,ee]=t.useState(!1),[te,ne]=t.useState(x),[re,oe]=t.useState({top:0,left:0,width:0,fromBottom:0,selectHeight:0}),[ae,ie]=t.useState("white"),ce=t.useRef(null),le=t.useRef(null),se=t.useRef(null),fe=t.useRef(null);let de=U&&0===a.length;const ue=a.length-O,be=(e,t)=>{ce.current?.focus();const n=W.map(n=>k(n,Z)===k(e,Z)?{...n,isChecked:t}:n);$(n);const r=n.filter(e=>e.isChecked).map(({isChecked:e,...t})=>t);if(U||G(!0),g(e))return F(!1),void T?.(r);i&&i(r)},pe=(e,t)=>{t.stopPropagation(),be(e,!1)},he=async()=>{try{await D(Y),X(""),ee(!1)}catch(e){}};t.useEffect(()=>{if(fe.current){const e=fe.current.parentElement?.parentElement;if(e){const t=(e=>{let t=e;for(;t;){const e=window.getComputedStyle(t);if("rgba(0, 0, 0, 0)"!==e.backgroundColor)return e.backgroundColor;t=t.parentElement}return""})(e);t&&ie(t)}}},[fe.current]);const ge=()=>{if(le.current&&fe.current){const e=le.current.getBoundingClientRect(),t=fe.current.getBoundingClientRect();oe({top:e.bottom+window.scrollY,left:e.left+window.scrollX,width:e.width,fromBottom:document.documentElement.clientHeight-(e.bottom-4),selectHeight:t.height})}};t.useEffect(()=>{const e=le.current?.getBoundingClientRect();oe(t=>({...t,width:e?.width}))},[J]),t.useEffect(()=>{V&&ge()},[V,W]);const me=e=>{const t=function(){const e=document.createElement("div");e.style.visibility="hidden",e.style.overflow="scroll",document.body.appendChild(e);const t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}();document.body.scrollHeight>window.innerHeight&&(document.body.style.paddingRight=e?"":`${t}px`),document.body.style.overflow=e?"":"hidden"};t.useEffect(()=>(V&&me(!V),se?.current&&ce?.current?.focus(),()=>{me(!0)}),[V]),t.useEffect(()=>{!V&&U&&A()},[V,U]),t.useEffect(()=>{let e=r;g(r)||g(a)||(e=r.map(e=>({...e,isChecked:a.some(t=>k(t,Z)===k(e,Z))}))),$(e)},[r,a]),t.useEffect(()=>{const e=e=>{j&&le.current&&fe.current&&se.current&&!se.current.contains(e?.target)&&!fe.current.contains(e?.target)&&(Q(""),F(!1),U||G(!0)),!(le.current&&ce.current&&fe.current&&se.current)||ce.current.contains(e?.target)||se.current.contains(e?.target)||fe.current.contains(e?.target)||e?.target&&e.target.closest(".ff-label-plus-icon")||(Q(""),F(!1),U||G(!0))};return window.addEventListener("resize",ge),window.addEventListener("click",e,!0),()=>{window.removeEventListener("resize",ge),window.removeEventListener("click",e),document.body.style.overflow="auto"}},[]);const xe=M&&a.length===W.length;return e.jsxs("div",{className:`ff-multiselect-container-with-icon ${N}`,children:[e.jsxs("div",{ref:fe,className:d("ff-multiselect-wrapper",{"ff-multiselect-wrapper--with-options":a?.length,"ff-multiselect-wrapper--opened-dropdown":V,"ff-multiselect-wrapper--error":de&&u||K,"ff-multiselect-wrapper--disabled":h}),children:[e.jsxs("div",{className:"ff-multiselect",onClick:()=>{V?j&&se.current&&F(!1):F(!0)},children:[e.jsxs("div",{className:"ff-multiselect__main",children:[e.jsx(p,{style:{backgroundColor:ae},className:d({"active-default-label":V||!j&&a?.length||de&&u,"default-label":!V&&!a?.length}),required:u,children:s}),e.jsxs("div",{className:"ff-multiselect-chip-container",children:[!j&&(M&&a.length===W.length&&"name"!==q?e.jsx(E,{zIndex:l,label:"All",onChipCloseClick:e=>{e.stopPropagation();const t=W.map(e=>({...e,isChecked:!1}));$(t),i&&i([])},disableChip:!1},"all"):te?e.jsx(e.Fragment,{children:a.slice(0,O).map(t=>e.jsx(E,{zIndex:l,label:C(t,q)||"",onChipCloseClick:e=>pe(t,e),disableChip:t?.isDisabled||!1},C(t,q)))}):a.map(t=>e.jsx(E,{zIndex:l,label:C(t,q)||"",onChipCloseClick:e=>pe(t,e),disableChip:t?.isDisabled||!1},C(t,q)))),!xe&&e.jsx("div",{className:"ff-multiselect-input-container",children:e.jsx("input",{value:Y,type:o,autoComplete:"off",placeholder:z,ref:ce,onChange:e=>{V||F(!0);const t=e.target.value;if(X(t),f?.(t),t.length>2){const e=W.find(e=>C(e,Z)?.toLowerCase()===t.toLowerCase());ee(!e)}else ee(!1)},onKeyDown:e=>{if(c&&"Enter"===e.key){if(Q(""),"email"===o){if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(Y))return F(!1),void Q("Please enter a valid email address.")}R?.(Y),X(""),F(!1)}},onBlur:()=>X(""),id:"input-ele",className:"ff-select-input",style:{display:V||a.length&&!j?"inherit":"none"}})})]})]}),ue>0&&te&&e.jsx("div",{className:"ff-multiselect-more-chip",onClick:()=>{F(!1),ne(!1)},children:e.jsxs(p,{fontSize:12,fontWeight:"semi-bold",lineHeight:"16px",color:"var(--brand-color)",children:["+",ue]})}),e.jsx("div",{onClick:e=>{(e=>{e.stopPropagation(),ce.current?.focus(),F(e=>!e),!U&&V&&G(!0)})(e)},className:"ff-multiselect__toggle",children:e.jsx(b,{name:"arrow_down",className:d({"ff-select-arrow--opened-dropdown":V,"ff-select-arrow":!V}),color:V?"var(--brand-color)":"var(--default-icon-color)",height:8,width:12})})]}),e.jsxs("div",{ref:le,children:[(K||de&&u&&m)&&e.jsx(p,{children:K||m,fontSize:10,className:"error-text"}),V&&n.createPortal(e.jsx(L,{ref:se,searchedKeyword:Y,checkedOptions:a,handleOptionChange:be,options:W,dropdownPosition:re,zIndex:l,withSelectButton:j,labelAccessor:q,valueAccessor:Z,loadMoreOptions:P,isAllSelected:v,onToggleAllSelect:y,isAllSelect:_,maxDropdownHeight:I,variant:S,handleIconClick:he,showTooltip:H,tooltipCharCount:B}),document.body)]})]}),"labels"===S&&J&&e.jsx(w,{title:"Add Label",placement:"top",zIndex:l+1,children:e.jsx(b,{name:"label_plus",onClick:he,className:"ff-label-plus-icon"})})]})},exports.NLP_DESCRIPTION_REGEX=/^[a-zA-Z0-9_$\s]*$/,exports.NUMBERS_ONLY_REGEX=/^\d+$/,exports.NUMBER_REGEX=/([0-9\.]+)/,exports.NestedAccordian=({data:n,onItemSelect:r,height:o="100%",width:a="100%",headerIcon:i,fontSize:c=10,fontWeight:l="medium",expandedIcon:s="arrow_down",collapsedIcon:f="arrow_right",onExpandHandler:d=()=>{}})=>{const[u,b]=t.useState([]),[h,g]=t.useState(null),[m,x]=t.useState(!0),w=t.useRef(null);t.useEffect(()=>{n&&n[0]?.children&&m&&(b([n[0]?._id]),g(n[0].children[0]?._id||null),n[0].children[0]&&r?.(n[0].children[0]),x(!1))},[n,m]);const v=(t,n=0)=>{const o=t.expanded,a=t.hasChildren,m=h===t?._id,x=u.includes(t?._id)&&!m,y=m&&n>0;return e.jsxs("div",{className:`'accordian_container'${x?"selected":""} `,onClick:e=>e.stopPropagation(),children:[e.jsxs("div",{className:`'accordian_item_header'\n ${m?"selected":""} \n ${x?"parent-selected":""}\n ${y?"child-selected":""}\n `,ref:w,onClick:e=>{e.stopPropagation()},style:{marginLeft:12*n+8+"px"},children:[e.jsxs(p,{fontSize:c,fontWeight:l,lineHeight:"15px",className:"accordian_header_label",onClick:()=>{g(t?._id),r?.(t)},children:[i&&i," ",t.name]}),a&&e.jsx(ti,{name:o?s:f,className:"icon",onIconClick:e=>((e,t)=>{t.stopPropagation(),u.includes(e?._id)?b(t=>{const n=t.findIndex(t=>t===e?._id);return t.splice(n,1),[...t]}):b(t=>[...t,e?._id]),d?.(e,!e.expanded)})(t,e)})]}),o&&a&&t.children&&e.jsx("div",{onClick:e=>e.stopPropagation(),children:t.children.map(e=>v(e,n+1))})]},t?._id)};return e.jsx("div",{style:{height:o,width:a},children:n.map(e=>v(e))})},exports.PAN_CARD_REGEX=/^[A-Z]{5}\d{4}[A-Z]{1}$/,exports.PARAMETER_ALPHANUMERIC_REGEX=/^[-_A-Za-z0-9 ]*$|^[-_A-Za-z0-9 ][A-Za-z0-9 ]*[-_A-Za-z-_]$/,exports.PASSWORD_COMPLEX_REGEX=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/,exports.PASSWORD_SIMPLE_REGEX=/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/,exports.PHONE_REGEX=/^\+?[\d\s\-()]{7,15}$/,exports.POSTAL_CODE_REGEX=/^[A-Za-z\d\s\-]{3,10}$/,exports.PopUpModal=({isOpen:t,onClose:n,onContinue:r,titleMessage:o="Warning!",subTitleMessage:a="Unsaved Changes.",iconName:i,modalMessage:c="Your web service data will be lost. Are you sure you want to exit?",firstButtonLabel:l="Cancel",secondButtonLabel:s="Continue",buttonVariant:f="warning",border:d="1px solid var(--warning-modal-border-color)",popupWidth:u="420",popupHeight:g="226",colorForTitleMessage:m="var(--status-button-bg-warning)",footerContent:x,firstButtonDisabled:w=!1,secondButtonDisabled:v=!1,zIndex:y=1100,showFirstButton:C=!0,showSecondButton:k=!0,showCloseIcon:L=!1,showHeader:M=!0,shouldCloseOnEsc:E=!0,shouldCloseOnOverlayClick:_=!0})=>e.jsx(ei,{overlayClassName:"custom-overlay",isOpen:t,onClose:n,isHeaderDisplayed:!1,zIndex:y,shouldCloseOnEsc:E,shouldCloseOnOverlayClick:_,children:e.jsxs("div",{className:"warning_modal_container",children:[e.jsxs("div",{className:"warning_modal_content",children:[e.jsx(b,{name:i,className:"warning_modal_icon",width:94,height:94}),e.jsxs("div",{className:"warning_modal_message",children:[M&&e.jsxs(p,{fontSize:20,fontWeight:"semi-bold",className:"warning_modal_title_wrapper",children:[e.jsxs("div",{children:[e.jsx(p,{color:`${m}`,fontSize:20,fontWeight:"semi-bold",children:o}),e.jsx(p,{fontSize:20,fontWeight:"semi-bold",children:a})]}),L&&e.jsx(b,{name:"close",color:"warning"===f?"#fFC600":"#c90000",width:16,height:16,onClick:n})]}),e.jsxs("div",{className:"warning_modal_message_wrapper",children:[e.jsx(p,{fontSize:16,children:c}),e.jsx(p,{as:"div",children:x})]})]})]}),e.jsxs("div",{className:"warning_modal_footer_button",children:[C&&e.jsx(h,{variant:"secondary",label:l,onClick:n,disabled:w}),k&&e.jsx(h,{variant:f||"warning",label:s,onClick:r,disabled:v})]})]}),ariaHideApp:!0,isFooterDisplayed:!1,customWidth:`${u}px`,customHeight:`${g}px`,boxShadow:"0px 1px 4px 0px var(--toaster-boxshadow)",border:d}),exports.ProgressBar=({progressPercentage:t,totalMemory:n,usedMemory:r,color:o="var(--brand-color)",trackColor:a="#f0f0f0",height:i=10,label:c,labelFontSize:l=12,labelTextColor:s="var(--ff-card-status-text-color)",showPercentage:f=!1,percentageFontSize:d=10,percentageTextColor:u="var(--tooltip-text-color)"})=>{const b=e=>{const t=e.trim().toLowerCase();if("0"===t)return 0;const n=t.match(/^(\d+(?:\.\d+)?)\s*(kb|mb|gb)$/);if(!n||!n[1])return 0;const r=parseFloat(n[1]),o=n[2];return"gb"===o?1024*r:"kb"===o?r/1024:r};let h=0,g=c;if(void 0!==n&&void 0!==r){const e=b(r),t=b(n);t>0?(h=e/t*100,g=c||r):(h=0,g="0MB")}else h=t||0;const m=Math.max(0,Math.min(h,100)),x={width:`${m}%`,backgroundColor:o,height:`${i}px`},w={backgroundColor:a,height:`${i}px`};return e.jsxs("div",{className:"progress-bar-container "+(g?"has-label":""),children:[e.jsx("div",{className:"progress-bar-track",style:w,children:e.jsx("div",{className:"progress-bar",style:x,children:f&&e.jsx(p,{className:"progress-bar-percentage",fontSize:d,color:u,children:`${Math.round(m)}%`})})}),g&&e.jsx(p,{as:"div",className:"progress-bar-label",fontSize:l,color:s,children:g})]})},exports.RGB_COLOR_REGEX=/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,exports.ROMAN_NUMERALS_REGEX=/^(?=[MDCLXVI])M*(C[MD]|D?C{0,3})(X[CL]|L?X{0,3})(I[XV]|V?I{0,3})$/,exports.RadioButton=ln,exports.RadioGroup=({options:t,name:n,selectedValue:r,onChange:o,label:a,isLabel:i=!1,isAsteriskRequired:c=!1,className:l,classNameForLabel:s,isError:f=!1,errorMessage:u="",onBlur:b=()=>{},disabled:h})=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:d("ff-radio-group",l),tabIndex:0,onBlur:b,children:[i&&e.jsxs(p,{fontWeight:"semi-bold",className:d(s),children:[" ",c&&e.jsxs(p,{className:d("ff-required-asterisk"),children:["*"," "]}),a," "]}),t.map(t=>e.jsx(ln,{label:t.label,showTooltip:t?.showTooltip,tooltipChildren:t?.tooltipChildren,tooltipTitle:t?.tooltipTitle,tooltipPosition:t?.tooltipPosition,name:n,value:t.value,checked:r?.toLowerCase()===t.value?.toLowerCase(),onChange:()=>o?.(t),disabled:h||t.disabled},t.value))]}),f&&e.jsx(p,{as:"div",lineHeight:"15px",fontSize:10,color:"var(--error_light)",className:"ff-radio-error-msg",children:u})]}),exports.Row=({children:t,gap:n="0px",className:r=""})=>e.jsx("div",{className:d("ff-row",r),style:{gap:n},children:t}),exports.SCRIPT_REGEX=/SCR\d+/,exports.SSN_REGEX=/^\d{3}-\d{2}-\d{4}$/,exports.STEP_GROUP_NAME_REGEX=/^[a-zA-Z0-9()\-_ ]+$/,exports.Search=({placeholder:n="Search",onSearch:r,disabled:o=!1,width:a=150,value:i="",isExpand:c=!1,onClose:l,onExpand:s,showClose:f=!0,helperText:u="Minimum 3 characters is required",showToaster:h=!0,minLength:m=3,isAISearchClicked:x=!1,isClear:v=!1,handleIsClear:y})=>{const[C,k]=t.useState(i),L=t.useRef(null);t.useEffect(()=>{c&&L.current&&f&&L.current.focus(),k("")},[c]),t.useEffect(()=>{k(i)},[i]);const M=e=>{"Enter"!==e||g(C)?"Escape"===e&&E("Close"):C.trim().length<m&&h?dn.info(u):r(C.trim())};un([{key:"Enter",action:()=>M("Enter")},{key:"Escape",action:()=>M("Escape")}]);const E=e=>{k(""),"Clear"===e&&v?y?.():r(""),"Close"===e&&l?.(),"Clear"===e&&c&&L.current&&f&&L.current.focus()};return e.jsx("div",{className:d("ff-gradient-border-container",{"ai-search-active":x&&c}),children:e.jsxs("div",{className:d("ff-search-container",{expanded:c,disabled:o}),children:[e.jsx("div",{className:d("ff-search-icon",{expanded:c}),onClick:()=>{o||s?.(!c)},children:e.jsx(w,{title:o?"Search Disabled":"Search",disabled:c,children:e.jsx(b,{name:"search",height:c?14:16,width:c?14:16})})}),e.jsx("div",{className:d("ff-vertical-line",{expanded:c})}),e.jsxs("div",{className:d("ff-search-input-block",{expanded:c}),style:{width:c?`${a}px`:"0px"},children:[" ",e.jsx("input",{className:d("ff-search-input",{expanded:c}),name:"input",style:{width:c?`${a}px`:"0px"},placeholder:n,type:"text",value:C,disabled:o,ref:L,autoComplete:"off",onChange:e=>{var t;t=e.target.value,k(t),f?""===t&&r(""):r(t)}})]}),e.jsx(fn,{}),c&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:d("ff-search-clear-button",{showClose:!f}),onClick:()=>E("Clear"),children:""!==C&&e.jsx(p,{children:"Clear",fontSize:8,color:"var(--ff-search-filed-clear-text)"})}),e.jsx(w,{title:"Close",children:e.jsx("div",{className:d("ff-search-close-icon",{showClose:!f}),children:e.jsx(b,{height:6,width:6,name:"close",hoverEffect:!0,onClick:()=>{E("Close")}})})})]})]})})},exports.Select=j,exports.StatusButton=({status:t="passed",label:n="",onClick:r=()=>{},className:o="",style:a={},disabled:i=!1,...c})=>{const l="partially-executed"===t||"not-executed"===t;return e.jsx(w,{title:l?n:"",placement:"bottom",children:e.jsx("button",{className:d("ff-status-button",`ff-status-button--${t}`,o),style:a,onClick:r,disabled:i,...c,children:e.jsx(p,{as:"div",fontWeight:"semi-bold",lineHeight:"16px",textAlign:"center",className:"ff-status-button__text",children:n})})})},exports.TIME_REGEX=/^\d{2}:\d{2}:\d{2}$/,exports.TWITTER_HANDLE_REGEX=/^@?([a-zA-Z0-9_]{1,15})$/,exports.Table=({data:n=[],columns:r=[],headerType:o,withCheckbox:a=!1,onSelect:i,allSelected:c,partialSelected:l=!1,withFixedHeader:s=!0,borderWithRadius:f=!1,headerCheckboxDisabled:u=!1,noDataContent:h,height:g="100%",className:m="",tableHeadClass:x="",tableBodyRowClass:w="",headerTextColor:v,tableDataTextColor:C,headerIconName:k="",headerIconOnClick:L=()=>{},draggable:M=!1,onDragEnd:E,loadMore:_=()=>{},editMode:z="",editComponent:S,getAccordionStatus:D=()=>{},accordionContent:N,columnSticky:T=0,withOddEvenRowColor:q=!1,oddRowColor:Z,evenRowColor:j,oddRowHoverColor:P,evenRowHoverColor:R,hasMore:O=!1,loading:A=!1,onRowClick:I})=>{const H=t.useRef(null);t.useEffect(()=>{if(!H.current||!O||A)return;const e=new IntersectionObserver(e=>{e[0]?.isIntersecting&&_()},{threshold:.1});return e.observe(H.current),()=>{H.current&&e.unobserve(H.current)}},[O,A,_]);const B=(e,t)=>{let{onClick:n,accessor:r}=e;var o;n&&((o=n)&&"[object Function]"==={}.toString.call(o))&&n(r,t)},V=(e,t)=>{i&&i(e,t)};return e.jsx(Rt,{collisionDetection:ye,onDragEnd:e=>{const{active:t,over:r}=e;if(!r||t.id===r.id)return;const o=n.findIndex(e=>e._id===t.id||e.id===t.id),a=n.findIndex(e=>e._id===r.id||e.id===r.id);-1!==o&&-1!==a&&E&&E(o,a)},children:e.jsx(Gt,{disabled:!M,items:n?.map(e=>e._id||e.id),strategy:Yt,children:e.jsxs("div",{style:{height:g,position:"relative",overflowX:"auto",whiteSpace:"nowrap"},className:d(m,{"tf-fixed-header-table":s,"border-borderRadius":f}),children:[e.jsx("div",{className:"tf-table-icon",children:e.jsx(b,{height:14,width:14,name:k,onClick:L})}),e.jsxs("table",{className:d("tf-table"),cellSpacing:0,children:[e.jsx("thead",{className:d({"tf-fixed-header":s},x),children:e.jsx("tr",{children:r.map((t,n)=>e.jsx("th",{className:d(`${o&&`${o}-bg`}`,`${v&&`${v}-color`}`,{"sticky-column":T&&n<T}),style:{width:t?.width,left:T&&n<T?53*n+"px":"auto"},children:e.jsxs(p,{as:"div",fontWeight:"semi-bold",className:"tf-label-checkbox-container",children:[0===n&&a&&e.jsx("span",{className:"tf-table-checkbox",children:e.jsx(y,{onChange:e=>{V(e,{allSelected:e.target.checked})},checked:void 0!==c&&c,partial:!!l,disabled:u})}),t.header]})},t.header))})}),e.jsxs("tbody",{className:"tf-fixed-header-table",children:[n?.length>0&&n?.map((n,o)=>{const i=D(n?.id||n?._id);return e.jsx(e.Fragment,{children:z===n._id||z===n.id?e.jsx("tr",{className:d(w,"edit-row",{"disabled-row":n.disabled}),children:e.jsx("td",{colSpan:r.length,style:{padding:"0px"},children:z&&t.isValidElement(S)&&t.cloneElement(S,{rowData:n,rowIndex:o+1})})},n?._id||o):e.jsx(cn,{row:n,serialNumber:o+1,columns:r,tableBodyRowClass:w,handleOnclick:B,tableDataTextColor:C,withCheckbox:a,onSelectClick:V,draggable:M,columnSticky:T,isAccordionOpen:i,accordionContent:N,withOddEvenRowColor:q,oddRowColor:Z,evenRowColor:j,oddRowHoverColor:P,evenRowHoverColor:R,onRowClick:I})})}),O&&e.jsx("tr",{ref:H,children:e.jsx("td",{colSpan:r.length,style:{textAlign:"center",padding:"16px"},children:A?e.jsx(p,{children:"Loading more data..."}):e.jsx(p,{children:"Scroll to load more"})})})]})]}),n?.length<=0&&!A&&e.jsx("div",{className:"no-data-content",style:{height:`calc(${g} - 50px)`},children:h})]})})})},exports.Tabs=({variant:t="default",tabsData:n,activeTabId:r,onTabClick:o,noBorder:a=!1,noPadding:i=!1,titleSize:c="12px",disabledTabs:l=[],onRemoveTab:s,isSeparator:f=!1})=>e.jsxs("div",{className:"ff-tabs-container",children:[e.jsx("div",{className:d(`ff-tab-row--${t}`,{"ff-tab-row--no-border":a,"ff-tab-row--no-padding":i}),children:n.map((a,i)=>{const u=a.disabled||l.includes(a.id),h=a.isError;return e.jsxs("div",{className:"ff-tab-with-separator",children:[e.jsxs("button",{onClick:()=>!u&&o(a.id),disabled:u,className:d(`ff-tab-button--${t}`,a.className,{disabled:u,active:r===a.id,"has-remove-icon":a.isRemovable,"has-error":h}),children:[a.isRemovable&&e.jsx("span",{className:"ff-tab-remove-icon",onClick:e=>{e.stopPropagation(),s?.(a.id)},children:e.jsx(b,{height:12,width:12,name:"website"===t?"website_close_icon":"primary_close_icon",className:h?"website"===t?"ff-tab-remove-icon-error--website":"ff-tab-remove-icon-error--default":""})}),e.jsxs("div",{className:"label-count-section",children:[a.icon&&e.jsx("span",{className:h?"tab-icon-error":"tab-icon",children:a.icon}),e.jsx(p,{children:a.label,fontSize:c,lineHeight:"18px",fontWeight:r===a.id?"semi-bold":"regular",className:d("ff-tab-label",{"ff-tab-label--active":r===a.id,"ff-tab-label--disabled":u,"ff-tab-label--error":h})}),"default"===t&&a.count&&e.jsx("span",{className:d("tab-count",{"tab-count--active":r===a.id,"tab-count--disabled":u,"tab-count--error":h}),children:a.count})]}),e.jsx("div",{className:d("ff-tab-bar",{"ff-tab-bar--active":r===a.id,"ff-tab-bar--error":h})}),e.jsx("span",{className:"ff-defaultStatus "+("success"===a.status?"ff-successStatus":"error"===a.status?"ff-dangerStatus":"")})]},a.id),f&&i<n.length-1&&e.jsx("div",{className:"ff-tab-separator"})]},a.id)})}),e.jsx("div",{className:"ff-tab-content",children:n.find(e=>e.id===r)?.component})]}),exports.TextArea=({capacity:t=200,name:n,label:r,value:o="",variant:a="primary",error:i,helperText:c="",disabled:l=!1,required:s=!1,placeholder:f="Enter text",className:u="",onChange:b,onBlur:h,onFocus:g,onPaste:m,rows:x=4,cols:w=40,resize:v=!1,errorText:y,readOnly:C=!1,...k})=>{const L=d("ff-textarea-label ff-textarea-label--"+a,{"ff-textarea-label--danger":i}),M=d(`ff-textarea ff-textarea--${a}`,u,{"ff-textarea--danger":i,"ff-textarea--resize":!v}),E=d("ff-textarea-container-style",{"ff-textarea-container-style--disabled":l,"ff-textarea-container-style--float":Boolean(o)}),_=i&&s||!o,z=_?e.jsx("span",{className:"ff-textarea-error-text",children:e.jsx(p,{fontSize:12,children:y})}):null;return e.jsxs("div",{className:E,children:[""!==r&&e.jsx("label",{htmlFor:n,className:d("ff-textarea-label-container",{"ff-textarea-label-container--danger":i}),children:e.jsxs("span",{className:L,children:[s&&e.jsx("span",{className:"required-asterisk",children:"*"}),r]})}),e.jsx("textarea",{name:n,value:o,id:n,className:M,placeholder:f+"...",disabled:l,onChange:e=>{const n=e.target.value;R(n)<=t&&b?.(e)},onBlur:h,onFocus:g,onKeyDown:e=>{if("Enter"===e.key){const t=e.currentTarget,n=t.selectionStart;""===(t.value.substring(0,n).split("\n").pop()||"").trim()&&e.preventDefault()}k.onKeyDown?.(e)},onPaste:e=>{e.preventDefault();const r=e.clipboardData.getData("text/plain").split("\n").filter(e=>""!==e.trim()).join("\n"),o=e.currentTarget,a=o.selectionStart,i=o.selectionEnd,c=o.value.slice(0,a),l=o.value.slice(i),s=R(c+l);let f=t-s,d="";for(const e of r)"\n"===e?d+=e:f>0&&(d+=e,f--);const u=c+d+l,p={...e,target:{...o,name:n,value:u}};b?.(p),m?.(e)},required:s,rows:x,cols:w,readOnly:C,...k}),e.jsxs("div",{className:_?"ff-textarea-error-alignment":"msg-character-count",children:[z,t>0&&!l&&!C&&e.jsxs("div",{className:"ff-textarea-character-count",children:[e.jsxs(p,{fontSize:8,children:[R(o),"/"]}),e.jsx(p,{fontSize:8,children:t})]})]})]})},exports.TextInput=({label:n,value:r,onChange:o,name:a,placeholder:i})=>{const[c,l]=t.useState(!1);return e.jsxs("div",{style:{position:"relative",width:"100%"},children:[e.jsx("label",{style:{position:"absolute",top:r||c?"-1px":"50%",left:"12px",color:c?"#434db8":"#a3a3a3",fontSize:r||c?"10px":"12px",fontFamily:"Poppins",backgroundColor:"#fff",padding:"0 4px",transform:"translateY(-50%)",transition:"all 0.2s ease-in-out",pointerEvents:"none"},children:n}),e.jsx("input",{type:"text",value:r,onChange:o,name:a,placeholder:c?i:"",onFocus:()=>l(!0),onBlur:()=>l(!!r),style:{width:"100%",padding:r||c?" 6px 8px":"6px 8px",border:"1px solid "+(c?"#434db8":"#a3a3a3"),borderRadius:"4px",fontFamily:"Poppins",fontSize:"12px",outline:"none",transition:"border-color 0.2s ease-in-out"}})]})},exports.ThemeProvider=({children:n,theme:r})=>{const[o,a]=t.useState(r||"website-theme");return t.useEffect(()=>(document.body.className=o,()=>{document.body.className=""}),[o]),e.jsx(m.Provider,{value:{currentTheme:o,setCurrentTheme:a,applyTheme:e=>a(e)},children:n})},exports.Toaster=_,exports.Toastify=fn,exports.Toggle=({onChange:t,variant:n="primary",disabled:r,checked:o=!1,id:a="toggle",size:i="large",icon:c})=>{const l={large:10,medium:8,small:6}[i],s={name:"wrong_mark",width:l,height:l},f={checked:{...{name:"check_mark",width:l,height:l},...c?.checked},unchecked:{...s,...c?.unchecked}};return e.jsxs("div",{className:"switch-container",children:[e.jsx("input",{className:"switch-checkbox",id:`toggle-${a}`,type:"checkbox",disabled:!!r,onChange:e=>{t&&t(e)},checked:o}),e.jsx("label",{className:d(`switch-label default--${i} switch-label--${n}`,{"switch-label--disabled":r}),htmlFor:`toggle-${a}`,children:e.jsx("span",{className:d(`switch-button switch-button--${i}`,{checked:o}),children:o?e.jsx(b,{name:f.checked.name,width:f.checked.width,height:f.checked.height,className:`checked-icon--${n}`}):e.jsx(b,{name:f.unchecked.name,width:f.unchecked.width,height:f.unchecked.height,className:`unchecked-icon--${n}`})})})]})},exports.Tooltip=w,exports.Typography=p,exports.UNIT_REGEX=/[a-zA-Z]+/,exports.URL_REGEX=/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([\/\w.-]*)*\/?$/,exports.USERNAME_REGEX=/^[a-zA-Z0-9_]{3,16}$/,exports.USERNAME_SPECIAL_REGEX=/^[a-zA-Z0-9._-]{3,16}$/,exports.US_ZIP_CODE_REGEX=/^\d{5}(-\d{4})?$/,exports.UUID_REGEX=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,exports.VEHICLE_REGISTRATION_REGEX=/^[A-Z]{2}\d{2}[A-Z]{0,2}\d{4}$/,exports.WHITESPACE_REGEX=/^\s+|\s+$/g,exports.capitalize=e=>e?e.charAt(0)?.toUpperCase()+e?.slice(1)?.toLowerCase():"",exports.checkEmpty=g,exports.compareArrays=(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&(e.length===t.length&&e.every((e,n)=>{const r=t[n];return oi(e,r)})),exports.compareObjects=oi,exports.convertFormDataToObject=e=>{const t={};return e.forEach((e,n)=>{t[n]?t[n]=Array.isArray(t[n])?[...t[n],e]:[t[n],e]:t[n]=e}),t},exports.debounce=(e,t)=>{let n=null;const r=function(...r){n&&clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)};return r.cancel=()=>{n&&clearTimeout(n),n=null},r},exports.ffid=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>(0|("x"===e?16*Math.random():16*Math.random()&3|8)).toString(16)),exports.findAndInsert=function(e,t,n,r,o,a="children"){return function e(i){for(let c=0;c<i.length;c++){const l=i[c];if(l&&l[t]===n){const e=[...i];return"replace"===o?e[c]=r:e.splice("above"===o?c:c+1,0,r),{updatedArray:e}}if(l&&l[a]&&Array.isArray(l[a])){const t=e(l[a]);if(t)return{updatedArray:i.map((e,n)=>n===c?{...e,[a]:t.updatedArray}:e)}}}return null}(e)},exports.formatDate=e=>`${e.getDate().toString().padStart(2,"0")}/${(e.getMonth()+1).toString().padStart(2,"0")}/${e.getFullYear()}`,exports.getEncryptedData=(e,t)=>{const n=new Lc;n.setPublicKey(t);return n.encrypt(e)},exports.getExtension=e=>{if("string"==typeof e&&e.includes(".")){const t=e.split(".").pop();return t!==e?t:""}return e instanceof File?e.name.split(".").pop():""},exports.getExtensionWithPeriod=e=>{if("string"==typeof e&&e.includes(".")){const t=e.slice(e.lastIndexOf("."));return t!==e?t:""}if(e instanceof File){const t=e.name.lastIndexOf(".");return-1!==t?e.name.slice(t):""}return""},exports.hasDuplicateFile=(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},exports.isEmptyObject=e=>"object"==typeof e&&0===Object.keys(e).length,exports.saveFileFromBlob=(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)}},exports.throttle=(e,t)=>{let n,r=null;const o=function(...o){const a=this;null===r||Date.now()-r>=t?(e.apply(a,o),r=Date.now()):(n&&clearTimeout(n),n=setTimeout(()=>{e.apply(a,o),r=Date.now()},t-(Date.now()-r)))};return o.cancel=()=>{n&&clearTimeout(n),n=null,r=null},o},exports.toast=dn,exports.truncateText=M,exports.useClickOutside=D,exports.useKeyboardActions=un,exports.useTheme=x;
|
|
14
|
+
*/var xc={};void 0!==xc.asn1&&xc.asn1||(xc.asn1={}),xc.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="",o=0;o<n;o++)r+="f";t=new Di(r,16).xor(e).add(Di.ONE).toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(e,t){return hextopem(e,t)},this.newObject=function(e){var t=xc.asn1,n=t.DERBoolean,r=t.DERInteger,o=t.DERBitString,a=t.DEROctetString,i=t.DERNull,c=t.DERObjectIdentifier,l=t.DEREnumerated,s=t.DERUTF8String,f=t.DERNumericString,d=t.DERPrintableString,u=t.DERTeletexString,b=t.DERIA5String,p=t.DERUTCTime,h=t.DERGeneralizedTime,g=t.DERSequence,m=t.DERSet,x=t.DERTaggedObject,w=t.ASN1Util.newObject,v=Object.keys(e);if(1!=v.length)throw"key of param shall be only one.";var y=v[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+y+":"))throw"undefined key: "+y;if("bool"==y)return new n(e[y]);if("int"==y)return new r(e[y]);if("bitstr"==y)return new o(e[y]);if("octstr"==y)return new a(e[y]);if("null"==y)return new i(e[y]);if("oid"==y)return new c(e[y]);if("enum"==y)return new l(e[y]);if("utf8str"==y)return new s(e[y]);if("numstr"==y)return new f(e[y]);if("prnstr"==y)return new d(e[y]);if("telstr"==y)return new u(e[y]);if("ia5str"==y)return new b(e[y]);if("utctime"==y)return new p(e[y]);if("gentime"==y)return new h(e[y]);if("seq"==y){for(var C=e[y],k=[],L=0;L<C.length;L++){var M=w(C[L]);k.push(M)}return new g({array:k})}if("set"==y){for(C=e[y],k=[],L=0;L<C.length;L++){M=w(C[L]);k.push(M)}return new m({array:k})}if("tag"==y){var E=e[y];if("[object Array]"===Object.prototype.toString.call(E)&&3==E.length){var _=w(E[2]);return new x({tag:E[0],explicit:E[1],obj:_})}var z={};if(void 0!==E.explicit&&(z.explicit=E.explicit),void 0!==E.tag&&(z.tag=E.tag),void 0===E.obj)throw"obj shall be specified for 'tag'.";return z.obj=w(E.obj),new x(z)}},this.jsonToASN1HEX=function(e){return this.newObject(e).getEncodedHex()}},xc.asn1.ASN1Util.oidHexToInt=function(e){for(var t="",n=parseInt(e.substring(0,2),16),r=(t=Math.floor(n/40)+"."+n%40,""),o=2;o<e.length;o+=2){var a=("00000000"+parseInt(e.substring(o,o+2),16).toString(2)).slice(-8);if(r+=a.substring(1,8),"0"==a.substring(0,1))t=t+"."+new Di(r,2).toString(10),r=""}return t},xc.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 Di(e,10).toString(2),o=7-r.length%7;7==o&&(o=0);for(var a="",i=0;i<o;i++)a+="0";r=a+r;for(i=0;i<r.length-1;i+=7){var c=r.substring(i,i+7);i!=r.length-7&&(c="1"+c),n+=t(parseInt(c,2))}return n};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var r="",o=e.split("."),a=40*parseInt(o[0])+parseInt(o[1]);r+=t(a),o.splice(0,2);for(var i=0;i<o.length;i++)r+=n(o[i]);return r},xc.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""}},xc.asn1.DERAbstractString=function(e){xc.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))},mc(xc.asn1.DERAbstractString,xc.asn1.ASN1Object),xc.asn1.DERAbstractTime=function(e){xc.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,o=this.localDateToUTC(e),a=String(o.getFullYear());"utc"==t&&(a=a.substring(2,4));var i=a+r(String(o.getMonth()+1),2)+r(String(o.getDate()),2)+r(String(o.getHours()),2)+r(String(o.getMinutes()),2)+r(String(o.getSeconds()),2);if(!0===n){var c=o.getMilliseconds();if(0!=c){var l=r(String(c),3);i=i+"."+(l=l.replace(/[0]+$/,""))}}return i+"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,o,a){var i=new Date(Date.UTC(e,t-1,n,r,o,a,0));this.setByDate(i)},this.getFreshValueHex=function(){return this.hV}},mc(xc.asn1.DERAbstractTime,xc.asn1.ASN1Object),xc.asn1.DERAbstractStructured=function(e){xc.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)},mc(xc.asn1.DERAbstractStructured,xc.asn1.ASN1Object),xc.asn1.DERBoolean=function(){xc.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},mc(xc.asn1.DERBoolean,xc.asn1.ASN1Object),xc.asn1.DERInteger=function(e){xc.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=xc.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new Di(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))},mc(xc.asn1.DERInteger,xc.asn1.ASN1Object),xc.asn1.DERBitString=function(e){if(void 0!==e&&void 0!==e.obj){var t=xc.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.getEncodedHex()}xc.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 o=e.substring(n,n+8),a=parseInt(o,2).toString(16);1==a.length&&(a="0"+a),r+=a}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))},mc(xc.asn1.DERBitString,xc.asn1.ASN1Object),xc.asn1.DEROctetString=function(e){if(void 0!==e&&void 0!==e.obj){var t=xc.asn1.ASN1Util.newObject(e.obj);e.hex=t.getEncodedHex()}xc.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"},mc(xc.asn1.DEROctetString,xc.asn1.DERAbstractString),xc.asn1.DERNull=function(){xc.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},mc(xc.asn1.DERNull,xc.asn1.ASN1Object),xc.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 Di(e,10).toString(2),o=7-r.length%7;7==o&&(o=0);for(var a="",i=0;i<o;i++)a+="0";r=a+r;for(i=0;i<r.length-1;i+=7){var c=r.substring(i,i+7);i!=r.length-7&&(c="1"+c),n+=t(parseInt(c,2))}return n};xc.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="",o=e.split("."),a=40*parseInt(o[0])+parseInt(o[1]);r+=t(a),o.splice(0,2);for(var i=0;i<o.length;i++)r+=n(o[i]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueName=function(e){var t=xc.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))},mc(xc.asn1.DERObjectIdentifier,xc.asn1.ASN1Object),xc.asn1.DEREnumerated=function(e){xc.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=xc.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new Di(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))},mc(xc.asn1.DEREnumerated,xc.asn1.ASN1Object),xc.asn1.DERUTF8String=function(e){xc.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"},mc(xc.asn1.DERUTF8String,xc.asn1.DERAbstractString),xc.asn1.DERNumericString=function(e){xc.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"},mc(xc.asn1.DERNumericString,xc.asn1.DERAbstractString),xc.asn1.DERPrintableString=function(e){xc.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"},mc(xc.asn1.DERPrintableString,xc.asn1.DERAbstractString),xc.asn1.DERTeletexString=function(e){xc.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"},mc(xc.asn1.DERTeletexString,xc.asn1.DERAbstractString),xc.asn1.DERIA5String=function(e){xc.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"},mc(xc.asn1.DERIA5String,xc.asn1.DERAbstractString),xc.asn1.DERUTCTime=function(e){xc.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))},mc(xc.asn1.DERUTCTime,xc.asn1.DERAbstractTime),xc.asn1.DERGeneralizedTime=function(e){xc.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))},mc(xc.asn1.DERGeneralizedTime,xc.asn1.DERAbstractTime),xc.asn1.DERSequence=function(e){xc.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}},mc(xc.asn1.DERSequence,xc.asn1.DERAbstractStructured),xc.asn1.DERSet=function(e){xc.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)},mc(xc.asn1.DERSet,xc.asn1.DERAbstractStructured),xc.asn1.DERTaggedObject=function(e){xc.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)))},mc(xc.asn1.DERTaggedObject,xc.asn1.ASN1Object);var wc,vc,yc=window&&window.__extends||(wc=function(e,t){return wc=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])},wc(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}wc(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Cc=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 yc(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)?mi(e):xi.unarmor(e),o=Ei.decode(r);if(3===o.sub.length&&(o=o.sub[2].sub[0]),9===o.sub.length){t=o.sub[1].getHexStringValue(),this.n=Pi(t,16),n=o.sub[2].getHexStringValue(),this.e=parseInt(n,16);var a=o.sub[3].getHexStringValue();this.d=Pi(a,16);var i=o.sub[4].getHexStringValue();this.p=Pi(i,16);var c=o.sub[5].getHexStringValue();this.q=Pi(c,16);var l=o.sub[6].getHexStringValue();this.dmp1=Pi(l,16);var s=o.sub[7].getHexStringValue();this.dmq1=Pi(s,16);var f=o.sub[8].getHexStringValue();this.coeff=Pi(f,16)}else{if(2!==o.sub.length)return!1;if(o.sub[0].sub){var d=o.sub[1].sub[0];t=d.sub[0].getHexStringValue(),this.n=Pi(t,16),n=d.sub[1].getHexStringValue(),this.e=parseInt(n,16)}else t=o.sub[0].getHexStringValue(),this.n=Pi(t,16),n=o.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(e){return!1}},t.prototype.getPrivateBaseKey=function(){var e={array:[new xc.asn1.DERInteger({int:0}),new xc.asn1.DERInteger({bigint:this.n}),new xc.asn1.DERInteger({int:this.e}),new xc.asn1.DERInteger({bigint:this.d}),new xc.asn1.DERInteger({bigint:this.p}),new xc.asn1.DERInteger({bigint:this.q}),new xc.asn1.DERInteger({bigint:this.dmp1}),new xc.asn1.DERInteger({bigint:this.dmq1}),new xc.asn1.DERInteger({bigint:this.coeff})]};return new xc.asn1.DERSequence(e).getEncodedHex()},t.prototype.getPrivateBaseKeyB64=function(){return pi(this.getPrivateBaseKey())},t.prototype.getPublicBaseKey=function(){var e=new xc.asn1.DERSequence({array:[new xc.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new xc.asn1.DERNull]}),t=new xc.asn1.DERSequence({array:[new xc.asn1.DERInteger({bigint:this.n}),new xc.asn1.DERInteger({int:this.e})]}),n=new xc.asn1.DERBitString({hex:"00"+t.getEncodedHex()});return new xc.asn1.DERSequence({array:[e,n]}).getEncodedHex()},t.prototype.getPublicBaseKeyB64=function(){return pi(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}(hc),kc="undefined"!=typeof process?null===(vc=process.env)||void 0===vc?void 0:vc.npm_package_version:void 0,Lc=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 Cc(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(hi(e))}catch(e){return!1}},e.prototype.encrypt=function(e){try{return pi(this.getKey().encrypt(e))}catch(e){return!1}},e.prototype.encryptOAEP=function(e){try{return pi(this.getKey().encrypt(e,pc))}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 pi(this.getKey().sign(e,t,n))}catch(e){return!1}},e.prototype.signSha256=function(e){return this.sign(e,function(e){return tc(ec(e))},"sha256")},e.prototype.verify=function(e,t,n){void 0===n&&(n=function(e){return e});try{return this.getKey().verify(e,hi(t),n)}catch(e){return!1}},e.prototype.verifySha256=function(e,t){return this.verify(e,t,function(e){return tc(ec(e))})},e.prototype.getKey=function(e){if(!this.key){if(this.key=new Cc,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=kc,e}();const Mc=/[.*+?^${}()|[\]\\]/g;function Ec(e,t=[]){return t.reduce((e,t)=>e.replace(new RegExp(function(e){return e.replace(Mc,"\\$&")}(t),"gi"),""),e).replace(/([A-Z])/g," $1").trim().replace(/^./,e=>e.toUpperCase())}exports.AADHAAR_REGEX=/^\d{12}$/,exports.ALPHABET_ONLY_REGEX=/^[A-Za-z]+$/,exports.ALPHANUMERIC_REGEX=/^[A-Za-z0-9]+$/,exports.ALPHANUMERIC_WITH_ROUND_BRACES_REGEX=/^[a-zA-Z0-9-_() ]*$/,exports.Accordion=({headerTitle:n="",color:r,minHeight:o="32px",accordionContent:a=e.jsx(e.Fragment,{children:"This is accordion content"}),disable:i=!1,disableInfoMessage:c="",accordionStateIconName:l="arrow_down",AccordionStateIconWidth:s=12,AccordionStateIconHeight:f=12,isExpand:u,onClick:h,className:g="",iconColor:m="var(--brand-color)",headerRightContent:x,headerClassName:v=""})=>{const[y,C]=t.useState(!0);t.useEffect(()=>{void 0!==u&&C(u)},[u]);return e.jsxs("div",{className:`ff-accordion ${g}`,children:[e.jsxs("div",{className:`accordion-header ${i&&"ff-disabled"} ${y&&"expanded"} `,style:{color:r||"--tooltip-bg-color"},onClick:()=>{h&&h(),i||C(!y)},children:[e.jsxs("div",{className:`header-title-container ${v}`,children:[e.jsx(w,{title:c,children:e.jsx(p,{as:"div",className:"header-title",fontWeight:"semi-bold",lineHeight:"18px",children:n})}),x]}),e.jsx(b,{name:l,hoverEffect:!1,className:d("accordion-arrow",{expanded:y}),width:s,height:f,color:m})]}),!i&&y&&e.jsx("div",{style:{minHeight:o},className:"accordion-content",children:a})]})},exports.Avatar=({variant:t="small",iconName:n,iconColor:r="var(--avatar-icon-color)",customAvatarSize:o,customIconSize:a,backgroundColor:i,label:c,labelFontSize:l})=>{const s=c?.slice(0,2);return e.jsx("div",{className:`ff-avatar ff-avatar--${t}`,style:{height:`${o}px`,width:`${o}px`,backgroundColor:i},children:c?e.jsx("span",{className:"ff-avatar-label",style:{fontSize:l||"14px",color:r},children:s}):e.jsx(b,{name:n,height:a,width:a,color:r})})},exports.BASE64_REGEX=/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/,exports.BINARY_NUMBER_REGEX=/^[01]+$/,exports.Button=h,exports.CAMEL_CASE_REGEX=/(?:^\w|[A-Z]|\b\w|\s+)/g,exports.CERTIFICATES_NAME_REGEX=/^[^:;/\\@()=?{}[\]<>,.]*$/,exports.CREDIT_CARD_REGEX=/^\d{4}-?\d{4}-?\d{4}-?\d{4}$/,exports.CURRENCY_GENERIC_REGEX=/^[\u0024-\u20B9]?\d+(,\d{3})*(\.\d{1,2})?$/,exports.Checkbox=y,exports.Chip=({iconName:t,content:n,iconPlacement:r="left",className:o})=>e.jsx("div",{className:`"chip-with-icon" ${o}`,children:"right"===r?e.jsxs(e.Fragment,{children:["string"==typeof n?e.jsx(p,{children:n}):n,e.jsx(b,{name:t})]}):e.jsxs(e.Fragment,{children:[e.jsx(b,{name:t}),"string"==typeof n?e.jsx(p,{children:n}):n]})}),exports.Col=({children:t,size:n=12,className:r=""})=>{const o=`ff-col-${n}`;return e.jsx("div",{className:d(o,r),children:t})},exports.Container=({children:t,fluid:n=!1,gap:r="0px",className:o=""})=>{const a=n?"ff-container-fluid":"ff-container";return e.jsx("div",{className:d(a,o),style:{gap:r},children:t})},exports.CountChip=({count:t})=>e.jsx("div",{className:"chip-border",children:e.jsx(p,{color:"#434DB8",fontSize:12,fontWeight:"regular",children:t})}),exports.DATE_REGEX=/^\d{4}-\d{2}-\d{2}$/,exports.DECIMAL_NUMBER_REGEX=/^-?\d+(\.\d+)?$/,exports.DRIVING_LICENSE_REGEX=/^[A-Z]{2}-\d{2}-\d{4}-\d{7}$/,exports.DYNAMIC_VALUE_PATTERN_REGEX=/\{Dynamic Val[0-9]+\}/g,exports.DYNAMIC_VALUE_TYPE_REGEX=/{([^}]+)}/g,exports.DYNAMIC_VALUE_WITH_VALID_BRACKETS_REGEX=/\{Dynamic Val[A-Za-z0-9\s]+\}/g,exports.DYNAMIC_VALUE__PLACEHOLDER_REGEX=/Dynamic Val[0-9]+/g,exports.DatePicker=Qa,exports.DonutChart=({radius:n=60,lineWidth:r=15,resultStats:o=[],gapAngle:a=.06,legendDetailsType:i="",isLegendDetails:c=!0,totalCount:l})=>{const[s,f]=t.useState(null),{colorMapping:d,hoverMapping:u}={colorMapping:{passed:"var(--status-success-text-color)",failed:"var(--status-rejected-text-color)",warning:"var(--status-warning-text-color)",skipped:"var(--status-skipped-text-color)",default:"var(--brand-color)"},hoverMapping:{passed:"var(--status-success-bg-color)",failed:"var(--status-rejected-bg-color)",warning:"var(--status-warning-bg-color)",skipped:"var(--status-skipped-bg-color)",default:"var(--status-percentage-growth-bg-color)"}},b=o?.filter(({count:e})=>e>0),p=a*b.length;let h=2*Math.PI-p,g=-Math.PI/2;const m=2*Math.PI*.01;b.forEach(({count:e})=>{const t=e/l,n=Math.max(t*(2*Math.PI),m);h-=n});const x=e=>f(e),w=()=>f(null),v=2*(n+r)+8;return e.jsxs("div",{className:"ff-donut-chart-section",children:[e.jsx("div",{className:"ff-donut-chart-svg-container",children:e.jsx("svg",{width:v,height:v,viewBox:`0 0 ${v} ${v}`,children:e.jsxs("g",{transform:`translate(${n+r+4}, ${n+r+4})`,children:[b?.map((t,o)=>{const i=t.count/l;let c=Math.max(i*(2*Math.PI),m);c+=h*i;return((t,o,i)=>{const c=t?.status?.toLowerCase(),l=1===b.length,f=l?ri(0,0,n,0,2*Math.PI):ri(0,0,n,g,o),u=n+r-1,p=l?ri(0,0,u,0,2*Math.PI):ri(0,0,u,g,o);return g=o+a,e.jsxs("g",{children:[e.jsx("path",{d:f,fill:"none",stroke:d[c],strokeWidth:r,onMouseEnter:()=>x(c),onMouseLeave:w,strokeOpacity:null===s||s===c?.8:.3}),s===c&&e.jsx("path",{d:p,fill:"none",stroke:d[c],strokeWidth:4,strokeOpacity:.3})]},i)})(t,g+c,o)}),e.jsx("text",{x:"0",y:"-18",textAnchor:"middle",fill:d.default,children:s?s?.toUpperCase():"TOTAL"}),e.jsx("text",{x:"0",y:"5",textAnchor:"middle",fill:d.skipped,children:s?`${o?.find(e=>e?.status?.toLowerCase()===s)?.count} ${i}`:`${l} ${i}`}),e.jsx("rect",{x:-17,y:14,width:34,height:18,fill:s?u[s?.toLowerCase()]:u.default,rx:"5",ry:"5"}),e.jsx("text",{x:"0",y:"26",textAnchor:"middle",fill:s?d[s?.toLowerCase()]:d.default,children:s?`${(o?.find(e=>e?.status?.toLowerCase()===s)?.percentage||0)?.toFixed(2)}%`:"100%"})]})})}),c&&e.jsx("div",{className:"ff-status-container",children:["passed","failed","warning","skipped"]?.map(t=>(t=>{const n=o?.find(e=>e.status?.toLowerCase()===t?.toLowerCase());return e.jsxs("div",{className:"ff-status-item "+(null===s||s===t?"ff-highlighted":"ff-fade"),onMouseEnter:()=>x(t),onMouseLeave:w,children:[e.jsxs("div",{className:"ff-status-label",children:[e.jsx("div",{className:"ff-status-color",style:{backgroundColor:d[t]}}),e.jsx("div",{className:"ff-status-text",children:t?.charAt(0)?.toUpperCase()+t?.slice(1)?.toLowerCase()})]}),e.jsxs("div",{className:"ff-status-details",children:[e.jsxs("div",{className:"ff-status-details-script-count",children:[n?.count||0,e.jsx("span",{children:i})]}),e.jsxs("div",{className:"ff-status-details-script-percentage",children:["(",n?.percentage?.toFixed(2)||0,"%)"]})]})]},t)})(t))})]})},exports.ELEMENTS_TRAILING_SPACE_REGEX=/^\S.*\S$/,exports.ELEMENTS_WHITE_SPACE_REGEX=/.*\S.*/,exports.EMAIL_REGEX=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,exports.FILE_EXTENSION_REGEX=/\.(jpg|png|gif|bmp)$/i,exports.FILE_NAME_REGEX=/\.([^.@]+)$/,exports.FormatString=function(e,t=[]){return e.toUpperCase()===e&&(e=e.toLowerCase()),e.includes("_")?function(e){return e.toLowerCase().replace(/_/g," ").replace(/^./,e=>e.toUpperCase())}(e):Ec(e,t)},exports.GSTIN_REGEX=/^\d{2}[A-Z]{5}\d{4}[A-Z]{1}[A-Z\d]{1}[Z]{1}[A-Z\d]{1}$/,exports.HEXADECIMAL_NUMBER_REGEX=/^[0-9A-Fa-f]+$/,exports.HEX_COLOR_REGEX=/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6})$/,exports.HSL_COLOR_REGEX=/^hsl\((\d{1,3}),\s*(\d{1,3})%,\s*(\d{1,3})%\)$/,exports.HTML_ATTRIBUTE_REGEX=/\b[a-zA-Z-]+(="[^"]*"|='[^']*'|=[^\s>]*)?/g,exports.HTML_TAG_REGEX=/<\/?[\w\s=\"'\/\.:;#-]*>/g,exports.INDIAN_CURRENCY_REGEX=/^\u20B9?\s?\d{1,3}(,\d{3})*(\.\d{1,2})?$/,exports.INDIAN_PASSPORT_REGEX=/^[A-Z]{1}-?\d{7}$/,exports.INDIAN_PHONE_REGEX=/^[6-9]\d{9}$/,exports.INDIAN_PIN_CODE_REGEX=/^\d{6}$/,exports.INTERNATIONAL_PHONE_REGEX=/^\+?[1-9]\d{1,14}$/,exports.IPV4_REGEX=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,exports.IPV6_REGEX=/^(?:[a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4}$/,exports.Icon=b,exports.IconButton=Ja,exports.Input=z,exports.InputWithDropdown=ni,exports.LINKEDIN_PROFILE_REGEX=/^https?:\/\/(www\.)?linkedin\.com\/in\/([a-zA-Z0-9-]{5,30})$/,exports.LabelSelectInput=({label:n="Enter a value",onChange:r,required:o=!0,defaultValue:a=[],disabled:i=!1,errorMsg:c,validationType:l,enterOnSpace:s=!1,enterOnTab:f=!1})=>{const[d,u]=t.useState(""),[h,g]=t.useState(a),[m,x]=t.useState(!1),[w,v]=t.useState(0),[y,C]=t.useState(!1),k=t.useRef(null);t.useEffect(()=>{if(k.current){const e=k.current.offsetWidth;let t=0,n=0;const r=k.current.querySelectorAll(".ff-tag");for(const o of r){if(t+=o.offsetWidth,!(t<=.8*e))break;n++}const o=h.length-n;v(o>0?o:0)}0===h.length&&C(!1)},[h]);const L=e=>{if(i)return;const t=h.filter(t=>t!==e);g(t),r?.(t),0===t.length&&C(!1)},M=e=>{k.current&&!k.current.contains(e.target)&&C(!1)};t.useEffect(()=>(document.addEventListener("mousedown",M),()=>{document.removeEventListener("mousedown",M)}),[]);const E=h.slice(0,h.length-w),_=Boolean(c);return e.jsxs("div",{className:"ff-label-select-input",ref:k,children:[e.jsx("div",{className:`ff-label-select-input-container ${_?"ff-error":""} ${i?"ff-disabled":""}`,children:e.jsxs("div",{className:"ff-label-select-input-inner-container",children:[E.map((t,n)=>e.jsxs("span",{className:"ff-tag",children:[t,e.jsx(b,{name:"close_pill",onClick:()=>L(t)})]},n)),w>0&&e.jsxs("span",{className:"ff-tag ff-hidden-tag",onClick:()=>{h.length>0&&C(e=>!e)},children:["+",w]}),e.jsxs("div",{className:"ff-input-wrapper",children:[e.jsxs("label",{className:`ff-placeholder ${m||d||h.length?"ff-placeholder-active":""} ${_?"ff-placeholder-error":""}`,children:[o&&e.jsx("span",{className:"ff-required-asterisk",children:"*"})," ",n]}),e.jsx("input",{type:"text",className:`ff-input ${_?"ff-input-error":""} ${i?"ff-input-disabled":""}`,value:d,onFocus:i?void 0:()=>x(!0),onBlur:i?void 0:()=>{d||x(!1)},onChange:i?void 0:e=>{u(e.target.value)},onKeyDown:i?void 0:e=>{const t="Enter"===e.key,n=s&&" "===e.key,o=f&&"Tab"===e.key;if((t||n||o)&&d.trim()){if(e.preventDefault(),!h.includes(d.trim()))if("email"===l){if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(d.trim()))return void dn.error("Invalid email");{const e=[...h,d.trim()];g(e),r?.(e),C(!1)}}else{const e=[...h,d.trim()];g(e),r?.(e),C(!1)}u("")}else if("Backspace"===e.key&&!d&&h.length>0){e.preventDefault();const t=h.slice(0,-1);g(t),r?.(t)}},required:o,disabled:i})]})]})}),c&&e.jsx(p,{fontSize:"10px",className:"ff-error-message",children:c}),y&&h.length>0&&e.jsx("div",{className:"ff-tag-box",children:h.map((t,n)=>e.jsxs("div",{className:"ff-tag-box-item",children:[t,e.jsx(b,{name:"close_pill",onClick:()=>L(t)})]},n))})]})},exports.MAC_ADDRESS_REGEX=/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/,exports.MEMORY_VALIDATION_REGEX=/^(\d+\.?\d*)\s*(GB|MB|KB)?$/i,exports.Modal=ei,exports.ModuleChip=({label:t="",isActive:n=!0,onClick:r=()=>{},isFilterChip:o=!1,className:a=""})=>{const i=o?"filter":"module";return e.jsx("div",{className:d("module-chip",{"filter-chip":o,[`${i}-chip--active`]:n,[`${i}-chip--hover`]:!n},a),onClick:r,children:e.jsx(p,{lineHeight:"18px",className:"module-typography",children:t})})},exports.MultiSelect=({options:r=[],type:o="text",selectedOptions:a=[],onChange:i=()=>{},acceptNewOption:c=!1,zIndex:l=100,label:s="",onSearch:f=()=>{},required:u=!1,disabled:h=!1,errorMessage:m="Fill this field",displayCount:x=!1,isAllSelected:v,onToggleAllSelect:y,displayAllSelectedAsText:M,isAllSelect:_,placeholderForSearching:z="Search",variant:S="default",onLabelPlusIconClick:D=async()=>{},className:N="",onSelectButtonClick:T=()=>{},labelAccessor:q="label",valueAccessor:Z="value",withSelectButton:j="machines"===S,loadMoreOptions:P=()=>{},onEnter:R=()=>{},maxVisibleChips:O=2,onBlur:A=()=>{},maxDropdownHeight:I=160,showTooltip:H=!1,tooltipCharCount:B=0})=>{const[V,F]=t.useState(!1),[W,$]=t.useState(r),[Y,X]=t.useState(""),[U,G]=t.useState(!1),[K,Q]=t.useState(""),[J,ee]=t.useState(!1),[te,ne]=t.useState(x),[re,oe]=t.useState({top:0,left:0,width:0,fromBottom:0,selectHeight:0}),[ae,ie]=t.useState("white"),ce=t.useRef(null),le=t.useRef(null),se=t.useRef(null),fe=t.useRef(null);let de=U&&0===a.length;const ue=a.length-O,be=(e,t)=>{ce.current?.focus();const n=W.map(n=>k(n,Z)===k(e,Z)?{...n,isChecked:t}:n);$(n);const r=n.filter(e=>e.isChecked).map(({isChecked:e,...t})=>t);if(U||G(!0),g(e))return F(!1),void T?.(r);i&&i(r)},pe=(e,t)=>{t.stopPropagation(),be(e,!1)},he=async()=>{try{await D(Y),X(""),ee(!1)}catch(e){}};t.useEffect(()=>{if(fe.current){const e=fe.current.parentElement?.parentElement;if(e){const t=(e=>{let t=e;for(;t;){const e=window.getComputedStyle(t);if("rgba(0, 0, 0, 0)"!==e.backgroundColor)return e.backgroundColor;t=t.parentElement}return""})(e);t&&ie(t)}}},[fe.current]);const ge=()=>{if(le.current&&fe.current){const e=le.current.getBoundingClientRect(),t=fe.current.getBoundingClientRect();oe({top:e.bottom+window.scrollY,left:e.left+window.scrollX,width:e.width,fromBottom:document.documentElement.clientHeight-(e.bottom-4),selectHeight:t.height})}};t.useEffect(()=>{const e=le.current?.getBoundingClientRect();oe(t=>({...t,width:e?.width}))},[J]),t.useEffect(()=>{V&&ge(),V||X("")},[V,W]);const me=e=>{const t=function(){const e=document.createElement("div");e.style.visibility="hidden",e.style.overflow="scroll",document.body.appendChild(e);const t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}();document.body.scrollHeight>window.innerHeight&&(document.body.style.paddingRight=e?"":`${t}px`),document.body.style.overflow=e?"":"hidden"};t.useEffect(()=>(V&&me(!V),se?.current&&ce?.current?.focus(),()=>{me(!0)}),[V]),t.useEffect(()=>{!V&&U&&A()},[V,U]),t.useEffect(()=>{let e=r;g(r)||g(a)||(e=r.map(e=>({...e,isChecked:a.some(t=>k(t,Z)===k(e,Z))}))),$(e)},[r,a]),t.useEffect(()=>{const e=e=>{j&&le.current&&fe.current&&se.current&&!se.current.contains(e?.target)&&!fe.current.contains(e?.target)&&(Q(""),F(!1),U||G(!0)),!(le.current&&ce.current&&fe.current&&se.current)||ce.current.contains(e?.target)||se.current.contains(e?.target)||fe.current.contains(e?.target)||e?.target&&e.target.closest(".ff-label-plus-icon")||(Q(""),F(!1),U||G(!0))};return window.addEventListener("resize",ge),window.addEventListener("click",e,!0),()=>{window.removeEventListener("resize",ge),window.removeEventListener("click",e),document.body.style.overflow="auto"}},[]);const xe=M&&a.length===W.length;return e.jsxs("div",{className:`ff-multiselect-container-with-icon ${N}`,children:[e.jsxs("div",{ref:fe,className:d("ff-multiselect-wrapper",{"ff-multiselect-wrapper--with-options":a?.length,"ff-multiselect-wrapper--opened-dropdown":V,"ff-multiselect-wrapper--error":de&&u||K,"ff-multiselect-wrapper--disabled":h}),children:[e.jsxs("div",{className:"ff-multiselect",onClick:()=>{V?j&&se.current&&F(!1):F(!0)},children:[e.jsxs("div",{className:"ff-multiselect__main",children:[e.jsx(p,{style:{backgroundColor:ae},className:d({"active-default-label":V||!j&&a?.length||de&&u,"default-label":!V&&!a?.length}),required:u,children:s}),e.jsxs("div",{className:"ff-multiselect-chip-container",children:[!j&&(M&&a.length===W.length&&"name"!==q?e.jsx(E,{zIndex:l,label:"All",onChipCloseClick:e=>{e.stopPropagation();const t=W.map(e=>({...e,isChecked:!1}));$(t),i&&i([])},disableChip:!1},"all"):te?e.jsx(e.Fragment,{children:a.slice(0,O).map(t=>e.jsx(E,{zIndex:l,label:C(t,q)||"",onChipCloseClick:e=>pe(t,e),disableChip:t?.isDisabled||!1},C(t,q)))}):a.map(t=>e.jsx(E,{zIndex:l,label:C(t,q)||"",onChipCloseClick:e=>pe(t,e),disableChip:t?.isDisabled||!1},C(t,q)))),!xe&&e.jsx("div",{className:"ff-multiselect-input-container",children:e.jsx("input",{value:Y,type:o,autoComplete:"off",placeholder:z,ref:ce,onChange:e=>{V||F(!0);const t=e.target.value;if(X(t),f?.(t),t.length>2){const e=W.find(e=>C(e,Z)?.toLowerCase()===t.toLowerCase());ee(!e)}else ee(!1)},onKeyDown:e=>{if(c&&"Enter"===e.key){if(Q(""),"email"===o){if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(Y))return F(!1),void Q("Please enter a valid email address.")}R?.(Y),X(""),F(!1)}},id:"input-ele",className:"ff-select-input",style:{display:V||a.length&&!j?"inherit":"none"}})})]})]}),ue>0&&te&&e.jsx("div",{className:"ff-multiselect-more-chip",onClick:()=>{F(!1),ne(!1)},children:e.jsxs(p,{fontSize:12,fontWeight:"semi-bold",lineHeight:"16px",color:"var(--brand-color)",children:["+",ue]})}),e.jsx("div",{onClick:e=>{(e=>{e.stopPropagation(),ce.current?.focus(),F(e=>!e),!U&&V&&G(!0)})(e)},className:"ff-multiselect__toggle",children:e.jsx(b,{name:"arrow_down",className:d({"ff-select-arrow--opened-dropdown":V,"ff-select-arrow":!V}),color:V?"var(--brand-color)":"var(--default-icon-color)",height:8,width:12})})]}),e.jsxs("div",{ref:le,children:[(K||de&&u&&m)&&e.jsx(p,{children:K||m,fontSize:10,className:"error-text"}),V&&n.createPortal(e.jsx(L,{ref:se,searchedKeyword:Y,checkedOptions:a,handleOptionChange:(e,t)=>{be(e,t),X("")},options:W,dropdownPosition:re,zIndex:l,withSelectButton:j,labelAccessor:q,valueAccessor:Z,loadMoreOptions:P,isAllSelected:v,onToggleAllSelect:y,isAllSelect:_,maxDropdownHeight:I,variant:S,handleIconClick:he,showTooltip:H,tooltipCharCount:B}),document.body)]})]}),"labels"===S&&J&&e.jsx(w,{title:"Add Label",placement:"top",zIndex:l+1,children:e.jsx(b,{name:"label_plus",onClick:he,className:"ff-label-plus-icon"})})]})},exports.NLP_DESCRIPTION_REGEX=/^[a-zA-Z0-9_$\s]*$/,exports.NUMBERS_ONLY_REGEX=/^\d+$/,exports.NUMBER_REGEX=/([0-9\.]+)/,exports.NestedAccordian=({data:n,onItemSelect:r,height:o="100%",width:a="100%",headerIcon:i,fontSize:c=10,fontWeight:l="medium",expandedIcon:s="arrow_down",collapsedIcon:f="arrow_right",onExpandHandler:d=()=>{}})=>{const[u,b]=t.useState([]),[h,g]=t.useState(null),[m,x]=t.useState(!0),w=t.useRef(null);t.useEffect(()=>{n&&n[0]?.children&&m&&(b([n[0]?._id]),g(n[0].children[0]?._id||null),n[0].children[0]&&r?.(n[0].children[0]),x(!1))},[n,m]);const v=(t,n=0)=>{const o=t.expanded,a=t.hasChildren,m=h===t?._id,x=u.includes(t?._id)&&!m,y=m&&n>0;return e.jsxs("div",{className:`'accordian_container'${x?"selected":""} `,onClick:e=>e.stopPropagation(),children:[e.jsxs("div",{className:`'accordian_item_header'\n ${m?"selected":""} \n ${x?"parent-selected":""}\n ${y?"child-selected":""}\n `,ref:w,onClick:e=>{e.stopPropagation()},style:{marginLeft:12*n+8+"px"},children:[e.jsxs(p,{fontSize:c,fontWeight:l,lineHeight:"15px",className:"accordian_header_label",onClick:()=>{g(t?._id),r?.(t)},children:[i&&i," ",t.name]}),a&&e.jsx(ti,{name:o?s:f,className:"icon",onIconClick:e=>((e,t)=>{t.stopPropagation(),u.includes(e?._id)?b(t=>{const n=t.findIndex(t=>t===e?._id);return t.splice(n,1),[...t]}):b(t=>[...t,e?._id]),d?.(e,!e.expanded)})(t,e)})]}),o&&a&&t.children&&e.jsx("div",{onClick:e=>e.stopPropagation(),children:t.children.map(e=>v(e,n+1))})]},t?._id)};return e.jsx("div",{style:{height:o,width:a},children:n.map(e=>v(e))})},exports.PAN_CARD_REGEX=/^[A-Z]{5}\d{4}[A-Z]{1}$/,exports.PARAMETER_ALPHANUMERIC_REGEX=/^[-_A-Za-z0-9 ]*$|^[-_A-Za-z0-9 ][A-Za-z0-9 ]*[-_A-Za-z-_]$/,exports.PASSWORD_COMPLEX_REGEX=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/,exports.PASSWORD_SIMPLE_REGEX=/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/,exports.PHONE_REGEX=/^\+?[\d\s\-()]{7,15}$/,exports.POSTAL_CODE_REGEX=/^[A-Za-z\d\s\-]{3,10}$/,exports.PopUpModal=({isOpen:t,onClose:n,onContinue:r,titleMessage:o="Warning!",subTitleMessage:a="Unsaved Changes.",iconName:i,modalMessage:c="Your web service data will be lost. Are you sure you want to exit?",firstButtonLabel:l="Cancel",secondButtonLabel:s="Continue",buttonVariant:f="warning",border:d="1px solid var(--warning-modal-border-color)",popupWidth:u="420",popupHeight:g="226",colorForTitleMessage:m="var(--status-button-bg-warning)",footerContent:x,firstButtonDisabled:w=!1,secondButtonDisabled:v=!1,zIndex:y=1100,showFirstButton:C=!0,showSecondButton:k=!0,showCloseIcon:L=!1,showHeader:M=!0,shouldCloseOnEsc:E=!0,shouldCloseOnOverlayClick:_=!0})=>e.jsx(ei,{overlayClassName:"custom-overlay",isOpen:t,onClose:n,isHeaderDisplayed:!1,zIndex:y,shouldCloseOnEsc:E,shouldCloseOnOverlayClick:_,children:e.jsxs("div",{className:"warning_modal_container",children:[e.jsxs("div",{className:"warning_modal_content",children:[e.jsx(b,{name:i,className:"warning_modal_icon",width:94,height:94}),e.jsxs("div",{className:"warning_modal_message",children:[M&&e.jsxs(p,{fontSize:20,fontWeight:"semi-bold",className:"warning_modal_title_wrapper",children:[e.jsxs("div",{children:[e.jsx(p,{color:`${m}`,fontSize:20,fontWeight:"semi-bold",children:o}),e.jsx(p,{fontSize:20,fontWeight:"semi-bold",children:a})]}),L&&e.jsx(b,{name:"close",color:"warning"===f?"#fFC600":"#c90000",width:16,height:16,onClick:n})]}),e.jsxs("div",{className:"warning_modal_message_wrapper",children:[e.jsx(p,{fontSize:16,children:c}),e.jsx(p,{as:"div",children:x})]})]})]}),e.jsxs("div",{className:"warning_modal_footer_button",children:[C&&e.jsx(h,{variant:"secondary",label:l,onClick:n,disabled:w}),k&&e.jsx(h,{variant:f||"warning",label:s,onClick:r,disabled:v})]})]}),ariaHideApp:!0,isFooterDisplayed:!1,customWidth:`${u}px`,customHeight:`${g}px`,boxShadow:"0px 1px 4px 0px var(--toaster-boxshadow)",border:d}),exports.ProgressBar=({progressPercentage:t,totalMemory:n,usedMemory:r,color:o="var(--brand-color)",trackColor:a="#f0f0f0",height:i=10,label:c,labelFontSize:l=12,labelTextColor:s="var(--ff-card-status-text-color)",showPercentage:f=!1,percentageFontSize:d=10,percentageTextColor:u="var(--tooltip-text-color)"})=>{const b=e=>{const t=e.trim().toLowerCase();if("0"===t)return 0;const n=t.match(/^(\d+(?:\.\d+)?)\s*(kb|mb|gb)$/);if(!n||!n[1])return 0;const r=parseFloat(n[1]),o=n[2];return"gb"===o?1024*r:"kb"===o?r/1024:r};let h=0,g=c;if(void 0!==n&&void 0!==r){const e=b(r),t=b(n);t>0?(h=e/t*100,g=c||r):(h=0,g="0MB")}else h=t||0;const m=Math.max(0,Math.min(h,100)),x={width:`${m}%`,backgroundColor:o,height:`${i}px`},w={backgroundColor:a,height:`${i}px`};return e.jsxs("div",{className:"progress-bar-container "+(g?"has-label":""),children:[e.jsx("div",{className:"progress-bar-track",style:w,children:e.jsx("div",{className:"progress-bar",style:x,children:f&&e.jsx(p,{className:"progress-bar-percentage",fontSize:d,color:u,children:`${Math.round(m)}%`})})}),g&&e.jsx(p,{as:"div",className:"progress-bar-label",fontSize:l,color:s,children:g})]})},exports.RGB_COLOR_REGEX=/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,exports.ROMAN_NUMERALS_REGEX=/^(?=[MDCLXVI])M*(C[MD]|D?C{0,3})(X[CL]|L?X{0,3})(I[XV]|V?I{0,3})$/,exports.RadioButton=ln,exports.RadioGroup=({options:t,name:n,selectedValue:r,onChange:o,label:a,isLabel:i=!1,isAsteriskRequired:c=!1,className:l,classNameForLabel:s,isError:f=!1,errorMessage:u="",onBlur:b=()=>{},disabled:h})=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:d("ff-radio-group",l),tabIndex:0,onBlur:b,children:[i&&e.jsxs(p,{fontWeight:"semi-bold",className:d(s),children:[" ",c&&e.jsxs(p,{className:d("ff-required-asterisk"),children:["*"," "]}),a," "]}),t.map(t=>e.jsx(ln,{label:t.label,showTooltip:t?.showTooltip,tooltipChildren:t?.tooltipChildren,tooltipTitle:t?.tooltipTitle,tooltipPosition:t?.tooltipPosition,name:n,value:t.value,checked:r?.toLowerCase()===t.value?.toLowerCase(),onChange:()=>o?.(t),disabled:h||t.disabled},t.value))]}),f&&e.jsx(p,{as:"div",lineHeight:"15px",fontSize:10,color:"var(--error_light)",className:"ff-radio-error-msg",children:u})]}),exports.Row=({children:t,gap:n="0px",className:r=""})=>e.jsx("div",{className:d("ff-row",r),style:{gap:n},children:t}),exports.SCRIPT_REGEX=/SCR\d+/,exports.SSN_REGEX=/^\d{3}-\d{2}-\d{4}$/,exports.STEP_GROUP_NAME_REGEX=/^[a-zA-Z0-9()\-_ ]+$/,exports.Search=({placeholder:n="Search",onSearch:r,disabled:o=!1,width:a=150,value:i="",isExpand:c=!1,onClose:l,onExpand:s,showClose:f=!0,helperText:u="Minimum 3 characters is required",showToaster:h=!0,minLength:m=3,isAISearchClicked:x=!1,isClear:v=!1,handleIsClear:y})=>{const[C,k]=t.useState(i),L=t.useRef(null);t.useEffect(()=>{c&&L.current&&f&&L.current.focus(),k("")},[c]),t.useEffect(()=>{k(i)},[i]);const M=e=>{"Enter"!==e||g(C)?"Escape"===e&&E("Close"):C.trim().length<m&&h?dn.info(u):r(C.trim())};un([{key:"Enter",action:()=>M("Enter")},{key:"Escape",action:()=>M("Escape")}]);const E=e=>{k(""),"Clear"===e&&v?y?.():r(""),"Close"===e&&l?.(),"Clear"===e&&c&&L.current&&f&&L.current.focus()};return e.jsx("div",{className:d("ff-gradient-border-container",{"ai-search-active":x&&c}),children:e.jsxs("div",{className:d("ff-search-container",{expanded:c,disabled:o}),children:[e.jsx("div",{className:d("ff-search-icon",{expanded:c}),onClick:()=>{o||s?.(!c)},children:e.jsx(w,{title:o?"Search Disabled":"Search",disabled:c,children:e.jsx(b,{name:"search",height:c?14:16,width:c?14:16})})}),e.jsx("div",{className:d("ff-vertical-line",{expanded:c})}),e.jsxs("div",{className:d("ff-search-input-block",{expanded:c}),style:{width:c?`${a}px`:"0px"},children:[" ",e.jsx("input",{className:d("ff-search-input",{expanded:c}),name:"input",style:{width:c?`${a}px`:"0px"},placeholder:n,type:"text",value:C,disabled:o,ref:L,autoComplete:"off",onChange:e=>{var t;t=e.target.value,k(t),f?""===t&&r(""):r(t)}})]}),e.jsx(fn,{}),c&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:d("ff-search-clear-button",{showClose:!f}),onClick:()=>E("Clear"),children:""!==C&&e.jsx(p,{children:"Clear",fontSize:8,color:"var(--ff-search-filed-clear-text)"})}),e.jsx(w,{title:"Close",children:e.jsx("div",{className:d("ff-search-close-icon",{showClose:!f}),children:e.jsx(b,{height:6,width:6,name:"close",hoverEffect:!0,onClick:()=>{E("Close")}})})})]})]})})},exports.Select=j,exports.StatusButton=({status:t="passed",label:n="",onClick:r=()=>{},className:o="",style:a={},disabled:i=!1,...c})=>{const l="partially-executed"===t||"not-executed"===t;return e.jsx(w,{title:l?n:"",placement:"bottom",children:e.jsx("button",{className:d("ff-status-button",`ff-status-button--${t}`,o),style:a,onClick:r,disabled:i,...c,children:e.jsx(p,{as:"div",fontWeight:"semi-bold",lineHeight:"16px",textAlign:"center",className:"ff-status-button__text",children:n})})})},exports.TIME_REGEX=/^\d{2}:\d{2}:\d{2}$/,exports.TWITTER_HANDLE_REGEX=/^@?([a-zA-Z0-9_]{1,15})$/,exports.Table=({data:n=[],columns:r=[],headerType:o,withCheckbox:a=!1,onSelect:i,allSelected:c,partialSelected:l=!1,withFixedHeader:s=!0,borderWithRadius:f=!1,headerCheckboxDisabled:u=!1,noDataContent:h,height:g="100%",className:m="",tableHeadClass:x="",tableBodyRowClass:w="",headerTextColor:v,tableDataTextColor:C,headerIconName:k="",headerIconOnClick:L=()=>{},draggable:M=!1,onDragEnd:E,loadMore:_=()=>{},editMode:z="",editComponent:S,getAccordionStatus:D=()=>{},accordionContent:N,columnSticky:T=0,withOddEvenRowColor:q=!1,oddRowColor:Z,evenRowColor:j,oddRowHoverColor:P,evenRowHoverColor:R,hasMore:O=!1,loading:A=!1,onRowClick:I})=>{const H=t.useRef(null);t.useEffect(()=>{if(!H.current||!O||A)return;const e=new IntersectionObserver(e=>{e[0]?.isIntersecting&&_()},{threshold:.1});return e.observe(H.current),()=>{H.current&&e.unobserve(H.current)}},[O,A,_]);const B=(e,t)=>{let{onClick:n,accessor:r}=e;var o;n&&((o=n)&&"[object Function]"==={}.toString.call(o))&&n(r,t)},V=(e,t)=>{i&&i(e,t)};return e.jsx(Rt,{collisionDetection:ye,onDragEnd:e=>{const{active:t,over:r}=e;if(!r||t.id===r.id)return;const o=n.findIndex(e=>e._id===t.id||e.id===t.id),a=n.findIndex(e=>e._id===r.id||e.id===r.id);-1!==o&&-1!==a&&E&&E(o,a)},children:e.jsx(Gt,{disabled:!M,items:n?.map(e=>e._id||e.id),strategy:Yt,children:e.jsxs("div",{style:{height:g,position:"relative",overflowX:"auto",whiteSpace:"nowrap"},className:d(m,{"tf-fixed-header-table":s,"border-borderRadius":f}),children:[e.jsx("div",{className:"tf-table-icon",children:e.jsx(b,{height:14,width:14,name:k,onClick:L})}),e.jsxs("table",{className:d("tf-table"),cellSpacing:0,children:[e.jsx("thead",{className:d({"tf-fixed-header":s},x),children:e.jsx("tr",{children:r.map((t,n)=>e.jsx("th",{className:d(`${o&&`${o}-bg`}`,`${v&&`${v}-color`}`,{"sticky-column":T&&n<T}),style:{width:t?.width,left:T&&n<T?53*n+"px":"auto"},children:e.jsxs(p,{as:"div",fontWeight:"semi-bold",className:"tf-label-checkbox-container",children:[0===n&&a&&e.jsx("span",{className:"tf-table-checkbox",children:e.jsx(y,{onChange:e=>{V(e,{allSelected:e.target.checked})},checked:void 0!==c&&c,partial:!!l,disabled:u})}),t.header]})},t.header))})}),e.jsxs("tbody",{className:"tf-fixed-header-table",children:[n?.length>0&&n?.map((n,o)=>{const i=D(n?.id||n?._id);return e.jsx(e.Fragment,{children:z===n._id||z===n.id?e.jsx("tr",{className:d(w,"edit-row",{"disabled-row":n.disabled}),children:e.jsx("td",{colSpan:r.length,style:{padding:"0px"},children:z&&t.isValidElement(S)&&t.cloneElement(S,{rowData:n,rowIndex:o+1})})},n?._id||o):e.jsx(cn,{row:n,serialNumber:o+1,columns:r,tableBodyRowClass:w,handleOnclick:B,tableDataTextColor:C,withCheckbox:a,onSelectClick:V,draggable:M,columnSticky:T,isAccordionOpen:i,accordionContent:N,withOddEvenRowColor:q,oddRowColor:Z,evenRowColor:j,oddRowHoverColor:P,evenRowHoverColor:R,onRowClick:I})})}),O&&e.jsx("tr",{ref:H,children:e.jsx("td",{colSpan:r.length,style:{textAlign:"center",padding:"16px"},children:A?e.jsx(p,{children:"Loading more data..."}):e.jsx(p,{children:"Scroll to load more"})})})]})]}),n?.length<=0&&!A&&e.jsx("div",{className:"no-data-content",style:{height:`calc(${g} - 50px)`},children:h})]})})})},exports.Tabs=({variant:t="default",tabsData:n,activeTabId:r,onTabClick:o,noBorder:a=!1,noPadding:i=!1,titleSize:c="12px",disabledTabs:l=[],onRemoveTab:s,isSeparator:f=!1})=>e.jsxs("div",{className:"ff-tabs-container",children:[e.jsx("div",{className:d(`ff-tab-row--${t}`,{"ff-tab-row--no-border":a,"ff-tab-row--no-padding":i}),children:n.map((a,i)=>{const u=a.disabled||l.includes(a.id),h=a.isError;return e.jsxs("div",{className:"ff-tab-with-separator",children:[e.jsxs("button",{onClick:()=>!u&&o(a.id),disabled:u,className:d(`ff-tab-button--${t}`,a.className,{disabled:u,active:r===a.id,"has-remove-icon":a.isRemovable,"has-error":h}),children:[a.isRemovable&&e.jsx("span",{className:"ff-tab-remove-icon",onClick:e=>{e.stopPropagation(),s?.(a.id)},children:e.jsx(b,{height:12,width:12,name:"website"===t?"website_close_icon":"primary_close_icon",className:h?"website"===t?"ff-tab-remove-icon-error--website":"ff-tab-remove-icon-error--default":""})}),e.jsxs("div",{className:"label-count-section",children:[a.icon&&e.jsx("span",{className:h?"tab-icon-error":"tab-icon",children:a.icon}),e.jsx(p,{children:a.label,fontSize:c,lineHeight:"18px",fontWeight:r===a.id?"semi-bold":"regular",className:d("ff-tab-label",{"ff-tab-label--active":r===a.id,"ff-tab-label--disabled":u,"ff-tab-label--error":h})}),"default"===t&&a.count&&e.jsx("span",{className:d("tab-count",{"tab-count--active":r===a.id,"tab-count--disabled":u,"tab-count--error":h}),children:a.count})]}),e.jsx("div",{className:d("ff-tab-bar",{"ff-tab-bar--active":r===a.id,"ff-tab-bar--error":h})}),e.jsx("span",{className:"ff-defaultStatus "+("success"===a.status?"ff-successStatus":"error"===a.status?"ff-dangerStatus":"")})]},a.id),f&&i<n.length-1&&e.jsx("div",{className:"ff-tab-separator"})]},a.id)})}),e.jsx("div",{className:"ff-tab-content",children:n.find(e=>e.id===r)?.component})]}),exports.TextArea=({capacity:t=200,name:n,label:r,value:o="",variant:a="primary",error:i,helperText:c="",disabled:l=!1,required:s=!1,placeholder:f="Enter text",className:u="",onChange:b,onBlur:h,onFocus:g,onPaste:m,rows:x=4,cols:w=40,resize:v=!1,errorText:y,readOnly:C=!1,...k})=>{const L=d("ff-textarea-label ff-textarea-label--"+a,{"ff-textarea-label--danger":i}),M=d(`ff-textarea ff-textarea--${a}`,u,{"ff-textarea--danger":i,"ff-textarea--resize":!v}),E=d("ff-textarea-container-style",{"ff-textarea-container-style--disabled":l,"ff-textarea-container-style--float":Boolean(o)}),_=i&&s||!o,z=_?e.jsx("span",{className:"ff-textarea-error-text",children:e.jsx(p,{fontSize:12,children:y})}):null;return e.jsxs("div",{className:E,children:[""!==r&&e.jsx("label",{htmlFor:n,className:d("ff-textarea-label-container",{"ff-textarea-label-container--danger":i}),children:e.jsxs("span",{className:L,children:[s&&e.jsx("span",{className:"required-asterisk",children:"*"}),r]})}),e.jsx("textarea",{name:n,value:o,id:n,className:M,placeholder:f+"...",disabled:l,onChange:e=>{const n=e.target.value;R(n)<=t&&b?.(e)},onBlur:h,onFocus:g,onKeyDown:e=>{if("Enter"===e.key){const t=e.currentTarget,n=t.selectionStart;""===(t.value.substring(0,n).split("\n").pop()||"").trim()&&e.preventDefault()}k.onKeyDown?.(e)},onPaste:e=>{e.preventDefault();const r=e.clipboardData.getData("text/plain").split("\n").filter(e=>""!==e.trim()).join("\n"),o=e.currentTarget,a=o.selectionStart,i=o.selectionEnd,c=o.value.slice(0,a),l=o.value.slice(i),s=R(c+l);let f=t-s,d="";for(const e of r)"\n"===e?d+=e:f>0&&(d+=e,f--);const u=c+d+l,p={...e,target:{...o,name:n,value:u}};b?.(p),m?.(e)},required:s,rows:x,cols:w,readOnly:C,...k}),e.jsxs("div",{className:_?"ff-textarea-error-alignment":"msg-character-count",children:[z,t>0&&!l&&!C&&e.jsxs("div",{className:"ff-textarea-character-count",children:[e.jsxs(p,{fontSize:8,children:[R(o),"/"]}),e.jsx(p,{fontSize:8,children:t})]})]})]})},exports.TextInput=({label:n,value:r,onChange:o,name:a,placeholder:i})=>{const[c,l]=t.useState(!1);return e.jsxs("div",{style:{position:"relative",width:"100%"},children:[e.jsx("label",{style:{position:"absolute",top:r||c?"-1px":"50%",left:"12px",color:c?"#434db8":"#a3a3a3",fontSize:r||c?"10px":"12px",fontFamily:"Poppins",backgroundColor:"#fff",padding:"0 4px",transform:"translateY(-50%)",transition:"all 0.2s ease-in-out",pointerEvents:"none"},children:n}),e.jsx("input",{type:"text",value:r,onChange:o,name:a,placeholder:c?i:"",onFocus:()=>l(!0),onBlur:()=>l(!!r),style:{width:"100%",padding:r||c?" 6px 8px":"6px 8px",border:"1px solid "+(c?"#434db8":"#a3a3a3"),borderRadius:"4px",fontFamily:"Poppins",fontSize:"12px",outline:"none",transition:"border-color 0.2s ease-in-out"}})]})},exports.ThemeProvider=({children:n,theme:r})=>{const[o,a]=t.useState(r||"website-theme");return t.useEffect(()=>(document.body.className=o,()=>{document.body.className=""}),[o]),e.jsx(m.Provider,{value:{currentTheme:o,setCurrentTheme:a,applyTheme:e=>a(e)},children:n})},exports.Toaster=_,exports.Toastify=fn,exports.Toggle=({onChange:t,variant:n="primary",disabled:r,checked:o=!1,id:a="toggle",size:i="large",icon:c})=>{const l={large:10,medium:8,small:6}[i],s={name:"wrong_mark",width:l,height:l},f={checked:{...{name:"check_mark",width:l,height:l},...c?.checked},unchecked:{...s,...c?.unchecked}};return e.jsxs("div",{className:"switch-container",children:[e.jsx("input",{className:"switch-checkbox",id:`toggle-${a}`,type:"checkbox",disabled:!!r,onChange:e=>{t&&t(e)},checked:o}),e.jsx("label",{className:d(`switch-label default--${i} switch-label--${n}`,{"switch-label--disabled":r}),htmlFor:`toggle-${a}`,children:e.jsx("span",{className:d(`switch-button switch-button--${i}`,{checked:o}),children:o?e.jsx(b,{name:f.checked.name,width:f.checked.width,height:f.checked.height,className:`checked-icon--${n}`}):e.jsx(b,{name:f.unchecked.name,width:f.unchecked.width,height:f.unchecked.height,className:`unchecked-icon--${n}`})})})]})},exports.Tooltip=w,exports.Typography=p,exports.UNIT_REGEX=/[a-zA-Z]+/,exports.URL_REGEX=/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([\/\w.-]*)*\/?$/,exports.USERNAME_REGEX=/^[a-zA-Z0-9_]{3,16}$/,exports.USERNAME_SPECIAL_REGEX=/^[a-zA-Z0-9._-]{3,16}$/,exports.US_ZIP_CODE_REGEX=/^\d{5}(-\d{4})?$/,exports.UUID_REGEX=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,exports.VEHICLE_REGISTRATION_REGEX=/^[A-Z]{2}\d{2}[A-Z]{0,2}\d{4}$/,exports.WHITESPACE_REGEX=/^\s+|\s+$/g,exports.capitalize=e=>e?e.charAt(0)?.toUpperCase()+e?.slice(1)?.toLowerCase():"",exports.checkEmpty=g,exports.compareArrays=(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&(e.length===t.length&&e.every((e,n)=>{const r=t[n];return oi(e,r)})),exports.compareObjects=oi,exports.convertFormDataToObject=e=>{const t={};return e.forEach((e,n)=>{t[n]?t[n]=Array.isArray(t[n])?[...t[n],e]:[t[n],e]:t[n]=e}),t},exports.debounce=(e,t)=>{let n=null;const r=function(...r){n&&clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)};return r.cancel=()=>{n&&clearTimeout(n),n=null},r},exports.ffid=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>(0|("x"===e?16*Math.random():16*Math.random()&3|8)).toString(16)),exports.findAndInsert=function(e,t,n,r,o,a="children"){return function e(i){for(let c=0;c<i.length;c++){const l=i[c];if(l&&l[t]===n){const e=[...i];return"replace"===o?e[c]=r:e.splice("above"===o?c:c+1,0,r),{updatedArray:e}}if(l&&l[a]&&Array.isArray(l[a])){const t=e(l[a]);if(t)return{updatedArray:i.map((e,n)=>n===c?{...e,[a]:t.updatedArray}:e)}}}return null}(e)},exports.formatDate=e=>`${e.getDate().toString().padStart(2,"0")}/${(e.getMonth()+1).toString().padStart(2,"0")}/${e.getFullYear()}`,exports.getEncryptedData=(e,t)=>{const n=new Lc;n.setPublicKey(t);return n.encrypt(e)},exports.getExtension=e=>{if("string"==typeof e&&e.includes(".")){const t=e.split(".").pop();return t!==e?t:""}return e instanceof File?e.name.split(".").pop():""},exports.getExtensionWithPeriod=e=>{if("string"==typeof e&&e.includes(".")){const t=e.slice(e.lastIndexOf("."));return t!==e?t:""}if(e instanceof File){const t=e.name.lastIndexOf(".");return-1!==t?e.name.slice(t):""}return""},exports.hasDuplicateFile=(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},exports.isEmptyObject=e=>"object"==typeof e&&0===Object.keys(e).length,exports.saveFileFromBlob=(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)}},exports.throttle=(e,t)=>{let n,r=null;const o=function(...o){const a=this;null===r||Date.now()-r>=t?(e.apply(a,o),r=Date.now()):(n&&clearTimeout(n),n=setTimeout(()=>{e.apply(a,o),r=Date.now()},t-(Date.now()-r)))};return o.cancel=()=>{n&&clearTimeout(n),n=null,r=null},o},exports.toast=dn,exports.truncateText=M,exports.useClickOutside=D,exports.useKeyboardActions=un,exports.useTheme=x;
|
|
15
15
|
//# sourceMappingURL=index.cjs.map
|