mx-ui-components-pkg 0.0.717-alpha.126 → 0.0.717-alpha.127
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{cssMode-CEnlNja6.js → cssMode-DwQUYHPh.js} +1 -1
- package/dist/{freemarker2-DhEqfXxU.js → freemarker2-X6VSXfJz.js} +1 -1
- package/dist/{handlebars-CqrDPZJe.js → handlebars-DFwch4n1.js} +1 -1
- package/dist/{html-chbuPBrg.js → html-r65JTCSf.js} +1 -1
- package/dist/{htmlMode-4Iv4PJ00.js → htmlMode-DD8UWnZA.js} +1 -1
- package/dist/{index-Ct-zNs1S.js → index-DMSrYi_v.js} +53 -50
- package/dist/{index.es-CORS7Lu4.js → index.es-CZemY4Pd.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +4 -4
- package/dist/{javascript-Dk-aDTUG.js → javascript-CkDGxVpW.js} +1 -1
- package/dist/{jsonMode-B54D3-2R.js → jsonMode-CGuBfI6w.js} +1 -1
- package/dist/{liquid-kXUJfhoa.js → liquid-DbLuYwdS.js} +1 -1
- package/dist/{mdx-CRkbrGCK.js → mdx-Dh4hBU2A.js} +1 -1
- package/dist/{python-L6aFjEWQ.js → python-DV-4x9cY.js} +1 -1
- package/dist/{razor-D1QtvhgL.js → razor-Bjkb4NlN.js} +1 -1
- package/dist/{tsMode-Bsmu0Ceh.js → tsMode-BKkTF25T.js} +1 -1
- package/dist/types/src/routes/+layout.server.d.ts +355 -46
- package/dist/{typescript-CPFUdrRP.js → typescript-Ch2RKv3d.js} +1 -1
- package/dist/{xml-C_UQH_8F.js → xml-D7n65Geu.js} +1 -1
- package/dist/{yaml-B3HcJe2j.js → yaml-AiqKzRq1.js} +1 -1
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -15,12 +15,12 @@ Actual: `+hn.attribValue);else{var ti=hn.tag,jn=hn.tags[hn.tags.length-1]||hn;ti
|
|
|
15
15
|
`?(dn.line++,dn.column=0):dn.column++),dn.state){case Qe.BEGIN:if(dn.state=Qe.BEGIN_WHITESPACE,Bn==="\uFEFF")continue;On(dn,Bn);continue;case Qe.BEGIN_WHITESPACE:On(dn,Bn);continue;case Qe.TEXT:if(dn.sawRoot&&!dn.closedRoot){for(var ti=Pn-1;Bn&&Bn!=="<"&&Bn!=="&";)Bn=Fn(hn,Pn++),Bn&&dn.trackPosition&&(dn.position++,Bn===`
|
|
16
16
|
`?(dn.line++,dn.column=0):dn.column++);dn.textNode+=hn.substring(ti,Pn-1)}Bn==="<"&&!(dn.sawRoot&&dn.closedRoot&&!dn.strict)?(dn.state=Qe.OPEN_WAKA,dn.startTagPosition=dn.position):(!ze(Bn)&&(!dn.sawRoot||dn.closedRoot)&&yn(dn,"Text data outside of root node."),Bn==="&"?dn.state=Qe.TEXT_ENTITY:dn.textNode+=Bn);continue;case Qe.SCRIPT:Bn==="<"?dn.state=Qe.SCRIPT_ENDING:dn.script+=Bn;continue;case Qe.SCRIPT_ENDING:Bn==="/"?dn.state=Qe.CLOSE_TAG:(dn.script+="<"+Bn,dn.state=Qe.SCRIPT);continue;case Qe.OPEN_WAKA:if(Bn==="!")dn.state=Qe.SGML_DECL,dn.sgmlDecl="";else if(!ze(Bn))if(Ge(Ue,Bn))dn.state=Qe.OPEN_TAG,dn.tagName=Bn;else if(Bn==="/")dn.state=Qe.CLOSE_TAG,dn.tagName="";else if(Bn==="?")dn.state=Qe.PROC_INST,dn.procInstName=dn.procInstBody="";else{if(yn(dn,"Unencoded <"),dn.startTagPosition+1<dn.position){var jn=dn.position-dn.startTagPosition;Bn=new Array(jn).join(" ")+Bn}dn.textNode+="<"+Bn,dn.state=Qe.TEXT}continue;case Qe.SGML_DECL:if(dn.sgmlDecl+Bn==="--"){dn.state=Qe.COMMENT,dn.comment="",dn.sgmlDecl="";continue}dn.doctype&&dn.doctype!==!0&&dn.sgmlDecl?(dn.state=Qe.DOCTYPE_DTD,dn.doctype+="<!"+dn.sgmlDecl+Bn,dn.sgmlDecl=""):(dn.sgmlDecl+Bn).toUpperCase()===Me?(Je(dn,"onopencdata"),dn.state=Qe.CDATA,dn.sgmlDecl="",dn.cdata=""):(dn.sgmlDecl+Bn).toUpperCase()===Pe?(dn.state=Qe.DOCTYPE,(dn.doctype||dn.sawRoot)&&yn(dn,"Inappropriately located doctype declaration"),dn.doctype="",dn.sgmlDecl=""):Bn===">"?(Je(dn,"onsgmldeclaration",dn.sgmlDecl),dn.sgmlDecl="",dn.state=Qe.TEXT):(qe(Bn)&&(dn.state=Qe.SGML_DECL_QUOTED),dn.sgmlDecl+=Bn);continue;case Qe.SGML_DECL_QUOTED:Bn===dn.q&&(dn.state=Qe.SGML_DECL,dn.q=""),dn.sgmlDecl+=Bn;continue;case Qe.DOCTYPE:Bn===">"?(dn.state=Qe.TEXT,Je(dn,"ondoctype",dn.doctype),dn.doctype=!0):(dn.doctype+=Bn,Bn==="["?dn.state=Qe.DOCTYPE_DTD:qe(Bn)&&(dn.state=Qe.DOCTYPE_QUOTED,dn.q=Bn));continue;case Qe.DOCTYPE_QUOTED:dn.doctype+=Bn,Bn===dn.q&&(dn.q="",dn.state=Qe.DOCTYPE);continue;case Qe.DOCTYPE_DTD:Bn==="]"?(dn.doctype+=Bn,dn.state=Qe.DOCTYPE):Bn==="<"?(dn.state=Qe.OPEN_WAKA,dn.startTagPosition=dn.position):qe(Bn)?(dn.doctype+=Bn,dn.state=Qe.DOCTYPE_DTD_QUOTED,dn.q=Bn):dn.doctype+=Bn;continue;case Qe.DOCTYPE_DTD_QUOTED:dn.doctype+=Bn,Bn===dn.q&&(dn.state=Qe.DOCTYPE_DTD,dn.q="");continue;case Qe.COMMENT:Bn==="-"?dn.state=Qe.COMMENT_ENDING:dn.comment+=Bn;continue;case Qe.COMMENT_ENDING:Bn==="-"?(dn.state=Qe.COMMENT_ENDED,dn.comment=sn(dn.opt,dn.comment),dn.comment&&Je(dn,"oncomment",dn.comment),dn.comment=""):(dn.comment+="-"+Bn,dn.state=Qe.COMMENT);continue;case Qe.COMMENT_ENDED:Bn!==">"?(yn(dn,"Malformed comment"),dn.comment+="--"+Bn,dn.state=Qe.COMMENT):dn.doctype&&dn.doctype!==!0?dn.state=Qe.DOCTYPE_DTD:dn.state=Qe.TEXT;continue;case Qe.CDATA:Bn==="]"?dn.state=Qe.CDATA_ENDING:dn.cdata+=Bn;continue;case Qe.CDATA_ENDING:Bn==="]"?dn.state=Qe.CDATA_ENDING_2:(dn.cdata+="]"+Bn,dn.state=Qe.CDATA);continue;case Qe.CDATA_ENDING_2:Bn===">"?(dn.cdata&&Je(dn,"oncdata",dn.cdata),Je(dn,"onclosecdata"),dn.cdata="",dn.state=Qe.TEXT):Bn==="]"?dn.cdata+="]":(dn.cdata+="]]"+Bn,dn.state=Qe.CDATA);continue;case Qe.PROC_INST:Bn==="?"?dn.state=Qe.PROC_INST_ENDING:ze(Bn)?dn.state=Qe.PROC_INST_BODY:dn.procInstName+=Bn;continue;case Qe.PROC_INST_BODY:if(!dn.procInstBody&&ze(Bn))continue;Bn==="?"?dn.state=Qe.PROC_INST_ENDING:dn.procInstBody+=Bn;continue;case Qe.PROC_INST_ENDING:Bn===">"?(Je(dn,"onprocessinginstruction",{name:dn.procInstName,body:dn.procInstBody}),dn.procInstName=dn.procInstBody="",dn.state=Qe.TEXT):(dn.procInstBody+="?"+Bn,dn.state=Qe.PROC_INST_BODY);continue;case Qe.OPEN_TAG:Ge(He,Bn)?dn.tagName+=Bn:(xn(dn),Bn===">"?Hn(dn):Bn==="/"?dn.state=Qe.OPEN_TAG_SLASH:(ze(Bn)||yn(dn,"Invalid character in tag name"),dn.state=Qe.ATTRIB));continue;case Qe.OPEN_TAG_SLASH:Bn===">"?(Hn(dn,!0),gn(dn)):(yn(dn,"Forward-slash in opening tag not followed by >"),dn.state=Qe.ATTRIB);continue;case Qe.ATTRIB:if(ze(Bn))continue;Bn===">"?Hn(dn):Bn==="/"?dn.state=Qe.OPEN_TAG_SLASH:Ge(Ue,Bn)?(dn.attribName=Bn,dn.attribValue="",dn.state=Qe.ATTRIB_NAME):yn(dn,"Invalid attribute name");continue;case Qe.ATTRIB_NAME:Bn==="="?dn.state=Qe.ATTRIB_VALUE:Bn===">"?(yn(dn,"Attribute without value"),dn.attribValue=dn.attribName,Mn(dn),Hn(dn)):ze(Bn)?dn.state=Qe.ATTRIB_NAME_SAW_WHITE:Ge(He,Bn)?dn.attribName+=Bn:yn(dn,"Invalid attribute name");continue;case Qe.ATTRIB_NAME_SAW_WHITE:if(Bn==="=")dn.state=Qe.ATTRIB_VALUE;else{if(ze(Bn))continue;yn(dn,"Attribute without value"),dn.tag.attributes[dn.attribName]="",dn.attribValue="",Je(dn,"onattribute",{name:dn.attribName,value:""}),dn.attribName="",Bn===">"?Hn(dn):Ge(Ue,Bn)?(dn.attribName=Bn,dn.state=Qe.ATTRIB_NAME):(yn(dn,"Invalid attribute name"),dn.state=Qe.ATTRIB)}continue;case Qe.ATTRIB_VALUE:if(ze(Bn))continue;qe(Bn)?(dn.q=Bn,dn.state=Qe.ATTRIB_VALUE_QUOTED):(dn.opt.unquotedAttributeValues||pn(dn,"Unquoted attribute value"),dn.state=Qe.ATTRIB_VALUE_UNQUOTED,dn.attribValue=Bn);continue;case Qe.ATTRIB_VALUE_QUOTED:if(Bn!==dn.q){Bn==="&"?dn.state=Qe.ATTRIB_VALUE_ENTITY_Q:dn.attribValue+=Bn;continue}Mn(dn),dn.q="",dn.state=Qe.ATTRIB_VALUE_CLOSED;continue;case Qe.ATTRIB_VALUE_CLOSED:ze(Bn)?dn.state=Qe.ATTRIB:Bn===">"?Hn(dn):Bn==="/"?dn.state=Qe.OPEN_TAG_SLASH:Ge(Ue,Bn)?(yn(dn,"No whitespace between attributes"),dn.attribName=Bn,dn.attribValue="",dn.state=Qe.ATTRIB_NAME):yn(dn,"Invalid attribute name");continue;case Qe.ATTRIB_VALUE_UNQUOTED:if(!Ke(Bn)){Bn==="&"?dn.state=Qe.ATTRIB_VALUE_ENTITY_U:dn.attribValue+=Bn;continue}Mn(dn),Bn===">"?Hn(dn):dn.state=Qe.ATTRIB;continue;case Qe.CLOSE_TAG:if(dn.tagName)Bn===">"?gn(dn):Ge(He,Bn)?dn.tagName+=Bn:dn.script?(dn.script+="</"+dn.tagName,dn.tagName="",dn.state=Qe.SCRIPT):(ze(Bn)||yn(dn,"Invalid tagname in closing tag"),dn.state=Qe.CLOSE_TAG_SAW_WHITE);else{if(ze(Bn))continue;Ye(Ue,Bn)?dn.script?(dn.script+="</"+Bn,dn.state=Qe.SCRIPT):yn(dn,"Invalid tagname in closing tag."):dn.tagName=Bn}continue;case Qe.CLOSE_TAG_SAW_WHITE:if(ze(Bn))continue;Bn===">"?gn(dn):yn(dn,"Invalid characters in closing tag");continue;case Qe.TEXT_ENTITY:case Qe.ATTRIB_VALUE_ENTITY_Q:case Qe.ATTRIB_VALUE_ENTITY_U:var mi,Vi;switch(dn.state){case Qe.TEXT_ENTITY:mi=Qe.TEXT,Vi="textNode";break;case Qe.ATTRIB_VALUE_ENTITY_Q:mi=Qe.ATTRIB_VALUE_QUOTED,Vi="attribValue";break;case Qe.ATTRIB_VALUE_ENTITY_U:mi=Qe.ATTRIB_VALUE_UNQUOTED,Vi="attribValue";break}if(Bn===";"){var Fi=Rn(dn);dn.opt.unparsedEntities&&!Object.values(_e.XML_ENTITIES).includes(Fi)?(dn.entity="",dn.state=mi,dn.write(Fi)):(dn[Vi]+=Fi,dn.entity="",dn.state=mi)}else Ge(dn.entity.length?We:Ve,Bn)?dn.entity+=Bn:(yn(dn,"Invalid character in entity name"),dn[Vi]+="&"+dn.entity+Bn,dn.entity="",dn.state=mi);continue;default:throw new Error(dn,"Unknown state: "+dn.state)}return dn.position>=dn.bufferCheckPosition&&Ee(dn),dn}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */String.fromCodePoint||function(){var hn=String.fromCharCode,dn=Math.floor,Pn=function(){var Bn=16384,ti=[],jn,mi,Vi=-1,Fi=arguments.length;if(!Fi)return"";for(var vi="";++Vi<Fi;){var sr=Number(arguments[Vi]);if(!isFinite(sr)||sr<0||sr>1114111||dn(sr)!==sr)throw RangeError("Invalid code point: "+sr);sr<=65535?ti.push(sr):(sr-=65536,jn=(sr>>10)+55296,mi=sr%1024+56320,ti.push(jn,mi)),(Vi+1===Fi||ti.length>Bn)&&(vi+=hn.apply(null,ti),ti.length=0)}return vi};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:Pn,configurable:!0,writable:!0}):String.fromCodePoint=Pn}()})(Ce)})(sax$3);var arrayHelper={isArray:function(Ce){return Array.isArray?Array.isArray(Ce):Object.prototype.toString.call(Ce)==="[object Array]"}},isArray$9=arrayHelper.isArray,optionsHelper={copyOptions:function(Ce){var _e,Ae={};for(_e in Ce)Ce.hasOwnProperty(_e)&&(Ae[_e]=Ce[_e]);return Ae},ensureFlagExists:function(Ce,_e){(!(Ce in _e)||typeof _e[Ce]!="boolean")&&(_e[Ce]=!1)},ensureSpacesExists:function(Ce){(!("spaces"in Ce)||typeof Ce.spaces!="number"&&typeof Ce.spaces!="string")&&(Ce.spaces=0)},ensureAlwaysArrayExists:function(Ce){(!("alwaysArray"in Ce)||typeof Ce.alwaysArray!="boolean"&&!isArray$9(Ce.alwaysArray))&&(Ce.alwaysArray=!1)},ensureKeyExists:function(Ce,_e){(!(Ce+"Key"in _e)||typeof _e[Ce+"Key"]!="string")&&(_e[Ce+"Key"]=_e.compact?"_"+Ce:Ce)},checkFnExists:function(Ce,_e){return Ce+"Fn"in _e}},sax$2=sax$3,helper$2=optionsHelper,isArray$8=arrayHelper.isArray,options,currentElement$1;function validateOptions$2(Ce){return options=helper$2.copyOptions(Ce),helper$2.ensureFlagExists("ignoreDeclaration",options),helper$2.ensureFlagExists("ignoreInstruction",options),helper$2.ensureFlagExists("ignoreAttributes",options),helper$2.ensureFlagExists("ignoreText",options),helper$2.ensureFlagExists("ignoreComment",options),helper$2.ensureFlagExists("ignoreCdata",options),helper$2.ensureFlagExists("ignoreDoctype",options),helper$2.ensureFlagExists("compact",options),helper$2.ensureFlagExists("alwaysChildren",options),helper$2.ensureFlagExists("addParent",options),helper$2.ensureFlagExists("trim",options),helper$2.ensureFlagExists("nativeType",options),helper$2.ensureFlagExists("nativeTypeAttributes",options),helper$2.ensureFlagExists("sanitize",options),helper$2.ensureFlagExists("instructionHasAttributes",options),helper$2.ensureFlagExists("captureSpacesBetweenElements",options),helper$2.ensureAlwaysArrayExists(options),helper$2.ensureKeyExists("declaration",options),helper$2.ensureKeyExists("instruction",options),helper$2.ensureKeyExists("attributes",options),helper$2.ensureKeyExists("text",options),helper$2.ensureKeyExists("comment",options),helper$2.ensureKeyExists("cdata",options),helper$2.ensureKeyExists("doctype",options),helper$2.ensureKeyExists("type",options),helper$2.ensureKeyExists("name",options),helper$2.ensureKeyExists("elements",options),helper$2.ensureKeyExists("parent",options),helper$2.checkFnExists("doctype",options),helper$2.checkFnExists("instruction",options),helper$2.checkFnExists("cdata",options),helper$2.checkFnExists("comment",options),helper$2.checkFnExists("text",options),helper$2.checkFnExists("instructionName",options),helper$2.checkFnExists("elementName",options),helper$2.checkFnExists("attributeName",options),helper$2.checkFnExists("attributeValue",options),helper$2.checkFnExists("attributes",options),options}function nativeType(Ce){var _e=Number(Ce);if(!isNaN(_e))return _e;var Ae=Ce.toLowerCase();return Ae==="true"?!0:Ae==="false"?!1:Ce}function addField(Ce,_e){var Ae;if(options.compact){if(!currentElement$1[options[Ce+"Key"]]&&(isArray$8(options.alwaysArray)?options.alwaysArray.indexOf(options[Ce+"Key"])!==-1:options.alwaysArray)&&(currentElement$1[options[Ce+"Key"]]=[]),currentElement$1[options[Ce+"Key"]]&&!isArray$8(currentElement$1[options[Ce+"Key"]])&&(currentElement$1[options[Ce+"Key"]]=[currentElement$1[options[Ce+"Key"]]]),Ce+"Fn"in options&&typeof _e=="string"&&(_e=options[Ce+"Fn"](_e,currentElement$1)),Ce==="instruction"&&("instructionFn"in options||"instructionNameFn"in options)){for(Ae in _e)if(_e.hasOwnProperty(Ae))if("instructionFn"in options)_e[Ae]=options.instructionFn(_e[Ae],Ae,currentElement$1);else{var Se=_e[Ae];delete _e[Ae],_e[options.instructionNameFn(Ae,Se,currentElement$1)]=Se}}isArray$8(currentElement$1[options[Ce+"Key"]])?currentElement$1[options[Ce+"Key"]].push(_e):currentElement$1[options[Ce+"Key"]]=_e}else{currentElement$1[options.elementsKey]||(currentElement$1[options.elementsKey]=[]);var Ee={};if(Ee[options.typeKey]=Ce,Ce==="instruction"){for(Ae in _e)if(_e.hasOwnProperty(Ae))break;Ee[options.nameKey]="instructionNameFn"in options?options.instructionNameFn(Ae,_e,currentElement$1):Ae,options.instructionHasAttributes?(Ee[options.attributesKey]=_e[Ae][options.attributesKey],"instructionFn"in options&&(Ee[options.attributesKey]=options.instructionFn(Ee[options.attributesKey],Ae,currentElement$1))):("instructionFn"in options&&(_e[Ae]=options.instructionFn(_e[Ae],Ae,currentElement$1)),Ee[options.instructionKey]=_e[Ae])}else Ce+"Fn"in options&&(_e=options[Ce+"Fn"](_e,currentElement$1)),Ee[options[Ce+"Key"]]=_e;options.addParent&&(Ee[options.parentKey]=currentElement$1),currentElement$1[options.elementsKey].push(Ee)}}function manipulateAttributes(Ce){if("attributesFn"in options&&Ce&&(Ce=options.attributesFn(Ce,currentElement$1)),(options.trim||"attributeValueFn"in options||"attributeNameFn"in options||options.nativeTypeAttributes)&&Ce){var _e;for(_e in Ce)if(Ce.hasOwnProperty(_e)&&(options.trim&&(Ce[_e]=Ce[_e].trim()),options.nativeTypeAttributes&&(Ce[_e]=nativeType(Ce[_e])),"attributeValueFn"in options&&(Ce[_e]=options.attributeValueFn(Ce[_e],_e,currentElement$1)),"attributeNameFn"in options)){var Ae=Ce[_e];delete Ce[_e],Ce[options.attributeNameFn(_e,Ce[_e],currentElement$1)]=Ae}}return Ce}function onInstruction(Ce){var _e={};if(Ce.body&&(Ce.name.toLowerCase()==="xml"||options.instructionHasAttributes)){for(var Ae=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g,Se;(Se=Ae.exec(Ce.body))!==null;)_e[Se[1]]=Se[2]||Se[3]||Se[4];_e=manipulateAttributes(_e)}if(Ce.name.toLowerCase()==="xml"){if(options.ignoreDeclaration)return;currentElement$1[options.declarationKey]={},Object.keys(_e).length&&(currentElement$1[options.declarationKey][options.attributesKey]=_e),options.addParent&&(currentElement$1[options.declarationKey][options.parentKey]=currentElement$1)}else{if(options.ignoreInstruction)return;options.trim&&(Ce.body=Ce.body.trim());var Ee={};options.instructionHasAttributes&&Object.keys(_e).length?(Ee[Ce.name]={},Ee[Ce.name][options.attributesKey]=_e):Ee[Ce.name]=Ce.body,addField("instruction",Ee)}}function onStartElement(Ce,_e){var Ae;if(typeof Ce=="object"&&(_e=Ce.attributes,Ce=Ce.name),_e=manipulateAttributes(_e),"elementNameFn"in options&&(Ce=options.elementNameFn(Ce,currentElement$1)),options.compact){if(Ae={},!options.ignoreAttributes&&_e&&Object.keys(_e).length){Ae[options.attributesKey]={};var Se;for(Se in _e)_e.hasOwnProperty(Se)&&(Ae[options.attributesKey][Se]=_e[Se])}!(Ce in currentElement$1)&&(isArray$8(options.alwaysArray)?options.alwaysArray.indexOf(Ce)!==-1:options.alwaysArray)&&(currentElement$1[Ce]=[]),currentElement$1[Ce]&&!isArray$8(currentElement$1[Ce])&&(currentElement$1[Ce]=[currentElement$1[Ce]]),isArray$8(currentElement$1[Ce])?currentElement$1[Ce].push(Ae):currentElement$1[Ce]=Ae}else currentElement$1[options.elementsKey]||(currentElement$1[options.elementsKey]=[]),Ae={},Ae[options.typeKey]="element",Ae[options.nameKey]=Ce,!options.ignoreAttributes&&_e&&Object.keys(_e).length&&(Ae[options.attributesKey]=_e),options.alwaysChildren&&(Ae[options.elementsKey]=[]),currentElement$1[options.elementsKey].push(Ae);Ae[options.parentKey]=currentElement$1,currentElement$1=Ae}function onText(Ce){options.ignoreText||!Ce.trim()&&!options.captureSpacesBetweenElements||(options.trim&&(Ce=Ce.trim()),options.nativeType&&(Ce=nativeType(Ce)),options.sanitize&&(Ce=Ce.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")),addField("text",Ce))}function onComment(Ce){options.ignoreComment||(options.trim&&(Ce=Ce.trim()),addField("comment",Ce))}function onEndElement(Ce){var _e=currentElement$1[options.parentKey];options.addParent||delete currentElement$1[options.parentKey],currentElement$1=_e}function onCdata(Ce){options.ignoreCdata||(options.trim&&(Ce=Ce.trim()),addField("cdata",Ce))}function onDoctype(Ce){options.ignoreDoctype||(Ce=Ce.replace(/^ /,""),options.trim&&(Ce=Ce.trim()),addField("doctype",Ce))}function onError(Ce){Ce.note=Ce}var xml2js$2=function(Ce,_e){var Ae=sax$2.parser(!0,{}),Se={};if(currentElement$1=Se,options=validateOptions$2(_e),Ae.opt={strictEntities:!0},Ae.onopentag=onStartElement,Ae.ontext=onText,Ae.oncomment=onComment,Ae.onclosetag=onEndElement,Ae.onerror=onError,Ae.oncdata=onCdata,Ae.ondoctype=onDoctype,Ae.onprocessinginstruction=onInstruction,Ae.write(Ce).close(),Se[options.elementsKey]){var Ee=Se[options.elementsKey];delete Se[options.elementsKey],Se[options.elementsKey]=Ee,delete Se.text}return Se},helper$1=optionsHelper,xml2js$1=xml2js$2;function validateOptions$1(Ce){var _e=helper$1.copyOptions(Ce);return helper$1.ensureSpacesExists(_e),_e}var xml2json$1=function(Ce,_e){var Ae,Se,Ee,xe;return Ae=validateOptions$1(_e),Se=xml2js$1(Ce,Ae),xe="compact"in Ae&&Ae.compact?"_parent":"parent","addParent"in Ae&&Ae.addParent?Ee=JSON.stringify(Se,function(Te,Ie){return Te===xe?"_":Ie},Ae.spaces):Ee=JSON.stringify(Se,null,Ae.spaces),Ee.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")},helper=optionsHelper,isArray$7=arrayHelper.isArray,currentElement,currentElementName;function validateOptions(Ce){var _e=helper.copyOptions(Ce);return helper.ensureFlagExists("ignoreDeclaration",_e),helper.ensureFlagExists("ignoreInstruction",_e),helper.ensureFlagExists("ignoreAttributes",_e),helper.ensureFlagExists("ignoreText",_e),helper.ensureFlagExists("ignoreComment",_e),helper.ensureFlagExists("ignoreCdata",_e),helper.ensureFlagExists("ignoreDoctype",_e),helper.ensureFlagExists("compact",_e),helper.ensureFlagExists("indentText",_e),helper.ensureFlagExists("indentCdata",_e),helper.ensureFlagExists("indentAttributes",_e),helper.ensureFlagExists("indentInstruction",_e),helper.ensureFlagExists("fullTagEmptyElement",_e),helper.ensureFlagExists("noQuotesForNativeAttributes",_e),helper.ensureSpacesExists(_e),typeof _e.spaces=="number"&&(_e.spaces=Array(_e.spaces+1).join(" ")),helper.ensureKeyExists("declaration",_e),helper.ensureKeyExists("instruction",_e),helper.ensureKeyExists("attributes",_e),helper.ensureKeyExists("text",_e),helper.ensureKeyExists("comment",_e),helper.ensureKeyExists("cdata",_e),helper.ensureKeyExists("doctype",_e),helper.ensureKeyExists("type",_e),helper.ensureKeyExists("name",_e),helper.ensureKeyExists("elements",_e),helper.checkFnExists("doctype",_e),helper.checkFnExists("instruction",_e),helper.checkFnExists("cdata",_e),helper.checkFnExists("comment",_e),helper.checkFnExists("text",_e),helper.checkFnExists("instructionName",_e),helper.checkFnExists("elementName",_e),helper.checkFnExists("attributeName",_e),helper.checkFnExists("attributeValue",_e),helper.checkFnExists("attributes",_e),helper.checkFnExists("fullTagEmptyElement",_e),_e}function writeIndentation(Ce,_e,Ae){return(!Ae&&Ce.spaces?`
|
|
17
17
|
`:"")+Array(_e+1).join(Ce.spaces)}function writeAttributes(Ce,_e,Ae){if(_e.ignoreAttributes)return"";"attributesFn"in _e&&(Ce=_e.attributesFn(Ce,currentElementName,currentElement));var Se,Ee,xe,Te,Ie=[];for(Se in Ce)Ce.hasOwnProperty(Se)&&Ce[Se]!==null&&Ce[Se]!==void 0&&(Te=_e.noQuotesForNativeAttributes&&typeof Ce[Se]!="string"?"":'"',Ee=""+Ce[Se],Ee=Ee.replace(/"/g,"""),xe="attributeNameFn"in _e?_e.attributeNameFn(Se,Ee,currentElementName,currentElement):Se,Ie.push(_e.spaces&&_e.indentAttributes?writeIndentation(_e,Ae+1,!1):" "),Ie.push(xe+"="+Te+("attributeValueFn"in _e?_e.attributeValueFn(Ee,Se,currentElementName,currentElement):Ee)+Te));return Ce&&Object.keys(Ce).length&&_e.spaces&&_e.indentAttributes&&Ie.push(writeIndentation(_e,Ae,!1)),Ie.join("")}function writeDeclaration(Ce,_e,Ae){return currentElement=Ce,currentElementName="xml",_e.ignoreDeclaration?"":"<?xml"+writeAttributes(Ce[_e.attributesKey],_e,Ae)+"?>"}function writeInstruction(Ce,_e,Ae){if(_e.ignoreInstruction)return"";var Se;for(Se in Ce)if(Ce.hasOwnProperty(Se))break;var Ee="instructionNameFn"in _e?_e.instructionNameFn(Se,Ce[Se],currentElementName,currentElement):Se;if(typeof Ce[Se]=="object")return currentElement=Ce,currentElementName=Ee,"<?"+Ee+writeAttributes(Ce[Se][_e.attributesKey],_e,Ae)+"?>";var xe=Ce[Se]?Ce[Se]:"";return"instructionFn"in _e&&(xe=_e.instructionFn(xe,Se,currentElementName,currentElement)),"<?"+Ee+(xe?" "+xe:"")+"?>"}function writeComment(Ce,_e){return _e.ignoreComment?"":"<!--"+("commentFn"in _e?_e.commentFn(Ce,currentElementName,currentElement):Ce)+"-->"}function writeCdata(Ce,_e){return _e.ignoreCdata?"":"<![CDATA["+("cdataFn"in _e?_e.cdataFn(Ce,currentElementName,currentElement):Ce.replace("]]>","]]]]><![CDATA[>"))+"]]>"}function writeDoctype(Ce,_e){return _e.ignoreDoctype?"":"<!DOCTYPE "+("doctypeFn"in _e?_e.doctypeFn(Ce,currentElementName,currentElement):Ce)+">"}function writeText(Ce,_e){return _e.ignoreText?"":(Ce=""+Ce,Ce=Ce.replace(/&/g,"&"),Ce=Ce.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),"textFn"in _e?_e.textFn(Ce,currentElementName,currentElement):Ce)}function hasContent(Ce,_e){var Ae;if(Ce.elements&&Ce.elements.length)for(Ae=0;Ae<Ce.elements.length;++Ae)switch(Ce.elements[Ae][_e.typeKey]){case"text":if(_e.indentText)return!0;break;case"cdata":if(_e.indentCdata)return!0;break;case"instruction":if(_e.indentInstruction)return!0;break;case"doctype":case"comment":case"element":return!0;default:return!0}return!1}function writeElement(Ce,_e,Ae){currentElement=Ce,currentElementName=Ce.name;var Se=[],Ee="elementNameFn"in _e?_e.elementNameFn(Ce.name,Ce):Ce.name;Se.push("<"+Ee),Ce[_e.attributesKey]&&Se.push(writeAttributes(Ce[_e.attributesKey],_e,Ae));var xe=Ce[_e.elementsKey]&&Ce[_e.elementsKey].length||Ce[_e.attributesKey]&&Ce[_e.attributesKey]["xml:space"]==="preserve";return xe||("fullTagEmptyElementFn"in _e?xe=_e.fullTagEmptyElementFn(Ce.name,Ce):xe=_e.fullTagEmptyElement),xe?(Se.push(">"),Ce[_e.elementsKey]&&Ce[_e.elementsKey].length&&(Se.push(writeElements(Ce[_e.elementsKey],_e,Ae+1)),currentElement=Ce,currentElementName=Ce.name),Se.push(_e.spaces&&hasContent(Ce,_e)?`
|
|
18
|
-
`+Array(Ae+1).join(_e.spaces):""),Se.push("</"+Ee+">")):Se.push("/>"),Se.join("")}function writeElements(Ce,_e,Ae,Se){return Ce.reduce(function(Ee,xe){var Te=writeIndentation(_e,Ae,Se&&!Ee);switch(xe.type){case"element":return Ee+Te+writeElement(xe,_e,Ae);case"comment":return Ee+Te+writeComment(xe[_e.commentKey],_e);case"doctype":return Ee+Te+writeDoctype(xe[_e.doctypeKey],_e);case"cdata":return Ee+(_e.indentCdata?Te:"")+writeCdata(xe[_e.cdataKey],_e);case"text":return Ee+(_e.indentText?Te:"")+writeText(xe[_e.textKey],_e);case"instruction":var Ie={};return Ie[xe[_e.nameKey]]=xe[_e.attributesKey]?xe:xe[_e.instructionKey],Ee+(_e.indentInstruction?Te:"")+writeInstruction(Ie,_e,Ae)}},"")}function hasContentCompact(Ce,_e,Ae){var Se;for(Se in Ce)if(Ce.hasOwnProperty(Se))switch(Se){case _e.parentKey:case _e.attributesKey:break;case _e.textKey:if(_e.indentText||Ae)return!0;break;case _e.cdataKey:if(_e.indentCdata||Ae)return!0;break;case _e.instructionKey:if(_e.indentInstruction||Ae)return!0;break;case _e.doctypeKey:case _e.commentKey:return!0;default:return!0}return!1}function writeElementCompact(Ce,_e,Ae,Se,Ee){currentElement=Ce,currentElementName=_e;var xe="elementNameFn"in Ae?Ae.elementNameFn(_e,Ce):_e;if(typeof Ce>"u"||Ce===null||Ce==="")return"fullTagEmptyElementFn"in Ae&&Ae.fullTagEmptyElementFn(_e,Ce)||Ae.fullTagEmptyElement?"<"+xe+"></"+xe+">":"<"+xe+"/>";var Te=[];if(_e){if(Te.push("<"+xe),typeof Ce!="object")return Te.push(">"+writeText(Ce,Ae)+"</"+xe+">"),Te.join("");Ce[Ae.attributesKey]&&Te.push(writeAttributes(Ce[Ae.attributesKey],Ae,Se));var Ie=hasContentCompact(Ce,Ae,!0)||Ce[Ae.attributesKey]&&Ce[Ae.attributesKey]["xml:space"]==="preserve";if(Ie||("fullTagEmptyElementFn"in Ae?Ie=Ae.fullTagEmptyElementFn(_e,Ce):Ie=Ae.fullTagEmptyElement),Ie)Te.push(">");else return Te.push("/>"),Te.join("")}return Te.push(writeElementsCompact(Ce,Ae,Se+1,!1)),currentElement=Ce,currentElementName=_e,_e&&Te.push((Ee?writeIndentation(Ae,Se,!1):"")+"</"+xe+">"),Te.join("")}function writeElementsCompact(Ce,_e,Ae,Se){var Ee,xe,Te,Ie=[];for(xe in Ce)if(Ce.hasOwnProperty(xe))for(Te=isArray$7(Ce[xe])?Ce[xe]:[Ce[xe]],Ee=0;Ee<Te.length;++Ee){switch(xe){case _e.declarationKey:Ie.push(writeDeclaration(Te[Ee],_e,Ae));break;case _e.instructionKey:Ie.push((_e.indentInstruction?writeIndentation(_e,Ae,Se):"")+writeInstruction(Te[Ee],_e,Ae));break;case _e.attributesKey:case _e.parentKey:break;case _e.textKey:Ie.push((_e.indentText?writeIndentation(_e,Ae,Se):"")+writeText(Te[Ee],_e));break;case _e.cdataKey:Ie.push((_e.indentCdata?writeIndentation(_e,Ae,Se):"")+writeCdata(Te[Ee],_e));break;case _e.doctypeKey:Ie.push(writeIndentation(_e,Ae,Se)+writeDoctype(Te[Ee],_e));break;case _e.commentKey:Ie.push(writeIndentation(_e,Ae,Se)+writeComment(Te[Ee],_e));break;default:Ie.push(writeIndentation(_e,Ae,Se)+writeElementCompact(Te[Ee],xe,_e,Ae,hasContentCompact(Te[Ee],_e)))}Se=Se&&!Ie.length}return Ie.join("")}var js2xml$2=function(Ce,_e){_e=validateOptions(_e);var Ae=[];return currentElement=Ce,currentElementName="_root_",_e.compact?Ae.push(writeElementsCompact(Ce,_e,0,!0)):(Ce[_e.declarationKey]&&Ae.push(writeDeclaration(Ce[_e.declarationKey],_e,0)),Ce[_e.elementsKey]&&Ce[_e.elementsKey].length&&Ae.push(writeElements(Ce[_e.elementsKey],_e,0,!Ae.length))),Ae.join("")},js2xml$1=js2xml$2,json2xml$1=function(Ce,_e){Ce instanceof Buffer&&(Ce=Ce.toString());var Ae=null;if(typeof Ce=="string")try{Ae=JSON.parse(Ce)}catch{throw new Error("The JSON structure is invalid")}else Ae=Ce;return js2xml$1(Ae,_e)},xml2js=xml2js$2,xml2json=xml2json$1,js2xml=js2xml$2,json2xml=json2xml$1,lib$2={xml2js,xml2json,js2xml,json2xml};const store$5={_origin:"https://api.emailjs.com"},init$5=(Ce,_e="https://api.emailjs.com")=>{store$5._userID=Ce,store$5._origin=_e},validateParams=(Ce,_e,Ae)=>{if(!Ce)throw"The user ID is required. Visit https://dashboard.emailjs.com/admin/integration";if(!_e)throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!Ae)throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates";return!0};class EmailJSResponseStatus{constructor(_e){this.status=_e.status,this.text=_e.responseText}}const sendPost=(Ce,_e,Ae={})=>new Promise((Se,Ee)=>{const xe=new XMLHttpRequest;xe.addEventListener("load",({target:Te})=>{const Ie=new EmailJSResponseStatus(Te);Ie.status===200||Ie.text==="OK"?Se(Ie):Ee(Ie)}),xe.addEventListener("error",({target:Te})=>{Ee(new EmailJSResponseStatus(Te))}),xe.open("POST",store$5._origin+Ce,!0),Object.keys(Ae).forEach(Te=>{xe.setRequestHeader(Te,Ae[Te])}),xe.send(_e)}),send=(Ce,_e,Ae,Se)=>{const Ee=Se||store$5._userID;return validateParams(Ee,Ce,_e),sendPost("/api/v1.0/email/send",JSON.stringify({lib_version:"3.2.0",user_id:Ee,service_id:Ce,template_id:_e,template_params:Ae}),{"Content-type":"application/json"})},findHTMLForm=Ce=>{let _e;if(typeof Ce=="string"?_e=document.querySelector(Ce):_e=Ce,!_e||_e.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of form";return _e},sendForm=(Ce,_e,Ae,Se)=>{const Ee=Se||store$5._userID,xe=findHTMLForm(Ae);validateParams(Ee,Ce,_e);const Te=new FormData(xe);return Te.append("lib_version","3.2.0"),Te.append("service_id",Ce),Te.append("template_id",_e),Te.append("user_id",Ee),sendPost("/api/v1.0/email/send-form",Te)},emailjs={init:init$5,send,sendForm},PACKET_TYPES=Object.create(null);PACKET_TYPES.open="0",PACKET_TYPES.close="1",PACKET_TYPES.ping="2",PACKET_TYPES.pong="3",PACKET_TYPES.message="4",PACKET_TYPES.upgrade="5",PACKET_TYPES.noop="6";const PACKET_TYPES_REVERSE=Object.create(null);Object.keys(PACKET_TYPES).forEach(Ce=>{PACKET_TYPES_REVERSE[PACKET_TYPES[Ce]]=Ce});const ERROR_PACKET={type:"error",data:"parser error"},withNativeBlob$1=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",withNativeArrayBuffer$2=typeof ArrayBuffer=="function",isView$1=Ce=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(Ce):Ce&&Ce.buffer instanceof ArrayBuffer,encodePacket=({type:Ce,data:_e},Ae,Se)=>withNativeBlob$1&&_e instanceof Blob?Ae?Se(_e):encodeBlobAsBase64(_e,Se):withNativeArrayBuffer$2&&(_e instanceof ArrayBuffer||isView$1(_e))?Ae?Se(_e):encodeBlobAsBase64(new Blob([_e]),Se):Se(PACKET_TYPES[Ce]+(_e||"")),encodeBlobAsBase64=(Ce,_e)=>{const Ae=new FileReader;return Ae.onload=function(){const Se=Ae.result.split(",")[1];_e("b"+(Se||""))},Ae.readAsDataURL(Ce)};function toArray(Ce){return Ce instanceof Uint8Array?Ce:Ce instanceof ArrayBuffer?new Uint8Array(Ce):new Uint8Array(Ce.buffer,Ce.byteOffset,Ce.byteLength)}let TEXT_ENCODER;function encodePacketToBinary(Ce,_e){if(withNativeBlob$1&&Ce.data instanceof Blob)return Ce.data.arrayBuffer().then(toArray).then(_e);if(withNativeArrayBuffer$2&&(Ce.data instanceof ArrayBuffer||isView$1(Ce.data)))return _e(toArray(Ce.data));encodePacket(Ce,!1,Ae=>{TEXT_ENCODER||(TEXT_ENCODER=new TextEncoder),_e(TEXT_ENCODER.encode(Ae))})}const chars$5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lookup$6=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let Ce=0;Ce<chars$5.length;Ce++)lookup$6[chars$5.charCodeAt(Ce)]=Ce;const decode$4=Ce=>{let _e=Ce.length*.75,Ae=Ce.length,Se,Ee=0,xe,Te,Ie,De;Ce[Ce.length-1]==="="&&(_e--,Ce[Ce.length-2]==="="&&_e--);const ke=new ArrayBuffer(_e),Oe=new Uint8Array(ke);for(Se=0;Se<Ae;Se+=4)xe=lookup$6[Ce.charCodeAt(Se)],Te=lookup$6[Ce.charCodeAt(Se+1)],Ie=lookup$6[Ce.charCodeAt(Se+2)],De=lookup$6[Ce.charCodeAt(Se+3)],Oe[Ee++]=xe<<2|Te>>4,Oe[Ee++]=(Te&15)<<4|Ie>>2,Oe[Ee++]=(Ie&3)<<6|De&63;return ke},withNativeArrayBuffer$1=typeof ArrayBuffer=="function",decodePacket=(Ce,_e)=>{if(typeof Ce!="string")return{type:"message",data:mapBinary(Ce,_e)};const Ae=Ce.charAt(0);return Ae==="b"?{type:"message",data:decodeBase64Packet(Ce.substring(1),_e)}:PACKET_TYPES_REVERSE[Ae]?Ce.length>1?{type:PACKET_TYPES_REVERSE[Ae],data:Ce.substring(1)}:{type:PACKET_TYPES_REVERSE[Ae]}:ERROR_PACKET},decodeBase64Packet=(Ce,_e)=>{if(withNativeArrayBuffer$1){const Ae=decode$4(Ce);return mapBinary(Ae,_e)}else return{base64:!0,data:Ce}},mapBinary=(Ce,_e)=>{switch(_e){case"blob":return Ce instanceof Blob?Ce:new Blob([Ce]);case"arraybuffer":default:return Ce instanceof ArrayBuffer?Ce:Ce.buffer}},SEPARATOR="",encodePayload=(Ce,_e)=>{const Ae=Ce.length,Se=new Array(Ae);let Ee=0;Ce.forEach((xe,Te)=>{encodePacket(xe,!1,Ie=>{Se[Te]=Ie,++Ee===Ae&&_e(Se.join(SEPARATOR))})})},decodePayload=(Ce,_e)=>{const Ae=Ce.split(SEPARATOR),Se=[];for(let Ee=0;Ee<Ae.length;Ee++){const xe=decodePacket(Ae[Ee],_e);if(Se.push(xe),xe.type==="error")break}return Se};function createPacketEncoderStream(){return new TransformStream({transform(Ce,_e){encodePacketToBinary(Ce,Ae=>{const Se=Ae.length;let Ee;if(Se<126)Ee=new Uint8Array(1),new DataView(Ee.buffer).setUint8(0,Se);else if(Se<65536){Ee=new Uint8Array(3);const xe=new DataView(Ee.buffer);xe.setUint8(0,126),xe.setUint16(1,Se)}else{Ee=new Uint8Array(9);const xe=new DataView(Ee.buffer);xe.setUint8(0,127),xe.setBigUint64(1,BigInt(Se))}Ce.data&&typeof Ce.data!="string"&&(Ee[0]|=128),_e.enqueue(Ee),_e.enqueue(Ae)})}})}let TEXT_DECODER;function totalLength(Ce){return Ce.reduce((_e,Ae)=>_e+Ae.length,0)}function concatChunks(Ce,_e){if(Ce[0].length===_e)return Ce.shift();const Ae=new Uint8Array(_e);let Se=0;for(let Ee=0;Ee<_e;Ee++)Ae[Ee]=Ce[0][Se++],Se===Ce[0].length&&(Ce.shift(),Se=0);return Ce.length&&Se<Ce[0].length&&(Ce[0]=Ce[0].slice(Se)),Ae}function createPacketDecoderStream(Ce,_e){TEXT_DECODER||(TEXT_DECODER=new TextDecoder);const Ae=[];let Se=0,Ee=-1,xe=!1;return new TransformStream({transform(Te,Ie){for(Ae.push(Te);;){if(Se===0){if(totalLength(Ae)<1)break;const De=concatChunks(Ae,1);xe=(De[0]&128)===128,Ee=De[0]&127,Ee<126?Se=3:Ee===126?Se=1:Se=2}else if(Se===1){if(totalLength(Ae)<2)break;const De=concatChunks(Ae,2);Ee=new DataView(De.buffer,De.byteOffset,De.length).getUint16(0),Se=3}else if(Se===2){if(totalLength(Ae)<8)break;const De=concatChunks(Ae,8),ke=new DataView(De.buffer,De.byteOffset,De.length),Oe=ke.getUint32(0);if(Oe>Math.pow(2,21)-1){Ie.enqueue(ERROR_PACKET);break}Ee=Oe*Math.pow(2,32)+ke.getUint32(4),Se=3}else{if(totalLength(Ae)<Ee)break;const De=concatChunks(Ae,Ee);Ie.enqueue(decodePacket(xe?De:TEXT_DECODER.decode(De),_e)),Se=0}if(Ee===0||Ee>Ce){Ie.enqueue(ERROR_PACKET);break}}}})}const protocol$1=4;function Emitter$3(Ce){if(Ce)return mixin$2(Ce)}function mixin$2(Ce){for(var _e in Emitter$3.prototype)Ce[_e]=Emitter$3.prototype[_e];return Ce}Emitter$3.prototype.on=Emitter$3.prototype.addEventListener=function(Ce,_e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+Ce]=this._callbacks["$"+Ce]||[]).push(_e),this},Emitter$3.prototype.once=function(Ce,_e){function Ae(){this.off(Ce,Ae),_e.apply(this,arguments)}return Ae.fn=_e,this.on(Ce,Ae),this},Emitter$3.prototype.off=Emitter$3.prototype.removeListener=Emitter$3.prototype.removeAllListeners=Emitter$3.prototype.removeEventListener=function(Ce,_e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var Ae=this._callbacks["$"+Ce];if(!Ae)return this;if(arguments.length==1)return delete this._callbacks["$"+Ce],this;for(var Se,Ee=0;Ee<Ae.length;Ee++)if(Se=Ae[Ee],Se===_e||Se.fn===_e){Ae.splice(Ee,1);break}return Ae.length===0&&delete this._callbacks["$"+Ce],this},Emitter$3.prototype.emit=function(Ce){this._callbacks=this._callbacks||{};for(var _e=new Array(arguments.length-1),Ae=this._callbacks["$"+Ce],Se=1;Se<arguments.length;Se++)_e[Se-1]=arguments[Se];if(Ae){Ae=Ae.slice(0);for(var Se=0,Ee=Ae.length;Se<Ee;++Se)Ae[Se].apply(this,_e)}return this},Emitter$3.prototype.emitReserved=Emitter$3.prototype.emit,Emitter$3.prototype.listeners=function(Ce){return this._callbacks=this._callbacks||{},this._callbacks["$"+Ce]||[]},Emitter$3.prototype.hasListeners=function(Ce){return!!this.listeners(Ce).length};const nextTick=typeof Promise=="function"&&typeof Promise.resolve=="function"?_e=>Promise.resolve().then(_e):(_e,Ae)=>Ae(_e,0),globalThisShim=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),defaultBinaryType="arraybuffer";function createCookieJar(){}function pick$1(Ce,..._e){return _e.reduce((Ae,Se)=>(Ce.hasOwnProperty(Se)&&(Ae[Se]=Ce[Se]),Ae),{})}const NATIVE_SET_TIMEOUT=globalThisShim.setTimeout,NATIVE_CLEAR_TIMEOUT=globalThisShim.clearTimeout;function installTimerFunctions(Ce,_e){_e.useNativeTimers?(Ce.setTimeoutFn=NATIVE_SET_TIMEOUT.bind(globalThisShim),Ce.clearTimeoutFn=NATIVE_CLEAR_TIMEOUT.bind(globalThisShim)):(Ce.setTimeoutFn=globalThisShim.setTimeout.bind(globalThisShim),Ce.clearTimeoutFn=globalThisShim.clearTimeout.bind(globalThisShim))}const BASE64_OVERHEAD=1.33;function byteLength(Ce){return typeof Ce=="string"?utf8Length(Ce):Math.ceil((Ce.byteLength||Ce.size)*BASE64_OVERHEAD)}function utf8Length(Ce){let _e=0,Ae=0;for(let Se=0,Ee=Ce.length;Se<Ee;Se++)_e=Ce.charCodeAt(Se),_e<128?Ae+=1:_e<2048?Ae+=2:_e<55296||_e>=57344?Ae+=3:(Se++,Ae+=4);return Ae}function randomString(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function encode$1(Ce){let _e="";for(let Ae in Ce)Ce.hasOwnProperty(Ae)&&(_e.length&&(_e+="&"),_e+=encodeURIComponent(Ae)+"="+encodeURIComponent(Ce[Ae]));return _e}function decode$3(Ce){let _e={},Ae=Ce.split("&");for(let Se=0,Ee=Ae.length;Se<Ee;Se++){let xe=Ae[Se].split("=");_e[decodeURIComponent(xe[0])]=decodeURIComponent(xe[1])}return _e}class TransportError extends Error{constructor(_e,Ae,Se){super(_e),this.description=Ae,this.context=Se,this.type="TransportError"}}class Transport extends Emitter$3{constructor(_e){super(),this.writable=!1,installTimerFunctions(this,_e),this.opts=_e,this.query=_e.query,this.socket=_e.socket,this.supportsBinary=!_e.forceBase64}onError(_e,Ae,Se){return super.emitReserved("error",new TransportError(_e,Ae,Se)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(_e){this.readyState==="open"&&this.write(_e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(_e){const Ae=decodePacket(_e,this.socket.binaryType);this.onPacket(Ae)}onPacket(_e){super.emitReserved("packet",_e)}onClose(_e){this.readyState="closed",super.emitReserved("close",_e)}pause(_e){}createUri(_e,Ae={}){return _e+"://"+this._hostname()+this._port()+this.opts.path+this._query(Ae)}_hostname(){const _e=this.opts.hostname;return _e.indexOf(":")===-1?_e:"["+_e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(_e){const Ae=encode$1(_e);return Ae.length?"?"+Ae:""}}class Polling extends Transport{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(_e){this.readyState="pausing";const Ae=()=>{this.readyState="paused",_e()};if(this._polling||!this.writable){let Se=0;this._polling&&(Se++,this.once("pollComplete",function(){--Se||Ae()})),this.writable||(Se++,this.once("drain",function(){--Se||Ae()}))}else Ae()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(_e){const Ae=Se=>{if(this.readyState==="opening"&&Se.type==="open"&&this.onOpen(),Se.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(Se)};decodePayload(_e,this.socket.binaryType).forEach(Ae),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const _e=()=>{this.write([{type:"close"}])};this.readyState==="open"?_e():this.once("open",_e)}write(_e){this.writable=!1,encodePayload(_e,Ae=>{this.doWrite(Ae,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const _e=this.opts.secure?"https":"http",Ae=this.query||{};return this.opts.timestampRequests!==!1&&(Ae[this.opts.timestampParam]=randomString()),!this.supportsBinary&&!Ae.sid&&(Ae.b64=1),this.createUri(_e,Ae)}}let value=!1;try{value=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch(Ce){}const hasCORS=value;function empty$4(){}class BaseXHR extends Polling{constructor(_e){if(super(_e),typeof location<"u"){const Ae=location.protocol==="https:";let Se=location.port;Se||(Se=Ae?"443":"80"),this.xd=typeof location<"u"&&_e.hostname!==location.hostname||Se!==_e.port}}doWrite(_e,Ae){const Se=this.request({method:"POST",data:_e});Se.on("success",Ae),Se.on("error",(Ee,xe)=>{this.onError("xhr post error",Ee,xe)})}doPoll(){const _e=this.request();_e.on("data",this.onData.bind(this)),_e.on("error",(Ae,Se)=>{this.onError("xhr poll error",Ae,Se)}),this.pollXhr=_e}}class Request extends Emitter$3{constructor(_e,Ae,Se){super(),this.createRequest=_e,installTimerFunctions(this,Se),this._opts=Se,this._method=Se.method||"GET",this._uri=Ae,this._data=Se.data!==void 0?Se.data:null,this._create()}_create(){var _e;const Ae=pick$1(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");Ae.xdomain=!!this._opts.xd;const Se=this._xhr=this.createRequest(Ae);try{Se.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){Se.setDisableHeaderCheck&&Se.setDisableHeaderCheck(!0);for(let Ee in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(Ee)&&Se.setRequestHeader(Ee,this._opts.extraHeaders[Ee])}}catch{}if(this._method==="POST")try{Se.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{Se.setRequestHeader("Accept","*/*")}catch{}(_e=this._opts.cookieJar)===null||_e===void 0||_e.addCookies(Se),"withCredentials"in Se&&(Se.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(Se.timeout=this._opts.requestTimeout),Se.onreadystatechange=()=>{var Ee;Se.readyState===3&&((Ee=this._opts.cookieJar)===null||Ee===void 0||Ee.parseCookies(Se.getResponseHeader("set-cookie"))),Se.readyState===4&&(Se.status===200||Se.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof Se.status=="number"?Se.status:0)},0))},Se.send(this._data)}catch(Ee){this.setTimeoutFn(()=>{this._onError(Ee)},0);return}typeof document<"u"&&(this._index=Request.requestsCount++,Request.requests[this._index]=this)}_onError(_e){this.emitReserved("error",_e,this._xhr),this._cleanup(!0)}_cleanup(_e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=empty$4,_e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Request.requests[this._index],this._xhr=null}}_onLoad(){const _e=this._xhr.responseText;_e!==null&&(this.emitReserved("data",_e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(Request.requestsCount=0,Request.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",unloadHandler);else if(typeof addEventListener=="function"){const Ce="onpagehide"in globalThisShim?"pagehide":"unload";addEventListener(Ce,unloadHandler,!1)}}function unloadHandler(){for(let Ce in Request.requests)Request.requests.hasOwnProperty(Ce)&&Request.requests[Ce].abort()}const hasXHR2=function(){const Ce=newRequest({xdomain:!1});return Ce&&Ce.responseType!==null}();class XHR extends BaseXHR{constructor(_e){super(_e);const Ae=_e&&_e.forceBase64;this.supportsBinary=hasXHR2&&!Ae}request(_e={}){return Object.assign(_e,{xd:this.xd},this.opts),new Request(newRequest,this.uri(),_e)}}function newRequest(Ce){const _e=Ce.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!_e||hasCORS))return new XMLHttpRequest}catch{}if(!_e)try{return new globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class BaseWS extends Transport{get name(){return"websocket"}doOpen(){const _e=this.uri(),Ae=this.opts.protocols,Se=isReactNative?{}:pick$1(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(Se.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(_e,Ae,Se)}catch(Ee){return this.emitReserved("error",Ee)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=_e=>this.onClose({description:"websocket connection closed",context:_e}),this.ws.onmessage=_e=>this.onData(_e.data),this.ws.onerror=_e=>this.onError("websocket error",_e)}write(_e){this.writable=!1;for(let Ae=0;Ae<_e.length;Ae++){const Se=_e[Ae],Ee=Ae===_e.length-1;encodePacket(Se,this.supportsBinary,xe=>{try{this.doWrite(Se,xe)}catch{}Ee&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const _e=this.opts.secure?"wss":"ws",Ae=this.query||{};return this.opts.timestampRequests&&(Ae[this.opts.timestampParam]=randomString()),this.supportsBinary||(Ae.b64=1),this.createUri(_e,Ae)}}const WebSocketCtor=globalThisShim.WebSocket||globalThisShim.MozWebSocket;let WS$1=class extends BaseWS{createSocket(_e,Ae,Se){return isReactNative?new WebSocketCtor(_e,Ae,Se):Ae?new WebSocketCtor(_e,Ae):new WebSocketCtor(_e)}doWrite(_e,Ae){this.ws.send(Ae)}};class WT extends Transport{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(_e){return this.emitReserved("error",_e)}this._transport.closed.then(()=>{this.onClose()}).catch(_e=>{this.onError("webtransport error",_e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(_e=>{const Ae=createPacketDecoderStream(Number.MAX_SAFE_INTEGER,this.socket.binaryType),Se=_e.readable.pipeThrough(Ae).getReader(),Ee=createPacketEncoderStream();Ee.readable.pipeTo(_e.writable),this._writer=Ee.writable.getWriter();const xe=()=>{Se.read().then(({done:Ie,value:De})=>{Ie||(this.onPacket(De),xe())}).catch(Ie=>{})};xe();const Te={type:"open"};this.query.sid&&(Te.data=`{"sid":"${this.query.sid}"}`),this._writer.write(Te).then(()=>this.onOpen())})})}write(_e){this.writable=!1;for(let Ae=0;Ae<_e.length;Ae++){const Se=_e[Ae],Ee=Ae===_e.length-1;this._writer.write(Se).then(()=>{Ee&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var _e;(_e=this._transport)===null||_e===void 0||_e.close()}}const transports={websocket:WS$1,webtransport:WT,polling:XHR},re$1=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,parts=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function parse$b(Ce){if(Ce.length>8e3)throw"URI too long";const _e=Ce,Ae=Ce.indexOf("["),Se=Ce.indexOf("]");Ae!=-1&&Se!=-1&&(Ce=Ce.substring(0,Ae)+Ce.substring(Ae,Se).replace(/:/g,";")+Ce.substring(Se,Ce.length));let Ee=re$1.exec(Ce||""),xe={},Te=14;for(;Te--;)xe[parts[Te]]=Ee[Te]||"";return Ae!=-1&&Se!=-1&&(xe.source=_e,xe.host=xe.host.substring(1,xe.host.length-1).replace(/;/g,":"),xe.authority=xe.authority.replace("[","").replace("]","").replace(/;/g,":"),xe.ipv6uri=!0),xe.pathNames=pathNames(xe,xe.path),xe.queryKey=queryKey(xe,xe.query),xe}function pathNames(Ce,_e){const Ae=/\/{2,9}/g,Se=_e.replace(Ae,"/").split("/");return(_e.slice(0,1)=="/"||_e.length===0)&&Se.splice(0,1),_e.slice(-1)=="/"&&Se.splice(Se.length-1,1),Se}function queryKey(Ce,_e){const Ae={};return _e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(Se,Ee,xe){Ee&&(Ae[Ee]=xe)}),Ae}const withEventListeners=typeof addEventListener=="function"&&typeof removeEventListener=="function",OFFLINE_EVENT_LISTENERS=[];withEventListeners&&addEventListener("offline",()=>{OFFLINE_EVENT_LISTENERS.forEach(Ce=>Ce())},!1);class SocketWithoutUpgrade extends Emitter$3{constructor(_e,Ae){if(super(),this.binaryType=defaultBinaryType,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,_e&&typeof _e=="object"&&(Ae=_e,_e=null),_e){const Se=parse$b(_e);Ae.hostname=Se.host,Ae.secure=Se.protocol==="https"||Se.protocol==="wss",Ae.port=Se.port,Se.query&&(Ae.query=Se.query)}else Ae.host&&(Ae.hostname=parse$b(Ae.host).host);installTimerFunctions(this,Ae),this.secure=Ae.secure!=null?Ae.secure:typeof location<"u"&&location.protocol==="https:",Ae.hostname&&!Ae.port&&(Ae.port=this.secure?"443":"80"),this.hostname=Ae.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=Ae.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},Ae.transports.forEach(Se=>{const Ee=Se.prototype.name;this.transports.push(Ee),this._transportsByName[Ee]=Se}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},Ae),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=decode$3(this.opts.query)),withEventListeners&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},OFFLINE_EVENT_LISTENERS.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(_e){const Ae=Object.assign({},this.opts.query);Ae.EIO=protocol$1,Ae.transport=_e,this.id&&(Ae.sid=this.id);const Se=Object.assign({},this.opts,{query:Ae,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[_e]);return new this._transportsByName[_e](Se)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const _e=this.opts.rememberUpgrade&&SocketWithoutUpgrade.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const Ae=this.createTransport(_e);Ae.open(),this.setTransport(Ae)}setTransport(_e){this.transport&&this.transport.removeAllListeners(),this.transport=_e,_e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",Ae=>this._onClose("transport close",Ae))}onOpen(){this.readyState="open",SocketWithoutUpgrade.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(_e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",_e),this.emitReserved("heartbeat"),_e.type){case"open":this.onHandshake(JSON.parse(_e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const Ae=new Error("server error");Ae.code=_e.data,this._onError(Ae);break;case"message":this.emitReserved("data",_e.data),this.emitReserved("message",_e.data);break}}onHandshake(_e){this.emitReserved("handshake",_e),this.id=_e.sid,this.transport.query.sid=_e.sid,this._pingInterval=_e.pingInterval,this._pingTimeout=_e.pingTimeout,this._maxPayload=_e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const _e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+_e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},_e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const _e=this._getWritablePackets();this.transport.send(_e),this._prevBufferLen=_e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let Ae=1;for(let Se=0;Se<this.writeBuffer.length;Se++){const Ee=this.writeBuffer[Se].data;if(Ee&&(Ae+=byteLength(Ee)),Se>0&&Ae>this._maxPayload)return this.writeBuffer.slice(0,Se);Ae+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const _e=Date.now()>this._pingTimeoutTime;return _e&&(this._pingTimeoutTime=0,nextTick(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),_e}write(_e,Ae,Se){return this._sendPacket("message",_e,Ae,Se),this}send(_e,Ae,Se){return this._sendPacket("message",_e,Ae,Se),this}_sendPacket(_e,Ae,Se,Ee){if(typeof Ae=="function"&&(Ee=Ae,Ae=void 0),typeof Se=="function"&&(Ee=Se,Se=null),this.readyState==="closing"||this.readyState==="closed")return;Se=Se||{},Se.compress=Se.compress!==!1;const xe={type:_e,data:Ae,options:Se};this.emitReserved("packetCreate",xe),this.writeBuffer.push(xe),Ee&&this.once("flush",Ee),this.flush()}close(){const _e=()=>{this._onClose("forced close"),this.transport.close()},Ae=()=>{this.off("upgrade",Ae),this.off("upgradeError",Ae),_e()},Se=()=>{this.once("upgrade",Ae),this.once("upgradeError",Ae)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?Se():_e()}):this.upgrading?Se():_e()),this}_onError(_e){if(SocketWithoutUpgrade.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",_e),this._onClose("transport error",_e)}_onClose(_e,Ae){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),withEventListeners&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const Se=OFFLINE_EVENT_LISTENERS.indexOf(this._offlineEventListener);Se!==-1&&OFFLINE_EVENT_LISTENERS.splice(Se,1)}this.readyState="closed",this.id=null,this.emitReserved("close",_e,Ae),this.writeBuffer=[],this._prevBufferLen=0}}}SocketWithoutUpgrade.protocol=protocol$1;class SocketWithUpgrade extends SocketWithoutUpgrade{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let _e=0;_e<this._upgrades.length;_e++)this._probe(this._upgrades[_e])}_probe(_e){let Ae=this.createTransport(_e),Se=!1;SocketWithoutUpgrade.priorWebsocketSuccess=!1;const Ee=()=>{Se||(Ae.send([{type:"ping",data:"probe"}]),Ae.once("packet",Me=>{if(!Se)if(Me.type==="pong"&&Me.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",Ae),!Ae)return;SocketWithoutUpgrade.priorWebsocketSuccess=Ae.name==="websocket",this.transport.pause(()=>{Se||this.readyState!=="closed"&&(Oe(),this.setTransport(Ae),Ae.send([{type:"upgrade"}]),this.emitReserved("upgrade",Ae),Ae=null,this.upgrading=!1,this.flush())})}else{const Pe=new Error("probe error");Pe.transport=Ae.name,this.emitReserved("upgradeError",Pe)}}))};function xe(){Se||(Se=!0,Oe(),Ae.close(),Ae=null)}const Te=Me=>{const Pe=new Error("probe error: "+Me);Pe.transport=Ae.name,xe(),this.emitReserved("upgradeError",Pe)};function Ie(){Te("transport closed")}function De(){Te("socket closed")}function ke(Me){Ae&&Me.name!==Ae.name&&xe()}const Oe=()=>{Ae.removeListener("open",Ee),Ae.removeListener("error",Te),Ae.removeListener("close",Ie),this.off("close",De),this.off("upgrading",ke)};Ae.once("open",Ee),Ae.once("error",Te),Ae.once("close",Ie),this.once("close",De),this.once("upgrading",ke),this._upgrades.indexOf("webtransport")!==-1&&_e!=="webtransport"?this.setTimeoutFn(()=>{Se||Ae.open()},200):Ae.open()}onHandshake(_e){this._upgrades=this._filterUpgrades(_e.upgrades),super.onHandshake(_e)}_filterUpgrades(_e){const Ae=[];for(let Se=0;Se<_e.length;Se++)~this.transports.indexOf(_e[Se])&&Ae.push(_e[Se]);return Ae}}let Socket$1=class extends SocketWithUpgrade{constructor(_e,Ae={}){const Se=typeof _e=="object"?_e:Ae;(!Se.transports||Se.transports&&typeof Se.transports[0]=="string")&&(Se.transports=(Se.transports||["polling","websocket","webtransport"]).map(Ee=>transports[Ee]).filter(Ee=>!!Ee)),super(_e,Se)}};function url(Ce,_e="",Ae){let Se=Ce;Ae=Ae||typeof location<"u"&&location,Ce==null&&(Ce=Ae.protocol+"//"+Ae.host),typeof Ce=="string"&&(Ce.charAt(0)==="/"&&(Ce.charAt(1)==="/"?Ce=Ae.protocol+Ce:Ce=Ae.host+Ce),/^(https?|wss?):\/\//.test(Ce)||(typeof Ae<"u"?Ce=Ae.protocol+"//"+Ce:Ce="https://"+Ce),Se=parse$b(Ce)),Se.port||(/^(http|ws)$/.test(Se.protocol)?Se.port="80":/^(http|ws)s$/.test(Se.protocol)&&(Se.port="443")),Se.path=Se.path||"/";const xe=Se.host.indexOf(":")!==-1?"["+Se.host+"]":Se.host;return Se.id=Se.protocol+"://"+xe+":"+Se.port+_e,Se.href=Se.protocol+"://"+xe+(Ae&&Ae.port===Se.port?"":":"+Se.port),Se}const withNativeArrayBuffer=typeof ArrayBuffer=="function",isView=Ce=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(Ce):Ce.buffer instanceof ArrayBuffer,toString$g=Object.prototype.toString,withNativeBlob=typeof Blob=="function"||typeof Blob<"u"&&toString$g.call(Blob)==="[object BlobConstructor]",withNativeFile=typeof File=="function"||typeof File<"u"&&toString$g.call(File)==="[object FileConstructor]";function isBinary(Ce){return withNativeArrayBuffer&&(Ce instanceof ArrayBuffer||isView(Ce))||withNativeBlob&&Ce instanceof Blob||withNativeFile&&Ce instanceof File}function hasBinary(Ce,_e){if(!Ce||typeof Ce!="object")return!1;if(Array.isArray(Ce)){for(let Ae=0,Se=Ce.length;Ae<Se;Ae++)if(hasBinary(Ce[Ae]))return!0;return!1}if(isBinary(Ce))return!0;if(Ce.toJSON&&typeof Ce.toJSON=="function"&&arguments.length===1)return hasBinary(Ce.toJSON(),!0);for(const Ae in Ce)if(Object.prototype.hasOwnProperty.call(Ce,Ae)&&hasBinary(Ce[Ae]))return!0;return!1}function deconstructPacket(Ce){const _e=[],Ae=Ce.data,Se=Ce;return Se.data=_deconstructPacket(Ae,_e),Se.attachments=_e.length,{packet:Se,buffers:_e}}function _deconstructPacket(Ce,_e){if(!Ce)return Ce;if(isBinary(Ce)){const Ae={_placeholder:!0,num:_e.length};return _e.push(Ce),Ae}else if(Array.isArray(Ce)){const Ae=new Array(Ce.length);for(let Se=0;Se<Ce.length;Se++)Ae[Se]=_deconstructPacket(Ce[Se],_e);return Ae}else if(typeof Ce=="object"&&!(Ce instanceof Date)){const Ae={};for(const Se in Ce)Object.prototype.hasOwnProperty.call(Ce,Se)&&(Ae[Se]=_deconstructPacket(Ce[Se],_e));return Ae}return Ce}function reconstructPacket(Ce,_e){return Ce.data=_reconstructPacket(Ce.data,_e),delete Ce.attachments,Ce}function _reconstructPacket(Ce,_e){if(!Ce)return Ce;if(Ce&&Ce._placeholder===!0){if(typeof Ce.num=="number"&&Ce.num>=0&&Ce.num<_e.length)return _e[Ce.num];throw new Error("illegal attachments")}else if(Array.isArray(Ce))for(let Ae=0;Ae<Ce.length;Ae++)Ce[Ae]=_reconstructPacket(Ce[Ae],_e);else if(typeof Ce=="object")for(const Ae in Ce)Object.prototype.hasOwnProperty.call(Ce,Ae)&&(Ce[Ae]=_reconstructPacket(Ce[Ae],_e));return Ce}const RESERVED_EVENTS$1=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],protocol=5;var PacketType;(function(Ce){Ce[Ce.CONNECT=0]="CONNECT",Ce[Ce.DISCONNECT=1]="DISCONNECT",Ce[Ce.EVENT=2]="EVENT",Ce[Ce.ACK=3]="ACK",Ce[Ce.CONNECT_ERROR=4]="CONNECT_ERROR",Ce[Ce.BINARY_EVENT=5]="BINARY_EVENT",Ce[Ce.BINARY_ACK=6]="BINARY_ACK"})(PacketType||(PacketType={}));class Encoder{constructor(_e){this.replacer=_e}encode(_e){return(_e.type===PacketType.EVENT||_e.type===PacketType.ACK)&&hasBinary(_e)?this.encodeAsBinary({type:_e.type===PacketType.EVENT?PacketType.BINARY_EVENT:PacketType.BINARY_ACK,nsp:_e.nsp,data:_e.data,id:_e.id}):[this.encodeAsString(_e)]}encodeAsString(_e){let Ae=""+_e.type;return(_e.type===PacketType.BINARY_EVENT||_e.type===PacketType.BINARY_ACK)&&(Ae+=_e.attachments+"-"),_e.nsp&&_e.nsp!=="/"&&(Ae+=_e.nsp+","),_e.id!=null&&(Ae+=_e.id),_e.data!=null&&(Ae+=JSON.stringify(_e.data,this.replacer)),Ae}encodeAsBinary(_e){const Ae=deconstructPacket(_e),Se=this.encodeAsString(Ae.packet),Ee=Ae.buffers;return Ee.unshift(Se),Ee}}function isObject$l(Ce){return Object.prototype.toString.call(Ce)==="[object Object]"}class Decoder extends Emitter$3{constructor(_e){super(),this.reviver=_e}add(_e){let Ae;if(typeof _e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");Ae=this.decodeString(_e);const Se=Ae.type===PacketType.BINARY_EVENT;Se||Ae.type===PacketType.BINARY_ACK?(Ae.type=Se?PacketType.EVENT:PacketType.ACK,this.reconstructor=new BinaryReconstructor(Ae),Ae.attachments===0&&super.emitReserved("decoded",Ae)):super.emitReserved("decoded",Ae)}else if(isBinary(_e)||_e.base64)if(this.reconstructor)Ae=this.reconstructor.takeBinaryData(_e),Ae&&(this.reconstructor=null,super.emitReserved("decoded",Ae));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+_e)}decodeString(_e){let Ae=0;const Se={type:Number(_e.charAt(0))};if(PacketType[Se.type]===void 0)throw new Error("unknown packet type "+Se.type);if(Se.type===PacketType.BINARY_EVENT||Se.type===PacketType.BINARY_ACK){const xe=Ae+1;for(;_e.charAt(++Ae)!=="-"&&Ae!=_e.length;);const Te=_e.substring(xe,Ae);if(Te!=Number(Te)||_e.charAt(Ae)!=="-")throw new Error("Illegal attachments");Se.attachments=Number(Te)}if(_e.charAt(Ae+1)==="/"){const xe=Ae+1;for(;++Ae&&!(_e.charAt(Ae)===","||Ae===_e.length););Se.nsp=_e.substring(xe,Ae)}else Se.nsp="/";const Ee=_e.charAt(Ae+1);if(Ee!==""&&Number(Ee)==Ee){const xe=Ae+1;for(;++Ae;){const Te=_e.charAt(Ae);if(Te==null||Number(Te)!=Te){--Ae;break}if(Ae===_e.length)break}Se.id=Number(_e.substring(xe,Ae+1))}if(_e.charAt(++Ae)){const xe=this.tryParse(_e.substr(Ae));if(Decoder.isPayloadValid(Se.type,xe))Se.data=xe;else throw new Error("invalid payload")}return Se}tryParse(_e){try{return JSON.parse(_e,this.reviver)}catch{return!1}}static isPayloadValid(_e,Ae){switch(_e){case PacketType.CONNECT:return isObject$l(Ae);case PacketType.DISCONNECT:return Ae===void 0;case PacketType.CONNECT_ERROR:return typeof Ae=="string"||isObject$l(Ae);case PacketType.EVENT:case PacketType.BINARY_EVENT:return Array.isArray(Ae)&&(typeof Ae[0]=="number"||typeof Ae[0]=="string"&&RESERVED_EVENTS$1.indexOf(Ae[0])===-1);case PacketType.ACK:case PacketType.BINARY_ACK:return Array.isArray(Ae)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class BinaryReconstructor{constructor(_e){this.packet=_e,this.buffers=[],this.reconPack=_e}takeBinaryData(_e){if(this.buffers.push(_e),this.buffers.length===this.reconPack.attachments){const Ae=reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),Ae}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const parser$1=Object.freeze(Object.defineProperty({__proto__:null,Decoder,Encoder,get PacketType(){return PacketType},protocol},Symbol.toStringTag,{value:"Module"}));function on(Ce,_e,Ae){return Ce.on(_e,Ae),function(){Ce.off(_e,Ae)}}const RESERVED_EVENTS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Socket extends Emitter$3{constructor(_e,Ae,Se){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=_e,this.nsp=Ae,Se&&Se.auth&&(this.auth=Se.auth),this._opts=Object.assign({},Se),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const _e=this.io;this.subs=[on(_e,"open",this.onopen.bind(this)),on(_e,"packet",this.onpacket.bind(this)),on(_e,"error",this.onerror.bind(this)),on(_e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(..._e){return _e.unshift("message"),this.emit.apply(this,_e),this}emit(_e,...Ae){var Se,Ee,xe;if(RESERVED_EVENTS.hasOwnProperty(_e))throw new Error('"'+_e.toString()+'" is a reserved event name');if(Ae.unshift(_e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(Ae),this;const Te={type:PacketType.EVENT,data:Ae};if(Te.options={},Te.options.compress=this.flags.compress!==!1,typeof Ae[Ae.length-1]=="function"){const Oe=this.ids++,Me=Ae.pop();this._registerAckCallback(Oe,Me),Te.id=Oe}const Ie=(Ee=(Se=this.io.engine)===null||Se===void 0?void 0:Se.transport)===null||Ee===void 0?void 0:Ee.writable,De=this.connected&&!(!((xe=this.io.engine)===null||xe===void 0)&&xe._hasPingExpired());return this.flags.volatile&&!Ie||(De?(this.notifyOutgoingListeners(Te),this.packet(Te)):this.sendBuffer.push(Te)),this.flags={},this}_registerAckCallback(_e,Ae){var Se;const Ee=(Se=this.flags.timeout)!==null&&Se!==void 0?Se:this._opts.ackTimeout;if(Ee===void 0){this.acks[_e]=Ae;return}const xe=this.io.setTimeoutFn(()=>{delete this.acks[_e];for(let Ie=0;Ie<this.sendBuffer.length;Ie++)this.sendBuffer[Ie].id===_e&&this.sendBuffer.splice(Ie,1);Ae.call(this,new Error("operation has timed out"))},Ee),Te=(...Ie)=>{this.io.clearTimeoutFn(xe),Ae.apply(this,Ie)};Te.withError=!0,this.acks[_e]=Te}emitWithAck(_e,...Ae){return new Promise((Se,Ee)=>{const xe=(Te,Ie)=>Te?Ee(Te):Se(Ie);xe.withError=!0,Ae.push(xe),this.emit(_e,...Ae)})}_addToQueue(_e){let Ae;typeof _e[_e.length-1]=="function"&&(Ae=_e.pop());const Se={id:this._queueSeq++,tryCount:0,pending:!1,args:_e,flags:Object.assign({fromQueue:!0},this.flags)};_e.push((Ee,...xe)=>Se!==this._queue[0]?void 0:(Ee!==null?Se.tryCount>this._opts.retries&&(this._queue.shift(),Ae&&Ae(Ee)):(this._queue.shift(),Ae&&Ae(null,...xe)),Se.pending=!1,this._drainQueue())),this._queue.push(Se),this._drainQueue()}_drainQueue(_e=!1){if(!this.connected||this._queue.length===0)return;const Ae=this._queue[0];Ae.pending&&!_e||(Ae.pending=!0,Ae.tryCount++,this.flags=Ae.flags,this.emit.apply(this,Ae.args))}packet(_e){_e.nsp=this.nsp,this.io._packet(_e)}onopen(){typeof this.auth=="function"?this.auth(_e=>{this._sendConnectPacket(_e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(_e){this.packet({type:PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},_e):_e})}onerror(_e){this.connected||this.emitReserved("connect_error",_e)}onclose(_e,Ae){this.connected=!1,delete this.id,this.emitReserved("disconnect",_e,Ae),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(_e=>{if(!this.sendBuffer.some(Se=>String(Se.id)===_e)){const Se=this.acks[_e];delete this.acks[_e],Se.withError&&Se.call(this,new Error("socket has been disconnected"))}})}onpacket(_e){if(_e.nsp===this.nsp)switch(_e.type){case PacketType.CONNECT:_e.data&&_e.data.sid?this.onconnect(_e.data.sid,_e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case PacketType.EVENT:case PacketType.BINARY_EVENT:this.onevent(_e);break;case PacketType.ACK:case PacketType.BINARY_ACK:this.onack(_e);break;case PacketType.DISCONNECT:this.ondisconnect();break;case PacketType.CONNECT_ERROR:this.destroy();const Se=new Error(_e.data.message);Se.data=_e.data.data,this.emitReserved("connect_error",Se);break}}onevent(_e){const Ae=_e.data||[];_e.id!=null&&Ae.push(this.ack(_e.id)),this.connected?this.emitEvent(Ae):this.receiveBuffer.push(Object.freeze(Ae))}emitEvent(_e){if(this._anyListeners&&this._anyListeners.length){const Ae=this._anyListeners.slice();for(const Se of Ae)Se.apply(this,_e)}super.emit.apply(this,_e),this._pid&&_e.length&&typeof _e[_e.length-1]=="string"&&(this._lastOffset=_e[_e.length-1])}ack(_e){const Ae=this;let Se=!1;return function(...Ee){Se||(Se=!0,Ae.packet({type:PacketType.ACK,id:_e,data:Ee}))}}onack(_e){const Ae=this.acks[_e.id];typeof Ae=="function"&&(delete this.acks[_e.id],Ae.withError&&_e.data.unshift(null),Ae.apply(this,_e.data))}onconnect(_e,Ae){this.id=_e,this.recovered=Ae&&this._pid===Ae,this._pid=Ae,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(_e=>this.emitEvent(_e)),this.receiveBuffer=[],this.sendBuffer.forEach(_e=>{this.notifyOutgoingListeners(_e),this.packet(_e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(_e=>_e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:PacketType.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(_e){return this.flags.compress=_e,this}get volatile(){return this.flags.volatile=!0,this}timeout(_e){return this.flags.timeout=_e,this}onAny(_e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(_e),this}prependAny(_e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(_e),this}offAny(_e){if(!this._anyListeners)return this;if(_e){const Ae=this._anyListeners;for(let Se=0;Se<Ae.length;Se++)if(_e===Ae[Se])return Ae.splice(Se,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(_e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(_e),this}prependAnyOutgoing(_e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(_e),this}offAnyOutgoing(_e){if(!this._anyOutgoingListeners)return this;if(_e){const Ae=this._anyOutgoingListeners;for(let Se=0;Se<Ae.length;Se++)if(_e===Ae[Se])return Ae.splice(Se,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(_e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const Ae=this._anyOutgoingListeners.slice();for(const Se of Ae)Se.apply(this,_e.data)}}}function Backoff(Ce){Ce=Ce||{},this.ms=Ce.min||100,this.max=Ce.max||1e4,this.factor=Ce.factor||2,this.jitter=Ce.jitter>0&&Ce.jitter<=1?Ce.jitter:0,this.attempts=0}Backoff.prototype.duration=function(){var Ce=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var _e=Math.random(),Ae=Math.floor(_e*this.jitter*Ce);Ce=Math.floor(_e*10)&1?Ce+Ae:Ce-Ae}return Math.min(Ce,this.max)|0},Backoff.prototype.reset=function(){this.attempts=0},Backoff.prototype.setMin=function(Ce){this.ms=Ce},Backoff.prototype.setMax=function(Ce){this.max=Ce},Backoff.prototype.setJitter=function(Ce){this.jitter=Ce};class Manager extends Emitter$3{constructor(_e,Ae){var Se;super(),this.nsps={},this.subs=[],_e&&typeof _e=="object"&&(Ae=_e,_e=void 0),Ae=Ae||{},Ae.path=Ae.path||"/socket.io",this.opts=Ae,installTimerFunctions(this,Ae),this.reconnection(Ae.reconnection!==!1),this.reconnectionAttempts(Ae.reconnectionAttempts||1/0),this.reconnectionDelay(Ae.reconnectionDelay||1e3),this.reconnectionDelayMax(Ae.reconnectionDelayMax||5e3),this.randomizationFactor((Se=Ae.randomizationFactor)!==null&&Se!==void 0?Se:.5),this.backoff=new Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(Ae.timeout==null?2e4:Ae.timeout),this._readyState="closed",this.uri=_e;const Ee=Ae.parser||parser$1;this.encoder=new Ee.Encoder,this.decoder=new Ee.Decoder,this._autoConnect=Ae.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(_e){return arguments.length?(this._reconnection=!!_e,_e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(_e){return _e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=_e,this)}reconnectionDelay(_e){var Ae;return _e===void 0?this._reconnectionDelay:(this._reconnectionDelay=_e,(Ae=this.backoff)===null||Ae===void 0||Ae.setMin(_e),this)}randomizationFactor(_e){var Ae;return _e===void 0?this._randomizationFactor:(this._randomizationFactor=_e,(Ae=this.backoff)===null||Ae===void 0||Ae.setJitter(_e),this)}reconnectionDelayMax(_e){var Ae;return _e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=_e,(Ae=this.backoff)===null||Ae===void 0||Ae.setMax(_e),this)}timeout(_e){return arguments.length?(this._timeout=_e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(_e){if(~this._readyState.indexOf("open"))return this;this.engine=new Socket$1(this.uri,this.opts);const Ae=this.engine,Se=this;this._readyState="opening",this.skipReconnect=!1;const Ee=on(Ae,"open",function(){Se.onopen(),_e&&_e()}),xe=Ie=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",Ie),_e?_e(Ie):this.maybeReconnectOnOpen()},Te=on(Ae,"error",xe);if(this._timeout!==!1){const Ie=this._timeout,De=this.setTimeoutFn(()=>{Ee(),xe(new Error("timeout")),Ae.close()},Ie);this.opts.autoUnref&&De.unref(),this.subs.push(()=>{this.clearTimeoutFn(De)})}return this.subs.push(Ee),this.subs.push(Te),this}connect(_e){return this.open(_e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const _e=this.engine;this.subs.push(on(_e,"ping",this.onping.bind(this)),on(_e,"data",this.ondata.bind(this)),on(_e,"error",this.onerror.bind(this)),on(_e,"close",this.onclose.bind(this)),on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(_e){try{this.decoder.add(_e)}catch(Ae){this.onclose("parse error",Ae)}}ondecoded(_e){nextTick(()=>{this.emitReserved("packet",_e)},this.setTimeoutFn)}onerror(_e){this.emitReserved("error",_e)}socket(_e,Ae){let Se=this.nsps[_e];return Se?this._autoConnect&&!Se.active&&Se.connect():(Se=new Socket(this,_e,Ae),this.nsps[_e]=Se),Se}_destroy(_e){const Ae=Object.keys(this.nsps);for(const Se of Ae)if(this.nsps[Se].active)return;this._close()}_packet(_e){const Ae=this.encoder.encode(_e);for(let Se=0;Se<Ae.length;Se++)this.engine.write(Ae[Se],_e.options)}cleanup(){this.subs.forEach(_e=>_e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(_e,Ae){var Se;this.cleanup(),(Se=this.engine)===null||Se===void 0||Se.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",_e,Ae),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const _e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const Ae=this.backoff.duration();this._reconnecting=!0;const Se=this.setTimeoutFn(()=>{_e.skipReconnect||(this.emitReserved("reconnect_attempt",_e.backoff.attempts),!_e.skipReconnect&&_e.open(Ee=>{Ee?(_e._reconnecting=!1,_e.reconnect(),this.emitReserved("reconnect_error",Ee)):_e.onreconnect()}))},Ae);this.opts.autoUnref&&Se.unref(),this.subs.push(()=>{this.clearTimeoutFn(Se)})}}onreconnect(){const _e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",_e)}}const cache$1={};function lookup$5(Ce,_e){typeof Ce=="object"&&(_e=Ce,Ce=void 0),_e=_e||{};const Ae=url(Ce,_e.path||"/socket.io"),Se=Ae.source,Ee=Ae.id,xe=Ae.path,Te=cache$1[Ee]&&xe in cache$1[Ee].nsps,Ie=_e.forceNew||_e["force new connection"]||_e.multiplex===!1||Te;let De;return Ie?De=new Manager(Se,_e):(cache$1[Ee]||(cache$1[Ee]=new Manager(Se,_e)),De=cache$1[Ee]),Ae.query&&!_e.query&&(_e.query=Ae.queryKey),De.socket(Ae.path,_e)}Object.assign(lookup$5,{Manager,Socket,io:lookup$5,connect:lookup$5});const wu=class wu{constructor(_e){In(this,"socket",null);In(this,"subscribers",null);In(this,"url","");wu.instances||(wu.instances={});const Ae=`${_e.serverUrl}${_e.namespace||"/"}`;return wu.instances[Ae]?wu.instances[Ae]:(this.socket=lookup$5(Ae),this.subscribers=new Map,this.url=Ae,this.socket.on("connect",()=>{var Se;console.log(`Socket connected to ${Ae} `),(Se=this.socket)==null||Se.onAny((Ee,...xe)=>{console.log(`Received event: ${Ee}`,xe)})}),this.socket.on("connect_error",Se=>{console.error("Connection error:",Se)}),this.socket.on("connect_timeout",Se=>{console.error("Connection timed out:",Se)}),this.socket.on("disconnect",Se=>{console.log(`Socket disconnected from ${Ae} due to ${Se} `)}),this.socket.on("ping",()=>{var Se;(Se=this.socket)==null||Se.emit("pong")}),wu.instances[this.url]=this,this)}subscribe(_e){var xe,Te,Ie,De,ke;const{event:Ae,callback:Se,component:Ee}=_e;(xe=this.subscribers)!=null&&xe.get(Ae)||((Te=this.subscribers)==null||Te.set(Ae,new Map),(Ie=this.socket)==null||Ie.on(Ae,Oe=>{var Me,Pe;(Pe=(Me=this.subscribers)==null?void 0:Me.get(Ae))==null||Pe.forEach(Be=>Be(Oe))})),(ke=(De=this.subscribers)==null?void 0:De.get(Ae))==null||ke.set(Ee,Se)}unsubscribe({event:_e,component:Ae}){var Se,Ee,xe;(Se=this.subscribers)!=null&&Se.has(_e)&&((Ee=this.subscribers.get(_e))==null||Ee.delete(Ae),((xe=this.subscribers.get(_e))==null?void 0:xe.size)===0&&this.subscribers.delete(_e))}emit(_e,...Ae){var Se;(Se=this.socket)==null||Se.emit(_e,...Ae)}disconnect(){var _e;(_e=this.socket)==null||_e.disconnect()}};In(wu,"instances");let WebSocketManager=wu;function extractAssetDetails(Ce){const _e=/([^\/]+)_\$\$_V1_([^\/]+)(\.[a-zA-Z0-9]+)$/,Ae=Ce.match(_e);if(Ae){let Se=Ae[2].replace(/%/g,"_");const Ee=Ae[3].substring(1),xe=Se+Ae[3];return{assetName:Se,assetNameWithExt:xe,fileExtension:Ee}}else{const Se=Ce.substring(Ce.lastIndexOf("/")+1),Ee=Se.lastIndexOf(".");let xe=Se,Te="",Ie=Se;return Ee!==-1?(xe=Se.substring(0,Ee).replace(/%/g,"_"),Te=Se.substring(Ee+1),Ie=xe+"."+Te):xe=xe.replace(/%/g,"_"),{assetName:xe,assetNameWithExt:Ie,fileExtension:Te}}}const accessToken="eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3Ny1NUVdFRTNHZE5adGlsWU5IYmpsa2dVSkpaWUJWVmN1UmFZdHl5ejFjIn0.eyJleHAiOjE3MjYxODIzMzEsImlhdCI6MTcyNjE0NjMzMSwianRpIjoiOGVlZTU1MDctNGVlOC00NjE1LTg3OWUtNTVkMjViMjQ2MGFmIiwiaXNzIjoiaHR0cDovL2tleWNsb2FrLmtleWNsb2FrLnN2Yy5jbHVzdGVyLmxvY2FsOjgwODAvcmVhbG1zL21hc3RlciIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJIT0xBQ1JBQ1kiLCJzZXNzaW9uX3N0YXRlIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwibmFtZSI6ImtzYW14cCBrc2FteHAiLCJnaXZlbl9uYW1lIjoia3NhbXhwIiwiZmFtaWx5X25hbWUiOiJrc2FteHAiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWwiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiLyoiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZmF1bHQtcm9sZXMtbWFzdGVyIiwib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7IkhPTEFDUkFDWSI6eyJyb2xlcyI6WyJIT0xBQ1JBQ1lfVVNFUiJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJwcm9maWxlIGVtYWlsIiwic2lkIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwidGVuYW50SWQiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJyZXF1ZXN0ZXJUeXBlIjoiVEVOQU5UIn0=.FXeDyHBhlG9L4_NCeSyHEaNEBVmhFpfSBqlcbhHaPaoydhKcA0BfuyHgxg_32kQk6z5S9IQ7nVKS2ybtOvwo0WyLWwLQchSq7Noa7LooHIMzmeWMQb_bLKtbaOti59zwIdS8CkfGaXut7RUQKISQVWmbUGsVJQa2JkG6Ng_QN0y5hFVksMWPZiXVsofQkJXHXV1CQ3gabhhHKo3BqlJwzpsCKLDfg1-4PmSl1Wqbw03Ef2yolroj5i8FoeHukOQPkwCUHrrNw-ilIp917nqZa89YbCMtDjWyaj8pEH7GJR5vMZPE2WcJPn5dSA1IHVunfatEB1cDAitaFjVNWNnddQ";async function fetchAPITopic(Ce){const _e={dbType:"TIDB",filter:{id:localStorage.getItem("selectedTopicId")}},Ae="https://igs.gov-cloud.ai/pi-entity-instances-service/v2.0/schemas/6941203a98f23e7f0271b402/instances/list?page=0&size=100",Se="post",Ee=accessToken;try{return await(await fetch(Ae,{method:Se,body:JSON.stringify(_e),headers:{Accept:"*/*",Authorization:`Bearer ${Ee}`,"Content-Type":"application/json"}})).json()}catch(xe){return console.error("Error fetching API:",xe),null}}async function fetchContent(Ce){const _e={dbType:"TIDB",filter:{nameWithType:`${Ce}`}},Ae="https://igs.gov-cloud.ai/pi-entity-instances-service/v2.0/schemas/678f3c927f984e2fc9b2d56e/instances/list?page=0&size=100",Se="post",Ee=accessToken;try{const Te=await(await fetch(Ae,{method:Se,body:JSON.stringify(_e),headers:{Accept:"*/*",Authorization:`Bearer ${Ee}`,"Content-Type":"application/json"}})).json();return console.log(Te,"image api"),Te}catch(xe){return console.error("Error fetching API:",xe),null}}async function addContentToCmsDita(Ce,_e,Ae,Se,Ee,xe){var Oe,Me;console.log("fetchAPI");const Te={data:[{type:`${xe}`,userId:"user1231",url:`${_e}`,tags:["HR","Policies"],createdAt:`${Se}`,name:`${(Oe=extractAssetDetails(_e))==null?void 0:Oe.assetName}`,nameWithType:`${(Me=extractAssetDetails(_e))==null?void 0:Me.assetNameWithExt}`,id:`${Ce}`,updatedAt:`${Ee}`}]},Ie="https://igs.gov-cloud.ai/pi-entity-instances-service/v2.0/schemas/678f3c927f984e2fc9b2d56e/instances",De="post",ke=accessToken;try{return await(await fetch(Ie,{method:De,body:JSON.stringify(Te),headers:{Accept:"*/*",Authorization:`Bearer ${ke}`,"Content-Type":"application/json"}})).json()}catch(Pe){return console.error("Error fetching API:",Pe),null}}async function UpdateCmsIdInTopic(Ce,_e){const Ae=await _e||[];Ae==null||Ae.push(Ce);const Se={primarykeyEnable:!0,data:{id:localStorage.getItem("selectedTopicId"),contentIds:Ae}},Ee="https://igs.gov-cloud.ai/pi-entity-instances-service/v2.0/schemas/6941203a98f23e7f0271b402/instances",xe="put",Te="eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3Ny1NUVdFRTNHZE5adGlsWU5IYmpsa2dVSkpaWUJWVmN1UmFZdHl5ejFjIn0.eyJleHAiOjE3MjYxODIzMzEsImlhdCI6MTcyNjE0NjMzMSwianRpIjoiOGVlZTU1MDctNGVlOC00NjE1LTg3OWUtNTVkMjViMjQ2MGFmIiwiaXNzIjoiaHR0cDovL2tleWNsb2FrLmtleWNsb2FrLnN2Yy5jbHVzdGVyLmxvY2FsOjgwODAvcmVhbG1zL21hc3RlciIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJIT0xBQ1JBQ1kiLCJzZXNzaW9uX3N0YXRlIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwibmFtZSI6ImtzYW14cCBrc2FteHAiLCJnaXZlbl9uYW1lIjoia3NhbXhwIiwiZmFtaWx5X25hbWUiOiJrc2FteHAiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWwiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiLyoiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZmF1bHQtcm9sZXMtbWFzdGVyIiwib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7IkhPTEFDUkFDWSI6eyJyb2xlcyI6WyJIT0xBQ1JBQ1lfVVNFUiJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJwcm9maWxlIGVtYWlsIiwic2lkIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwidGVuYW50SWQiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJyZXF1ZXN0ZXJUeXBlIjoiVEVOQU5UIn0=.FXeDyHBhlG9L4_NCeSyHEaNEBVmhFpfSBqlcbhHaPaoydhKcA0BfuyHgxg_32kQk6z5S9IQ7nVKS2ybtOvwo0WyLWwLQchSq7Noa7LooHIMzmeWMQb_bLKtbaOti59zwIdS8CkfGaXut7RUQKISQVWmbUGsVJQa2JkG6Ng_QN0y5hFVksMWPZiXVsofQkJXHXV1CQ3gabhhHKo3BqlJwzpsCKLDfg1-4PmSl1Wqbw03Ef2yolroj5i8FoeHukOQPkwCUHrrNw-ilIp917nqZa89YbCMtDjWyaj8pEH7GJR5vMZPE2WcJPn5dSA1IHVunfatEB1cDAitaFjVNWNnddQ";try{return await(await fetch(Ee,{method:xe,body:JSON.stringify(Se),headers:{Accept:"*/*",Authorization:`Bearer ${Te}`,"Content-Type":"application/json"}})).json()}catch(Ie){return console.error("Error fetching API:",Ie),null}}async function uploadAssetToCmsMobius$1(Ce){const _e=new FormData;_e.append("file",Ce,Ce.name||"uploaded_image");const Ae={method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3Ny1NUVdFRTNHZE5adGlsWU5IYmpsa2dVSkpaWUJWVmN1UmFZdHl5ejFjIn0.eyJleHAiOjE3MTgyOTQzMzMsImlhdCI6MTcxODI1ODMzMywianRpIjoiOGE0YTZiNGQtZjEwYi00ODc2LWE3YWItMjUzYjkyNjlmNjE2IiwiaXNzIjoiaHR0cDovL2tleWNsb2FrLmtleWNsb2FrLnN2Yy5jbHVzdGVyLmxvY2FsOjgwODAvcmVhbG1zL21hc3RlciIsImF1ZCI6WyJCT0xUWk1BTk5fQk9UIiwiUEFTQ0FMX0lOVEVMTElHRU5DRSIsIk1PTkVUIiwiYWNjb3VudCJdLCJzdWIiOiIyZjdiOTgzYy1hNDkyLTQyY2EtOTczMi1mMGM3ZGZlYTQ5ODUiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJIT0xBQ1JBQ1kiLCJzZXNzaW9uX3N0YXRlIjoiY2JiZGZkYTctMjc1OS00MjY4LThjMjgtZTBjODliMjFlMzU2IiwibmFtZSI6IkF2aW5hc2ggQXZpbmFzaCIsImdpdmVuX25hbWUiOiJBdmluYXNoIiwiZmFtaWx5X25hbWUiOiJBdmluYXNoIiwicHJlZmVycmVkX3VzZXJuYW1lIjoicGFzc3dvcmRfdGVuYW50X3BhdGVsLmFAbW9iaXVzZHRhYXMuYWkiLCJlbWFpbCI6InBhc3N3b3JkX3RlbmFudF9wYXRlbC5hQG1vYml1c2R0YWFzLmFpIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiLyoiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZmF1bHQtcm9sZXMtbWFzdGVyIiwib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7IkJPTFRaTUFOTl9CT1QiOnsicm9sZXMiOlsiQk9MVFpNQU5OX0JPVF9VU0VSIl19LCJQQVNDQUxfSU5URUxMSUdFTkNFIjp7InJvbGVzIjpbIlBBU0NBTF9JTlRFTExJR0VOQ0VfVVNFUiJdfSwiTU9ORVQiOnsicm9sZXMiOlsiTU9ORVRfVVNFUiJdfSwiSE9MQUNSQUNZIjp7InJvbGVzIjpbIkhPTEFDUkFDWV9VU0VSIl19LCJhY2NvdW50Ijp7InJvbGVzIjpbIm1hbmFnZS1hY2NvdW50IiwibWFuYWdlLWFjY291bnQtbGlua3MiLCJ2aWV3LXByb2ZpbGUiXX19LCJzY29wZSI6InByb2ZpbGUgZW1haWwiLCJzaWQiOiJjYmJkZmRhNy0yNzU5LTQyNjgtOGMyOC1lMGM4OWIyMWUzNTYiLCJ0ZW5hbnRJZCI6IjJmN2I5ODNjLWE0OTItNDJjYS05NzMyLWYwYzdkZmVhNDk4NSJ9.JKJvp6xtOzqbrEyds72M4dWzX2aJAhDnw4zSUejj8BTNGsuZZex_j7WTxs5UnoYMw_sfceEr70kjcqfJUaInBxRRJ6SYcE-leWRmuS6exbCS_pXABz1t8-e2SAelIUaDwNmlnN_APu_1WNjndCkTIQ2aUP3SgBgMQfw7M9gsn3PgtrdvzyYIzAY4c0kSvXRkeheml8PUq8w9RPRfZ9gsUAVdq8JuFzCFUvHZ_kIyjKebnhEL0e6kIGSxVikrJH974sZloIj1PnQvCsIFwnA6maPdol1ckwy6fVUTBjymdiG3y16GWAZ0To05VVFv6hC29XuMEO2FziPeoDf01OM6dA"},body:_e,redirect:"follow"};try{const Ee=await(await fetch("https://igs.gov-cloud.ai/mobius-content-service/v1.0/content/upload?filePath=CMS&contentTags=icons",Ae)).json();if(Ee.cdnUrl)return`https://cdn.gov-cloud.ai${Ee.cdnUrl}`;throw new Error("Image URL not found in response")}catch(Se){throw console.error("Image upload failed:",Se),Se}}async function assetContent(Ce,_e,Ae){var ke,Oe,Me,Pe,Be,Fe;const Se=[".jpg",".jpeg",".png",".gif",".bmp",".webp",".tiff",".tif",".svg",".heic",".ico",".raw",".jfif",".apng",".avif"],Ee=[".mp4",".mkv",".webm",".mov",".avi",".flv",".wmv",".mpeg",".mpg",".m4v",".3gp",".3g2",".ogv",".mts",".m2ts"],xe=((ke=Ce==null?void 0:Ce.split("/"))==null?void 0:ke.pop())||"",Te=xe.toLowerCase(),Ie=Se.some($e=>Te.endsWith($e))||Ee.some($e=>Te.endsWith($e))?xe:"",De=await fetchContent(Ie);if(console.log(De,"this is image url"),De)return _e==="image"?(console.log(`<img style="${Ae}" src="${(Oe=De==null?void 0:De[0])==null?void 0:Oe.url}" alt="${(Me=De==null?void 0:De[0])==null?void 0:Me.name}" />`),`<img style="${Ae}" src="${(Pe=De==null?void 0:De[0])==null?void 0:Pe.url}" alt="${(Be=De==null?void 0:De[0])==null?void 0:Be.name}" class="ProseMirror-selectednode" />`):`<video style="${Ae}" src="${(Fe=De==null?void 0:De[0])==null?void 0:Fe.url}" controls="true" contenteditable="false"></video>`;console.warn("API failed to fetch data for:",_e,Ce)}function convertDitaToHtml(Ce){if(!Ce||typeof Ce!="string")return"";const Ae=new DOMParser().parseFromString(Ce,"text/xml");let Se='<div class="tableWrapper"><table style="width: 100%; >';const Ee=Ae.querySelectorAll("colspec");Ee.length&&(Se+="<colgroup>",Ee.forEach(()=>{Se+="<col />"}),Se+="</colgroup>"),Se+="<tbody>";const xe=Ae.querySelector("thead row");return xe&&(Se+="<tr>",xe.querySelectorAll("entry").forEach(Ie=>{var De;Se+=`<th colspan="1" rowspan="1"><p>${(De=Ie==null?void 0:Ie.textContent)==null?void 0:De.trim()}</p></th>`}),Se+="</tr>"),Ae.querySelectorAll("tbody row").forEach(Ie=>{Se+="<tr>",Ie.querySelectorAll("entry").forEach(De=>{var ke;Se+=`<td colspan="1" rowspan="1"><p>${(ke=De==null?void 0:De.textContent)==null?void 0:ke.trim()}</p></td>`}),Se+="</tr>"}),Se+="</tbody></table></div>",Se}async function xmlToDita(Ce){if(typeof Ce!="string")return"";let _e=Ce;_e=_e.replace(/<table[^>]*>[\s\S]*?<\/table>/g,Ee=>convertDitaToHtml(Ee)),_e=_e.replace(/<b>([\s\S]*?)<\/b>/g,"<strong>$1</strong>"),_e=_e.replace(/<i>([\s\S]*?)<\/i>/g,"<em>$1</em>"),_e=_e.replace(/<codeblock\s+outputclass="([^"]+)"[^>]*>([\s\S]*?)<\/codeblock>/g,(Ee,xe,Te)=>`<pre><code class="${xe}">${Te}</code></pre>`);const Ae=[..._e.matchAll(/<image([^>]*)\/>/g)];for(const Ee of Ae){const[xe,Te]=Ee,Ie=Te.match(/href="([^"]+)"/),De=Te.match(/style="([^"]+)"/),ke=Ie?Ie[1]:null,Oe=De?De[1]:null,Me=ke&&await assetContent(ke,"image",Oe)||xe;_e=_e.split(xe).join(Me)}const Se=[..._e.matchAll(/<object[^>]*type="video\/[^"]+"[^>]*data="([^"]+)"[^>]*>.*?<param\s+name="controls"\s+value="true"\s*\/>.*?<\/object>/gs)];for(const Ee of Se){const[xe,Te,Ie]=Ee,De=await assetContent(Te,"video",Ie)||xe;_e=_e.split(xe).join(De)}return _e}var conventions$5={};function find$5(Ce,_e,Ae){if(Ae===void 0&&(Ae=Array.prototype),Ce&&typeof Ae.find=="function")return Ae.find.call(Ce,_e);for(var Se=0;Se<Ce.length;Se++)if(hasOwn$e(Ce,Se)){var Ee=Ce[Se];if(_e.call(void 0,Ee,Se,Ce))return Ee}}function freeze$3(Ce,_e){return _e===void 0&&(_e=Object),_e&&typeof _e.getOwnPropertyDescriptors=="function"&&(Ce=_e.create(null,_e.getOwnPropertyDescriptors(Ce))),_e&&typeof _e.freeze=="function"?_e.freeze(Ce):Ce}function hasOwn$e(Ce,_e){return Object.prototype.hasOwnProperty.call(Ce,_e)}function assign$5(Ce,_e){if(Ce===null||typeof Ce!="object")throw new TypeError("target is not an object");for(var Ae in _e)hasOwn$e(_e,Ae)&&(Ce[Ae]=_e[Ae]);return Ce}var HTML_BOOLEAN_ATTRIBUTES=freeze$3({allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,formnovalidate:!0,hidden:!0,ismap:!0,itemscope:!0,loop:!0,multiple:!0,muted:!0,nomodule:!0,novalidate:!0,open:!0,playsinline:!0,readonly:!0,required:!0,reversed:!0,selected:!0});function isHTMLBooleanAttribute(Ce){return hasOwn$e(HTML_BOOLEAN_ATTRIBUTES,Ce.toLowerCase())}var HTML_VOID_ELEMENTS=freeze$3({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function isHTMLVoidElement$1(Ce){return hasOwn$e(HTML_VOID_ELEMENTS,Ce.toLowerCase())}var HTML_RAW_TEXT_ELEMENTS=freeze$3({script:!1,style:!1,textarea:!0,title:!0});function isHTMLRawTextElement$2(Ce){var _e=Ce.toLowerCase();return hasOwn$e(HTML_RAW_TEXT_ELEMENTS,_e)&&!HTML_RAW_TEXT_ELEMENTS[_e]}function isHTMLEscapableRawTextElement$1(Ce){var _e=Ce.toLowerCase();return hasOwn$e(HTML_RAW_TEXT_ELEMENTS,_e)&&HTML_RAW_TEXT_ELEMENTS[_e]}function isHTMLMimeType$3(Ce){return Ce===MIME_TYPE$2.HTML}function hasDefaultHTMLNamespace$2(Ce){return isHTMLMimeType$3(Ce)||Ce===MIME_TYPE$2.XML_XHTML_APPLICATION}var MIME_TYPE$2=freeze$3({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),_MIME_TYPES=Object.keys(MIME_TYPE$2).map(function(Ce){return MIME_TYPE$2[Ce]});function isValidMimeType$1(Ce){return _MIME_TYPES.indexOf(Ce)>-1}var NAMESPACE$3=freeze$3({HTML:"http://www.w3.org/1999/xhtml",SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});conventions$5.assign=assign$5,conventions$5.find=find$5,conventions$5.freeze=freeze$3,conventions$5.HTML_BOOLEAN_ATTRIBUTES=HTML_BOOLEAN_ATTRIBUTES,conventions$5.HTML_RAW_TEXT_ELEMENTS=HTML_RAW_TEXT_ELEMENTS,conventions$5.HTML_VOID_ELEMENTS=HTML_VOID_ELEMENTS,conventions$5.hasDefaultHTMLNamespace=hasDefaultHTMLNamespace$2,conventions$5.hasOwn=hasOwn$e,conventions$5.isHTMLBooleanAttribute=isHTMLBooleanAttribute,conventions$5.isHTMLRawTextElement=isHTMLRawTextElement$2,conventions$5.isHTMLEscapableRawTextElement=isHTMLEscapableRawTextElement$1,conventions$5.isHTMLMimeType=isHTMLMimeType$3,conventions$5.isHTMLVoidElement=isHTMLVoidElement$1,conventions$5.isValidMimeType=isValidMimeType$1,conventions$5.MIME_TYPE=MIME_TYPE$2,conventions$5.NAMESPACE=NAMESPACE$3;var errors$3={},conventions$4=conventions$5;function extendError(Ce,_e){Ce.prototype=Object.create(Error.prototype,{constructor:{value:Ce},name:{value:Ce.name,enumerable:!0,writable:_e}})}var DOMExceptionName$1=conventions$4.freeze({Error:"Error",IndexSizeError:"IndexSizeError",DomstringSizeError:"DomstringSizeError",HierarchyRequestError:"HierarchyRequestError",WrongDocumentError:"WrongDocumentError",InvalidCharacterError:"InvalidCharacterError",NoDataAllowedError:"NoDataAllowedError",NoModificationAllowedError:"NoModificationAllowedError",NotFoundError:"NotFoundError",NotSupportedError:"NotSupportedError",InUseAttributeError:"InUseAttributeError",InvalidStateError:"InvalidStateError",SyntaxError:"SyntaxError",InvalidModificationError:"InvalidModificationError",NamespaceError:"NamespaceError",InvalidAccessError:"InvalidAccessError",ValidationError:"ValidationError",TypeMismatchError:"TypeMismatchError",SecurityError:"SecurityError",NetworkError:"NetworkError",AbortError:"AbortError",URLMismatchError:"URLMismatchError",QuotaExceededError:"QuotaExceededError",TimeoutError:"TimeoutError",InvalidNodeTypeError:"InvalidNodeTypeError",DataCloneError:"DataCloneError",EncodingError:"EncodingError",NotReadableError:"NotReadableError",UnknownError:"UnknownError",ConstraintError:"ConstraintError",DataError:"DataError",TransactionInactiveError:"TransactionInactiveError",ReadOnlyError:"ReadOnlyError",VersionError:"VersionError",OperationError:"OperationError",NotAllowedError:"NotAllowedError",OptOutError:"OptOutError"}),DOMExceptionNames=Object.keys(DOMExceptionName$1);function isValidDomExceptionCode(Ce){return typeof Ce=="number"&&Ce>=1&&Ce<=25}function endsWithError(Ce){return typeof Ce=="string"&&Ce.substring(Ce.length-DOMExceptionName$1.Error.length)===DOMExceptionName$1.Error}function DOMException$2(Ce,_e){isValidDomExceptionCode(Ce)?(this.name=DOMExceptionNames[Ce],this.message=_e||""):(this.message=Ce,this.name=endsWithError(_e)?_e:DOMExceptionName$1.Error),Error.captureStackTrace&&Error.captureStackTrace(this,DOMException$2)}extendError(DOMException$2,!0),Object.defineProperties(DOMException$2.prototype,{code:{enumerable:!0,get:function(){var Ce=DOMExceptionNames.indexOf(this.name);return isValidDomExceptionCode(Ce)?Ce:0}}});for(var ExceptionCode={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},entries$2=Object.entries(ExceptionCode),i$a=0;i$a<entries$2.length;i$a++){var key=entries$2[i$a][0];DOMException$2[key]=entries$2[i$a][1]}function ParseError$2(Ce,_e){this.message=Ce,this.locator=_e,Error.captureStackTrace&&Error.captureStackTrace(this,ParseError$2)}extendError(ParseError$2),errors$3.DOMException=DOMException$2,errors$3.DOMExceptionName=DOMExceptionName$1,errors$3.ExceptionCode=ExceptionCode,errors$3.ParseError=ParseError$2;var dom$1={},grammar={};function detectUnicodeSupport(Ce){try{typeof Ce!="function"&&(Ce=RegExp);var _e=new Ce("𝌆","u").exec("𝌆");return!!_e&&_e[0].length===2}catch{}return!1}var UNICODE_SUPPORT=detectUnicodeSupport();function chars$4(Ce){if(Ce.source[0]!=="[")throw new Error(Ce+" can not be used with chars");return Ce.source.slice(1,Ce.source.lastIndexOf("]"))}function chars_without(Ce,_e){if(Ce.source[0]!=="[")throw new Error("/"+Ce.source+"/ can not be used with chars_without");if(!_e||typeof _e!="string")throw new Error(JSON.stringify(_e)+" is not a valid search");if(Ce.source.indexOf(_e)===-1)throw new Error('"'+_e+'" is not is /'+Ce.source+"/");if(_e==="-"&&Ce.source.indexOf(_e)!==1)throw new Error('"'+_e+'" is not at the first postion of /'+Ce.source+"/");return new RegExp(Ce.source.replace(_e,""),UNICODE_SUPPORT?"u":"")}function reg$2(Ce){var _e=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(Ae){var Se=typeof Ae=="string";if(Se&&_e===void 0&&Ae==="|")throw new Error("use regg instead of reg to wrap expressions with `|`!");return Se?Ae:Ae.source}).join(""),UNICODE_SUPPORT?"mu":"m")}function regg(Ce){if(arguments.length===0)throw new Error("no parameters provided");return reg$2.apply(regg,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var UNICODE_REPLACEMENT_CHARACTER="�",Char=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;UNICODE_SUPPORT&&(Char=reg$2("[",chars$4(Char),"\\u{10000}-\\u{10FFFF}","]"));var _SChar=/[\x20\x09\x0D\x0A]/,SChar_s=chars$4(_SChar),S$1=reg$2(_SChar,"+"),S_OPT=reg$2(_SChar,"*"),NameStartChar=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;UNICODE_SUPPORT&&(NameStartChar=reg$2("[",chars$4(NameStartChar),"\\u{10000}-\\u{10FFFF}","]"));var NameStartChar_s=chars$4(NameStartChar),NameChar=reg$2("[",NameStartChar_s,chars$4(/[-.0-9\xB7]/),chars$4(/[\u0300-\u036F\u203F-\u2040]/),"]"),Name=reg$2(NameStartChar,NameChar,"*"),Nmtoken=reg$2(NameChar,"+"),EntityRef=reg$2("&",Name,";"),CharRef=regg(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),Reference=regg(EntityRef,"|",CharRef),PEReference=reg$2("%",Name,";"),EntityValue=regg(reg$2('"',regg(/[^%&"]/,"|",PEReference,"|",Reference),"*",'"'),"|",reg$2("'",regg(/[^%&']/,"|",PEReference,"|",Reference),"*","'")),AttValue=regg('"',regg(/[^<&"]/,"|",Reference),"*",'"',"|","'",regg(/[^<&']/,"|",Reference),"*","'"),NCNameStartChar=chars_without(NameStartChar,":"),NCNameChar=chars_without(NameChar,":"),NCName=reg$2(NCNameStartChar,NCNameChar,"*"),QName=reg$2(NCName,regg(":",NCName),"?"),QName_exact=reg$2("^",QName,"$"),QName_group=reg$2("(",QName,")"),SystemLiteral=regg(/"[^"]*"|'[^']*'/),PI$9=reg$2(/^<\?/,"(",Name,")",regg(S$1,"(",Char,"*?)"),"?",/\?>/),PubidChar=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,PubidLiteral=regg('"',PubidChar,'*"',"|","'",chars_without(PubidChar,"'"),"*'"),COMMENT_START="<!--",COMMENT_END="-->",Comment$2=reg$2(COMMENT_START,regg(chars_without(Char,"-"),"|",reg$2("-",chars_without(Char,"-"))),"*",COMMENT_END),PCDATA="#PCDATA",Mixed=regg(reg$2(/\(/,S_OPT,PCDATA,regg(S_OPT,/\|/,S_OPT,QName),"*",S_OPT,/\)\*/),"|",reg$2(/\(/,S_OPT,PCDATA,S_OPT,/\)/)),_children_quantity=/[?*+]?/,children$1=reg$2(/\([^>]+\)/,_children_quantity),contentspec=regg("EMPTY","|","ANY","|",Mixed,"|",children$1),ELEMENTDECL_START="<!ELEMENT",elementdecl=reg$2(ELEMENTDECL_START,S$1,regg(QName,"|",PEReference),S$1,regg(contentspec,"|",PEReference),S_OPT,">"),NotationType=reg$2("NOTATION",S$1,/\(/,S_OPT,Name,regg(S_OPT,/\|/,S_OPT,Name),"*",S_OPT,/\)/),Enumeration=reg$2(/\(/,S_OPT,Nmtoken,regg(S_OPT,/\|/,S_OPT,Nmtoken),"*",S_OPT,/\)/),EnumeratedType=regg(NotationType,"|",Enumeration),AttType=regg(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",EnumeratedType),DefaultDecl=regg(/#REQUIRED|#IMPLIED/,"|",regg(regg("#FIXED",S$1),"?",AttValue)),AttDef=regg(S$1,Name,S$1,AttType,S$1,DefaultDecl),ATTLIST_DECL_START="<!ATTLIST",AttlistDecl=reg$2(ATTLIST_DECL_START,S$1,Name,AttDef,"*",S_OPT,">"),ABOUT_LEGACY_COMPAT="about:legacy-compat",ABOUT_LEGACY_COMPAT_SystemLiteral=regg('"'+ABOUT_LEGACY_COMPAT+'"',"|","'"+ABOUT_LEGACY_COMPAT+"'"),SYSTEM="SYSTEM",PUBLIC="PUBLIC",ExternalID=regg(regg(SYSTEM,S$1,SystemLiteral),"|",regg(PUBLIC,S$1,PubidLiteral,S$1,SystemLiteral)),ExternalID_match=reg$2("^",regg(regg(SYSTEM,S$1,"(?<SystemLiteralOnly>",SystemLiteral,")"),"|",regg(PUBLIC,S$1,"(?<PubidLiteral>",PubidLiteral,")",S$1,"(?<SystemLiteral>",SystemLiteral,")"))),NDataDecl=regg(S$1,"NDATA",S$1,Name),EntityDef=regg(EntityValue,"|",regg(ExternalID,NDataDecl,"?")),ENTITY_DECL_START="<!ENTITY",GEDecl=reg$2(ENTITY_DECL_START,S$1,Name,S$1,EntityDef,S_OPT,">"),PEDef=regg(EntityValue,"|",ExternalID),PEDecl=reg$2(ENTITY_DECL_START,S$1,"%",S$1,Name,S$1,PEDef,S_OPT,">"),EntityDecl=regg(GEDecl,"|",PEDecl),PublicID=reg$2(PUBLIC,S$1,PubidLiteral),NotationDecl=reg$2("<!NOTATION",S$1,Name,S$1,regg(ExternalID,"|",PublicID),S_OPT,">"),Eq=reg$2(S_OPT,"=",S_OPT),VersionNum=/1[.]\d+/,VersionInfo=reg$2(S$1,"version",Eq,regg("'",VersionNum,"'","|",'"',VersionNum,'"')),EncName=/[A-Za-z][-A-Za-z0-9._]*/,EncodingDecl=regg(S$1,"encoding",Eq,regg('"',EncName,'"',"|","'",EncName,"'")),SDDecl=regg(S$1,"standalone",Eq,regg("'",regg("yes","|","no"),"'","|",'"',regg("yes","|","no"),'"')),XMLDecl=reg$2(/^<\?xml/,VersionInfo,EncodingDecl,"?",SDDecl,"?",S_OPT,/\?>/),DOCTYPE_DECL_START="<!DOCTYPE",CDATA_START="<![CDATA[",CDATA_END="]]>",CDStart=/<!\[CDATA\[/,CDEnd=/\]\]>/,CData=reg$2(Char,"*?",CDEnd),CDSect=reg$2(CDStart,CData);grammar.chars=chars$4,grammar.chars_without=chars_without,grammar.detectUnicodeSupport=detectUnicodeSupport,grammar.reg=reg$2,grammar.regg=regg,grammar.ABOUT_LEGACY_COMPAT=ABOUT_LEGACY_COMPAT,grammar.ABOUT_LEGACY_COMPAT_SystemLiteral=ABOUT_LEGACY_COMPAT_SystemLiteral,grammar.AttlistDecl=AttlistDecl,grammar.CDATA_START=CDATA_START,grammar.CDATA_END=CDATA_END,grammar.CDSect=CDSect,grammar.Char=Char,grammar.Comment=Comment$2,grammar.COMMENT_START=COMMENT_START,grammar.COMMENT_END=COMMENT_END,grammar.DOCTYPE_DECL_START=DOCTYPE_DECL_START,grammar.elementdecl=elementdecl,grammar.EntityDecl=EntityDecl,grammar.EntityValue=EntityValue,grammar.ExternalID=ExternalID,grammar.ExternalID_match=ExternalID_match,grammar.Name=Name,grammar.NotationDecl=NotationDecl,grammar.Reference=Reference,grammar.PEReference=PEReference,grammar.PI=PI$9,grammar.PUBLIC=PUBLIC,grammar.PubidLiteral=PubidLiteral,grammar.QName=QName,grammar.QName_exact=QName_exact,grammar.QName_group=QName_group,grammar.S=S$1,grammar.SChar_s=SChar_s,grammar.S_OPT=S_OPT,grammar.SYSTEM=SYSTEM,grammar.SystemLiteral=SystemLiteral,grammar.UNICODE_REPLACEMENT_CHARACTER=UNICODE_REPLACEMENT_CHARACTER,grammar.UNICODE_SUPPORT=UNICODE_SUPPORT,grammar.XMLDecl=XMLDecl;var conventions$3=conventions$5,find$4=conventions$3.find,hasDefaultHTMLNamespace$1=conventions$3.hasDefaultHTMLNamespace,hasOwn$d=conventions$3.hasOwn,isHTMLMimeType$2=conventions$3.isHTMLMimeType,isHTMLRawTextElement$1=conventions$3.isHTMLRawTextElement,isHTMLVoidElement=conventions$3.isHTMLVoidElement,MIME_TYPE$1=conventions$3.MIME_TYPE,NAMESPACE$2=conventions$3.NAMESPACE,PDC=Symbol(),errors$2=errors$3,DOMException$1=errors$2.DOMException,DOMExceptionName=errors$2.DOMExceptionName,g$2=grammar;function checkSymbol(Ce){if(Ce!==PDC)throw new TypeError("Illegal constructor")}function notEmptyString(Ce){return Ce!==""}function splitOnASCIIWhitespace(Ce){return Ce?Ce.split(/[\t\n\f\r ]+/).filter(notEmptyString):[]}function orderedSetReducer(Ce,_e){return hasOwn$d(Ce,_e)||(Ce[_e]=!0),Ce}function toOrderedSet(Ce){if(!Ce)return[];var _e=splitOnASCIIWhitespace(Ce);return Object.keys(_e.reduce(orderedSetReducer,{}))}function arrayIncludes$1(Ce){return function(_e){return Ce&&Ce.indexOf(_e)!==-1}}function validateQualifiedName(Ce){if(!g$2.QName_exact.test(Ce))throw new DOMException$1(DOMException$1.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+Ce+'"')}function validateAndExtract(Ce,_e){validateQualifiedName(_e),Ce=Ce||null;var Ae=null,Se=_e;if(_e.indexOf(":")>=0){var Ee=_e.split(":");Ae=Ee[0],Se=Ee[1]}if(Ae!==null&&Ce===null)throw new DOMException$1(DOMException$1.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(Ae==="xml"&&Ce!==conventions$3.NAMESPACE.XML)throw new DOMException$1(DOMException$1.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if((Ae==="xmlns"||_e==="xmlns")&&Ce!==conventions$3.NAMESPACE.XMLNS)throw new DOMException$1(DOMException$1.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(Ce===conventions$3.NAMESPACE.XMLNS&&Ae!=="xmlns"&&_e!=="xmlns")throw new DOMException$1(DOMException$1.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[Ce,Ae,Se]}function copy$6(Ce,_e){for(var Ae in Ce)hasOwn$d(Ce,Ae)&&(_e[Ae]=Ce[Ae])}function _extends(Ce,_e){var Ae=Ce.prototype;if(!(Ae instanceof _e)){let Se=function(){};Se.prototype=_e.prototype,Se=new Se,copy$6(Ae,Se),Ce.prototype=Ae=Se}Ae.constructor!=Ce&&(typeof Ce!="function"&&console.error("unknown Class:"+Ce),Ae.constructor=Ce)}var NodeType$2={},ELEMENT_NODE=NodeType$2.ELEMENT_NODE=1,ATTRIBUTE_NODE=NodeType$2.ATTRIBUTE_NODE=2,TEXT_NODE=NodeType$2.TEXT_NODE=3,CDATA_SECTION_NODE=NodeType$2.CDATA_SECTION_NODE=4,ENTITY_REFERENCE_NODE=NodeType$2.ENTITY_REFERENCE_NODE=5,ENTITY_NODE=NodeType$2.ENTITY_NODE=6,PROCESSING_INSTRUCTION_NODE=NodeType$2.PROCESSING_INSTRUCTION_NODE=7,COMMENT_NODE=NodeType$2.COMMENT_NODE=8,DOCUMENT_NODE=NodeType$2.DOCUMENT_NODE=9,DOCUMENT_TYPE_NODE=NodeType$2.DOCUMENT_TYPE_NODE=10,DOCUMENT_FRAGMENT_NODE=NodeType$2.DOCUMENT_FRAGMENT_NODE=11,NOTATION_NODE=NodeType$2.NOTATION_NODE=12,DocumentPosition=conventions$3.freeze({DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:2,DOCUMENT_POSITION_FOLLOWING:4,DOCUMENT_POSITION_CONTAINS:8,DOCUMENT_POSITION_CONTAINED_BY:16,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32});function commonAncestor(Ce,_e){if(_e.length<Ce.length)return commonAncestor(_e,Ce);var Ae=null;for(var Se in Ce){if(Ce[Se]!==_e[Se])return Ae;Ae=Ce[Se]}return Ae}function docGUID(Ce){return Ce.guid||(Ce.guid=Math.random()),Ce.guid}function NodeList(){}NodeList.prototype={length:0,item:function(Ce){return Ce>=0&&Ce<this.length?this[Ce]:null},toString:function(Ce){for(var _e=[],Ae=0;Ae<this.length;Ae++)serializeToString(this[Ae],_e,Ce);return _e.join("")},filter:function(Ce){return Array.prototype.filter.call(this,Ce)},indexOf:function(Ce){return Array.prototype.indexOf.call(this,Ce)}},NodeList.prototype[Symbol.iterator]=function(){var Ce=this,_e=0;return{next:function(){return _e<Ce.length?{value:Ce[_e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function LiveNodeList(Ce,_e){this._node=Ce,this._refresh=_e,_updateLiveList(this)}function _updateLiveList(Ce){var _e=Ce._node._inc||Ce._node.ownerDocument._inc;if(Ce._inc!==_e){var Ae=Ce._refresh(Ce._node);if(__set__(Ce,"length",Ae.length),!Ce.$$length||Ae.length<Ce.$$length)for(var Se=Ae.length;Se in Ce;Se++)hasOwn$d(Ce,Se)&&delete Ce[Se];copy$6(Ae,Ce),Ce._inc=_e}}LiveNodeList.prototype.item=function(Ce){return _updateLiveList(this),this[Ce]||null},_extends(LiveNodeList,NodeList);function NamedNodeMap(){}function _findNodeIndex(Ce,_e){for(var Ae=0;Ae<Ce.length;){if(Ce[Ae]===_e)return Ae;Ae++}}function _addNamedNode(Ce,_e,Ae,Se){if(Se?_e[_findNodeIndex(_e,Se)]=Ae:(_e[_e.length]=Ae,_e.length++),Ce){Ae.ownerElement=Ce;var Ee=Ce.ownerDocument;Ee&&(Se&&_onRemoveAttribute(Ee,Ce,Se),_onAddAttribute(Ee,Ce,Ae))}}function _removeNamedNode(Ce,_e,Ae){var Se=_findNodeIndex(_e,Ae);if(Se>=0){for(var Ee=_e.length-1;Se<=Ee;)_e[Se]=_e[++Se];if(_e.length=Ee,Ce){var xe=Ce.ownerDocument;xe&&_onRemoveAttribute(xe,Ce,Ae),Ae.ownerElement=null}}}NamedNodeMap.prototype={length:0,item:NodeList.prototype.item,getNamedItem:function(Ce){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(Ce=Ce.toLowerCase());for(var _e=0;_e<this.length;){var Ae=this[_e];if(Ae.nodeName===Ce)return Ae;_e++}return null},setNamedItem:function(Ce){var _e=Ce.ownerElement;if(_e&&_e!==this._ownerElement)throw new DOMException$1(DOMException$1.INUSE_ATTRIBUTE_ERR);var Ae=this.getNamedItemNS(Ce.namespaceURI,Ce.localName);return Ae===Ce?Ce:(_addNamedNode(this._ownerElement,this,Ce,Ae),Ae)},setNamedItemNS:function(Ce){return this.setNamedItem(Ce)},removeNamedItem:function(Ce){var _e=this.getNamedItem(Ce);if(!_e)throw new DOMException$1(DOMException$1.NOT_FOUND_ERR,Ce);return _removeNamedNode(this._ownerElement,this,_e),_e},removeNamedItemNS:function(Ce,_e){var Ae=this.getNamedItemNS(Ce,_e);if(!Ae)throw new DOMException$1(DOMException$1.NOT_FOUND_ERR,Ce?Ce+" : "+_e:_e);return _removeNamedNode(this._ownerElement,this,Ae),Ae},getNamedItemNS:function(Ce,_e){Ce||(Ce=null);for(var Ae=0;Ae<this.length;){var Se=this[Ae];if(Se.localName===_e&&Se.namespaceURI===Ce)return Se;Ae++}return null}},NamedNodeMap.prototype[Symbol.iterator]=function(){var Ce=this,_e=0;return{next:function(){return _e<Ce.length?{value:Ce[_e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function DOMImplementation$1(){}DOMImplementation$1.prototype={hasFeature:function(Ce,_e){return!0},createDocument:function(Ce,_e,Ae){var Se=MIME_TYPE$1.XML_APPLICATION;Ce===NAMESPACE$2.HTML?Se=MIME_TYPE$1.XML_XHTML_APPLICATION:Ce===NAMESPACE$2.SVG&&(Se=MIME_TYPE$1.XML_SVG_IMAGE);var Ee=new Document$4(PDC,{contentType:Se});if(Ee.implementation=this,Ee.childNodes=new NodeList,Ee.doctype=Ae||null,Ae&&Ee.appendChild(Ae),_e){var xe=Ee.createElementNS(Ce,_e);Ee.appendChild(xe)}return Ee},createDocumentType:function(Ce,_e,Ae,Se){validateQualifiedName(Ce);var Ee=new DocumentType(PDC);return Ee.name=Ce,Ee.nodeName=Ce,Ee.publicId=_e||"",Ee.systemId=Ae||"",Ee.internalSubset=Se||"",Ee.childNodes=new NodeList,Ee},createHTMLDocument:function(Ce){var _e=new Document$4(PDC,{contentType:MIME_TYPE$1.HTML});if(_e.implementation=this,_e.childNodes=new NodeList,Ce!==!1){_e.doctype=this.createDocumentType("html"),_e.doctype.ownerDocument=_e,_e.appendChild(_e.doctype);var Ae=_e.createElement("html");_e.appendChild(Ae);var Se=_e.createElement("head");if(Ae.appendChild(Se),typeof Ce=="string"){var Ee=_e.createElement("title");Ee.appendChild(_e.createTextNode(Ce)),Se.appendChild(Ee)}Ae.appendChild(_e.createElement("body"))}return _e}};function Node$5(Ce){checkSymbol(Ce)}Node$5.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,parentNode:null,get parentElement(){return this.parentNode&&this.parentNode.nodeType===this.ELEMENT_NODE?this.parentNode:null},childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,baseURI:"about:blank",get isConnected(){var Ce=this.getRootNode();return Ce&&Ce.nodeType===Ce.DOCUMENT_NODE},contains:function(Ce){if(!Ce)return!1;var _e=Ce;do{if(this===_e)return!0;_e=Ce.parentNode}while(_e);return!1},getRootNode:function(Ce){var _e=this;do{if(!_e.parentNode)return _e;_e=_e.parentNode}while(_e)},isEqualNode:function(Ce){if(!Ce||this.nodeType!==Ce.nodeType)return!1;switch(this.nodeType){case this.DOCUMENT_TYPE_NODE:if(this.name!==Ce.name||this.publicId!==Ce.publicId||this.systemId!==Ce.systemId)return!1;break;case this.ELEMENT_NODE:if(this.namespaceURI!==Ce.namespaceURI||this.prefix!==Ce.prefix||this.localName!==Ce.localName||this.attributes.length!==Ce.attributes.length)return!1;for(var _e=0;_e<this.attributes.length;_e++){var Ae=this.attributes.item(_e);if(!Ae.isEqualNode(Ce.getAttributeNodeNS(Ae.namespaceURI,Ae.localName)))return!1}break;case this.ATTRIBUTE_NODE:if(this.namespaceURI!==Ce.namespaceURI||this.localName!==Ce.localName||this.value!==Ce.value)return!1;break;case this.PROCESSING_INSTRUCTION_NODE:if(this.target!==Ce.target||this.data!==Ce.data)return!1;break;case this.TEXT_NODE:case this.COMMENT_NODE:if(this.data!==Ce.data)return!1;break}if(this.childNodes.length!==Ce.childNodes.length)return!1;for(var _e=0;_e<this.childNodes.length;_e++)if(!this.childNodes[_e].isEqualNode(Ce.childNodes[_e]))return!1;return!0},isSameNode:function(Ce){return this===Ce},insertBefore:function(Ce,_e){return _insertBefore(this,Ce,_e)},replaceChild:function(Ce,_e){_insertBefore(this,Ce,_e,assertPreReplacementValidityInDocument),_e&&this.removeChild(_e)},removeChild:function(Ce){return _removeChild(this,Ce)},appendChild:function(Ce){return this.insertBefore(Ce,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(Ce){return cloneNode(this.ownerDocument||this,this,Ce)},normalize:function(){for(var Ce=this.firstChild;Ce;){var _e=Ce.nextSibling;_e&&_e.nodeType==TEXT_NODE&&Ce.nodeType==TEXT_NODE?(this.removeChild(_e),Ce.appendData(_e.data)):(Ce.normalize(),Ce=_e)}},isSupported:function(Ce,_e){return this.ownerDocument.implementation.hasFeature(Ce,_e)},lookupPrefix:function(Ce){for(var _e=this;_e;){var Ae=_e._nsMap;if(Ae){for(var Se in Ae)if(hasOwn$d(Ae,Se)&&Ae[Se]===Ce)return Se}_e=_e.nodeType==ATTRIBUTE_NODE?_e.ownerDocument:_e.parentNode}return null},lookupNamespaceURI:function(Ce){for(var _e=this;_e;){var Ae=_e._nsMap;if(Ae&&hasOwn$d(Ae,Ce))return Ae[Ce];_e=_e.nodeType==ATTRIBUTE_NODE?_e.ownerDocument:_e.parentNode}return null},isDefaultNamespace:function(Ce){var _e=this.lookupPrefix(Ce);return _e==null},compareDocumentPosition:function(Ce){if(this===Ce)return 0;var _e=Ce,Ae=this,Se=null,Ee=null;if(_e instanceof Attr&&(Se=_e,_e=Se.ownerElement),Ae instanceof Attr&&(Ee=Ae,Ae=Ee.ownerElement,Se&&_e&&Ae===_e))for(var xe=0,Te;Te=Ae.attributes[xe];xe++){if(Te===Se)return DocumentPosition.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+DocumentPosition.DOCUMENT_POSITION_PRECEDING;if(Te===Ee)return DocumentPosition.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+DocumentPosition.DOCUMENT_POSITION_FOLLOWING}if(!_e||!Ae||Ae.ownerDocument!==_e.ownerDocument)return DocumentPosition.DOCUMENT_POSITION_DISCONNECTED+DocumentPosition.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(docGUID(Ae.ownerDocument)>docGUID(_e.ownerDocument)?DocumentPosition.DOCUMENT_POSITION_FOLLOWING:DocumentPosition.DOCUMENT_POSITION_PRECEDING);if(Ee&&_e===Ae)return DocumentPosition.DOCUMENT_POSITION_CONTAINS+DocumentPosition.DOCUMENT_POSITION_PRECEDING;if(Se&&_e===Ae)return DocumentPosition.DOCUMENT_POSITION_CONTAINED_BY+DocumentPosition.DOCUMENT_POSITION_FOLLOWING;for(var Ie=[],De=_e.parentNode;De;){if(!Ee&&De===Ae)return DocumentPosition.DOCUMENT_POSITION_CONTAINED_BY+DocumentPosition.DOCUMENT_POSITION_FOLLOWING;Ie.push(De),De=De.parentNode}Ie.reverse();for(var ke=[],Oe=Ae.parentNode;Oe;){if(!Se&&Oe===_e)return DocumentPosition.DOCUMENT_POSITION_CONTAINS+DocumentPosition.DOCUMENT_POSITION_PRECEDING;ke.push(Oe),Oe=Oe.parentNode}ke.reverse();var Me=commonAncestor(Ie,ke);for(var Pe in Me.childNodes){var Be=Me.childNodes[Pe];if(Be===Ae)return DocumentPosition.DOCUMENT_POSITION_FOLLOWING;if(Be===_e)return DocumentPosition.DOCUMENT_POSITION_PRECEDING;if(ke.indexOf(Be)>=0)return DocumentPosition.DOCUMENT_POSITION_FOLLOWING;if(Ie.indexOf(Be)>=0)return DocumentPosition.DOCUMENT_POSITION_PRECEDING}return 0}};function _xmlEncoder(Ce){return Ce=="<"&&"<"||Ce==">"&&">"||Ce=="&"&&"&"||Ce=='"'&&"""||"&#"+Ce.charCodeAt()+";"}copy$6(NodeType$2,Node$5),copy$6(NodeType$2,Node$5.prototype),copy$6(DocumentPosition,Node$5),copy$6(DocumentPosition,Node$5.prototype);function _visitNode(Ce,_e){if(_e(Ce))return!0;if(Ce=Ce.firstChild)do if(_visitNode(Ce,_e))return!0;while(Ce=Ce.nextSibling)}function Document$4(Ce,_e){checkSymbol(Ce);var Ae=_e||{};this.ownerDocument=this,this.contentType=Ae.contentType||MIME_TYPE$1.XML_APPLICATION,this.type=isHTMLMimeType$2(this.contentType)?"html":"xml"}function _onAddAttribute(Ce,_e,Ae){Ce&&Ce._inc++;var Se=Ae.namespaceURI;Se===NAMESPACE$2.XMLNS&&(_e._nsMap[Ae.prefix?Ae.localName:""]=Ae.value)}function _onRemoveAttribute(Ce,_e,Ae,Se){Ce&&Ce._inc++;var Ee=Ae.namespaceURI;Ee===NAMESPACE$2.XMLNS&&delete _e._nsMap[Ae.prefix?Ae.localName:""]}function _onUpdateChild(Ce,_e,Ae){if(Ce&&Ce._inc){Ce._inc++;var Se=_e.childNodes;if(Ae&&!Ae.nextSibling)Se[Se.length++]=Ae;else{for(var Ee=_e.firstChild,xe=0;Ee;)Se[xe++]=Ee,Ee=Ee.nextSibling;Se.length=xe,delete Se[Se.length]}}}function _removeChild(Ce,_e){if(Ce!==_e.parentNode)throw new DOMException$1(DOMException$1.NOT_FOUND_ERR,"child's parent is not parent");var Ae=_e.previousSibling,Se=_e.nextSibling;return Ae?Ae.nextSibling=Se:Ce.firstChild=Se,Se?Se.previousSibling=Ae:Ce.lastChild=Ae,_onUpdateChild(Ce.ownerDocument,Ce),_e.parentNode=null,_e.previousSibling=null,_e.nextSibling=null,_e}function hasValidParentNodeType(Ce){return Ce&&(Ce.nodeType===Node$5.DOCUMENT_NODE||Ce.nodeType===Node$5.DOCUMENT_FRAGMENT_NODE||Ce.nodeType===Node$5.ELEMENT_NODE)}function hasInsertableNodeType(Ce){return Ce&&(Ce.nodeType===Node$5.CDATA_SECTION_NODE||Ce.nodeType===Node$5.COMMENT_NODE||Ce.nodeType===Node$5.DOCUMENT_FRAGMENT_NODE||Ce.nodeType===Node$5.DOCUMENT_TYPE_NODE||Ce.nodeType===Node$5.ELEMENT_NODE||Ce.nodeType===Node$5.PROCESSING_INSTRUCTION_NODE||Ce.nodeType===Node$5.TEXT_NODE)}function isDocTypeNode(Ce){return Ce&&Ce.nodeType===Node$5.DOCUMENT_TYPE_NODE}function isElementNode$1(Ce){return Ce&&Ce.nodeType===Node$5.ELEMENT_NODE}function isTextNode$1(Ce){return Ce&&Ce.nodeType===Node$5.TEXT_NODE}function isElementInsertionPossible(Ce,_e){var Ae=Ce.childNodes||[];if(find$4(Ae,isElementNode$1)||isDocTypeNode(_e))return!1;var Se=find$4(Ae,isDocTypeNode);return!(_e&&Se&&Ae.indexOf(Se)>Ae.indexOf(_e))}function isElementReplacementPossible(Ce,_e){var Ae=Ce.childNodes||[];function Se(xe){return isElementNode$1(xe)&&xe!==_e}if(find$4(Ae,Se))return!1;var Ee=find$4(Ae,isDocTypeNode);return!(_e&&Ee&&Ae.indexOf(Ee)>Ae.indexOf(_e))}function assertPreInsertionValidity1to5(Ce,_e,Ae){if(!hasValidParentNodeType(Ce))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+Ce.nodeType);if(Ae&&Ae.parentNode!==Ce)throw new DOMException$1(DOMException$1.NOT_FOUND_ERR,"child not in parent");if(!hasInsertableNodeType(_e)||isDocTypeNode(_e)&&Ce.nodeType!==Node$5.DOCUMENT_NODE)throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Unexpected node type "+_e.nodeType+" for parent node type "+Ce.nodeType)}function assertPreInsertionValidityInDocument(Ce,_e,Ae){var Se=Ce.childNodes||[],Ee=_e.childNodes||[];if(_e.nodeType===Node$5.DOCUMENT_FRAGMENT_NODE){var xe=Ee.filter(isElementNode$1);if(xe.length>1||find$4(Ee,isTextNode$1))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(xe.length===1&&!isElementInsertionPossible(Ce,Ae))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(isElementNode$1(_e)&&!isElementInsertionPossible(Ce,Ae))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(isDocTypeNode(_e)){if(find$4(Se,isDocTypeNode))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var Te=find$4(Se,isElementNode$1);if(Ae&&Se.indexOf(Te)<Se.indexOf(Ae))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!Ae&&Te)throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function assertPreReplacementValidityInDocument(Ce,_e,Ae){var Se=Ce.childNodes||[],Ee=_e.childNodes||[];if(_e.nodeType===Node$5.DOCUMENT_FRAGMENT_NODE){var xe=Ee.filter(isElementNode$1);if(xe.length>1||find$4(Ee,isTextNode$1))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(xe.length===1&&!isElementReplacementPossible(Ce,Ae))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(isElementNode$1(_e)&&!isElementReplacementPossible(Ce,Ae))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(isDocTypeNode(_e)){if(find$4(Se,function(De){return isDocTypeNode(De)&&De!==Ae}))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var Te=find$4(Se,isElementNode$1);if(Ae&&Se.indexOf(Te)<Se.indexOf(Ae))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function _insertBefore(Ce,_e,Ae,Se){assertPreInsertionValidity1to5(Ce,_e,Ae),Ce.nodeType===Node$5.DOCUMENT_NODE&&(Se||assertPreInsertionValidityInDocument)(Ce,_e,Ae);var Ee=_e.parentNode;if(Ee&&Ee.removeChild(_e),_e.nodeType===DOCUMENT_FRAGMENT_NODE){var xe=_e.firstChild;if(xe==null)return _e;var Te=_e.lastChild}else xe=Te=_e;var Ie=Ae?Ae.previousSibling:Ce.lastChild;xe.previousSibling=Ie,Te.nextSibling=Ae,Ie?Ie.nextSibling=xe:Ce.firstChild=xe,Ae==null?Ce.lastChild=Te:Ae.previousSibling=Te;do xe.parentNode=Ce;while(xe!==Te&&(xe=xe.nextSibling));return _onUpdateChild(Ce.ownerDocument||Ce,Ce,_e),_e.nodeType==DOCUMENT_FRAGMENT_NODE&&(_e.firstChild=_e.lastChild=null),_e}Document$4.prototype={implementation:null,nodeName:"#document",nodeType:DOCUMENT_NODE,doctype:null,documentElement:null,_inc:1,insertBefore:function(Ce,_e){if(Ce.nodeType===DOCUMENT_FRAGMENT_NODE){for(var Ae=Ce.firstChild;Ae;){var Se=Ae.nextSibling;this.insertBefore(Ae,_e),Ae=Se}return Ce}return _insertBefore(this,Ce,_e),Ce.ownerDocument=this,this.documentElement===null&&Ce.nodeType===ELEMENT_NODE&&(this.documentElement=Ce),Ce},removeChild:function(Ce){var _e=_removeChild(this,Ce);return _e===this.documentElement&&(this.documentElement=null),_e},replaceChild:function(Ce,_e){_insertBefore(this,Ce,_e,assertPreReplacementValidityInDocument),Ce.ownerDocument=this,_e&&this.removeChild(_e),isElementNode$1(Ce)&&(this.documentElement=Ce)},importNode:function(Ce,_e){return importNode(this,Ce,_e)},getElementById:function(Ce){var _e=null;return _visitNode(this.documentElement,function(Ae){if(Ae.nodeType==ELEMENT_NODE&&Ae.getAttribute("id")==Ce)return _e=Ae,!0}),_e},createElement:function(Ce){var _e=new Element$5(PDC);_e.ownerDocument=this,this.type==="html"&&(Ce=Ce.toLowerCase()),hasDefaultHTMLNamespace$1(this.contentType)&&(_e.namespaceURI=NAMESPACE$2.HTML),_e.nodeName=Ce,_e.tagName=Ce,_e.localName=Ce,_e.childNodes=new NodeList;var Ae=_e.attributes=new NamedNodeMap;return Ae._ownerElement=_e,_e},createDocumentFragment:function(){var Ce=new DocumentFragment$1(PDC);return Ce.ownerDocument=this,Ce.childNodes=new NodeList,Ce},createTextNode:function(Ce){var _e=new Text$5(PDC);return _e.ownerDocument=this,_e.childNodes=new NodeList,_e.appendData(Ce),_e},createComment:function(Ce){var _e=new Comment$1(PDC);return _e.ownerDocument=this,_e.childNodes=new NodeList,_e.appendData(Ce),_e},createCDATASection:function(Ce){var _e=new CDATASection(PDC);return _e.ownerDocument=this,_e.childNodes=new NodeList,_e.appendData(Ce),_e},createProcessingInstruction:function(Ce,_e){var Ae=new ProcessingInstruction(PDC);return Ae.ownerDocument=this,Ae.childNodes=new NodeList,Ae.nodeName=Ae.target=Ce,Ae.nodeValue=Ae.data=_e,Ae},createAttribute:function(Ce){if(!g$2.QName_exact.test(Ce))throw new DOMException$1(DOMException$1.INVALID_CHARACTER_ERR,'invalid character in name "'+Ce+'"');return this.type==="html"&&(Ce=Ce.toLowerCase()),this._createAttribute(Ce)},_createAttribute:function(Ce){var _e=new Attr(PDC);return _e.ownerDocument=this,_e.childNodes=new NodeList,_e.name=Ce,_e.nodeName=Ce,_e.localName=Ce,_e.specified=!0,_e},createEntityReference:function(Ce){if(!g$2.Name.test(Ce))throw new DOMException$1(DOMException$1.INVALID_CHARACTER_ERR,'not a valid xml name "'+Ce+'"');if(this.type==="html")throw new DOMException$1("document is an html document",DOMExceptionName.NotSupportedError);var _e=new EntityReference(PDC);return _e.ownerDocument=this,_e.childNodes=new NodeList,_e.nodeName=Ce,_e},createElementNS:function(Ce,_e){var Ae=validateAndExtract(Ce,_e),Se=new Element$5(PDC),Ee=Se.attributes=new NamedNodeMap;return Se.childNodes=new NodeList,Se.ownerDocument=this,Se.nodeName=_e,Se.tagName=_e,Se.namespaceURI=Ae[0],Se.prefix=Ae[1],Se.localName=Ae[2],Ee._ownerElement=Se,Se},createAttributeNS:function(Ce,_e){var Ae=validateAndExtract(Ce,_e),Se=new Attr(PDC);return Se.ownerDocument=this,Se.childNodes=new NodeList,Se.nodeName=_e,Se.name=_e,Se.specified=!0,Se.namespaceURI=Ae[0],Se.prefix=Ae[1],Se.localName=Ae[2],Se}},_extends(Document$4,Node$5);function Element$5(Ce){checkSymbol(Ce),this._nsMap=Object.create(null)}Element$5.prototype={nodeType:ELEMENT_NODE,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return this.ownerDocument.type==="html"&&this.namespaceURI===NAMESPACE$2.HTML},hasAttributes:function(){return!!(this.attributes&&this.attributes.length)},hasAttribute:function(Ce){return!!this.getAttributeNode(Ce)},getAttribute:function(Ce){var _e=this.getAttributeNode(Ce);return _e?_e.value:null},getAttributeNode:function(Ce){return this._isInHTMLDocumentAndNamespace()&&(Ce=Ce.toLowerCase()),this.attributes.getNamedItem(Ce)},setAttribute:function(Ce,_e){this._isInHTMLDocumentAndNamespace()&&(Ce=Ce.toLowerCase());var Ae=this.getAttributeNode(Ce);Ae?Ae.value=Ae.nodeValue=""+_e:(Ae=this.ownerDocument._createAttribute(Ce),Ae.value=Ae.nodeValue=""+_e,this.setAttributeNode(Ae))},removeAttribute:function(Ce){var _e=this.getAttributeNode(Ce);_e&&this.removeAttributeNode(_e)},setAttributeNode:function(Ce){return this.attributes.setNamedItem(Ce)},setAttributeNodeNS:function(Ce){return this.attributes.setNamedItemNS(Ce)},removeAttributeNode:function(Ce){return this.attributes.removeNamedItem(Ce.nodeName)},removeAttributeNS:function(Ce,_e){var Ae=this.getAttributeNodeNS(Ce,_e);Ae&&this.removeAttributeNode(Ae)},hasAttributeNS:function(Ce,_e){return this.getAttributeNodeNS(Ce,_e)!=null},getAttributeNS:function(Ce,_e){var Ae=this.getAttributeNodeNS(Ce,_e);return Ae?Ae.value:null},setAttributeNS:function(Ce,_e,Ae){var Se=validateAndExtract(Ce,_e),Ee=Se[2],xe=this.getAttributeNodeNS(Ce,Ee);xe?xe.value=xe.nodeValue=""+Ae:(xe=this.ownerDocument.createAttributeNS(Ce,_e),xe.value=xe.nodeValue=""+Ae,this.setAttributeNode(xe))},getAttributeNodeNS:function(Ce,_e){return this.attributes.getNamedItemNS(Ce,_e)},getElementsByClassName:function(Ce){var _e=toOrderedSet(Ce);return new LiveNodeList(this,function(Ae){var Se=[];return _e.length>0&&_visitNode(Ae,function(Ee){if(Ee!==Ae&&Ee.nodeType===ELEMENT_NODE){var xe=Ee.getAttribute("class");if(xe){var Te=Ce===xe;if(!Te){var Ie=toOrderedSet(xe);Te=_e.every(arrayIncludes$1(Ie))}Te&&Se.push(Ee)}}}),Se})},getElementsByTagName:function(Ce){var _e=(this.nodeType===DOCUMENT_NODE?this:this.ownerDocument).type==="html",Ae=Ce.toLowerCase();return new LiveNodeList(this,function(Se){var Ee=[];return _visitNode(Se,function(xe){if(!(xe===Se||xe.nodeType!==ELEMENT_NODE))if(Ce==="*")Ee.push(xe);else{var Te=xe.getQualifiedName(),Ie=_e&&xe.namespaceURI===NAMESPACE$2.HTML?Ae:Ce;Te===Ie&&Ee.push(xe)}}),Ee})},getElementsByTagNameNS:function(Ce,_e){return new LiveNodeList(this,function(Ae){var Se=[];return _visitNode(Ae,function(Ee){Ee!==Ae&&Ee.nodeType===ELEMENT_NODE&&(Ce==="*"||Ee.namespaceURI===Ce)&&(_e==="*"||Ee.localName==_e)&&Se.push(Ee)}),Se})}},Document$4.prototype.getElementsByClassName=Element$5.prototype.getElementsByClassName,Document$4.prototype.getElementsByTagName=Element$5.prototype.getElementsByTagName,Document$4.prototype.getElementsByTagNameNS=Element$5.prototype.getElementsByTagNameNS,_extends(Element$5,Node$5);function Attr(Ce){checkSymbol(Ce),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}Attr.prototype.nodeType=ATTRIBUTE_NODE,_extends(Attr,Node$5);function CharacterData(Ce){checkSymbol(Ce)}CharacterData.prototype={data:"",substringData:function(Ce,_e){return this.data.substring(Ce,Ce+_e)},appendData:function(Ce){Ce=this.data+Ce,this.nodeValue=this.data=Ce,this.length=Ce.length},insertData:function(Ce,_e){this.replaceData(Ce,0,_e)},deleteData:function(Ce,_e){this.replaceData(Ce,_e,"")},replaceData:function(Ce,_e,Ae){var Se=this.data.substring(0,Ce),Ee=this.data.substring(Ce+_e);Ae=Se+Ae+Ee,this.nodeValue=this.data=Ae,this.length=Ae.length}},_extends(CharacterData,Node$5);function Text$5(Ce){checkSymbol(Ce)}Text$5.prototype={nodeName:"#text",nodeType:TEXT_NODE,splitText:function(Ce){var _e=this.data,Ae=_e.substring(Ce);_e=_e.substring(0,Ce),this.data=this.nodeValue=_e,this.length=_e.length;var Se=this.ownerDocument.createTextNode(Ae);return this.parentNode&&this.parentNode.insertBefore(Se,this.nextSibling),Se}},_extends(Text$5,CharacterData);function Comment$1(Ce){checkSymbol(Ce)}Comment$1.prototype={nodeName:"#comment",nodeType:COMMENT_NODE},_extends(Comment$1,CharacterData);function CDATASection(Ce){checkSymbol(Ce)}CDATASection.prototype={nodeName:"#cdata-section",nodeType:CDATA_SECTION_NODE},_extends(CDATASection,Text$5);function DocumentType(Ce){checkSymbol(Ce)}DocumentType.prototype.nodeType=DOCUMENT_TYPE_NODE,_extends(DocumentType,Node$5);function Notation(Ce){checkSymbol(Ce)}Notation.prototype.nodeType=NOTATION_NODE,_extends(Notation,Node$5);function Entity(Ce){checkSymbol(Ce)}Entity.prototype.nodeType=ENTITY_NODE,_extends(Entity,Node$5);function EntityReference(Ce){checkSymbol(Ce)}EntityReference.prototype.nodeType=ENTITY_REFERENCE_NODE,_extends(EntityReference,Node$5);function DocumentFragment$1(Ce){checkSymbol(Ce)}DocumentFragment$1.prototype.nodeName="#document-fragment",DocumentFragment$1.prototype.nodeType=DOCUMENT_FRAGMENT_NODE,_extends(DocumentFragment$1,Node$5);function ProcessingInstruction(Ce){checkSymbol(Ce)}ProcessingInstruction.prototype.nodeType=PROCESSING_INSTRUCTION_NODE,_extends(ProcessingInstruction,CharacterData);function XMLSerializer$1(){}XMLSerializer$1.prototype.serializeToString=function(Ce,_e){return nodeSerializeToString.call(Ce,_e)},Node$5.prototype.toString=nodeSerializeToString;function nodeSerializeToString(Ce){var _e=[],Ae=this.nodeType===DOCUMENT_NODE&&this.documentElement||this,Se=Ae.prefix,Ee=Ae.namespaceURI;if(Ee&&Se==null){var Se=Ae.lookupPrefix(Ee);if(Se==null)var xe=[{namespace:Ee,prefix:null}]}return serializeToString(this,_e,Ce,xe),_e.join("")}function needNamespaceDefine(Ce,_e,Ae){var Se=Ce.prefix||"",Ee=Ce.namespaceURI;if(!Ee||Se==="xml"&&Ee===NAMESPACE$2.XML||Ee===NAMESPACE$2.XMLNS)return!1;for(var xe=Ae.length;xe--;){var Te=Ae[xe];if(Te.prefix===Se)return Te.namespace!==Ee}return!0}function addSerializedAttribute(Ce,_e,Ae){Ce.push(" ",_e,'="',Ae.replace(/[<>&"\t\n\r]/g,_xmlEncoder),'"')}function serializeToString(Ce,_e,Ae,Se){Se||(Se=[]);var Ee=Ce.nodeType===DOCUMENT_NODE?Ce:Ce.ownerDocument,xe=Ee.type==="html";if(Ae)if(Ce=Ae(Ce),Ce){if(typeof Ce=="string"){_e.push(Ce);return}}else return;switch(Ce.nodeType){case ELEMENT_NODE:var Te=Ce.attributes,Ie=Te.length,We=Ce.firstChild,De=Ce.tagName,ke=De;if(!xe&&!Ce.prefix&&Ce.namespaceURI){for(var Oe,Me=0;Me<Te.length;Me++)if(Te.item(Me).name==="xmlns"){Oe=Te.item(Me).value;break}if(!Oe)for(var Pe=Se.length-1;Pe>=0;Pe--){var Be=Se[Pe];if(Be.prefix===""&&Be.namespace===Ce.namespaceURI){Oe=Be.namespace;break}}if(Oe!==Ce.namespaceURI)for(var Pe=Se.length-1;Pe>=0;Pe--){var Be=Se[Pe];if(Be.namespace===Ce.namespaceURI){Be.prefix&&(ke=Be.prefix+":"+De);break}}}_e.push("<",ke);for(var Fe=0;Fe<Ie;Fe++){var $e=Te.item(Fe);$e.prefix=="xmlns"?Se.push({prefix:$e.localName,namespace:$e.value}):$e.nodeName=="xmlns"&&Se.push({prefix:"",namespace:$e.value})}for(var Fe=0;Fe<Ie;Fe++){var $e=Te.item(Fe);if(needNamespaceDefine($e,xe,Se)){var Ue=$e.prefix||"",He=$e.namespaceURI;addSerializedAttribute(_e,Ue?"xmlns:"+Ue:"xmlns",He),Se.push({prefix:Ue,namespace:He})}serializeToString($e,_e,Ae,Se)}if(De===ke&&needNamespaceDefine(Ce,xe,Se)){var Ue=Ce.prefix||"",He=Ce.namespaceURI;addSerializedAttribute(_e,Ue?"xmlns:"+Ue:"xmlns",He),Se.push({prefix:Ue,namespace:He})}var Ve=!We;if(Ve&&(xe||Ce.namespaceURI===NAMESPACE$2.HTML)&&(Ve=isHTMLVoidElement(De)),Ve)_e.push("/>");else{if(_e.push(">"),xe&&isHTMLRawTextElement$1(De))for(;We;)We.data?_e.push(We.data):serializeToString(We,_e,Ae,Se.slice()),We=We.nextSibling;else for(;We;)serializeToString(We,_e,Ae,Se.slice()),We=We.nextSibling;_e.push("</",ke,">")}return;case DOCUMENT_NODE:case DOCUMENT_FRAGMENT_NODE:for(var We=Ce.firstChild;We;)serializeToString(We,_e,Ae,Se.slice()),We=We.nextSibling;return;case ATTRIBUTE_NODE:return addSerializedAttribute(_e,Ce.name,Ce.value);case TEXT_NODE:return _e.push(Ce.data.replace(/[<&>]/g,_xmlEncoder));case CDATA_SECTION_NODE:return _e.push(g$2.CDATA_START,Ce.data,g$2.CDATA_END);case COMMENT_NODE:return _e.push(g$2.COMMENT_START,Ce.data,g$2.COMMENT_END);case DOCUMENT_TYPE_NODE:var ze=Ce.publicId,qe=Ce.systemId;_e.push(g$2.DOCTYPE_DECL_START," ",Ce.name),ze?(_e.push(" ",g$2.PUBLIC," ",ze),qe&&qe!=="."&&_e.push(" ",qe)):qe&&qe!=="."&&_e.push(" ",g$2.SYSTEM," ",qe),Ce.internalSubset&&_e.push(" [",Ce.internalSubset,"]"),_e.push(">");return;case PROCESSING_INSTRUCTION_NODE:return _e.push("<?",Ce.target," ",Ce.data,"?>");case ENTITY_REFERENCE_NODE:return _e.push("&",Ce.nodeName,";");default:_e.push("??",Ce.nodeName)}}function importNode(Ce,_e,Ae){var Se;switch(_e.nodeType){case ELEMENT_NODE:Se=_e.cloneNode(!1),Se.ownerDocument=Ce;case DOCUMENT_FRAGMENT_NODE:break;case ATTRIBUTE_NODE:Ae=!0;break}if(Se||(Se=_e.cloneNode(!1)),Se.ownerDocument=Ce,Se.parentNode=null,Ae)for(var Ee=_e.firstChild;Ee;)Se.appendChild(importNode(Ce,Ee,Ae)),Ee=Ee.nextSibling;return Se}function cloneNode(Ce,_e,Ae){var Se=new _e.constructor(PDC);for(var Ee in _e)if(hasOwn$d(_e,Ee)){var xe=_e[Ee];typeof xe!="object"&&xe!=Se[Ee]&&(Se[Ee]=xe)}switch(_e.childNodes&&(Se.childNodes=new NodeList),Se.ownerDocument=Ce,Se.nodeType){case ELEMENT_NODE:var Te=_e.attributes,Ie=Se.attributes=new NamedNodeMap,De=Te.length;Ie._ownerElement=Se;for(var ke=0;ke<De;ke++)Se.setAttributeNode(cloneNode(Ce,Te.item(ke),!0));break;case ATTRIBUTE_NODE:Ae=!0}if(Ae)for(var Oe=_e.firstChild;Oe;)Se.appendChild(cloneNode(Ce,Oe,Ae)),Oe=Oe.nextSibling;return Se}function __set__(Ce,_e,Ae){Ce[_e]=Ae}try{if(Object.defineProperty){let Ce=function(_e){switch(_e.nodeType){case ELEMENT_NODE:case DOCUMENT_FRAGMENT_NODE:var Ae=[];for(_e=_e.firstChild;_e;)_e.nodeType!==7&&_e.nodeType!==8&&Ae.push(Ce(_e)),_e=_e.nextSibling;return Ae.join("");default:return _e.nodeValue}};Object.defineProperty(LiveNodeList.prototype,"length",{get:function(){return _updateLiveList(this),this.$$length}}),Object.defineProperty(Node$5.prototype,"textContent",{get:function(){return Ce(this)},set:function(_e){switch(this.nodeType){case ELEMENT_NODE:case DOCUMENT_FRAGMENT_NODE:for(;this.firstChild;)this.removeChild(this.firstChild);(_e||String(_e))&&this.appendChild(this.ownerDocument.createTextNode(_e));break;default:this.data=_e,this.value=_e,this.nodeValue=_e}}}),__set__=function(_e,Ae,Se){_e["$$"+Ae]=Se}}}catch(Ce){}dom$1._updateLiveList=_updateLiveList,dom$1.Attr=Attr,dom$1.CDATASection=CDATASection,dom$1.CharacterData=CharacterData,dom$1.Comment=Comment$1,dom$1.Document=Document$4,dom$1.DocumentFragment=DocumentFragment$1,dom$1.DocumentType=DocumentType,dom$1.DOMImplementation=DOMImplementation$1,dom$1.Element=Element$5,dom$1.Entity=Entity,dom$1.EntityReference=EntityReference,dom$1.LiveNodeList=LiveNodeList,dom$1.NamedNodeMap=NamedNodeMap,dom$1.Node=Node$5,dom$1.NodeList=NodeList,dom$1.Notation=Notation,dom$1.Text=Text$5,dom$1.ProcessingInstruction=ProcessingInstruction,dom$1.XMLSerializer=XMLSerializer$1;var domParser$1={},entities$2={};(function(Ce){var _e=conventions$5.freeze;Ce.XML_ENTITIES=_e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),Ce.HTML_ENTITIES=_e({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
18
|
+
`+Array(Ae+1).join(_e.spaces):""),Se.push("</"+Ee+">")):Se.push("/>"),Se.join("")}function writeElements(Ce,_e,Ae,Se){return Ce.reduce(function(Ee,xe){var Te=writeIndentation(_e,Ae,Se&&!Ee);switch(xe.type){case"element":return Ee+Te+writeElement(xe,_e,Ae);case"comment":return Ee+Te+writeComment(xe[_e.commentKey],_e);case"doctype":return Ee+Te+writeDoctype(xe[_e.doctypeKey],_e);case"cdata":return Ee+(_e.indentCdata?Te:"")+writeCdata(xe[_e.cdataKey],_e);case"text":return Ee+(_e.indentText?Te:"")+writeText(xe[_e.textKey],_e);case"instruction":var Ie={};return Ie[xe[_e.nameKey]]=xe[_e.attributesKey]?xe:xe[_e.instructionKey],Ee+(_e.indentInstruction?Te:"")+writeInstruction(Ie,_e,Ae)}},"")}function hasContentCompact(Ce,_e,Ae){var Se;for(Se in Ce)if(Ce.hasOwnProperty(Se))switch(Se){case _e.parentKey:case _e.attributesKey:break;case _e.textKey:if(_e.indentText||Ae)return!0;break;case _e.cdataKey:if(_e.indentCdata||Ae)return!0;break;case _e.instructionKey:if(_e.indentInstruction||Ae)return!0;break;case _e.doctypeKey:case _e.commentKey:return!0;default:return!0}return!1}function writeElementCompact(Ce,_e,Ae,Se,Ee){currentElement=Ce,currentElementName=_e;var xe="elementNameFn"in Ae?Ae.elementNameFn(_e,Ce):_e;if(typeof Ce>"u"||Ce===null||Ce==="")return"fullTagEmptyElementFn"in Ae&&Ae.fullTagEmptyElementFn(_e,Ce)||Ae.fullTagEmptyElement?"<"+xe+"></"+xe+">":"<"+xe+"/>";var Te=[];if(_e){if(Te.push("<"+xe),typeof Ce!="object")return Te.push(">"+writeText(Ce,Ae)+"</"+xe+">"),Te.join("");Ce[Ae.attributesKey]&&Te.push(writeAttributes(Ce[Ae.attributesKey],Ae,Se));var Ie=hasContentCompact(Ce,Ae,!0)||Ce[Ae.attributesKey]&&Ce[Ae.attributesKey]["xml:space"]==="preserve";if(Ie||("fullTagEmptyElementFn"in Ae?Ie=Ae.fullTagEmptyElementFn(_e,Ce):Ie=Ae.fullTagEmptyElement),Ie)Te.push(">");else return Te.push("/>"),Te.join("")}return Te.push(writeElementsCompact(Ce,Ae,Se+1,!1)),currentElement=Ce,currentElementName=_e,_e&&Te.push((Ee?writeIndentation(Ae,Se,!1):"")+"</"+xe+">"),Te.join("")}function writeElementsCompact(Ce,_e,Ae,Se){var Ee,xe,Te,Ie=[];for(xe in Ce)if(Ce.hasOwnProperty(xe))for(Te=isArray$7(Ce[xe])?Ce[xe]:[Ce[xe]],Ee=0;Ee<Te.length;++Ee){switch(xe){case _e.declarationKey:Ie.push(writeDeclaration(Te[Ee],_e,Ae));break;case _e.instructionKey:Ie.push((_e.indentInstruction?writeIndentation(_e,Ae,Se):"")+writeInstruction(Te[Ee],_e,Ae));break;case _e.attributesKey:case _e.parentKey:break;case _e.textKey:Ie.push((_e.indentText?writeIndentation(_e,Ae,Se):"")+writeText(Te[Ee],_e));break;case _e.cdataKey:Ie.push((_e.indentCdata?writeIndentation(_e,Ae,Se):"")+writeCdata(Te[Ee],_e));break;case _e.doctypeKey:Ie.push(writeIndentation(_e,Ae,Se)+writeDoctype(Te[Ee],_e));break;case _e.commentKey:Ie.push(writeIndentation(_e,Ae,Se)+writeComment(Te[Ee],_e));break;default:Ie.push(writeIndentation(_e,Ae,Se)+writeElementCompact(Te[Ee],xe,_e,Ae,hasContentCompact(Te[Ee],_e)))}Se=Se&&!Ie.length}return Ie.join("")}var js2xml$2=function(Ce,_e){_e=validateOptions(_e);var Ae=[];return currentElement=Ce,currentElementName="_root_",_e.compact?Ae.push(writeElementsCompact(Ce,_e,0,!0)):(Ce[_e.declarationKey]&&Ae.push(writeDeclaration(Ce[_e.declarationKey],_e,0)),Ce[_e.elementsKey]&&Ce[_e.elementsKey].length&&Ae.push(writeElements(Ce[_e.elementsKey],_e,0,!Ae.length))),Ae.join("")},js2xml$1=js2xml$2,json2xml$1=function(Ce,_e){Ce instanceof Buffer&&(Ce=Ce.toString());var Ae=null;if(typeof Ce=="string")try{Ae=JSON.parse(Ce)}catch{throw new Error("The JSON structure is invalid")}else Ae=Ce;return js2xml$1(Ae,_e)},xml2js=xml2js$2,xml2json=xml2json$1,js2xml=js2xml$2,json2xml=json2xml$1,lib$2={xml2js,xml2json,js2xml,json2xml};const store$5={_origin:"https://api.emailjs.com"},init$5=(Ce,_e="https://api.emailjs.com")=>{store$5._userID=Ce,store$5._origin=_e},validateParams=(Ce,_e,Ae)=>{if(!Ce)throw"The user ID is required. Visit https://dashboard.emailjs.com/admin/integration";if(!_e)throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!Ae)throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates";return!0};class EmailJSResponseStatus{constructor(_e){this.status=_e.status,this.text=_e.responseText}}const sendPost=(Ce,_e,Ae={})=>new Promise((Se,Ee)=>{const xe=new XMLHttpRequest;xe.addEventListener("load",({target:Te})=>{const Ie=new EmailJSResponseStatus(Te);Ie.status===200||Ie.text==="OK"?Se(Ie):Ee(Ie)}),xe.addEventListener("error",({target:Te})=>{Ee(new EmailJSResponseStatus(Te))}),xe.open("POST",store$5._origin+Ce,!0),Object.keys(Ae).forEach(Te=>{xe.setRequestHeader(Te,Ae[Te])}),xe.send(_e)}),send=(Ce,_e,Ae,Se)=>{const Ee=Se||store$5._userID;return validateParams(Ee,Ce,_e),sendPost("/api/v1.0/email/send",JSON.stringify({lib_version:"3.2.0",user_id:Ee,service_id:Ce,template_id:_e,template_params:Ae}),{"Content-type":"application/json"})},findHTMLForm=Ce=>{let _e;if(typeof Ce=="string"?_e=document.querySelector(Ce):_e=Ce,!_e||_e.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of form";return _e},sendForm=(Ce,_e,Ae,Se)=>{const Ee=Se||store$5._userID,xe=findHTMLForm(Ae);validateParams(Ee,Ce,_e);const Te=new FormData(xe);return Te.append("lib_version","3.2.0"),Te.append("service_id",Ce),Te.append("template_id",_e),Te.append("user_id",Ee),sendPost("/api/v1.0/email/send-form",Te)},emailjs={init:init$5,send,sendForm},PACKET_TYPES=Object.create(null);PACKET_TYPES.open="0",PACKET_TYPES.close="1",PACKET_TYPES.ping="2",PACKET_TYPES.pong="3",PACKET_TYPES.message="4",PACKET_TYPES.upgrade="5",PACKET_TYPES.noop="6";const PACKET_TYPES_REVERSE=Object.create(null);Object.keys(PACKET_TYPES).forEach(Ce=>{PACKET_TYPES_REVERSE[PACKET_TYPES[Ce]]=Ce});const ERROR_PACKET={type:"error",data:"parser error"},withNativeBlob$1=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",withNativeArrayBuffer$2=typeof ArrayBuffer=="function",isView$1=Ce=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(Ce):Ce&&Ce.buffer instanceof ArrayBuffer,encodePacket=({type:Ce,data:_e},Ae,Se)=>withNativeBlob$1&&_e instanceof Blob?Ae?Se(_e):encodeBlobAsBase64(_e,Se):withNativeArrayBuffer$2&&(_e instanceof ArrayBuffer||isView$1(_e))?Ae?Se(_e):encodeBlobAsBase64(new Blob([_e]),Se):Se(PACKET_TYPES[Ce]+(_e||"")),encodeBlobAsBase64=(Ce,_e)=>{const Ae=new FileReader;return Ae.onload=function(){const Se=Ae.result.split(",")[1];_e("b"+(Se||""))},Ae.readAsDataURL(Ce)};function toArray(Ce){return Ce instanceof Uint8Array?Ce:Ce instanceof ArrayBuffer?new Uint8Array(Ce):new Uint8Array(Ce.buffer,Ce.byteOffset,Ce.byteLength)}let TEXT_ENCODER;function encodePacketToBinary(Ce,_e){if(withNativeBlob$1&&Ce.data instanceof Blob)return Ce.data.arrayBuffer().then(toArray).then(_e);if(withNativeArrayBuffer$2&&(Ce.data instanceof ArrayBuffer||isView$1(Ce.data)))return _e(toArray(Ce.data));encodePacket(Ce,!1,Ae=>{TEXT_ENCODER||(TEXT_ENCODER=new TextEncoder),_e(TEXT_ENCODER.encode(Ae))})}const chars$5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lookup$6=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let Ce=0;Ce<chars$5.length;Ce++)lookup$6[chars$5.charCodeAt(Ce)]=Ce;const decode$4=Ce=>{let _e=Ce.length*.75,Ae=Ce.length,Se,Ee=0,xe,Te,Ie,De;Ce[Ce.length-1]==="="&&(_e--,Ce[Ce.length-2]==="="&&_e--);const ke=new ArrayBuffer(_e),Oe=new Uint8Array(ke);for(Se=0;Se<Ae;Se+=4)xe=lookup$6[Ce.charCodeAt(Se)],Te=lookup$6[Ce.charCodeAt(Se+1)],Ie=lookup$6[Ce.charCodeAt(Se+2)],De=lookup$6[Ce.charCodeAt(Se+3)],Oe[Ee++]=xe<<2|Te>>4,Oe[Ee++]=(Te&15)<<4|Ie>>2,Oe[Ee++]=(Ie&3)<<6|De&63;return ke},withNativeArrayBuffer$1=typeof ArrayBuffer=="function",decodePacket=(Ce,_e)=>{if(typeof Ce!="string")return{type:"message",data:mapBinary(Ce,_e)};const Ae=Ce.charAt(0);return Ae==="b"?{type:"message",data:decodeBase64Packet(Ce.substring(1),_e)}:PACKET_TYPES_REVERSE[Ae]?Ce.length>1?{type:PACKET_TYPES_REVERSE[Ae],data:Ce.substring(1)}:{type:PACKET_TYPES_REVERSE[Ae]}:ERROR_PACKET},decodeBase64Packet=(Ce,_e)=>{if(withNativeArrayBuffer$1){const Ae=decode$4(Ce);return mapBinary(Ae,_e)}else return{base64:!0,data:Ce}},mapBinary=(Ce,_e)=>{switch(_e){case"blob":return Ce instanceof Blob?Ce:new Blob([Ce]);case"arraybuffer":default:return Ce instanceof ArrayBuffer?Ce:Ce.buffer}},SEPARATOR="",encodePayload=(Ce,_e)=>{const Ae=Ce.length,Se=new Array(Ae);let Ee=0;Ce.forEach((xe,Te)=>{encodePacket(xe,!1,Ie=>{Se[Te]=Ie,++Ee===Ae&&_e(Se.join(SEPARATOR))})})},decodePayload=(Ce,_e)=>{const Ae=Ce.split(SEPARATOR),Se=[];for(let Ee=0;Ee<Ae.length;Ee++){const xe=decodePacket(Ae[Ee],_e);if(Se.push(xe),xe.type==="error")break}return Se};function createPacketEncoderStream(){return new TransformStream({transform(Ce,_e){encodePacketToBinary(Ce,Ae=>{const Se=Ae.length;let Ee;if(Se<126)Ee=new Uint8Array(1),new DataView(Ee.buffer).setUint8(0,Se);else if(Se<65536){Ee=new Uint8Array(3);const xe=new DataView(Ee.buffer);xe.setUint8(0,126),xe.setUint16(1,Se)}else{Ee=new Uint8Array(9);const xe=new DataView(Ee.buffer);xe.setUint8(0,127),xe.setBigUint64(1,BigInt(Se))}Ce.data&&typeof Ce.data!="string"&&(Ee[0]|=128),_e.enqueue(Ee),_e.enqueue(Ae)})}})}let TEXT_DECODER;function totalLength(Ce){return Ce.reduce((_e,Ae)=>_e+Ae.length,0)}function concatChunks(Ce,_e){if(Ce[0].length===_e)return Ce.shift();const Ae=new Uint8Array(_e);let Se=0;for(let Ee=0;Ee<_e;Ee++)Ae[Ee]=Ce[0][Se++],Se===Ce[0].length&&(Ce.shift(),Se=0);return Ce.length&&Se<Ce[0].length&&(Ce[0]=Ce[0].slice(Se)),Ae}function createPacketDecoderStream(Ce,_e){TEXT_DECODER||(TEXT_DECODER=new TextDecoder);const Ae=[];let Se=0,Ee=-1,xe=!1;return new TransformStream({transform(Te,Ie){for(Ae.push(Te);;){if(Se===0){if(totalLength(Ae)<1)break;const De=concatChunks(Ae,1);xe=(De[0]&128)===128,Ee=De[0]&127,Ee<126?Se=3:Ee===126?Se=1:Se=2}else if(Se===1){if(totalLength(Ae)<2)break;const De=concatChunks(Ae,2);Ee=new DataView(De.buffer,De.byteOffset,De.length).getUint16(0),Se=3}else if(Se===2){if(totalLength(Ae)<8)break;const De=concatChunks(Ae,8),ke=new DataView(De.buffer,De.byteOffset,De.length),Oe=ke.getUint32(0);if(Oe>Math.pow(2,21)-1){Ie.enqueue(ERROR_PACKET);break}Ee=Oe*Math.pow(2,32)+ke.getUint32(4),Se=3}else{if(totalLength(Ae)<Ee)break;const De=concatChunks(Ae,Ee);Ie.enqueue(decodePacket(xe?De:TEXT_DECODER.decode(De),_e)),Se=0}if(Ee===0||Ee>Ce){Ie.enqueue(ERROR_PACKET);break}}}})}const protocol$1=4;function Emitter$3(Ce){if(Ce)return mixin$2(Ce)}function mixin$2(Ce){for(var _e in Emitter$3.prototype)Ce[_e]=Emitter$3.prototype[_e];return Ce}Emitter$3.prototype.on=Emitter$3.prototype.addEventListener=function(Ce,_e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+Ce]=this._callbacks["$"+Ce]||[]).push(_e),this},Emitter$3.prototype.once=function(Ce,_e){function Ae(){this.off(Ce,Ae),_e.apply(this,arguments)}return Ae.fn=_e,this.on(Ce,Ae),this},Emitter$3.prototype.off=Emitter$3.prototype.removeListener=Emitter$3.prototype.removeAllListeners=Emitter$3.prototype.removeEventListener=function(Ce,_e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var Ae=this._callbacks["$"+Ce];if(!Ae)return this;if(arguments.length==1)return delete this._callbacks["$"+Ce],this;for(var Se,Ee=0;Ee<Ae.length;Ee++)if(Se=Ae[Ee],Se===_e||Se.fn===_e){Ae.splice(Ee,1);break}return Ae.length===0&&delete this._callbacks["$"+Ce],this},Emitter$3.prototype.emit=function(Ce){this._callbacks=this._callbacks||{};for(var _e=new Array(arguments.length-1),Ae=this._callbacks["$"+Ce],Se=1;Se<arguments.length;Se++)_e[Se-1]=arguments[Se];if(Ae){Ae=Ae.slice(0);for(var Se=0,Ee=Ae.length;Se<Ee;++Se)Ae[Se].apply(this,_e)}return this},Emitter$3.prototype.emitReserved=Emitter$3.prototype.emit,Emitter$3.prototype.listeners=function(Ce){return this._callbacks=this._callbacks||{},this._callbacks["$"+Ce]||[]},Emitter$3.prototype.hasListeners=function(Ce){return!!this.listeners(Ce).length};const nextTick=typeof Promise=="function"&&typeof Promise.resolve=="function"?_e=>Promise.resolve().then(_e):(_e,Ae)=>Ae(_e,0),globalThisShim=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),defaultBinaryType="arraybuffer";function createCookieJar(){}function pick$1(Ce,..._e){return _e.reduce((Ae,Se)=>(Ce.hasOwnProperty(Se)&&(Ae[Se]=Ce[Se]),Ae),{})}const NATIVE_SET_TIMEOUT=globalThisShim.setTimeout,NATIVE_CLEAR_TIMEOUT=globalThisShim.clearTimeout;function installTimerFunctions(Ce,_e){_e.useNativeTimers?(Ce.setTimeoutFn=NATIVE_SET_TIMEOUT.bind(globalThisShim),Ce.clearTimeoutFn=NATIVE_CLEAR_TIMEOUT.bind(globalThisShim)):(Ce.setTimeoutFn=globalThisShim.setTimeout.bind(globalThisShim),Ce.clearTimeoutFn=globalThisShim.clearTimeout.bind(globalThisShim))}const BASE64_OVERHEAD=1.33;function byteLength(Ce){return typeof Ce=="string"?utf8Length(Ce):Math.ceil((Ce.byteLength||Ce.size)*BASE64_OVERHEAD)}function utf8Length(Ce){let _e=0,Ae=0;for(let Se=0,Ee=Ce.length;Se<Ee;Se++)_e=Ce.charCodeAt(Se),_e<128?Ae+=1:_e<2048?Ae+=2:_e<55296||_e>=57344?Ae+=3:(Se++,Ae+=4);return Ae}function randomString(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function encode$1(Ce){let _e="";for(let Ae in Ce)Ce.hasOwnProperty(Ae)&&(_e.length&&(_e+="&"),_e+=encodeURIComponent(Ae)+"="+encodeURIComponent(Ce[Ae]));return _e}function decode$3(Ce){let _e={},Ae=Ce.split("&");for(let Se=0,Ee=Ae.length;Se<Ee;Se++){let xe=Ae[Se].split("=");_e[decodeURIComponent(xe[0])]=decodeURIComponent(xe[1])}return _e}class TransportError extends Error{constructor(_e,Ae,Se){super(_e),this.description=Ae,this.context=Se,this.type="TransportError"}}class Transport extends Emitter$3{constructor(_e){super(),this.writable=!1,installTimerFunctions(this,_e),this.opts=_e,this.query=_e.query,this.socket=_e.socket,this.supportsBinary=!_e.forceBase64}onError(_e,Ae,Se){return super.emitReserved("error",new TransportError(_e,Ae,Se)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(_e){this.readyState==="open"&&this.write(_e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(_e){const Ae=decodePacket(_e,this.socket.binaryType);this.onPacket(Ae)}onPacket(_e){super.emitReserved("packet",_e)}onClose(_e){this.readyState="closed",super.emitReserved("close",_e)}pause(_e){}createUri(_e,Ae={}){return _e+"://"+this._hostname()+this._port()+this.opts.path+this._query(Ae)}_hostname(){const _e=this.opts.hostname;return _e.indexOf(":")===-1?_e:"["+_e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(_e){const Ae=encode$1(_e);return Ae.length?"?"+Ae:""}}class Polling extends Transport{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(_e){this.readyState="pausing";const Ae=()=>{this.readyState="paused",_e()};if(this._polling||!this.writable){let Se=0;this._polling&&(Se++,this.once("pollComplete",function(){--Se||Ae()})),this.writable||(Se++,this.once("drain",function(){--Se||Ae()}))}else Ae()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(_e){const Ae=Se=>{if(this.readyState==="opening"&&Se.type==="open"&&this.onOpen(),Se.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(Se)};decodePayload(_e,this.socket.binaryType).forEach(Ae),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const _e=()=>{this.write([{type:"close"}])};this.readyState==="open"?_e():this.once("open",_e)}write(_e){this.writable=!1,encodePayload(_e,Ae=>{this.doWrite(Ae,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const _e=this.opts.secure?"https":"http",Ae=this.query||{};return this.opts.timestampRequests!==!1&&(Ae[this.opts.timestampParam]=randomString()),!this.supportsBinary&&!Ae.sid&&(Ae.b64=1),this.createUri(_e,Ae)}}let value=!1;try{value=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch(Ce){}const hasCORS=value;function empty$4(){}class BaseXHR extends Polling{constructor(_e){if(super(_e),typeof location<"u"){const Ae=location.protocol==="https:";let Se=location.port;Se||(Se=Ae?"443":"80"),this.xd=typeof location<"u"&&_e.hostname!==location.hostname||Se!==_e.port}}doWrite(_e,Ae){const Se=this.request({method:"POST",data:_e});Se.on("success",Ae),Se.on("error",(Ee,xe)=>{this.onError("xhr post error",Ee,xe)})}doPoll(){const _e=this.request();_e.on("data",this.onData.bind(this)),_e.on("error",(Ae,Se)=>{this.onError("xhr poll error",Ae,Se)}),this.pollXhr=_e}}class Request extends Emitter$3{constructor(_e,Ae,Se){super(),this.createRequest=_e,installTimerFunctions(this,Se),this._opts=Se,this._method=Se.method||"GET",this._uri=Ae,this._data=Se.data!==void 0?Se.data:null,this._create()}_create(){var _e;const Ae=pick$1(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");Ae.xdomain=!!this._opts.xd;const Se=this._xhr=this.createRequest(Ae);try{Se.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){Se.setDisableHeaderCheck&&Se.setDisableHeaderCheck(!0);for(let Ee in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(Ee)&&Se.setRequestHeader(Ee,this._opts.extraHeaders[Ee])}}catch{}if(this._method==="POST")try{Se.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{Se.setRequestHeader("Accept","*/*")}catch{}(_e=this._opts.cookieJar)===null||_e===void 0||_e.addCookies(Se),"withCredentials"in Se&&(Se.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(Se.timeout=this._opts.requestTimeout),Se.onreadystatechange=()=>{var Ee;Se.readyState===3&&((Ee=this._opts.cookieJar)===null||Ee===void 0||Ee.parseCookies(Se.getResponseHeader("set-cookie"))),Se.readyState===4&&(Se.status===200||Se.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof Se.status=="number"?Se.status:0)},0))},Se.send(this._data)}catch(Ee){this.setTimeoutFn(()=>{this._onError(Ee)},0);return}typeof document<"u"&&(this._index=Request.requestsCount++,Request.requests[this._index]=this)}_onError(_e){this.emitReserved("error",_e,this._xhr),this._cleanup(!0)}_cleanup(_e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=empty$4,_e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Request.requests[this._index],this._xhr=null}}_onLoad(){const _e=this._xhr.responseText;_e!==null&&(this.emitReserved("data",_e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(Request.requestsCount=0,Request.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",unloadHandler);else if(typeof addEventListener=="function"){const Ce="onpagehide"in globalThisShim?"pagehide":"unload";addEventListener(Ce,unloadHandler,!1)}}function unloadHandler(){for(let Ce in Request.requests)Request.requests.hasOwnProperty(Ce)&&Request.requests[Ce].abort()}const hasXHR2=function(){const Ce=newRequest({xdomain:!1});return Ce&&Ce.responseType!==null}();class XHR extends BaseXHR{constructor(_e){super(_e);const Ae=_e&&_e.forceBase64;this.supportsBinary=hasXHR2&&!Ae}request(_e={}){return Object.assign(_e,{xd:this.xd},this.opts),new Request(newRequest,this.uri(),_e)}}function newRequest(Ce){const _e=Ce.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!_e||hasCORS))return new XMLHttpRequest}catch{}if(!_e)try{return new globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class BaseWS extends Transport{get name(){return"websocket"}doOpen(){const _e=this.uri(),Ae=this.opts.protocols,Se=isReactNative?{}:pick$1(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(Se.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(_e,Ae,Se)}catch(Ee){return this.emitReserved("error",Ee)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=_e=>this.onClose({description:"websocket connection closed",context:_e}),this.ws.onmessage=_e=>this.onData(_e.data),this.ws.onerror=_e=>this.onError("websocket error",_e)}write(_e){this.writable=!1;for(let Ae=0;Ae<_e.length;Ae++){const Se=_e[Ae],Ee=Ae===_e.length-1;encodePacket(Se,this.supportsBinary,xe=>{try{this.doWrite(Se,xe)}catch{}Ee&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const _e=this.opts.secure?"wss":"ws",Ae=this.query||{};return this.opts.timestampRequests&&(Ae[this.opts.timestampParam]=randomString()),this.supportsBinary||(Ae.b64=1),this.createUri(_e,Ae)}}const WebSocketCtor=globalThisShim.WebSocket||globalThisShim.MozWebSocket;let WS$1=class extends BaseWS{createSocket(_e,Ae,Se){return isReactNative?new WebSocketCtor(_e,Ae,Se):Ae?new WebSocketCtor(_e,Ae):new WebSocketCtor(_e)}doWrite(_e,Ae){this.ws.send(Ae)}};class WT extends Transport{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(_e){return this.emitReserved("error",_e)}this._transport.closed.then(()=>{this.onClose()}).catch(_e=>{this.onError("webtransport error",_e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(_e=>{const Ae=createPacketDecoderStream(Number.MAX_SAFE_INTEGER,this.socket.binaryType),Se=_e.readable.pipeThrough(Ae).getReader(),Ee=createPacketEncoderStream();Ee.readable.pipeTo(_e.writable),this._writer=Ee.writable.getWriter();const xe=()=>{Se.read().then(({done:Ie,value:De})=>{Ie||(this.onPacket(De),xe())}).catch(Ie=>{})};xe();const Te={type:"open"};this.query.sid&&(Te.data=`{"sid":"${this.query.sid}"}`),this._writer.write(Te).then(()=>this.onOpen())})})}write(_e){this.writable=!1;for(let Ae=0;Ae<_e.length;Ae++){const Se=_e[Ae],Ee=Ae===_e.length-1;this._writer.write(Se).then(()=>{Ee&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var _e;(_e=this._transport)===null||_e===void 0||_e.close()}}const transports={websocket:WS$1,webtransport:WT,polling:XHR},re$1=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,parts=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function parse$b(Ce){if(Ce.length>8e3)throw"URI too long";const _e=Ce,Ae=Ce.indexOf("["),Se=Ce.indexOf("]");Ae!=-1&&Se!=-1&&(Ce=Ce.substring(0,Ae)+Ce.substring(Ae,Se).replace(/:/g,";")+Ce.substring(Se,Ce.length));let Ee=re$1.exec(Ce||""),xe={},Te=14;for(;Te--;)xe[parts[Te]]=Ee[Te]||"";return Ae!=-1&&Se!=-1&&(xe.source=_e,xe.host=xe.host.substring(1,xe.host.length-1).replace(/;/g,":"),xe.authority=xe.authority.replace("[","").replace("]","").replace(/;/g,":"),xe.ipv6uri=!0),xe.pathNames=pathNames(xe,xe.path),xe.queryKey=queryKey(xe,xe.query),xe}function pathNames(Ce,_e){const Ae=/\/{2,9}/g,Se=_e.replace(Ae,"/").split("/");return(_e.slice(0,1)=="/"||_e.length===0)&&Se.splice(0,1),_e.slice(-1)=="/"&&Se.splice(Se.length-1,1),Se}function queryKey(Ce,_e){const Ae={};return _e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(Se,Ee,xe){Ee&&(Ae[Ee]=xe)}),Ae}const withEventListeners=typeof addEventListener=="function"&&typeof removeEventListener=="function",OFFLINE_EVENT_LISTENERS=[];withEventListeners&&addEventListener("offline",()=>{OFFLINE_EVENT_LISTENERS.forEach(Ce=>Ce())},!1);class SocketWithoutUpgrade extends Emitter$3{constructor(_e,Ae){if(super(),this.binaryType=defaultBinaryType,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,_e&&typeof _e=="object"&&(Ae=_e,_e=null),_e){const Se=parse$b(_e);Ae.hostname=Se.host,Ae.secure=Se.protocol==="https"||Se.protocol==="wss",Ae.port=Se.port,Se.query&&(Ae.query=Se.query)}else Ae.host&&(Ae.hostname=parse$b(Ae.host).host);installTimerFunctions(this,Ae),this.secure=Ae.secure!=null?Ae.secure:typeof location<"u"&&location.protocol==="https:",Ae.hostname&&!Ae.port&&(Ae.port=this.secure?"443":"80"),this.hostname=Ae.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=Ae.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},Ae.transports.forEach(Se=>{const Ee=Se.prototype.name;this.transports.push(Ee),this._transportsByName[Ee]=Se}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},Ae),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=decode$3(this.opts.query)),withEventListeners&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},OFFLINE_EVENT_LISTENERS.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(_e){const Ae=Object.assign({},this.opts.query);Ae.EIO=protocol$1,Ae.transport=_e,this.id&&(Ae.sid=this.id);const Se=Object.assign({},this.opts,{query:Ae,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[_e]);return new this._transportsByName[_e](Se)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const _e=this.opts.rememberUpgrade&&SocketWithoutUpgrade.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const Ae=this.createTransport(_e);Ae.open(),this.setTransport(Ae)}setTransport(_e){this.transport&&this.transport.removeAllListeners(),this.transport=_e,_e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",Ae=>this._onClose("transport close",Ae))}onOpen(){this.readyState="open",SocketWithoutUpgrade.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(_e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",_e),this.emitReserved("heartbeat"),_e.type){case"open":this.onHandshake(JSON.parse(_e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const Ae=new Error("server error");Ae.code=_e.data,this._onError(Ae);break;case"message":this.emitReserved("data",_e.data),this.emitReserved("message",_e.data);break}}onHandshake(_e){this.emitReserved("handshake",_e),this.id=_e.sid,this.transport.query.sid=_e.sid,this._pingInterval=_e.pingInterval,this._pingTimeout=_e.pingTimeout,this._maxPayload=_e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const _e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+_e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},_e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const _e=this._getWritablePackets();this.transport.send(_e),this._prevBufferLen=_e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let Ae=1;for(let Se=0;Se<this.writeBuffer.length;Se++){const Ee=this.writeBuffer[Se].data;if(Ee&&(Ae+=byteLength(Ee)),Se>0&&Ae>this._maxPayload)return this.writeBuffer.slice(0,Se);Ae+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const _e=Date.now()>this._pingTimeoutTime;return _e&&(this._pingTimeoutTime=0,nextTick(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),_e}write(_e,Ae,Se){return this._sendPacket("message",_e,Ae,Se),this}send(_e,Ae,Se){return this._sendPacket("message",_e,Ae,Se),this}_sendPacket(_e,Ae,Se,Ee){if(typeof Ae=="function"&&(Ee=Ae,Ae=void 0),typeof Se=="function"&&(Ee=Se,Se=null),this.readyState==="closing"||this.readyState==="closed")return;Se=Se||{},Se.compress=Se.compress!==!1;const xe={type:_e,data:Ae,options:Se};this.emitReserved("packetCreate",xe),this.writeBuffer.push(xe),Ee&&this.once("flush",Ee),this.flush()}close(){const _e=()=>{this._onClose("forced close"),this.transport.close()},Ae=()=>{this.off("upgrade",Ae),this.off("upgradeError",Ae),_e()},Se=()=>{this.once("upgrade",Ae),this.once("upgradeError",Ae)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?Se():_e()}):this.upgrading?Se():_e()),this}_onError(_e){if(SocketWithoutUpgrade.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",_e),this._onClose("transport error",_e)}_onClose(_e,Ae){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),withEventListeners&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const Se=OFFLINE_EVENT_LISTENERS.indexOf(this._offlineEventListener);Se!==-1&&OFFLINE_EVENT_LISTENERS.splice(Se,1)}this.readyState="closed",this.id=null,this.emitReserved("close",_e,Ae),this.writeBuffer=[],this._prevBufferLen=0}}}SocketWithoutUpgrade.protocol=protocol$1;class SocketWithUpgrade extends SocketWithoutUpgrade{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let _e=0;_e<this._upgrades.length;_e++)this._probe(this._upgrades[_e])}_probe(_e){let Ae=this.createTransport(_e),Se=!1;SocketWithoutUpgrade.priorWebsocketSuccess=!1;const Ee=()=>{Se||(Ae.send([{type:"ping",data:"probe"}]),Ae.once("packet",Me=>{if(!Se)if(Me.type==="pong"&&Me.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",Ae),!Ae)return;SocketWithoutUpgrade.priorWebsocketSuccess=Ae.name==="websocket",this.transport.pause(()=>{Se||this.readyState!=="closed"&&(Oe(),this.setTransport(Ae),Ae.send([{type:"upgrade"}]),this.emitReserved("upgrade",Ae),Ae=null,this.upgrading=!1,this.flush())})}else{const Pe=new Error("probe error");Pe.transport=Ae.name,this.emitReserved("upgradeError",Pe)}}))};function xe(){Se||(Se=!0,Oe(),Ae.close(),Ae=null)}const Te=Me=>{const Pe=new Error("probe error: "+Me);Pe.transport=Ae.name,xe(),this.emitReserved("upgradeError",Pe)};function Ie(){Te("transport closed")}function De(){Te("socket closed")}function ke(Me){Ae&&Me.name!==Ae.name&&xe()}const Oe=()=>{Ae.removeListener("open",Ee),Ae.removeListener("error",Te),Ae.removeListener("close",Ie),this.off("close",De),this.off("upgrading",ke)};Ae.once("open",Ee),Ae.once("error",Te),Ae.once("close",Ie),this.once("close",De),this.once("upgrading",ke),this._upgrades.indexOf("webtransport")!==-1&&_e!=="webtransport"?this.setTimeoutFn(()=>{Se||Ae.open()},200):Ae.open()}onHandshake(_e){this._upgrades=this._filterUpgrades(_e.upgrades),super.onHandshake(_e)}_filterUpgrades(_e){const Ae=[];for(let Se=0;Se<_e.length;Se++)~this.transports.indexOf(_e[Se])&&Ae.push(_e[Se]);return Ae}}let Socket$1=class extends SocketWithUpgrade{constructor(_e,Ae={}){const Se=typeof _e=="object"?_e:Ae;(!Se.transports||Se.transports&&typeof Se.transports[0]=="string")&&(Se.transports=(Se.transports||["polling","websocket","webtransport"]).map(Ee=>transports[Ee]).filter(Ee=>!!Ee)),super(_e,Se)}};function url(Ce,_e="",Ae){let Se=Ce;Ae=Ae||typeof location<"u"&&location,Ce==null&&(Ce=Ae.protocol+"//"+Ae.host),typeof Ce=="string"&&(Ce.charAt(0)==="/"&&(Ce.charAt(1)==="/"?Ce=Ae.protocol+Ce:Ce=Ae.host+Ce),/^(https?|wss?):\/\//.test(Ce)||(typeof Ae<"u"?Ce=Ae.protocol+"//"+Ce:Ce="https://"+Ce),Se=parse$b(Ce)),Se.port||(/^(http|ws)$/.test(Se.protocol)?Se.port="80":/^(http|ws)s$/.test(Se.protocol)&&(Se.port="443")),Se.path=Se.path||"/";const xe=Se.host.indexOf(":")!==-1?"["+Se.host+"]":Se.host;return Se.id=Se.protocol+"://"+xe+":"+Se.port+_e,Se.href=Se.protocol+"://"+xe+(Ae&&Ae.port===Se.port?"":":"+Se.port),Se}const withNativeArrayBuffer=typeof ArrayBuffer=="function",isView=Ce=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(Ce):Ce.buffer instanceof ArrayBuffer,toString$g=Object.prototype.toString,withNativeBlob=typeof Blob=="function"||typeof Blob<"u"&&toString$g.call(Blob)==="[object BlobConstructor]",withNativeFile=typeof File=="function"||typeof File<"u"&&toString$g.call(File)==="[object FileConstructor]";function isBinary(Ce){return withNativeArrayBuffer&&(Ce instanceof ArrayBuffer||isView(Ce))||withNativeBlob&&Ce instanceof Blob||withNativeFile&&Ce instanceof File}function hasBinary(Ce,_e){if(!Ce||typeof Ce!="object")return!1;if(Array.isArray(Ce)){for(let Ae=0,Se=Ce.length;Ae<Se;Ae++)if(hasBinary(Ce[Ae]))return!0;return!1}if(isBinary(Ce))return!0;if(Ce.toJSON&&typeof Ce.toJSON=="function"&&arguments.length===1)return hasBinary(Ce.toJSON(),!0);for(const Ae in Ce)if(Object.prototype.hasOwnProperty.call(Ce,Ae)&&hasBinary(Ce[Ae]))return!0;return!1}function deconstructPacket(Ce){const _e=[],Ae=Ce.data,Se=Ce;return Se.data=_deconstructPacket(Ae,_e),Se.attachments=_e.length,{packet:Se,buffers:_e}}function _deconstructPacket(Ce,_e){if(!Ce)return Ce;if(isBinary(Ce)){const Ae={_placeholder:!0,num:_e.length};return _e.push(Ce),Ae}else if(Array.isArray(Ce)){const Ae=new Array(Ce.length);for(let Se=0;Se<Ce.length;Se++)Ae[Se]=_deconstructPacket(Ce[Se],_e);return Ae}else if(typeof Ce=="object"&&!(Ce instanceof Date)){const Ae={};for(const Se in Ce)Object.prototype.hasOwnProperty.call(Ce,Se)&&(Ae[Se]=_deconstructPacket(Ce[Se],_e));return Ae}return Ce}function reconstructPacket(Ce,_e){return Ce.data=_reconstructPacket(Ce.data,_e),delete Ce.attachments,Ce}function _reconstructPacket(Ce,_e){if(!Ce)return Ce;if(Ce&&Ce._placeholder===!0){if(typeof Ce.num=="number"&&Ce.num>=0&&Ce.num<_e.length)return _e[Ce.num];throw new Error("illegal attachments")}else if(Array.isArray(Ce))for(let Ae=0;Ae<Ce.length;Ae++)Ce[Ae]=_reconstructPacket(Ce[Ae],_e);else if(typeof Ce=="object")for(const Ae in Ce)Object.prototype.hasOwnProperty.call(Ce,Ae)&&(Ce[Ae]=_reconstructPacket(Ce[Ae],_e));return Ce}const RESERVED_EVENTS$1=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],protocol=5;var PacketType;(function(Ce){Ce[Ce.CONNECT=0]="CONNECT",Ce[Ce.DISCONNECT=1]="DISCONNECT",Ce[Ce.EVENT=2]="EVENT",Ce[Ce.ACK=3]="ACK",Ce[Ce.CONNECT_ERROR=4]="CONNECT_ERROR",Ce[Ce.BINARY_EVENT=5]="BINARY_EVENT",Ce[Ce.BINARY_ACK=6]="BINARY_ACK"})(PacketType||(PacketType={}));class Encoder{constructor(_e){this.replacer=_e}encode(_e){return(_e.type===PacketType.EVENT||_e.type===PacketType.ACK)&&hasBinary(_e)?this.encodeAsBinary({type:_e.type===PacketType.EVENT?PacketType.BINARY_EVENT:PacketType.BINARY_ACK,nsp:_e.nsp,data:_e.data,id:_e.id}):[this.encodeAsString(_e)]}encodeAsString(_e){let Ae=""+_e.type;return(_e.type===PacketType.BINARY_EVENT||_e.type===PacketType.BINARY_ACK)&&(Ae+=_e.attachments+"-"),_e.nsp&&_e.nsp!=="/"&&(Ae+=_e.nsp+","),_e.id!=null&&(Ae+=_e.id),_e.data!=null&&(Ae+=JSON.stringify(_e.data,this.replacer)),Ae}encodeAsBinary(_e){const Ae=deconstructPacket(_e),Se=this.encodeAsString(Ae.packet),Ee=Ae.buffers;return Ee.unshift(Se),Ee}}function isObject$l(Ce){return Object.prototype.toString.call(Ce)==="[object Object]"}class Decoder extends Emitter$3{constructor(_e){super(),this.reviver=_e}add(_e){let Ae;if(typeof _e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");Ae=this.decodeString(_e);const Se=Ae.type===PacketType.BINARY_EVENT;Se||Ae.type===PacketType.BINARY_ACK?(Ae.type=Se?PacketType.EVENT:PacketType.ACK,this.reconstructor=new BinaryReconstructor(Ae),Ae.attachments===0&&super.emitReserved("decoded",Ae)):super.emitReserved("decoded",Ae)}else if(isBinary(_e)||_e.base64)if(this.reconstructor)Ae=this.reconstructor.takeBinaryData(_e),Ae&&(this.reconstructor=null,super.emitReserved("decoded",Ae));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+_e)}decodeString(_e){let Ae=0;const Se={type:Number(_e.charAt(0))};if(PacketType[Se.type]===void 0)throw new Error("unknown packet type "+Se.type);if(Se.type===PacketType.BINARY_EVENT||Se.type===PacketType.BINARY_ACK){const xe=Ae+1;for(;_e.charAt(++Ae)!=="-"&&Ae!=_e.length;);const Te=_e.substring(xe,Ae);if(Te!=Number(Te)||_e.charAt(Ae)!=="-")throw new Error("Illegal attachments");Se.attachments=Number(Te)}if(_e.charAt(Ae+1)==="/"){const xe=Ae+1;for(;++Ae&&!(_e.charAt(Ae)===","||Ae===_e.length););Se.nsp=_e.substring(xe,Ae)}else Se.nsp="/";const Ee=_e.charAt(Ae+1);if(Ee!==""&&Number(Ee)==Ee){const xe=Ae+1;for(;++Ae;){const Te=_e.charAt(Ae);if(Te==null||Number(Te)!=Te){--Ae;break}if(Ae===_e.length)break}Se.id=Number(_e.substring(xe,Ae+1))}if(_e.charAt(++Ae)){const xe=this.tryParse(_e.substr(Ae));if(Decoder.isPayloadValid(Se.type,xe))Se.data=xe;else throw new Error("invalid payload")}return Se}tryParse(_e){try{return JSON.parse(_e,this.reviver)}catch{return!1}}static isPayloadValid(_e,Ae){switch(_e){case PacketType.CONNECT:return isObject$l(Ae);case PacketType.DISCONNECT:return Ae===void 0;case PacketType.CONNECT_ERROR:return typeof Ae=="string"||isObject$l(Ae);case PacketType.EVENT:case PacketType.BINARY_EVENT:return Array.isArray(Ae)&&(typeof Ae[0]=="number"||typeof Ae[0]=="string"&&RESERVED_EVENTS$1.indexOf(Ae[0])===-1);case PacketType.ACK:case PacketType.BINARY_ACK:return Array.isArray(Ae)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class BinaryReconstructor{constructor(_e){this.packet=_e,this.buffers=[],this.reconPack=_e}takeBinaryData(_e){if(this.buffers.push(_e),this.buffers.length===this.reconPack.attachments){const Ae=reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),Ae}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const parser$1=Object.freeze(Object.defineProperty({__proto__:null,Decoder,Encoder,get PacketType(){return PacketType},protocol},Symbol.toStringTag,{value:"Module"}));function on(Ce,_e,Ae){return Ce.on(_e,Ae),function(){Ce.off(_e,Ae)}}const RESERVED_EVENTS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Socket extends Emitter$3{constructor(_e,Ae,Se){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=_e,this.nsp=Ae,Se&&Se.auth&&(this.auth=Se.auth),this._opts=Object.assign({},Se),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const _e=this.io;this.subs=[on(_e,"open",this.onopen.bind(this)),on(_e,"packet",this.onpacket.bind(this)),on(_e,"error",this.onerror.bind(this)),on(_e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(..._e){return _e.unshift("message"),this.emit.apply(this,_e),this}emit(_e,...Ae){var Se,Ee,xe;if(RESERVED_EVENTS.hasOwnProperty(_e))throw new Error('"'+_e.toString()+'" is a reserved event name');if(Ae.unshift(_e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(Ae),this;const Te={type:PacketType.EVENT,data:Ae};if(Te.options={},Te.options.compress=this.flags.compress!==!1,typeof Ae[Ae.length-1]=="function"){const Oe=this.ids++,Me=Ae.pop();this._registerAckCallback(Oe,Me),Te.id=Oe}const Ie=(Ee=(Se=this.io.engine)===null||Se===void 0?void 0:Se.transport)===null||Ee===void 0?void 0:Ee.writable,De=this.connected&&!(!((xe=this.io.engine)===null||xe===void 0)&&xe._hasPingExpired());return this.flags.volatile&&!Ie||(De?(this.notifyOutgoingListeners(Te),this.packet(Te)):this.sendBuffer.push(Te)),this.flags={},this}_registerAckCallback(_e,Ae){var Se;const Ee=(Se=this.flags.timeout)!==null&&Se!==void 0?Se:this._opts.ackTimeout;if(Ee===void 0){this.acks[_e]=Ae;return}const xe=this.io.setTimeoutFn(()=>{delete this.acks[_e];for(let Ie=0;Ie<this.sendBuffer.length;Ie++)this.sendBuffer[Ie].id===_e&&this.sendBuffer.splice(Ie,1);Ae.call(this,new Error("operation has timed out"))},Ee),Te=(...Ie)=>{this.io.clearTimeoutFn(xe),Ae.apply(this,Ie)};Te.withError=!0,this.acks[_e]=Te}emitWithAck(_e,...Ae){return new Promise((Se,Ee)=>{const xe=(Te,Ie)=>Te?Ee(Te):Se(Ie);xe.withError=!0,Ae.push(xe),this.emit(_e,...Ae)})}_addToQueue(_e){let Ae;typeof _e[_e.length-1]=="function"&&(Ae=_e.pop());const Se={id:this._queueSeq++,tryCount:0,pending:!1,args:_e,flags:Object.assign({fromQueue:!0},this.flags)};_e.push((Ee,...xe)=>Se!==this._queue[0]?void 0:(Ee!==null?Se.tryCount>this._opts.retries&&(this._queue.shift(),Ae&&Ae(Ee)):(this._queue.shift(),Ae&&Ae(null,...xe)),Se.pending=!1,this._drainQueue())),this._queue.push(Se),this._drainQueue()}_drainQueue(_e=!1){if(!this.connected||this._queue.length===0)return;const Ae=this._queue[0];Ae.pending&&!_e||(Ae.pending=!0,Ae.tryCount++,this.flags=Ae.flags,this.emit.apply(this,Ae.args))}packet(_e){_e.nsp=this.nsp,this.io._packet(_e)}onopen(){typeof this.auth=="function"?this.auth(_e=>{this._sendConnectPacket(_e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(_e){this.packet({type:PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},_e):_e})}onerror(_e){this.connected||this.emitReserved("connect_error",_e)}onclose(_e,Ae){this.connected=!1,delete this.id,this.emitReserved("disconnect",_e,Ae),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(_e=>{if(!this.sendBuffer.some(Se=>String(Se.id)===_e)){const Se=this.acks[_e];delete this.acks[_e],Se.withError&&Se.call(this,new Error("socket has been disconnected"))}})}onpacket(_e){if(_e.nsp===this.nsp)switch(_e.type){case PacketType.CONNECT:_e.data&&_e.data.sid?this.onconnect(_e.data.sid,_e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case PacketType.EVENT:case PacketType.BINARY_EVENT:this.onevent(_e);break;case PacketType.ACK:case PacketType.BINARY_ACK:this.onack(_e);break;case PacketType.DISCONNECT:this.ondisconnect();break;case PacketType.CONNECT_ERROR:this.destroy();const Se=new Error(_e.data.message);Se.data=_e.data.data,this.emitReserved("connect_error",Se);break}}onevent(_e){const Ae=_e.data||[];_e.id!=null&&Ae.push(this.ack(_e.id)),this.connected?this.emitEvent(Ae):this.receiveBuffer.push(Object.freeze(Ae))}emitEvent(_e){if(this._anyListeners&&this._anyListeners.length){const Ae=this._anyListeners.slice();for(const Se of Ae)Se.apply(this,_e)}super.emit.apply(this,_e),this._pid&&_e.length&&typeof _e[_e.length-1]=="string"&&(this._lastOffset=_e[_e.length-1])}ack(_e){const Ae=this;let Se=!1;return function(...Ee){Se||(Se=!0,Ae.packet({type:PacketType.ACK,id:_e,data:Ee}))}}onack(_e){const Ae=this.acks[_e.id];typeof Ae=="function"&&(delete this.acks[_e.id],Ae.withError&&_e.data.unshift(null),Ae.apply(this,_e.data))}onconnect(_e,Ae){this.id=_e,this.recovered=Ae&&this._pid===Ae,this._pid=Ae,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(_e=>this.emitEvent(_e)),this.receiveBuffer=[],this.sendBuffer.forEach(_e=>{this.notifyOutgoingListeners(_e),this.packet(_e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(_e=>_e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:PacketType.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(_e){return this.flags.compress=_e,this}get volatile(){return this.flags.volatile=!0,this}timeout(_e){return this.flags.timeout=_e,this}onAny(_e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(_e),this}prependAny(_e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(_e),this}offAny(_e){if(!this._anyListeners)return this;if(_e){const Ae=this._anyListeners;for(let Se=0;Se<Ae.length;Se++)if(_e===Ae[Se])return Ae.splice(Se,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(_e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(_e),this}prependAnyOutgoing(_e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(_e),this}offAnyOutgoing(_e){if(!this._anyOutgoingListeners)return this;if(_e){const Ae=this._anyOutgoingListeners;for(let Se=0;Se<Ae.length;Se++)if(_e===Ae[Se])return Ae.splice(Se,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(_e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const Ae=this._anyOutgoingListeners.slice();for(const Se of Ae)Se.apply(this,_e.data)}}}function Backoff(Ce){Ce=Ce||{},this.ms=Ce.min||100,this.max=Ce.max||1e4,this.factor=Ce.factor||2,this.jitter=Ce.jitter>0&&Ce.jitter<=1?Ce.jitter:0,this.attempts=0}Backoff.prototype.duration=function(){var Ce=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var _e=Math.random(),Ae=Math.floor(_e*this.jitter*Ce);Ce=Math.floor(_e*10)&1?Ce+Ae:Ce-Ae}return Math.min(Ce,this.max)|0},Backoff.prototype.reset=function(){this.attempts=0},Backoff.prototype.setMin=function(Ce){this.ms=Ce},Backoff.prototype.setMax=function(Ce){this.max=Ce},Backoff.prototype.setJitter=function(Ce){this.jitter=Ce};class Manager extends Emitter$3{constructor(_e,Ae){var Se;super(),this.nsps={},this.subs=[],_e&&typeof _e=="object"&&(Ae=_e,_e=void 0),Ae=Ae||{},Ae.path=Ae.path||"/socket.io",this.opts=Ae,installTimerFunctions(this,Ae),this.reconnection(Ae.reconnection!==!1),this.reconnectionAttempts(Ae.reconnectionAttempts||1/0),this.reconnectionDelay(Ae.reconnectionDelay||1e3),this.reconnectionDelayMax(Ae.reconnectionDelayMax||5e3),this.randomizationFactor((Se=Ae.randomizationFactor)!==null&&Se!==void 0?Se:.5),this.backoff=new Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(Ae.timeout==null?2e4:Ae.timeout),this._readyState="closed",this.uri=_e;const Ee=Ae.parser||parser$1;this.encoder=new Ee.Encoder,this.decoder=new Ee.Decoder,this._autoConnect=Ae.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(_e){return arguments.length?(this._reconnection=!!_e,_e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(_e){return _e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=_e,this)}reconnectionDelay(_e){var Ae;return _e===void 0?this._reconnectionDelay:(this._reconnectionDelay=_e,(Ae=this.backoff)===null||Ae===void 0||Ae.setMin(_e),this)}randomizationFactor(_e){var Ae;return _e===void 0?this._randomizationFactor:(this._randomizationFactor=_e,(Ae=this.backoff)===null||Ae===void 0||Ae.setJitter(_e),this)}reconnectionDelayMax(_e){var Ae;return _e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=_e,(Ae=this.backoff)===null||Ae===void 0||Ae.setMax(_e),this)}timeout(_e){return arguments.length?(this._timeout=_e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(_e){if(~this._readyState.indexOf("open"))return this;this.engine=new Socket$1(this.uri,this.opts);const Ae=this.engine,Se=this;this._readyState="opening",this.skipReconnect=!1;const Ee=on(Ae,"open",function(){Se.onopen(),_e&&_e()}),xe=Ie=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",Ie),_e?_e(Ie):this.maybeReconnectOnOpen()},Te=on(Ae,"error",xe);if(this._timeout!==!1){const Ie=this._timeout,De=this.setTimeoutFn(()=>{Ee(),xe(new Error("timeout")),Ae.close()},Ie);this.opts.autoUnref&&De.unref(),this.subs.push(()=>{this.clearTimeoutFn(De)})}return this.subs.push(Ee),this.subs.push(Te),this}connect(_e){return this.open(_e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const _e=this.engine;this.subs.push(on(_e,"ping",this.onping.bind(this)),on(_e,"data",this.ondata.bind(this)),on(_e,"error",this.onerror.bind(this)),on(_e,"close",this.onclose.bind(this)),on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(_e){try{this.decoder.add(_e)}catch(Ae){this.onclose("parse error",Ae)}}ondecoded(_e){nextTick(()=>{this.emitReserved("packet",_e)},this.setTimeoutFn)}onerror(_e){this.emitReserved("error",_e)}socket(_e,Ae){let Se=this.nsps[_e];return Se?this._autoConnect&&!Se.active&&Se.connect():(Se=new Socket(this,_e,Ae),this.nsps[_e]=Se),Se}_destroy(_e){const Ae=Object.keys(this.nsps);for(const Se of Ae)if(this.nsps[Se].active)return;this._close()}_packet(_e){const Ae=this.encoder.encode(_e);for(let Se=0;Se<Ae.length;Se++)this.engine.write(Ae[Se],_e.options)}cleanup(){this.subs.forEach(_e=>_e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(_e,Ae){var Se;this.cleanup(),(Se=this.engine)===null||Se===void 0||Se.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",_e,Ae),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const _e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const Ae=this.backoff.duration();this._reconnecting=!0;const Se=this.setTimeoutFn(()=>{_e.skipReconnect||(this.emitReserved("reconnect_attempt",_e.backoff.attempts),!_e.skipReconnect&&_e.open(Ee=>{Ee?(_e._reconnecting=!1,_e.reconnect(),this.emitReserved("reconnect_error",Ee)):_e.onreconnect()}))},Ae);this.opts.autoUnref&&Se.unref(),this.subs.push(()=>{this.clearTimeoutFn(Se)})}}onreconnect(){const _e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",_e)}}const cache$1={};function lookup$5(Ce,_e){typeof Ce=="object"&&(_e=Ce,Ce=void 0),_e=_e||{};const Ae=url(Ce,_e.path||"/socket.io"),Se=Ae.source,Ee=Ae.id,xe=Ae.path,Te=cache$1[Ee]&&xe in cache$1[Ee].nsps,Ie=_e.forceNew||_e["force new connection"]||_e.multiplex===!1||Te;let De;return Ie?De=new Manager(Se,_e):(cache$1[Ee]||(cache$1[Ee]=new Manager(Se,_e)),De=cache$1[Ee]),Ae.query&&!_e.query&&(_e.query=Ae.queryKey),De.socket(Ae.path,_e)}Object.assign(lookup$5,{Manager,Socket,io:lookup$5,connect:lookup$5});const wu=class wu{constructor(_e){In(this,"socket",null);In(this,"subscribers",null);In(this,"url","");wu.instances||(wu.instances={});const Ae=`${_e.serverUrl}${_e.namespace||"/"}`;return wu.instances[Ae]?wu.instances[Ae]:(this.socket=lookup$5(Ae),this.subscribers=new Map,this.url=Ae,this.socket.on("connect",()=>{var Se;console.log(`Socket connected to ${Ae} `),(Se=this.socket)==null||Se.onAny((Ee,...xe)=>{console.log(`Received event: ${Ee}`,xe)})}),this.socket.on("connect_error",Se=>{console.error("Connection error:",Se)}),this.socket.on("connect_timeout",Se=>{console.error("Connection timed out:",Se)}),this.socket.on("disconnect",Se=>{console.log(`Socket disconnected from ${Ae} due to ${Se} `)}),this.socket.on("ping",()=>{var Se;(Se=this.socket)==null||Se.emit("pong")}),wu.instances[this.url]=this,this)}subscribe(_e){var xe,Te,Ie,De,ke;const{event:Ae,callback:Se,component:Ee}=_e;(xe=this.subscribers)!=null&&xe.get(Ae)||((Te=this.subscribers)==null||Te.set(Ae,new Map),(Ie=this.socket)==null||Ie.on(Ae,Oe=>{var Me,Pe;(Pe=(Me=this.subscribers)==null?void 0:Me.get(Ae))==null||Pe.forEach(Be=>Be(Oe))})),(ke=(De=this.subscribers)==null?void 0:De.get(Ae))==null||ke.set(Ee,Se)}unsubscribe({event:_e,component:Ae}){var Se,Ee,xe;(Se=this.subscribers)!=null&&Se.has(_e)&&((Ee=this.subscribers.get(_e))==null||Ee.delete(Ae),((xe=this.subscribers.get(_e))==null?void 0:xe.size)===0&&this.subscribers.delete(_e))}emit(_e,...Ae){var Se;(Se=this.socket)==null||Se.emit(_e,...Ae)}disconnect(){var _e;(_e=this.socket)==null||_e.disconnect()}};In(wu,"instances");let WebSocketManager=wu;function extractAssetDetails(Ce){const _e=/([^\/]+)_\$\$_V1_([^\/]+)(\.[a-zA-Z0-9]+)$/,Ae=Ce.match(_e);if(Ae){let Se=Ae[2].replace(/%/g,"_");const Ee=Ae[3].substring(1),xe=Se+Ae[3];return{assetName:Se,assetNameWithExt:xe,fileExtension:Ee}}else{const Se=Ce.substring(Ce.lastIndexOf("/")+1),Ee=Se.lastIndexOf(".");let xe=Se,Te="",Ie=Se;return Ee!==-1?(xe=Se.substring(0,Ee).replace(/%/g,"_"),Te=Se.substring(Ee+1),Ie=xe+"."+Te):xe=xe.replace(/%/g,"_"),{assetName:xe,assetNameWithExt:Ie,fileExtension:Te}}}const accessToken="eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3Ny1NUVdFRTNHZE5adGlsWU5IYmpsa2dVSkpaWUJWVmN1UmFZdHl5ejFjIn0.eyJleHAiOjE3MjYxODIzMzEsImlhdCI6MTcyNjE0NjMzMSwianRpIjoiOGVlZTU1MDctNGVlOC00NjE1LTg3OWUtNTVkMjViMjQ2MGFmIiwiaXNzIjoiaHR0cDovL2tleWNsb2FrLmtleWNsb2FrLnN2Yy5jbHVzdGVyLmxvY2FsOjgwODAvcmVhbG1zL21hc3RlciIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJIT0xBQ1JBQ1kiLCJzZXNzaW9uX3N0YXRlIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwibmFtZSI6ImtzYW14cCBrc2FteHAiLCJnaXZlbl9uYW1lIjoia3NhbXhwIiwiZmFtaWx5X25hbWUiOiJrc2FteHAiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWwiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiLyoiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZmF1bHQtcm9sZXMtbWFzdGVyIiwib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7IkhPTEFDUkFDWSI6eyJyb2xlcyI6WyJIT0xBQ1JBQ1lfVVNFUiJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJwcm9maWxlIGVtYWlsIiwic2lkIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwidGVuYW50SWQiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJyZXF1ZXN0ZXJUeXBlIjoiVEVOQU5UIn0=.FXeDyHBhlG9L4_NCeSyHEaNEBVmhFpfSBqlcbhHaPaoydhKcA0BfuyHgxg_32kQk6z5S9IQ7nVKS2ybtOvwo0WyLWwLQchSq7Noa7LooHIMzmeWMQb_bLKtbaOti59zwIdS8CkfGaXut7RUQKISQVWmbUGsVJQa2JkG6Ng_QN0y5hFVksMWPZiXVsofQkJXHXV1CQ3gabhhHKo3BqlJwzpsCKLDfg1-4PmSl1Wqbw03Ef2yolroj5i8FoeHukOQPkwCUHrrNw-ilIp917nqZa89YbCMtDjWyaj8pEH7GJR5vMZPE2WcJPn5dSA1IHVunfatEB1cDAitaFjVNWNnddQ";async function fetchAPITopic(Ce){const _e={dbType:"TIDB",filter:{id:localStorage.getItem("selectedTopicId")}},Ae="https://igs.gov-cloud.ai/pi-entity-instances-service/v2.0/schemas/6941203a98f23e7f0271b402/instances/list?page=0&size=1&sort=updatedAt,DESC",Se="post",Ee=accessToken;try{return await(await fetch(Ae,{method:Se,body:JSON.stringify(_e),headers:{Accept:"*/*",Authorization:`Bearer ${Ee}`,"Content-Type":"application/json"}})).json()}catch(xe){return console.error("Error fetching API:",xe),null}}async function fetchContent(Ce){const _e={dbType:"TIDB",filter:{nameWithType:`${Ce}`}},Ae="https://igs.gov-cloud.ai/pi-entity-instances-service/v2.0/schemas/678f3c927f984e2fc9b2d56e/instances/list?page=0&size=100",Se="post",Ee=accessToken;try{const Te=await(await fetch(Ae,{method:Se,body:JSON.stringify(_e),headers:{Accept:"*/*",Authorization:`Bearer ${Ee}`,"Content-Type":"application/json"}})).json();return console.log(Te,"image api"),Te}catch(xe){return console.error("Error fetching API:",xe),null}}async function addContentToCmsDita(Ce,_e,Ae,Se,Ee,xe){var Oe,Me;console.log("fetchAPI");const Te={data:[{type:`${xe}`,userId:"user1231",url:`${_e}`,tags:["HR","Policies"],createdAt:`${Se}`,name:`${(Oe=extractAssetDetails(_e))==null?void 0:Oe.assetName}`,nameWithType:`${(Me=extractAssetDetails(_e))==null?void 0:Me.assetNameWithExt}`,id:`${Ce}`,updatedAt:`${Ee}`}]},Ie="https://igs.gov-cloud.ai/pi-entity-instances-service/v2.0/schemas/678f3c927f984e2fc9b2d56e/instances",De="post",ke=accessToken;try{return await(await fetch(Ie,{method:De,body:JSON.stringify(Te),headers:{Accept:"*/*",Authorization:`Bearer ${ke}`,"Content-Type":"application/json"}})).json()}catch(Pe){return console.error("Error fetching API:",Pe),null}}async function UpdateCmsIdInTopic(Ce,_e){const Ae=await _e||[];Ae==null||Ae.push(Ce);const Se={primarykeyEnable:!0,data:{id:localStorage.getItem("selectedTopicId"),contentIds:Ae}},Ee="https://igs.gov-cloud.ai/pi-entity-instances-service/v2.0/schemas/6941203a98f23e7f0271b402/instances",xe="put",Te="eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3Ny1NUVdFRTNHZE5adGlsWU5IYmpsa2dVSkpaWUJWVmN1UmFZdHl5ejFjIn0.eyJleHAiOjE3MjYxODIzMzEsImlhdCI6MTcyNjE0NjMzMSwianRpIjoiOGVlZTU1MDctNGVlOC00NjE1LTg3OWUtNTVkMjViMjQ2MGFmIiwiaXNzIjoiaHR0cDovL2tleWNsb2FrLmtleWNsb2FrLnN2Yy5jbHVzdGVyLmxvY2FsOjgwODAvcmVhbG1zL21hc3RlciIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJIT0xBQ1JBQ1kiLCJzZXNzaW9uX3N0YXRlIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwibmFtZSI6ImtzYW14cCBrc2FteHAiLCJnaXZlbl9uYW1lIjoia3NhbXhwIiwiZmFtaWx5X25hbWUiOiJrc2FteHAiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWwiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiLyoiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZmF1bHQtcm9sZXMtbWFzdGVyIiwib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7IkhPTEFDUkFDWSI6eyJyb2xlcyI6WyJIT0xBQ1JBQ1lfVVNFUiJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJwcm9maWxlIGVtYWlsIiwic2lkIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwidGVuYW50SWQiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJyZXF1ZXN0ZXJUeXBlIjoiVEVOQU5UIn0=.FXeDyHBhlG9L4_NCeSyHEaNEBVmhFpfSBqlcbhHaPaoydhKcA0BfuyHgxg_32kQk6z5S9IQ7nVKS2ybtOvwo0WyLWwLQchSq7Noa7LooHIMzmeWMQb_bLKtbaOti59zwIdS8CkfGaXut7RUQKISQVWmbUGsVJQa2JkG6Ng_QN0y5hFVksMWPZiXVsofQkJXHXV1CQ3gabhhHKo3BqlJwzpsCKLDfg1-4PmSl1Wqbw03Ef2yolroj5i8FoeHukOQPkwCUHrrNw-ilIp917nqZa89YbCMtDjWyaj8pEH7GJR5vMZPE2WcJPn5dSA1IHVunfatEB1cDAitaFjVNWNnddQ";try{return await(await fetch(Ee,{method:xe,body:JSON.stringify(Se),headers:{Accept:"*/*",Authorization:`Bearer ${Te}`,"Content-Type":"application/json"}})).json()}catch(Ie){return console.error("Error fetching API:",Ie),null}}async function uploadAssetToCmsMobius$1(Ce){const _e=new FormData;_e.append("file",Ce,Ce.name||"uploaded_image");const Ae={method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3Ny1NUVdFRTNHZE5adGlsWU5IYmpsa2dVSkpaWUJWVmN1UmFZdHl5ejFjIn0.eyJleHAiOjE3MTgyOTQzMzMsImlhdCI6MTcxODI1ODMzMywianRpIjoiOGE0YTZiNGQtZjEwYi00ODc2LWE3YWItMjUzYjkyNjlmNjE2IiwiaXNzIjoiaHR0cDovL2tleWNsb2FrLmtleWNsb2FrLnN2Yy5jbHVzdGVyLmxvY2FsOjgwODAvcmVhbG1zL21hc3RlciIsImF1ZCI6WyJCT0xUWk1BTk5fQk9UIiwiUEFTQ0FMX0lOVEVMTElHRU5DRSIsIk1PTkVUIiwiYWNjb3VudCJdLCJzdWIiOiIyZjdiOTgzYy1hNDkyLTQyY2EtOTczMi1mMGM3ZGZlYTQ5ODUiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJIT0xBQ1JBQ1kiLCJzZXNzaW9uX3N0YXRlIjoiY2JiZGZkYTctMjc1OS00MjY4LThjMjgtZTBjODliMjFlMzU2IiwibmFtZSI6IkF2aW5hc2ggQXZpbmFzaCIsImdpdmVuX25hbWUiOiJBdmluYXNoIiwiZmFtaWx5X25hbWUiOiJBdmluYXNoIiwicHJlZmVycmVkX3VzZXJuYW1lIjoicGFzc3dvcmRfdGVuYW50X3BhdGVsLmFAbW9iaXVzZHRhYXMuYWkiLCJlbWFpbCI6InBhc3N3b3JkX3RlbmFudF9wYXRlbC5hQG1vYml1c2R0YWFzLmFpIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiLyoiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZmF1bHQtcm9sZXMtbWFzdGVyIiwib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7IkJPTFRaTUFOTl9CT1QiOnsicm9sZXMiOlsiQk9MVFpNQU5OX0JPVF9VU0VSIl19LCJQQVNDQUxfSU5URUxMSUdFTkNFIjp7InJvbGVzIjpbIlBBU0NBTF9JTlRFTExJR0VOQ0VfVVNFUiJdfSwiTU9ORVQiOnsicm9sZXMiOlsiTU9ORVRfVVNFUiJdfSwiSE9MQUNSQUNZIjp7InJvbGVzIjpbIkhPTEFDUkFDWV9VU0VSIl19LCJhY2NvdW50Ijp7InJvbGVzIjpbIm1hbmFnZS1hY2NvdW50IiwibWFuYWdlLWFjY291bnQtbGlua3MiLCJ2aWV3LXByb2ZpbGUiXX19LCJzY29wZSI6InByb2ZpbGUgZW1haWwiLCJzaWQiOiJjYmJkZmRhNy0yNzU5LTQyNjgtOGMyOC1lMGM4OWIyMWUzNTYiLCJ0ZW5hbnRJZCI6IjJmN2I5ODNjLWE0OTItNDJjYS05NzMyLWYwYzdkZmVhNDk4NSJ9.JKJvp6xtOzqbrEyds72M4dWzX2aJAhDnw4zSUejj8BTNGsuZZex_j7WTxs5UnoYMw_sfceEr70kjcqfJUaInBxRRJ6SYcE-leWRmuS6exbCS_pXABz1t8-e2SAelIUaDwNmlnN_APu_1WNjndCkTIQ2aUP3SgBgMQfw7M9gsn3PgtrdvzyYIzAY4c0kSvXRkeheml8PUq8w9RPRfZ9gsUAVdq8JuFzCFUvHZ_kIyjKebnhEL0e6kIGSxVikrJH974sZloIj1PnQvCsIFwnA6maPdol1ckwy6fVUTBjymdiG3y16GWAZ0To05VVFv6hC29XuMEO2FziPeoDf01OM6dA"},body:_e,redirect:"follow"};try{const Ee=await(await fetch("https://igs.gov-cloud.ai/mobius-content-service/v1.0/content/upload?filePath=CMS&contentTags=icons",Ae)).json();if(Ee.cdnUrl)return`https://cdn.gov-cloud.ai${Ee.cdnUrl}`;throw new Error("Image URL not found in response")}catch(Se){throw console.error("Image upload failed:",Se),Se}}async function assetContent(Ce,_e,Ae){var ke,Oe,Me,Pe,Be,Fe;const Se=[".jpg",".jpeg",".png",".gif",".bmp",".webp",".tiff",".tif",".svg",".heic",".ico",".raw",".jfif",".apng",".avif"],Ee=[".mp4",".mkv",".webm",".mov",".avi",".flv",".wmv",".mpeg",".mpg",".m4v",".3gp",".3g2",".ogv",".mts",".m2ts"],xe=((ke=Ce==null?void 0:Ce.split("/"))==null?void 0:ke.pop())||"",Te=xe.toLowerCase(),Ie=Se.some($e=>Te.endsWith($e))||Ee.some($e=>Te.endsWith($e))?xe:"",De=await fetchContent(Ie);if(console.log(De,"this is image url"),De)return _e==="image"?(console.log(`<img style="${Ae}" src="${(Oe=De==null?void 0:De[0])==null?void 0:Oe.url}" alt="${(Me=De==null?void 0:De[0])==null?void 0:Me.name}" />`),`<img style="${Ae}" src="${(Pe=De==null?void 0:De[0])==null?void 0:Pe.url}" alt="${(Be=De==null?void 0:De[0])==null?void 0:Be.name}" class="ProseMirror-selectednode" />`):`<video style="${Ae}" src="${(Fe=De==null?void 0:De[0])==null?void 0:Fe.url}" controls="true" contenteditable="false"></video>`;console.warn("API failed to fetch data for:",_e,Ce)}function convertDitaToHtml(Ce){if(!Ce||typeof Ce!="string")return"";const Ae=new DOMParser().parseFromString(Ce,"text/xml");let Se='<div class="tableWrapper"><table style="width: 100%; >';const Ee=Ae.querySelectorAll("colspec");Ee.length&&(Se+="<colgroup>",Ee.forEach(()=>{Se+="<col />"}),Se+="</colgroup>"),Se+="<tbody>";const xe=Ae.querySelector("thead row");return xe&&(Se+="<tr>",xe.querySelectorAll("entry").forEach(Ie=>{var De;Se+=`<th colspan="1" rowspan="1"><p>${(De=Ie==null?void 0:Ie.textContent)==null?void 0:De.trim()}</p></th>`}),Se+="</tr>"),Ae.querySelectorAll("tbody row").forEach(Ie=>{Se+="<tr>",Ie.querySelectorAll("entry").forEach(De=>{var ke;Se+=`<td colspan="1" rowspan="1"><p>${(ke=De==null?void 0:De.textContent)==null?void 0:ke.trim()}</p></td>`}),Se+="</tr>"}),Se+="</tbody></table></div>",Se}async function xmlToDita(Ce){if(typeof Ce!="string")return"";let _e=Ce;_e=_e.replace(/<table[^>]*>[\s\S]*?<\/table>/g,Ee=>convertDitaToHtml(Ee)),_e=_e.replace(/<b>([\s\S]*?)<\/b>/g,"<strong>$1</strong>"),_e=_e.replace(/<i>([\s\S]*?)<\/i>/g,"<em>$1</em>"),_e=_e.replace(/<codeblock\s+outputclass="([^"]+)"[^>]*>([\s\S]*?)<\/codeblock>/g,(Ee,xe,Te)=>`<pre><code class="${xe}">${Te}</code></pre>`);const Ae=[..._e.matchAll(/<image([^>]*)\/>/g)];for(const Ee of Ae){const[xe,Te]=Ee,Ie=Te.match(/href="([^"]+)"/),De=Te.match(/style="([^"]+)"/),ke=Ie?Ie[1]:null,Oe=De?De[1]:null,Me=ke&&await assetContent(ke,"image",Oe)||xe;_e=_e.split(xe).join(Me)}const Se=[..._e.matchAll(/<object[^>]*type="video\/[^"]+"[^>]*data="([^"]+)"[^>]*>.*?<param\s+name="controls"\s+value="true"\s*\/>.*?<\/object>/gs)];for(const Ee of Se){const[xe,Te,Ie]=Ee,De=await assetContent(Te,"video",Ie)||xe;_e=_e.split(xe).join(De)}return _e}var conventions$5={};function find$5(Ce,_e,Ae){if(Ae===void 0&&(Ae=Array.prototype),Ce&&typeof Ae.find=="function")return Ae.find.call(Ce,_e);for(var Se=0;Se<Ce.length;Se++)if(hasOwn$e(Ce,Se)){var Ee=Ce[Se];if(_e.call(void 0,Ee,Se,Ce))return Ee}}function freeze$3(Ce,_e){return _e===void 0&&(_e=Object),_e&&typeof _e.getOwnPropertyDescriptors=="function"&&(Ce=_e.create(null,_e.getOwnPropertyDescriptors(Ce))),_e&&typeof _e.freeze=="function"?_e.freeze(Ce):Ce}function hasOwn$e(Ce,_e){return Object.prototype.hasOwnProperty.call(Ce,_e)}function assign$5(Ce,_e){if(Ce===null||typeof Ce!="object")throw new TypeError("target is not an object");for(var Ae in _e)hasOwn$e(_e,Ae)&&(Ce[Ae]=_e[Ae]);return Ce}var HTML_BOOLEAN_ATTRIBUTES=freeze$3({allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,formnovalidate:!0,hidden:!0,ismap:!0,itemscope:!0,loop:!0,multiple:!0,muted:!0,nomodule:!0,novalidate:!0,open:!0,playsinline:!0,readonly:!0,required:!0,reversed:!0,selected:!0});function isHTMLBooleanAttribute(Ce){return hasOwn$e(HTML_BOOLEAN_ATTRIBUTES,Ce.toLowerCase())}var HTML_VOID_ELEMENTS=freeze$3({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function isHTMLVoidElement$1(Ce){return hasOwn$e(HTML_VOID_ELEMENTS,Ce.toLowerCase())}var HTML_RAW_TEXT_ELEMENTS=freeze$3({script:!1,style:!1,textarea:!0,title:!0});function isHTMLRawTextElement$2(Ce){var _e=Ce.toLowerCase();return hasOwn$e(HTML_RAW_TEXT_ELEMENTS,_e)&&!HTML_RAW_TEXT_ELEMENTS[_e]}function isHTMLEscapableRawTextElement$1(Ce){var _e=Ce.toLowerCase();return hasOwn$e(HTML_RAW_TEXT_ELEMENTS,_e)&&HTML_RAW_TEXT_ELEMENTS[_e]}function isHTMLMimeType$3(Ce){return Ce===MIME_TYPE$2.HTML}function hasDefaultHTMLNamespace$2(Ce){return isHTMLMimeType$3(Ce)||Ce===MIME_TYPE$2.XML_XHTML_APPLICATION}var MIME_TYPE$2=freeze$3({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),_MIME_TYPES=Object.keys(MIME_TYPE$2).map(function(Ce){return MIME_TYPE$2[Ce]});function isValidMimeType$1(Ce){return _MIME_TYPES.indexOf(Ce)>-1}var NAMESPACE$3=freeze$3({HTML:"http://www.w3.org/1999/xhtml",SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});conventions$5.assign=assign$5,conventions$5.find=find$5,conventions$5.freeze=freeze$3,conventions$5.HTML_BOOLEAN_ATTRIBUTES=HTML_BOOLEAN_ATTRIBUTES,conventions$5.HTML_RAW_TEXT_ELEMENTS=HTML_RAW_TEXT_ELEMENTS,conventions$5.HTML_VOID_ELEMENTS=HTML_VOID_ELEMENTS,conventions$5.hasDefaultHTMLNamespace=hasDefaultHTMLNamespace$2,conventions$5.hasOwn=hasOwn$e,conventions$5.isHTMLBooleanAttribute=isHTMLBooleanAttribute,conventions$5.isHTMLRawTextElement=isHTMLRawTextElement$2,conventions$5.isHTMLEscapableRawTextElement=isHTMLEscapableRawTextElement$1,conventions$5.isHTMLMimeType=isHTMLMimeType$3,conventions$5.isHTMLVoidElement=isHTMLVoidElement$1,conventions$5.isValidMimeType=isValidMimeType$1,conventions$5.MIME_TYPE=MIME_TYPE$2,conventions$5.NAMESPACE=NAMESPACE$3;var errors$3={},conventions$4=conventions$5;function extendError(Ce,_e){Ce.prototype=Object.create(Error.prototype,{constructor:{value:Ce},name:{value:Ce.name,enumerable:!0,writable:_e}})}var DOMExceptionName$1=conventions$4.freeze({Error:"Error",IndexSizeError:"IndexSizeError",DomstringSizeError:"DomstringSizeError",HierarchyRequestError:"HierarchyRequestError",WrongDocumentError:"WrongDocumentError",InvalidCharacterError:"InvalidCharacterError",NoDataAllowedError:"NoDataAllowedError",NoModificationAllowedError:"NoModificationAllowedError",NotFoundError:"NotFoundError",NotSupportedError:"NotSupportedError",InUseAttributeError:"InUseAttributeError",InvalidStateError:"InvalidStateError",SyntaxError:"SyntaxError",InvalidModificationError:"InvalidModificationError",NamespaceError:"NamespaceError",InvalidAccessError:"InvalidAccessError",ValidationError:"ValidationError",TypeMismatchError:"TypeMismatchError",SecurityError:"SecurityError",NetworkError:"NetworkError",AbortError:"AbortError",URLMismatchError:"URLMismatchError",QuotaExceededError:"QuotaExceededError",TimeoutError:"TimeoutError",InvalidNodeTypeError:"InvalidNodeTypeError",DataCloneError:"DataCloneError",EncodingError:"EncodingError",NotReadableError:"NotReadableError",UnknownError:"UnknownError",ConstraintError:"ConstraintError",DataError:"DataError",TransactionInactiveError:"TransactionInactiveError",ReadOnlyError:"ReadOnlyError",VersionError:"VersionError",OperationError:"OperationError",NotAllowedError:"NotAllowedError",OptOutError:"OptOutError"}),DOMExceptionNames=Object.keys(DOMExceptionName$1);function isValidDomExceptionCode(Ce){return typeof Ce=="number"&&Ce>=1&&Ce<=25}function endsWithError(Ce){return typeof Ce=="string"&&Ce.substring(Ce.length-DOMExceptionName$1.Error.length)===DOMExceptionName$1.Error}function DOMException$2(Ce,_e){isValidDomExceptionCode(Ce)?(this.name=DOMExceptionNames[Ce],this.message=_e||""):(this.message=Ce,this.name=endsWithError(_e)?_e:DOMExceptionName$1.Error),Error.captureStackTrace&&Error.captureStackTrace(this,DOMException$2)}extendError(DOMException$2,!0),Object.defineProperties(DOMException$2.prototype,{code:{enumerable:!0,get:function(){var Ce=DOMExceptionNames.indexOf(this.name);return isValidDomExceptionCode(Ce)?Ce:0}}});for(var ExceptionCode={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},entries$2=Object.entries(ExceptionCode),i$a=0;i$a<entries$2.length;i$a++){var key=entries$2[i$a][0];DOMException$2[key]=entries$2[i$a][1]}function ParseError$2(Ce,_e){this.message=Ce,this.locator=_e,Error.captureStackTrace&&Error.captureStackTrace(this,ParseError$2)}extendError(ParseError$2),errors$3.DOMException=DOMException$2,errors$3.DOMExceptionName=DOMExceptionName$1,errors$3.ExceptionCode=ExceptionCode,errors$3.ParseError=ParseError$2;var dom$1={},grammar={};function detectUnicodeSupport(Ce){try{typeof Ce!="function"&&(Ce=RegExp);var _e=new Ce("𝌆","u").exec("𝌆");return!!_e&&_e[0].length===2}catch{}return!1}var UNICODE_SUPPORT=detectUnicodeSupport();function chars$4(Ce){if(Ce.source[0]!=="[")throw new Error(Ce+" can not be used with chars");return Ce.source.slice(1,Ce.source.lastIndexOf("]"))}function chars_without(Ce,_e){if(Ce.source[0]!=="[")throw new Error("/"+Ce.source+"/ can not be used with chars_without");if(!_e||typeof _e!="string")throw new Error(JSON.stringify(_e)+" is not a valid search");if(Ce.source.indexOf(_e)===-1)throw new Error('"'+_e+'" is not is /'+Ce.source+"/");if(_e==="-"&&Ce.source.indexOf(_e)!==1)throw new Error('"'+_e+'" is not at the first postion of /'+Ce.source+"/");return new RegExp(Ce.source.replace(_e,""),UNICODE_SUPPORT?"u":"")}function reg$2(Ce){var _e=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(Ae){var Se=typeof Ae=="string";if(Se&&_e===void 0&&Ae==="|")throw new Error("use regg instead of reg to wrap expressions with `|`!");return Se?Ae:Ae.source}).join(""),UNICODE_SUPPORT?"mu":"m")}function regg(Ce){if(arguments.length===0)throw new Error("no parameters provided");return reg$2.apply(regg,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var UNICODE_REPLACEMENT_CHARACTER="�",Char=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;UNICODE_SUPPORT&&(Char=reg$2("[",chars$4(Char),"\\u{10000}-\\u{10FFFF}","]"));var _SChar=/[\x20\x09\x0D\x0A]/,SChar_s=chars$4(_SChar),S$1=reg$2(_SChar,"+"),S_OPT=reg$2(_SChar,"*"),NameStartChar=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;UNICODE_SUPPORT&&(NameStartChar=reg$2("[",chars$4(NameStartChar),"\\u{10000}-\\u{10FFFF}","]"));var NameStartChar_s=chars$4(NameStartChar),NameChar=reg$2("[",NameStartChar_s,chars$4(/[-.0-9\xB7]/),chars$4(/[\u0300-\u036F\u203F-\u2040]/),"]"),Name=reg$2(NameStartChar,NameChar,"*"),Nmtoken=reg$2(NameChar,"+"),EntityRef=reg$2("&",Name,";"),CharRef=regg(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),Reference=regg(EntityRef,"|",CharRef),PEReference=reg$2("%",Name,";"),EntityValue=regg(reg$2('"',regg(/[^%&"]/,"|",PEReference,"|",Reference),"*",'"'),"|",reg$2("'",regg(/[^%&']/,"|",PEReference,"|",Reference),"*","'")),AttValue=regg('"',regg(/[^<&"]/,"|",Reference),"*",'"',"|","'",regg(/[^<&']/,"|",Reference),"*","'"),NCNameStartChar=chars_without(NameStartChar,":"),NCNameChar=chars_without(NameChar,":"),NCName=reg$2(NCNameStartChar,NCNameChar,"*"),QName=reg$2(NCName,regg(":",NCName),"?"),QName_exact=reg$2("^",QName,"$"),QName_group=reg$2("(",QName,")"),SystemLiteral=regg(/"[^"]*"|'[^']*'/),PI$9=reg$2(/^<\?/,"(",Name,")",regg(S$1,"(",Char,"*?)"),"?",/\?>/),PubidChar=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,PubidLiteral=regg('"',PubidChar,'*"',"|","'",chars_without(PubidChar,"'"),"*'"),COMMENT_START="<!--",COMMENT_END="-->",Comment$2=reg$2(COMMENT_START,regg(chars_without(Char,"-"),"|",reg$2("-",chars_without(Char,"-"))),"*",COMMENT_END),PCDATA="#PCDATA",Mixed=regg(reg$2(/\(/,S_OPT,PCDATA,regg(S_OPT,/\|/,S_OPT,QName),"*",S_OPT,/\)\*/),"|",reg$2(/\(/,S_OPT,PCDATA,S_OPT,/\)/)),_children_quantity=/[?*+]?/,children$1=reg$2(/\([^>]+\)/,_children_quantity),contentspec=regg("EMPTY","|","ANY","|",Mixed,"|",children$1),ELEMENTDECL_START="<!ELEMENT",elementdecl=reg$2(ELEMENTDECL_START,S$1,regg(QName,"|",PEReference),S$1,regg(contentspec,"|",PEReference),S_OPT,">"),NotationType=reg$2("NOTATION",S$1,/\(/,S_OPT,Name,regg(S_OPT,/\|/,S_OPT,Name),"*",S_OPT,/\)/),Enumeration=reg$2(/\(/,S_OPT,Nmtoken,regg(S_OPT,/\|/,S_OPT,Nmtoken),"*",S_OPT,/\)/),EnumeratedType=regg(NotationType,"|",Enumeration),AttType=regg(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",EnumeratedType),DefaultDecl=regg(/#REQUIRED|#IMPLIED/,"|",regg(regg("#FIXED",S$1),"?",AttValue)),AttDef=regg(S$1,Name,S$1,AttType,S$1,DefaultDecl),ATTLIST_DECL_START="<!ATTLIST",AttlistDecl=reg$2(ATTLIST_DECL_START,S$1,Name,AttDef,"*",S_OPT,">"),ABOUT_LEGACY_COMPAT="about:legacy-compat",ABOUT_LEGACY_COMPAT_SystemLiteral=regg('"'+ABOUT_LEGACY_COMPAT+'"',"|","'"+ABOUT_LEGACY_COMPAT+"'"),SYSTEM="SYSTEM",PUBLIC="PUBLIC",ExternalID=regg(regg(SYSTEM,S$1,SystemLiteral),"|",regg(PUBLIC,S$1,PubidLiteral,S$1,SystemLiteral)),ExternalID_match=reg$2("^",regg(regg(SYSTEM,S$1,"(?<SystemLiteralOnly>",SystemLiteral,")"),"|",regg(PUBLIC,S$1,"(?<PubidLiteral>",PubidLiteral,")",S$1,"(?<SystemLiteral>",SystemLiteral,")"))),NDataDecl=regg(S$1,"NDATA",S$1,Name),EntityDef=regg(EntityValue,"|",regg(ExternalID,NDataDecl,"?")),ENTITY_DECL_START="<!ENTITY",GEDecl=reg$2(ENTITY_DECL_START,S$1,Name,S$1,EntityDef,S_OPT,">"),PEDef=regg(EntityValue,"|",ExternalID),PEDecl=reg$2(ENTITY_DECL_START,S$1,"%",S$1,Name,S$1,PEDef,S_OPT,">"),EntityDecl=regg(GEDecl,"|",PEDecl),PublicID=reg$2(PUBLIC,S$1,PubidLiteral),NotationDecl=reg$2("<!NOTATION",S$1,Name,S$1,regg(ExternalID,"|",PublicID),S_OPT,">"),Eq=reg$2(S_OPT,"=",S_OPT),VersionNum=/1[.]\d+/,VersionInfo=reg$2(S$1,"version",Eq,regg("'",VersionNum,"'","|",'"',VersionNum,'"')),EncName=/[A-Za-z][-A-Za-z0-9._]*/,EncodingDecl=regg(S$1,"encoding",Eq,regg('"',EncName,'"',"|","'",EncName,"'")),SDDecl=regg(S$1,"standalone",Eq,regg("'",regg("yes","|","no"),"'","|",'"',regg("yes","|","no"),'"')),XMLDecl=reg$2(/^<\?xml/,VersionInfo,EncodingDecl,"?",SDDecl,"?",S_OPT,/\?>/),DOCTYPE_DECL_START="<!DOCTYPE",CDATA_START="<![CDATA[",CDATA_END="]]>",CDStart=/<!\[CDATA\[/,CDEnd=/\]\]>/,CData=reg$2(Char,"*?",CDEnd),CDSect=reg$2(CDStart,CData);grammar.chars=chars$4,grammar.chars_without=chars_without,grammar.detectUnicodeSupport=detectUnicodeSupport,grammar.reg=reg$2,grammar.regg=regg,grammar.ABOUT_LEGACY_COMPAT=ABOUT_LEGACY_COMPAT,grammar.ABOUT_LEGACY_COMPAT_SystemLiteral=ABOUT_LEGACY_COMPAT_SystemLiteral,grammar.AttlistDecl=AttlistDecl,grammar.CDATA_START=CDATA_START,grammar.CDATA_END=CDATA_END,grammar.CDSect=CDSect,grammar.Char=Char,grammar.Comment=Comment$2,grammar.COMMENT_START=COMMENT_START,grammar.COMMENT_END=COMMENT_END,grammar.DOCTYPE_DECL_START=DOCTYPE_DECL_START,grammar.elementdecl=elementdecl,grammar.EntityDecl=EntityDecl,grammar.EntityValue=EntityValue,grammar.ExternalID=ExternalID,grammar.ExternalID_match=ExternalID_match,grammar.Name=Name,grammar.NotationDecl=NotationDecl,grammar.Reference=Reference,grammar.PEReference=PEReference,grammar.PI=PI$9,grammar.PUBLIC=PUBLIC,grammar.PubidLiteral=PubidLiteral,grammar.QName=QName,grammar.QName_exact=QName_exact,grammar.QName_group=QName_group,grammar.S=S$1,grammar.SChar_s=SChar_s,grammar.S_OPT=S_OPT,grammar.SYSTEM=SYSTEM,grammar.SystemLiteral=SystemLiteral,grammar.UNICODE_REPLACEMENT_CHARACTER=UNICODE_REPLACEMENT_CHARACTER,grammar.UNICODE_SUPPORT=UNICODE_SUPPORT,grammar.XMLDecl=XMLDecl;var conventions$3=conventions$5,find$4=conventions$3.find,hasDefaultHTMLNamespace$1=conventions$3.hasDefaultHTMLNamespace,hasOwn$d=conventions$3.hasOwn,isHTMLMimeType$2=conventions$3.isHTMLMimeType,isHTMLRawTextElement$1=conventions$3.isHTMLRawTextElement,isHTMLVoidElement=conventions$3.isHTMLVoidElement,MIME_TYPE$1=conventions$3.MIME_TYPE,NAMESPACE$2=conventions$3.NAMESPACE,PDC=Symbol(),errors$2=errors$3,DOMException$1=errors$2.DOMException,DOMExceptionName=errors$2.DOMExceptionName,g$2=grammar;function checkSymbol(Ce){if(Ce!==PDC)throw new TypeError("Illegal constructor")}function notEmptyString(Ce){return Ce!==""}function splitOnASCIIWhitespace(Ce){return Ce?Ce.split(/[\t\n\f\r ]+/).filter(notEmptyString):[]}function orderedSetReducer(Ce,_e){return hasOwn$d(Ce,_e)||(Ce[_e]=!0),Ce}function toOrderedSet(Ce){if(!Ce)return[];var _e=splitOnASCIIWhitespace(Ce);return Object.keys(_e.reduce(orderedSetReducer,{}))}function arrayIncludes$1(Ce){return function(_e){return Ce&&Ce.indexOf(_e)!==-1}}function validateQualifiedName(Ce){if(!g$2.QName_exact.test(Ce))throw new DOMException$1(DOMException$1.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+Ce+'"')}function validateAndExtract(Ce,_e){validateQualifiedName(_e),Ce=Ce||null;var Ae=null,Se=_e;if(_e.indexOf(":")>=0){var Ee=_e.split(":");Ae=Ee[0],Se=Ee[1]}if(Ae!==null&&Ce===null)throw new DOMException$1(DOMException$1.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(Ae==="xml"&&Ce!==conventions$3.NAMESPACE.XML)throw new DOMException$1(DOMException$1.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if((Ae==="xmlns"||_e==="xmlns")&&Ce!==conventions$3.NAMESPACE.XMLNS)throw new DOMException$1(DOMException$1.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(Ce===conventions$3.NAMESPACE.XMLNS&&Ae!=="xmlns"&&_e!=="xmlns")throw new DOMException$1(DOMException$1.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[Ce,Ae,Se]}function copy$6(Ce,_e){for(var Ae in Ce)hasOwn$d(Ce,Ae)&&(_e[Ae]=Ce[Ae])}function _extends(Ce,_e){var Ae=Ce.prototype;if(!(Ae instanceof _e)){let Se=function(){};Se.prototype=_e.prototype,Se=new Se,copy$6(Ae,Se),Ce.prototype=Ae=Se}Ae.constructor!=Ce&&(typeof Ce!="function"&&console.error("unknown Class:"+Ce),Ae.constructor=Ce)}var NodeType$2={},ELEMENT_NODE=NodeType$2.ELEMENT_NODE=1,ATTRIBUTE_NODE=NodeType$2.ATTRIBUTE_NODE=2,TEXT_NODE=NodeType$2.TEXT_NODE=3,CDATA_SECTION_NODE=NodeType$2.CDATA_SECTION_NODE=4,ENTITY_REFERENCE_NODE=NodeType$2.ENTITY_REFERENCE_NODE=5,ENTITY_NODE=NodeType$2.ENTITY_NODE=6,PROCESSING_INSTRUCTION_NODE=NodeType$2.PROCESSING_INSTRUCTION_NODE=7,COMMENT_NODE=NodeType$2.COMMENT_NODE=8,DOCUMENT_NODE=NodeType$2.DOCUMENT_NODE=9,DOCUMENT_TYPE_NODE=NodeType$2.DOCUMENT_TYPE_NODE=10,DOCUMENT_FRAGMENT_NODE=NodeType$2.DOCUMENT_FRAGMENT_NODE=11,NOTATION_NODE=NodeType$2.NOTATION_NODE=12,DocumentPosition=conventions$3.freeze({DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:2,DOCUMENT_POSITION_FOLLOWING:4,DOCUMENT_POSITION_CONTAINS:8,DOCUMENT_POSITION_CONTAINED_BY:16,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32});function commonAncestor(Ce,_e){if(_e.length<Ce.length)return commonAncestor(_e,Ce);var Ae=null;for(var Se in Ce){if(Ce[Se]!==_e[Se])return Ae;Ae=Ce[Se]}return Ae}function docGUID(Ce){return Ce.guid||(Ce.guid=Math.random()),Ce.guid}function NodeList(){}NodeList.prototype={length:0,item:function(Ce){return Ce>=0&&Ce<this.length?this[Ce]:null},toString:function(Ce){for(var _e=[],Ae=0;Ae<this.length;Ae++)serializeToString(this[Ae],_e,Ce);return _e.join("")},filter:function(Ce){return Array.prototype.filter.call(this,Ce)},indexOf:function(Ce){return Array.prototype.indexOf.call(this,Ce)}},NodeList.prototype[Symbol.iterator]=function(){var Ce=this,_e=0;return{next:function(){return _e<Ce.length?{value:Ce[_e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function LiveNodeList(Ce,_e){this._node=Ce,this._refresh=_e,_updateLiveList(this)}function _updateLiveList(Ce){var _e=Ce._node._inc||Ce._node.ownerDocument._inc;if(Ce._inc!==_e){var Ae=Ce._refresh(Ce._node);if(__set__(Ce,"length",Ae.length),!Ce.$$length||Ae.length<Ce.$$length)for(var Se=Ae.length;Se in Ce;Se++)hasOwn$d(Ce,Se)&&delete Ce[Se];copy$6(Ae,Ce),Ce._inc=_e}}LiveNodeList.prototype.item=function(Ce){return _updateLiveList(this),this[Ce]||null},_extends(LiveNodeList,NodeList);function NamedNodeMap(){}function _findNodeIndex(Ce,_e){for(var Ae=0;Ae<Ce.length;){if(Ce[Ae]===_e)return Ae;Ae++}}function _addNamedNode(Ce,_e,Ae,Se){if(Se?_e[_findNodeIndex(_e,Se)]=Ae:(_e[_e.length]=Ae,_e.length++),Ce){Ae.ownerElement=Ce;var Ee=Ce.ownerDocument;Ee&&(Se&&_onRemoveAttribute(Ee,Ce,Se),_onAddAttribute(Ee,Ce,Ae))}}function _removeNamedNode(Ce,_e,Ae){var Se=_findNodeIndex(_e,Ae);if(Se>=0){for(var Ee=_e.length-1;Se<=Ee;)_e[Se]=_e[++Se];if(_e.length=Ee,Ce){var xe=Ce.ownerDocument;xe&&_onRemoveAttribute(xe,Ce,Ae),Ae.ownerElement=null}}}NamedNodeMap.prototype={length:0,item:NodeList.prototype.item,getNamedItem:function(Ce){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(Ce=Ce.toLowerCase());for(var _e=0;_e<this.length;){var Ae=this[_e];if(Ae.nodeName===Ce)return Ae;_e++}return null},setNamedItem:function(Ce){var _e=Ce.ownerElement;if(_e&&_e!==this._ownerElement)throw new DOMException$1(DOMException$1.INUSE_ATTRIBUTE_ERR);var Ae=this.getNamedItemNS(Ce.namespaceURI,Ce.localName);return Ae===Ce?Ce:(_addNamedNode(this._ownerElement,this,Ce,Ae),Ae)},setNamedItemNS:function(Ce){return this.setNamedItem(Ce)},removeNamedItem:function(Ce){var _e=this.getNamedItem(Ce);if(!_e)throw new DOMException$1(DOMException$1.NOT_FOUND_ERR,Ce);return _removeNamedNode(this._ownerElement,this,_e),_e},removeNamedItemNS:function(Ce,_e){var Ae=this.getNamedItemNS(Ce,_e);if(!Ae)throw new DOMException$1(DOMException$1.NOT_FOUND_ERR,Ce?Ce+" : "+_e:_e);return _removeNamedNode(this._ownerElement,this,Ae),Ae},getNamedItemNS:function(Ce,_e){Ce||(Ce=null);for(var Ae=0;Ae<this.length;){var Se=this[Ae];if(Se.localName===_e&&Se.namespaceURI===Ce)return Se;Ae++}return null}},NamedNodeMap.prototype[Symbol.iterator]=function(){var Ce=this,_e=0;return{next:function(){return _e<Ce.length?{value:Ce[_e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function DOMImplementation$1(){}DOMImplementation$1.prototype={hasFeature:function(Ce,_e){return!0},createDocument:function(Ce,_e,Ae){var Se=MIME_TYPE$1.XML_APPLICATION;Ce===NAMESPACE$2.HTML?Se=MIME_TYPE$1.XML_XHTML_APPLICATION:Ce===NAMESPACE$2.SVG&&(Se=MIME_TYPE$1.XML_SVG_IMAGE);var Ee=new Document$4(PDC,{contentType:Se});if(Ee.implementation=this,Ee.childNodes=new NodeList,Ee.doctype=Ae||null,Ae&&Ee.appendChild(Ae),_e){var xe=Ee.createElementNS(Ce,_e);Ee.appendChild(xe)}return Ee},createDocumentType:function(Ce,_e,Ae,Se){validateQualifiedName(Ce);var Ee=new DocumentType(PDC);return Ee.name=Ce,Ee.nodeName=Ce,Ee.publicId=_e||"",Ee.systemId=Ae||"",Ee.internalSubset=Se||"",Ee.childNodes=new NodeList,Ee},createHTMLDocument:function(Ce){var _e=new Document$4(PDC,{contentType:MIME_TYPE$1.HTML});if(_e.implementation=this,_e.childNodes=new NodeList,Ce!==!1){_e.doctype=this.createDocumentType("html"),_e.doctype.ownerDocument=_e,_e.appendChild(_e.doctype);var Ae=_e.createElement("html");_e.appendChild(Ae);var Se=_e.createElement("head");if(Ae.appendChild(Se),typeof Ce=="string"){var Ee=_e.createElement("title");Ee.appendChild(_e.createTextNode(Ce)),Se.appendChild(Ee)}Ae.appendChild(_e.createElement("body"))}return _e}};function Node$5(Ce){checkSymbol(Ce)}Node$5.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,parentNode:null,get parentElement(){return this.parentNode&&this.parentNode.nodeType===this.ELEMENT_NODE?this.parentNode:null},childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,baseURI:"about:blank",get isConnected(){var Ce=this.getRootNode();return Ce&&Ce.nodeType===Ce.DOCUMENT_NODE},contains:function(Ce){if(!Ce)return!1;var _e=Ce;do{if(this===_e)return!0;_e=Ce.parentNode}while(_e);return!1},getRootNode:function(Ce){var _e=this;do{if(!_e.parentNode)return _e;_e=_e.parentNode}while(_e)},isEqualNode:function(Ce){if(!Ce||this.nodeType!==Ce.nodeType)return!1;switch(this.nodeType){case this.DOCUMENT_TYPE_NODE:if(this.name!==Ce.name||this.publicId!==Ce.publicId||this.systemId!==Ce.systemId)return!1;break;case this.ELEMENT_NODE:if(this.namespaceURI!==Ce.namespaceURI||this.prefix!==Ce.prefix||this.localName!==Ce.localName||this.attributes.length!==Ce.attributes.length)return!1;for(var _e=0;_e<this.attributes.length;_e++){var Ae=this.attributes.item(_e);if(!Ae.isEqualNode(Ce.getAttributeNodeNS(Ae.namespaceURI,Ae.localName)))return!1}break;case this.ATTRIBUTE_NODE:if(this.namespaceURI!==Ce.namespaceURI||this.localName!==Ce.localName||this.value!==Ce.value)return!1;break;case this.PROCESSING_INSTRUCTION_NODE:if(this.target!==Ce.target||this.data!==Ce.data)return!1;break;case this.TEXT_NODE:case this.COMMENT_NODE:if(this.data!==Ce.data)return!1;break}if(this.childNodes.length!==Ce.childNodes.length)return!1;for(var _e=0;_e<this.childNodes.length;_e++)if(!this.childNodes[_e].isEqualNode(Ce.childNodes[_e]))return!1;return!0},isSameNode:function(Ce){return this===Ce},insertBefore:function(Ce,_e){return _insertBefore(this,Ce,_e)},replaceChild:function(Ce,_e){_insertBefore(this,Ce,_e,assertPreReplacementValidityInDocument),_e&&this.removeChild(_e)},removeChild:function(Ce){return _removeChild(this,Ce)},appendChild:function(Ce){return this.insertBefore(Ce,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(Ce){return cloneNode(this.ownerDocument||this,this,Ce)},normalize:function(){for(var Ce=this.firstChild;Ce;){var _e=Ce.nextSibling;_e&&_e.nodeType==TEXT_NODE&&Ce.nodeType==TEXT_NODE?(this.removeChild(_e),Ce.appendData(_e.data)):(Ce.normalize(),Ce=_e)}},isSupported:function(Ce,_e){return this.ownerDocument.implementation.hasFeature(Ce,_e)},lookupPrefix:function(Ce){for(var _e=this;_e;){var Ae=_e._nsMap;if(Ae){for(var Se in Ae)if(hasOwn$d(Ae,Se)&&Ae[Se]===Ce)return Se}_e=_e.nodeType==ATTRIBUTE_NODE?_e.ownerDocument:_e.parentNode}return null},lookupNamespaceURI:function(Ce){for(var _e=this;_e;){var Ae=_e._nsMap;if(Ae&&hasOwn$d(Ae,Ce))return Ae[Ce];_e=_e.nodeType==ATTRIBUTE_NODE?_e.ownerDocument:_e.parentNode}return null},isDefaultNamespace:function(Ce){var _e=this.lookupPrefix(Ce);return _e==null},compareDocumentPosition:function(Ce){if(this===Ce)return 0;var _e=Ce,Ae=this,Se=null,Ee=null;if(_e instanceof Attr&&(Se=_e,_e=Se.ownerElement),Ae instanceof Attr&&(Ee=Ae,Ae=Ee.ownerElement,Se&&_e&&Ae===_e))for(var xe=0,Te;Te=Ae.attributes[xe];xe++){if(Te===Se)return DocumentPosition.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+DocumentPosition.DOCUMENT_POSITION_PRECEDING;if(Te===Ee)return DocumentPosition.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+DocumentPosition.DOCUMENT_POSITION_FOLLOWING}if(!_e||!Ae||Ae.ownerDocument!==_e.ownerDocument)return DocumentPosition.DOCUMENT_POSITION_DISCONNECTED+DocumentPosition.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(docGUID(Ae.ownerDocument)>docGUID(_e.ownerDocument)?DocumentPosition.DOCUMENT_POSITION_FOLLOWING:DocumentPosition.DOCUMENT_POSITION_PRECEDING);if(Ee&&_e===Ae)return DocumentPosition.DOCUMENT_POSITION_CONTAINS+DocumentPosition.DOCUMENT_POSITION_PRECEDING;if(Se&&_e===Ae)return DocumentPosition.DOCUMENT_POSITION_CONTAINED_BY+DocumentPosition.DOCUMENT_POSITION_FOLLOWING;for(var Ie=[],De=_e.parentNode;De;){if(!Ee&&De===Ae)return DocumentPosition.DOCUMENT_POSITION_CONTAINED_BY+DocumentPosition.DOCUMENT_POSITION_FOLLOWING;Ie.push(De),De=De.parentNode}Ie.reverse();for(var ke=[],Oe=Ae.parentNode;Oe;){if(!Se&&Oe===_e)return DocumentPosition.DOCUMENT_POSITION_CONTAINS+DocumentPosition.DOCUMENT_POSITION_PRECEDING;ke.push(Oe),Oe=Oe.parentNode}ke.reverse();var Me=commonAncestor(Ie,ke);for(var Pe in Me.childNodes){var Be=Me.childNodes[Pe];if(Be===Ae)return DocumentPosition.DOCUMENT_POSITION_FOLLOWING;if(Be===_e)return DocumentPosition.DOCUMENT_POSITION_PRECEDING;if(ke.indexOf(Be)>=0)return DocumentPosition.DOCUMENT_POSITION_FOLLOWING;if(Ie.indexOf(Be)>=0)return DocumentPosition.DOCUMENT_POSITION_PRECEDING}return 0}};function _xmlEncoder(Ce){return Ce=="<"&&"<"||Ce==">"&&">"||Ce=="&"&&"&"||Ce=='"'&&"""||"&#"+Ce.charCodeAt()+";"}copy$6(NodeType$2,Node$5),copy$6(NodeType$2,Node$5.prototype),copy$6(DocumentPosition,Node$5),copy$6(DocumentPosition,Node$5.prototype);function _visitNode(Ce,_e){if(_e(Ce))return!0;if(Ce=Ce.firstChild)do if(_visitNode(Ce,_e))return!0;while(Ce=Ce.nextSibling)}function Document$4(Ce,_e){checkSymbol(Ce);var Ae=_e||{};this.ownerDocument=this,this.contentType=Ae.contentType||MIME_TYPE$1.XML_APPLICATION,this.type=isHTMLMimeType$2(this.contentType)?"html":"xml"}function _onAddAttribute(Ce,_e,Ae){Ce&&Ce._inc++;var Se=Ae.namespaceURI;Se===NAMESPACE$2.XMLNS&&(_e._nsMap[Ae.prefix?Ae.localName:""]=Ae.value)}function _onRemoveAttribute(Ce,_e,Ae,Se){Ce&&Ce._inc++;var Ee=Ae.namespaceURI;Ee===NAMESPACE$2.XMLNS&&delete _e._nsMap[Ae.prefix?Ae.localName:""]}function _onUpdateChild(Ce,_e,Ae){if(Ce&&Ce._inc){Ce._inc++;var Se=_e.childNodes;if(Ae&&!Ae.nextSibling)Se[Se.length++]=Ae;else{for(var Ee=_e.firstChild,xe=0;Ee;)Se[xe++]=Ee,Ee=Ee.nextSibling;Se.length=xe,delete Se[Se.length]}}}function _removeChild(Ce,_e){if(Ce!==_e.parentNode)throw new DOMException$1(DOMException$1.NOT_FOUND_ERR,"child's parent is not parent");var Ae=_e.previousSibling,Se=_e.nextSibling;return Ae?Ae.nextSibling=Se:Ce.firstChild=Se,Se?Se.previousSibling=Ae:Ce.lastChild=Ae,_onUpdateChild(Ce.ownerDocument,Ce),_e.parentNode=null,_e.previousSibling=null,_e.nextSibling=null,_e}function hasValidParentNodeType(Ce){return Ce&&(Ce.nodeType===Node$5.DOCUMENT_NODE||Ce.nodeType===Node$5.DOCUMENT_FRAGMENT_NODE||Ce.nodeType===Node$5.ELEMENT_NODE)}function hasInsertableNodeType(Ce){return Ce&&(Ce.nodeType===Node$5.CDATA_SECTION_NODE||Ce.nodeType===Node$5.COMMENT_NODE||Ce.nodeType===Node$5.DOCUMENT_FRAGMENT_NODE||Ce.nodeType===Node$5.DOCUMENT_TYPE_NODE||Ce.nodeType===Node$5.ELEMENT_NODE||Ce.nodeType===Node$5.PROCESSING_INSTRUCTION_NODE||Ce.nodeType===Node$5.TEXT_NODE)}function isDocTypeNode(Ce){return Ce&&Ce.nodeType===Node$5.DOCUMENT_TYPE_NODE}function isElementNode$1(Ce){return Ce&&Ce.nodeType===Node$5.ELEMENT_NODE}function isTextNode$1(Ce){return Ce&&Ce.nodeType===Node$5.TEXT_NODE}function isElementInsertionPossible(Ce,_e){var Ae=Ce.childNodes||[];if(find$4(Ae,isElementNode$1)||isDocTypeNode(_e))return!1;var Se=find$4(Ae,isDocTypeNode);return!(_e&&Se&&Ae.indexOf(Se)>Ae.indexOf(_e))}function isElementReplacementPossible(Ce,_e){var Ae=Ce.childNodes||[];function Se(xe){return isElementNode$1(xe)&&xe!==_e}if(find$4(Ae,Se))return!1;var Ee=find$4(Ae,isDocTypeNode);return!(_e&&Ee&&Ae.indexOf(Ee)>Ae.indexOf(_e))}function assertPreInsertionValidity1to5(Ce,_e,Ae){if(!hasValidParentNodeType(Ce))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+Ce.nodeType);if(Ae&&Ae.parentNode!==Ce)throw new DOMException$1(DOMException$1.NOT_FOUND_ERR,"child not in parent");if(!hasInsertableNodeType(_e)||isDocTypeNode(_e)&&Ce.nodeType!==Node$5.DOCUMENT_NODE)throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Unexpected node type "+_e.nodeType+" for parent node type "+Ce.nodeType)}function assertPreInsertionValidityInDocument(Ce,_e,Ae){var Se=Ce.childNodes||[],Ee=_e.childNodes||[];if(_e.nodeType===Node$5.DOCUMENT_FRAGMENT_NODE){var xe=Ee.filter(isElementNode$1);if(xe.length>1||find$4(Ee,isTextNode$1))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(xe.length===1&&!isElementInsertionPossible(Ce,Ae))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(isElementNode$1(_e)&&!isElementInsertionPossible(Ce,Ae))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(isDocTypeNode(_e)){if(find$4(Se,isDocTypeNode))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var Te=find$4(Se,isElementNode$1);if(Ae&&Se.indexOf(Te)<Se.indexOf(Ae))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!Ae&&Te)throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function assertPreReplacementValidityInDocument(Ce,_e,Ae){var Se=Ce.childNodes||[],Ee=_e.childNodes||[];if(_e.nodeType===Node$5.DOCUMENT_FRAGMENT_NODE){var xe=Ee.filter(isElementNode$1);if(xe.length>1||find$4(Ee,isTextNode$1))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(xe.length===1&&!isElementReplacementPossible(Ce,Ae))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(isElementNode$1(_e)&&!isElementReplacementPossible(Ce,Ae))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(isDocTypeNode(_e)){if(find$4(Se,function(De){return isDocTypeNode(De)&&De!==Ae}))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var Te=find$4(Se,isElementNode$1);if(Ae&&Se.indexOf(Te)<Se.indexOf(Ae))throw new DOMException$1(DOMException$1.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function _insertBefore(Ce,_e,Ae,Se){assertPreInsertionValidity1to5(Ce,_e,Ae),Ce.nodeType===Node$5.DOCUMENT_NODE&&(Se||assertPreInsertionValidityInDocument)(Ce,_e,Ae);var Ee=_e.parentNode;if(Ee&&Ee.removeChild(_e),_e.nodeType===DOCUMENT_FRAGMENT_NODE){var xe=_e.firstChild;if(xe==null)return _e;var Te=_e.lastChild}else xe=Te=_e;var Ie=Ae?Ae.previousSibling:Ce.lastChild;xe.previousSibling=Ie,Te.nextSibling=Ae,Ie?Ie.nextSibling=xe:Ce.firstChild=xe,Ae==null?Ce.lastChild=Te:Ae.previousSibling=Te;do xe.parentNode=Ce;while(xe!==Te&&(xe=xe.nextSibling));return _onUpdateChild(Ce.ownerDocument||Ce,Ce,_e),_e.nodeType==DOCUMENT_FRAGMENT_NODE&&(_e.firstChild=_e.lastChild=null),_e}Document$4.prototype={implementation:null,nodeName:"#document",nodeType:DOCUMENT_NODE,doctype:null,documentElement:null,_inc:1,insertBefore:function(Ce,_e){if(Ce.nodeType===DOCUMENT_FRAGMENT_NODE){for(var Ae=Ce.firstChild;Ae;){var Se=Ae.nextSibling;this.insertBefore(Ae,_e),Ae=Se}return Ce}return _insertBefore(this,Ce,_e),Ce.ownerDocument=this,this.documentElement===null&&Ce.nodeType===ELEMENT_NODE&&(this.documentElement=Ce),Ce},removeChild:function(Ce){var _e=_removeChild(this,Ce);return _e===this.documentElement&&(this.documentElement=null),_e},replaceChild:function(Ce,_e){_insertBefore(this,Ce,_e,assertPreReplacementValidityInDocument),Ce.ownerDocument=this,_e&&this.removeChild(_e),isElementNode$1(Ce)&&(this.documentElement=Ce)},importNode:function(Ce,_e){return importNode(this,Ce,_e)},getElementById:function(Ce){var _e=null;return _visitNode(this.documentElement,function(Ae){if(Ae.nodeType==ELEMENT_NODE&&Ae.getAttribute("id")==Ce)return _e=Ae,!0}),_e},createElement:function(Ce){var _e=new Element$5(PDC);_e.ownerDocument=this,this.type==="html"&&(Ce=Ce.toLowerCase()),hasDefaultHTMLNamespace$1(this.contentType)&&(_e.namespaceURI=NAMESPACE$2.HTML),_e.nodeName=Ce,_e.tagName=Ce,_e.localName=Ce,_e.childNodes=new NodeList;var Ae=_e.attributes=new NamedNodeMap;return Ae._ownerElement=_e,_e},createDocumentFragment:function(){var Ce=new DocumentFragment$1(PDC);return Ce.ownerDocument=this,Ce.childNodes=new NodeList,Ce},createTextNode:function(Ce){var _e=new Text$5(PDC);return _e.ownerDocument=this,_e.childNodes=new NodeList,_e.appendData(Ce),_e},createComment:function(Ce){var _e=new Comment$1(PDC);return _e.ownerDocument=this,_e.childNodes=new NodeList,_e.appendData(Ce),_e},createCDATASection:function(Ce){var _e=new CDATASection(PDC);return _e.ownerDocument=this,_e.childNodes=new NodeList,_e.appendData(Ce),_e},createProcessingInstruction:function(Ce,_e){var Ae=new ProcessingInstruction(PDC);return Ae.ownerDocument=this,Ae.childNodes=new NodeList,Ae.nodeName=Ae.target=Ce,Ae.nodeValue=Ae.data=_e,Ae},createAttribute:function(Ce){if(!g$2.QName_exact.test(Ce))throw new DOMException$1(DOMException$1.INVALID_CHARACTER_ERR,'invalid character in name "'+Ce+'"');return this.type==="html"&&(Ce=Ce.toLowerCase()),this._createAttribute(Ce)},_createAttribute:function(Ce){var _e=new Attr(PDC);return _e.ownerDocument=this,_e.childNodes=new NodeList,_e.name=Ce,_e.nodeName=Ce,_e.localName=Ce,_e.specified=!0,_e},createEntityReference:function(Ce){if(!g$2.Name.test(Ce))throw new DOMException$1(DOMException$1.INVALID_CHARACTER_ERR,'not a valid xml name "'+Ce+'"');if(this.type==="html")throw new DOMException$1("document is an html document",DOMExceptionName.NotSupportedError);var _e=new EntityReference(PDC);return _e.ownerDocument=this,_e.childNodes=new NodeList,_e.nodeName=Ce,_e},createElementNS:function(Ce,_e){var Ae=validateAndExtract(Ce,_e),Se=new Element$5(PDC),Ee=Se.attributes=new NamedNodeMap;return Se.childNodes=new NodeList,Se.ownerDocument=this,Se.nodeName=_e,Se.tagName=_e,Se.namespaceURI=Ae[0],Se.prefix=Ae[1],Se.localName=Ae[2],Ee._ownerElement=Se,Se},createAttributeNS:function(Ce,_e){var Ae=validateAndExtract(Ce,_e),Se=new Attr(PDC);return Se.ownerDocument=this,Se.childNodes=new NodeList,Se.nodeName=_e,Se.name=_e,Se.specified=!0,Se.namespaceURI=Ae[0],Se.prefix=Ae[1],Se.localName=Ae[2],Se}},_extends(Document$4,Node$5);function Element$5(Ce){checkSymbol(Ce),this._nsMap=Object.create(null)}Element$5.prototype={nodeType:ELEMENT_NODE,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return this.ownerDocument.type==="html"&&this.namespaceURI===NAMESPACE$2.HTML},hasAttributes:function(){return!!(this.attributes&&this.attributes.length)},hasAttribute:function(Ce){return!!this.getAttributeNode(Ce)},getAttribute:function(Ce){var _e=this.getAttributeNode(Ce);return _e?_e.value:null},getAttributeNode:function(Ce){return this._isInHTMLDocumentAndNamespace()&&(Ce=Ce.toLowerCase()),this.attributes.getNamedItem(Ce)},setAttribute:function(Ce,_e){this._isInHTMLDocumentAndNamespace()&&(Ce=Ce.toLowerCase());var Ae=this.getAttributeNode(Ce);Ae?Ae.value=Ae.nodeValue=""+_e:(Ae=this.ownerDocument._createAttribute(Ce),Ae.value=Ae.nodeValue=""+_e,this.setAttributeNode(Ae))},removeAttribute:function(Ce){var _e=this.getAttributeNode(Ce);_e&&this.removeAttributeNode(_e)},setAttributeNode:function(Ce){return this.attributes.setNamedItem(Ce)},setAttributeNodeNS:function(Ce){return this.attributes.setNamedItemNS(Ce)},removeAttributeNode:function(Ce){return this.attributes.removeNamedItem(Ce.nodeName)},removeAttributeNS:function(Ce,_e){var Ae=this.getAttributeNodeNS(Ce,_e);Ae&&this.removeAttributeNode(Ae)},hasAttributeNS:function(Ce,_e){return this.getAttributeNodeNS(Ce,_e)!=null},getAttributeNS:function(Ce,_e){var Ae=this.getAttributeNodeNS(Ce,_e);return Ae?Ae.value:null},setAttributeNS:function(Ce,_e,Ae){var Se=validateAndExtract(Ce,_e),Ee=Se[2],xe=this.getAttributeNodeNS(Ce,Ee);xe?xe.value=xe.nodeValue=""+Ae:(xe=this.ownerDocument.createAttributeNS(Ce,_e),xe.value=xe.nodeValue=""+Ae,this.setAttributeNode(xe))},getAttributeNodeNS:function(Ce,_e){return this.attributes.getNamedItemNS(Ce,_e)},getElementsByClassName:function(Ce){var _e=toOrderedSet(Ce);return new LiveNodeList(this,function(Ae){var Se=[];return _e.length>0&&_visitNode(Ae,function(Ee){if(Ee!==Ae&&Ee.nodeType===ELEMENT_NODE){var xe=Ee.getAttribute("class");if(xe){var Te=Ce===xe;if(!Te){var Ie=toOrderedSet(xe);Te=_e.every(arrayIncludes$1(Ie))}Te&&Se.push(Ee)}}}),Se})},getElementsByTagName:function(Ce){var _e=(this.nodeType===DOCUMENT_NODE?this:this.ownerDocument).type==="html",Ae=Ce.toLowerCase();return new LiveNodeList(this,function(Se){var Ee=[];return _visitNode(Se,function(xe){if(!(xe===Se||xe.nodeType!==ELEMENT_NODE))if(Ce==="*")Ee.push(xe);else{var Te=xe.getQualifiedName(),Ie=_e&&xe.namespaceURI===NAMESPACE$2.HTML?Ae:Ce;Te===Ie&&Ee.push(xe)}}),Ee})},getElementsByTagNameNS:function(Ce,_e){return new LiveNodeList(this,function(Ae){var Se=[];return _visitNode(Ae,function(Ee){Ee!==Ae&&Ee.nodeType===ELEMENT_NODE&&(Ce==="*"||Ee.namespaceURI===Ce)&&(_e==="*"||Ee.localName==_e)&&Se.push(Ee)}),Se})}},Document$4.prototype.getElementsByClassName=Element$5.prototype.getElementsByClassName,Document$4.prototype.getElementsByTagName=Element$5.prototype.getElementsByTagName,Document$4.prototype.getElementsByTagNameNS=Element$5.prototype.getElementsByTagNameNS,_extends(Element$5,Node$5);function Attr(Ce){checkSymbol(Ce),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}Attr.prototype.nodeType=ATTRIBUTE_NODE,_extends(Attr,Node$5);function CharacterData(Ce){checkSymbol(Ce)}CharacterData.prototype={data:"",substringData:function(Ce,_e){return this.data.substring(Ce,Ce+_e)},appendData:function(Ce){Ce=this.data+Ce,this.nodeValue=this.data=Ce,this.length=Ce.length},insertData:function(Ce,_e){this.replaceData(Ce,0,_e)},deleteData:function(Ce,_e){this.replaceData(Ce,_e,"")},replaceData:function(Ce,_e,Ae){var Se=this.data.substring(0,Ce),Ee=this.data.substring(Ce+_e);Ae=Se+Ae+Ee,this.nodeValue=this.data=Ae,this.length=Ae.length}},_extends(CharacterData,Node$5);function Text$5(Ce){checkSymbol(Ce)}Text$5.prototype={nodeName:"#text",nodeType:TEXT_NODE,splitText:function(Ce){var _e=this.data,Ae=_e.substring(Ce);_e=_e.substring(0,Ce),this.data=this.nodeValue=_e,this.length=_e.length;var Se=this.ownerDocument.createTextNode(Ae);return this.parentNode&&this.parentNode.insertBefore(Se,this.nextSibling),Se}},_extends(Text$5,CharacterData);function Comment$1(Ce){checkSymbol(Ce)}Comment$1.prototype={nodeName:"#comment",nodeType:COMMENT_NODE},_extends(Comment$1,CharacterData);function CDATASection(Ce){checkSymbol(Ce)}CDATASection.prototype={nodeName:"#cdata-section",nodeType:CDATA_SECTION_NODE},_extends(CDATASection,Text$5);function DocumentType(Ce){checkSymbol(Ce)}DocumentType.prototype.nodeType=DOCUMENT_TYPE_NODE,_extends(DocumentType,Node$5);function Notation(Ce){checkSymbol(Ce)}Notation.prototype.nodeType=NOTATION_NODE,_extends(Notation,Node$5);function Entity(Ce){checkSymbol(Ce)}Entity.prototype.nodeType=ENTITY_NODE,_extends(Entity,Node$5);function EntityReference(Ce){checkSymbol(Ce)}EntityReference.prototype.nodeType=ENTITY_REFERENCE_NODE,_extends(EntityReference,Node$5);function DocumentFragment$1(Ce){checkSymbol(Ce)}DocumentFragment$1.prototype.nodeName="#document-fragment",DocumentFragment$1.prototype.nodeType=DOCUMENT_FRAGMENT_NODE,_extends(DocumentFragment$1,Node$5);function ProcessingInstruction(Ce){checkSymbol(Ce)}ProcessingInstruction.prototype.nodeType=PROCESSING_INSTRUCTION_NODE,_extends(ProcessingInstruction,CharacterData);function XMLSerializer$1(){}XMLSerializer$1.prototype.serializeToString=function(Ce,_e){return nodeSerializeToString.call(Ce,_e)},Node$5.prototype.toString=nodeSerializeToString;function nodeSerializeToString(Ce){var _e=[],Ae=this.nodeType===DOCUMENT_NODE&&this.documentElement||this,Se=Ae.prefix,Ee=Ae.namespaceURI;if(Ee&&Se==null){var Se=Ae.lookupPrefix(Ee);if(Se==null)var xe=[{namespace:Ee,prefix:null}]}return serializeToString(this,_e,Ce,xe),_e.join("")}function needNamespaceDefine(Ce,_e,Ae){var Se=Ce.prefix||"",Ee=Ce.namespaceURI;if(!Ee||Se==="xml"&&Ee===NAMESPACE$2.XML||Ee===NAMESPACE$2.XMLNS)return!1;for(var xe=Ae.length;xe--;){var Te=Ae[xe];if(Te.prefix===Se)return Te.namespace!==Ee}return!0}function addSerializedAttribute(Ce,_e,Ae){Ce.push(" ",_e,'="',Ae.replace(/[<>&"\t\n\r]/g,_xmlEncoder),'"')}function serializeToString(Ce,_e,Ae,Se){Se||(Se=[]);var Ee=Ce.nodeType===DOCUMENT_NODE?Ce:Ce.ownerDocument,xe=Ee.type==="html";if(Ae)if(Ce=Ae(Ce),Ce){if(typeof Ce=="string"){_e.push(Ce);return}}else return;switch(Ce.nodeType){case ELEMENT_NODE:var Te=Ce.attributes,Ie=Te.length,We=Ce.firstChild,De=Ce.tagName,ke=De;if(!xe&&!Ce.prefix&&Ce.namespaceURI){for(var Oe,Me=0;Me<Te.length;Me++)if(Te.item(Me).name==="xmlns"){Oe=Te.item(Me).value;break}if(!Oe)for(var Pe=Se.length-1;Pe>=0;Pe--){var Be=Se[Pe];if(Be.prefix===""&&Be.namespace===Ce.namespaceURI){Oe=Be.namespace;break}}if(Oe!==Ce.namespaceURI)for(var Pe=Se.length-1;Pe>=0;Pe--){var Be=Se[Pe];if(Be.namespace===Ce.namespaceURI){Be.prefix&&(ke=Be.prefix+":"+De);break}}}_e.push("<",ke);for(var Fe=0;Fe<Ie;Fe++){var $e=Te.item(Fe);$e.prefix=="xmlns"?Se.push({prefix:$e.localName,namespace:$e.value}):$e.nodeName=="xmlns"&&Se.push({prefix:"",namespace:$e.value})}for(var Fe=0;Fe<Ie;Fe++){var $e=Te.item(Fe);if(needNamespaceDefine($e,xe,Se)){var Ue=$e.prefix||"",He=$e.namespaceURI;addSerializedAttribute(_e,Ue?"xmlns:"+Ue:"xmlns",He),Se.push({prefix:Ue,namespace:He})}serializeToString($e,_e,Ae,Se)}if(De===ke&&needNamespaceDefine(Ce,xe,Se)){var Ue=Ce.prefix||"",He=Ce.namespaceURI;addSerializedAttribute(_e,Ue?"xmlns:"+Ue:"xmlns",He),Se.push({prefix:Ue,namespace:He})}var Ve=!We;if(Ve&&(xe||Ce.namespaceURI===NAMESPACE$2.HTML)&&(Ve=isHTMLVoidElement(De)),Ve)_e.push("/>");else{if(_e.push(">"),xe&&isHTMLRawTextElement$1(De))for(;We;)We.data?_e.push(We.data):serializeToString(We,_e,Ae,Se.slice()),We=We.nextSibling;else for(;We;)serializeToString(We,_e,Ae,Se.slice()),We=We.nextSibling;_e.push("</",ke,">")}return;case DOCUMENT_NODE:case DOCUMENT_FRAGMENT_NODE:for(var We=Ce.firstChild;We;)serializeToString(We,_e,Ae,Se.slice()),We=We.nextSibling;return;case ATTRIBUTE_NODE:return addSerializedAttribute(_e,Ce.name,Ce.value);case TEXT_NODE:return _e.push(Ce.data.replace(/[<&>]/g,_xmlEncoder));case CDATA_SECTION_NODE:return _e.push(g$2.CDATA_START,Ce.data,g$2.CDATA_END);case COMMENT_NODE:return _e.push(g$2.COMMENT_START,Ce.data,g$2.COMMENT_END);case DOCUMENT_TYPE_NODE:var ze=Ce.publicId,qe=Ce.systemId;_e.push(g$2.DOCTYPE_DECL_START," ",Ce.name),ze?(_e.push(" ",g$2.PUBLIC," ",ze),qe&&qe!=="."&&_e.push(" ",qe)):qe&&qe!=="."&&_e.push(" ",g$2.SYSTEM," ",qe),Ce.internalSubset&&_e.push(" [",Ce.internalSubset,"]"),_e.push(">");return;case PROCESSING_INSTRUCTION_NODE:return _e.push("<?",Ce.target," ",Ce.data,"?>");case ENTITY_REFERENCE_NODE:return _e.push("&",Ce.nodeName,";");default:_e.push("??",Ce.nodeName)}}function importNode(Ce,_e,Ae){var Se;switch(_e.nodeType){case ELEMENT_NODE:Se=_e.cloneNode(!1),Se.ownerDocument=Ce;case DOCUMENT_FRAGMENT_NODE:break;case ATTRIBUTE_NODE:Ae=!0;break}if(Se||(Se=_e.cloneNode(!1)),Se.ownerDocument=Ce,Se.parentNode=null,Ae)for(var Ee=_e.firstChild;Ee;)Se.appendChild(importNode(Ce,Ee,Ae)),Ee=Ee.nextSibling;return Se}function cloneNode(Ce,_e,Ae){var Se=new _e.constructor(PDC);for(var Ee in _e)if(hasOwn$d(_e,Ee)){var xe=_e[Ee];typeof xe!="object"&&xe!=Se[Ee]&&(Se[Ee]=xe)}switch(_e.childNodes&&(Se.childNodes=new NodeList),Se.ownerDocument=Ce,Se.nodeType){case ELEMENT_NODE:var Te=_e.attributes,Ie=Se.attributes=new NamedNodeMap,De=Te.length;Ie._ownerElement=Se;for(var ke=0;ke<De;ke++)Se.setAttributeNode(cloneNode(Ce,Te.item(ke),!0));break;case ATTRIBUTE_NODE:Ae=!0}if(Ae)for(var Oe=_e.firstChild;Oe;)Se.appendChild(cloneNode(Ce,Oe,Ae)),Oe=Oe.nextSibling;return Se}function __set__(Ce,_e,Ae){Ce[_e]=Ae}try{if(Object.defineProperty){let Ce=function(_e){switch(_e.nodeType){case ELEMENT_NODE:case DOCUMENT_FRAGMENT_NODE:var Ae=[];for(_e=_e.firstChild;_e;)_e.nodeType!==7&&_e.nodeType!==8&&Ae.push(Ce(_e)),_e=_e.nextSibling;return Ae.join("");default:return _e.nodeValue}};Object.defineProperty(LiveNodeList.prototype,"length",{get:function(){return _updateLiveList(this),this.$$length}}),Object.defineProperty(Node$5.prototype,"textContent",{get:function(){return Ce(this)},set:function(_e){switch(this.nodeType){case ELEMENT_NODE:case DOCUMENT_FRAGMENT_NODE:for(;this.firstChild;)this.removeChild(this.firstChild);(_e||String(_e))&&this.appendChild(this.ownerDocument.createTextNode(_e));break;default:this.data=_e,this.value=_e,this.nodeValue=_e}}}),__set__=function(_e,Ae,Se){_e["$$"+Ae]=Se}}}catch(Ce){}dom$1._updateLiveList=_updateLiveList,dom$1.Attr=Attr,dom$1.CDATASection=CDATASection,dom$1.CharacterData=CharacterData,dom$1.Comment=Comment$1,dom$1.Document=Document$4,dom$1.DocumentFragment=DocumentFragment$1,dom$1.DocumentType=DocumentType,dom$1.DOMImplementation=DOMImplementation$1,dom$1.Element=Element$5,dom$1.Entity=Entity,dom$1.EntityReference=EntityReference,dom$1.LiveNodeList=LiveNodeList,dom$1.NamedNodeMap=NamedNodeMap,dom$1.Node=Node$5,dom$1.NodeList=NodeList,dom$1.Notation=Notation,dom$1.Text=Text$5,dom$1.ProcessingInstruction=ProcessingInstruction,dom$1.XMLSerializer=XMLSerializer$1;var domParser$1={},entities$2={};(function(Ce){var _e=conventions$5.freeze;Ce.XML_ENTITIES=_e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),Ce.HTML_ENTITIES=_e({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
19
19
|
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),Ce.entityMap=Ce.HTML_ENTITIES})(entities$2);var sax$1={},conventions$2=conventions$5,g$1=grammar,errors$1=errors$3,isHTMLEscapableRawTextElement=conventions$2.isHTMLEscapableRawTextElement,isHTMLMimeType$1=conventions$2.isHTMLMimeType,isHTMLRawTextElement=conventions$2.isHTMLRawTextElement,hasOwn$c=conventions$2.hasOwn,NAMESPACE$1=conventions$2.NAMESPACE,ParseError$1=errors$1.ParseError,DOMException=errors$1.DOMException,S_TAG=0,S_ATTR=1,S_ATTR_SPACE=2,S_EQ=3,S_ATTR_NOQUOT_VALUE=4,S_ATTR_END=5,S_TAG_SPACE=6,S_TAG_CLOSE=7;function XMLReader$1(){}XMLReader$1.prototype={parse:function(Ce,_e,Ae){var Se=this.domBuilder;Se.startDocument(),_copy(_e,_e=Object.create(null)),parse$a(Ce,_e,Ae,Se,this.errorHandler),Se.endDocument()}};var ENTITY_REG=/&#?\w+;?/g;function parse$a(Ce,_e,Ae,Se,Ee){var xe=isHTMLMimeType$1(Se.mimeType);Ce.indexOf(g$1.UNICODE_REPLACEMENT_CHARACTER)>=0&&Ee.warning("Unicode replacement character detected, source encoding issues?");function Te(En){if(En>65535){En-=65536;var Mn=55296+(En>>10),Hn=56320+(En&1023);return String.fromCharCode(Mn,Hn)}else return String.fromCharCode(En)}function Ie(En){var Mn=En[En.length-1]===";"?En:En+";";if(!xe&&Mn!==En)return Ee.error("EntityRef: expecting ;"),En;var Hn=g$1.Reference.exec(Mn);if(!Hn||Hn[0].length!==Mn.length)return Ee.error("entity not matching Reference production: "+En),En;var gn=Mn.slice(1,-1);return hasOwn$c(Ae,gn)?Ae[gn]:gn.charAt(0)==="#"?Te(parseInt(gn.substring(1).replace("x","0x"))):(Ee.error("entity not found:"+En),En)}function De(En){if(En>Ue){var Mn=Ce.substring(Ue,En).replace(ENTITY_REG,Ie);Pe&&Be(Ue),Se.characters(Mn,0,En-Ue),Ue=En}}var ke=0,Oe=0,Me=/\r\n?|\n|$/g,Pe=Se.locator;function Be(En,Mn){for(;En>=Oe&&(Mn=Me.exec(Ce));)ke=Oe,Oe=Mn.index+Mn[0].length,Pe.lineNumber++;Pe.columnNumber=En-ke+1}for(var Fe=[{currentNSMap:_e}],$e=[],Ue=0;;){try{var He=Ce.indexOf("<",Ue);if(He<0){if(!xe&&$e.length>0)return Ee.fatalError("unclosed xml tag(s): "+$e.join(", "));if(!Ce.substring(Ue).match(/^\s*$/)){var Ve=Se.doc,We=Ve.createTextNode(Ce.substring(Ue));if(Ve.documentElement)return Ee.error("Extra content at the end of the document");Ve.appendChild(We),Se.currentElement=We}return}if(He>Ue){var ze=Ce.substring(Ue,He);!xe&&$e.length===0&&(ze=ze.replace(new RegExp(g$1.S_OPT.source,"g"),""),ze&&Ee.error("Unexpected content outside root element: '"+ze+"'")),De(He)}switch(Ce.charAt(He+1)){case"/":var sn=Ce.indexOf(">",He+2),qe=Ce.substring(He+2,sn>0?sn:void 0);if(!qe)return Ee.fatalError("end tag name missing");var Ke=sn>0&&g$1.reg("^",g$1.QName_group,g$1.S_OPT,"$").exec(qe);if(!Ke)return Ee.fatalError('end tag name contains invalid characters: "'+qe+'"');if(!Se.currentElement&&!Se.doc.documentElement)return;var Ge=$e[$e.length-1]||Se.currentElement.tagName||Se.doc.documentElement.tagName||"";if(Ge!==Ke[1]){var Ye=Ke[1].toLowerCase();if(!xe||Ge.toLowerCase()!==Ye)return Ee.fatalError('Opening and ending tag mismatch: "'+Ge+'" != "'+qe+'"')}var Qe=Fe.pop();$e.pop();var St=Qe.localNSMap;if(Se.endElement(Qe.uri,Qe.localName,Ge),St)for(var Xe in St)hasOwn$c(St,Xe)&&Se.endPrefixMapping(Xe);sn++;break;case"?":Pe&&Be(He),sn=parseProcessingInstruction(Ce,He,Se,Ee);break;case"!":Pe&&Be(He),sn=parseDoctypeCommentOrCData(Ce,He,Se,Ee,xe);break;default:Pe&&Be(He);var Je=new ElementAttributes,rn=Fe[Fe.length-1].currentNSMap,sn=parseElementStartPart(Ce,He,Je,rn,Ie,Ee,xe),pn=Je.length;if(Je.closed||(xe&&conventions$2.isHTMLVoidElement(Je.tagName)?Je.closed=!0:$e.push(Je.tagName)),Pe&&pn){for(var mn=copyLocator(Pe,{}),yn=0;yn<pn;yn++){var xn=Je[yn];Be(xn.offset),xn.locator=copyLocator(Pe,{})}Se.locator=mn,appendElement$1(Je,Se,rn)&&Fe.push(Je),Se.locator=Pe}else appendElement$1(Je,Se,rn)&&Fe.push(Je);xe&&!Je.closed?sn=parseHtmlSpecialContent(Ce,sn,Je.tagName,Ie,Se):sn++}}catch(En){if(En instanceof ParseError$1)throw En;if(En instanceof DOMException)throw new ParseError$1(En.name+": "+En.message,Se.locator,En);Ee.error("element parse error: "+En),sn=-1}sn>Ue?Ue=sn:De(Math.max(He,Ue)+1)}}function copyLocator(Ce,_e){return _e.lineNumber=Ce.lineNumber,_e.columnNumber=Ce.columnNumber,_e}function parseElementStartPart(Ce,_e,Ae,Se,Ee,xe,Te){function Ie(Be,Fe,$e){if(hasOwn$c(Ae.attributeNames,Be))return xe.fatalError("Attribute "+Be+" redefined");if(!Te&&Fe.indexOf("<")>=0)return xe.fatalError("Unescaped '<' not allowed in attributes values");Ae.addValue(Be,Fe.replace(/[\t\n\r]/g," ").replace(ENTITY_REG,Ee),$e)}for(var De,ke,Oe=++_e,Me=S_TAG;;){var Pe=Ce.charAt(Oe);switch(Pe){case"=":if(Me===S_ATTR)De=Ce.slice(_e,Oe),Me=S_EQ;else if(Me===S_ATTR_SPACE)Me=S_EQ;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(Me===S_EQ||Me===S_ATTR)if(Me===S_ATTR&&(xe.warning('attribute value must after "="'),De=Ce.slice(_e,Oe)),_e=Oe+1,Oe=Ce.indexOf(Pe,_e),Oe>0)ke=Ce.slice(_e,Oe),Ie(De,ke,_e-1),Me=S_ATTR_END;else throw new Error("attribute value no end '"+Pe+"' match");else if(Me==S_ATTR_NOQUOT_VALUE)ke=Ce.slice(_e,Oe),Ie(De,ke,_e),xe.warning('attribute "'+De+'" missed start quot('+Pe+")!!"),_e=Oe+1,Me=S_ATTR_END;else throw new Error('attribute value must after "="');break;case"/":switch(Me){case S_TAG:Ae.setTagName(Ce.slice(_e,Oe));case S_ATTR_END:case S_TAG_SPACE:case S_TAG_CLOSE:Me=S_TAG_CLOSE,Ae.closed=!0;case S_ATTR_NOQUOT_VALUE:case S_ATTR:break;case S_ATTR_SPACE:Ae.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return xe.error("unexpected end of input"),Me==S_TAG&&Ae.setTagName(Ce.slice(_e,Oe)),Oe;case">":switch(Me){case S_TAG:Ae.setTagName(Ce.slice(_e,Oe));case S_ATTR_END:case S_TAG_SPACE:case S_TAG_CLOSE:break;case S_ATTR_NOQUOT_VALUE:case S_ATTR:ke=Ce.slice(_e,Oe),ke.slice(-1)==="/"&&(Ae.closed=!0,ke=ke.slice(0,-1));case S_ATTR_SPACE:Me===S_ATTR_SPACE&&(ke=De),Me==S_ATTR_NOQUOT_VALUE?(xe.warning('attribute "'+ke+'" missed quot(")!'),Ie(De,ke,_e)):(Te||xe.warning('attribute "'+ke+'" missed value!! "'+ke+'" instead!!'),Ie(ke,ke,_e));break;case S_EQ:if(!Te)return xe.fatalError(`AttValue: ' or " expected`)}return Oe;case"":Pe=" ";default:if(Pe<=" ")switch(Me){case S_TAG:Ae.setTagName(Ce.slice(_e,Oe)),Me=S_TAG_SPACE;break;case S_ATTR:De=Ce.slice(_e,Oe),Me=S_ATTR_SPACE;break;case S_ATTR_NOQUOT_VALUE:var ke=Ce.slice(_e,Oe);xe.warning('attribute "'+ke+'" missed quot(")!!'),Ie(De,ke,_e);case S_ATTR_END:Me=S_TAG_SPACE;break}else switch(Me){case S_ATTR_SPACE:Te||xe.warning('attribute "'+De+'" missed value!! "'+De+'" instead2!!'),Ie(De,De,_e),_e=Oe,Me=S_ATTR;break;case S_ATTR_END:xe.warning('attribute space is required"'+De+'"!!');case S_TAG_SPACE:Me=S_ATTR,_e=Oe;break;case S_EQ:Me=S_ATTR_NOQUOT_VALUE,_e=Oe;break;case S_TAG_CLOSE:throw new Error("elements closed character '/' and '>' must be connected to")}}Oe++}}function appendElement$1(Ce,_e,Ae){for(var Se=Ce.tagName,Ee=null,Me=Ce.length;Me--;){var xe=Ce[Me],Te=xe.qName,Ie=xe.value,Pe=Te.indexOf(":");if(Pe>0)var De=xe.prefix=Te.slice(0,Pe),ke=Te.slice(Pe+1),Oe=De==="xmlns"&&ke;else ke=Te,De=null,Oe=Te==="xmlns"&&"";xe.localName=ke,Oe!==!1&&(Ee==null&&(Ee=Object.create(null),_copy(Ae,Ae=Object.create(null))),Ae[Oe]=Ee[Oe]=Ie,xe.uri=NAMESPACE$1.XMLNS,_e.startPrefixMapping(Oe,Ie))}for(var Me=Ce.length;Me--;)xe=Ce[Me],xe.prefix&&(xe.prefix==="xml"&&(xe.uri=NAMESPACE$1.XML),xe.prefix!=="xmlns"&&(xe.uri=Ae[xe.prefix]));var Pe=Se.indexOf(":");Pe>0?(De=Ce.prefix=Se.slice(0,Pe),ke=Ce.localName=Se.slice(Pe+1)):(De=null,ke=Ce.localName=Se);var Be=Ce.uri=Ae[De||""];if(_e.startElement(Be,ke,Se,Ce),Ce.closed){if(_e.endElement(Be,ke,Se),Ee)for(De in Ee)hasOwn$c(Ee,De)&&_e.endPrefixMapping(De)}else return Ce.currentNSMap=Ae,Ce.localNSMap=Ee,!0}function parseHtmlSpecialContent(Ce,_e,Ae,Se,Ee){var xe=isHTMLEscapableRawTextElement(Ae);if(xe||isHTMLRawTextElement(Ae)){var Te=Ce.indexOf("</"+Ae+">",_e),Ie=Ce.substring(_e+1,Te);return xe&&(Ie=Ie.replace(ENTITY_REG,Se)),Ee.characters(Ie,0,Ie.length),Te}return _e+1}function _copy(Ce,_e){for(var Ae in Ce)hasOwn$c(Ce,Ae)&&(_e[Ae]=Ce[Ae])}function parseUtils(Ce,_e){var Ae=_e;function Se(Oe){return Oe=Oe||0,Ce.charAt(Ae+Oe)}function Ee(Oe){Oe=Oe||1,Ae+=Oe}function xe(){for(var Oe=0;Ae<Ce.length;){var Me=Se();if(Me!==" "&&Me!==`
|
|
20
20
|
`&&Me!==" "&&Me!=="\r")return Oe;Oe++,Ee()}return-1}function Te(){return Ce.substring(Ae)}function Ie(Oe){return Ce.substring(Ae,Ae+Oe.length)===Oe}function De(Oe){return Ce.substring(Ae,Ae+Oe.length).toUpperCase()===Oe.toUpperCase()}function ke(Oe){var Me=g$1.reg("^",Oe),Pe=Me.exec(Te());return Pe?(Ee(Pe[0].length),Pe[0]):null}return{char:Se,getIndex:function(){return Ae},getMatch:ke,getSource:function(){return Ce},skip:Ee,skipBlanks:xe,substringFromIndex:Te,substringStartsWith:Ie,substringStartsWithCaseInsensitive:De}}function parseDoctypeInternalSubset(Ce,_e){function Ae(Ie,De){var ke=g$1.PI.exec(Ie.substringFromIndex());return ke?ke[1].toLowerCase()==="xml"?De.fatalError("xml declaration is only allowed at the start of the document, but found at position "+Ie.getIndex()):(Ie.skip(ke[0].length),ke[0]):De.fatalError("processing instruction is not well-formed at position "+Ie.getIndex())}var Se=Ce.getSource();if(Ce.char()==="["){Ce.skip(1);for(var Ee=Ce.getIndex();Ce.getIndex()<Se.length;){if(Ce.skipBlanks(),Ce.char()==="]"){var xe=Se.substring(Ee,Ce.getIndex());return Ce.skip(1),xe}var Te=null;if(Ce.char()==="<"&&Ce.char(1)==="!")switch(Ce.char(2)){case"E":Ce.char(3)==="L"?Te=Ce.getMatch(g$1.elementdecl):Ce.char(3)==="N"&&(Te=Ce.getMatch(g$1.EntityDecl));break;case"A":Te=Ce.getMatch(g$1.AttlistDecl);break;case"N":Te=Ce.getMatch(g$1.NotationDecl);break;case"-":Te=Ce.getMatch(g$1.Comment);break}else if(Ce.char()==="<"&&Ce.char(1)==="?")Te=Ae(Ce,_e);else if(Ce.char()==="%")Te=Ce.getMatch(g$1.PEReference);else return _e.fatalError("Error detected in Markup declaration");if(!Te)return _e.fatalError("Error in internal subset at position "+Ce.getIndex())}return _e.fatalError("doctype internal subset is not well-formed, missing ]")}}function parseDoctypeCommentOrCData(Ce,_e,Ae,Se,Ee){var xe=parseUtils(Ce,_e);switch(Ee?xe.char(2).toUpperCase():xe.char(2)){case"-":var Te=xe.getMatch(g$1.Comment);return Te?(Ae.comment(Te,g$1.COMMENT_START.length,Te.length-g$1.COMMENT_START.length-g$1.COMMENT_END.length),xe.getIndex()):Se.fatalError("comment is not well-formed at position "+xe.getIndex());case"[":var Ie=xe.getMatch(g$1.CDSect);return Ie?!Ee&&!Ae.currentElement?Se.fatalError("CDATA outside of element"):(Ae.startCDATA(),Ae.characters(Ie,g$1.CDATA_START.length,Ie.length-g$1.CDATA_START.length-g$1.CDATA_END.length),Ae.endCDATA(),xe.getIndex()):Se.fatalError("Invalid CDATA starting at position "+_e);case"D":{if(Ae.doc&&Ae.doc.documentElement)return Se.fatalError("Doctype not allowed inside or after documentElement at position "+xe.getIndex());if(Ee?!xe.substringStartsWithCaseInsensitive(g$1.DOCTYPE_DECL_START):!xe.substringStartsWith(g$1.DOCTYPE_DECL_START))return Se.fatalError("Expected "+g$1.DOCTYPE_DECL_START+" at position "+xe.getIndex());if(xe.skip(g$1.DOCTYPE_DECL_START.length),xe.skipBlanks()<1)return Se.fatalError("Expected whitespace after "+g$1.DOCTYPE_DECL_START+" at position "+xe.getIndex());var De={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(De.name=xe.getMatch(g$1.Name),!De.name)return Se.fatalError("doctype name missing or contains unexpected characters at position "+xe.getIndex());if(Ee&&De.name.toLowerCase()!=="html"&&Se.warning("Unexpected DOCTYPE in HTML document at position "+xe.getIndex()),xe.skipBlanks(),xe.substringStartsWith(g$1.PUBLIC)||xe.substringStartsWith(g$1.SYSTEM)){var ke=g$1.ExternalID_match.exec(xe.substringFromIndex());if(!ke)return Se.fatalError("doctype external id is not well-formed at position "+xe.getIndex());ke.groups.SystemLiteralOnly!==void 0?De.systemId=ke.groups.SystemLiteralOnly:(De.systemId=ke.groups.SystemLiteral,De.publicId=ke.groups.PubidLiteral),xe.skip(ke[0].length)}else if(Ee&&xe.substringStartsWithCaseInsensitive(g$1.SYSTEM)){if(xe.skip(g$1.SYSTEM.length),xe.skipBlanks()<1)return Se.fatalError("Expected whitespace after "+g$1.SYSTEM+" at position "+xe.getIndex());if(De.systemId=xe.getMatch(g$1.ABOUT_LEGACY_COMPAT_SystemLiteral),!De.systemId)return Se.fatalError("Expected "+g$1.ABOUT_LEGACY_COMPAT+" in single or double quotes after "+g$1.SYSTEM+" at position "+xe.getIndex())}return Ee&&De.systemId&&!g$1.ABOUT_LEGACY_COMPAT_SystemLiteral.test(De.systemId)&&Se.warning("Unexpected doctype.systemId in HTML document at position "+xe.getIndex()),Ee||(xe.skipBlanks(),De.internalSubset=parseDoctypeInternalSubset(xe,Se)),xe.skipBlanks(),xe.char()!==">"?Se.fatalError("doctype not terminated with > at position "+xe.getIndex()):(xe.skip(1),Ae.startDTD(De.name,De.publicId,De.systemId,De.internalSubset),Ae.endDTD(),xe.getIndex())}default:return Se.fatalError('Not well-formed XML starting with "<!" at position '+_e)}}function parseProcessingInstruction(Ce,_e,Ae,Se){var Ee=Ce.substring(_e).match(g$1.PI);if(!Ee)return Se.fatalError("Invalid processing instruction starting at position "+_e);if(Ee[1].toLowerCase()==="xml"){if(_e>0)return Se.fatalError("processing instruction at position "+_e+" is an xml declaration which is only at the start of the document");if(!g$1.XMLDecl.test(Ce.substring(_e)))return Se.fatalError("xml declaration is not well-formed")}return Ae.processingInstruction(Ee[1],Ee[2]),_e+Ee[0].length}function ElementAttributes(){this.attributeNames=Object.create(null)}ElementAttributes.prototype={setTagName:function(Ce){if(!g$1.QName_exact.test(Ce))throw new Error("invalid tagName:"+Ce);this.tagName=Ce},addValue:function(Ce,_e,Ae){if(!g$1.QName_exact.test(Ce))throw new Error("invalid attribute:"+Ce);this.attributeNames[Ce]=this.length,this[this.length++]={qName:Ce,value:_e,offset:Ae}},length:0,getLocalName:function(Ce){return this[Ce].localName},getLocator:function(Ce){return this[Ce].locator},getQName:function(Ce){return this[Ce].qName},getURI:function(Ce){return this[Ce].uri},getValue:function(Ce){return this[Ce].value}},sax$1.XMLReader=XMLReader$1,sax$1.parseUtils=parseUtils,sax$1.parseDoctypeCommentOrCData=parseDoctypeCommentOrCData;var conventions$1=conventions$5,dom=dom$1,errors=errors$3,entities$1=entities$2,sax=sax$1,DOMImplementation=dom.DOMImplementation,hasDefaultHTMLNamespace=conventions$1.hasDefaultHTMLNamespace,isHTMLMimeType=conventions$1.isHTMLMimeType,isValidMimeType=conventions$1.isValidMimeType,MIME_TYPE=conventions$1.MIME_TYPE,NAMESPACE=conventions$1.NAMESPACE,ParseError=errors.ParseError,XMLReader=sax.XMLReader;function normalizeLineEndings(Ce){return Ce.replace(/\r[\n\u0085]/g,`
|
|
21
21
|
`).replace(/[\r\u0085\u2028\u2029]/g,`
|
|
22
22
|
`)}function DOMParser$3(Ce){if(Ce=Ce||{},Ce.locator===void 0&&(Ce.locator=!0),this.assign=Ce.assign||conventions$1.assign,this.domHandler=Ce.domHandler||DOMHandler,this.onError=Ce.onError||Ce.errorHandler,Ce.errorHandler&&typeof Ce.errorHandler!="function")throw new TypeError("errorHandler object is no longer supported, switch to onError!");Ce.errorHandler&&Ce.errorHandler("warning","The `errorHandler` option has been deprecated, use `onError` instead!",this),this.normalizeLineEndings=Ce.normalizeLineEndings||normalizeLineEndings,this.locator=!!Ce.locator,this.xmlns=this.assign(Object.create(null),Ce.xmlns)}DOMParser$3.prototype.parseFromString=function(Ce,_e){if(!isValidMimeType(_e))throw new TypeError('DOMParser.parseFromString: the provided mimeType "'+_e+'" is not valid.');var Ae=this.assign(Object.create(null),this.xmlns),Se=entities$1.XML_ENTITIES,Ee=Ae[""]||null;hasDefaultHTMLNamespace(_e)?(Se=entities$1.HTML_ENTITIES,Ee=NAMESPACE.HTML):_e===MIME_TYPE.XML_SVG_IMAGE&&(Ee=NAMESPACE.SVG),Ae[""]=Ee,Ae.xml=Ae.xml||NAMESPACE.XML;var xe=new this.domHandler({mimeType:_e,defaultNamespace:Ee,onError:this.onError}),Te=this.locator?{}:void 0;this.locator&&xe.setDocumentLocator(Te);var Ie=new XMLReader;Ie.errorHandler=xe,Ie.domBuilder=xe;var De=!conventions$1.isHTMLMimeType(_e);return De&&typeof Ce!="string"&&Ie.errorHandler.fatalError("source is not a string"),Ie.parse(this.normalizeLineEndings(String(Ce)),Ae,Se),xe.doc.documentElement||Ie.errorHandler.fatalError("missing root element"),xe.doc};function DOMHandler(Ce){var _e=Ce||{};this.mimeType=_e.mimeType||MIME_TYPE.XML_APPLICATION,this.defaultNamespace=_e.defaultNamespace||null,this.cdata=!1,this.currentElement=void 0,this.doc=void 0,this.locator=void 0,this.onError=_e.onError}function position$3(Ce,_e){_e.lineNumber=Ce.lineNumber,_e.columnNumber=Ce.columnNumber}DOMHandler.prototype={startDocument:function(){var Ce=new DOMImplementation;this.doc=isHTMLMimeType(this.mimeType)?Ce.createHTMLDocument(!1):Ce.createDocument(this.defaultNamespace,"")},startElement:function(Ce,_e,Ae,Se){var Ee=this.doc,xe=Ee.createElementNS(Ce,Ae||_e),Te=Se.length;appendElement(this,xe),this.currentElement=xe,this.locator&&position$3(this.locator,xe);for(var Ie=0;Ie<Te;Ie++){var Ce=Se.getURI(Ie),De=Se.getValue(Ie),Ae=Se.getQName(Ie),ke=Ee.createAttributeNS(Ce,Ae);this.locator&&position$3(Se.getLocator(Ie),ke),ke.value=ke.nodeValue=De,xe.setAttributeNode(ke)}},endElement:function(Ce,_e,Ae){this.currentElement=this.currentElement.parentNode},startPrefixMapping:function(Ce,_e){},endPrefixMapping:function(Ce){},processingInstruction:function(Ce,_e){var Ae=this.doc.createProcessingInstruction(Ce,_e);this.locator&&position$3(this.locator,Ae),appendElement(this,Ae)},ignorableWhitespace:function(Ce,_e,Ae){},characters:function(Ce,_e,Ae){if(Ce=_toString.apply(this,arguments),Ce){if(this.cdata)var Se=this.doc.createCDATASection(Ce);else var Se=this.doc.createTextNode(Ce);this.currentElement?this.currentElement.appendChild(Se):/^\s*$/.test(Ce)&&this.doc.appendChild(Se),this.locator&&position$3(this.locator,Se)}},skippedEntity:function(Ce){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(Ce){Ce&&(Ce.lineNumber=0),this.locator=Ce},comment:function(Ce,_e,Ae){Ce=_toString.apply(this,arguments);var Se=this.doc.createComment(Ce);this.locator&&position$3(this.locator,Se),appendElement(this,Se)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(Ce,_e,Ae,Se){var Ee=this.doc.implementation;if(Ee&&Ee.createDocumentType){var xe=Ee.createDocumentType(Ce,_e,Ae,Se);this.locator&&position$3(this.locator,xe),appendElement(this,xe),this.doc.doctype=xe}},reportError:function(Ce,_e){if(typeof this.onError=="function")try{this.onError(Ce,_e,this)}catch(Ae){throw new ParseError("Reporting "+Ce+' "'+_e+'" caused '+Ae,this.locator)}else console.error("[xmldom "+Ce+"] "+_e,_locator(this.locator))},warning:function(Ce){this.reportError("warning",Ce)},error:function(Ce){this.reportError("error",Ce)},fatalError:function(Ce){throw this.reportError("fatalError",Ce),new ParseError(Ce,this.locator)}};function _locator(Ce){if(Ce)return`
|
|
23
|
-
@#[line:`+Ce.lineNumber+",col:"+Ce.columnNumber+"]"}function _toString(Ce,_e,Ae){return typeof Ce=="string"?Ce.substr(_e,Ae):Ce.length>=_e+Ae||_e?new java.lang.String(Ce,_e,Ae)+"":Ce}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(Ce){DOMHandler.prototype[Ce]=function(){return null}});function appendElement(Ce,_e){Ce.currentElement?Ce.currentElement.appendChild(_e):Ce.doc.appendChild(_e)}function onErrorStopParsing(Ce){if(Ce==="error")throw"onErrorStopParsing"}function onWarningStopParsing(){throw"onWarningStopParsing"}domParser$1.__DOMHandler=DOMHandler,domParser$1.DOMParser=DOMParser$3,domParser$1.normalizeLineEndings=normalizeLineEndings,domParser$1.onErrorStopParsing=onErrorStopParsing,domParser$1.onWarningStopParsing=onWarningStopParsing;var conventions=conventions$5;conventions.assign,conventions.hasDefaultHTMLNamespace,conventions.isHTMLMimeType,conventions.isValidMimeType,conventions.MIME_TYPE,conventions.NAMESPACE;var domParser=domParser$1,DOMParser$2=domParser.DOMParser;async function fetchAPI$1(Ce){console.log("fetchAPI");const _e={dbType:"TIDB",filter:{id:`${Ce}`}},Ae="https://igs.gov-cloud.ai/pi-entity-instances-service/v2.0/schemas/6941203a98f23e7f0271b402/instances/list?page=0&size=
|
|
23
|
+
@#[line:`+Ce.lineNumber+",col:"+Ce.columnNumber+"]"}function _toString(Ce,_e,Ae){return typeof Ce=="string"?Ce.substr(_e,Ae):Ce.length>=_e+Ae||_e?new java.lang.String(Ce,_e,Ae)+"":Ce}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(Ce){DOMHandler.prototype[Ce]=function(){return null}});function appendElement(Ce,_e){Ce.currentElement?Ce.currentElement.appendChild(_e):Ce.doc.appendChild(_e)}function onErrorStopParsing(Ce){if(Ce==="error")throw"onErrorStopParsing"}function onWarningStopParsing(){throw"onWarningStopParsing"}domParser$1.__DOMHandler=DOMHandler,domParser$1.DOMParser=DOMParser$3,domParser$1.normalizeLineEndings=normalizeLineEndings,domParser$1.onErrorStopParsing=onErrorStopParsing,domParser$1.onWarningStopParsing=onWarningStopParsing;var conventions=conventions$5;conventions.assign,conventions.hasDefaultHTMLNamespace,conventions.isHTMLMimeType,conventions.isValidMimeType,conventions.MIME_TYPE,conventions.NAMESPACE;var domParser=domParser$1,DOMParser$2=domParser.DOMParser;async function fetchAPI$1(Ce){console.log("fetchAPI");const _e={dbType:"TIDB",filter:{id:`${Ce}`}},Ae="https://igs.gov-cloud.ai/pi-entity-instances-service/v2.0/schemas/6941203a98f23e7f0271b402/instances/list?page=0&size=1&sort=updatedAt,DESC",Se="post",Ee="eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3Ny1NUVdFRTNHZE5adGlsWU5IYmpsa2dVSkpaWUJWVmN1UmFZdHl5ejFjIn0.eyJleHAiOjE3MjYxODIzMzEsImlhdCI6MTcyNjE0NjMzMSwianRpIjoiOGVlZTU1MDctNGVlOC00NjE1LTg3OWUtNTVkMjViMjQ2MGFmIiwiaXNzIjoiaHR0cDovL2tleWNsb2FrLmtleWNsb2FrLnN2Yy5jbHVzdGVyLmxvY2FsOjgwODAvcmVhbG1zL21hc3RlciIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJIT0xBQ1JBQ1kiLCJzZXNzaW9uX3N0YXRlIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwibmFtZSI6ImtzYW14cCBrc2FteHAiLCJnaXZlbl9uYW1lIjoia3NhbXhwIiwiZmFtaWx5X25hbWUiOiJrc2FteHAiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWwiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiLyoiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZmF1bHQtcm9sZXMtbWFzdGVyIiwib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7IkhPTEFDUkFDWSI6eyJyb2xlcyI6WyJIT0xBQ1JBQ1lfVVNFUiJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJwcm9maWxlIGVtYWlsIiwic2lkIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwidGVuYW50SWQiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJyZXF1ZXN0ZXJUeXBlIjoiVEVOQU5UIn0=.FXeDyHBhlG9L4_NCeSyHEaNEBVmhFpfSBqlcbhHaPaoydhKcA0BfuyHgxg_32kQk6z5S9IQ7nVKS2ybtOvwo0WyLWwLQchSq7Noa7LooHIMzmeWMQb_bLKtbaOti59zwIdS8CkfGaXut7RUQKISQVWmbUGsVJQa2JkG6Ng_QN0y5hFVksMWPZiXVsofQkJXHXV1CQ3gabhhHKo3BqlJwzpsCKLDfg1-4PmSl1Wqbw03Ef2yolroj5i8FoeHukOQPkwCUHrrNw-ilIp917nqZa89YbCMtDjWyaj8pEH7GJR5vMZPE2WcJPn5dSA1IHVunfatEB1cDAitaFjVNWNnddQ";try{return await(await fetch(Ae,{method:Se,body:JSON.stringify(_e),headers:{Accept:"*/*",Authorization:`Bearer ${Ee}`,"Content-Type":"application/json"}})).json()}catch(xe){return console.error("Error fetching API:",xe),null}}async function getVariablesOfTopic(Ce){console.log("fetchAPI");const _e={dbType:"TIDB",filter:{topic:`${Ce}`}},Ae="https://igs.gov-cloud.ai/pi-entity-instances-service/v2.0/schemas/67e5155b329c5c378a2caa26/instances/list?page=0&size=3000",Se="post",Ee="eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3Ny1NUVdFRTNHZE5adGlsWU5IYmpsa2dVSkpaWUJWVmN1UmFZdHl5ejFjIn0.eyJleHAiOjE3MjYxODIzMzEsImlhdCI6MTcyNjE0NjMzMSwianRpIjoiOGVlZTU1MDctNGVlOC00NjE1LTg3OWUtNTVkMjViMjQ2MGFmIiwiaXNzIjoiaHR0cDovL2tleWNsb2FrLmtleWNsb2FrLnN2Yy5jbHVzdGVyLmxvY2FsOjgwODAvcmVhbG1zL21hc3RlciIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJIT0xBQ1JBQ1kiLCJzZXNzaW9uX3N0YXRlIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwibmFtZSI6ImtzYW14cCBrc2FteHAiLCJnaXZlbl9uYW1lIjoia3NhbXhwIiwiZmFtaWx5X25hbWUiOiJrc2FteHAiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWwiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiLyoiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZmF1bHQtcm9sZXMtbWFzdGVyIiwib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7IkhPTEFDUkFDWSI6eyJyb2xlcyI6WyJIT0xBQ1JBQ1lfVVNFUiJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJwcm9maWxlIGVtYWlsIiwic2lkIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwidGVuYW50SWQiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJyZXF1ZXN0ZXJUeXBlIjoiVEVOQU5UIn0=.FXeDyHBhlG9L4_NCeSyHEaNEBVmhFpfSBqlcbhHaPaoydhKcA0BfuyHgxg_32kQk6z5S9IQ7nVKS2ybtOvwo0WyLWwLQchSq7Noa7LooHIMzmeWMQb_bLKtbaOti59zwIdS8CkfGaXut7RUQKISQVWmbUGsVJQa2JkG6Ng_QN0y5hFVksMWPZiXVsofQkJXHXV1CQ3gabhhHKo3BqlJwzpsCKLDfg1-4PmSl1Wqbw03Ef2yolroj5i8FoeHukOQPkwCUHrrNw-ilIp917nqZa89YbCMtDjWyaj8pEH7GJR5vMZPE2WcJPn5dSA1IHVunfatEB1cDAitaFjVNWNnddQ";try{return await(await fetch(Ae,{method:Se,body:JSON.stringify(_e),headers:{Accept:"*/*",Authorization:`Bearer ${Ee}`,"Content-Type":"application/json"}})).json()}catch(xe){return console.error("Error fetching API:",xe),null}}async function fetchAPIXSLT(Ce,_e){console.log("fetchAPI");const Ae={data:[{content:`${_e}`,topicId:`${Ce}`}]},Se="https://igs.gov-cloud.ai/pi-entity-instances-service/v2.0/schemas/67c024f0202d997c3d74ed4e/instances",Ee="post",xe="eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3Ny1NUVdFRTNHZE5adGlsWU5IYmpsa2dVSkpaWUJWVmN1UmFZdHl5ejFjIn0.eyJleHAiOjE3MjYxODIzMzEsImlhdCI6MTcyNjE0NjMzMSwianRpIjoiOGVlZTU1MDctNGVlOC00NjE1LTg3OWUtNTVkMjViMjQ2MGFmIiwiaXNzIjoiaHR0cDovL2tleWNsb2FrLmtleWNsb2FrLnN2Yy5jbHVzdGVyLmxvY2FsOjgwODAvcmVhbG1zL21hc3RlciIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJIT0xBQ1JBQ1kiLCJzZXNzaW9uX3N0YXRlIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwibmFtZSI6ImtzYW14cCBrc2FteHAiLCJnaXZlbl9uYW1lIjoia3NhbXhwIiwiZmFtaWx5X25hbWUiOiJrc2FteHAiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWwiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiLyoiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZmF1bHQtcm9sZXMtbWFzdGVyIiwib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7IkhPTEFDUkFDWSI6eyJyb2xlcyI6WyJIT0xBQ1JBQ1lfVVNFUiJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJwcm9maWxlIGVtYWlsIiwic2lkIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwidGVuYW50SWQiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJyZXF1ZXN0ZXJUeXBlIjoiVEVOQU5UIn0=.FXeDyHBhlG9L4_NCeSyHEaNEBVmhFpfSBqlcbhHaPaoydhKcA0BfuyHgxg_32kQk6z5S9IQ7nVKS2ybtOvwo0WyLWwLQchSq7Noa7LooHIMzmeWMQb_bLKtbaOti59zwIdS8CkfGaXut7RUQKISQVWmbUGsVJQa2JkG6Ng_QN0y5hFVksMWPZiXVsofQkJXHXV1CQ3gabhhHKo3BqlJwzpsCKLDfg1-4PmSl1Wqbw03Ef2yolroj5i8FoeHukOQPkwCUHrrNw-ilIp917nqZa89YbCMtDjWyaj8pEH7GJR5vMZPE2WcJPn5dSA1IHVunfatEB1cDAitaFjVNWNnddQ";try{const Ie=await(await fetch(Se,{method:Ee,body:JSON.stringify(Ae),headers:{Accept:"*/*",Authorization:`Bearer ${xe}`,"Content-Type":"application/json"}})).json();return console.log("API Response - XSLT generated"),Ie}catch(Te){return console.error("Error fetching API:",Te),null}}function getTopic(Ce){const Se=new DOMParser$2().parseFromString(Ce,"application/xml").getElementsByTagName("topic")[0];if(!Se)return"Invalid XML";const Ee=Se.getAttribute("id")||"default_id";let xe=new Set;function Te(Oe,Me){if(Oe.nodeType===Node.ELEMENT_NODE){const Pe=Oe,Be=Pe.tagName.toLowerCase();for(let Fe of Oe.childNodes)Fe.nodeType===Node.ELEMENT_NODE&&Te(Fe,`${Me}/${Fe.tagName.toLowerCase()}`);Be==="p"&&(xe.add(Me),/\{.+?\}/.test(Pe.textContent||"")&&xe.add(Me)),(Be==="image"||Be==="object")&&xe.add(Me)}}const Ie=Se.getElementsByTagName("body")[0];Ie&&Te(Ie,"topic/body");const ke=`
|
|
24
24
|
<xsl:apply-templates select="${Array.from(xe).map(Oe=>`$templateFile/${Oe}`).join(" | ")}" />
|
|
25
25
|
`;return`<topic id="${Ee}">
|
|
26
26
|
<!-- Title dynamically inserted from the template -->
|
|
@@ -318,7 +318,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Mn=mn,En=yn),xn===void
|
|
|
318
318
|
`},{className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},{className:"string",begin:"(\\+|-)\\d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}return subunit_1=Ce,subunit_1}var swift_1,hasRequiredSwift;function requireSwift(){if(hasRequiredSwift)return swift_1;hasRequiredSwift=1;function Ce(Ye){return Ye?typeof Ye=="string"?Ye:Ye.source:null}function _e(Ye){return Ae("(?=",Ye,")")}function Ae(...Ye){return Ye.map(St=>Ce(St)).join("")}function Se(Ye){const Qe=Ye[Ye.length-1];return typeof Qe=="object"&&Qe.constructor===Object?(Ye.splice(Ye.length-1,1),Qe):{}}function Ee(...Ye){return"("+(Se(Ye).capture?"":"?:")+Ye.map(Xe=>Ce(Xe)).join("|")+")"}const xe=Ye=>Ae(/\b/,Ye,/\w$/.test(Ye)?/\b/:/\B/),Te=["Protocol","Type"].map(xe),Ie=["init","self"].map(xe),De=["Any","Self"],ke=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],Oe=["false","nil","true"],Me=["assignment","associativity","higherThan","left","lowerThan","none","right"],Pe=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Be=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Fe=Ee(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),$e=Ee(Fe,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Ue=Ae(Fe,$e,"*"),He=Ee(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Ve=Ee(He,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),We=Ae(He,Ve,"*"),ze=Ae(/[A-Z]/,Ve,"*"),qe=["attached","autoclosure",Ae(/convention\(/,Ee("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Ae(/objc\(/,We,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Ke=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function Ge(Ye){const Qe={match:/\s+/,relevance:0},St=Ye.COMMENT("/\\*","\\*/",{contains:["self"]}),Xe=[Ye.C_LINE_COMMENT_MODE,St],Je={match:[/\./,Ee(...Te,...Ie)],className:{2:"keyword"}},rn={match:Ae(/\./,Ee(...ke)),relevance:0},sn=ke.filter(lo=>typeof lo=="string").concat(["_|0"]),pn=ke.filter(lo=>typeof lo!="string").concat(De).map(xe),mn={variants:[{className:"keyword",match:Ee(...pn,...Ie)}]},yn={$pattern:Ee(/\b\w+/,/#\w+/),keyword:sn.concat(Pe),literal:Oe},xn=[Je,rn,mn],En={match:Ae(/\./,Ee(...Be)),relevance:0},Mn={className:"built_in",match:Ae(/\b/,Ee(...Be),/(?=\()/)},Hn=[En,Mn],gn={match:/->/,relevance:0},Rn={className:"operator",relevance:0,variants:[{match:Ue},{match:`\\.(\\.|${$e})+`}]},On=[gn,Rn],Fn="([0-9]_*)+",Dn="([0-9a-fA-F]_*)+",hn={className:"number",relevance:0,variants:[{match:`\\b(${Fn})(\\.(${Fn}))?([eE][+-]?(${Fn}))?\\b`},{match:`\\b0x(${Dn})(\\.(${Dn}))?([pP][+-]?(${Fn}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},dn=(lo="")=>({className:"subst",variants:[{match:Ae(/\\/,lo,/[0\\tnr"']/)},{match:Ae(/\\/,lo,/u\{[0-9a-fA-F]{1,8}\}/)}]}),Pn=(lo="")=>({className:"subst",match:Ae(/\\/,lo,/[\t ]*(?:[\r\n]|\r\n)/)}),Bn=(lo="")=>({className:"subst",label:"interpol",begin:Ae(/\\/,lo,/\(/),end:/\)/}),ti=(lo="")=>({begin:Ae(lo,/"""/),end:Ae(/"""/,lo),contains:[dn(lo),Pn(lo),Bn(lo)]}),jn=(lo="")=>({begin:Ae(lo,/"/),end:Ae(/"/,lo),contains:[dn(lo),Bn(lo)]}),mi={className:"string",variants:[ti(),ti("#"),ti("##"),ti("###"),jn(),jn("#"),jn("##"),jn("###")]},Vi=[Ye.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[Ye.BACKSLASH_ESCAPE]}],Fi={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:Vi},vi=lo=>{const Vo=Ae(lo,/\//),Do=Ae(/\//,lo);return{begin:Vo,end:Do,contains:[...Vi,{scope:"comment",begin:`#(?!.*${Do})`,end:/$/}]}},sr={scope:"regexp",variants:[vi("###"),vi("##"),vi("#"),Fi]},Qi={match:Ae(/`/,We,/`/)},cr={className:"variable",match:/\$\d+/},ir={className:"variable",match:`\\$${Ve}+`},vr=[Qi,cr,ir],Lr={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Ke,contains:[...On,hn,mi]}]}},fr={scope:"keyword",match:Ae(/@/,Ee(...qe),_e(Ee(/\(/,/\s+/)))},mr={scope:"meta",match:Ae(/@/,We)},Gr=[Lr,fr,mr],Nr={match:_e(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Ae(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Ve,"+")},{className:"type",match:ze,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Ae(/\s+&\s+/,_e(ze)),relevance:0}]},ui={begin:/</,end:/>/,keywords:yn,contains:[...Xe,...xn,...Gr,gn,Nr]};Nr.contains.push(ui);const zn={match:Ae(We,/\s*:/),keywords:"_|0",relevance:0},Yn={begin:/\(/,end:/\)/,relevance:0,keywords:yn,contains:["self",zn,...Xe,sr,...xn,...Hn,...On,hn,mi,...vr,...Gr,Nr]},gi={begin:/</,end:/>/,keywords:"repeat each",contains:[...Xe,Nr]},Si={begin:Ee(_e(Ae(We,/\s*:/)),_e(Ae(We,/\s+/,We,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:We}]},Ui={begin:/\(/,end:/\)/,keywords:yn,contains:[Si,...Xe,...xn,...On,hn,mi,...Gr,Nr,Yn],endsParent:!0,illegal:/["']/},li={match:[/(func|macro)/,/\s+/,Ee(Qi.match,We,Ue)],className:{1:"keyword",3:"title.function"},contains:[gi,Ui,Qe],illegal:[/\[/,/%/]},ar={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[gi,Ui,Qe],illegal:/\[|%/},Ar={match:[/operator/,/\s+/,Ue],className:{1:"keyword",3:"title"}},Er={begin:[/precedencegroup/,/\s+/,ze],className:{1:"keyword",3:"title"},contains:[Nr],keywords:[...Me,...Oe],end:/}/},xr={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Wr={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Yr={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,We,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:yn,contains:[gi,...xn,{begin:/:/,end:/\{/,keywords:yn,contains:[{scope:"title.class.inherited",match:ze},...xn],relevance:0}]};for(const lo of mi.variants){const Vo=lo.contains.find(To=>To.label==="interpol");Vo.keywords=yn;const Do=[...xn,...Hn,...On,hn,mi,...vr];Vo.contains=[...Do,{begin:/\(/,end:/\)/,contains:["self",...Do]}]}return{name:"Swift",keywords:yn,contains:[...Xe,li,ar,xr,Wr,Yr,Ar,Er,{beginKeywords:"import",end:/$/,contains:[...Xe],relevance:0},sr,...xn,...Hn,...On,hn,mi,...vr,...Gr,Nr,Yn]}}return swift_1=Ge,swift_1}var taggerscript_1,hasRequiredTaggerscript;function requireTaggerscript(){if(hasRequiredTaggerscript)return taggerscript_1;hasRequiredTaggerscript=1;function Ce(_e){return{name:"Tagger Script",contains:[{className:"comment",begin:/\$noop\(/,end:/\)/,contains:[{begin:/\\[()]/},{begin:/\(/,end:/\)/,contains:[{begin:/\\[()]/},"self"]}],relevance:10},{className:"keyword",begin:/\$[_a-zA-Z0-9]+(?=\()/},{className:"variable",begin:/%[_a-zA-Z0-9:]+%/},{className:"symbol",begin:/\\[\\nt$%,()]/},{className:"symbol",begin:/\\u[a-fA-F0-9]{4}/}]}}return taggerscript_1=Ce,taggerscript_1}var yaml_1,hasRequiredYaml;function requireYaml(){if(hasRequiredYaml)return yaml_1;hasRequiredYaml=1;function Ce(_e){const Ae="true false yes no null",Se="[\\w#;/?:@&=+$,.~*'()[\\]]+",Ee={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},xe={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},Te={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},Ie={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[_e.BACKSLASH_ESCAPE,xe]},De=_e.inherit(Ie,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),Be={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},Fe={end:",",endsWithParent:!0,excludeEnd:!0,keywords:Ae,relevance:0},$e={begin:/\{/,end:/\}/,contains:[Fe],illegal:"\\n",relevance:0},Ue={begin:"\\[",end:"\\]",contains:[Fe],illegal:"\\n",relevance:0},He=[Ee,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+Se},{className:"type",begin:"!<"+Se+">"},{className:"type",begin:"!"+Se},{className:"type",begin:"!!"+Se},{className:"meta",begin:"&"+_e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+_e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},_e.HASH_COMMENT_MODE,{beginKeywords:Ae,keywords:{literal:Ae}},Be,{className:"number",begin:_e.C_NUMBER_RE+"\\b",relevance:0},$e,Ue,Te,Ie],Ve=[...He];return Ve.pop(),Ve.push(De),Fe.contains=Ve,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:He}}return yaml_1=Ce,yaml_1}var tap_1,hasRequiredTap;function requireTap(){if(hasRequiredTap)return tap_1;hasRequiredTap=1;function Ce(_e){return{name:"Test Anything Protocol",case_insensitive:!0,contains:[_e.HASH_COMMENT_MODE,{className:"meta",variants:[{begin:"^TAP version (\\d+)$"},{begin:"^1\\.\\.(\\d+)$"}]},{begin:/---$/,end:"\\.\\.\\.$",subLanguage:"yaml",relevance:0},{className:"number",begin:" (\\d+) "},{className:"symbol",variants:[{begin:"^ok"},{begin:"^not ok"}]}]}}return tap_1=Ce,tap_1}var tcl_1,hasRequiredTcl;function requireTcl(){if(hasRequiredTcl)return tcl_1;hasRequiredTcl=1;function Ce(_e){const Ae=_e.regex,Se=/[a-zA-Z_][a-zA-Z0-9_]*/,Ee={className:"number",variants:[_e.BINARY_NUMBER_MODE,_e.C_NUMBER_MODE]};return{name:"Tcl",aliases:["tk"],keywords:["after","append","apply","array","auto_execok","auto_import","auto_load","auto_mkindex","auto_mkindex_old","auto_qualify","auto_reset","bgerror","binary","break","catch","cd","chan","clock","close","concat","continue","dde","dict","encoding","eof","error","eval","exec","exit","expr","fblocked","fconfigure","fcopy","file","fileevent","filename","flush","for","foreach","format","gets","glob","global","history","http","if","incr","info","interp","join","lappend|10","lassign|10","lindex|10","linsert|10","list","llength|10","load","lrange|10","lrepeat|10","lreplace|10","lreverse|10","lsearch|10","lset|10","lsort|10","mathfunc","mathop","memory","msgcat","namespace","open","package","parray","pid","pkg::create","pkg_mkIndex","platform","platform::shell","proc","puts","pwd","read","refchan","regexp","registry","regsub|10","rename","return","safe","scan","seek","set","socket","source","split","string","subst","switch","tcl_endOfWord","tcl_findLibrary","tcl_startOfNextWord","tcl_startOfPreviousWord","tcl_wordBreakAfter","tcl_wordBreakBefore","tcltest","tclvars","tell","time","tm","trace","unknown","unload","unset","update","uplevel","upvar","variable","vwait","while"],contains:[_e.COMMENT(";[ \\t]*#","$"),_e.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"title",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",variants:[{begin:Ae.concat(/\$/,Ae.optional(/::/),Se,"(::",Se,")*")},{begin:"\\$\\{(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"\\}",contains:[Ee]}]},{className:"string",contains:[_e.BACKSLASH_ESCAPE],variants:[_e.inherit(_e.QUOTE_STRING_MODE,{illegal:null})]},Ee]}}return tcl_1=Ce,tcl_1}var thrift_1,hasRequiredThrift;function requireThrift(){if(hasRequiredThrift)return thrift_1;hasRequiredThrift=1;function Ce(_e){const Ae=["bool","byte","i16","i32","i64","double","string","binary"];return{name:"Thrift",keywords:{keyword:["namespace","const","typedef","struct","enum","service","exception","void","oneway","set","list","map","required","optional"],type:Ae,literal:"true false"},contains:[_e.QUOTE_STRING_MODE,_e.NUMBER_MODE,_e.C_LINE_COMMENT_MODE,_e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[_e.inherit(_e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",keywords:{type:[...Ae,"set","list","map"]},end:">",contains:["self"]}]}}return thrift_1=Ce,thrift_1}var tp_1,hasRequiredTp;function requireTp(){if(hasRequiredTp)return tp_1;hasRequiredTp=1;function Ce(_e){const Ae={className:"number",begin:"[1-9][0-9]*",relevance:0},Se={className:"symbol",begin:":[^\\]]+"},Ee={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",Ae,Se]},xe={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",Ae,_e.QUOTE_STRING_MODE,Se]};return{name:"TP",keywords:{keyword:["ABORT","ACC","ADJUST","AND","AP_LD","BREAK","CALL","CNT","COL","CONDITION","CONFIG","DA","DB","DIV","DETECT","ELSE","END","ENDFOR","ERR_NUM","ERROR_PROG","FINE","FOR","GP","GUARD","INC","IF","JMP","LINEAR_MAX_SPEED","LOCK","MOD","MONITOR","OFFSET","Offset","OR","OVERRIDE","PAUSE","PREG","PTH","RT_LD","RUN","SELECT","SKIP","Skip","TA","TB","TO","TOOL_OFFSET","Tool_Offset","UF","UT","UFRAME_NUM","UTOOL_NUM","UNLOCK","WAIT","X","Y","Z","W","P","R","STRLEN","SUBSTR","FINDSTR","VOFFSET","PROG","ATTR","MN","POS"],literal:["ON","OFF","max_speed","LPOS","JPOS","ENABLE","DISABLE","START","STOP","RESET"]},contains:[Ee,xe,{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},_e.COMMENT("//","[;$]"),_e.COMMENT("!","[;$]"),_e.COMMENT("--eg:","$"),_e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"'"},_e.C_NUMBER_MODE,{className:"variable",begin:"\\$[A-Za-z0-9_]+"}]}}return tp_1=Ce,tp_1}var twig_1,hasRequiredTwig;function requireTwig(){if(hasRequiredTwig)return twig_1;hasRequiredTwig=1;function Ce(_e){const Ae=_e.regex,Se=["absolute_url","asset|0","asset_version","attribute","block","constant","controller|0","country_timezones","csrf_token","cycle","date","dump","expression","form|0","form_end","form_errors","form_help","form_label","form_rest","form_row","form_start","form_widget","html_classes","include","is_granted","logout_path","logout_url","max","min","parent","path|0","random","range","relative_path","render","render_esi","source","template_from_string","url|0"],Ee=["abs","abbr_class","abbr_method","batch","capitalize","column","convert_encoding","country_name","currency_name","currency_symbol","data_uri","date","date_modify","default","escape","file_excerpt","file_link","file_relative","filter","first","format","format_args","format_args_as_text","format_currency","format_date","format_datetime","format_file","format_file_from_text","format_number","format_time","html_to_markdown","humanize","inky_to_html","inline_css","join","json_encode","keys","language_name","last","length","locale_name","lower","map","markdown","markdown_to_html","merge","nl2br","number_format","raw","reduce","replace","reverse","round","slice","slug","sort","spaceless","split","striptags","timezone_name","title","trans","transchoice","trim","u|0","upper","url_encode","yaml_dump","yaml_encode"];let xe=["apply","autoescape","block","cache","deprecated","do","embed","extends","filter","flush","for","form_theme","from","if","import","include","macro","sandbox","set","stopwatch","trans","trans_default_domain","transchoice","use","verbatim","with"];xe=xe.concat(xe.map($e=>`end${$e}`));const Te={scope:"string",variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},Ie={scope:"number",match:/\d+/},De={begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[Te,Ie]},ke={beginKeywords:Se.join(" "),keywords:{name:Se},relevance:0,contains:[De]},Oe={match:/\|(?=[A-Za-z_]+:?)/,beginScope:"punctuation",relevance:0,contains:[{match:/[A-Za-z_]+:?/,keywords:Ee}]},Me=($e,{relevance:Ue})=>({beginScope:{1:"template-tag",3:"name"},relevance:Ue||2,endScope:"template-tag",begin:[/\{%/,/\s*/,Ae.either(...$e)],end:/%\}/,keywords:"in",contains:[Oe,ke,Te,Ie]}),Pe=/[a-z_]+/,Be=Me(xe,{relevance:2}),Fe=Me([Pe],{relevance:1});return{name:"Twig",aliases:["craftcms"],case_insensitive:!0,subLanguage:"xml",contains:[_e.COMMENT(/\{#/,/#\}/),Be,Fe,{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:["self",Oe,ke,Te,Ie]}]}}return twig_1=Ce,twig_1}var typescript_1,hasRequiredTypescript;function requireTypescript(){if(hasRequiredTypescript)return typescript_1;hasRequiredTypescript=1;const Ce="[A-Za-z$_][0-9A-Za-z$_]*",_e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Ae=["true","false","null","undefined","NaN","Infinity"],Se=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Ee=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],xe=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Te=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Ie=[].concat(xe,Se,Ee);function De(Oe){const Me=Oe.regex,Pe=(dn,{after:Pn})=>{const Bn="</"+dn[0].slice(1);return dn.input.indexOf(Bn,Pn)!==-1},Be=Ce,Fe={begin:"<>",end:"</>"},$e=/<[A-Za-z0-9\\._:-]+\s*\/>/,Ue={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(dn,Pn)=>{const Bn=dn[0].length+dn.index,ti=dn.input[Bn];if(ti==="<"||ti===","){Pn.ignoreMatch();return}ti===">"&&(Pe(dn,{after:Bn})||Pn.ignoreMatch());let jn;const mi=dn.input.substring(Bn);if(jn=mi.match(/^\s*=/)){Pn.ignoreMatch();return}if((jn=mi.match(/^\s+extends\s+/))&&jn.index===0){Pn.ignoreMatch();return}}},He={$pattern:Ce,keyword:_e,literal:Ae,built_in:Ie,"variable.language":Te},Ve="[0-9](_?[0-9])*",We=`\\.(${Ve})`,ze="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",qe={className:"number",variants:[{begin:`(\\b(${ze})((${We})|\\.)?|(${We}))[eE][+-]?(${Ve})\\b`},{begin:`\\b(${ze})\\b((${We})\\b|\\.)?|(${We})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},Ke={className:"subst",begin:"\\$\\{",end:"\\}",keywords:He,contains:[]},Ge={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[Oe.BACKSLASH_ESCAPE,Ke],subLanguage:"xml"}},Ye={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[Oe.BACKSLASH_ESCAPE,Ke],subLanguage:"css"}},Qe={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[Oe.BACKSLASH_ESCAPE,Ke],subLanguage:"graphql"}},St={className:"string",begin:"`",end:"`",contains:[Oe.BACKSLASH_ESCAPE,Ke]},Je={className:"comment",variants:[Oe.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:Be+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),Oe.C_BLOCK_COMMENT_MODE,Oe.C_LINE_COMMENT_MODE]},rn=[Oe.APOS_STRING_MODE,Oe.QUOTE_STRING_MODE,Ge,Ye,Qe,St,{match:/\$\d+/},qe];Ke.contains=rn.concat({begin:/\{/,end:/\}/,keywords:He,contains:["self"].concat(rn)});const sn=[].concat(Je,Ke.contains),pn=sn.concat([{begin:/(\s*)\(/,end:/\)/,keywords:He,contains:["self"].concat(sn)}]),mn={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:He,contains:pn},yn={variants:[{match:[/class/,/\s+/,Be,/\s+/,/extends/,/\s+/,Me.concat(Be,"(",Me.concat(/\./,Be),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,Be],scope:{1:"keyword",3:"title.class"}}]},xn={relevance:0,match:Me.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Se,...Ee]}},En={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},Mn={variants:[{match:[/function/,/\s+/,Be,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[mn],illegal:/%/},Hn={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function gn(dn){return Me.concat("(?!",dn.join("|"),")")}const Rn={match:Me.concat(/\b/,gn([...xe,"super","import"].map(dn=>`${dn}\\s*\\(`)),Be,Me.lookahead(/\s*\(/)),className:"title.function",relevance:0},On={begin:Me.concat(/\./,Me.lookahead(Me.concat(Be,/(?![0-9A-Za-z$_(])/))),end:Be,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Fn={match:[/get|set/,/\s+/,Be,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},mn]},Dn="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+Oe.UNDERSCORE_IDENT_RE+")\\s*=>",hn={match:[/const|var|let/,/\s+/,Be,/\s*/,/=\s*/,/(async\s*)?/,Me.lookahead(Dn)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[mn]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:He,exports:{PARAMS_CONTAINS:pn,CLASS_REFERENCE:xn},illegal:/#(?![$_A-z])/,contains:[Oe.SHEBANG({label:"shebang",binary:"node",relevance:5}),En,Oe.APOS_STRING_MODE,Oe.QUOTE_STRING_MODE,Ge,Ye,Qe,St,Je,{match:/\$\d+/},qe,xn,{scope:"attr",match:Be+Me.lookahead(":"),relevance:0},hn,{begin:"("+Oe.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[Je,Oe.REGEXP_MODE,{className:"function",begin:Dn,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:Oe.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:He,contains:pn}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:Fe.begin,end:Fe.end},{match:$e},{begin:Ue.begin,"on:begin":Ue.isTrulyOpeningTag,end:Ue.end}],subLanguage:"xml",contains:[{begin:Ue.begin,end:Ue.end,skip:!0,contains:["self"]}]}]},Mn,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+Oe.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[mn,Oe.inherit(Oe.TITLE_MODE,{begin:Be,className:"title.function"})]},{match:/\.\.\./,relevance:0},On,{match:"\\$"+Be,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[mn]},Rn,Hn,yn,Fn,{match:/\$[(.]/}]}}function ke(Oe){const Me=Oe.regex,Pe=De(Oe),Be=Ce,Fe=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],$e={begin:[/namespace/,/\s+/,Oe.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},Ue={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:Fe},contains:[Pe.exports.CLASS_REFERENCE]},He={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},Ve=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],We={$pattern:Ce,keyword:_e.concat(Ve),literal:Ae,built_in:Ie.concat(Fe),"variable.language":Te},ze={className:"meta",begin:"@"+Be},qe=(Qe,St,Xe)=>{const Je=Qe.contains.findIndex(rn=>rn.label===St);if(Je===-1)throw new Error("can not find mode to replace");Qe.contains.splice(Je,1,Xe)};Object.assign(Pe.keywords,We),Pe.exports.PARAMS_CONTAINS.push(ze);const Ke=Pe.contains.find(Qe=>Qe.scope==="attr"),Ge=Object.assign({},Ke,{match:Me.concat(Be,Me.lookahead(/\s*\?:/))});Pe.exports.PARAMS_CONTAINS.push([Pe.exports.CLASS_REFERENCE,Ke,Ge]),Pe.contains=Pe.contains.concat([ze,$e,Ue,Ge]),qe(Pe,"shebang",Oe.SHEBANG()),qe(Pe,"use_strict",He);const Ye=Pe.contains.find(Qe=>Qe.label==="func.def");return Ye.relevance=0,Object.assign(Pe,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),Pe}return typescript_1=ke,typescript_1}var vala_1,hasRequiredVala;function requireVala(){if(hasRequiredVala)return vala_1;hasRequiredVala=1;function Ce(_e){return{name:"Vala",keywords:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override virtual delegate if while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib CCode Gee Object Gtk Posix",literal:"false true null"},contains:[{className:"class",beginKeywords:"class interface namespace",end:/\{/,excludeEnd:!0,illegal:"[^,:\\n\\s\\.]",contains:[_e.UNDERSCORE_TITLE_MODE]},_e.C_LINE_COMMENT_MODE,_e.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""',relevance:5},_e.APOS_STRING_MODE,_e.QUOTE_STRING_MODE,_e.C_NUMBER_MODE,{className:"meta",begin:"^#",end:"$"}]}}return vala_1=Ce,vala_1}var vbnet_1,hasRequiredVbnet;function requireVbnet(){if(hasRequiredVbnet)return vbnet_1;hasRequiredVbnet=1;function Ce(_e){const Ae=_e.regex,Se={className:"string",begin:/"(""|[^/n])"C\b/},Ee={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},xe=/\d{1,2}\/\d{1,2}\/\d{4}/,Te=/\d{4}-\d{1,2}-\d{1,2}/,Ie=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,De=/\d{1,2}(:\d{1,2}){1,2}/,ke={className:"literal",variants:[{begin:Ae.concat(/# */,Ae.either(Te,xe),/ *#/)},{begin:Ae.concat(/# */,De,/ *#/)},{begin:Ae.concat(/# */,Ie,/ *#/)},{begin:Ae.concat(/# */,Ae.either(Te,xe),/ +/,Ae.either(Ie,De),/ *#/)}]},Oe={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},Me={className:"label",begin:/^\w+:/},Pe=_e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),Be=_e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[Se,Ee,ke,Oe,Me,Pe,Be,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[Be]}]}}return vbnet_1=Ce,vbnet_1}var vbscript_1,hasRequiredVbscript;function requireVbscript(){if(hasRequiredVbscript)return vbscript_1;hasRequiredVbscript=1;function Ce(_e){const Ae=_e.regex,Se=["lcase","month","vartype","instrrev","ubound","setlocale","getobject","rgb","getref","string","weekdayname","rnd","dateadd","monthname","now","day","minute","isarray","cbool","round","formatcurrency","conversions","csng","timevalue","second","year","space","abs","clng","timeserial","fixs","len","asc","isempty","maths","dateserial","atn","timer","isobject","filter","weekday","datevalue","ccur","isdate","instr","datediff","formatdatetime","replace","isnull","right","sgn","array","snumeric","log","cdbl","hex","chr","lbound","msgbox","ucase","getlocale","cos","cdate","cbyte","rtrim","join","hour","oct","typename","trim","strcomp","int","createobject","loadpicture","tan","formatnumber","mid","split","cint","sin","datepart","ltrim","sqr","time","derived","eval","date","formatpercent","exp","inputbox","left","ascw","chrw","regexp","cstr","err"],Ee=["server","response","request","scriptengine","scriptenginebuildversion","scriptengineminorversion","scriptenginemajorversion"],xe={begin:Ae.concat(Ae.either(...Se),"\\s*\\("),relevance:0,keywords:{built_in:Se}};return{name:"VBScript",aliases:["vbs"],case_insensitive:!0,keywords:{keyword:["call","class","const","dim","do","loop","erase","execute","executeglobal","exit","for","each","next","function","if","then","else","on","error","option","explicit","new","private","property","let","get","public","randomize","redim","rem","select","case","set","stop","sub","while","wend","with","end","to","elseif","is","or","xor","and","not","class_initialize","class_terminate","default","preserve","in","me","byval","byref","step","resume","goto"],built_in:Ee,literal:["true","false","null","nothing","empty"]},illegal:"//",contains:[xe,_e.inherit(_e.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),_e.COMMENT(/'/,/$/,{relevance:0}),_e.C_NUMBER_MODE]}}return vbscript_1=Ce,vbscript_1}var vbscriptHtml_1,hasRequiredVbscriptHtml;function requireVbscriptHtml(){if(hasRequiredVbscriptHtml)return vbscriptHtml_1;hasRequiredVbscriptHtml=1;function Ce(_e){return{name:"VBScript in HTML",subLanguage:"xml",contains:[{begin:"<%",end:"%>",subLanguage:"vbscript"}]}}return vbscriptHtml_1=Ce,vbscriptHtml_1}var verilog_1,hasRequiredVerilog;function requireVerilog(){if(hasRequiredVerilog)return verilog_1;hasRequiredVerilog=1;function Ce(_e){const Ae=_e.regex,Se={$pattern:/\$?[\w]+(\$[\w]+)*/,keyword:["accept_on","alias","always","always_comb","always_ff","always_latch","and","assert","assign","assume","automatic","before","begin","bind","bins","binsof","bit","break","buf|0","bufif0","bufif1","byte","case","casex","casez","cell","chandle","checker","class","clocking","cmos","config","const","constraint","context","continue","cover","covergroup","coverpoint","cross","deassign","default","defparam","design","disable","dist","do","edge","else","end","endcase","endchecker","endclass","endclocking","endconfig","endfunction","endgenerate","endgroup","endinterface","endmodule","endpackage","endprimitive","endprogram","endproperty","endspecify","endsequence","endtable","endtask","enum","event","eventually","expect","export","extends","extern","final","first_match","for","force","foreach","forever","fork","forkjoin","function","generate|5","genvar","global","highz0","highz1","if","iff","ifnone","ignore_bins","illegal_bins","implements","implies","import","incdir","include","initial","inout","input","inside","instance","int","integer","interconnect","interface","intersect","join","join_any","join_none","large","let","liblist","library","local","localparam","logic","longint","macromodule","matches","medium","modport","module","nand","negedge","nettype","new","nexttime","nmos","nor","noshowcancelled","not","notif0","notif1","or","output","package","packed","parameter","pmos","posedge","primitive","priority","program","property","protected","pull0","pull1","pulldown","pullup","pulsestyle_ondetect","pulsestyle_onevent","pure","rand","randc","randcase","randsequence","rcmos","real","realtime","ref","reg","reject_on","release","repeat","restrict","return","rnmos","rpmos","rtran","rtranif0","rtranif1","s_always","s_eventually","s_nexttime","s_until","s_until_with","scalared","sequence","shortint","shortreal","showcancelled","signed","small","soft","solve","specify","specparam","static","string","strong","strong0","strong1","struct","super","supply0","supply1","sync_accept_on","sync_reject_on","table","tagged","task","this","throughout","time","timeprecision","timeunit","tran","tranif0","tranif1","tri","tri0","tri1","triand","trior","trireg","type","typedef","union","unique","unique0","unsigned","until","until_with","untyped","use","uwire","var","vectored","virtual","void","wait","wait_order","wand","weak","weak0","weak1","while","wildcard","wire","with","within","wor","xnor","xor"],literal:["null"],built_in:["$finish","$stop","$exit","$fatal","$error","$warning","$info","$realtime","$time","$printtimescale","$bitstoreal","$bitstoshortreal","$itor","$signed","$cast","$bits","$stime","$timeformat","$realtobits","$shortrealtobits","$rtoi","$unsigned","$asserton","$assertkill","$assertpasson","$assertfailon","$assertnonvacuouson","$assertoff","$assertcontrol","$assertpassoff","$assertfailoff","$assertvacuousoff","$isunbounded","$sampled","$fell","$changed","$past_gclk","$fell_gclk","$changed_gclk","$rising_gclk","$steady_gclk","$coverage_control","$coverage_get","$coverage_save","$set_coverage_db_name","$rose","$stable","$past","$rose_gclk","$stable_gclk","$future_gclk","$falling_gclk","$changing_gclk","$display","$coverage_get_max","$coverage_merge","$get_coverage","$load_coverage_db","$typename","$unpacked_dimensions","$left","$low","$increment","$clog2","$ln","$log10","$exp","$sqrt","$pow","$floor","$ceil","$sin","$cos","$tan","$countbits","$onehot","$isunknown","$fatal","$warning","$dimensions","$right","$high","$size","$asin","$acos","$atan","$atan2","$hypot","$sinh","$cosh","$tanh","$asinh","$acosh","$atanh","$countones","$onehot0","$error","$info","$random","$dist_chi_square","$dist_erlang","$dist_exponential","$dist_normal","$dist_poisson","$dist_t","$dist_uniform","$q_initialize","$q_remove","$q_exam","$async$and$array","$async$nand$array","$async$or$array","$async$nor$array","$sync$and$array","$sync$nand$array","$sync$or$array","$sync$nor$array","$q_add","$q_full","$psprintf","$async$and$plane","$async$nand$plane","$async$or$plane","$async$nor$plane","$sync$and$plane","$sync$nand$plane","$sync$or$plane","$sync$nor$plane","$system","$display","$displayb","$displayh","$displayo","$strobe","$strobeb","$strobeh","$strobeo","$write","$readmemb","$readmemh","$writememh","$value$plusargs","$dumpvars","$dumpon","$dumplimit","$dumpports","$dumpportson","$dumpportslimit","$writeb","$writeh","$writeo","$monitor","$monitorb","$monitorh","$monitoro","$writememb","$dumpfile","$dumpoff","$dumpall","$dumpflush","$dumpportsoff","$dumpportsall","$dumpportsflush","$fclose","$fdisplay","$fdisplayb","$fdisplayh","$fdisplayo","$fstrobe","$fstrobeb","$fstrobeh","$fstrobeo","$swrite","$swriteb","$swriteh","$swriteo","$fscanf","$fread","$fseek","$fflush","$feof","$fopen","$fwrite","$fwriteb","$fwriteh","$fwriteo","$fmonitor","$fmonitorb","$fmonitorh","$fmonitoro","$sformat","$sformatf","$fgetc","$ungetc","$fgets","$sscanf","$rewind","$ftell","$ferror"]},Ee=["__FILE__","__LINE__"],xe=["begin_keywords","celldefine","default_nettype","default_decay_time","default_trireg_strength","define","delay_mode_distributed","delay_mode_path","delay_mode_unit","delay_mode_zero","else","elsif","end_keywords","endcelldefine","endif","ifdef","ifndef","include","line","nounconnected_drive","pragma","resetall","timescale","unconnected_drive","undef","undefineall"];return{name:"Verilog",aliases:["v","sv","svh"],case_insensitive:!1,keywords:Se,contains:[_e.C_BLOCK_COMMENT_MODE,_e.C_LINE_COMMENT_MODE,_e.QUOTE_STRING_MODE,{scope:"number",contains:[_e.BACKSLASH_ESCAPE],variants:[{begin:/\b((\d+'([bhodBHOD]))[0-9xzXZa-fA-F_]+)/},{begin:/\B(('([bhodBHOD]))[0-9xzXZa-fA-F_]+)/},{begin:/\b[0-9][0-9_]*/,relevance:0}]},{scope:"variable",variants:[{begin:"#\\((?!parameter).+\\)"},{begin:"\\.\\w+",relevance:0}]},{scope:"variable.constant",match:Ae.concat(/`/,Ae.either(...Ee))},{scope:"meta",begin:Ae.concat(/`/,Ae.either(...xe)),end:/$|\/\/|\/\*/,returnEnd:!0,keywords:xe}]}}return verilog_1=Ce,verilog_1}var vhdl_1,hasRequiredVhdl;function requireVhdl(){if(hasRequiredVhdl)return vhdl_1;hasRequiredVhdl=1;function Ce(_e){const Ae="\\d(_|\\d)*",Se="[eE][-+]?"+Ae,Ee=Ae+"(\\."+Ae+")?("+Se+")?",xe="\\w+",Ie="\\b("+(Ae+"#"+xe+"(\\."+xe+")?#("+Se+")?")+"|"+Ee+")";return{name:"VHDL",case_insensitive:!0,keywords:{keyword:["abs","access","after","alias","all","and","architecture","array","assert","assume","assume_guarantee","attribute","begin","block","body","buffer","bus","case","component","configuration","constant","context","cover","disconnect","downto","default","else","elsif","end","entity","exit","fairness","file","for","force","function","generate","generic","group","guarded","if","impure","in","inertial","inout","is","label","library","linkage","literal","loop","map","mod","nand","new","next","nor","not","null","of","on","open","or","others","out","package","parameter","port","postponed","procedure","process","property","protected","pure","range","record","register","reject","release","rem","report","restrict","restrict_guarantee","return","rol","ror","select","sequence","severity","shared","signal","sla","sll","sra","srl","strong","subtype","then","to","transport","type","unaffected","units","until","use","variable","view","vmode","vprop","vunit","wait","when","while","with","xnor","xor"],built_in:["boolean","bit","character","integer","time","delay_length","natural","positive","string","bit_vector","file_open_kind","file_open_status","std_logic","std_logic_vector","unsigned","signed","boolean_vector","integer_vector","std_ulogic","std_ulogic_vector","unresolved_unsigned","u_unsigned","unresolved_signed","u_signed","real_vector","time_vector"],literal:["false","true","note","warning","error","failure","line","text","side","width"]},illegal:/\{/,contains:[_e.C_BLOCK_COMMENT_MODE,_e.COMMENT("--","$"),_e.QUOTE_STRING_MODE,{className:"number",begin:Ie,relevance:0},{className:"string",begin:"'(U|X|0|1|Z|W|L|H|-)'",contains:[_e.BACKSLASH_ESCAPE]},{className:"symbol",begin:"'[A-Za-z](_?[A-Za-z0-9])*",contains:[_e.BACKSLASH_ESCAPE]}]}}return vhdl_1=Ce,vhdl_1}var vim_1,hasRequiredVim;function requireVim(){if(hasRequiredVim)return vim_1;hasRequiredVim=1;function Ce(_e){return{name:"Vim Script",keywords:{$pattern:/[!#@\w]+/,keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv complete_check add getwinposx getqflist getwinposy screencol clearmatches empty extend getcmdpos mzeval garbagecollect setreg ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable shiftwidth max sinh isdirectory synID system inputrestore winline atan visualmode inputlist tabpagewinnr round getregtype mapcheck hasmapto histdel argidx findfile sha256 exists toupper getcmdline taglist string getmatches bufnr strftime winwidth bufexists strtrans tabpagebuflist setcmdpos remote_read printf setloclist getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval resolve libcallnr foldclosedend reverse filter has_key bufname str2float strlen setline getcharmod setbufvar index searchpos shellescape undofile foldclosed setqflist buflisted strchars str2nr virtcol floor remove undotree remote_expr winheight gettabwinvar reltime cursor tabpagenr finddir localtime acos getloclist search tanh matchend rename gettabvar strdisplaywidth type abs py3eval setwinvar tolower wildmenumode log10 spellsuggest bufloaded synconcealed nextnonblank server2client complete settabwinvar executable input wincol setmatches getftype hlID inputsave searchpair or screenrow line settabvar histadd deepcopy strpart remote_peek and eval getftime submatch screenchar winsaveview matchadd mkdir screenattr getfontname libcall reltimestr getfsize winnr invert pow getbufline byte2line soundfold repeat fnameescape tagfiles sin strwidth spellbadword trunc maparg log lispindent hostname setpos globpath remote_foreground getchar synIDattr fnamemodify cscope_connection stridx winbufnr indent min complete_add nr2char searchpairpos inputdialog values matchlist items hlexists strridx browsedir expand fmod pathshorten line2byte argc count getwinvar glob foldtextresult getreg foreground cosh matchdelete has char2nr simplify histget searchdecl iconv winrestcmd pumvisible writefile foldlevel haslocaldir keys cos matchstr foldtext histnr tan tempname getcwd byteidx getbufvar islocked escape eventhandler remote_send serverlist winrestview synstack pyeval prevnonblank readfile cindent filereadable changenr exp"},illegal:/;/,contains:[_e.NUMBER_MODE,{className:"string",begin:"'",end:"'",illegal:"\\n"},{className:"string",begin:/"(\\"|\n\\|[^"\n])*"/},_e.COMMENT('"',"$"),{className:"variable",begin:/[bwtglsav]:[\w\d_]+/},{begin:[/\b(?:function|function!)/,/\s+/,_e.IDENT_RE],className:{1:"keyword",3:"title"},end:"$",relevance:0,contains:[{className:"params",begin:"\\(",end:"\\)"}]},{className:"symbol",begin:/<[\w-]+>/}]}}return vim_1=Ce,vim_1}var wasm_1,hasRequiredWasm;function requireWasm(){if(hasRequiredWasm)return wasm_1;hasRequiredWasm=1;function Ce(_e){_e.regex;const Ae=_e.COMMENT(/\(;/,/;\)/);Ae.contains.push("self");const Se=_e.COMMENT(/;;/,/$/),Ee=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],xe={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},Te={className:"variable",begin:/\$[\w_]+/},Ie={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},De={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},ke={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},Oe={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:Ee},contains:[Se,Ae,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},Te,Ie,xe,_e.QUOTE_STRING_MODE,ke,Oe,De]}}return wasm_1=Ce,wasm_1}var wren_1,hasRequiredWren;function requireWren(){if(hasRequiredWren)return wren_1;hasRequiredWren=1;function Ce(_e){const Ae=_e.regex,Se=/[a-zA-Z]\w*/,Ee=["as","break","class","construct","continue","else","for","foreign","if","import","in","is","return","static","var","while"],xe=["true","false","null"],Te=["this","super"],Ie=["Bool","Class","Fiber","Fn","List","Map","Null","Num","Object","Range","Sequence","String","System"],De=["-","~",/\*/,"%",/\.\.\./,/\.\./,/\+/,"<<",">>",">=","<=","<",">",/\^/,/!=/,/!/,/\bis\b/,"==","&&","&",/\|\|/,/\|/,/\?:/,"="],ke={relevance:0,match:Ae.concat(/\b(?!(if|while|for|else|super)\b)/,Se,/(?=\s*[({])/),className:"title.function"},Oe={match:Ae.concat(Ae.either(Ae.concat(/\b(?!(if|while|for|else|super)\b)/,Se),Ae.either(...De)),/(?=\s*\([^)]+\)\s*\{)/),className:"title.function",starts:{contains:[{begin:/\(/,end:/\)/,contains:[{relevance:0,scope:"params",match:Se}]}]}},Me={variants:[{match:[/class\s+/,Se,/\s+is\s+/,Se]},{match:[/class\s+/,Se]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:Ee},Pe={relevance:0,match:Ae.either(...De),className:"operator"},Be={className:"string",begin:/"""/,end:/"""/},Fe={className:"property",begin:Ae.concat(/\./,Ae.lookahead(Se)),end:Se,excludeBegin:!0,relevance:0},$e={relevance:0,match:Ae.concat(/\b_/,Se),scope:"variable"},Ue={relevance:0,match:/\b[A-Z]+[a-z]+([A-Z]+[a-z]+)*/,scope:"title.class",keywords:{_:Ie}},He=_e.C_NUMBER_MODE,Ve={match:[Se,/\s*/,/=/,/\s*/,/\(/,Se,/\)\s*\{/],scope:{1:"title.function",3:"operator",6:"params"}},We=_e.COMMENT(/\/\*\*/,/\*\//,{contains:[{match:/@[a-z]+/,scope:"doctag"},"self"]}),ze={scope:"subst",begin:/%\(/,end:/\)/,contains:[He,Ue,ke,$e,Pe]},qe={scope:"string",begin:/"/,end:/"/,contains:[ze,{scope:"char.escape",variants:[{match:/\\\\|\\["0%abefnrtv]/},{match:/\\x[0-9A-F]{2}/},{match:/\\u[0-9A-F]{4}/},{match:/\\U[0-9A-F]{8}/}]}]};ze.contains.push(qe);const Ke=[...Ee,...Te,...xe],Ge={relevance:0,match:Ae.concat("\\b(?!",Ke.join("|"),"\\b)",/[a-zA-Z_]\w*(?:[?!]|\b)/),className:"variable"};return{name:"Wren",keywords:{keyword:Ee,"variable.language":Te,literal:xe},contains:[{scope:"comment",variants:[{begin:[/#!?/,/[A-Za-z_]+(?=\()/],beginScope:{},keywords:{literal:xe},contains:[],end:/\)/},{begin:[/#!?/,/[A-Za-z_]+/],beginScope:{},end:/$/}]},He,qe,Be,We,_e.C_LINE_COMMENT_MODE,_e.C_BLOCK_COMMENT_MODE,Ue,Me,Ve,Oe,ke,Pe,$e,Fe,Ge]}}return wren_1=Ce,wren_1}var x86asm_1,hasRequiredX86asm;function requireX86asm(){if(hasRequiredX86asm)return x86asm_1;hasRequiredX86asm=1;function Ce(_e){return{name:"Intel x86 Assembly",case_insensitive:!0,keywords:{$pattern:"[.%]?"+_e.IDENT_RE,keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63",built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr",meta:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist __FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[_e.COMMENT(";","$",{relevance:0}),{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*(\\.[0-9_]*)?(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},_e.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"[^\\\\]`"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"subst",begin:"%[0-9]+",relevance:0},{className:"subst",begin:"%!S+",relevance:0},{className:"meta",begin:/^\s*\.[\w_-]+/}]}}return x86asm_1=Ce,x86asm_1}var xl_1,hasRequiredXl;function requireXl(){if(hasRequiredXl)return xl_1;hasRequiredXl=1;function Ce(_e){const Ae=["if","then","else","do","while","until","for","loop","import","with","is","as","where","when","by","data","constant","integer","real","text","name","boolean","symbol","infix","prefix","postfix","block","tree"],Se=["in","mod","rem","and","or","xor","not","abs","sign","floor","ceil","sqrt","sin","cos","tan","asin","acos","atan","exp","expm1","log","log2","log10","log1p","pi","at","text_length","text_range","text_find","text_replace","contains","page","slide","basic_slide","title_slide","title","subtitle","fade_in","fade_out","fade_at","clear_color","color","line_color","line_width","texture_wrap","texture_transform","texture","scale_?x","scale_?y","scale_?z?","translate_?x","translate_?y","translate_?z?","rotate_?x","rotate_?y","rotate_?z?","rectangle","circle","ellipse","sphere","path","line_to","move_to","quad_to","curve_to","theme","background","contents","locally","time","mouse_?x","mouse_?y","mouse_buttons"],Ee=["ObjectLoader","Animate","MovieCredits","Slides","Filters","Shading","Materials","LensFlare","Mapping","VLCAudioVideo","StereoDecoder","PointCloud","NetworkAccess","RemoteControl","RegExp","ChromaKey","Snowfall","NodeJS","Speech","Charts"],Te={$pattern:/[a-zA-Z][a-zA-Z0-9_?]*/,keyword:Ae,literal:["true","false","nil"],built_in:Se.concat(Ee)},Ie={className:"string",begin:'"',end:'"',illegal:"\\n"},De={className:"string",begin:"'",end:"'",illegal:"\\n"},ke={className:"string",begin:"<<",end:">>"},Oe={className:"number",begin:"[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?"},Me={beginKeywords:"import",end:"$",keywords:Te,contains:[Ie]},Pe={className:"function",begin:/[a-z][^\n]*->/,returnBegin:!0,end:/->/,contains:[_e.inherit(_e.TITLE_MODE,{starts:{endsWithParent:!0,keywords:Te}})]};return{name:"XL",aliases:["tao"],keywords:Te,contains:[_e.C_LINE_COMMENT_MODE,_e.C_BLOCK_COMMENT_MODE,Ie,De,ke,Pe,Me,Oe,_e.NUMBER_MODE]}}return xl_1=Ce,xl_1}var xquery_1,hasRequiredXquery;function requireXquery(){if(hasRequiredXquery)return xquery_1;hasRequiredXquery=1;function Ce(_e){return{name:"XQuery",aliases:["xpath","xq","xqm"],case_insensitive:!1,illegal:/(proc)|(abstract)|(extends)|(until)|(#)/,keywords:{$pattern:/[a-zA-Z$][a-zA-Z0-9_:-]*/,keyword:["module","schema","namespace","boundary-space","preserve","no-preserve","strip","default","collation","base-uri","ordering","context","decimal-format","decimal-separator","copy-namespaces","empty-sequence","except","exponent-separator","external","grouping-separator","inherit","no-inherit","lax","minus-sign","per-mille","percent","schema-attribute","schema-element","strict","unordered","zero-digit","declare","import","option","function","validate","variable","for","at","in","let","where","order","group","by","return","if","then","else","tumbling","sliding","window","start","when","only","end","previous","next","stable","ascending","descending","allowing","empty","greatest","least","some","every","satisfies","switch","case","typeswitch","try","catch","and","or","to","union","intersect","instance","of","treat","as","castable","cast","map","array","delete","insert","into","replace","value","rename","copy","modify","update"],type:["item","document-node","node","attribute","document","element","comment","namespace","namespace-node","processing-instruction","text","construction","xs:anyAtomicType","xs:untypedAtomic","xs:duration","xs:time","xs:decimal","xs:float","xs:double","xs:gYearMonth","xs:gYear","xs:gMonthDay","xs:gMonth","xs:gDay","xs:boolean","xs:base64Binary","xs:hexBinary","xs:anyURI","xs:QName","xs:NOTATION","xs:dateTime","xs:dateTimeStamp","xs:date","xs:string","xs:normalizedString","xs:token","xs:language","xs:NMTOKEN","xs:Name","xs:NCName","xs:ID","xs:IDREF","xs:ENTITY","xs:integer","xs:nonPositiveInteger","xs:negativeInteger","xs:long","xs:int","xs:short","xs:byte","xs:nonNegativeInteger","xs:unisignedLong","xs:unsignedInt","xs:unsignedShort","xs:unsignedByte","xs:positiveInteger","xs:yearMonthDuration","xs:dayTimeDuration"],literal:["eq","ne","lt","le","gt","ge","is","self::","child::","descendant::","descendant-or-self::","attribute::","following::","following-sibling::","parent::","ancestor::","ancestor-or-self::","preceding::","preceding-sibling::","NaN"]},contains:[{className:"variable",begin:/[$][\w\-:]+/},{className:"built_in",variants:[{begin:/\barray:/,end:/(?:append|filter|flatten|fold-(?:left|right)|for-each(?:-pair)?|get|head|insert-before|join|put|remove|reverse|size|sort|subarray|tail)\b/},{begin:/\bmap:/,end:/(?:contains|entry|find|for-each|get|keys|merge|put|remove|size)\b/},{begin:/\bmath:/,end:/(?:a(?:cos|sin|tan[2]?)|cos|exp(?:10)?|log(?:10)?|pi|pow|sin|sqrt|tan)\b/},{begin:/\bop:/,end:/\(/,excludeEnd:!0},{begin:/\bfn:/,end:/\(/,excludeEnd:!0},{begin:/[^</$:'"-]\b(?:abs|accumulator-(?:after|before)|adjust-(?:date(?:Time)?|time)-to-timezone|analyze-string|apply|available-(?:environment-variables|system-properties)|avg|base-uri|boolean|ceiling|codepoints?-(?:equal|to-string)|collation-key|collection|compare|concat|contains(?:-token)?|copy-of|count|current(?:-)?(?:date(?:Time)?|time|group(?:ing-key)?|output-uri|merge-(?:group|key))?data|dateTime|days?-from-(?:date(?:Time)?|duration)|deep-equal|default-(?:collation|language)|distinct-values|document(?:-uri)?|doc(?:-available)?|element-(?:available|with-id)|empty|encode-for-uri|ends-with|environment-variable|error|escape-html-uri|exactly-one|exists|false|filter|floor|fold-(?:left|right)|for-each(?:-pair)?|format-(?:date(?:Time)?|time|integer|number)|function-(?:arity|available|lookup|name)|generate-id|has-children|head|hours-from-(?:dateTime|duration|time)|id(?:ref)?|implicit-timezone|in-scope-prefixes|index-of|innermost|insert-before|iri-to-uri|json-(?:doc|to-xml)|key|lang|last|load-xquery-module|local-name(?:-from-QName)?|(?:lower|upper)-case|matches|max|minutes-from-(?:dateTime|duration|time)|min|months?-from-(?:date(?:Time)?|duration)|name(?:space-uri-?(?:for-prefix|from-QName)?)?|nilled|node-name|normalize-(?:space|unicode)|not|number|one-or-more|outermost|parse-(?:ietf-date|json)|path|position|(?:prefix-from-)?QName|random-number-generator|regex-group|remove|replace|resolve-(?:QName|uri)|reverse|root|round(?:-half-to-even)?|seconds-from-(?:dateTime|duration|time)|snapshot|sort|starts-with|static-base-uri|stream-available|string-?(?:join|length|to-codepoints)?|subsequence|substring-?(?:after|before)?|sum|system-property|tail|timezone-from-(?:date(?:Time)?|time)|tokenize|trace|trans(?:form|late)|true|type-available|unordered|unparsed-(?:entity|text)?-?(?:public-id|uri|available|lines)?|uri-collection|xml-to-json|years?-from-(?:date(?:Time)?|duration)|zero-or-one)\b/},{begin:/\blocal:/,end:/\(/,excludeEnd:!0},{begin:/\bzip:/,end:/(?:zip-file|(?:xml|html|text|binary)-entry| (?:update-)?entries)\b/},{begin:/\b(?:util|db|functx|app|xdmp|xmldb):/,end:/\(/,excludeEnd:!0}]},{className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},{className:"number",begin:/(\b0[0-7_]+)|(\b0x[0-9a-fA-F_]+)|(\b[1-9][0-9_]*(\.[0-9_]+)?)|[0_]\b/,relevance:0},{className:"comment",begin:/\(:/,end:/:\)/,relevance:10,contains:[{className:"doctag",begin:/@\w+/}]},{className:"meta",begin:/%[\w\-:]+/},{className:"title",begin:/\bxquery version "[13]\.[01]"\s?(?:encoding ".+")?/,end:/;/},{beginKeywords:"element attribute comment document processing-instruction",end:/\{/,excludeEnd:!0},{begin:/<([\w._:-]+)(\s+\S*=('|").*('|"))?>/,end:/(\/[\w._:-]+>)/,subLanguage:"xml",contains:[{begin:/\{/,end:/\}/,subLanguage:"xquery"},"self"]}]}}return xquery_1=Ce,xquery_1}var zephir_1,hasRequiredZephir;function requireZephir(){if(hasRequiredZephir)return zephir_1;hasRequiredZephir=1;function Ce(_e){const Ae={className:"string",contains:[_e.BACKSLASH_ESCAPE],variants:[_e.inherit(_e.APOS_STRING_MODE,{illegal:null}),_e.inherit(_e.QUOTE_STRING_MODE,{illegal:null})]},Se=_e.UNDERSCORE_TITLE_MODE,Ee={variants:[_e.BINARY_NUMBER_MODE,_e.C_NUMBER_MODE]},xe="namespace class interface use extends function return abstract final public protected private static deprecated throw try catch Exception echo empty isset instanceof unset let var new const self require if else elseif switch case default do while loop for continue break likely unlikely __LINE__ __FILE__ __DIR__ __FUNCTION__ __CLASS__ __TRAIT__ __METHOD__ __NAMESPACE__ array boolean float double integer object resource string char long unsigned bool int uint ulong uchar true false null undefined";return{name:"Zephir",aliases:["zep"],keywords:xe,contains:[_e.C_LINE_COMMENT_MODE,_e.COMMENT(/\/\*/,/\*\//,{contains:[{className:"doctag",begin:/@[A-Za-z]+/}]}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;/,contains:[_e.BACKSLASH_ESCAPE]},{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function fn",end:/[;{]/,excludeEnd:!0,illegal:/\$|\[|%/,contains:[Se,{className:"params",begin:/\(/,end:/\)/,keywords:xe,contains:["self",_e.C_BLOCK_COMMENT_MODE,Ae,Ee]}]},{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,illegal:/[:($"]/,contains:[{beginKeywords:"extends implements"},Se]},{beginKeywords:"namespace",end:/;/,illegal:/[.']/,contains:[Se]},{beginKeywords:"use",end:/;/,contains:[Se]},{begin:/=>/},Ae,Ee]}}return zephir_1=Ce,zephir_1}var hljs$1=core$1;hljs$1.registerLanguage("1c",require_1c()),hljs$1.registerLanguage("abnf",requireAbnf()),hljs$1.registerLanguage("accesslog",requireAccesslog()),hljs$1.registerLanguage("actionscript",requireActionscript()),hljs$1.registerLanguage("ada",requireAda()),hljs$1.registerLanguage("angelscript",requireAngelscript()),hljs$1.registerLanguage("apache",requireApache()),hljs$1.registerLanguage("applescript",requireApplescript()),hljs$1.registerLanguage("arcade",requireArcade()),hljs$1.registerLanguage("arduino",requireArduino()),hljs$1.registerLanguage("armasm",requireArmasm()),hljs$1.registerLanguage("xml",requireXml()),hljs$1.registerLanguage("asciidoc",requireAsciidoc()),hljs$1.registerLanguage("aspectj",requireAspectj()),hljs$1.registerLanguage("autohotkey",requireAutohotkey()),hljs$1.registerLanguage("autoit",requireAutoit()),hljs$1.registerLanguage("avrasm",requireAvrasm()),hljs$1.registerLanguage("awk",requireAwk()),hljs$1.registerLanguage("axapta",requireAxapta()),hljs$1.registerLanguage("bash",requireBash()),hljs$1.registerLanguage("basic",requireBasic()),hljs$1.registerLanguage("bnf",requireBnf()),hljs$1.registerLanguage("brainfuck",requireBrainfuck()),hljs$1.registerLanguage("c",requireC()),hljs$1.registerLanguage("cal",requireCal()),hljs$1.registerLanguage("capnproto",requireCapnproto()),hljs$1.registerLanguage("ceylon",requireCeylon()),hljs$1.registerLanguage("clean",requireClean()),hljs$1.registerLanguage("clojure",requireClojure()),hljs$1.registerLanguage("clojure-repl",requireClojureRepl()),hljs$1.registerLanguage("cmake",requireCmake()),hljs$1.registerLanguage("coffeescript",requireCoffeescript()),hljs$1.registerLanguage("coq",requireCoq()),hljs$1.registerLanguage("cos",requireCos()),hljs$1.registerLanguage("cpp",requireCpp()),hljs$1.registerLanguage("crmsh",requireCrmsh()),hljs$1.registerLanguage("crystal",requireCrystal()),hljs$1.registerLanguage("csharp",requireCsharp()),hljs$1.registerLanguage("csp",requireCsp()),hljs$1.registerLanguage("css",requireCss()),hljs$1.registerLanguage("d",requireD()),hljs$1.registerLanguage("markdown",requireMarkdown()),hljs$1.registerLanguage("dart",requireDart()),hljs$1.registerLanguage("delphi",requireDelphi()),hljs$1.registerLanguage("diff",requireDiff()),hljs$1.registerLanguage("django",requireDjango()),hljs$1.registerLanguage("dns",requireDns()),hljs$1.registerLanguage("dockerfile",requireDockerfile()),hljs$1.registerLanguage("dos",requireDos()),hljs$1.registerLanguage("dsconfig",requireDsconfig()),hljs$1.registerLanguage("dts",requireDts()),hljs$1.registerLanguage("dust",requireDust()),hljs$1.registerLanguage("ebnf",requireEbnf()),hljs$1.registerLanguage("elixir",requireElixir()),hljs$1.registerLanguage("elm",requireElm()),hljs$1.registerLanguage("ruby",requireRuby()),hljs$1.registerLanguage("erb",requireErb()),hljs$1.registerLanguage("erlang-repl",requireErlangRepl()),hljs$1.registerLanguage("erlang",requireErlang()),hljs$1.registerLanguage("excel",requireExcel()),hljs$1.registerLanguage("fix",requireFix()),hljs$1.registerLanguage("flix",requireFlix()),hljs$1.registerLanguage("fortran",requireFortran()),hljs$1.registerLanguage("fsharp",requireFsharp()),hljs$1.registerLanguage("gams",requireGams()),hljs$1.registerLanguage("gauss",requireGauss()),hljs$1.registerLanguage("gcode",requireGcode()),hljs$1.registerLanguage("gherkin",requireGherkin()),hljs$1.registerLanguage("glsl",requireGlsl()),hljs$1.registerLanguage("gml",requireGml()),hljs$1.registerLanguage("go",requireGo()),hljs$1.registerLanguage("golo",requireGolo()),hljs$1.registerLanguage("gradle",requireGradle()),hljs$1.registerLanguage("graphql",requireGraphql()),hljs$1.registerLanguage("groovy",requireGroovy()),hljs$1.registerLanguage("haml",requireHaml()),hljs$1.registerLanguage("handlebars",requireHandlebars()),hljs$1.registerLanguage("haskell",requireHaskell()),hljs$1.registerLanguage("haxe",requireHaxe()),hljs$1.registerLanguage("hsp",requireHsp()),hljs$1.registerLanguage("http",requireHttp()),hljs$1.registerLanguage("hy",requireHy()),hljs$1.registerLanguage("inform7",requireInform7()),hljs$1.registerLanguage("ini",requireIni()),hljs$1.registerLanguage("irpf90",requireIrpf90()),hljs$1.registerLanguage("isbl",requireIsbl()),hljs$1.registerLanguage("java",requireJava()),hljs$1.registerLanguage("javascript",requireJavascript()),hljs$1.registerLanguage("jboss-cli",requireJbossCli()),hljs$1.registerLanguage("json",requireJson()),hljs$1.registerLanguage("julia",requireJulia()),hljs$1.registerLanguage("julia-repl",requireJuliaRepl()),hljs$1.registerLanguage("kotlin",requireKotlin()),hljs$1.registerLanguage("lasso",requireLasso()),hljs$1.registerLanguage("latex",requireLatex()),hljs$1.registerLanguage("ldif",requireLdif()),hljs$1.registerLanguage("leaf",requireLeaf()),hljs$1.registerLanguage("less",requireLess()),hljs$1.registerLanguage("lisp",requireLisp()),hljs$1.registerLanguage("livecodeserver",requireLivecodeserver()),hljs$1.registerLanguage("livescript",requireLivescript()),hljs$1.registerLanguage("llvm",requireLlvm()),hljs$1.registerLanguage("lsl",requireLsl()),hljs$1.registerLanguage("lua",requireLua()),hljs$1.registerLanguage("makefile",requireMakefile()),hljs$1.registerLanguage("mathematica",requireMathematica()),hljs$1.registerLanguage("matlab",requireMatlab()),hljs$1.registerLanguage("maxima",requireMaxima()),hljs$1.registerLanguage("mel",requireMel()),hljs$1.registerLanguage("mercury",requireMercury()),hljs$1.registerLanguage("mipsasm",requireMipsasm()),hljs$1.registerLanguage("mizar",requireMizar()),hljs$1.registerLanguage("perl",requirePerl()),hljs$1.registerLanguage("mojolicious",requireMojolicious()),hljs$1.registerLanguage("monkey",requireMonkey()),hljs$1.registerLanguage("moonscript",requireMoonscript()),hljs$1.registerLanguage("n1ql",requireN1ql()),hljs$1.registerLanguage("nestedtext",requireNestedtext()),hljs$1.registerLanguage("nginx",requireNginx()),hljs$1.registerLanguage("nim",requireNim()),hljs$1.registerLanguage("nix",requireNix()),hljs$1.registerLanguage("node-repl",requireNodeRepl()),hljs$1.registerLanguage("nsis",requireNsis()),hljs$1.registerLanguage("objectivec",requireObjectivec()),hljs$1.registerLanguage("ocaml",requireOcaml()),hljs$1.registerLanguage("openscad",requireOpenscad()),hljs$1.registerLanguage("oxygene",requireOxygene()),hljs$1.registerLanguage("parser3",requireParser3()),hljs$1.registerLanguage("pf",requirePf()),hljs$1.registerLanguage("pgsql",requirePgsql()),hljs$1.registerLanguage("php",requirePhp()),hljs$1.registerLanguage("php-template",requirePhpTemplate()),hljs$1.registerLanguage("plaintext",requirePlaintext()),hljs$1.registerLanguage("pony",requirePony()),hljs$1.registerLanguage("powershell",requirePowershell()),hljs$1.registerLanguage("processing",requireProcessing()),hljs$1.registerLanguage("profile",requireProfile()),hljs$1.registerLanguage("prolog",requireProlog()),hljs$1.registerLanguage("properties",requireProperties()),hljs$1.registerLanguage("protobuf",requireProtobuf()),hljs$1.registerLanguage("puppet",requirePuppet()),hljs$1.registerLanguage("purebasic",requirePurebasic()),hljs$1.registerLanguage("python",requirePython()),hljs$1.registerLanguage("python-repl",requirePythonRepl()),hljs$1.registerLanguage("q",requireQ()),hljs$1.registerLanguage("qml",requireQml()),hljs$1.registerLanguage("r",requireR()),hljs$1.registerLanguage("reasonml",requireReasonml()),hljs$1.registerLanguage("rib",requireRib()),hljs$1.registerLanguage("roboconf",requireRoboconf()),hljs$1.registerLanguage("routeros",requireRouteros()),hljs$1.registerLanguage("rsl",requireRsl()),hljs$1.registerLanguage("ruleslanguage",requireRuleslanguage()),hljs$1.registerLanguage("rust",requireRust()),hljs$1.registerLanguage("sas",requireSas()),hljs$1.registerLanguage("scala",requireScala()),hljs$1.registerLanguage("scheme",requireScheme()),hljs$1.registerLanguage("scilab",requireScilab()),hljs$1.registerLanguage("scss",requireScss()),hljs$1.registerLanguage("shell",requireShell()),hljs$1.registerLanguage("smali",requireSmali()),hljs$1.registerLanguage("smalltalk",requireSmalltalk()),hljs$1.registerLanguage("sml",requireSml()),hljs$1.registerLanguage("sqf",requireSqf()),hljs$1.registerLanguage("sql",requireSql()),hljs$1.registerLanguage("stan",requireStan()),hljs$1.registerLanguage("stata",requireStata()),hljs$1.registerLanguage("step21",requireStep21()),hljs$1.registerLanguage("stylus",requireStylus()),hljs$1.registerLanguage("subunit",requireSubunit()),hljs$1.registerLanguage("swift",requireSwift()),hljs$1.registerLanguage("taggerscript",requireTaggerscript()),hljs$1.registerLanguage("yaml",requireYaml()),hljs$1.registerLanguage("tap",requireTap()),hljs$1.registerLanguage("tcl",requireTcl()),hljs$1.registerLanguage("thrift",requireThrift()),hljs$1.registerLanguage("tp",requireTp()),hljs$1.registerLanguage("twig",requireTwig()),hljs$1.registerLanguage("typescript",requireTypescript()),hljs$1.registerLanguage("vala",requireVala()),hljs$1.registerLanguage("vbnet",requireVbnet()),hljs$1.registerLanguage("vbscript",requireVbscript()),hljs$1.registerLanguage("vbscript-html",requireVbscriptHtml()),hljs$1.registerLanguage("verilog",requireVerilog()),hljs$1.registerLanguage("vhdl",requireVhdl()),hljs$1.registerLanguage("vim",requireVim()),hljs$1.registerLanguage("wasm",requireWasm()),hljs$1.registerLanguage("wren",requireWren()),hljs$1.registerLanguage("x86asm",requireX86asm()),hljs$1.registerLanguage("xl",requireXl()),hljs$1.registerLanguage("xquery",requireXquery()),hljs$1.registerLanguage("zephir",requireZephir()),hljs$1.HighlightJS=hljs$1,hljs$1.default=hljs$1;var lib$1=hljs$1;const HighlightJS=getDefaultExportFromCjs$1(lib$1),hljs=HighlightJS,actions$1={increment:(Ce,_e)=>{let Ae=JSON.parse(_e.getAttribute("props"))||{},{initialValue:Se=0,maxValue:Ee,changeBy:xe=1}=Ae;return Ce=convertToNumber(Ce,Se),Ee&&(Ee=convertToNumber(Ee,Ee)),xe&&(xe=convertToNumber(xe,xe)),Ce+=Ee&&Ce>=Ee?0:xe,Ce},double:Ce=>Ce*2,multiply:(Ce,_e)=>{let Ae=_e.meta.props,{multiplyBy:Se=1}=Ae;return Se&&(Se=convertToNumber(Se,Se)),Ce*Se},toggle:Ce=>(console.log(Ce),typeof Ce=="boolean"||!Ce?!Ce:Ce),decrement:(Ce,_e)=>{let Ae=JSON.parse(_e.getAttribute("props"))||{},{initialValue:Se=0,minValue:Ee,changeBy:xe=1}=Ae;return Ce=convertToNumber(Ce,Se),Ce-=Ee&&Ce<=Ee?0:xe,Ce},stringify:Ce=>JSON.stringify(Ce),replacePlaceholdersInPropsFromState:(Ce,_e)=>{let Ae=JSON.parse(_e.getAttribute("props"));return Ae&&(Ae=replaceCurlyBraces(Ae,"state",Ce),_e.setAttribute("newprops",JSON.stringify(Ae))),Ce},pushToArray:(Ce,_e,Ae={})=>{let Se=Object.keys(Ae||{}).length?Ae:_e.meta.props,{data:Ee}=Se;return Ee=replaceCurlyBraces(Ee,"state",Ce,Se,_e),Ce=replaceCurlyBraces(Ce,"state",Ce,Se,_e),Array.isArray(Ee)&&Ee.push(Ce),Ee},push:(Ce,_e,Ae={})=>{let Se=Object.keys(Ae||{}).length?Ae:_e.meta.props,{sourceArray:Ee=""}=Se;return Ee=replaceCurlyBraces(Ee,"state",Ce,Se,_e),Array.isArray(Ee)||(Ee=[]),[...Ee,Ce]},pushArrayItemsToExistingArray:(Ce,_e,Ae={})=>{var Te,Ie;if(!Ce)return Ce;let Se=Object.keys(Ae||{}).length?Ae:_e.meta.props,{data:Ee,stateName:xe}=replaceCurlyBraces(Se.pushArrayItemsToExistingArrayProps,"props",Ce,Se,_e);return Array.isArray(Ee)&&Ee.length>0&&((Ie=(Te=_e.store)==null?void 0:Te._signals[xe])==null||Ie.set([...Ce,...Ee])),[...Ce,...Ee]},removeFromArray:(Ce,_e,Ae={})=>{let Se=Object.keys(Ae||{}).length?Ae:_e.meta.props,{keyToDelete:Ee}=Se;return Array.isArray(Ce)&&(Ce=Ce.filter(xe=>xe!==replaceCurlyBraces(Ee,"state",Ce,Se,_e))),Ce},btnActions:(Ce,_e)=>{_e.getAttribute("id")},editById:(Ce,_e)=>{const Ae=_e.getAttribute("id"),Se=convertStringToObject(Ae);history.pushState(null,"","/card-builder/configure-card?graphId="+(Se==null?void 0:Se.graphId))},deleteById:(Ce,_e)=>{var Te,Ie,De;const Ae=_e.getAttribute("id");let Se=_e.getAttribute("props");Se?Se=JSON.parse(Se):console.error("props is null");const Ee=convertStringToObject(Ae),xe=replaceNestedValuesInObj((Te=Se==null?void 0:Se.APIData)==null?void 0:Te.body,Ee);fetch((Ie=Se==null?void 0:Se.APIData)==null?void 0:Ie.source,{method:"DELETE",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${(De=Se==null?void 0:Se.APIData)==null?void 0:De.token}`},body:JSON.stringify(xe)})},getById:async(Ce,_e)=>{var Be,Fe,$e;const Ae=_e.getAttribute("id");let Se=_e.getAttribute("props");Se?Se=JSON.parse(Se):console.error("props is null");let Ee=Ae.replace(/(\w+):/g,'"$1":');Ee=Ee.replace(/:(\w[\w\s-]*[\w])(?=[,}])/g,': "$1"');const xe=Ee.replace(/(\w+):/g,'"$1":').replace(/:(\w[\w\s\/-]*)/g,': "$1"'),Te=JSON.parse(xe);Se&&(Se.APIData=replaceCurlyBraces(Se==null?void 0:Se.APIData,"state",Ce,Te,void 0));let Ie=replaceNestedValuesInObj((Be=Se==null?void 0:Se.APIData)==null?void 0:Be.body,Te);const De=replaceCurlyBraces((Fe=Se==null?void 0:Se.APIData)==null?void 0:Fe.token,"",Ce),ke=replaceCurlyBraces(($e=Se==null?void 0:Se.APIData)==null?void 0:$e.source,"",Ce),Me=await(await fetch(ke,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${De}`},body:JSON.stringify(Ie)})).json();let Pe=Me;if(Se!=null&&Se.keyName){const Ue=Se==null?void 0:Se.keyName;Array.isArray(Me)?(Pe=Me.find(He=>He[Ue]),Pe=Pe[Ue]):typeof Me=="object"&&Me!==null&&(Pe=Me[Ue]===Ce)}else Pe={...Ce,...Me[0]};return Pe},agentCardOverlayTransformation:Ce=>{setTimeout(()=>{const _e=Array.from(document.querySelectorAll(".agent-card"));_e.forEach(Ee=>Ee.style.marginTop="0px"),_e.forEach(Ee=>{const xe=Ee.getBoundingClientRect();_e.forEach(Te=>{if(Ee!==Te){const Ie=Te.getBoundingClientRect();if(Ie.bottom>xe.top&&Ie.top<xe.bottom&&Ie.right>xe.left&&Ie.left<xe.right){const ke=Math.max(0,xe.bottom-Ie.top),Me=(parseFloat(window.getComputedStyle(Te).marginTop)||0)+ke+15;Te.style.marginTop=`${Me}px`}}})});let Ae=document.querySelectorAll('mobius-card[cardtype="mac-agent-dtcycle-card"]'),Se=0;_e.length>0&&Ae.forEach(Ee=>{let xe=Ee.offsetHeight;xe>Se&&(Se=xe)}),Ae.forEach(Ee=>{Se!=0?Ee.classList.add(`h-[${Se}px]`):Ee.classList.add("!h-full")})},0)},setDataToLocalStorage:async function(Ce,_e){console.log(Ce,_e);let Ae=JSON.parse(_e.getAttribute("props"));Ae&&Ae.productId&&localStorage.setItem("productId",Ae.productId)},setDataToLocalStorageGeneric:async function(Ce,_e){let Ae=JSON.parse(_e.getAttribute("props"));Ae&&Ae.dynamicData.sessionId&&localStorage.setItem("sessionId",Ae.dynamicData.sessionId),console.log("value in local",localStorage.getItem("sessionId"))},setDataFromStateToLocalStorage:(Ce,_e)=>{let Ae=JSON.parse(_e.getAttribute("props"));const{keyName:Se}=Ae;Se&&Ce&&localStorage.setItem(Se,JSON.stringify(Ce))},setDataFromLocalStorageToState:(Ce,_e)=>{let Ae=JSON.parse(_e.getAttribute("props"));const{keyName:Se}=Ae;if(Se){let Ee=localStorage.getItem(Se);if(Ee)try{return JSON.parse(Ee)}catch{return Ee}}return Ce},resolveDataOfState:(Ce,_e)=>(Ce=replaceCurlyBraces(Ce,"localStorage",Ce),Ce),emptyDom:(Ce,_e)=>(_e.innerHTML="",Ce),removeDataFromLocalStorage:(Ce,_e)=>{let Ae=JSON.parse(_e.getAttribute("props"));const{keyName:Se}=Ae;return typeof Se=="string"?localStorage.getItem(Se)&&localStorage.removeItem(Se):Array.isArray(Se)&&Se.forEach(Ee=>{localStorage.getItem(Ee)&&localStorage.removeItem(Ee)}),Ce},updateProfileField:(Ce,{field:_e,value:Ae})=>(console.log("updateProfileField",Ce,_e,Ae),{...Ce,[_e]:Ae}),updateProfile:(Ce,{profileName:_e,profileAge:Ae})=>({name:_e,age:Ae}),resetProfile:()=>({name:"User",age:30}),toggleMultiSelect:(Ce,_e)=>{var Ie,De,ke,Oe,Me,Pe,Be,Fe,$e,Ue,He,Ve;let Ae=_e==null?void 0:_e.name,Se=_e==null?void 0:_e.value,Ee=convertToString(Se),xe=_e==null?void 0:_e.key;return((_e==null?void 0:_e.multiSelect)??((Ie=_e==null?void 0:_e.props)==null?void 0:Ie.multiSelect))||(De=Ce==null?void 0:Ce[Ae+"state"])!=null&&De.multiSelect?(Oe=(ke=Ce==null?void 0:Ce[Ae+"state"])==null?void 0:ke.selectedItems)!=null&&Oe[Se]?((Pe=(Me=Ce==null?void 0:Ce[Ae+"state"])==null?void 0:Me.selectedItems)==null||delete Pe[Se],{...Ce,[Ae+"state"]:{...Ce==null?void 0:Ce[Ae+"state"],selectedItems:{...(Be=Ce==null?void 0:Ce[Ae+"state"])==null?void 0:Be.selectedItems}},[Ae]:Object.keys({...(Fe=Ce==null?void 0:Ce[Ae+"state"])==null?void 0:Fe.selectedItems})}):{...Ce,[Ae+"state"]:{...Ce==null?void 0:Ce[Ae+"state"],selectedItems:{...($e=Ce==null?void 0:Ce[Ae+"state"])==null?void 0:$e.selectedItems,[Ee]:xe}},[Ae]:Object.keys({...(Ue=Ce==null?void 0:Ce[Ae+"state"])==null?void 0:Ue.selectedItems,[Se]:xe})}:(Ve=(He=Ce==null?void 0:Ce[Ae+"state"])==null?void 0:He.selectedItems)!=null&&Ve[Se]?{...Ce,[Ae+"state"]:{...Ce==null?void 0:Ce[Ae+"state"],selectedItems:{}},[Ae]:""}:{...Ce,[Ae+"state"]:{...Ce==null?void 0:Ce[Ae+"state"],selectedItems:{[Ee]:xe},dropdownFocused:!1},[Ae]:Se}},dropdownToggle:(Ce,_e,Ae,Se)=>{var Ie,De;let Ee=(_e==null?void 0:_e.name)??((Ie=_e==null?void 0:_e.props)==null?void 0:Ie.name),xe=document.querySelectorAll("my-dropdown");return document.getElementById("save-button-for-all-the-dita-actions-01986977-bb2f-779c-a553-289b2f7ff3ae")||xe.forEach(ke=>{let Oe=ke;try{Oe.checkClickOutside(Se??Ae)}catch(Me){console.error(Me)}}),{...Ce,[Ee+"state"]:{...Ce==null?void 0:Ce[Ee+"state"],dropdownFocused:!((De=Ce==null?void 0:Ce[Ee+"state"])!=null&&De.dropdownFocused)}}},dropdownDefaultSelectionFromPropsFromObject:(Ce,_e)=>{var Ee,xe;const Ae={},Se=((xe=(Ee=_e==null?void 0:_e.meta)==null?void 0:Ee.props)==null?void 0:xe.dropdownKeys)??{};return typeof Se!="object"||Se===null?Ce:(Object.keys(Se).forEach(Te=>{const{source:Ie,multiselect:De=!1,keyName:ke="",valueName:Oe=""}=Se[Te]||{};let Me=Ie?replaceCurlyBraces(Ie,"state",Ce,null,_e):Ce;if(Array.isArray(Me)||(Me=[Me]),De)Me.forEach(Pe=>{const Be=get$6(Pe,ke,""),Fe=get$6(Pe,Oe,"");Be&&(Ae[Te]||(Ae[Te]=[]),Ae[Te].push(Fe),Ae[`${Te}state`]=Ae[`${Te}state`]||{selectedItems:{}},Ae[`${Te}state`].selectedItems[Fe]=Be)});else{const Pe=Me[0],Be=get$6(Pe,ke,""),Fe=get$6(Pe,Oe,"");if(!Be)return;Ae[Te]||(Ae[Te]=[]),Ae[Te].push(Fe),Ae[`${Te}state`]=Ae[`${Te}state`]||{selectedItems:{}},Ae[`${Te}state`].selectedItems[Fe]=Be}}),{...Ce,...Ae})},dropdownDefaultSelectionFromProps:(Ce,_e,Ae)=>{var Ee,xe,Te;let Se=Ae&&((Ee=Object.keys(Ae))==null?void 0:Ee.length)>0?Ae:(xe=_e==null?void 0:_e.meta)==null?void 0:xe.props;return(Te=Se==null?void 0:Se.dropdownKeys)==null||Te.forEach(Ie=>{const De=Ce==null?void 0:Ce[Ie];(Array.isArray(De)||typeof De=="string")&&De.length&&(Ce[Ie+"state"]=Ce[Ie+"state"]??{dropdownFocused:!1,selectedItems:{}},Array.isArray(De)?Ce[Ie+"state"].selectedItems=De.reduce((ke,Oe)=>Oe!=null?{...ke,[Oe]:Oe}:ke,Ce[Ie+"state"].selectedItems||{}):Ce[Ie+"state"].selectedItems={[De]:De})}),Ce},clearDropdown:(Ce,_e)=>{let Ae=_e==null?void 0:_e.name;return{...Ce,[Ae+"state"]:{...Ce==null?void 0:Ce[Ae+"state"],selectedItems:{},dropdownFocused:!1},[Ae]:""}},showToaster:(Ce,_e,Ae)=>{let{message:Se,severity:Ee="success"}=Ae&&Object.keys(Ae).length?Ae:_e.meta.props;return ToastService[Ee]&&ToastService[Ee](Se),Ce},inputChange:(Ce,_e)=>{var Se;let Ae=(Se=_e==null?void 0:_e.target)==null?void 0:Se.value;return{...Ce,searchedText:Ae}},filterActions(Ce,_e){var Ae;return(Ae=_e==null?void 0:_e.productsData)==null?void 0:Ae.filter(Se=>{var Ee,xe;return(xe=String(Se==null?void 0:Se[(Ee=_e==null?void 0:_e.props)==null?void 0:Ee.filterOver]))==null?void 0:xe.toLowerCase().includes(Ce==null?void 0:Ce.toLowerCase())})},helloWorld:()=>(console.log("Hello World"),"Hello World"),log:(Ce,_e,Ae)=>(console.log(Ce,"log",Ae),Ce),getFomattedDateAndTime:(Ce,_e)=>{try{const Ae=JSON.parse(_e.getAttribute("props")||"{}");return((Ae==null?void 0:Ae.dates)||[]).forEach(Ee=>{let xe=get$6(Ce,Ee.path,"")||"";const Te=Ee.format;typeof xe!="string"&&(xe=String(xe)),/^\d+$/.test(xe)&&(xe=xe.length==10?xe+"000":xe,xe=Number(xe));const Ie=xe?new Date(xe):new Date,De=/[Hhmmsa]/.test(Te);if(!/[yMd]/.test(Te)&&!De)return"";const Oe=format$3(Ie,Te);set$a(Ce,Ee.path,Oe)}),Ce}catch{return Ce}},mergeArrayData:(Ce,_e)=>{const{keysToMerge:Ae}=JSON.parse(_e.getAttribute("props"));let Se=[];return Ae.forEach(Ee=>{Se.push(...replaceCurlyBraces(Ee,"state",Ce,_e.meta.props,_e))}),{...Ce,mergedData:Se}},sendEmail:async(Ce,_e)=>{try{const{emailKey:Ae="email",serviceId:Se="service_3qwn0yg",templateId:Ee="template_9ojec3c",payload:xe={},publicKey:Te="5YisMftiRUqE3JCUa"}=JSON.parse(_e.getAttribute("props")),Ie=Ce,De=[];for(const ke of Ie){let Oe={};Object.keys(xe).forEach(Pe=>{Oe[Pe]=replaceCurlyBraces(xe[Pe],"state",Ce,_e.meta.props,_e)}),Oe[Ae]=ke,console.log(Oe);let Me=await emailjs.send(Se,Ee,Oe,Te);De.push(Me)}return De}catch(Ae){return console.log(Ae.message),Ae}},exportXML:(Ce,_e)=>{if(!Ce){console.log("Valid string input not found!");return}const Ae=get$6(Ce,""),Se=new Blob([Ae],{type:"application/xml"}),Ee=URL.createObjectURL(Se),xe=document.createElement("a");xe.href=Ee,xe.download="exported.xml",xe.click(),URL.revokeObjectURL(Ee)},methodEditorDitaContent:(Ce,_e)=>{var Ae;return Ce&&((Ae=_e.editor)==null?void 0:Ae.getValue())!=Ce&&_e.editorDitaContent(Ce),Ce},methodXMLTheme:(Ce,_e)=>{_e.xmlTheme(Ce)},methodEditorViewType:(Ce,_e)=>{_e.editorViewType(Ce)},methodAddContentBlockType:(Ce,_e)=>{_e.addContentBlockType(Ce,_e)},addAssetInstanceToCMS:(Ce,_e)=>{const Ae=_e.meta.props.assetType;console.log(Ae,Ce,"this is image")},addContextTopic:async(Ce,_e)=>{var $e;const Ae=_e.meta.props,Se=replaceCurlyBraces(Ae.selectedTopic,"state",Ce,Ae,_e),Ee=Ce.topicData;let xe=[];const Te="otherprops",Ie=Ce.contextId,De=(Ae==null?void 0:Ae.detachContext)||!1,ke=Ue=>{try{const He=Ue.includes('<?xml version="1.0" encoding="UTF-8"?>'),Ve=Ue.includes('<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">');if(!He&&!Ve)return Ue;const ze=new DOMParser().parseFromString(Ue,"application/xml"),qe=ze.getElementsByTagName("parsererror")[0];if(qe)return console.error("XML parsing failed:",qe.textContent),Ue;const Ke=ze.documentElement;return Ke?new XMLSerializer().serializeToString(Ke):(console.warn("No root element found in XML"),Ue)}catch(He){return console.error("Error removing XML declaration and DOCTYPE:",He),Ue}},Oe=Ue=>{const He=Ue.includes('<?xml version="1.0" encoding="UTF-8"?>'),Ve=Ue.includes("<!DOCTYPE"),We=Ue.includes('<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">');return{hasXmlDeclaration:He,hasDoctype:Ve,hasTopicDoctype:We}},Me=(Ue,He,Ve,We)=>{try{const qe=new DOMParser().parseFromString(Ue,"application/xml"),Ke=qe.getElementsByTagName("topicref");if(qe.getElementsByTagName("topic")[0])return console.warn("Received a topic file instead of a map file. No topicref elements to modify."),"";if(!qe.getElementsByTagName("map")[0])return console.warn("XML does not appear to be a valid DITA map or topic file."),"";for(let sn of Ke)if(sn.getAttribute("navtitle")===He){De&&sn.hasAttribute(Ve)?sn.removeAttribute(Ve):sn.setAttribute(Ve,We);break}let St=new XMLSerializer().serializeToString(qe.documentElement),Xe=Oe(St);return(Xe.hasXmlDeclaration||Xe.hasDoctype||Xe.hasTopicDoctype)&&(St=ke(St)),`<?xml version="1.0" encoding="UTF-8"?>
|
|
319
319
|
`+`<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
|
|
320
320
|
`+St}catch(ze){return console.error("Error parsing or modifying XML:",ze),""}},Pe=(Ue,He)=>{var Ve,We,ze,qe;if(!((We=(Ve=Ee[0])==null?void 0:Ve.contextIds)!=null&&We.length)||!Array.isArray(Ee[0].contextIds))xe.push({ids:[Ue],prop:He});else if(De&&((qe=(ze=Ee==null?void 0:Ee[0])==null?void 0:ze.contextIds)==null?void 0:qe.length)>0){for(let Ke of Ee[0].contextIds)if((Ke==null?void 0:Ke.prop)===He){Ke.ids=Ke.ids.filter(Ge=>Ge!==Ue),xe=Ee[0].contextIds;break}}else{let Ke=!1;for(let Ge of Ee[0].contextIds)if((Ge==null?void 0:Ge.prop)===He){Ge.ids.push(Ue),Ke=!0,xe=Ee[0].contextIds;break}Ke||xe.push({ids:[Ue],prop:He})}return xe=xe==null?void 0:xe.map(Ke=>Ke.prop===He?{...Ke,ids:[...new Set([...Ke.ids])]}:Ke),"Added contextIds "},Be=async(Ue,He)=>{const Ve="https://igs.gov-cloud.ai/pi-entity-instances-service/v2.0/schemas/6941203a98f23e7f0271b402/instances",We="eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3Ny1NUVdFRTNHZE5adGlsWU5IYmpsa2dVSkpaWUJWVmN1UmFZdHl5ejFjIn0.eyJleHAiOjE3MjYxODIzMzEsImlhdCI6MTcyNjE0NjMzMSwianRpIjoiOGVlZTU1MDctNGVlOC00NjE1LTg3OWUtNTVkMjViMjQ2MGFmIiwiaXNzIjoiaHR0cDovL2tleWNsb2FrLmtleWNsb2FrLnN2Yy5jbHVzdGVyLmxvY2FsOjgwODAvcmVhbG1zL21hc3RlciIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJIT0xBQ1JBQ1kiLCJzZXNzaW9uX3N0YXRlIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwibmFtZSI6ImtzYW14cCBrc2FteHAiLCJnaXZlbl9uYW1lIjoia3NhbXhwIiwiZmFtaWx5X25hbWUiOiJrc2FteHAiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWwiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiLyoiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZmF1bHQtcm9sZXMtbWFzdGVyIiwib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7IkhPTEFDUkFDWSI6eyJyb2xlcyI6WyJIT0xBQ1JBQ1lfVVNFUiJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJwcm9maWxlIGVtYWlsIiwic2lkIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwidGVuYW50SWQiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJyZXF1ZXN0ZXJUeXBlIjoiVEVOQU5UIn0=.FXeDyHBhlG9L4_NCeSyHEaNEBVmhFpfSBqlcbhHaPaoydhKcA0BfuyHgxg_32kQk6z5S9IQ7nVKS2ybtOvwo0WyLWwLQchSq7Noa7LooHIMzmeWMQb_bLKtbaOti59zwIdS8CkfGaXut7RUQKISQVWmbUGsVJQa2JkG6Ng_QN0y5hFVksMWPZiXVsofQkJXHXV1CQ3gabhhHKo3BqlJwzpsCKLDfg1-4PmSl1Wqbw03Ef2yolroj5i8FoeHukOQPkwCUHrrNw-ilIp917nqZa89YbCMtDjWyaj8pEH7GJR5vMZPE2WcJPn5dSA1IHVunfatEB1cDAitaFjVNWNnddq",ze={primarykeyEnable:!0,data:{contextIds:xe,content:He,id:Ee[0].id}};return await(await fetch(Ve,{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${We}`},body:JSON.stringify(ze)})).json()},Fe=Me(($e=Ee[0])==null?void 0:$e.content,Se.name,Te,Ie);return Fe?(Pe(Ie,Te),await Be(xe,Fe)):Ce},addContextAtTopicLevel:async(Ce,_e)=>{_e.meta.props;let Ae=[];const Se=Ce.topicData,Ee="otherprops",xe=Ce.contextId;try{let Te=function(Me,Pe,Be){const $e=new DOMParser().parseFromString(Me.data.dita,"application/xml"),Ue=Me.focusedNode,He=Ue==null?void 0:Ue.content,Ve=Ue==null?void 0:Ue.position,We=Ue==null?void 0:Ue.type,ze=Ue==null?void 0:Ue.depth,qe=Ue==null?void 0:Ue.parentType,Ke=(Ue==null?void 0:Ue.attrs)||{},Ye={paragraph:"p",title:"title",list:"ul",listItem:"li",table:"table",tableRow:"row",tableCell:"entry",section:"section",note:"note",fig:"fig",image:"image",codeblock:"codeblock",topic:"topic",body:"body"}[We]||We;function Qe(rn){let sn=0,pn=rn.parentNode;for(;pn&&pn!==$e;)sn++,pn=pn.parentNode;return sn}function St(rn){const sn=new XMLSerializer,pn=sn.serializeToString($e),mn=sn.serializeToString(rn);return pn.indexOf(mn)}const Xe=$e.getElementsByTagName(Ye);let Je=null;for(let rn=0;rn<Xe.length;rn++){const sn=Xe[rn],pn=sn.textContent.trim(),mn=Qe(sn),yn=St(sn),xn=sn.parentNode,En=xn?xn.tagName.toLowerCase():null;let Mn=!0;if(He!=null&&pn!==He){Mn=!1;continue}if(mn!==ze){Mn=!1;continue}for(const[Hn,gn]of Object.entries(Ke))if(gn!=null&&sn.getAttribute(Hn)!==gn){Mn=!1;break}if(Mn){Je=sn;break}}if(Je){Je.setAttribute(Pe,Be);let sn=new XMLSerializer().serializeToString($e);return sn=sn.replace('<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">',""),sn=sn.replace(/></g,`>
|
|
321
|
-
<`),{...Me,data:{...Me.data,dita:sn}}}else return console.warn(`Could not find exact match for focused node of type '${We}' in DITA content`),Me},Ie=function(Me,Pe){var Be,Fe;if(!((Fe=(Be=Se[0])==null?void 0:Be.contextIds)!=null&&Fe.length)||!Array.isArray(Se[0].contextIds))Ae.push({ids:[Me],prop:Pe});else{let $e=!1;for(let Ue of Se[0].contextIds)if((Ue==null?void 0:Ue.prop)===Pe){Ue.ids.push(Me),$e=!0,Ae=Se[0].contextIds;break}$e||Ae.push({ids:[Me],prop:Pe})}return Ae=Ae==null?void 0:Ae.map($e=>$e.prop===Pe?{...$e,ids:[...new Set([...$e.ids])]}:$e),"Added contextIds "};async function De(Me,Pe){const Be="https://igs.gov-cloud.ai/pi-entity-instances-service/v2.0/schemas/6941203a98f23e7f0271b402/instances",Fe="eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3Ny1NUVdFRTNHZE5adGlsWU5IYmpsa2dVSkpaWUJWVmN1UmFZdHl5ejFjIn0.eyJleHAiOjE3MjYxODIzMzEsImlhdCI6MTcyNjE0NjMzMSwianRpIjoiOGVlZTU1MDctNGVlOC00NjE1LTg3OWUtNTVkMjViMjQ2MGFmIiwiaXNzIjoiaHR0cDovL2tleWNsb2FrLmtleWNsb2FrLnN2Yy5jbHVzdGVyLmxvY2FsOjgwODAvcmVhbG1zL21hc3RlciIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJIT0xBQ1JBQ1kiLCJzZXNzaW9uX3N0YXRlIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwibmFtZSI6ImtzYW14cCBrc2FteHAiLCJnaXZlbl9uYW1lIjoia3NhbXhwIiwiZmFtaWx5X25hbWUiOiJrc2FteHAiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWwiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiLyoiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZmF1bHQtcm9sZXMtbWFzdGVyIiwib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7IkhPTEFDUkFDWSI6eyJyb2xlcyI6WyJIT0xBQ1JBQ1lfVVNFUiJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJwcm9maWxlIGVtYWlsIiwic2lkIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwidGVuYW50SWQiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJyZXF1ZXN0ZXJUeXBlIjoiVEVOQU5UIn0=.FXeDyHBhlG9L4_NCeSyHEaNEBVmhFpfSBqlcbhHaPaoydhKcA0BfuyHgxg_32kQk6z5S9IQ7nVKS2ybtOvwo0WyLWwLQchSq7Noa7LooHIMzmeWMQb_bLKtbaOti59zwIdS8CkfGaXut7RUQKISQVWmbUGsVJQa2JkG6Ng_QN0y5hFVksMWPZiXVsofQkJXHXV1CQ3gabhhHKo3BqlJwzpsCKLDfg1-4PmSl1Wqbw03Ef2yolroj5i8FoeHukOQPkwCUHrrNw-ilIp917nqZa89YbCMtDjWyaj8pEH7GJR5vMZPE2WcJPn5dSA1IHVunfatEB1cDAitaFjVNWNnddq",$e={primarykeyEnable:!0,data:{contextIds:Ae,content:Pe,id:Se[0].id}};return await(await fetch(Be,{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${Fe}`},body:JSON.stringify($e)})).json()}let ke=Te(Ce,Ee,Ce.contextId);Ie(xe,Ee);const Oe=await De(Ae,ke.data.dita);return{...Ce,result:Oe}}catch{return Ce}},getMediaType:(Ce,_e)=>{if(!Ce)return"UNKNOWN";const Ae=Ce.toLowerCase();return Ae.startsWith("image/")?"IMAGE":Ae.startsWith("video/")?"VIDEO":Ae.startsWith("audio/")?"AUDIO":Ae==="text/html"?"HTML":Ae==="application/pdf"||Ae.startsWith("application/msword")||Ae.startsWith("application/vnd.ms-excel")||Ae.startsWith("application/vnd.openxmlformats")||Ae==="application/json"||Ae==="text/plain"?"DOCUMENT":"UNKNOWN"},generateChartPreview:(Ce,_e)=>{console.log(Ce,"this is the value");const Ae={id:"right-nav-bar-agent-center",track:["render","click"],type:"mobius-charts-card",role:"",version:"v1",lang:"en-us","alt-text":"",name:"agent-expand-center",props:{header:"false",data:Ce,dropDownListItems:[],keysToAppend:["entityId","graphId"]},styles:"h-[50vh] bg-white p-4 p-3 block gap-y-6 w-full",children:[]},Se=document.querySelector(`.selected-${localStorage.getItem("selectedCardPosition")}`);if(console.log(Se,"this is element"),!Se)return;Se.innerHTML="";let Ee=mountComponents([Ae],_e);Se.appendChild(Ee),console.log("generateChartPreview")},async makeMultipleApiCalls(Ce,_e){var Ae,Se,Ee,xe,Te,Ie,De,ke,Oe,Me,Pe;try{if(!(Ce!=null&&Ce.isValid))return Ce;const Be=JSON.parse(_e.getAttribute("props")),Fe=(Be==null?void 0:Be.sources)||[];let $e=Be==null?void 0:Be.token,Ue={};for(let He=0;He<Fe.length;He++){let Ve=Fe[He].payloadStructure,We=Fe[He].bodyType,ze=Fe[He].url,qe=Fe[He].header,Ke=Fe[He].method,Ge=(Ae=Fe[He])==null?void 0:Ae.bodyStructure,Ye=((Se=Fe[He])==null?void 0:Se.tokenKey)||void 0,Qe=((Ee=Fe[He])==null?void 0:Ee.responseData)||!1,St=((xe=Fe[He])==null?void 0:xe.responseKey)||void 0,Xe=((Te=Fe[He])==null?void 0:Te.showToaster)||void 0,Je=((Ie=Fe[He])==null?void 0:Ie.toast)||void 0;const rn=(Ve==null?void 0:Ve.toaster)||{};if($e=((De=Fe[He])==null?void 0:De.token)||$e||"",(Ve==null?void 0:Ve.payloadType)==="query"){ze=(ke=ze==null?void 0:ze.split("?"))==null?void 0:ke[0];let sn=Object.entries((Ve==null?void 0:Ve.payloadKeys)||{}),pn="",mn={};for(let yn=0;yn<sn.length;yn++){let[xn,En]=sn[yn];En.access==="props"?pn+=xn+"="+get$6(Ce,En.value,"")||En.value||"":En.access==="response"&&(pn+=xn+"="+get$6(mn,En.value,St??"")||En.value||""),yn<sn.length-1&&(pn+="&")}ze+="?"+pn,mn=await makeAPiCall(ze,{},Ke,$e,Ye,Qe,qe),(Oe=mn==null?void 0:mn.model)!=null&&Oe.data&&(mn=mn.model.data)}else if((Ve==null?void 0:Ve.payloadType)==="body"){let sn=Object.entries((Ve==null?void 0:Ve.payloadKeys)||{}),pn;if((Ve==null?void 0:Ve.loopOver)!=null){pn=[];let yn=get$6(Ce,Ve==null?void 0:Ve.loopOver);yn==null||yn.map(xn=>{let En={};sn==null||sn.forEach(([Mn,Hn])=>{if(Hn.access==="props"?En[Mn]=get$6(xn,Hn.value,"")??(Hn!=null&&Hn.defaultEmpty?"":Hn.value??""):Hn.access==="response"&&(En[Mn]=get$6(Ue,Hn.value,"")??(Hn!=null&&Hn.defaultEmpty?"":Hn.value??"")),Hn.parseJson)try{En[Mn]=JSON.parse(En[Mn])}catch{console.error(`${En[Mn]} cant be json parsed`)}}),pn.push(En)})}else pn={},sn==null||sn.forEach(([yn,xn])=>{if(xn.access==="props"?pn[yn]=get$6(Ce,xn.value,"")??(xn!=null&&xn.defaultEmpty?"":xn.value??""):xn.access==="response"&&(pn[yn]=get$6(Ue,xn.value,"")??(xn!=null&&xn.defaultEmpty?"":xn.value??"")),xn.parseJson)try{pn[yn]=JSON.parse(pn[yn])}catch{console.error(`${pn[yn]} cant be json parsed`)}});let mn={};if(Ge!=null){const yn=Ge.match(/\[(.*?)\]/);yn&&(Ge=yn[1],console.log(Ge)),mn=set$a({},Ge,pn),yn&&(mn=[mn])}else Array.isArray(pn)?mn={data:pn}:mn={data:[pn]};try{Ue=await makeAPiCall(ze,mn,Ke,$e,Ye,Qe,We,qe);const yn=((Me=Ue.headers)==null?void 0:Me.get("content-type"))||"";if(Ue instanceof Response){if((Ue!=null&&Ue.ok||(Ue==null?void 0:Ue.status)==200)&&Object.keys(rn).length)try{if(Ue.bodyUsed)rn.toastValue=getSuccessMessage(rn,Ue),ToastService.success(rn);else{const En=Ue.clone().json();rn.toastValue=getSuccessMessage(rn,En),ToastService.success(rn)}}catch{console.log("Error parsing response in makeMultipleApiCalls for toaster")}if(!Ue.ok&&Object.keys(rn).length)try{if(Ue.bodyUsed)rn.toastValue=getSuccessMessage(rn,Ue),ToastService.error(rn);else{const En=Ue.clone().json();rn.toastValue=getErrorMessage(rn,En),ToastService.error(rn)}}catch{console.log("Error parsing response in makeMultipleApiCalls for toaster")}}else Ue.error||Ue.errorMessage?(rn.toastValue=getErrorMessage(rn,Ue),ToastService.error(rn)):(rn.toastValue=getSuccessMessage(rn,Ue),ToastService.success(rn));if(yn.includes("audio")){const xn=await Ue.blob();Ue=URL.createObjectURL(xn)}else{if(yn==="application/octet-stream")return await Ue.text();(Pe=Ue==null?void 0:Ue.model)!=null&&Pe.data&&(Ue=Ue.model.data)}Ce={...Ce,...St?{[St]:Ue}:Ue}}catch(yn){return console.log(yn),Ce}}}return Ce}catch(Be){return console.log(Be),Ce}},postFormData:(Ce,_e)=>new Promise(async(Ae,Se)=>{var xe;if(((Ce==null?void 0:Ce.componentType)=="form"||(Ce==null?void 0:Ce.type)=="form")&&((Ce==null?void 0:Ce.isValid)??!0))try{const Te=JSON.parse(_e.getAttribute("props"));let{source:Ie,token:De="",postData:ke,onSubmit:Oe,keys:Me=[],payLoadType:Pe,contentType:Be,method:Fe="POST",chartContainerId:$e,chartData:Ue,header:He={},API:Ve={}}=Te;const{toaster:We={}}=Ve,ze={};Ie=replaceCurlyBraces(Ie,"",Ce),ke=replaceCurlyBraces(ke,"",Ce),De=replaceCurlyBraces(De,"",Ce),Me==null||Me.forEach(Ke=>{ze[Ke]=Ce[Ke]});var Ee;switch(Ie=replaceCurlyBraces(Ie,"",Ce,(xe=_e==null?void 0:_e.meta)==null?void 0:xe.props,_e),Pe.toLowerCase()){case"json":{let Ke=JSON.stringify(ke[0]),Ge=JSON.stringify(ze);try{let Ye=Ke.replace('"*"',()=>Ge);Ye=JSON.parse(Ye),Ye=replaceCurlyBraces(Ye,"",Ce),Ee=JSON.stringify(Ye),console.log(Ee)}catch(Ye){console.error("Error parsing the data:",Ye),Se(Ye)}break}case"generatedynamicchart":{createDynamicChart(ze,$e,Ce,_e,Ue),Ie=null;break}case"formdata":{Ee=new FormData;const Ke={...ze},Ge={};for(let Ye=0;Ye<ke.length;Ye++){const Qe=ke[Ye];let St=Ke[Qe];St!==void 0?(delete Ke[Qe],typeof St=="object"&&!(St instanceof File)&&!(St instanceof Blob)?Ee.append(Qe,JSON.stringify(St)):Ee.append(Qe,St)):Ge[Qe]=St}Object.keys(Ge).length>0&&Ee.append("extra_data",JSON.stringify(Ge));break}case"generateapicallfrominputfields":{De=replaceCurlyBraces(ze.headerValue),Ie=replaceCurlyBraces(ze.source),Fe=ze.method,Ee=typeof ze.data=="object"?JSON.stringify(ze.data):ze.data;break}}if(!Ie)return;De=replaceCurlyBraces(De,"",Ce);const qe={Accept:"*/*",Authorization:appendBearerToToken(De||""),...He};qe["content-type"]=Be||"application/json",qe["accept-language"]="*",await fetch(Ie,{method:Fe,headers:qe,body:Ee}).then(async Ke=>{if(!Ke.ok){const Ge=await Ke.json();throw We&&Object.keys(We).length&&(We.toastValue=getErrorMessage(We,Ge),ToastService.error(We)),new Error(`HTTP error! status: ${Ke.status}`)}return Ke.ok&&Te.removeNodeAfterSuccess&&Object.keys(Te.removeNodeAfterSuccess).length&&removeNode$1({...Te.removeNodeAfterSuccess,scope:_e}),Ke.json()}).then(Ke=>{We&&Object.keys(We).length&&(We.toastValue=getSuccessMessage(We,Ke),ToastService.success(We)),console.log("Fetch successful:",Ke,_e.signal),Ce.response=Ke}),Ae(Ce)}catch(Te){console.error("Error in postFormData:",Te),Se(Te)}Ae(Ce)}),getTypeFromURL:(Ce,_e)=>{var xe,Te;let Ae=JSON.parse(_e.getAttribute("props")),{stateName:Se,path:Ee}=Ae;if(Ce=((Te=(xe=_e.store._signals[Se])==null?void 0:xe.value)==null?void 0:Te[Ee])??null,!!Ce){if(Ce.includes("adhoc"))return"adhoc";if(Ce.includes("cohort"))return"cohort";if(Ce.includes("schemas")||Ce.includes("schema"))return"schema"}},getDropdownSelectedLabel:(Ce,_e)=>{if(Ce&&Ce instanceof Object)return Object.values(Ce)},rotate90:(Ce,_e)=>{_e.children[0].classList.toggle("rotate-90")},getCardBuilderDropdownOptions:(Ce,_e)=>{const Ae=(Ce==null?void 0:Ce.response)??[],Se=JSON.parse(_e.getAttribute("props"));if(!Array.isArray(Ae)||Ae.length===0)return{};const Ee={},xe=Object.keys(Ae[0]);for(const Ie of xe)Ee[Ie]=Ae.map(De=>De[Ie]);let Te=[];for(let Ie in Ee)Te.push({[Se.keyName]:Ie,[Se.valueName]:JSON.stringify(Ee[Ie])});return console.log({dropdownOptions:Te,...Ce}),_e.setAttribute("menudata",JSON.stringify(Te)),{dropdownOptions:Te,...Ce}},getTopicContent:async(Ce,_e)=>(_e.debounceTimer&&clearTimeout(_e.debounceTimer),new Promise(Ae=>{_e.debounceTimer=setTimeout(async()=>{var Ue,He;(He=(Ue=_e.store)==null?void 0:Ue._signals.topicAccordianLoader)==null||He.set(!0);const Se=_e.getAttribute("props"),{source:Ee,token:xe,apiMethod:Te="POST",topicIdFrom:Ie="",keyName:De="",ownedOnly:ke=!0,id:Oe=""}=JSON.parse(Se);let Me=typeof Ce=="string"&&Ce?Ce:Oe||_e.getAttribute("id");if(!Me)return console.error("Topic ID is not provided or found in the value or scope."),Ce;let Pe=replaceCurlyBraces(xe,"localStorage",Ce,null);Ie==="localstorage"&&(Me=(localStorage.getItem(De)||"").replace(/["']/g,""));const Be={dbType:"TIDB",ownedOnly:ke,filter:{type:"topic",[Ie?"templateId":"id"]:Me||Me}};let Fe={};await fetch(Ee,{method:Te,body:JSON.stringify(Be),headers:{Accept:"*/*","Content-Type":"application/json",Authorization:`Bearer ${Pe}`}}).then(Ve=>Ve.json()).then(async Ve=>{var Ye,Qe,St,Xe,Je,rn,sn,pn;const We=await xmlToDita(((Ye=Ve==null?void 0:Ve[0])==null?void 0:Ye.content)===""?'<topic id="dynamic_info"><title id="c46b5b04-be26-42ca-908d-409a6a06a465">Test Template</title><body><p >primary {state}</p><p >secondary {state}, Confirmed {region}.</p><p >tertiary {state}, Verified {event}..</p></body></topic>':(Qe=Ve==null?void 0:Ve[0])==null?void 0:Qe.content),ze=((St=Ve==null?void 0:Ve[0])==null?void 0:St.id)??"",qe=((Xe=Ve==null?void 0:Ve[0])==null?void 0:Xe.name)??"",Ke=((rn=(Je=Ve==null?void 0:Ve[0])==null?void 0:Je.piMetadata)==null?void 0:rn.transactionId)??"",Ge=((sn=Ve==null?void 0:Ve[0])==null?void 0:sn.updatedAt)??"";localStorage.setItem("projectId",(pn=Ve==null?void 0:Ve[0])==null?void 0:pn.projectId),Fe={id:ze,name:qe,dita:We,transactionId:Ke,updatedAt:Ge}}).catch(Ve=>{Fe={id:"",name:"",dita:"",transactionId:"",updatedAt:""},console.error("Error fetching topic content:",Ve)}).finally(()=>{var Ve,We;(We=(Ve=_e.store)==null?void 0:Ve._signals.topicAccordianLoader)==null||We.set(!1)});let $e;Ce&&typeof Ce!="string"?$e={...Ce,...Fe}:$e={...Fe},Ae($e)},500)})),getTopicVariables:async(Ce,_e)=>{var Te;const{source:Ae,token:Se,apiMethod:Ee,payload:xe}=(Te=_e.meta.props)==null?void 0:Te.variablesApi;return await fetch(Ae,{method:Ee,headers:{"Content-Type":"application/json",Authorization:`Bearer ${Se}`},body:JSON.stringify(xe)}).then(Ie=>{if(!Ie.ok)throw new Error("Network response was not ok");return Ie.json()}).then(Ie=>(console.log("Fetched variables successful:",Ie),Ie)).catch(Ie=>{console.error("Failded to get Variables :",Ie)})},test:(Ce,_e)=>{console.log({value:Ce,scope:_e})},setDataFromEventToState:(Ce,_e,Ae,Se)=>(console.log(Se),Se.detail),callAPIInAccordion:function(Ce,_e){const Ae=_e.getAttribute("props");_e.innerHTML="";let{source:Se,token:Ee,apiMethod:xe="GET",payload:Te,isResponsePresent:Ie,res:De,showLoader:ke=!1,...Oe}=JSON.parse(Ae),Me=Ie||(Ce==null?void 0:Ce.isResponsePresent),Pe=De||(Ce==null?void 0:Ce.res);return Te=replaceCurlyBraces(Te,"localStorage",Ce,{},_e),Ee=replaceCurlyBraces(Ee),Ee&&!Ee.includes("Bearer")&&(Ee=`Bearer ${Ee}`),Se&&Ee?fetch(Se,{method:xe,body:xe==="POST"?JSON.stringify(Te):void 0,headers:{"Content-Type":"application/json",Authorization:Ee}}).then(Fe=>Fe.json()).then(Fe=>(Fe&&generateDynamicAccordion(Fe,_e,Oe),Fe)):(Me&&Pe&&(generateDynamicAccordion(Pe,_e,Oe),ke&&this.removeLoader({},_e.parentElement)),Me&&Pe&&generateDynamicAccordion(Pe,_e,Oe),Ce)},getDropdownData:(Ce,_e)=>{const Ae=_e.getAttribute("props");let{apiEndpoint:Se,token:Ee,apiMethod:xe="POST",payload:Te,pathToData:Ie="entities",mode:De,formType:ke}=JSON.parse(Ae);if(_e.innerHTML="",Se=replaceCurlyBraces(Se,"localStorage",Ce,_e.meta.props,_e),Te=replaceCurlyBraces(Te,"localStorage",Ce,_e.meta.props,_e),Ee=replaceCurlyBraces(Ee,"localStorage",Ce,_e.meta.props,_e)||Ee||"",Se){let Oe={method:xe,body:JSON.stringify(Te),headers:{"Content-Type":"application/json",Authorization:`Bearer ${Ee}`},referrerPolicy:De||void 0};if(ke){const Me=new FormData;for(const[Pe,Be]of Object.entries(Te))Me.append(Pe,String(Be));Oe={method:xe,body:Me,headers:{Authorization:`Bearer ${Ee}`},referrerPolicy:De||void 0}}fetch(Se,Oe).then(Me=>Me.json()).then(Me=>{if(Me){let Pe=get$6(Me,Ie);try{Pe=parseNestedJSON(Pe)}catch{}finally{_e.setAttribute("menudata",JSON.stringify(Pe??[]))}}})}return Ce},reloadWindow(Ce,_e){return window.location.reload(),Ce},prePopulateDropdownFromObjectKeys:(Ce,_e)=>{var Ae,Se;if(Ce&&((Ae=Object.keys(Ce))!=null&&Ae.length)){const Ee=JSON.parse(_e.getAttribute("props"));let xe=(Se=Object.keys(Ce))==null?void 0:Se.map(Te=>({[Ee.keyName]:Te,[Ee.valueName]:Te}));_e.setAttribute("menudata",JSON.stringify(xe))}return Ce},modifyDropdownData:(Ce,_e)=>{var Ae;if(Ce&&((Ae=Object.keys(Ce==null?void 0:Ce.selectedItems))!=null&&Ae.length)){const Se=JSON.parse(_e.getAttribute("props"));let Ee=[];for(let xe of Object.keys(Ce==null?void 0:Ce.selectedItems))Ee.push({[Se.keyName]:Ce==null?void 0:Ce.selectedItems[xe],[Se.valueName]:xe});_e.setAttribute("menudata",JSON.stringify(Ee))}return Ce},prePopulateDropdownFromArray:(Ce,_e)=>{if(Ce&&(Ce!=null&&Ce.length)){const Ae=JSON.parse(_e.getAttribute("props"));let Se=Ce==null?void 0:Ce.map(Ee=>({[Ae.keyName]:Ee,[Ae.valueName]:Ee}));_e.setAttribute("menudata",JSON.stringify(Se))}return Ce},saveDita:(Ce,_e)=>{var Ie,De;const Ae=_e.getAttribute("props"),Se=JSON.parse(Ae).source,Ee=JSON.parse(Ae).token,xe=JSON.parse(Ae).apiMethod||"POST",Te={data:[{placeholders:[{}],type:"topic",userId:localStorage.getItem("tenantId"),content:`${(De=(Ie=Ce==null?void 0:Ce.wsyContent)==null?void 0:Ie.data)==null?void 0:De.dita}`,name:"untitled",projectId:localStorage.getItem("projectId"),isTemplate:!0}]};fetch(Se,{method:xe,body:JSON.stringify(Te),headers:{"Content-Type":"application/json",Authorization:`Bearer ${Ee}`}}).then(ke=>console.log("INSERTED SUCCESSFULLY - ",ke.json()))},addExistingTopicToMap:async(Ce,_e,Ae)=>{var Me,Pe,Be,Fe,$e;const Se=Ae&&Object.keys(Ae).length?Ae:_e.meta.props;let Ee=(Be=(Pe=(Me=_e.store)==null?void 0:Me._signals)==null?void 0:Pe[Se.mapDataStateName])==null?void 0:Be.get();Se.pathToMapContent&&(Ee=get$6(Ee,Se.pathToMapContent,""));const xe=((Fe=Se==null?void 0:Se.body)==null?void 0:Fe.topicName)||"",Te=(Se==null?void 0:Se.id)||(($e=Se==null?void 0:Se.body)==null?void 0:$e.topicId)||"";if(!Te)return console.error("Topic ID is required to add topic to map."),Ce;Ee.content=Ee.content.replace("</map>",` <topicref href="${xe}_out.dita" navtitle="${xe}"/>
|
|
321
|
+
<`),{...Me,data:{...Me.data,dita:sn}}}else return console.warn(`Could not find exact match for focused node of type '${We}' in DITA content`),Me},Ie=function(Me,Pe){var Be,Fe;if(!((Fe=(Be=Se[0])==null?void 0:Be.contextIds)!=null&&Fe.length)||!Array.isArray(Se[0].contextIds))Ae.push({ids:[Me],prop:Pe});else{let $e=!1;for(let Ue of Se[0].contextIds)if((Ue==null?void 0:Ue.prop)===Pe){Ue.ids.push(Me),$e=!0,Ae=Se[0].contextIds;break}$e||Ae.push({ids:[Me],prop:Pe})}return Ae=Ae==null?void 0:Ae.map($e=>$e.prop===Pe?{...$e,ids:[...new Set([...$e.ids])]}:$e),"Added contextIds "};async function De(Me,Pe){const Be="https://igs.gov-cloud.ai/pi-entity-instances-service/v2.0/schemas/6941203a98f23e7f0271b402/instances",Fe="eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3Ny1NUVdFRTNHZE5adGlsWU5IYmpsa2dVSkpaWUJWVmN1UmFZdHl5ejFjIn0.eyJleHAiOjE3MjYxODIzMzEsImlhdCI6MTcyNjE0NjMzMSwianRpIjoiOGVlZTU1MDctNGVlOC00NjE1LTg3OWUtNTVkMjViMjQ2MGFmIiwiaXNzIjoiaHR0cDovL2tleWNsb2FrLmtleWNsb2FrLnN2Yy5jbHVzdGVyLmxvY2FsOjgwODAvcmVhbG1zL21hc3RlciIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJIT0xBQ1JBQ1kiLCJzZXNzaW9uX3N0YXRlIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwibmFtZSI6ImtzYW14cCBrc2FteHAiLCJnaXZlbl9uYW1lIjoia3NhbXhwIiwiZmFtaWx5X25hbWUiOiJrc2FteHAiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWwiOiJwYXNzd29yZF90ZW5hbnRfa3NhbXhwQG1vYml1c2R0YWFzLmFpIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiLyoiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZmF1bHQtcm9sZXMtbWFzdGVyIiwib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7IkhPTEFDUkFDWSI6eyJyb2xlcyI6WyJIT0xBQ1JBQ1lfVVNFUiJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJwcm9maWxlIGVtYWlsIiwic2lkIjoiYmI1ZjJkMzktYTQ3ZC00MjI0LWFjZGMtZTdmNzQwNDc2OTgwIiwidGVuYW50SWQiOiJmNzFmMzU5My1hNjdhLTQwYmMtYTExYS05YTQ0NjY4YjQxMGQiLCJyZXF1ZXN0ZXJUeXBlIjoiVEVOQU5UIn0=.FXeDyHBhlG9L4_NCeSyHEaNEBVmhFpfSBqlcbhHaPaoydhKcA0BfuyHgxg_32kQk6z5S9IQ7nVKS2ybtOvwo0WyLWwLQchSq7Noa7LooHIMzmeWMQb_bLKtbaOti59zwIdS8CkfGaXut7RUQKISQVWmbUGsVJQa2JkG6Ng_QN0y5hFVksMWPZiXVsofQkJXHXV1CQ3gabhhHKo3BqlJwzpsCKLDfg1-4PmSl1Wqbw03Ef2yolroj5i8FoeHukOQPkwCUHrrNw-ilIp917nqZa89YbCMtDjWyaj8pEH7GJR5vMZPE2WcJPn5dSA1IHVunfatEB1cDAitaFjVNWNnddq",$e={primarykeyEnable:!0,data:{contextIds:Ae,content:Pe,id:Se[0].id}};return await(await fetch(Be,{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${Fe}`},body:JSON.stringify($e)})).json()}let ke=Te(Ce,Ee,Ce.contextId);Ie(xe,Ee);const Oe=await De(Ae,ke.data.dita);return{...Ce,result:Oe}}catch{return Ce}},getMediaType:(Ce,_e)=>{if(!Ce)return"UNKNOWN";const Ae=Ce.toLowerCase();return Ae.startsWith("image/")?"IMAGE":Ae.startsWith("video/")?"VIDEO":Ae.startsWith("audio/")?"AUDIO":Ae==="text/html"?"HTML":Ae==="application/pdf"||Ae.startsWith("application/msword")||Ae.startsWith("application/vnd.ms-excel")||Ae.startsWith("application/vnd.openxmlformats")||Ae==="application/json"||Ae==="text/plain"?"DOCUMENT":"UNKNOWN"},generateChartPreview:(Ce,_e)=>{console.log(Ce,"this is the value");const Ae={id:"right-nav-bar-agent-center",track:["render","click"],type:"mobius-charts-card",role:"",version:"v1",lang:"en-us","alt-text":"",name:"agent-expand-center",props:{header:"false",data:Ce,dropDownListItems:[],keysToAppend:["entityId","graphId"]},styles:"h-[50vh] bg-white p-4 p-3 block gap-y-6 w-full",children:[]},Se=document.querySelector(`.selected-${localStorage.getItem("selectedCardPosition")}`);if(console.log(Se,"this is element"),!Se)return;Se.innerHTML="";let Ee=mountComponents([Ae],_e);Se.appendChild(Ee),console.log("generateChartPreview")},async makeMultipleApiCalls(Ce,_e){var Ae,Se,Ee,xe,Te,Ie,De,ke,Oe,Me,Pe;try{if(!(Ce!=null&&Ce.isValid))return Ce;const Be=JSON.parse(_e.getAttribute("props")),Fe=(Be==null?void 0:Be.sources)||[];let $e=Be==null?void 0:Be.token,Ue={};for(let He=0;He<Fe.length;He++){let Ve=Fe[He].payloadStructure,We=Fe[He].bodyType,ze=Fe[He].url,qe=Fe[He].header,Ke=Fe[He].method,Ge=(Ae=Fe[He])==null?void 0:Ae.bodyStructure,Ye=((Se=Fe[He])==null?void 0:Se.tokenKey)||void 0,Qe=((Ee=Fe[He])==null?void 0:Ee.responseData)||!1,St=((xe=Fe[He])==null?void 0:xe.responseKey)||void 0,Xe=((Te=Fe[He])==null?void 0:Te.showToaster)||void 0,Je=((Ie=Fe[He])==null?void 0:Ie.toast)||void 0;const rn=(Ve==null?void 0:Ve.toaster)||{};if($e=((De=Fe[He])==null?void 0:De.token)||$e||"",(Ve==null?void 0:Ve.payloadType)==="query"){ze=(ke=ze==null?void 0:ze.split("?"))==null?void 0:ke[0];let sn=Object.entries((Ve==null?void 0:Ve.payloadKeys)||{}),pn="",mn={};for(let yn=0;yn<sn.length;yn++){let[xn,En]=sn[yn];En.access==="props"?pn+=xn+"="+get$6(Ce,En.value,"")||En.value||"":En.access==="response"&&(pn+=xn+"="+get$6(mn,En.value,St??"")||En.value||""),yn<sn.length-1&&(pn+="&")}ze+="?"+pn,mn=await makeAPiCall(ze,{},Ke,$e,Ye,Qe,qe),(Oe=mn==null?void 0:mn.model)!=null&&Oe.data&&(mn=mn.model.data)}else if((Ve==null?void 0:Ve.payloadType)==="body"){let sn=Object.entries((Ve==null?void 0:Ve.payloadKeys)||{}),pn;if((Ve==null?void 0:Ve.loopOver)!=null){pn=[];let yn=get$6(Ce,Ve==null?void 0:Ve.loopOver);yn==null||yn.map(xn=>{let En={};sn==null||sn.forEach(([Mn,Hn])=>{if(Hn.access==="props"?En[Mn]=get$6(xn,Hn.value,"")??(Hn!=null&&Hn.defaultEmpty?"":Hn.value??""):Hn.access==="response"&&(En[Mn]=get$6(Ue,Hn.value,"")??(Hn!=null&&Hn.defaultEmpty?"":Hn.value??"")),Hn.parseJson)try{En[Mn]=JSON.parse(En[Mn])}catch{console.error(`${En[Mn]} cant be json parsed`)}}),pn.push(En)})}else pn={},sn==null||sn.forEach(([yn,xn])=>{if(xn.access==="props"?pn[yn]=get$6(Ce,xn.value,"")??(xn!=null&&xn.defaultEmpty?"":xn.value??""):xn.access==="response"&&(pn[yn]=get$6(Ue,xn.value,"")??(xn!=null&&xn.defaultEmpty?"":xn.value??"")),xn.parseJson)try{pn[yn]=JSON.parse(pn[yn])}catch{console.error(`${pn[yn]} cant be json parsed`)}});let mn={};if(Ge!=null){const yn=Ge.match(/\[(.*?)\]/);yn&&(Ge=yn[1],console.log(Ge)),mn=set$a({},Ge,pn),yn&&(mn=[mn])}else Array.isArray(pn)?mn={data:pn}:mn={data:[pn]};try{Ue=await makeAPiCall(ze,mn,Ke,$e,Ye,Qe,We,qe);const yn=((Me=Ue.headers)==null?void 0:Me.get("content-type"))||"";if(Ue instanceof Response){if((Ue!=null&&Ue.ok||(Ue==null?void 0:Ue.status)==200)&&Object.keys(rn).length)try{if(Ue.bodyUsed)rn.toastValue=getSuccessMessage(rn,Ue),ToastService.success(rn);else{const En=Ue.clone().json();rn.toastValue=getSuccessMessage(rn,En),ToastService.success(rn)}}catch{console.log("Error parsing response in makeMultipleApiCalls for toaster")}if(!Ue.ok&&Object.keys(rn).length)try{if(Ue.bodyUsed)rn.toastValue=getSuccessMessage(rn,Ue),ToastService.error(rn);else{const En=Ue.clone().json();rn.toastValue=getErrorMessage(rn,En),ToastService.error(rn)}}catch{console.log("Error parsing response in makeMultipleApiCalls for toaster")}}else Ue.error||Ue.errorMessage?(rn.toastValue=getErrorMessage(rn,Ue),ToastService.error(rn)):(rn.toastValue=getSuccessMessage(rn,Ue),ToastService.success(rn));if(yn.includes("audio")){const xn=await Ue.blob();Ue=URL.createObjectURL(xn)}else{if(yn==="application/octet-stream")return await Ue.text();(Pe=Ue==null?void 0:Ue.model)!=null&&Pe.data&&(Ue=Ue.model.data)}Ce={...Ce,...St?{[St]:Ue}:Ue}}catch(yn){return console.log(yn),Ce}}}return Ce}catch(Be){return console.log(Be),Ce}},postFormData:(Ce,_e)=>new Promise(async(Ae,Se)=>{var xe;if(((Ce==null?void 0:Ce.componentType)=="form"||(Ce==null?void 0:Ce.type)=="form")&&((Ce==null?void 0:Ce.isValid)??!0))try{const Te=JSON.parse(_e.getAttribute("props"));let{source:Ie,token:De="",postData:ke,onSubmit:Oe,keys:Me=[],payLoadType:Pe,contentType:Be,method:Fe="POST",chartContainerId:$e,chartData:Ue,header:He={},API:Ve={}}=Te;const{toaster:We={}}=Ve,ze={};Ie=replaceCurlyBraces(Ie,"",Ce),ke=replaceCurlyBraces(ke,"",Ce),De=replaceCurlyBraces(De,"",Ce),Me==null||Me.forEach(Ke=>{ze[Ke]=Ce[Ke]});var Ee;switch(Ie=replaceCurlyBraces(Ie,"",Ce,(xe=_e==null?void 0:_e.meta)==null?void 0:xe.props,_e),Pe.toLowerCase()){case"json":{let Ke=JSON.stringify(ke[0]),Ge=JSON.stringify(ze);try{let Ye=Ke.replace('"*"',()=>Ge);Ye=JSON.parse(Ye),Ye=replaceCurlyBraces(Ye,"",Ce),Ee=JSON.stringify(Ye),console.log(Ee)}catch(Ye){console.error("Error parsing the data:",Ye),Se(Ye)}break}case"generatedynamicchart":{createDynamicChart(ze,$e,Ce,_e,Ue),Ie=null;break}case"formdata":{Ee=new FormData;const Ke={...ze},Ge={};for(let Ye=0;Ye<ke.length;Ye++){const Qe=ke[Ye];let St=Ke[Qe];St!==void 0?(delete Ke[Qe],typeof St=="object"&&!(St instanceof File)&&!(St instanceof Blob)?Ee.append(Qe,JSON.stringify(St)):Ee.append(Qe,St)):Ge[Qe]=St}Object.keys(Ge).length>0&&Ee.append("extra_data",JSON.stringify(Ge));break}case"generateapicallfrominputfields":{De=replaceCurlyBraces(ze.headerValue),Ie=replaceCurlyBraces(ze.source),Fe=ze.method,Ee=typeof ze.data=="object"?JSON.stringify(ze.data):ze.data;break}}if(!Ie)return;De=replaceCurlyBraces(De,"",Ce);const qe={Accept:"*/*",Authorization:appendBearerToToken(De||""),...He};qe["content-type"]=Be||"application/json",qe["accept-language"]="*",await fetch(Ie,{method:Fe,headers:qe,body:Ee}).then(async Ke=>{if(!Ke.ok){const Ge=await Ke.json();throw We&&Object.keys(We).length&&(We.toastValue=getErrorMessage(We,Ge),ToastService.error(We)),new Error(`HTTP error! status: ${Ke.status}`)}return Ke.ok&&Te.removeNodeAfterSuccess&&Object.keys(Te.removeNodeAfterSuccess).length&&removeNode$1({...Te.removeNodeAfterSuccess,scope:_e}),Ke.json()}).then(Ke=>{We&&Object.keys(We).length&&(We.toastValue=getSuccessMessage(We,Ke),ToastService.success(We)),console.log("Fetch successful:",Ke,_e.signal),Ce.response=Ke}),Ae(Ce)}catch(Te){console.error("Error in postFormData:",Te),Se(Te)}Ae(Ce)}),getTypeFromURL:(Ce,_e)=>{var xe,Te;let Ae=JSON.parse(_e.getAttribute("props")),{stateName:Se,path:Ee}=Ae;if(Ce=((Te=(xe=_e.store._signals[Se])==null?void 0:xe.value)==null?void 0:Te[Ee])??null,!!Ce){if(Ce.includes("adhoc"))return"adhoc";if(Ce.includes("cohort"))return"cohort";if(Ce.includes("schemas")||Ce.includes("schema"))return"schema"}},getDropdownSelectedLabel:(Ce,_e)=>{if(Ce&&Ce instanceof Object)return Object.values(Ce)},rotate90:(Ce,_e)=>{_e.children[0].classList.toggle("rotate-90")},getCardBuilderDropdownOptions:(Ce,_e)=>{const Ae=(Ce==null?void 0:Ce.response)??[],Se=JSON.parse(_e.getAttribute("props"));if(!Array.isArray(Ae)||Ae.length===0)return{};const Ee={},xe=Object.keys(Ae[0]);for(const Ie of xe)Ee[Ie]=Ae.map(De=>De[Ie]);let Te=[];for(let Ie in Ee)Te.push({[Se.keyName]:Ie,[Se.valueName]:JSON.stringify(Ee[Ie])});return console.log({dropdownOptions:Te,...Ce}),_e.setAttribute("menudata",JSON.stringify(Te)),{dropdownOptions:Te,...Ce}},getTopicContent:async(Ce,_e)=>(_e.debounceTimer&&clearTimeout(_e.debounceTimer),new Promise(Ae=>{_e.debounceTimer=setTimeout(async()=>{var Ue,He;(He=(Ue=_e.store)==null?void 0:Ue._signals.topicAccordianLoader)==null||He.set(!0);const Se=_e.getAttribute("props"),{source:Ee,token:xe,apiMethod:Te="POST",topicIdFrom:Ie="",keyName:De="",ownedOnly:ke=!0,id:Oe=""}=JSON.parse(Se);let Me=typeof Ce=="string"&&Ce?Ce:Oe||_e.getAttribute("id");if(!Me)return console.error("Topic ID is not provided or found in the value or scope."),Ce;let Pe=replaceCurlyBraces(xe,"localStorage",Ce,null);Ie==="localstorage"&&(Me=(localStorage.getItem(De)||"").replace(/["']/g,""));const Be={dbType:"TIDB",ownedOnly:ke,filter:{type:"topic",[Ie?"templateId":"id"]:Me||Me}};let Fe={};await fetch(Ee,{method:Te,body:JSON.stringify(Be),headers:{Accept:"*/*","Content-Type":"application/json",Authorization:`Bearer ${Pe}`}}).then(Ve=>Ve.json()).then(async Ve=>{var Ye,Qe,St,Xe,Je,rn,sn,pn;const We=await xmlToDita(((Ye=Ve==null?void 0:Ve[0])==null?void 0:Ye.content)===""?'<topic id="dynamic_info"><title id="c46b5b04-be26-42ca-908d-409a6a06a465">Test Template</title><body><p >primary {state}</p><p >secondary {state}, Confirmed {region}.</p><p >tertiary {state}, Verified {event}..</p></body></topic>':(Qe=Ve==null?void 0:Ve[0])==null?void 0:Qe.content),ze=((St=Ve==null?void 0:Ve[0])==null?void 0:St.id)??"",qe=((Xe=Ve==null?void 0:Ve[0])==null?void 0:Xe.name)??"",Ke=((rn=(Je=Ve==null?void 0:Ve[0])==null?void 0:Je.piMetadata)==null?void 0:rn.transactionId)??"",Ge=((sn=Ve==null?void 0:Ve[0])==null?void 0:sn.updatedAt)??"";localStorage.setItem("projectId",(pn=Ve==null?void 0:Ve[0])==null?void 0:pn.projectId),Fe={id:ze,name:qe,dita:We,transactionId:Ke,updatedAt:Ge},Fe={...(Ve==null?void 0:Ve[0])||{},...Fe},Fe&&"piMetadata"in Fe&&delete Fe.piMetadata,Fe&&"resolvedDita"in Fe&&delete Fe.resolvedDita}).catch(Ve=>{Fe={id:"",name:"",dita:"",transactionId:"",updatedAt:""},console.error("Error fetching topic content:",Ve)}).finally(()=>{var Ve,We;(We=(Ve=_e.store)==null?void 0:Ve._signals.topicAccordianLoader)==null||We.set(!1)});let $e;Ce&&typeof Ce!="string"?$e={...Ce,...Fe}:$e={...Fe},Ae($e)},500)})),getTopicVariables:async(Ce,_e)=>{var Te;const{source:Ae,token:Se,apiMethod:Ee,payload:xe}=(Te=_e.meta.props)==null?void 0:Te.variablesApi;return await fetch(Ae,{method:Ee,headers:{"Content-Type":"application/json",Authorization:`Bearer ${Se}`},body:JSON.stringify(xe)}).then(Ie=>{if(!Ie.ok)throw new Error("Network response was not ok");return Ie.json()}).then(Ie=>(console.log("Fetched variables successful:",Ie),Ie)).catch(Ie=>{console.error("Failded to get Variables :",Ie)})},test:(Ce,_e)=>{console.log({value:Ce,scope:_e})},setDataFromEventToState:(Ce,_e,Ae,Se)=>(console.log(Se),Se.detail),callAPIInAccordion:function(Ce,_e){const Ae=_e.getAttribute("props");_e.innerHTML="";let{source:Se,token:Ee,apiMethod:xe="GET",payload:Te,isResponsePresent:Ie,res:De,showLoader:ke=!1,...Oe}=JSON.parse(Ae),Me=Ie||(Ce==null?void 0:Ce.isResponsePresent),Pe=De||(Ce==null?void 0:Ce.res);return Te=replaceCurlyBraces(Te,"localStorage",Ce,{},_e),Ee=replaceCurlyBraces(Ee),Ee&&!Ee.includes("Bearer")&&(Ee=`Bearer ${Ee}`),Se&&Ee?fetch(Se,{method:xe,body:xe==="POST"?JSON.stringify(Te):void 0,headers:{"Content-Type":"application/json",Authorization:Ee}}).then(Fe=>Fe.json()).then(Fe=>(Fe&&generateDynamicAccordion(Fe,_e,Oe),Fe)):(Me&&Pe&&(generateDynamicAccordion(Pe,_e,Oe),ke&&this.removeLoader({},_e.parentElement)),Me&&Pe&&generateDynamicAccordion(Pe,_e,Oe),Ce)},getDropdownData:(Ce,_e)=>{const Ae=_e.getAttribute("props");let{apiEndpoint:Se,token:Ee,apiMethod:xe="POST",payload:Te,pathToData:Ie="entities",mode:De,formType:ke}=JSON.parse(Ae);if(_e.innerHTML="",Se=replaceCurlyBraces(Se,"localStorage",Ce,_e.meta.props,_e),Te=replaceCurlyBraces(Te,"localStorage",Ce,_e.meta.props,_e),Ee=replaceCurlyBraces(Ee,"localStorage",Ce,_e.meta.props,_e)||Ee||"",Se){let Oe={method:xe,body:JSON.stringify(Te),headers:{"Content-Type":"application/json",Authorization:`Bearer ${Ee}`},referrerPolicy:De||void 0};if(ke){const Me=new FormData;for(const[Pe,Be]of Object.entries(Te))Me.append(Pe,String(Be));Oe={method:xe,body:Me,headers:{Authorization:`Bearer ${Ee}`},referrerPolicy:De||void 0}}fetch(Se,Oe).then(Me=>Me.json()).then(Me=>{if(Me){let Pe=get$6(Me,Ie);try{Pe=parseNestedJSON(Pe)}catch{}finally{_e.setAttribute("menudata",JSON.stringify(Pe??[]))}}})}return Ce},reloadWindow(Ce,_e){return window.location.reload(),Ce},prePopulateDropdownFromObjectKeys:(Ce,_e)=>{var Ae,Se;if(Ce&&((Ae=Object.keys(Ce))!=null&&Ae.length)){const Ee=JSON.parse(_e.getAttribute("props"));let xe=(Se=Object.keys(Ce))==null?void 0:Se.map(Te=>({[Ee.keyName]:Te,[Ee.valueName]:Te}));_e.setAttribute("menudata",JSON.stringify(xe))}return Ce},modifyDropdownData:(Ce,_e)=>{var Ae;if(Ce&&((Ae=Object.keys(Ce==null?void 0:Ce.selectedItems))!=null&&Ae.length)){const Se=JSON.parse(_e.getAttribute("props"));let Ee=[];for(let xe of Object.keys(Ce==null?void 0:Ce.selectedItems))Ee.push({[Se.keyName]:Ce==null?void 0:Ce.selectedItems[xe],[Se.valueName]:xe});_e.setAttribute("menudata",JSON.stringify(Ee))}return Ce},prePopulateDropdownFromArray:(Ce,_e)=>{if(Ce&&(Ce!=null&&Ce.length)){const Ae=JSON.parse(_e.getAttribute("props"));let Se=Ce==null?void 0:Ce.map(Ee=>({[Ae.keyName]:Ee,[Ae.valueName]:Ee}));_e.setAttribute("menudata",JSON.stringify(Se))}return Ce},saveDita:(Ce,_e)=>{var Ie,De;const Ae=_e.getAttribute("props"),Se=JSON.parse(Ae).source,Ee=JSON.parse(Ae).token,xe=JSON.parse(Ae).apiMethod||"POST",Te={data:[{placeholders:[{}],type:"topic",userId:localStorage.getItem("tenantId"),content:`${(De=(Ie=Ce==null?void 0:Ce.wsyContent)==null?void 0:Ie.data)==null?void 0:De.dita}`,name:"untitled",projectId:localStorage.getItem("projectId"),isTemplate:!0}]};fetch(Se,{method:xe,body:JSON.stringify(Te),headers:{"Content-Type":"application/json",Authorization:`Bearer ${Ee}`}}).then(ke=>console.log("INSERTED SUCCESSFULLY - ",ke.json()))},addExistingTopicToMap:async(Ce,_e,Ae)=>{var Me,Pe,Be,Fe,$e;const Se=Ae&&Object.keys(Ae).length?Ae:_e.meta.props;let Ee=(Be=(Pe=(Me=_e.store)==null?void 0:Me._signals)==null?void 0:Pe[Se.mapDataStateName])==null?void 0:Be.get();Se.pathToMapContent&&(Ee=get$6(Ee,Se.pathToMapContent,""));const xe=((Fe=Se==null?void 0:Se.body)==null?void 0:Fe.topicName)||"",Te=(Se==null?void 0:Se.id)||(($e=Se==null?void 0:Se.body)==null?void 0:$e.topicId)||"";if(!Te)return console.error("Topic ID is required to add topic to map."),Ce;Ee.content=Ee.content.replace("</map>",` <topicref href="${xe}_out.dita" navtitle="${xe}"/>
|
|
322
322
|
</map>`);const Ie={primarykeyEnable:!0,data:{id:Ee.id,topicIds:[...(Ee==null?void 0:Ee.topicIds)||[],Te],content:Ee.content}},De=(Se==null?void 0:Se.apiUrl)||"",ke=replaceCurlyBraces(Se==null?void 0:Se.token,"localStorage",Ce,{},_e),Oe=(Se==null?void 0:Se.apiMethod)||"PUT";fetch(De,{method:Oe,body:JSON.stringify(Ie),headers:{"Content-Type":"application/json",Authorization:`Bearer ${ke}`}}).then(Ue=>(console.log("ADDED NEW TOPIC TO MAP SUCCESSFULLY - ",Ue.json()),{isValid:!0})).catch(Ue=>(console.error("FAILED TO ADD NEW TOPIC TO MAP - ",Ue),{isValid:!1}))},exportAsPDF:async(Ce,_e)=>{const Ae=_e.meta.props,Se=Ae==null?void 0:Ae.considerAttr,Ee=Ae==null?void 0:Ae.copy,xe=(Ae==null?void 0:Ae.exportingPDF)??!1,Te=(Ae==null?void 0:Ae.downloadZIP)??!1,Ie=replaceCurlyBraces(Ae.name,"state",Ce,Ae,_e),De=Ae.getFile??!1,ke="https://cdn.gov-cloud.ai/_ENC(4+j2JOgE1QQdq6yO427Uztql2TlqlMwKUOg5QJcVQ5XUgB/GP4/J5WLrrqWMDU3q)/CMS/d43fd439-bd00-48f9-a836-958d23ebd99c_$$_V1_Sample-pdf.pdf";if(await generateXSLT(Ie||Ce[Se]||"1cf113953bd043cbdf3785e430"),!De){const{name:Oe,output_format:Me,filter:Pe={},source:Be,token:Fe,apiMethod:$e="POST"}=replaceCurlyBraces(Ae,"state",Ce),Ue={mapId:Ie,output_format:Me,filter:Pe},He=new FormData;He.append("id",Ue.mapId),He.append("format",Ue.output_format),He.append("filter",JSON.stringify(Ue.filter));let Ve=[];fetch(Be,{method:$e,body:He,headers:{Accept:"*/*",Authorization:`Bearer ${Fe}`}}).then(We=>We.json()).then(async We=>{var ze,qe;if(Me==="pdf"){if(Ve=((ze=We==null?void 0:We.outputs)==null?void 0:ze.pdfUrls)??[],Ee&&Ve&&Ve.length>0)return await navigator.clipboard.writeText(Ve[0]),Ve?ToastService.success({message:{styles:"z-[10000]"},toastValue:"Link Copied",position:"top-right"}):ToastService.error({message:{styles:"z-[10000]"},toastValue:"Failed to copy link",position:"top-right"}),{...Ce,cdnPDFURL:Ve&&typeof Ve=="string"?Ve:Ve&&Ve.length>0?Ve[0]:ke};if(Ve&&xe)return{...Ce,cdnPDFURL:Ve&&typeof Ve=="string"?Ve:Ve&&Ve.length>0?Ve[0]:ke}}else{const Ke=(qe=We==null?void 0:We.outputs)==null?void 0:qe.pdfUrls;Te&&(await downloadFromURL(Ke,`${Ie}.zip`),Ke?ToastService.success({message:{styles:"z-[10000]"},toastValue:"HTML Exported Successfully",position:"top-right"}):ToastService.error({message:{styles:"z-[10000]"},toastValue:"Failed to export HTML",position:"top-right"}))}}).catch(()=>{ToastService.error({message:{styles:"z-[10000]"},toastValue:"Something went wrong, please try again",position:"top-right"})}).finally(()=>{const We=_e.querySelector("#MobiusLoaderOverlay");return We&&We.remove(),_e.style.pointerEvents="auto",{...Ce,cdnPDFURL:Ve&&typeof Ve=="string"?Ve:Ve&&Ve.length>0?Ve[0]:ke}})}},getFileFromUrl:async(Ce,_e)=>{try{const Ae=_e.meta.props,Se=(Ae==null?void 0:Ae.fileData)||{},Ee=replaceCurlyBraces(Se,"state",Ce,Ae,_e),xe=Ee.output_format||"pdf",Te=Ee.fileName,Ie=(Ee==null?void 0:Ee.url)||"",De=`${Te}.${xe}`;if(!Ie){console.error("The content URL is empty or invalid.");return}const ke=await fetch(Ie);if(!ke.ok)throw new Error("Failed to fetch the file.");const Oe=await ke.blob(),Me=new File([Oe],De,{type:Oe.type,lastModified:Date.now()});return{...Ce,file:Me}}catch(Ae){console.error("Error downloading file:",Ae)}},resetState:(Ce,_e)=>utils$1.EmptyObject(Ce),setValueToState:(Ce,_e)=>{const Ae=JSON.parse(_e.getAttribute("props"));Ae!=null&&Ae.value&&_e.signal.set(Ae==null?void 0:Ae.value)},setValueToNewState:(Ce,_e,Ae)=>{const Se=Ae&&Object.keys(Ae).length?Ae:JSON.parse(_e.getAttribute("props"));let Ee=Ce;return Se!=null&&Se.value&&(Ee=Se==null?void 0:Se.value),Ee=replaceCurlyBraces(Ee,"state",Ce,{},_e),Ee},setValueToNewStateType:(Ce,_e,Ae)=>{const Se=Ae&&Object.keys(Ae).length?Ae:JSON.parse(_e.getAttribute("props"));let Ee=Ce;return Ee=(Se==null?void 0:Se.value)??"",Ee=replaceCurlyBraces(Ee,"state",Ce),Ee},setValue:(Ce,_e,Ae)=>(_e.setValue(Ce),Ce),emptyState:(Ce,_e,Ae,Se)=>{const Ee=Ae&&Object.keys(Ae).length?Ae:JSON.parse(_e.getAttribute("props")),{keys:xe=[]}=Ee;return xe.length&&xe.forEach(Te=>{Ce[Te]=void 0}),xe.length?Ce:void 0},setDynamicData:(Ce,_e)=>{const Ae=JSON.parse(_e.getAttribute("props"));return Ae!=null&&Ae.dynamicData?Ae==null?void 0:Ae.dynamicData:Ce},updateXMLWithName:(Ce,_e)=>{if(!Ce.name.trim())return;let Ae=Date.now().toString(),Se=Ce.bodyXml.replace("Test",Ce.name);return Se=Se.replace("_test",`_${Ae}`),{...Ce,bodyXml:Se,id:Ae}},exportHTML:(Ce,_e)=>{if(!Ce){console.log("Valid string input not found!");return}const Ae=get$6(Ce,""),Se=new Blob([Ae],{type:"text/html"}),Ee=URL.createObjectURL(Se),xe=document.createElement("a");return xe.href=Ee,xe.download="exported.html",xe.click(),URL.revokeObjectURL(Ee),Ce},async updateMapWithNewTopic(Ce,_e){try{const Ae=_e.getAttribute("props"),{mapId:Se,source:Ee,token:xe}=JSON.parse(Ae);let Ie=(await makeAPiCall(`${Ee}/list?page=0&size=1`,{dbType:"TIDB",ownedOnly:!0,filter:{type:"map",id:Se}},"POST",xe))[0],De=Ie.bodyXml.replace("</map>",`<topicref navtitle=\`${Ce.name}\` href=\`${Ce.name}.dita\`/></map>`);Ie.topicIds.push(Ce.id);const Oe={primarykeyEnable:!0,data:{...{...Ie,bodyXml:De}}};return await makeAPiCall(Ee,Oe,"PUT",xe)}catch(Ae){console.log(Ae.message)}},addRequirementSave:(Ce,_e)=>{if(typeof Ce=="boolean"){Ce=!Ce;return}let Ae={requirement:(Ce==null?void 0:Ce["projectRequirement.requirement"])||"Performance Metrics",description:(Ce==null?void 0:Ce["projectRequirement.description"])||"Define key performance metrics for the project"};Ce&&Ce.projectRequirement&&(Ce.projectRequirement=[...Ce.projectRequirement,Ae],Ce["projectRequirement.requirement"]="",Ce["projectRequirement.description"]="");const Se=document.getElementById("add-requirements-container"),Ee=document.createElement("mobius-div");Ee.className="block w-full flex flex-col";const xe=document.createElement("mobius-span");xe.className="block color-gray-900 leading-none-text-sm-font-medium",xe.innerText=Ae.requirement,Ee.appendChild(xe);const Te=document.createElement("mobius-span");return Te.className="block color-gray-900 text-xs-font-normal",Te.innerText=Ae.description,Ee.appendChild(Te),Se&&Se.appendChild(Ee),Ce},async getMapData(Ce,_e){var Ie,De,ke,Oe,Me,Pe,Be;const Ae=Ce,Se=((Ie=Ae==null?void 0:Ae[0])==null?void 0:Ie.id)||((De=Ae==null?void 0:Ae.map)==null?void 0:De.id),Ee=((ke=Ae==null?void 0:Ae[0])==null?void 0:ke.content)||((Oe=Ae==null?void 0:Ae.result)==null?void 0:Oe.content),xe=((Me=Ae==null?void 0:Ae[0])==null?void 0:Me.topicIds)||((Pe=Ae==null?void 0:Ae.result)==null?void 0:Pe.topicIds),Te=(Ae==null?void 0:Ae[0].name)||((Be=Ae==null?void 0:Ae.map)==null?void 0:Be.name);if(xe){let Fe;return Fe=await generateJsonFromDita(Ee,xe,Te,Se),{res:{...Fe},mapId:Se,map:Ae==null?void 0:Ae[0]}}else return{res:{topicsData:[{id:Se,name:Te,type:"topic",img:"https://cdn.gov-cloud.ai/_2f7b983c-a492-42ca-9732-f0c7dfea4985/contendo/5bbbe9c1-ed65-4e3b-b69d-cc700a219de8_$$_V1_file-image.svg",childTopics:[]}]},mapId:Se,map:Ae==null?void 0:Ae[0]}},async getDitaXml(Ce,_e){var xe;const Ae=((xe=Ce==null?void 0:Ce.result)==null?void 0:xe.topicsData)??[];if(!Ae.length)return{result:{...Ce.result,content:"",topicIds:[]}};const Se=generateDitaFromJson(Ae),Ee=Ae.map(Te=>Te.id);return{result:{topicsData:Ae,topicIds:Ee,content:Se}}},async moveTopicUp(Ce,_e){var Te,Ie;const Ae=((Te=Ce==null?void 0:Ce.res)==null?void 0:Te.topicsData)??[],Se=(Ie=_e.meta.props)==null?void 0:Ie.topicId;if(!Se)return{result:{topicsData:Ae}};const Ee=Ae.findIndex(De=>De.id===Se);return Ee<=0?{result:{topicsData:Ae}}:{result:{topicsData:moveItem(Ae,Ee,Ee-1)}}},async moveTopicDown(Ce,_e){var Te,Ie;const Ae=((Te=Ce==null?void 0:Ce.res)==null?void 0:Te.topicsData)??[],Se=(Ie=_e.meta.props)==null?void 0:Ie.topicId;if(!Se)return{result:{topicsData:Ae}};const Ee=Ae.findIndex(De=>De.id===Se);return Ee===-1||Ee>=Ae.length-1?{result:{topicsData:Ae}}:{result:{topicsData:moveItem(Ae,Ee,Ee+1)}}},reInit:(Ce,_e)=>JSON.parse(JSON.stringify(Ce)),redirect:(Ce,_e,Ae,Se)=>{if((Ce==null?void 0:Ce.isValid)??!0){const Ee=Ae&&Object.keys(Ae).length?Ae:JSON.parse(_e.getAttribute("props"));if(Ee!=null&&Ee.href){let xe=Ee.href;Ee!=null&&Ee.relativeRedirect&&(xe=location.pathname+xe),xe=xe.replace(/\{\{(\w+)\}\}/g,(Te,Ie)=>Ee[Ie]||`{{${Ie}}}`),xe=replaceCurlyBraces(xe,"",Ce,_e.meta.props,_e),Ee.newTab?window.open(xe,"_blank","noopener,noreferrer"):(history.pushState(null,"",xe),location.reload())}}},redirectRouter:(Ce,_e,Ae)=>{if((Ce==null?void 0:Ce.isValid)??!0){const Se=Ae&&Object.keys(Ae).length?Ae:JSON.parse(_e.getAttribute("props"));let{href:Ee,relativeRedirect:xe,newTab:Te,watchLevel:Ie}=Se;const De=new URLSearchParams(window.location.search);console.log("Current Query Params:",De.toString()),Ee=Ee+(De.toString()?`?${De.toString()}`:""),Ee&&(xe&&(Ee=location.pathname+Ee),Ee=Ee.replace(/\{\{(\w+)\}\}/g,(ke,Oe)=>_e.meta.props[Oe]||`{{${Oe}}}`),Ee=replaceCurlyBraces(Ee,"",Ce,_e.meta.props,_e),Te?window.open(Ee,"_blank","noopener,noreferrer"):(history.pushState(null,"",Ee),BaseComponent.router.triggerMobiusContainer(Ie)))}},checkAuthentication:(Ce,_e)=>{const{accessTokenKeyName:Ae="accessToken",href:Se="/login",avoidPages:Ee=["login","signup","forgot-password"]}=JSON.parse(_e.getAttribute("props"));if(!localStorage.getItem(Ae)){const Ie=new URL(window.location.href).pathname.split("/").filter(ke=>ke),De=Ie[Ie.length-1];if(!Ee.includes(De)){const ke=Se.replace(/\{\{(\w+)\}\}/g,(Oe,Me)=>_e.meta.props[Me]||`{{${Me}}}`);history.pushState(null,"",ke),location.reload()}}},handleCreateProjectsResponse:function(Ce,_e){if((Ce==null?void 0:Ce.isValid)??!0){const Ae=JSON.parse(_e.getAttribute("bindings")),{meta:Se}=Ae;if(Se&&Se.handleCreateProjectsResponse){let Ee=!get$6(Ce,Se.handleCreateProjectsResponse,!1);set$a(Ce,Se.handleCreateProjectsResponse,Ee),Ee&&this.handleTimer(Ce,_e)}}return Ce},handleTimer:function(Ce,_e,Ae){let{timer:Se}=Ae&&Object.keys(Ae).length?Ae:JSON.parse(_e.getAttribute("props"));if(typeof Se=="number"&&!isNaN(Se)){const Ee=setInterval(()=>{Ce={...Ce,timer:Se},Se<=0?(clearInterval(Ee),Ce={...Ce,isOverlayPanelOpen:!1},_e.setState({...Ce,timer:Se}),this.redirectRouter(Ce,_e)):(Se--,_e.setState({...Ce,timer:Se}))},1e3);return Ce}else return console.error("Timer or state not available. Skipping redirect timer setup."),Ce},copy:(Ce,_e)=>Ce,searchState:async(Ce,_e)=>{var Ae,Se,Ee;try{const xe=_e.innerText,{search:Te}=JSON.parse(_e.getAttribute("props")),{from:Ie,to:De}=Te,Oe=Object.keys(Ie)[0],Me=Ie[Oe],Be=Object.keys(De)[0],Fe=De[Be];let $e=((Ae=_e.store)==null?void 0:Ae._signals[Oe].get())||null;$e=get$6($e,Me,"");let Ue=[],He="";if(He=xe.toLowerCase(),He==`
|
|
323
323
|
`)Ue=$e;else for(let Ve of $e){let We="";if(typeof Ve=="string")We=Ve;else if(Array.isArray(Ve))We=JSON.stringify(Ve);else{let ze=Object.values(Ve);We=JSON.stringify(ze)}We=We.toLowerCase(),We.indexOf(He)>-1&&Ue.push(Ve)}Ue=set$a(Ue,Fe,Ue),(Ee=(Se=_e.store)==null?void 0:Se._signals[Be])==null||Ee.set(Ue)}catch(xe){console.log("Error in search",xe)}return Ce},fetchAPITest:async(Ce,_e)=>{let{apiUrl:Ae,method:Se="GET",token:Ee,body:xe={},mode:Te=""}=JSON.parse(_e.getAttribute("props")).API;if(Se!=="GET"&&!Object.keys(xe).length)return[];const Ie={"Content-Type":"application/json",Authorization:`Bearer ${Ee}`},De={method:Se,headers:Ie};Te&&(De.referrerPolicy=Te),Se!=="GET"&&Object.keys(xe).length&&(xe=replaceCurlyBraces(xe,"localStorage",Ce),De.body=JSON.stringify(xe)),Ae=replaceCurlyBraces(Ae,"state",Ce);try{return(await fetch(Ae,De)).json()}catch(ke){return console.error("Error fetching API data",ke),[]}},parseAllValues:(Ce,_e)=>parseNestedJSON(Ce),setToLocalStorage:(Ce,_e)=>{let{body:Ae,isFlatten:Se=!1}=JSON.parse(_e.getAttribute("props"));Ae=replaceCurlyBraces(Ae,"state",Ce,{},_e);let Ee=Ae||Ce||{};return Se?traverseObject(Ee,(xe,Te)=>localStorage.setItem(xe,Te)):Object.keys(Ee).forEach(xe=>{localStorage.setItem(xe,typeof Ae[xe]=="object"?JSON.stringify(Ae[xe]):Ae[xe])}),Ce},setDataToSessionStorage:(Ce,_e,Ae={})=>{var Te;let{body:Se,isFlatten:Ee=!1}=(Te=Object.keys(Ae))!=null&&Te.length?Ae:JSON.parse(_e.getAttribute("props"));Se=replaceCurlyBraces(Se,"state",Ce);let xe=Se||Ce||{};return Ee?traverseObject(xe,(Ie,De)=>sessionStorage.setItem(Ie,De)):Object.keys(xe).forEach(Ie=>{sessionStorage.setItem(Ie,typeof Se[Ie]=="object"?JSON.stringify(Se[Ie]):Se[Ie])}),Ce},getDataFromSessionStorage:(Ce,_e,Ae=null)=>{var xe,Te;const{keys:Se=[],tryParse:Ee=!1}=(xe=Object.keys(Ae))!=null&&xe.length?Ae:(Te=_e==null?void 0:_e.meta)==null?void 0:Te.props;return Se.forEach(Ie=>{let De=sessionStorage.getItem(String(Ie));if(Ee)try{De=JSON.parse(De||"{}")}catch{console.log("unable to parse json")}Ce=set$a(Ce||{},Ie,De||"")}),Ce},removeDataFromSessionStorage:(Ce,_e,Ae)=>{var Ee,xe;let{keyName:Se}=(Ee=Object.keys(Ae))!=null&&Ee.length?Ae:(xe=_e==null?void 0:_e.meta)==null?void 0:xe.props;return Array.isArray(Se)||(Se=[Se]),Se.forEach(Te=>{sessionStorage.getItem(Te)&&sessionStorage.removeItem(Te)}),Ce},ClearDataFromSessionStorage:(Ce,_e)=>(sessionStorage.clear(),Ce),pushToLocalStorageItem:(Ce,_e)=>{let{body:Ae,key:Se}=JSON.parse(_e.getAttribute("props"));Ae=replaceCurlyBraces(Ae,"state",Ce,{},_e);let Ee=Ae||Ce||{},xe=JSON.parse(localStorage.getItem(Se)||"[]");return Array.isArray(xe)?(xe.push(Ee),localStorage.setItem(Se,JSON.stringify(xe)),xe):Ce},clearLocalStorageItems:(Ce,_e)=>{let{keys:Ae=[]}=JSON.parse(_e.getAttribute("props"));return Ae.forEach(Se=>{localStorage.removeItem(Se)}),Ce},setStateToLocalStorage:(Ce,_e)=>{let{key:Ae}=JSON.parse(_e.getAttribute("props"));return localStorage.setItem(Ae,Ce),Ce},getFromLocalStorage:(Ce,_e,Ae=null)=>{var xe;const{keys:Se=[],tryParse:Ee=!1}=(xe=Object.keys(Ae))!=null&&xe.length?Ae:JSON.parse(_e.getAttribute("props"));return Se.forEach(Te=>{let Ie=localStorage.getItem(String(Te));if(Ee)try{Ie=JSON.parse(Ie||"{}")}catch{console.log("unable to parse json")}Ce=set$a(Ce||{},Te,Ie||"")}),Ce},destructure:(Ce,_e)=>{let Ae=get$6(Ce,_e.meta.props.destructurePath||"","");return{...Ce,...Ae}},addLoader:(Ce,_e)=>{const{loaderSize:Ae=25,loaderCss:Se=`loader-spinner border-4 border-gray-300 border-t-4 border-t-blue-500 rounded-full w-[${Ae}px] h-[${Ae}px] animate-spin`}=_e.meta.props;_e.classList.add("relative");const Ee=document.createElement("mobius-div");Ee.id="MobiusLoaderOverlay",Ee.className="absolute top-0 left-0 w-full h-full bg-white/80 flex items-center justify-center z-[9999]";const xe=document.createElement("mobius-div");return xe.className=Se,Ee.appendChild(xe),_e.style.pointerEvents="none",_e.appendChild(Ee),Ce},addGlobalLoader:()=>{if(document.getElementById("GlobalLoaderOverlay"))return;const _e=40,Ae=`loader-spinner border-4 border-gray-300 border-t-4 border-t-blue-500 rounded-full w-[${_e}px] h-[${_e}px] animate-spin`,Se=document.createElement("div");Se.id="GlobalLoaderOverlay",Se.className="fixed top-0 left-0 w-[100vw] h-[100vh] bg-white/80 flex items-center justify-center z-[9999]";const Ee=document.createElement("div");Ee.className=Ae,Se.appendChild(Ee),document.body.style.pointerEvents="none",document.body.appendChild(Se)},removeGlobalLoader:()=>{const Ce=document.getElementById("GlobalLoaderOverlay");Ce&&(Ce.remove(),document.body.style.pointerEvents="")},removeLoader:(Ce,_e)=>{const Ae=_e.querySelector("#MobiusLoaderOverlay");return Ae&&Ae.remove(),_e.style.pointerEvents="auto",Ce},goBack:()=>{window.history.back()},goForward:()=>{window.history.forward()},createJsonStructure:(Ce,_e,Ae)=>{const Se=Ae&&Object.keys(Ae).length?Ae:_e.meta.props;let{createJsonStructure:Ee}=Se,xe=structuredClone(Ce);return Ce&&!Array.isArray(Ce)&&typeof Ce=="object"&&(Ee=traverseObjectAndUpdate(Ee,(Te,Ie)=>({key:replaceCurlyBraces(Te,"state",Ce,_e.meta.props,_e),value:replaceCurlyBraces(Ie,"state",Ce,_e.meta.props,_e)})),xe[Ee.key]=appendBasedOnType(xe[Ee.key],Ee.value)),xe},createJsonStructureWithoutClone:(Ce,_e,Ae)=>{const Se=Ae&&Object.keys(Ae).length?Ae:_e.meta.props;let{createJsonStructure:Ee}=Se,xe=Ce;return Ce&&!Array.isArray(Ce)&&typeof Ce=="object"&&(Ee=traverseObjectAndUpdate(Ee,(Te,Ie)=>({key:replaceCurlyBraces(Te,"state",Ce,_e.meta.props,_e),value:replaceCurlyBraces(Ie,"state",Ce,_e.meta.props,_e)})),xe[Ee.key]=appendBasedOnType(xe[Ee.key],Ee.value)),xe},fetchAPI:async(Ce,_e,Ae)=>{if(((Ce==null?void 0:Ce.componentType)=="form"||(Ce==null?void 0:Ce.type)=="form")&&!(Ce!=null&&Ce.isValid))return Ce;const Se=structuredClone(Ae&&Object.keys(Ae).length?Ae:_e.meta.props),{API:Ee,APIData:xe}=Se;let{apiUrl:Te,method:Ie="GET",token:De="",agentToken:ke="",expectedApiResponseType:Oe="json",body:Me={},mode:Pe="",dataSource:Be="",formType:Fe="body",encodeURI:$e=!1,keysToEncode:Ue=[],path:He="",header:Ve,direcltyAppendToFormData:We=!1}=Ee;if(Ie=="GET"&&Object.keys(Me).length)return console.log("Cant give body on get",_e),Ce;De=replaceCurlyBraces(De,"localStorage",Ce,xe,_e);let ze={Authorization:`Bearer ${De}`,...Ve};ke&&(ke=replaceCurlyBraces(ke,"localStorage",Ce,xe,_e),ze={...ze,token:ke});const qe={method:Ie,headers:ze};if(Pe&&(qe.referrerPolicy=Pe),Ie!=="GET"){if(Me=replaceCurlyBraces(Me,"state",Ce,xe,_e),Fe=="body")qe.body=JSON.stringify(Me),qe.headers["Content-Type"]="application/json";else if(Fe=="formData"){let Ke=new FormData;We?Object.keys(Me).forEach(Ge=>{Array.isArray(Me[Ge])?Me[Ge].forEach(Ye=>{Ke.append(Ge,Ye)}):Ke.append(Ge,Me[Ge])}):Object.keys(Me).forEach(Ge=>{if(typeof Me[Ge]=="object"&&Me[Ge]!==null)if($e){const Qe=Ue.indexOf(Ge)>-1?encodeURIComponent(JSON.stringify(Me[Ge])):Me[Ge];Ke.append(Ge,Qe)}else Ke.append(Ge,JSON.stringify(Me[Ge]));else Ke.append(Ge,Me[Ge])}),qe.body=Ke}}Te=replaceCurlyBraces(Te,Be||"state",Ce,xe,_e);try{const Ke=await fetch(Te,qe),{toaster:Ge={}}=Ee;if(Ke.ok&&Ee.removeNodeAfterSuccess&&Object.keys(Ee.removeNodeAfterSuccess).length&&removeNode$1({...Ee.removeNodeAfterSuccess,scope:_e}),Ke.headers.get("Content-Type")==="application/octet-stream")return await Ke.text();let Qe;return Oe==="text"?Qe=await Ke.text():Qe=await Ke.json(),Ke.ok&&Object.keys(Ge).length&&(Ge.toastValue=getSuccessMessage(Ge,Qe),ToastService.success(Ge)),!Ke.ok&&Object.keys(Ge).length&&(Ge.toastValue=getErrorMessage(Ge,Qe),ToastService.error(Ge)),get$6(Qe,He)}catch(Ke){console.error("Error fetching API data",Ke);const{toaster:Ge={}}=Ee;return Object.keys(Ge).length&&(Ge.toastValue=getErrorMessage(Ge,Ke),ToastService.error(Ge)),[]}},split:async(Ce,_e)=>{const{splitOver:Ae="."}=JSON.parse(_e.getAttribute("props"));return typeof Ce=="string"&&(Ce=Ce.split(Ae)),Ce},parseStringifiedJson(Ce,_e,Ae){var Ee,xe;let{keys:Se}=Ae&&((Ee=Object.keys(Ae))!=null&&Ee.length)?Ae:(xe=_e==null?void 0:_e.meta)==null?void 0:xe.props;if(Se)Array.isArray(Se)||(Se=[Se]),Se.forEach(Te=>{if(Ce[Te])try{Ce[Te]=JSON.parse(Ce[Te])}catch{}});else if(typeof Ce=="string")try{return JSON.parse(Ce)}catch{return Ce}else{if(Array.isArray(Ce))return Ce.map(Te=>this.parseStringifiedJson(Te));if(typeof Ce=="object"&&Ce!==null)return Object.fromEntries(Object.entries(Ce).map(([Te,Ie])=>[Te,this.parseStringifiedJson(Ie)]))}return Ce},loop:(Ce,_e)=>{var Ie,De,ke,Oe,Me,Pe;const{component:Ae,loopOver:Se,Data:Ee,clamp:xe=-1}=JSON.parse(_e.getAttribute("props"));let Te=get$6(Ce,Se)||Ee;if(xe==-1&&(_e.innerHTML=""),Array.isArray(Te)&&(Te.forEach((Be,Fe)=>{var He,Ve,We;let $e=JSON.parse(JSON.stringify(Ae));$e=resolveProps$1($e,Be),$e=resolveBindings($e,Be,_e),(He=$e.propsIndex)!=null&&He[Fe]&&($e.props={...$e.props,...$e.propsIndex[Fe]}),xe<=Fe&&xe!=-1&&($e=hideComponent($e));const Ue=mountComponents([$e],_e);xe>=0&&((We=(Ve=_e.meta)==null?void 0:Ve.children)!=null&&We.length)?_e.insertBefore(Ue,_e.lastChild):_e.appendChild(Ue)}),xe>=0&&((ke=(De=(Ie=_e.parentElement)==null?void 0:Ie.meta)==null?void 0:De.children)==null?void 0:ke.length)>1)){let Be=(Pe=(Me=(Oe=_e==null?void 0:_e.parentElement)==null?void 0:Oe.children)==null?void 0:Me[1])==null?void 0:Pe.firstChild;if(Be instanceof BaseComponent){Be.meta.value="+"+((Te==null?void 0:Te.length)-xe);let Fe=JSON.parse(Be.getAttribute("props")||"{}");Be.setAttribute("props",JSON.stringify({...Fe,value:String((Te==null?void 0:Te.length)-xe),clampedLength:xe,unclampedLength:(Te==null?void 0:Te.length)-xe}))}}return Ce},toggleClamp:(Ce,_e)=>{const{unClampId:Ae="",clamp:Se}=_e.meta.props,Ee=document.getElementById(Ae);let xe=JSON.parse(_e.getAttribute("props")||"{}");const Te=(Ce==null?void 0:Ce.isClamp)??_e.getAttribute("clamp");return Te&&Te=="false"?(_e.setAttribute("clamp","true"),clamp$2(Ee,Se),{toggleState:"show",isClamp:"true",count:xe==null?void 0:xe.unclampedLength}):(_e.setAttribute("clamp","false"),unClamp(Ee),{toggleState:"hide",isClamp:"false",count:xe==null?void 0:xe.unclampedLength})},createUniqueId:async function(Ce,_e){let{uniqueIdKey:Ae}=JSON.parse(_e.getAttribute("props"));if(Ae){if(typeof Ae=="string"){const Se=generateUUID();Ce={...Ce,[Ae]:Se}}else if(Array.isArray(Ae))for(let Se of Ae){const Ee=generateUUID();Ce={...Ce,[Se]:Ee}}}return Ce},createUniqueIdAndReturnIt:(Ce,_e)=>generateUUID(),addImportedArtifactsFiles:(Ce,_e)=>new Promise((Ae,Se)=>{var xe;let Ee=JSON.parse(_e.getAttribute("props"));if(Ee)try{const{api:Te}=Ee;let{apiUrl:Ie,token:De,method:ke="POST",body:Oe}={...Te};Oe={...Oe,content_url:((xe=Ce==null?void 0:Ce.importFileResponse)==null?void 0:xe.id)||""};let Me=new FormData;Object.entries(Oe).forEach(([Pe,Be])=>{Be!=null&&Me.append(Pe,String(Be))}),console.log("Api Data",Me),fetch(Ie,{method:ke,body:Me,headers:{Accept:"*/*",Authorization:`Bearer ${De}`}}).then(Pe=>{if(!Pe.ok)throw new Error(`HTTP error! status: ${Pe.status}`);return Pe.json()}).then(Pe=>{console.log("Fetch successful:",Pe,_e.signal),Ce={...Ce,artifactResponse:Pe}})}catch(Te){console.error("Error in postFormData:",Te),Se(Te)}Ae(Ce)}),toggleDropDown:(Ce,_e)=>{_e.children[0].classList.toggle("!block")},updateCss:(Ce,_e)=>{if(console.log(Ce,_e,"update values"),!Ce||typeof Ce!="object"||!Ce.classes||Ce.classes=="")return console.warn("Invalid value format. Expected { targets: string | string[], classes: string | string[], classes should not be empty }"),Ce;let{targets:Ae,classes:Se,removeClasses:Ee}=Ce;(!Ae||Ae==="")&&(Ae=_e.id);const xe=Array.isArray(Ae)?Ae:[Ae],Te=Array.isArray(Se)?Se:[],Ie=Array.isArray(Ee)?Ee:[];return xe.forEach((De,ke)=>{let Oe=document.getElementById(De);De==="current"?Oe=_e:De==="next"?Oe=_e.nextSibling:De==="previous"&&(Oe=_e.previousSibling),Oe?(Ie[ke]&&Oe.classList.remove(...Ie[ke].split(" ")),Te[ke]&&Oe.classList.add(...Te[ke].split(" "))):console.warn(`Element with ID '${De}' not found.`)}),Ce},removeElement:(Ce,_e)=>{if(console.log(Ce,_e,"removeElement action triggered"),!Ce||typeof Ce!="object"){console.warn("Invalid value format. Expected an object.");return}let{targets:Ae,removeParent:Se,removeChild:Ee,removeSibling:xe,removeScope:Te}=Ce;if(!Ae&&!Te){console.warn("Invalid value: Provide at least one target element or removal condition.");return}if((Array.isArray(Ae)?Ae:Ae?[Ae]:[]).forEach(De=>{let ke=document.getElementById(De);if(!ke){console.warn(`Element with ID '${De}' not found.`);return}if(Se&&ke.parentElement)ke.parentElement.remove();else if(Ee){const Oe=ke.children;for(;Oe.length>0;)Oe[0].remove()}else xe?(ke.nextElementSibling&&ke.nextElementSibling.remove(),ke.previousElementSibling&&ke.previousElementSibling.remove()):ke.remove()}),Te){let De=null;Te==="current"?De=_e:Te==="next"?De=_e.nextElementSibling:Te==="previous"&&(De=_e.previousElementSibling),De?De.remove():console.warn(`Element for scope '${Te}' not found.`)}return Ce},moveElement:(Ce,_e)=>{if(console.log(Ce,_e,"moveElement action triggered"),!Ce||typeof Ce!="object"||!Ce.source||!Ce.destination)return console.warn("Invalid value format. Expected { source: string | string[], destination: string }"),Ce;const{source:Ae,destination:Se}=Ce,Ee=document.getElementById(Se);return Ee?((Array.isArray(Ae)?Ae:[Ae]).forEach(Te=>{const Ie=document.getElementById(Te);if(!Ie){console.warn(`Element with ID '${Te}' not found.`);return}if(Ie.parentElement===Ee){console.log(`Element '${Te}' is already in the correct parent.`);return}Ie.parentNode&&Ie.parentNode.removeChild(Ie),Ee.appendChild(Ie),console.log(`Successfully moved element '${Te}' to '${Se}'.`)}),Ce):(console.warn(`Destination element with ID '${Se}' not found.`),Ce)},updatePayload:(Ce,_e)=>(Ce.agentID&&(Ce.id=Ce.id.replace(/"agentId":"[^"]+"/,`"agentId":"${Ce.agentID}"`)),Ce),deleteData:(Ce,_e)=>{var Ae,Se,Ee,xe;return console.log(Ce,(Ae=_e.table)==null?void 0:Ae.data),(Ee=(Se=_e.table)==null?void 0:Se.data)!=null&&Ee.rows&&_e.table.data.rows.splice(Ce,1),(xe=_e.table)==null?void 0:xe.data},replaceTemplatePlaceholders:(Ce,_e)=>{const Ae=/{{(.*?)}}/g,Se=Ee=>{if(typeof Ee=="string")return Ee.replace(Ae,(xe,Te)=>Ce[Te]!==void 0?Ce[Te]:`{{${Te}}}`);if(Array.isArray(Ee))return Ee.map(xe=>Se(xe));if(typeof Ee=="object"&&Ee!==null){const xe={};for(const[Te,Ie]of Object.entries(Ee))xe[Te]=Se(Ie);return xe}return Ee};return Se(_e.meta[Ce.path?Ce.path:"props"])},copyMetaInstance:(Ce,_e)=>{if(console.log(Ce,_e,"copyMetaInstance action triggered"),!Ce||typeof Ce!="object"||!Ce.source||!Ce.destination){console.warn("Invalid value format. Expected structure...");return}const{source:Ae,destination:Se,copyInstance:Ee,copyInstanceProperties:xe,addProps:Te,moreProps:Ie=[],keysToUpdate:De=[],typesToUpdate:ke=[],typeProps:Oe={},updatePropsWithTypeProps:Me,maxCopies:Pe=3}=Ce,Be=document.getElementById(Se);if(!Be){console.warn(`Destination element with ID '${Se}' not found.`);return}const Fe=Array.isArray(Ae)?Ae:[Ae],$e=We=>{const ze=new RegExp(`^(${We})(?:-(\\d+))?$`),qe=Array.from(document.querySelectorAll(`[id^="${We}"]`)).map(Ge=>Ge.id).filter(Ge=>ze.test(Ge));let Ke=-1;return qe.forEach(Ge=>{const Ye=Ge.match(ze);if(Ye){const Qe=Ye[2]?parseInt(Ye[2],10):0;Qe>Ke&&(Ke=Qe)}}),Ke+1},Ue=(We,ze,qe)=>{if(We&&typeof We=="object"){for(const Ke of qe)if(Object.prototype.hasOwnProperty.call(We,Ke)){const Ge=We[Ke];typeof Ge=="string"?We[Ke]=`${Ge}-${ze}`:Array.isArray(Ge)&&(We[Ke]=Ge.map(Ye=>`${Ye}-${ze}`))}}},He=(We,ze={})=>{const qe=/(_\()(\w+)(\))/,Ke=Ge=>{if(typeof Ge=="string"){const Ye=Ge.match(qe);return Ye&&Ye[2]&&ze.hasOwnProperty(Ye[2])?Ge.replace(qe,`${ze[Ye[2]]}`):Ge}else{if(Array.isArray(Ge))return Ge.map(Ye=>Ke(Ye));if(Ge&&typeof Ge=="object"){const Ye={};return Object.keys(Ge).forEach(Qe=>{let St=Qe;const Xe=Qe.match(qe);Xe&&Xe[2]&&ze.hasOwnProperty(Xe[2])&&(St=Qe.replace(qe,`${ze[Xe[2]]}`)),Ye[St]=Ke(Ge[Qe])}),Ye}}return Ge};if(Array.isArray(We))for(let Ge=0;Ge<We.length;Ge++)We[Ge]=Ke(We[Ge]);else if(We&&typeof We=="object"){const Ge=Object.keys(We);for(const Ye of Ge){let Qe=Ye;const St=Ye.match(qe);St&&St[2]&&ze.hasOwnProperty(St[2])&&(Qe=Ye.replace(qe,`${ze[St[2]]}`),delete We[Ye]),We[Qe]=Ke(We[Qe]||We[Ye])}}},Ve=(We,ze)=>{if(We&&typeof We=="object")for(const qe in We){if(!Object.prototype.hasOwnProperty.call(We,qe))continue;const Ke=We[qe];De.includes(qe)?typeof Ke=="string"?We[qe]=`${Ke}-${ze}`:Array.isArray(Ke)&&(We[qe]=Ke.map(Ge=>`${Ge}-${ze}`)):Ke&&typeof Ke=="object"&&Ve(Ke,ze)}};return Fe.forEach(We=>{const ze=document.getElementById(We);if(!ze){console.warn(`Element with ID '${We}' not found.`);return}if(typeof Pe=="number"&&Pe>=0){const St=new RegExp(`^${We}(?:-(\\d+))?$`);if(Array.from(document.querySelectorAll(`[id^="${We}"]`)).filter(Je=>Je.id.match(St)).length>=Pe){console.warn(`Maximum copy limit of ${Pe} reached for '${We}'.`);return}}const qe=$e(We),Ke=ze.meta;if(!Ke){console.warn(`Element with ID '${We}' does not contain metadata.`);return}const Ge=JSON.parse(JSON.stringify(Ke)),Ye=St=>{Ee&&(St.id=`${St.id}-${qe}`),xe&&St.bindings&&(Array.isArray(ke)&&ke.length>0&&ke.includes(St.type)?He(St.bindings,Oe):(Array.isArray(ke)&&ke.length===0||typeof ke=="string"&&ke==="")&&Ve(St.bindings,qe)),St.props&&(Te&&Array.isArray(Ie)&&Ie.length>0&&Ue(St.props,qe,Ie),Me&&He(St.props,Oe)),St.children&&St.children.length>0&&St.children.forEach(Ye)};Ye(Ge);const Qe=mountComponents([Ge],_e);Be.appendChild(Qe)}),Ce},countChildren:(Ce,_e,Ae,Se)=>{const{targetId:Ee}=Ae,xe=document.getElementById(Ee);if(xe)return xe.children.length},removeHTMLNode:(Ce,_e,Ae,Se)=>{const{method:Ee,selector:xe}=Ae;let Te=null;switch(Ee){case"closest":Te=_e.closest(xe),Te&&Te.remove();break;case"querySelector":Te=_e.closest('mobius-div[data-type="chat-window"]'),Te&&Te.remove();break;default:console.warn(`Unsupported method: ${Ee}`);break}},updateStateViaURLSearchParams:(Ce,_e)=>{const Ae=new URLSearchParams(window.location.search),Se={};return Ae.forEach((Ee,xe)=>{Se[xe]=Ee}),Se},extractPathParams:(Ce,_e)=>{const Ae=new URL(window.location.href),{pathIndex:Se}=JSON.parse(_e.getAttribute("props")||"{}"),Ee=Ae.pathname.split("/").filter(xe=>xe);return Se&&typeof Se=="number"&&Se>=0&&Se<(Ee==null?void 0:Ee.length)?Ee[Se]:Ee},extractQueryParams:(Ce,_e)=>{const Ae=new URL(window.location.href),Se=Object.fromEntries(Ae.searchParams.entries());return Object.keys(Se).length?Se:null},setValueToURL:(Ce,_e)=>{const Ae=new URL(window.location.href);return Ae.pathname+="/"+Ce,window.history.pushState({},"",Ae.toString()),Ce},getSessionPromptHistory:(Ce,_e)=>{const Ae=_e.getAttribute("props"),{source:Se,token:Ee,dynamicData:xe,apiMethod:Te="POST"}=JSON.parse(Ae),Ie={sessionId:xe.sessionId};return fetch(Se,{method:Te,body:JSON.stringify(Ie),headers:{Accept:"*/*","Content-Type":"application/json",Authorization:`Bearer ${Ee}`}}).then(De=>De.json()).then(async De=>({data:(De==null?void 0:De.entities)||{},sessionId:xe.sessionId}))},groupKeys:(Ce,_e)=>{const Ae=JSON.parse(_e.getAttribute("props")),{keys:Se,sourcePath:Ee,targetPath:xe}=Ae;let Te=get$6(Ce,Ee,""),Ie=new Set;return Se&&Array.isArray(Se)&&Se.forEach(De=>{Array.isArray(Te)?Te.forEach(ke=>ke[De].forEach(Oe=>Ie.add(Oe))):console.warn(`Source value should be an Array ${Ee}, from groupKeys action`)}),Ie.keys.length&&set$a(Ce,xe,Ie),Ce},stringifiedArrayToCommaSeperatedString:(Ce,_e)=>JSON.parse(Ce??"[]").join(","),setSrc:(Ce,_e)=>JSON.parse(_e.getAttribute("props")).srcPath||"",parseTheString:(Ce,_e)=>{try{return JSON.parse(Ce)}catch(Ae){return console.error("Error parsing the string:",Ae),Ce}},setCheckBoxesData:(Ce,_e)=>(_e.setCheckBoxesDataFromState(Ce),Ce),recursive:(Ce,_e)=>{console.log("RECURSIVE-----",Ce,_e);const{component:Ae,loopOver:Se}=JSON.parse(_e.getAttribute("props"));let Ee=get$6(Ce,Se);return _e.innerHTML="",Array.isArray(Ee)&&Ee.forEach((xe,Te)=>{var ke;let Ie=JSON.parse(JSON.stringify(Ae));Ie=recursiveResolveComponent(Ie,xe,Ce,Te),Ie=resolveBindings(Ie,xe,_e),(ke=Ie.propsIndex)!=null&&ke[Te]&&(Ie.props={...Ie.props,...Ie.propsIndex[Te]});const De=mountComponents([Ie],_e);_e.appendChild(De)}),Ce},join:(Ce,_e)=>{const Ae=_e.getAttribute("props"),{joinKeys:Se}=JSON.parse(Ae);try{return Se.forEach(Ee=>{let xe="";const Te=Ee.seprator||" ",Ie=Ee.paths||[],De=Ee.key||" ",ke=(Ie==null?void 0:Ie.length)-1||0;for(let Oe=0;Oe<=ke;Oe++)Oe<ke?xe+=get$6(Ce,Ie[Oe],"")+Te:xe+=get$6(Ce,Ie[Oe],"");Ce[De]=xe}),Ce}catch{return Ce}},xmlToJSON:(Ce,_e)=>{const Ae=lib$2.xml2json(Ce==null?void 0:Ce.xml,{compact:!0,spaces:2});return Ce.parsedXML=JSON.parse(Ae||"{}"),Ce},generateHiererachialNodesStructure:(Ce,_e)=>{if(!Ce)return Ce;const{loopOver:Ae,nodeIdProperty:Se,connectionIdProperty:Ee}=JSON.parse(_e.getAttribute("props")).hierearchicalActionData;let xe=get$6(Ce,Ae);const Te=xe.reduce((ke,Oe)=>(ke[Oe[Se]]=Oe,ke),{});function Ie(ke,Oe=new Set){return!ke||ke.length===0?[]:ke.map(Me=>{if(Oe.has(Me))return null;const Pe=Te[Me];if(Pe){Oe.add(Me);const Be={...Pe,[Ee]:Ie(Pe[Ee],Oe)};return delete Te[Me],Be}return null}).filter(Me=>Me!==null)}const De=xe.map(ke=>Te[ke[Se]]?{...ke,[Ee]:Ie(ke[Ee])}:null).filter(ke=>ke!==null);return console.log({result:De}),De},renderHiererachialNodes:(Ce,_e)=>{try{if(_e.innerHTML="",!Ce)return Ce;const{component:Ae,loopOver:Se,wrapperStyles:Ee=""}=JSON.parse(_e.getAttribute("props")).renderHiererchialNodesProps;let xe=get$6(Ce,Se);if(xe==null||xe.length===0)return Ce;xe=[xe];const Te={type:"mobius-div",id:"wrapper-for-drawer-artifactss-cards",role:"",version:"v1",lang:"en-us","alt-text":"",name:"mobius-div",props:{},styles:"flex flex-col items-center gap-8 justify-around "+Ee,children:[]},Ie=createElementFromMetadata(Te,_e);return _e.appendChild(Ie),processNodeRecursively(xe,Ae,_e,Ie,Ee),Ce}catch(Ae){return console.error("Error in renderHiererachialNodes:",Ae),Ce}},addNode(Ce,_e){registerNode(Ce,_e)},parseSetToArray:(Ce,_e)=>Array.from(Ce),nextForm:(Ce,_e)=>{const Ae=JSON.parse(_e.getAttribute("props"));return Ae==null||Ae.requiredFields,Ae==null||Ae.showToaster,fromValidationToError(Ce,_e)?{...Ce,isValid:!0,showToaster:!1}:{...Ce,isValid:!1,showToaster:!0}},nextSteps:(Ce,_e)=>Ce!=null&&Ce.isValid?{...Ce,step:Ce.step?Ce.step+1:1}:Ce,updateNodeConnections:(Ce,_e)=>{var Ae,Se,Ee,xe;try{let Te=JSON.parse(_e.getAttribute("props"))||{};if(((Se=(Ae=Te==null?void 0:Te.dynamicProps)==null?void 0:Ae.dynamicData)==null?void 0:Se.isPlaybookLinked)===!0||!Ce)return Ce;Array.isArray(Object.values(Ce)[0])&&(Ce=Object.values(Ce)[0]);let Ie=Object.values(Ce[0])[0];if(Ie==null)return;removeNodeConnections(null,_e);for(let ke=1;ke<Ce.length;ke++){const Oe=Object.values(Ce[ke])[0]??null;if(Oe==null)continue;const Me=(Oe==null?void 0:Oe.children[0])??null;if(Me==null)continue;let Pe=Ie,Be=Oe;Pe.insertAdjacentElement("afterend",Be);const Fe=Me.getAttribute("id");Ie=Ie.getAttribute("id").startsWith("parent")?Ie.children[0]:Ie;let Ue=JSON.parse(Ie.getAttribute("props"));Ue.connections=[{nodeId:Fe}],Ie.setAttribute("props",JSON.stringify(Ue)),registerNode(null,Ie),Ie=Oe}let De=JSON.parse(_e.getAttribute("bindings"))||{};if(((xe=(Ee=Te==null?void 0:Te.dynamicProps)==null?void 0:Ee.dynamicData)==null?void 0:xe.isPlaybookLinked)===!1){let ke={primarykeyEnable:!0,data:{name:"",compounds:[]}},Oe;for(let Pe in Ce){let Be=Ce[Pe],Fe=Object.keys(Be)[0],$e=Object.values(Be)[0];if($e!=null){if(Fe==="playbook"&&(Oe=$e instanceof HTMLElement?$e.getAttribute("id"):"",Oe)){ke.data.name=Oe;continue}if($e instanceof HTMLElement){const Ue=$e.getAttribute("id");Ue&&ke.data.compounds.push(Ue.replace("parent",""))}}}let Me=Te.linkingArtifactToPlaybookAPIProps;Me&&(Me.API.body=ke,Te={...Te,...Me},Te.dynamicProps.dynamicData.isPlaybookLinked=!0,Te.dynamicProps.dynamicData.playbookName=Oe,De.events={click:{actions:{removeNode:"",fetchAPI:""},connectedNodeRemoved:{toggle:""}}},De.state={connectedNodeRemoved:{path:""}},_e.setAttribute("props",JSON.stringify(Te)),_e.setAttribute("bindings",JSON.stringify({})),De&&typeof De=="object"&&_e.setAttribute("bindings",JSON.stringify(De)))}return Ce}catch(Te){return console.log(Te),Ce}},filterAgentsByPhase:(Ce,_e)=>{const{loopOver:Ae}=JSON.parse(_e.getAttribute("props"));return get$6(Ce,Ae,[]).forEach(Se=>{let Ee=Se.agents_list;typeof Ee=="string"&&(Ee=JSON.parse(Ee)),Array.isArray(Ee)?Se.agents_list=Ee.filter(xe=>xe.phase[0].toLowerCase()===Se.phase_name.toLowerCase()):Se.agents_list=[]}),Ce},map:(Ce,_e,Ae,Se)=>{try{const Ee=Ae&&Object.keys(Ae).length?Ae:JSON.parse(_e.getAttribute("props"));let{_callbackFn:xe,callbackFn:Te,isReplaceEnabled:Ie=!0}=Ee;return xe&&(Te=xe),!Array.isArray(Ce)||typeof Te!="string"?Ce:safeMap(Ce,{callbackFn:Te},_e,Ie)}catch(Ee){return console.error("Error in map function:",Ee),Ce}},filter:(Ce,_e,Ae)=>{try{const Se=Ae&&Object.keys(Ae).length?Ae:JSON.parse(_e.getAttribute("props"));let{_callbackFn:Ee,callbackFn:xe}=Se;return Ee&&(xe=Ee),!Array.isArray(Ce)||typeof xe!="string"?Ce:safeFilter(Ce,{callbackFn:xe},_e)}catch(Se){return console.error("Error in filter function:",Se),Ce}},flattenArray(Ce,_e,Ae){const Se=Ae&&Object.keys(Ae).length?Ae:JSON.parse(_e.getAttribute("props"));let{depth:Ee=1}=Se;if(!Array.isArray(Ce))throw new TypeError("Input must be an array in flattenArray action");return Ce.flat(Ee)},some:(Ce,_e,Ae)=>{const Se=Ae&&Object.keys(Ae).length?Ae:JSON.parse(_e.getAttribute("props"));try{const{callbackFn:Ee}=Se;return!Array.isArray(Ce)||typeof Ee!="string"?Ce:safeSome(Ce,{callbackFn:Ee},_e)}catch(Ee){return console.error("Error in filter function:",Ee),Ce}},reduce:(Ce,_e,Ae)=>{const Se=Ae&&Object.keys(Ae).length?Ae:JSON.parse(_e.getAttribute("props"));if(Se.value=replaceCurlyBraces(Se.value,"state",Ce,Se,_e),Se.value=Se.loopOver?get$6(Se.value,Se.loopOver):Se.value,!Array.isArray(Se.value)||Se.value.length===0)return{};const Ee=Object.keys(Se.value[0]),xe={};return Ee.forEach(Te=>{const Ie=Se.value.map(De=>De[Te]);typeof Ie[0]=="string"?xe[Te]=Ie:Array.isArray(Ie[0])?xe[Te]=Ie.flat():xe[Te]=Ie}),xe},emitSocketEvent(Ce,_e){var Se;const Ae=_e.getAttribute("services");if(Ae)try{const Ee=JSON.parse(Ae);(((Se=Ee==null?void 0:Ee.socketio)==null?void 0:Se.events.emit)||[]).forEach(Te=>{const{serverUrl:Ie="",namespace:De="/",name:ke="",data:Oe}=Te;Ie&&ke&&new WebSocketManager({serverUrl:Ie,namespace:De}).emit({event:ke,data:Oe})})}catch(Ee){console.error("Error parsing props in emitSocketEvent",Ee)}},clearState:(Ce,_e)=>{switch(!0){case Array.isArray(Ce):return[];case(typeof Ce=="object"&&Ce!==null):return{};case typeof Ce=="string":return"";case typeof Ce=="number":return 0;case typeof Ce=="boolean":return!1;case typeof Ce=="bigint":return BigInt(0);case typeof Ce=="symbol":return Symbol();case typeof Ce=="function":return()=>{};case Ce===null:return null;case Ce===void 0:return;default:return null}},arrayPush:(Ce,_e)=>{const{appendTo:Ae,appendFrom:Se,checkValue:Ee}=JSON.parse(_e.getAttribute("props")||"{}"),xe=get$6(Ce,Ae),Te=get$6(Ce,Se);if(Array.isArray(xe)&&Te!=null){const Ie=xe.findIndex(De=>De[Ee]===Te[Ee]);Ie!==-1?xe[Ie]=Te:xe.push(Te)}return set$a(Ce,Ae,xe),Ce},downloadTTLFile:(Ce,_e)=>{const{fileType:Ae,fileName:Se}=JSON.parse(_e.getAttribute("props")),Ee=new Blob([Ce],{type:Ae}),xe=URL.createObjectURL(Ee),Te=document.createElement("a");Te.href=xe,Te.download=Se,document.body.appendChild(Te),Te.click(),document.body.removeChild(Te),URL.revokeObjectURL(xe)},updateTableCell:async(Ce,_e)=>{const{API:Ae,APIData:Se}=JSON.parse(_e.getAttribute("props"));try{const Ee=await fetchAPI(Ae,Se,structuredClone(Ce),_e);if(Ee.errorMessage){console.error(Ee);return}const xe=_e.closest("mobius-td");if(!xe)return;const Te=JSON.parse(xe.getAttribute("props")),{component:Ie}=Te;if(!Ie)return;const De=resolveProps$1(Ie,Ce);if(De){const ke=mountComponents([De],xe);xe.replaceChild(ke,xe.firstChild),xe.isEditOpen=!1;const Oe=xe.querySelector("[data-role='pop-container']");let Me=Oe.querySelector("[data-role='table-popup-edit-icon']");const Pe=Oe.querySelector("[data-role='pop-over']");Me.style.display="none",Pe.style.display="none"}return Ee}catch(Ee){console.error("Error updating table cell",Ee)}},createDraggable:(Ce,_e,Ae,Se)=>{const Ee=Ae&&Object.keys(Ae).length?Ae:JSON.parse(_e.getAttribute("props"));let{stateName:xe,itemClassName:Te,dragOriginClassNames:Ie=["opacity-50","scale-95","cursor-grabbing","shadow-lg","transition","duration-150"],duplicateElementClassNames:De=["absolute","pointer-events-none","opacity-70","bg-white","border","border-dashed","border-black","z-[1000]","cursor-grab"],highlightClassNames:ke=["bg-[#d0f0ff]","border","border-dashed","border-red-500"],drawerProp:Oe,sourceIdProp:Me,destinationIdProp:Pe,sourceTypeProp:Be,destinationTypeProp:Fe}=Ee.createDraggableProps;_e.classList.add(...Ie),Se.preventDefault();let $e=_e.id,Ue=null,He=_e.cloneNode(!0);He.classList.add(...De),document.body.appendChild(He);const Ve=qe=>{He.style.left=`${qe.pageX+5}px`,He.style.top=`${qe.pageY+5}px`;const Ke=document.elementFromPoint(qe.clientX,qe.clientY),Ge=Ke==null?void 0:Ke.closest(`.${Te}`);Ge&&Ge.id!==$e?(Ue&&Ue!==Ge&&Ue.classList.remove(...ke),Ue=Ge,Ue.classList.add(...ke)):Ue&&(Ue.classList.remove(...ke),Ue=null)};Ve(Se);const We=()=>{document.removeEventListener("mousemove",Ve),document.removeEventListener("mouseup",ze),He&&He.remove(),Ue&&Ue.classList.remove(...ke),_e.classList.remove(...Ie),He=null,Ue=null},ze=qe=>{var Ye,Qe,St,Xe;const Ke=document.elementFromPoint(qe.clientX,qe.clientY),Ge=Ke==null?void 0:Ke.closest(`.${Te}`);Ge&&Ge.id!==$e?(console.log("Dragged ID:",$e),console.log("Dropped On ID:",Ge.id),Ce[Oe]=!0,Ce[Me]=$e,Ce[Pe]=Ge.id,Ce[Be]=Ee.artifactType||"",Ce[Fe]=JSON.parse(Ge.getAttribute("props")||"{}").artifactType||"",(Qe=(Ye=_e.store)==null?void 0:Ye._signals[xe])==null||Qe.set(Ce)):(console.log("Dropped outside valid item."),Ce[Oe]=!1,Ce[Me]="",Ce[Pe]="",Ce[Be]="",Ce[Fe]="",(Xe=(St=_e.store)==null?void 0:St._signals[xe])==null||Xe.set(Ce)),We()};return document.addEventListener("mousemove",Ve),document.addEventListener("mouseup",ze),Ce},establishConnectionBetweenTheNodes:(Ce,_e,Ae)=>{var Se,Ee;try{let xe=Object.keys(Ae||{}).length?Ae:_e.meta.props,{stateName:Te,isAsync:Ie=!1,leaderLineCustomizationProps:De={}}=replaceCurlyBraces(xe.establishConnectionBetweenTheNodesProps,"props",Ce,xe,_e),ke=Ce.map(Oe=>{if(Oe.visited)return Oe;const{sourceIdsArray:Me,destinationId:Pe,parentElementId:Be}=Oe;Oe.visited=!0;let Fe=Be?document.querySelector(`#${CSS.escape(Be)}`):null,$e=null;Fe?$e=Fe.querySelector(`#${CSS.escape(Pe)}`):$e=document.querySelector(`#${CSS.escape(Pe)}`);let Ue=Ie?makeConnectionsUsingLeaderLineAsync(Me||[],$e,Fe,De):makeConnectionsUsingLeaderLine(Me||[],$e,De);return Oe.linesArray=Ue,Oe});return(Ee=(Se=_e.store)==null?void 0:Se._signals[Te])==null||Ee.set(ke),ke}catch(xe){console.log("Error in establish connection between the nodes",xe)}},makeConnectionInvisibleOnScroll:(Ce,_e)=>{let Ae=_e.meta.props;if(!Ce||!Array.isArray(Ce))return Ce;function Se(Ee,xe){if(!Ee||!xe)return!1;const Te=xe.getBoundingClientRect(),Ie=Ee.getBoundingClientRect(),De=(Ae==null?void 0:Ae.lineVisibleOffsetOnScroll)??170;return Ie.top+Ie.height-De>=Te.top&&Ie.bottom-Ie.height+De<=Te.bottom}return Ce.forEach((Ee,xe)=>{Ee.linesArray.length!==0&&Ee.linesArray.forEach(Te=>{const Ie=Se(Te.start,_e),De=Se(Te.end,_e);Ie&&De?(Te.hide(),Te.show(),Te.position()):Te.hide()})}),Ce},removeLeaderLineConnections:(Ce,_e)=>(!Ce||!Array.isArray(Ce)||Ce.forEach((Ae,Se)=>{Ae.linesArray.length!==0&&Ae.linesArray.forEach(Ee=>{Ee.visited=!1,Ee.remove()})}),Ce),decreaseZIndexOfLeaderLineLines:(Ce,_e)=>(!Ce||!Array.isArray(Ce)||document.querySelectorAll(".leader-line").forEach(Se=>{Se.style.zIndex="49"}),Ce),highlightLeaderLine:(Ce,_e,Ae)=>{try{if(!Ce||!Array.isArray(Ce)||(Ce==null?void 0:Ce.length)===0)return Ce;let Se=Object.keys(Ae||{}).length?Ae:_e.meta.props,{leaderLineCustomizationProps:Ee={}}=replaceCurlyBraces(Se.highlightLeaderLineProps,"props",Ce,Se,_e);for(let xe of Ce)for(let Te of xe.linesArray)Te.setOptions({size:3,...Ee});return Ce}catch(Se){console.log("Error in highlightLeaderLine action",Se)}},unhighlightLeaderLine:(Ce,_e,Ae)=>{try{if(!Ce||!Array.isArray(Ce)||(Ce==null?void 0:Ce.length)===0)return Ce;let Se=Object.keys(Ae||{}).length?Ae:_e.meta.props,{leaderLineCustomizationProps:Ee={}}=replaceCurlyBraces(Se.unhighlightLeaderLineProps,"props",Ce,Se,_e);for(let xe of Ce)for(let Te of xe.linesArray)Te.setOptions({size:1,...Ee});return Ce}catch(Se){console.log("Error in unhighlightLeaderLine action",Se)}},addTimeStamp:(Ce,_e,Ae)=>{const Se=Ae&&Object.keys(Ae).length?Ae:JSON.parse(_e.getAttribute("props")),{addTimeStamp:Ee,dateFormat:xe}=Se,Te={day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1};return Array.isArray(Ee)&&Ee.forEach(Ie=>{const De=xe||Te,ke=new Date;Ce[Ie]=ke.toLocaleString("en-GB",De).replace(",","")}),Ce},addFileUpload:(Ce,_e,Ae,Se)=>{const Ee=Ae&&Object.keys(Ae).length?Ae:_e.meta.props,xe=document.createElement("input");return xe.type="file",xe.multiple=(Ee==null?void 0:Ee.isMultiple)??!1,Ee.allowedTypes&&(xe.accept=Ee.allowedTypes),xe.addEventListener("change",Te=>{const Ie=Te.target,De=Ie!=null&&Ie.files?Array.from(Ie.files):[];_e.updateState(De),_e.dispatchEvent(new CustomEvent(CustomEventsTypes.ON_FILE_UPLOAD,{detail:De,bubbles:!0})),xe.remove()}),xe.click(),Ce},handleFileDataParsing:async(Ce,_e,Ae)=>{const Se=Ce||(Ae==null?void 0:Ae.files)||[];if(!Se.length)return[];const Ee=Se[0],xe=Ee.name.toLowerCase();try{const Te=await readFileAsText(Ee);if(xe.endsWith(".json")){const Ie=JSON.parse(Te);return Array.isArray(Ie)?Ie:[Ie]}else{if(xe.endsWith(".csv"))return await parseCSVContent(Te);if(xe.endsWith(".xlsx")||xe.endsWith(".xls"))return await parseXlSheetContent(Ee)}return"Unsupported file type. Only .csv, .json and .xlsx are allowed."}catch(Te){return console.error("File parsing failed:",Te),Te}},downloadJSON:(Ce,_e)=>{const{data:Ae,fileName:Se}=JSON.parse(_e.getAttribute("props")),Ee=new Blob([JSON.stringify(Ae,null,2)],{type:"application/json"}),xe=document.createElement("a");xe.href=URL.createObjectURL(Ee),xe.download=Se,xe.click()},addTooltip:(Ce,_e)=>{if(!_e.querySelector(".custom-tooltip")){const{toolTipProps:{tooltipHeader:Ae,tooltipContent:Se,tooltipPosition:Ee,tooltipStyles:xe,headerStyles:Te,contentStyles:Ie,traingleStyles:De}}=_e.meta.props,ke={bottom:" rotate-180 transform left-[35%] top-[-10%] ",top:" left-[35%] bottom-[-10%] ",left:" -rotate-90 transform right-[-10%] top-[35%] ",right:" rotate-90 transform left-[-10%] top-[35%] ",default:" left-[35%] bottom-[-10%] "},Oe={bottom:" translate-y-full ",top:" -translate-y-full ",left:" -translate-x-full ",right:" translate-x-full ",default:" translate-x-full "};_e.style.position="relative";const Me=document.createElement("div"),Pe=document.createElement("div");return Me.className="custom-tooltip absolute p-[12px] bg-black text-white rounded-md z-[1000] min-w-[50px] w-[200px] max-w-[300px] "+(Oe[Ee]||Oe.default)+xe,Pe.className="absolute w-0 h-0 border-l-[23px] border-l-transparent border-r-[23px] z-[-1] border-r-transparent border-t-[23px] border-t-black "+(ke[Ee]||ke.default)+De,Me.innerHTML=`<mobius-p class="block text-sm-font-medium color-white ${Te||""} ">${Ae||"Tooltip Header"}</mobius-p>
|
|
324
324
|
<mobius-p class="block text-xs-font-normal color-gray-400 mt-2 ${Ie||""}">${Se||"Tooltip Content"}</mobius-p>`,Me.appendChild(Pe),_e.appendChild(Me),_e.addEventListener("mouseleave",()=>{Me.remove()}),Ce}},async multipleFetchAPI(Ce,_e){var Ee;if(((Ce==null?void 0:Ce.componentType)=="form"||(Ce==null?void 0:Ce.type)=="form")&&!(Ce!=null&&Ce.isValid))return Ce;let{APIs:Ae,APIData:Se}=JSON.parse(_e.getAttribute("props"));if(typeof Ae=="string"&&(Ae=replaceCurlyBraces(Ae,"state",Ce,Se,_e)),!Array.isArray(Ae))return Ce;for(let xe=0;xe<Ae.length;xe++){let{apiUrl:Te,method:Ie="GET",token:De="",agentToken:ke="",body:Oe={},mode:Me="",formType:Pe="body",encodeURI:Be=!1,keysToEncode:Fe=[],path:$e="",showToaster:Ue=!1,header:He={},targetState:Ve="",condition:We="",logicalOperator:ze="OR",removeNodeAfterSuccess:qe}=Ae[xe],Ke=!1;if(We&&Array.isArray(We)?ze==="AND"?Ke=We.every(Qe=>evaluateCondition(Qe,Ce,_e)):Ke=We.some(Qe=>evaluateCondition(Qe,Ce,_e)):Ke=evaluateCondition(We,Ce,_e),Ke)continue;if(Ie=="GET"&&Object.keys(Oe).length)return console.log("Cant give body on get",_e),Ce;De=replaceCurlyBraces(De,"localStorage",Ce,Se,_e);let Ge={Authorization:`Bearer ${De}`,...He};ke&&(ke=replaceCurlyBraces(ke,"localStorage",Ce,Se,_e),Ge={...Ge,token:ke});const Ye={method:Ie,headers:Ge};if(Me&&(Ye.referrerPolicy=Me),Ie!=="GET"){if(Oe=replaceCurlyBraces(Oe,"state",Ce,Se,_e),Pe=="body")Ye.body=JSON.stringify(Oe),Ye.headers["Content-Type"]="application/json";else if(Pe=="formData"){let Qe=new FormData;Object.keys(Oe).forEach(St=>{if(typeof Oe[St]=="object"&&Oe[St]!==null&&!(Oe[St]instanceof File)&&!(Oe[St]instanceof Blob))if(Be){const Je=Fe.indexOf(St)>-1?encodeURIComponent(JSON.stringify(Oe[St])):Oe[St];Qe.append(St,Je)}else Qe.append(St,JSON.stringify(Oe[St]));else Qe.append(St,Oe[St])}),Ye.body=Qe}}Te=replaceCurlyBraces(Te,"state",Ce,Se,_e);try{const Qe=await fetch(Te,Ye);if(Qe.headers.get("Content-Type")==="application/octet-stream")return await Qe.text();const Xe=await Qe.json(),{toaster:Je={}}=Ae[xe];if(Qe.ok&&Object.keys(Je).length&&(Je.toastValue=getSuccessMessage(Je,Xe),ToastService.success(Je)),Qe.ok&&qe&&Object.keys(qe).length&&removeNode$1({...qe,scope:_e}),!Qe.ok&&Object.keys(Je).length&&(Je.toastValue=getErrorMessage(Je,Xe),ToastService.error(Je)),Ve){const{stateName:rn,key:sn}=handleStateReference(Ve);rn&&((Ee=_e.store)==null||Ee._signals[rn].set(get$6(Xe,sn)))}typeof Ce=="object"?Ce[xe]=get$6(Xe,$e):Ce={[xe]:get$6(Xe,$e)}}catch(Qe){console.error("Error fetching API data",Qe);const{toaster:St={}}=Ae[xe];Object.keys(St).length&&(St.toastValue=getErrorMessage(St,Qe),ToastService.success(St)),Ce[xe]=get$6(Qe,$e)}}return Ce},structureData:(Ce,_e)=>{let{template:Ae={},Data:Se=[]}=_e.meta.props;Array.isArray(Se)||(Se=replaceCurlyBraces(Se,"state",Ce,{},_e));const Ee=Ae.bodyForStructure;return delete Ae.bodyForStructure,Ae=traverseObjectAndUpdate(Ae,(Te,Ie)=>({key:Te,value:replaceCurlyBraces(Ie,"state",Ce,{},_e)})),Se.map(Te=>Ae={...Ae,...traverseObjectAndUpdate(structuredClone(Ee),(Ie,De)=>({key:Ie,value:get$6(Te,De,"")}))})},downloadFromURL:async(Ce,_e)=>{const{fileType:Ae}=JSON.parse(_e.getAttribute("props")),Se=Ce.url||Ce;try{const Ee=await fetch(Se);Ee.ok||console.error(`Failed to fetch file from ${Se}. Status: ${Ee.status}`);const xe=Ee.headers.get("Content-Length"),Te=xe?parseInt(xe,10):0,Ie=await Ee.blob(),De=window.URL.createObjectURL(Ie),ke=Ce.id?`${Ce.id}.${Ae||"txt"}`:`downloaded_file.${Ae||"txt"}`,Oe=document.createElement("a");Oe.href=De,Oe.download=ke,Oe.style.display="none",document.body.appendChild(Oe),Oe.click(),document.body.removeChild(Oe),window.URL.revokeObjectURL(De)}catch(Ee){console.error(`Error downloading file from ${Se}:`,Ee)}},capitalize:(Ce,_e)=>(Array.isArray(Ce)?Ce=Ce.map(Ae=>Ae.charAt(0).toUpperCase()+Ae.slice(1)):Ce=Ce.charAt(0).toUpperCase()+Ce.slice(1),Ce),getLength:(Ce,_e)=>Ce.length,stopImmediatePropagation:(Ce,_e,Ae,Se)=>(Se.stopImmediatePropagation(),Ce),conditionalCss:(Ce,_e,Ae)=>{const Se=Ae&&Object.keys(Ae).length?Ae:_e.meta.props;let{condition:Ee,__condition:xe,cssClasses:Te={},logicalOperator:Ie="OR"}=Se;const{trueClass:De="",falseClass:ke=""}=Te;xe&&(Ee=replaceCurlyBraces(xe,"state",Ce,_e.meta.props,_e));let Oe=!1;return Array.isArray(Ee)?Ie==="AND"?Oe=Ee.every(Me=>evaluateCondition(Me,Ce,_e)):Oe=Ee.some(Me=>evaluateCondition(Me,Ce,_e)):Oe=evaluateCondition(Ee,Ce,_e),Oe?(_e.classList.add(...De.trim().split(" ")),_e.classList.remove(...ke.trim().split(" "))):(_e.classList.add(...ke.trim().split(" ")),_e.classList.remove(...De.trim().split(" "))),Ce},dispatchCustomEvent:(Ce,_e,Ae)=>{const Se=Ae&&Object.keys(Ae).length?Ae:JSON.parse(_e.getAttribute("props"));let{eventName:Ee}=Se;return Ee=replaceCurlyBraces(Ee,"state",Ce,_e.meta.props,_e),Ee&&document.dispatchEvent(new CustomEvent(Ee,{detail:Ce})),Ce},filterTable:(Ce,_e)=>{const{API:Ae,APIData:Se}=_e.meta.props;return _e.callAPI(Ae,Se),Ce},runrunK8FormValidator:(Ce,_e)=>{try{const{single_multi:Ae,savedForms:Se=[]}=Ce;let Ee=0,xe=0,Te=0;if(Se==null||Se.map(Ie=>{Ie.node_type==="Worker"?Ee++:Ie.node_type==="Master"?xe++:Ie.node_type==="Main Master"&&Te++}),Ae==="Single")return Ee!=1&&xe!=1&&Te===0?{...Ce,isValid:!1,showToaster:!0}:{...Ce,isValid:!0,showToaster:!1};if(Ae==="Multi")return Ee>=4&&xe>=2&&Te===1?{...Ce,isValid:!0,showToaster:!0}:{...Ce,isValid:!1,showToaster:!0}}catch(Ae){return console.error(Ae),Ce}},generateCanvasPdf:(Ce,_e)=>{var Se;const Ae=(Se=_e.meta.props)==null?void 0:Se.exportPdf;console.log(Ce,"this is log",_e.meta.props,Ae),setTimeout(async()=>{const Ee=document.getElementById(Ae);if(!Ee){console.log("Please pass the DOM id ");return}const xe=await html2canvas(Ee),Te=xe.toDataURL("image/png"),Ie=new E("p","mm","a4"),De=Ie.internal.pageSize.getWidth(),ke=Ie.internal.pageSize.getHeight(),Oe=De,Me=xe.height*Oe/xe.width;let Pe=Me,Be=0;for(Ie.addImage(Te,"PNG",0,Be,Oe,Me),Pe-=ke;Pe>0;)Be=Pe-Me,Ie.addPage(),Ie.addImage(Te,"PNG",0,Be,Oe,Me),Pe-=ke;const Fe=Ie.output("blob"),$e=new File([Fe],"dashboard.pdf",{type:"application/pdf"}),Ue=await uploadAssetToCmsMobius$1($e);console.log(Ue," This is the url ")},2e3)},SpeechPromptTrigger(Ce,_e,Ae){console.log("here",this,Ae,"prompt");try{_e.EnterFunction()}catch(Se){console.error(Se,"Error in SpeechPromptTrigger action");let Ee=document.getElementById(`${_e.meta.props.speechPromptID}`);Ee&&(Ee==null||Ee.EnterFunction())}return Ce},generateDynamicHeatmapConfig(Ce,_e,Ae){const Se=Ae&&Object.keys(Ae).length?Ae:_e.meta.props;Ae=replaceCurlyBraces(Ae,"state",Ce,Se,_e);const Ee=["Atom","Molecule","Compound","Playbook","SubAgent","Agent"],xe=["Cold","Warm","Warmer","Warmest","Hot"],Te=Se.colorCode,Ie=((Ae==null?void 0:Ae.value)??[]).flatMap(Me=>xe.map(Pe=>[De(Me.artifact_type),De(Pe),Me[Pe.toLocaleLowerCase()]??0]));function De(Me){return Me.replace(/_/g," ").replace(/\b\w/g,Pe=>Pe.toUpperCase())}const ke=Ie.filter(Me=>Me[2]!==0),Oe={tooltip:{position:"top"},grid:{top:10,bottom:44,left:80,right:12,containLabel:!0},xAxis:{type:"category",data:Ee,splitArea:{show:!0},axisTick:{show:!1}},yAxis:{type:"category",data:xe,splitArea:{show:!0},axisLine:{show:!1},axisTick:{show:!1}},visualMap:{show:!1},series:[{name:"Row Colors",type:"heatmap",coordinateSystem:"cartesian2d",data:ke.map(Me=>({value:Me,itemStyle:{color:Te[Me[1]]||"#e5e7eb"}})),label:{show:!0,formatter:Me=>Me.value[2],color:"#000"},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0,0,0,0.3)"}}}]};return _e.updateChart(Oe),Oe},generateDynamicChartData(Ce,_e){let Ae=JSON.parse(_e.getAttribute("props"))||{},{_:Se,chartDataPath:Ee,colorCode:xe}=Ae;const Te=Object.keys(xe||{}),De=Te.map(Be=>Ce[Ee][Be]).map((Be,Fe)=>Be&&Be!==0?Fe:-1).filter(Be=>Be!==-1),ke=De[0],Oe=De[De.length-1],Me=Te.map((Be,Fe)=>{const $e=Ce[Ee][Be],Ue=ke===Oe&&Fe===ke,He=Fe===ke,Ve=Fe===Oe;let We=[0,0,0,0];return Ue?We=[5,5,5,5]:He?We=[5,0,0,5]:Ve&&(We=[0,5,5,0]),{name:Be,type:"bar",stack:"total",itemStyle:{color:xe[Be],barBorderRadius:We},label:{show:!0,position:"insideLeft",color:"#ffffff",fontWeight:"bold"},emphasis:{},data:[$e]}}),Pe={title:{text:"",left:"center"},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{show:!1},grid:{left:"0%",right:"0%",top:"0%",bottom:"0%",containLabel:!0},xAxis:{show:!1},yAxis:{type:"category",data:[""],axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1}},series:Me};return _e.updateChart(Pe),Pe},setCurentTimeToState:(Ce,_e)=>{const{dateFormat:Ae="yyyy-MM-dd HH:mm"}=JSON.parse(_e.getAttribute("props")||"{}");return format$3(new Date,Ae)},makeContentEditable(Ce,_e){return _e&&(_e==null||_e.setAttribute("contenteditable","true"),_e==null||_e.querySelectorAll("*").forEach(Se=>{Se.setAttribute("contenteditable","true")}),new MutationObserver(Se=>{Se.forEach(Ee=>{Ee.addedNodes.forEach(xe=>{xe instanceof HTMLElement&&xe.setAttribute("contenteditable","true")})})}).observe(_e,{childList:!0,subtree:!0})),Ce},makeContentUnEditable:(Ce,_e)=>(_e==null||_e.setAttribute("contenteditable","false"),Ce),updateDataOnInput:(Ce,_e)=>(_e.updateValue(),Ce),populateDataOnInput:(Ce,_e)=>(_e.populateValueFromState(Ce),Ce),appendFieldToForm(Ce,_e){return OpenFieldWindow(_e),Ce},repeatForm(Ce,_e){const Ae=_e.parentElement;if(!Ae||!Ae.meta||!Array.isArray(Ae.meta.children)){console.warn("No valid parent meta with children found.");return}const Se=Ae.meta.children;let Ee=parseInt(Ae.getAttribute("NumOfFormRepeated")||"1");return Se.forEach(xe=>{let Te=Ae.querySelectorAll("mobius-custom-input"),Ie=Te[Te.length-1];if(xe.type!=="mobius-button"){const De=JSON.parse(JSON.stringify(xe));if(De.id=`${xe.id||"repeated-comp"}-${Date.now()}`,De.bindings&&De.bindings.state){const Oe=De.bindings.state;for(const Me in Oe)if(Oe[Me].path){const Pe=Oe[Me].path.replace(/\[\d+\]$/,"");Oe[Me].path=`${Pe}[${Ee}]`}}const ke=mountComponents([De],_e);Array.isArray(ke)?ke.forEach(Oe=>{Ie&&Ie.parentNode?Ie.parentNode.insertBefore(Oe,Ie.nextSibling):Ae.appendChild(Oe)}):Ie&&Ie.parentNode?Ie.parentNode.insertBefore(ke,Ie.nextSibling):Ae.appendChild(ke)}}),Ae.setAttribute("NumOfFormRepeated",`${Ee+1}`),Ce},paginate:async(Ce,_e)=>{var ke,Oe,Me,Pe,Be;const Ae=_e.meta.props;Ae||console.error("No props provided for mobius-pagination");const{API:Se,APIData:Ee}=Ae;Se.params={..._e.params,size:_e.rowsPerPage,page:_e.currentPage,showPageableMetaData:!0};const xe=_e.getState()||((ke=_e.signal)==null?void 0:ke.get())||{},Te=structuredClone(Se);(Oe=Te==null?void 0:Te.body)!=null&&Oe.filter&&((Me=Object.keys(Te.body.filter))==null||Me.forEach(Fe=>{Te.body.filter[Fe]=replaceCurlyBraces(Te.body.filter[Fe],"state",xe,Ee,_e),Te.body.filter[Fe]||delete Te.body.filter[Fe]})),(Pe=Te==null?void 0:Te.body)!=null&&Pe.conditionalFilter&&((Be=Object.keys(Te.body.conditionalFilter))==null||Be.forEach(Fe=>{Te.body.conditionalFilter[Fe]=replaceCurlyBraces(Te.body.conditionalFilter[Fe],"state",xe,Ee,_e),Te.body.conditionalFilter[Fe]||delete Te.body.conditionalFilter[Fe]}));let Ie=await fetchAPI(Te,Ee,xe,_e);return _e.totalPages=_e.totalPages||_e.totalPages,_e.totalPages=_e.totalPagesPath?get$6(Ie,_e.totalPagesPath,0):Ie.totalPages||_e.totalPages,_e.totalRows=_e.totalInstancesPath?get$6(Ie,_e.totalInstancesPath,0):Ie.totalInstances||_e.totalRows,Se.getDataFrom?get$6(Ie,Se.getDataFrom,[]):Ie},createYAMLFileFromString:async(Ce,_e)=>new File([Ce],"config.yaml",{type:"text/yaml"}),formatArrayToObject:(Ce,_e)=>{var xe,Te;const{keyName:Ae,valueName:Se}=(Te=(xe=_e==null?void 0:_e.meta)==null?void 0:xe.props)==null?void 0:Te.formObjFromArr;if(!Array.isArray(Ce)||!Ae||!Se)return Ce;let Ee={};return Ce.map(Ie=>{Ee[Ie[Ae]]=Ie[Se]}),Ee},getFromCDN:async(Ce,_e)=>await fetchAPI({apiUrl:Ce,formType:""},null,null,void 0).then(Ae=>Ae).catch(Ae=>Ce),concat:(Ce,_e,Ae)=>{const Se=Ae&&Object.keys(Ae).length?Ae:_e.meta.props,{stringToConcat:Ee=[]}=Se;let xe="";return Ee.forEach(Te=>{xe+=replaceCurlyBraces(Te,"state",Ce,Se,_e)}),xe??Ce},dynamicStateValue:(Ce,_e,Ae)=>{var Te,Ie;const Se=Ae&&Object.keys(Ae).length?Ae:_e.meta.props;let{stateValue:Ee="",stateName:xe=""}=Se;return xe=xe&&replaceCurlyBraces(xe,"state",Ce,Se,_e),Ee=Ee&&replaceCurlyBraces(Ee,"state",Ce,Se,_e),(Ie=(Te=_e.store)==null?void 0:Te._signals[xe])==null||Ie.set(Ee),Ce},getValueByResolvingPath:(Ce,_e,Ae)=>{var Ie,De,ke;const Se=Ae&&Object.keys(Ae).length?Ae:_e.meta.props;let{stateName:Ee="",path:xe=""}=Se;xe=replaceCurlyBraces(xe,"state",Ce,Se,_e);let Te=(ke=(De=(Ie=_e.store)==null?void 0:Ie._signals)==null?void 0:De[Ee])==null?void 0:ke.get();return get$6(Te,xe)},setValueFromPrevPipeline:(Ce,_e,Ae)=>{var xe,Te;const Se=Ae&&Object.keys(Ae).length?Ae:_e.meta.props;let{stateName:Ee=""}=Se;return Ee=Ee&&replaceCurlyBraces(Ee,"state",Ce,Se,_e),(Te=(xe=_e.store)==null?void 0:xe._signals[Ee])==null||Te.set(Ce),Ce},copyByResolvingTarget:(Ce,_e,Ae,Se)=>{var Oe,Me,Pe,Be,Fe,$e;const Ee=Ae&&Object.keys(Ae).length?Ae:_e.meta.props;let{source:xe="",target:Te=""}=Ee,Ie=xe&&replaceCurlyBraces(xe,"state",Ce,Ee,_e);Te=Te&&replaceCurlyBraces(Te,"state",Ce,Ee,_e);let[De,...ke]=Te.split(".");if(Te=ke.join("."),Te){let Ue=(Pe=(Me=(Oe=_e.store)==null?void 0:Oe._signals)==null?void 0:Me[De])==null?void 0:Pe.get();Ie=set$a(Ue,Te,Ie)}return($e=(Fe=(Be=_e.store)==null?void 0:Be._signals)==null?void 0:Fe[De])==null||$e.set(Ie),Ie},joinData:(Ce,_e,Ae)=>{const Se=Ae&&Object.keys(Ae).length?Ae:_e.meta.props;let{arrayToJoin:Ee="",separator:xe=",",path:Te=""}=Se,Ie="";if(!Array.isArray(Ee)){Ee=replaceCurlyBraces(Ee,"state",Ce,Se,_e),Ee=Te&&get$6(Ee,Te);const De=Ee.length-1;for(let ke=0;ke<=De;ke++)Ie+="'"+Ee[ke]+"'",ke<De&&(Ie+=xe+" ")}return Ie},wrapValueWithAffixes:(Ce,_e,Ae)=>{const{suffix:Se,prefix:Ee,suffixIndex:xe,prefixIndex:Te}=Ae&&Object.keys(Ae).length?Ae:_e.meta.props;if(typeof Ce!="object"||Ce===null||typeof Ce.value!="string")return Ce;const Ie=(Me,Pe,Be)=>Me.slice(0,Be)+Pe+Me.slice(Be),De=(Me,Pe)=>Me==="start"?0:Me==="last"?Pe:typeof Me=="number"&&Me>=0&&Me<=Pe?Me:-1;let ke=0,Oe=Ce.value;if(typeof Ee=="string"&&(typeof Te=="number"||Te==="start")){const Me=De(Te,Oe.length);Me!==-1&&(Oe=Ie(Oe,Ee,Me),ke=Ee.length)}if(typeof Se=="string"&&(typeof xe=="number"||xe==="last")){let Me=De(xe,Oe.length-ke);Me!==-1&&(Me+=ke,Me>=0&&Me<=Oe.length&&(Oe=Ie(Oe,Se,Me)))}return{...Ce,value:Oe}},generateImageDitaXML:(Ce,_e)=>{const Ae=_e.meta.props,Se=replaceCurlyBraces(Ae.projectId,"localStorage",Ce,Ae,_e);return(Ce??[]).map(Te=>{var Ie;return(Ie=extractAssetDetails(Te))==null?void 0:Ie.assetNameWithExt}).map(Te=>`<image href="/home/cloud-user/dita/${Se}/${Te}" alt="${Te}" />`).join(`
|
|
@@ -2592,7 +2592,7 @@ img.ProseMirror-separator {
|
|
|
2592
2592
|
`}),_e+=`</row>
|
|
2593
2593
|
`)}),_e+=`</tbody>
|
|
2594
2594
|
</tgroup>
|
|
2595
|
-
</table>`,_e}function jsonToDita(Ce,_e){var De,ke;let Ae=!1,Se="<title></title>";function Ee(Oe){var Pe,Be,Fe;let Me="";for(const $e of Oe){if((Pe=$e.attrs)!=null&&Pe.id&&`${$e.attrs.id}`,$e.type==="title"&&!Ae){const Ue=((Be=$e.content)==null?void 0:Be.map(xe).join(""))||"";Se=`<title ${(Fe=$e.attrs)!=null&&Fe.id?`id="${$e.attrs.id}"`:""}>${Ue}</title>`,Ae=!0;continue}if($e.type==="topic"){const Ue=Ee($e.content||[]);Me+=Ue;continue}Me+=xe($e)}return Me}function xe(Oe){var Pe,Be,Fe,$e,Ue,He,Ve,We,ze,qe,Ke,Ge,Ye,Qe,St,Xe,Je,rn;const Me=(Pe=Oe.attrs)!=null&&Pe.id?`id="${Oe.attrs.id}"`:"";if(Oe.type==="paragraph"){const sn=((Be=Oe.content)==null?void 0:Be.map(xe).join(""))||"";return`<p ${Me}>${sn}</p>`}else if(Oe.type==="text"){if(((Fe=Oe.marks)==null?void 0:Fe.length)>0){const sn=Oe.marks[0];if(sn.type==="link"){const{href:pn,target:mn,rel:yn}=sn.attrs;return`<a href="${pn}" target="${mn}" rel="${yn}">${Oe.text}</a>`}if(sn.type==="bold")return`<b>${Oe.text}</b>`;if(sn.type==="italic")return`<i>${Oe.text}</i>`;if(sn.type==="underline")return`<u>${Oe.text}</u>`}return Oe.text||""}else{if(Oe.type==="mention")return($e=Oe.attrs)!=null&&$e.label?`{${Oe.attrs.label}}`:"";if(Oe.type==="table"){const sn=Oe.content||"";return convertTiptapToDita(sn)}else if(Oe.type==="image"){const sn=(He=extractAssetDetails(((Ue=Oe.attrs)==null?void 0:Ue.src)||""))==null?void 0:He.assetNameWithExt;return`<image style="${(Ve=Oe==null?void 0:Oe.attrs)==null?void 0:Ve.style}" href="/home/cloud-user/dita/${_e}/${sn}" alt="${sn}" />`}else if(Oe.type==="video"){const sn=(ze=extractAssetDetails(((We=Oe.attrs)==null?void 0:We.src)||""))==null?void 0:ze.assetNameWithExt;return`<object type="video/${(Ke=extractAssetDetails(((qe=Oe.attrs)==null?void 0:qe.src)||""))==null?void 0:Ke.fileExtension}" data="/home/cloud-user/dita/${_e}/${sn}"> <param name="autoplay" value="false"/> <param name="controls" value="true"/> <desc>Video Uploaded from CMS</desc> </object>`}else if(Oe.type==="codeBlock"){const sn=(Ge=Oe.attrs)==null?void 0:Ge.language,pn=((Ye=Oe.content)==null?void 0:Ye.map(xe).join(""))||"";return`<codeblock outputclass="language-${sn}">${pn}</codeblock>`}else if(Oe.type==="section"){const sn=(Qe=Oe.content)==null?void 0:Qe.find(xn=>xn.type==="title"),pn=sn?`<title>${(St=sn.content)==null?void 0:St.map(xe).join("")}</title>`:"",yn=(((Xe=Oe.content)==null?void 0:Xe.filter(xn=>xn.type!=="title"))||[]).map(xe).join("");return`<section ${Me}>${pn}${yn}</section>`}else{if(Oe.type==="bulletList")return`<ul>${((Je=Oe.content)==null?void 0:Je.map(xe).join(""))||""}</ul>`;if(Oe.type==="listItem")return`<li>${((rn=Oe.content)==null?void 0:rn.map(xe).join(""))||""}</li>`}}return""}const Te=Ee(Ce.content||[]);return`<topic id="${((ke=(De=Ce==null?void 0:Ce.content)==null?void 0:De[0].attrs)==null?void 0:ke.id)||"root"}">${Se}<body>${Te}</body></topic>`}function dropdownJSON(Ce){return{id:"q",type:"my-dropdown",name:"font",styles:"w-full flex flex-col",props:{name:"font",show:!1,multiSelect:!1,layout:"list",partitions:3,type:"button",rounded:!0},bindings:{state:Ce||""},children:[{id:"qwjhg",type:"mobius-dropdown-input",name:"mobius div",styles:"flex border border-gray-300 w-[12vw] rounded-md color-gray-400 text-sm px-2 py-1",props:{value:"Font Family",icon:"/src/assets/dropdownIcon.svg",multiSelect:!1,selectType:!0},bindings:{state:Ce||"",actions:{click:["dropdownToggle"]}},children:[]},{id:"qw",type:"mb-dropdown-menu",name:"mobius dropdown menu",styles:"overflow-y-scroll gap-1 p-0 w-full h-[15vw] z-50 bg-white flex flex-col !top-[2vw] absolute border rounded-md px-3 py-2",props:{multiSelect:!1},bindings:{state:Ce||"",actions:{loadDropdownData:["getDropdownData"]}},children:[{id:"qwer76hyut",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Arial",disabled:!1,type:"text",key:"Arial"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw42r3ferer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Arial",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Arial"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Arial Black",disabled:!1,type:"text",key:"Arial Black"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Arial Black",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Arial Black"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Arial Unicode MS",disabled:!1,type:"text",key:"Arial Unicode MS"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Arial Unicode MS",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Arial Unicode MS"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Book Antiqua",disabled:!1,type:"text",key:"Book Antiqua"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Book Antiqua",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Book Antiqua"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Comic Sans MS",disabled:!1,type:"text",key:"Comic Sans MS"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Comic Sans MS",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Comic Sans MS"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Courier New",disabled:!1,type:"text",key:"Courier New"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Courier New",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Courier New"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Gadget",disabled:!1,type:"text",key:"Gadget"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Gadget",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Gadget"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Geneva",disabled:!1,type:"text",key:"Geneva"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Geneva",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Geneva"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Georgia",disabled:!1,type:"text",key:"Georgia"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Georgia",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Georgia"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Helvetica",disabled:!1,type:"text",key:"Helvetica"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Helvetica",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Helvetica"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Impact",disabled:!1,type:"text",key:"Impact"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Impact",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Impact"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Lucida Console",disabled:!1,type:"text",key:"Lucida Console"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Lucida Console",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Lucida Console"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Lucida Grande",disabled:!1,type:"text",key:"Lucida Grande"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Lucida Grande",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Lucida Grande"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Lucida Sans Unicode",disabled:!1,type:"text",key:"Lucida Sans Unicode"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Lucida Sans Unicode",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Lucida Sans Unicode"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Monaco",disabled:!1,type:"text",key:"Monaco"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Monaco",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Monaco"}],value:""},{id:"qwer76hyut",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"MS Serif",disabled:!1,type:"text",key:"MS Serif"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw42r3ferer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"MS Serif",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"MS Serif"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"New York",disabled:!1,type:"text",key:"New York"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"New York",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"New York"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Palatino",disabled:!1,type:"text",key:"Palatino"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Palatino",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Palatino"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Palatino Linotype",disabled:!1,type:"text",key:"Palatino Linotype"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Palatino Linotype",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Palatino Linotype"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Symboll",disabled:!1,type:"text",key:"Symboll"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Symboll",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Symboll"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Tahoma",disabled:!1,type:"text",key:"Tahoma"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Tahoma",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Tahoma"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Times",disabled:!1,type:"text",key:"Times"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Times",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Times"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Times New Roman",disabled:!1,type:"text",key:"Times New Roman"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Times New Roman",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Times New Roman"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Trebuchet MS",disabled:!1,type:"text",key:"Trebuchet MS"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Trebuchet MS",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Trebuchet MS"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Verdana",disabled:!1,type:"text",key:"Verdana"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Verdana",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Verdana"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Webdings",disabled:!1,type:"text",key:"Webdings"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Webdings",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:""}],value:""}]}]}}class WysiwygEditor extends BaseComponent{constructor(){super();In(this,"ditaValue","");In(this,"contentBlock","");In(this,"$ditaEditor",null);In(this,"fontSize",24);In(this,"isResizingTable",!1);In(this,"cleanupScheduled",!1);In(this,"props",{id:"dita_editor"});In(this,"bindings");In(this,"variablesList",[""]);In(this,"searchTerm","");In(this,"highlightedNodes",[]);In(this,"undoChanges",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().undo().run()});In(this,"redoChanges",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().redo().run()});In(this,"toggleBold",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().toggleBold().run()});In(this,"toggleItalic",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().toggleItalic().run()});In(this,"togglUnderline",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().toggleUnderline().run()});In(this,"toggleStrike",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().toggleStrike().run()});In(this,"toggleBulletList",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().toggleBulletList().run()});In(this,"addColumnAfter",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().addColumnAfter().run()});In(this,"deleteColumn",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().deleteColumn().run()});In(this,"addRowAfter",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().addRowAfter().run()});In(this,"deleteRow",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().deleteRow().run()});In(this,"setFontSize",Ae=>{var Se;(Se=this.$ditaEditor)==null||Se.chain().focus().setFontSize(Ae+"px").run()});In(this,"onFontChange",Ae=>{var Se;(Se=this.$ditaEditor)==null||Se.chain().focus().setFontFamily(Ae).run(),console.log("changdoiasbxlajcdsnlkdja ---- ",Ae)});In(this,"checkSpelling",()=>{let Ae=document.getElementById("dita-builder-container");Ae&&(Ae.spellcheck=!Ae.spellcheck)});In(this,"addLinkToContent",()=>{var Ae,Se;(Se=(Ae=this.$ditaEditor)==null?void 0:Ae.commands)==null||Se.openCustomLinkModal(),console.log("yet to write code")});In(this,"isActive",(Ae,Se={})=>{var Ee;return(Ee=this.$ditaEditor)==null?void 0:Ee.isActive(Ae,Se)});In(this,"isActiveByAttr",Ae=>{var Se;return(Se=this.$ditaEditor)==null?void 0:Se.isActive(Ae)});In(this,"ditaActions",[{name:"undo",command:this.undoChanges,icon:UndoIcon,isDisabled:!1},{name:"redo",command:this.redoChanges,icon:RedoIcon,isDisabled:!1},{name:"fontFamily",command:this.onFontChange,icon:"",isDisabled:!1},{name:"line",command:"",icon:"",isDisabled:!1},{name:"fontSize",command:this.setFontSize,icon:StrikeIcon,isDisabled:!1},{name:"line",command:"",icon:"",isDisabled:!1},{name:"bold",command:this.toggleBold,icon:BoldIcon,isDisabled:!1},{name:"italic",command:this.toggleItalic,icon:ItalicIcon,isDisabled:!1},{name:"underline",command:this.togglUnderline,icon:UnderlineIcon,isDisabled:!1},{name:"strike",command:this.toggleStrike,icon:StrikeIcon,isDisabled:!1},{name:"spell-check",command:this.checkSpelling,icon:SpellCheckIcon,isDisabled:!1},{name:"line",command:"",icon:"",isDisabled:!1},{name:"bulletList",command:this.toggleBulletList,icon:UnorderedListIcon,isDisabled:!1},{name:"line",command:"",icon:"",isDisabled:!1},{name:"link",command:this.addLinkToContent,icon:LinkIcon,isDisabled:!1},{name:"line",command:"",icon:"",isDisabled:!1}]);In(this,"addTimeStamp",()=>{const Ae={day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1};return new Date().toLocaleString("en-GB",Ae).replace(",","")});In(this,"onContentUpdate",this.debounce(async Ae=>{var Pe,Be,Fe,$e,Ue,He,Ve,We,ze,qe;const Se=Ae.editor;if((Be=(Pe=this.store)==null?void 0:Pe._signals.topicAccordianLoader)!=null&&Be.value)return;if(this.isResizingTable){console.log("Skipping update - table resize in progress");return}const Ee=replaceCurlyBraces((Fe=this.meta.props)==null?void 0:Fe.projectId,"state",{},this.meta.props,this)===""?"f1cc49c2-d456-49a3-99bc-8a4285503370":replaceCurlyBraces(($e=this.meta.props)==null?void 0:$e.projectId,"state",{},this.meta.props,this),xe=jsonToDita(Se.getJSON(),Ee),Te=get$6(((He=(Ue=this.store)==null?void 0:Ue._signals.ditaContent)==null?void 0:He.value)??{},"data","");if(!this.isInsideTable(Se)&&this.contentBlock!=="video"&&this.contentBlock!=="image"){const Ke=await xmlToDita(xe);this.updateStateByName({...Te,dita:Ke},"ditaContent")}const De={primarykeyEnable:!0,data:{id:`${(Ve=this==null?void 0:this.ditaValue)==null?void 0:Ve.id}`,content:xe,updatedAt:this.addTimeStamp()}},ke=(We=this==null?void 0:this.props)==null?void 0:We.source,Oe=((ze=this==null?void 0:this.props)==null?void 0:ze.apiMethod)||"POST",Me=(qe=this==null?void 0:this.props)==null?void 0:qe.token;console.log(ke,Oe,De),fetch(ke,{method:Oe,headers:{"Content-Type":"application/json",Authorization:`Bearer ${Me}`},body:JSON.stringify(De)}).then(Ke=>{if(!Ke.ok)throw new Error("Network response was not ok");return Ke.json()}).then(Ke=>{console.log("Auto-save successful:",Ke)}).catch(Ke=>{console.error("Auto-save failed:",Ke)})},1e3));In(this,"bindSearchEvents",()=>{const Ae=document.querySelector(".highlight-search-input[contenteditable]");if(Ae){let Se=null;Ae.addEventListener("input",Ee=>{Se&&clearTimeout(Se),Se=setTimeout(()=>{const xe=Ee.target;this.searchAndHighlight((xe==null?void 0:xe.textContent)||"")},500)})}else setTimeout(()=>{this.bindSearchEvents()},1e3)});In(this,"tableFixTimeout",null);In(this,"tableObserver",null)}createSimpleTableToolbar(){const Ae=document.createElement("div");Ae.id="simple-table-toolbar",Ae.style.cssText=`
|
|
2595
|
+
</table>`,_e}function jsonToDita(Ce,_e){var De,ke;let Ae=!1,Se="<title></title>";function Ee(Oe){var Pe,Be,Fe;let Me="";for(const $e of Oe){if((Pe=$e.attrs)!=null&&Pe.id&&`${$e.attrs.id}`,$e.type==="title"&&!Ae){const Ue=((Be=$e.content)==null?void 0:Be.map(xe).join(""))||"";Se=`<title ${(Fe=$e.attrs)!=null&&Fe.id?`id="${$e.attrs.id}"`:""}>${Ue}</title>`,Ae=!0;continue}if($e.type==="topic"){const Ue=Ee($e.content||[]);Me+=Ue;continue}Me+=xe($e)}return Me}function xe(Oe){var Pe,Be,Fe,$e,Ue,He,Ve,We,ze,qe,Ke,Ge,Ye,Qe,St,Xe,Je,rn;const Me=(Pe=Oe.attrs)!=null&&Pe.id?`id="${Oe.attrs.id}"`:"";if(Oe.type==="paragraph"){const sn=((Be=Oe.content)==null?void 0:Be.map(xe).join(""))||"";return`<p ${Me}>${sn}</p>`}else if(Oe.type==="text"){if(((Fe=Oe.marks)==null?void 0:Fe.length)>0){const sn=Oe.marks[0];if(sn.type==="link"){const{href:pn,target:mn,rel:yn}=sn.attrs;return`<a href="${pn}" target="${mn}" rel="${yn}">${Oe.text}</a>`}if(sn.type==="bold")return`<b>${Oe.text}</b>`;if(sn.type==="italic")return`<i>${Oe.text}</i>`;if(sn.type==="underline")return`<u>${Oe.text}</u>`}return Oe.text||""}else{if(Oe.type==="mention")return($e=Oe.attrs)!=null&&$e.label?`{${Oe.attrs.label}}`:"";if(Oe.type==="table"){const sn=Oe.content||"";return convertTiptapToDita(sn)}else if(Oe.type==="image"){const sn=(He=extractAssetDetails(((Ue=Oe.attrs)==null?void 0:Ue.src)||""))==null?void 0:He.assetNameWithExt;return`<image style="${(Ve=Oe==null?void 0:Oe.attrs)==null?void 0:Ve.style}" href="/home/cloud-user/dita/${_e}/${sn}" alt="${sn}" />`}else if(Oe.type==="video"){const sn=(ze=extractAssetDetails(((We=Oe.attrs)==null?void 0:We.src)||""))==null?void 0:ze.assetNameWithExt;return`<object type="video/${(Ke=extractAssetDetails(((qe=Oe.attrs)==null?void 0:qe.src)||""))==null?void 0:Ke.fileExtension}" data="/home/cloud-user/dita/${_e}/${sn}"> <param name="autoplay" value="false"/> <param name="controls" value="true"/> <desc>Video Uploaded from CMS</desc> </object>`}else if(Oe.type==="codeBlock"){const sn=(Ge=Oe.attrs)==null?void 0:Ge.language,pn=((Ye=Oe.content)==null?void 0:Ye.map(xe).join(""))||"";return`<codeblock outputclass="language-${sn}">${pn}</codeblock>`}else if(Oe.type==="section"){const sn=(Qe=Oe.content)==null?void 0:Qe.find(xn=>xn.type==="title"),pn=sn?`<title>${(St=sn.content)==null?void 0:St.map(xe).join("")}</title>`:"",yn=(((Xe=Oe.content)==null?void 0:Xe.filter(xn=>xn.type!=="title"))||[]).map(xe).join("");return`<section ${Me}>${pn}${yn}</section>`}else{if(Oe.type==="bulletList")return`<ul>${((Je=Oe.content)==null?void 0:Je.map(xe).join(""))||""}</ul>`;if(Oe.type==="listItem")return`<li>${((rn=Oe.content)==null?void 0:rn.map(xe).join(""))||""}</li>`}}return""}const Te=Ee(Ce.content||[]);return`<topic id="${((ke=(De=Ce==null?void 0:Ce.content)==null?void 0:De[0].attrs)==null?void 0:ke.id)||"root"}">${Se}<body>${Te}</body></topic>`}function dropdownJSON(Ce){return{id:"q",type:"my-dropdown",name:"font",styles:"w-full flex flex-col",props:{name:"font",show:!1,multiSelect:!1,layout:"list",partitions:3,type:"button",rounded:!0},bindings:{state:Ce||""},children:[{id:"qwjhg",type:"mobius-dropdown-input",name:"mobius div",styles:"flex border border-gray-300 w-[12vw] rounded-md color-gray-400 text-sm px-2 py-1",props:{value:"Font Family",icon:"/src/assets/dropdownIcon.svg",multiSelect:!1,selectType:!0},bindings:{state:Ce||"",actions:{click:["dropdownToggle"]}},children:[]},{id:"qw",type:"mb-dropdown-menu",name:"mobius dropdown menu",styles:"overflow-y-scroll gap-1 p-0 w-full h-[15vw] z-50 bg-white flex flex-col !top-[2vw] absolute border rounded-md px-3 py-2",props:{multiSelect:!1},bindings:{state:Ce||"",actions:{loadDropdownData:["getDropdownData"]}},children:[{id:"qwer76hyut",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Arial",disabled:!1,type:"text",key:"Arial"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw42r3ferer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Arial",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Arial"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Arial Black",disabled:!1,type:"text",key:"Arial Black"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Arial Black",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Arial Black"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Arial Unicode MS",disabled:!1,type:"text",key:"Arial Unicode MS"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Arial Unicode MS",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Arial Unicode MS"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Book Antiqua",disabled:!1,type:"text",key:"Book Antiqua"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Book Antiqua",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Book Antiqua"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Comic Sans MS",disabled:!1,type:"text",key:"Comic Sans MS"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Comic Sans MS",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Comic Sans MS"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Courier New",disabled:!1,type:"text",key:"Courier New"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Courier New",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Courier New"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Gadget",disabled:!1,type:"text",key:"Gadget"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Gadget",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Gadget"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Geneva",disabled:!1,type:"text",key:"Geneva"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Geneva",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Geneva"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Georgia",disabled:!1,type:"text",key:"Georgia"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Georgia",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Georgia"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Helvetica",disabled:!1,type:"text",key:"Helvetica"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Helvetica",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Helvetica"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Impact",disabled:!1,type:"text",key:"Impact"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Impact",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Impact"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Lucida Console",disabled:!1,type:"text",key:"Lucida Console"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Lucida Console",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Lucida Console"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Lucida Grande",disabled:!1,type:"text",key:"Lucida Grande"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Lucida Grande",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Lucida Grande"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Lucida Sans Unicode",disabled:!1,type:"text",key:"Lucida Sans Unicode"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Lucida Sans Unicode",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Lucida Sans Unicode"}],value:""},{id:"q=-0okwer",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Monaco",disabled:!1,type:"text",key:"Monaco"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw2qwer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Monaco",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Monaco"}],value:""},{id:"qwer76hyut",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"MS Serif",disabled:!1,type:"text",key:"MS Serif"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"qw42r3ferer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"MS Serif",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"MS Serif"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"New York",disabled:!1,type:"text",key:"New York"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"New York",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"New York"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Palatino",disabled:!1,type:"text",key:"Palatino"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Palatino",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Palatino"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Palatino Linotype",disabled:!1,type:"text",key:"Palatino Linotype"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Palatino Linotype",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Palatino Linotype"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Symboll",disabled:!1,type:"text",key:"Symboll"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Symboll",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Symboll"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Tahoma",disabled:!1,type:"text",key:"Tahoma"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Tahoma",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Tahoma"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Times",disabled:!1,type:"text",key:"Times"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Times",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Times"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Times New Roman",disabled:!1,type:"text",key:"Times New Roman"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Times New Roman",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Times New Roman"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Trebuchet MS",disabled:!1,type:"text",key:"Trebuchet MS"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Trebuchet MS",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Trebuchet MS"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Verdana",disabled:!1,type:"text",key:"Verdana"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Verdana",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:"Verdana"}],value:""},{id:"qwe846531r",type:"my-dropdown-item",styles:"hover:bg-blue-50 cursor-pointer",props:{value:"Webdings",disabled:!1,type:"text",key:"Webdings"},bindings:{state:Ce||"",actions:{click:["toggleMultiSelect"]}},children:[{id:"q8653wer",type:"mobius-list-item",name:"mobius dropdown list item text",styles:"",props:{value:"Webdings",disabled:!1,type:"text",checked:!1},bindings:{state:Ce||""},children:[],value:""}],value:""}]}]}}class WysiwygEditor extends BaseComponent{constructor(){super();In(this,"ditaValue","");In(this,"contentBlock","");In(this,"$ditaEditor",null);In(this,"fontSize",24);In(this,"isResizingTable",!1);In(this,"cleanupScheduled",!1);In(this,"props",{id:"dita_editor"});In(this,"bindings");In(this,"variablesList",[""]);In(this,"searchTerm","");In(this,"highlightedNodes",[]);In(this,"undoChanges",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().undo().run()});In(this,"redoChanges",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().redo().run()});In(this,"toggleBold",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().toggleBold().run()});In(this,"toggleItalic",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().toggleItalic().run()});In(this,"togglUnderline",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().toggleUnderline().run()});In(this,"toggleStrike",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().toggleStrike().run()});In(this,"toggleBulletList",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().toggleBulletList().run()});In(this,"addColumnAfter",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().addColumnAfter().run()});In(this,"deleteColumn",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().deleteColumn().run()});In(this,"addRowAfter",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().addRowAfter().run()});In(this,"deleteRow",()=>{var Ae;(Ae=this.$ditaEditor)==null||Ae.chain().focus().deleteRow().run()});In(this,"setFontSize",Ae=>{var Se;(Se=this.$ditaEditor)==null||Se.chain().focus().setFontSize(Ae+"px").run()});In(this,"onFontChange",Ae=>{var Se;(Se=this.$ditaEditor)==null||Se.chain().focus().setFontFamily(Ae).run(),console.log("changdoiasbxlajcdsnlkdja ---- ",Ae)});In(this,"checkSpelling",()=>{let Ae=document.getElementById("dita-builder-container");Ae&&(Ae.spellcheck=!Ae.spellcheck)});In(this,"addLinkToContent",()=>{var Ae,Se;(Se=(Ae=this.$ditaEditor)==null?void 0:Ae.commands)==null||Se.openCustomLinkModal(),console.log("yet to write code")});In(this,"isActive",(Ae,Se={})=>{var Ee;return(Ee=this.$ditaEditor)==null?void 0:Ee.isActive(Ae,Se)});In(this,"isActiveByAttr",Ae=>{var Se;return(Se=this.$ditaEditor)==null?void 0:Se.isActive(Ae)});In(this,"ditaActions",[{name:"undo",command:this.undoChanges,icon:UndoIcon,isDisabled:!1},{name:"redo",command:this.redoChanges,icon:RedoIcon,isDisabled:!1},{name:"fontFamily",command:this.onFontChange,icon:"",isDisabled:!1},{name:"line",command:"",icon:"",isDisabled:!1},{name:"fontSize",command:this.setFontSize,icon:StrikeIcon,isDisabled:!1},{name:"line",command:"",icon:"",isDisabled:!1},{name:"bold",command:this.toggleBold,icon:BoldIcon,isDisabled:!1},{name:"italic",command:this.toggleItalic,icon:ItalicIcon,isDisabled:!1},{name:"underline",command:this.togglUnderline,icon:UnderlineIcon,isDisabled:!1},{name:"strike",command:this.toggleStrike,icon:StrikeIcon,isDisabled:!1},{name:"spell-check",command:this.checkSpelling,icon:SpellCheckIcon,isDisabled:!1},{name:"line",command:"",icon:"",isDisabled:!1},{name:"bulletList",command:this.toggleBulletList,icon:UnorderedListIcon,isDisabled:!1},{name:"line",command:"",icon:"",isDisabled:!1},{name:"link",command:this.addLinkToContent,icon:LinkIcon,isDisabled:!1},{name:"line",command:"",icon:"",isDisabled:!1}]);In(this,"addTimeStamp",()=>{const Ae={day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1};return new Date().toLocaleString("en-GB",Ae).replace(",","")});In(this,"onContentUpdate",this.debounce(async Ae=>{var Be,Fe,$e,Ue,He,Ve,We,ze,qe,Ke,Ge;const Se=Ae.editor;if((Fe=(Be=this.store)==null?void 0:Be._signals.topicAccordianLoader)!=null&&Fe.value)return;if(this.isResizingTable){console.log("Skipping update - table resize in progress");return}const Ee=replaceCurlyBraces(($e=this.meta.props)==null?void 0:$e.projectId,"state",{},this.meta.props,this)===""?"f1cc49c2-d456-49a3-99bc-8a4285503370":replaceCurlyBraces((Ue=this.meta.props)==null?void 0:Ue.projectId,"state",{},this.meta.props,this),xe=jsonToDita(Se.getJSON(),Ee),Te=get$6(((Ve=(He=this.store)==null?void 0:He._signals.ditaContent)==null?void 0:Ve.value)??{},"data","");if(!this.isInsideTable(Se)&&this.contentBlock!=="video"&&this.contentBlock!=="image"){const Ye=await xmlToDita(xe);this.updateStateByName({...Te,dita:Ye},"ditaContent")}let De={id:`${(We=this==null?void 0:this.ditaValue)==null?void 0:We.id}`,content:xe,updatedAt:this.addTimeStamp(),version:((+((ze=this==null?void 0:this.ditaValue)==null?void 0:ze.version)||0)+1).toString()};De={...this.ditaValue,...De},De&&"transactionId"in De&&delete De.transactionId,De&&"dita"in De&&delete De.dita;const ke={dbType:"TIDB",data:[De]},Oe=(qe=this==null?void 0:this.props)==null?void 0:qe.source,Me=((Ke=this==null?void 0:this.props)==null?void 0:Ke.apiMethod)||"POST",Pe=(Ge=this==null?void 0:this.props)==null?void 0:Ge.token;console.log(Oe,Me,ke),fetch(Oe,{method:Me,headers:{"Content-Type":"application/json",Authorization:`Bearer ${Pe}`},body:JSON.stringify(ke)}).then(Ye=>{if(!Ye.ok)throw new Error("Network response was not ok");return Ye.json()}).then(Ye=>{console.log("Auto-save successful:",Ye)}).catch(Ye=>{console.error("Auto-save failed:",Ye)})},1e3));In(this,"bindSearchEvents",()=>{const Ae=document.querySelector(".highlight-search-input[contenteditable]");if(Ae){let Se=null;Ae.addEventListener("input",Ee=>{Se&&clearTimeout(Se),Se=setTimeout(()=>{const xe=Ee.target;this.searchAndHighlight((xe==null?void 0:xe.textContent)||"")},500)})}else setTimeout(()=>{this.bindSearchEvents()},1e3)});In(this,"tableFixTimeout",null);In(this,"tableObserver",null)}createSimpleTableToolbar(){const Ae=document.createElement("div");Ae.id="simple-table-toolbar",Ae.style.cssText=`
|
|
2596
2596
|
display: flex;
|
|
2597
2597
|
gap: 8px;
|
|
2598
2598
|
padding: 6px 10px;
|