lone-format 0.9.9 → 0.10.0

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.
@@ -1,65 +1,67 @@
1
- (function(ze,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(ze=typeof globalThis<"u"?globalThis:ze||self,o(ze.LoneFormat={},ze.Vue))})(this,function(ze,o){"use strict";class ir{add(t,r,a){if(typeof arguments[0]!="string")for(let i in arguments[0])this.add(i,arguments[0][i],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(i){this[i]=this[i]||[],r&&this[i][a?"unshift":"push"](r)},this)}run(t,r){this[t]=this[t]||[],this[t].forEach(function(a){a.call(r&&r.context?r.context:r,r)})}}class ar{constructor(t){this.jsep=t,this.registered={}}register(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];r.forEach(i=>{if(typeof i!="object"||!i.name||!i.init)throw new Error("Invalid JSEP plugin format");this.registered[i.name]||(i.init(this.jsep),this.registered[i.name]=i)})}}class V{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+V.version}static addUnaryOp(t){return V.max_unop_len=Math.max(t.length,V.max_unop_len),V.unary_ops[t]=1,V}static addBinaryOp(t,r,a){return V.max_binop_len=Math.max(t.length,V.max_binop_len),V.binary_ops[t]=r,a?V.right_associative.add(t):V.right_associative.delete(t),V}static addIdentifierChar(t){return V.additional_identifier_chars.add(t),V}static addLiteral(t,r){return V.literals[t]=r,V}static removeUnaryOp(t){return delete V.unary_ops[t],t.length===V.max_unop_len&&(V.max_unop_len=V.getMaxKeyLen(V.unary_ops)),V}static removeAllUnaryOps(){return V.unary_ops={},V.max_unop_len=0,V}static removeIdentifierChar(t){return V.additional_identifier_chars.delete(t),V}static removeBinaryOp(t){return delete V.binary_ops[t],t.length===V.max_binop_len&&(V.max_binop_len=V.getMaxKeyLen(V.binary_ops)),V.right_associative.delete(t),V}static removeAllBinaryOps(){return V.binary_ops={},V.max_binop_len=0,V}static removeLiteral(t){return delete V.literals[t],V}static removeAllLiterals(){return V.literals={},V}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new V(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(r=>r.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return V.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!V.binary_ops[String.fromCharCode(t)]||V.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return V.isIdentifierStart(t)||V.isDecimalDigit(t)}throwError(t){const r=new Error(t+" at character "+this.index);throw r.index=this.index,r.description=t,r}runHook(t,r){if(V.hooks[t]){const a={context:this,node:r};return V.hooks.run(t,a),a.node}return r}searchHook(t){if(V.hooks[t]){const r={context:this};return V.hooks[t].find(function(a){return a.call(r.context,r),r.node}),r.node}}gobbleSpaces(){let t=this.code;for(;t===V.SPACE_CODE||t===V.TAB_CODE||t===V.LF_CODE||t===V.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const t=this.gobbleExpressions(),r=t.length===1?t[0]:{type:V.COMPOUND,body:t};return this.runHook("after-all",r)}gobbleExpressions(t){let r=[],a,i;for(;this.index<this.expr.length;)if(a=this.code,a===V.SEMCOL_CODE||a===V.COMMA_CODE)this.index++;else if(i=this.gobbleExpression())r.push(i);else if(this.index<this.expr.length){if(a===t)break;this.throwError('Unexpected "'+this.char+'"')}return r}gobbleExpression(){const t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,V.max_binop_len),r=t.length;for(;r>0;){if(V.binary_ops.hasOwnProperty(t)&&(!V.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!V.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=r,t;t=t.substr(0,--r)}return!1}gobbleBinaryExpression(){let t,r,a,i,u,f,x,p,m;if(f=this.gobbleToken(),!f||(r=this.gobbleBinaryOp(),!r))return f;for(u={value:r,prec:V.binaryPrecedence(r),right_a:V.right_associative.has(r)},x=this.gobbleToken(),x||this.throwError("Expected expression after "+r),i=[f,u,x];r=this.gobbleBinaryOp();){if(a=V.binaryPrecedence(r),a===0){this.index-=r.length;break}u={value:r,prec:a,right_a:V.right_associative.has(r)},m=r;const _=D=>u.right_a&&D.right_a?a>D.prec:a<=D.prec;for(;i.length>2&&_(i[i.length-2]);)x=i.pop(),r=i.pop().value,f=i.pop(),t={type:V.BINARY_EXP,operator:r,left:f,right:x},i.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+m),i.push(u,t)}for(p=i.length-1,t=i[p];p>1;)t={type:V.BINARY_EXP,operator:i[p-1].value,left:i[p-2],right:t},p-=2;return t}gobbleToken(){let t,r,a,i;if(this.gobbleSpaces(),i=this.searchHook("gobble-token"),i)return this.runHook("after-token",i);if(t=this.code,V.isDecimalDigit(t)||t===V.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===V.SQUOTE_CODE||t===V.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(t===V.OBRACK_CODE)i=this.gobbleArray();else{for(r=this.expr.substr(this.index,V.max_unop_len),a=r.length;a>0;){if(V.unary_ops.hasOwnProperty(r)&&(!V.isIdentifierStart(this.code)||this.index+r.length<this.expr.length&&!V.isIdentifierPart(this.expr.charCodeAt(this.index+r.length)))){this.index+=a;const u=this.gobbleToken();return u||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:V.UNARY_EXP,operator:r,argument:u,prefix:!0})}r=r.substr(0,--a)}V.isIdentifierStart(t)?(i=this.gobbleIdentifier(),V.literals.hasOwnProperty(i.name)?i={type:V.LITERAL,value:V.literals[i.name],raw:i.name}:i.name===V.this_str&&(i={type:V.THIS_EXP})):t===V.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook("after-token",i)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let r=this.code;for(;r===V.PERIOD_CODE||r===V.OBRACK_CODE||r===V.OPAREN_CODE||r===V.QUMARK_CODE;){let a;if(r===V.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==V.PERIOD_CODE)break;a=!0,this.index+=2,this.gobbleSpaces(),r=this.code}this.index++,r===V.OBRACK_CODE?(t={type:V.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),r=this.code,r!==V.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):r===V.OPAREN_CODE?t={type:V.CALL_EXP,arguments:this.gobbleArguments(V.CPAREN_CODE),callee:t}:(r===V.PERIOD_CODE||a)&&(a&&this.index--,this.gobbleSpaces(),t={type:V.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),a&&(t.optional=!0),this.gobbleSpaces(),r=this.code}return t}gobbleNumericLiteral(){let t="",r,a;for(;V.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===V.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);V.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(r=this.char,r==="e"||r==="E"){for(t+=this.expr.charAt(this.index++),r=this.char,(r==="+"||r==="-")&&(t+=this.expr.charAt(this.index++));V.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);V.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+t+this.char+")")}return a=this.code,V.isIdentifierStart(a)?this.throwError("Variable names cannot start with a number ("+t+this.char+")"):(a===V.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===V.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:V.LITERAL,value:parseFloat(t),raw:t}}gobbleStringLiteral(){let t="";const r=this.index,a=this.expr.charAt(this.index++);let i=!1;for(;this.index<this.expr.length;){let u=this.expr.charAt(this.index++);if(u===a){i=!0;break}else if(u==="\\")switch(u=this.expr.charAt(this.index++),u){case"n":t+=`
2
- `;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=u}else t+=u}return i||this.throwError('Unclosed quote after "'+t+'"'),{type:V.LITERAL,value:t,raw:this.expr.substring(r,this.index)}}gobbleIdentifier(){let t=this.code,r=this.index;for(V.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,V.isIdentifierPart(t));)this.index++;return{type:V.IDENTIFIER,name:this.expr.slice(r,this.index)}}gobbleArguments(t){const r=[];let a=!1,i=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let u=this.code;if(u===t){a=!0,this.index++,t===V.CPAREN_CODE&&i&&i>=r.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(u===V.COMMA_CODE){if(this.index++,i++,i!==r.length){if(t===V.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===V.CBRACK_CODE)for(let f=r.length;f<i;f++)r.push(null)}}else if(r.length!==i&&i!==0)this.throwError("Expected comma");else{const f=this.gobbleExpression();(!f||f.type===V.COMPOUND)&&this.throwError("Expected comma"),r.push(f)}}return a||this.throwError("Expected "+String.fromCharCode(t)),r}gobbleGroup(){this.index++;let t=this.gobbleExpressions(V.CPAREN_CODE);if(this.code===V.CPAREN_CODE)return this.index++,t.length===1?t[0]:t.length?{type:V.SEQUENCE_EXP,expressions:t}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:V.ARRAY_EXP,elements:this.gobbleArguments(V.CBRACK_CODE)}}}const ur=new ir;Object.assign(V,{hooks:ur,plugins:new ar(V),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),V.max_unop_len=V.getMaxKeyLen(V.unary_ops),V.max_binop_len=V.getMaxKeyLen(V.binary_ops);const Ze=n=>new V(n).parse(),lr=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(V).filter(n=>!lr.includes(n)&&Ze[n]===void 0).forEach(n=>{Ze[n]=V[n]}),Ze.Jsep=V;const cr="ConditionalExpression";var fr={name:"ternary",init(n){n.hooks.add("after-expression",function(r){if(r.node&&this.code===n.QUMARK_CODE){this.index++;const a=r.node,i=this.gobbleExpression();if(i||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===n.COLON_CODE){this.index++;const u=this.gobbleExpression();if(u||this.throwError("Expected expression"),r.node={type:cr,test:a,consequent:i,alternate:u},a.operator&&n.binary_ops[a.operator]<=.9){let f=a;for(;f.right.operator&&n.binary_ops[f.right.operator]<=.9;)f=f.right;r.node.test=f.right,f.right=r.node,r.node=a}}else this.throwError("Expected :")}})}};Ze.plugins.register(fr);const Rt=47,dr=92;var pr={name:"regex",init(n){n.hooks.add("gobble-token",function(r){if(this.code===Rt){const a=++this.index;let i=!1;for(;this.index<this.expr.length;){if(this.code===Rt&&!i){const u=this.expr.slice(a,this.index);let f="";for(;++this.index<this.expr.length;){const p=this.code;if(p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57)f+=this.char;else break}let x;try{x=new RegExp(u,f)}catch(p){this.throwError(p.message)}return r.node={type:n.LITERAL,value:x,raw:this.expr.slice(a-1,this.index)},r.node=this.gobbleTokenProperty(r.node),r.node}this.code===n.OBRACK_CODE?i=!0:i&&this.code===n.CBRACK_CODE&&(i=!1),this.index+=this.code===dr?2:1}this.throwError("Unclosed Regex")}})}};const Ct=43,ct={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|=","||=","&&=","??="]),updateOperators:[Ct,45],assignmentPrecedence:.9,init(n){const t=[n.IDENTIFIER,n.MEMBER_EXP];ct.assignmentOperators.forEach(a=>n.addBinaryOp(a,ct.assignmentPrecedence,!0)),n.hooks.add("gobble-token",function(i){const u=this.code;ct.updateOperators.some(f=>f===u&&f===this.expr.charCodeAt(this.index+1))&&(this.index+=2,i.node={type:"UpdateExpression",operator:u===Ct?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},(!i.node.argument||!t.includes(i.node.argument.type))&&this.throwError(`Unexpected ${i.node.operator}`))}),n.hooks.add("after-token",function(i){if(i.node){const u=this.code;ct.updateOperators.some(f=>f===u&&f===this.expr.charCodeAt(this.index+1))&&(t.includes(i.node.type)||this.throwError(`Unexpected ${i.node.operator}`),this.index+=2,i.node={type:"UpdateExpression",operator:u===Ct?"++":"--",argument:i.node,prefix:!1})}}),n.hooks.add("after-expression",function(i){i.node&&r(i.node)});function r(a){ct.assignmentOperators.has(a.operator)?(a.type="AssignmentExpression",r(a.left),r(a.right)):a.operator||Object.values(a).forEach(i=>{i&&typeof i=="object"&&r(i)})}}};Ze.plugins.register(pr,ct),Ze.addUnaryOp("typeof"),Ze.addLiteral("null",null),Ze.addLiteral("undefined",void 0);const hr=new Set(["constructor","__proto__","__defineGetter__","__defineSetter__"]),_e={evalAst(n,t){switch(n.type){case"BinaryExpression":case"LogicalExpression":return _e.evalBinaryExpression(n,t);case"Compound":return _e.evalCompound(n,t);case"ConditionalExpression":return _e.evalConditionalExpression(n,t);case"Identifier":return _e.evalIdentifier(n,t);case"Literal":return _e.evalLiteral(n,t);case"MemberExpression":return _e.evalMemberExpression(n,t);case"UnaryExpression":return _e.evalUnaryExpression(n,t);case"ArrayExpression":return _e.evalArrayExpression(n,t);case"CallExpression":return _e.evalCallExpression(n,t);case"AssignmentExpression":return _e.evalAssignmentExpression(n,t);default:throw SyntaxError("Unexpected expression",n)}},evalBinaryExpression(n,t){return{"||":(a,i)=>a||i(),"&&":(a,i)=>a&&i(),"|":(a,i)=>a|i(),"^":(a,i)=>a^i(),"&":(a,i)=>a&i(),"==":(a,i)=>a==i(),"!=":(a,i)=>a!=i(),"===":(a,i)=>a===i(),"!==":(a,i)=>a!==i(),"<":(a,i)=>a<i(),">":(a,i)=>a>i(),"<=":(a,i)=>a<=i(),">=":(a,i)=>a>=i(),"<<":(a,i)=>a<<i(),">>":(a,i)=>a>>i(),">>>":(a,i)=>a>>>i(),"+":(a,i)=>a+i(),"-":(a,i)=>a-i(),"*":(a,i)=>a*i(),"/":(a,i)=>a/i(),"%":(a,i)=>a%i()}[n.operator](_e.evalAst(n.left,t),()=>_e.evalAst(n.right,t))},evalCompound(n,t){let r;for(let a=0;a<n.body.length;a++){n.body[a].type==="Identifier"&&["var","let","const"].includes(n.body[a].name)&&n.body[a+1]&&n.body[a+1].type==="AssignmentExpression"&&(a+=1);const i=n.body[a];r=_e.evalAst(i,t)}return r},evalConditionalExpression(n,t){return _e.evalAst(n.test,t)?_e.evalAst(n.consequent,t):_e.evalAst(n.alternate,t)},evalIdentifier(n,t){if(Object.hasOwn(t,n.name))return t[n.name];throw ReferenceError(`${n.name} is not defined`)},evalLiteral(n){return n.value},evalMemberExpression(n,t){const r=String(n.computed?_e.evalAst(n.property):n.property.name),a=_e.evalAst(n.object,t);if(a==null)throw TypeError(`Cannot read properties of ${a} (reading '${r}')`);if(!Object.hasOwn(a,r)&&hr.has(r))throw TypeError(`Cannot read properties of ${a} (reading '${r}')`);const i=a[r];return typeof i=="function"?i.bind(a):i},evalUnaryExpression(n,t){return{"-":a=>-_e.evalAst(a,t),"!":a=>!_e.evalAst(a,t),"~":a=>~_e.evalAst(a,t),"+":a=>+_e.evalAst(a,t),typeof:a=>typeof _e.evalAst(a,t)}[n.operator](n.argument)},evalArrayExpression(n,t){return n.elements.map(r=>_e.evalAst(r,t))},evalCallExpression(n,t){const r=n.arguments.map(i=>_e.evalAst(i,t));return _e.evalAst(n.callee,t)(...r)},evalAssignmentExpression(n,t){if(n.left.type!=="Identifier")throw SyntaxError("Invalid left-hand side in assignment");const r=n.left.name,a=_e.evalAst(n.right,t);return t[r]=a,t[r]}};class mr{constructor(t){this.code=t,this.ast=Ze(this.code)}runInNewContext(t){const r=Object.assign(Object.create(null),t);return _e.evalAst(this.ast,r)}}function rt(n,t){return n=n.slice(),n.push(t),n}function Dt(n,t){return t=t.slice(),t.unshift(n),t}class gr extends Error{constructor(t){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=t,this.name="NewError"}}function we(n,t,r,a,i){if(!(this instanceof we))try{return new we(n,t,r,a,i)}catch(f){if(!f.avoidNew)throw f;return f.value}typeof n=="string"&&(i=a,a=r,r=t,t=n,n=null);const u=n&&typeof n=="object";if(n=n||{},this.json=n.json||r,this.path=n.path||t,this.resultType=n.resultType||"value",this.flatten=n.flatten||!1,this.wrap=Object.hasOwn(n,"wrap")?n.wrap:!0,this.sandbox=n.sandbox||{},this.eval=n.eval===void 0?"safe":n.eval,this.ignoreEvalErrors=typeof n.ignoreEvalErrors>"u"?!1:n.ignoreEvalErrors,this.parent=n.parent||null,this.parentProperty=n.parentProperty||null,this.callback=n.callback||a||null,this.otherTypeCallback=n.otherTypeCallback||i||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},n.autostart!==!1){const f={path:u?n.path:t};u?"json"in n&&(f.json=n.json):f.json=r;const x=this.evaluate(f);if(!x||typeof x!="object")throw new gr(x);return x}}we.prototype.evaluate=function(n,t,r,a){let i=this.parent,u=this.parentProperty,{flatten:f,wrap:x}=this;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=a||this.otherTypeCallback,t=t||this.json,n=n||this.path,n&&typeof n=="object"&&!Array.isArray(n)){if(!n.path&&n.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!Object.hasOwn(n,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:t}=n),f=Object.hasOwn(n,"flatten")?n.flatten:f,this.currResultType=Object.hasOwn(n,"resultType")?n.resultType:this.currResultType,this.currSandbox=Object.hasOwn(n,"sandbox")?n.sandbox:this.currSandbox,x=Object.hasOwn(n,"wrap")?n.wrap:x,this.currEval=Object.hasOwn(n,"eval")?n.eval:this.currEval,r=Object.hasOwn(n,"callback")?n.callback:r,this.currOtherTypeCallback=Object.hasOwn(n,"otherTypeCallback")?n.otherTypeCallback:this.currOtherTypeCallback,i=Object.hasOwn(n,"parent")?n.parent:i,u=Object.hasOwn(n,"parentProperty")?n.parentProperty:u,n=n.path}if(i=i||null,u=u||null,Array.isArray(n)&&(n=we.toPathString(n)),!n&&n!==""||!t)return;const p=we.toPathArray(n);p[0]==="$"&&p.length>1&&p.shift(),this._hasParentSelector=null;const m=this._trace(p,t,["$"],i,u,r).filter(function(_){return _&&!_.isParentSelector});return m.length?!x&&m.length===1&&!m[0].hasArrExpr?this._getPreferredOutput(m[0]):m.reduce((_,D)=>{const U=this._getPreferredOutput(D);return f&&Array.isArray(U)?_=_.concat(U):_.push(U),_},[]):x?[]:void 0},we.prototype._getPreferredOutput=function(n){const t=this.currResultType;switch(t){case"all":{const r=Array.isArray(n.path)?n.path:we.toPathArray(n.path);return n.pointer=we.toPointer(r),n.path=typeof n.path=="string"?n.path:we.toPathString(n.path),n}case"value":case"parent":case"parentProperty":return n[t];case"path":return we.toPathString(n[t]);case"pointer":return we.toPointer(n.path);default:throw new TypeError("Unknown result type")}},we.prototype._handleCallback=function(n,t,r){if(t){const a=this._getPreferredOutput(n);n.path=typeof n.path=="string"?n.path:we.toPathString(n.path),t(a,r,n)}},we.prototype._trace=function(n,t,r,a,i,u,f,x){let p;if(!n.length)return p={path:r,value:t,parent:a,parentProperty:i,hasArrExpr:f},this._handleCallback(p,u,"value"),p;const m=n[0],_=n.slice(1),D=[];function U(K){Array.isArray(K)?K.forEach(J=>{D.push(J)}):D.push(K)}if((typeof m!="string"||x)&&t&&Object.hasOwn(t,m))U(this._trace(_,t[m],rt(r,m),t,m,u,f));else if(m==="*")this._walk(t,K=>{U(this._trace(_,t[K],rt(r,K),t,K,u,!0,!0))});else if(m==="..")U(this._trace(_,t,r,a,i,u,f)),this._walk(t,K=>{typeof t[K]=="object"&&U(this._trace(n.slice(),t[K],rt(r,K),t,K,u,!0))});else{if(m==="^")return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:_,isParentSelector:!0};if(m==="~")return p={path:rt(r,m),value:i,parent:a,parentProperty:null},this._handleCallback(p,u,"property"),p;if(m==="$")U(this._trace(_,t,r,null,null,u,f));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(m))U(this._slice(m,_,t,r,a,i,u));else if(m.indexOf("?(")===0){if(this.currEval===!1)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");const K=m.replace(/^\?\((.*?)\)$/u,"$1"),J=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(K);J?this._walk(t,ue=>{const H=[J[2]],de=J[1]?t[ue][J[1]]:t[ue];this._trace(H,de,r,a,i,u,!0).length>0&&U(this._trace(_,t[ue],rt(r,ue),t,ue,u,!0))}):this._walk(t,ue=>{this._eval(K,t[ue],ue,r,a,i)&&U(this._trace(_,t[ue],rt(r,ue),t,ue,u,!0))})}else if(m[0]==="("){if(this.currEval===!1)throw new Error("Eval [(expr)] prevented in JSONPath expression.");U(this._trace(Dt(this._eval(m,t,r.at(-1),r.slice(0,-1),a,i),_),t,r,a,i,u,f))}else if(m[0]==="@"){let K=!1;const J=m.slice(1,-2);switch(J){case"scalar":(!t||!["object","function"].includes(typeof t))&&(K=!0);break;case"boolean":case"string":case"undefined":case"function":typeof t===J&&(K=!0);break;case"integer":Number.isFinite(t)&&!(t%1)&&(K=!0);break;case"number":Number.isFinite(t)&&(K=!0);break;case"nonFinite":typeof t=="number"&&!Number.isFinite(t)&&(K=!0);break;case"object":t&&typeof t===J&&(K=!0);break;case"array":Array.isArray(t)&&(K=!0);break;case"other":K=this.currOtherTypeCallback(t,r,a,i);break;case"null":t===null&&(K=!0);break;default:throw new TypeError("Unknown value type "+J)}if(K)return p={path:r,value:t,parent:a,parentProperty:i},this._handleCallback(p,u,"value"),p}else if(m[0]==="`"&&t&&Object.hasOwn(t,m.slice(1))){const K=m.slice(1);U(this._trace(_,t[K],rt(r,K),t,K,u,f,!0))}else if(m.includes(",")){const K=m.split(",");for(const J of K)U(this._trace(Dt(J,_),t,r,a,i,u,!0))}else!x&&t&&Object.hasOwn(t,m)&&U(this._trace(_,t[m],rt(r,m),t,m,u,f,!0))}if(this._hasParentSelector)for(let K=0;K<D.length;K++){const J=D[K];if(J&&J.isParentSelector){const ue=this._trace(J.expr,t,J.path,a,i,u,f);if(Array.isArray(ue)){D[K]=ue[0];const H=ue.length;for(let de=1;de<H;de++)K++,D.splice(K,0,ue[de])}else D[K]=ue}}return D},we.prototype._walk=function(n,t){if(Array.isArray(n)){const r=n.length;for(let a=0;a<r;a++)t(a)}else n&&typeof n=="object"&&Object.keys(n).forEach(r=>{t(r)})},we.prototype._slice=function(n,t,r,a,i,u,f){if(!Array.isArray(r))return;const x=r.length,p=n.split(":"),m=p[2]&&Number.parseInt(p[2])||1;let _=p[0]&&Number.parseInt(p[0])||0,D=p[1]&&Number.parseInt(p[1])||x;_=_<0?Math.max(0,_+x):Math.min(x,_),D=D<0?Math.max(0,D+x):Math.min(x,D);const U=[];for(let K=_;K<D;K+=m)this._trace(Dt(K,t),r,a,i,u,f,!0).forEach(ue=>{U.push(ue)});return U},we.prototype._eval=function(n,t,r,a,i,u){this.currSandbox._$_parentProperty=u,this.currSandbox._$_parent=i,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=t;const f=n.includes("@path");f&&(this.currSandbox._$_path=we.toPathString(a.concat([r])));const x=this.currEval+"Script:"+n;if(!we.cache[x]){let p=n.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");if(f&&(p=p.replaceAll("@path","_$_path")),this.currEval==="safe"||this.currEval===!0||this.currEval===void 0)we.cache[x]=new this.safeVm.Script(p);else if(this.currEval==="native")we.cache[x]=new this.vm.Script(p);else if(typeof this.currEval=="function"&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,"runInNewContext")){const m=this.currEval;we.cache[x]=new m(p)}else if(typeof this.currEval=="function")we.cache[x]={runInNewContext:m=>this.currEval(p,m)};else throw new TypeError(`Unknown "eval" property "${this.currEval}"`)}try{return we.cache[x].runInNewContext(this.currSandbox)}catch(p){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+p.message+": "+n)}},we.cache={},we.toPathString=function(n){const t=n,r=t.length;let a="$";for(let i=1;i<r;i++)/^(~|\^|@.*?\(\))$/u.test(t[i])||(a+=/^[0-9*]+$/u.test(t[i])?"["+t[i]+"]":"['"+t[i]+"']");return a},we.toPointer=function(n){const t=n,r=t.length;let a="";for(let i=1;i<r;i++)/^(~|\^|@.*?\(\))$/u.test(t[i])||(a+="/"+t[i].toString().replaceAll("~","~0").replaceAll("/","~1"));return a},we.toPathArray=function(n){const{cache:t}=we;if(t[n])return t[n].concat();const r=[],i=n.replaceAll(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu,";$&;").replaceAll(/[['](\??\(.*?\))[\]'](?!.\])/gu,function(u,f){return"[#"+(r.push(f)-1)+"]"}).replaceAll(/\[['"]([^'\]]*)['"]\]/gu,function(u,f){return"['"+f.replaceAll(".","%@%").replaceAll("~","%%@@%%")+"']"}).replaceAll("~",";~;").replaceAll(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu,";").replaceAll("%@%",".").replaceAll("%%@@%%","~").replaceAll(/(?:;)?(\^+)(?:;)?/gu,function(u,f){return";"+f.split("").join(";")+";"}).replaceAll(/;;;|;;/gu,";..;").replaceAll(/;$|'?\]|'$/gu,"").split(";").map(function(u){const f=u.match(/#(\d+)/u);return!f||!f[1]?u:r[f[1]]});return t[n]=i,t[n].concat()},we.prototype.safeVm={Script:mr};const Er=function(n,t,r){const a=n.length;for(let i=0;i<a;i++){const u=n[i];r(u)&&t.push(n.splice(i--,1)[0])}};class yr{constructor(t){this.code=t}runInNewContext(t){let r=this.code;const a=Object.keys(t),i=[];Er(a,i,m=>typeof t[m]=="function");const u=a.map(m=>t[m]);r=i.reduce((m,_)=>{let D=t[_].toString();return/function/u.test(D)||(D="function "+D),"var "+_+"="+D+";"+m},"")+r,!/(['"])use strict\1/u.test(r)&&!a.includes("arguments")&&(r="var arguments = undefined;"+r),r=r.replace(/;\s*$/u,"");const x=r.lastIndexOf(";"),p=x!==-1?r.slice(0,x+1)+" return "+r.slice(x+1):" return "+r;return new Function(...a,p)(...u)}}we.prototype.vm={Script:yr};const br={class:"json-node"},Ar={key:0,class:"json-node__container"},xr={class:"json-node__line"},Nr=["contenteditable","onKeydown"],Cr={key:1,class:"json-node__colon"},Dr=["title"],vr=["title"],wr={key:4,class:"json-node__comma"},Tr={key:0,class:"json-node__children"},_r={class:"json-node__children-content"},Br={class:"json-node__line json-node__closing-bracket"},Sr={class:"json-node__bracket"},Or={key:0,class:"json-node__comma"},kr={key:1,class:"json-node__primitive"},Rr=["contenteditable","onKeydown"],Ir={key:1,class:"json-node__colon"},Fr=["title"],Pr=["contenteditable","onKeydown"],Lr={key:0,class:"json-node__comma"},Vr=o.defineComponent({name:"JsonNode",__name:"JsonNode",props:{value:{},keyName:{},level:{},path:{default:""},expanded:{},isLast:{type:Boolean,default:!1},theme:{}},emits:["update:value","toggle-expand","copy","update:key"],setup(n,{emit:t}){o.useCssVars(g=>({"2a18b018":g.level,"58a14b93":g.theme.colors.syntaxKey,"46fe1b3e":g.theme.colors.hoverBackground,fbe2c048:g.theme.colors.syntaxBracket,"4bd524bb":g.theme.colors.collapsedText,"3308d23c":g.theme.colors.collapsedBackground,"36380c60":g.theme.colors.collapsedBackgroundHover,"0892365d":g.theme.colors.syntaxString,"0015b195":g.theme.colors.syntaxNumber,"7db95f5c":g.theme.colors.syntaxBoolean,"88ec825a":g.theme.colors.syntaxNull,"537157f7":g.theme.colors.background,"3cee3331":g.theme.colors.selectionBackground,"81323cee":g.theme.colors.indentLine}));const r=n,a=t,i=o.ref(!1),u=o.ref(!1),f=o.ref(""),x=o.ref(""),p=o.ref("string"),m=o.ref(null),_=o.ref(null),D=g=>g!==null&&typeof g=="object"&&!Array.isArray(g)&&"__protected_number__"in g&&Object.keys(g).length===1,U=g=>D(g)?g.__protected_number__:"",K=o.computed(()=>D(r.value)?!1:r.value!==null&&typeof r.value=="object"),J=o.computed(()=>Array.isArray(r.value)),ue=o.computed(()=>r.path?r.path:r.keyName?r.keyName:"root"),H=o.computed(()=>r.expanded.has(ue.value)),de=o.computed(()=>r.keyName),oe=o.computed(()=>J.value?"[":"{"),Q=o.computed(()=>J.value?"]":"}"),he=o.computed(()=>{if(!r.value)return"";const T=Object.keys(r.value).length;return J.value?T>0?` ${T} items `:" ":T>0?` ${T} keys `:" "}),ye=o.computed(()=>{const g=typeof r.value;return r.value===null?"json-node__value--null":g==="boolean"?"json-node__value--boolean":g==="number"||D(r.value)?"json-node__value--number":g==="string"?"json-node__value--string":""}),Z=o.computed(()=>r.value===null?"null":typeof r.value=="boolean"||typeof r.value=="number"?String(r.value):D(r.value)?U(r.value):typeof r.value=="string"?`"${r.value}"`:String(r.value)),N=o.computed(()=>"Double-click to edit"),$=g=>r.level===0?g:ue.value?`${ue.value}.${g}`:g,v=g=>{const T=Object.keys(r.value);return T.indexOf(g)===T.length-1},E=()=>{a("toggle-expand",ue.value)},P=()=>{r.level!==0&&(i.value=!0,f.value=r.keyName,o.nextTick(()=>{if(m.value){m.value.focus();const g=document.createRange();g.selectNodeContents(m.value);const T=window.getSelection();T?.removeAllRanges(),T?.addRange(g)}}))},O=()=>{K.value||(u.value=!0,r.value===null?p.value="null":D(r.value)?p.value="protected-number":typeof r.value=="string"?p.value="string":typeof r.value=="number"?p.value="number":typeof r.value=="boolean"&&(p.value="boolean"),D(r.value)?x.value=U(r.value):typeof r.value=="string"?x.value=r.value:x.value=String(r.value),o.nextTick(()=>{if(_.value){_.value.focus();const g=document.createRange();g.selectNodeContents(_.value);const T=window.getSelection();T?.removeAllRanges(),T?.addRange(g)}}))},S=()=>{if(r.level===0||!i.value)return;const g=m.value?.innerText.trim()||"";if(!g){ee();return}if(g===r.keyName){i.value=!1;return}i.value=!1,a("update:key",ue.value,g)},G=()=>{if(u.value)try{let g;const T=_.value?.innerText.trim()||"";if(p.value==="string")T==="null"?g=null:T==="true"||T==="false"?g=T==="true":g=T;else if(p.value==="protected-number")g={__protected_number__:T};else if(T==="null")g=null;else if(T==="true"||T==="false")g=T==="true";else if(!isNaN(Number(T))&&T!==""){const q=Number(T);!Number.isSafeInteger(q)||T.length>15?g={__protected_number__:T}:g=q}else g=T;a("update:value",ue.value,g),u.value=!1}catch(g){console.error("Failed to parse value:",g),u.value=!1}},ee=()=>{i.value=!1,f.value=r.keyName},te=()=>{u.value=!1,D(r.value)?x.value=U(r.value):typeof r.value=="string"?x.value=r.value:x.value=String(r.value)};return(g,T)=>{const q=o.resolveComponent("JsonNode",!0);return o.openBlock(),o.createElementBlock("div",br,[K.value?(o.openBlock(),o.createElementBlock("div",Ar,[o.createElementVNode("div",xr,[g.keyName?(o.openBlock(),o.createElementBlock("span",{key:0,class:"json-node__key",contenteditable:i.value,onDblclick:P,onKeydown:[o.withKeys(o.withModifiers(S,["prevent"]),["enter"]),o.withKeys(ee,["escape"])],onBlur:S,ref_key:"keyRef",ref:m,title:"Double-click to edit key"},o.toDisplayString(i.value?f.value:`"${de.value}"`),41,Nr)):o.createCommentVNode("",!0),g.keyName?(o.openBlock(),o.createElementBlock("span",Cr,": ")):o.createCommentVNode("",!0),o.createElementVNode("span",{class:"json-node__bracket json-node__bracket--clickable",onClick:E,title:H.value?"Click to collapse":"Click to expand"},o.toDisplayString(oe.value),9,Dr),H.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",{key:2,class:"json-node__collapsed-info",onClick:E,title:`Click to expand ${he.value.trim()}`},o.toDisplayString(he.value),9,vr)),H.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",{key:3,class:"json-node__bracket json-node__bracket--clickable",onClick:E,title:"Click to expand"},o.toDisplayString(Q.value),1)),!H.value&&!g.isLast?(o.openBlock(),o.createElementBlock("span",wr,",")):o.createCommentVNode("",!0)]),H.value?(o.openBlock(),o.createElementBlock("div",Tr,[o.createElementVNode("div",_r,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.value,(j,I)=>(o.openBlock(),o.createElementBlock("div",{key:I,class:"json-node__child"},[o.createVNode(q,{value:j,"key-name":J.value?"":String(I),level:g.level+1,path:$(String(I)),expanded:g.expanded,theme:g.theme,"onUpdate:value":T[0]||(T[0]=(re,C)=>g.$emit("update:value",re,C)),onToggleExpand:T[1]||(T[1]=re=>g.$emit("toggle-expand",re)),onCopy:T[2]||(T[2]=re=>g.$emit("copy",re)),"onUpdate:key":T[3]||(T[3]=(re,C)=>g.$emit("update:key",re,C)),"is-last":v(String(I))},null,8,["value","key-name","level","path","expanded","theme","is-last"])]))),128))]),o.createElementVNode("div",Br,[o.createElementVNode("span",Sr,o.toDisplayString(Q.value),1),g.isLast?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Or,","))])])):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",kr,[g.keyName?(o.openBlock(),o.createElementBlock("span",{key:0,class:"json-node__key",contenteditable:i.value,onDblclick:P,onKeydown:[o.withKeys(o.withModifiers(S,["prevent"]),["enter"]),o.withKeys(ee,["escape"])],onBlur:S,ref_key:"keyRef",ref:m,title:"Double-click to edit key"},o.toDisplayString(i.value?f.value:`"${de.value}"`),41,Rr)):o.createCommentVNode("",!0),g.keyName?(o.openBlock(),o.createElementBlock("span",Ir,": ")):o.createCommentVNode("",!0),o.createElementVNode("span",{class:o.normalizeClass(["json-node__value-wrapper",ye.value]),onDblclick:O,title:N.value},[o.createElementVNode("span",{class:"json-node__value",contenteditable:u.value,onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(te,["escape"])],onBlur:G,ref_key:"valueRef",ref:_},o.toDisplayString(u.value?x.value:Z.value),41,Pr),g.isLast?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Lr,","))],42,Fr)]))])}}}),ft=(n,t)=>{const r=n.__vccOpts||n;for(const[a,i]of t)r[a]=i;return r},$r=ft(Vr,[["__scopeId","data-v-1472a8af"]]),It={name:"github-light",colors:{background:"#ffffff",surfaceBackground:"#f6f8fa",border:"#d0d7de",text:"#24292f",textSecondary:"#656d76",buttonBackground:"#f6f8fa",buttonBackgroundHover:"#f3f4f6",buttonBorder:"#d0d7de",buttonText:"#24292f",buttonPrimary:"#2da44e",buttonPrimaryHover:"#2c974b",success:"#1a7f37",successBackground:"#dafbe1",error:"#cf222e",errorBackground:"#ffebe9",syntaxString:"#0a3069",syntaxNumber:"#0969da",syntaxBoolean:"#8250df",syntaxNull:"#656d76",syntaxKey:"#0969da",syntaxBracket:"#24292f",hoverBackground:"#f6f8fa",selectionBackground:"rgba(9, 105, 218, 0.2)",collapsedBackground:"#ddf4ff",collapsedBackgroundHover:"#b6e3ff",collapsedText:"#0969da",indentLine:"#d0d7de"}},Mr={"github-light":It,"github-dark":{name:"github-dark",colors:{background:"#0d1117",surfaceBackground:"#161b22",border:"#30363d",text:"#e6edf3",textSecondary:"#7d8590",buttonBackground:"#21262d",buttonBackgroundHover:"#30363d",buttonBorder:"#30363d",buttonText:"#e6edf3",buttonPrimary:"#238636",buttonPrimaryHover:"#2ea043",success:"#3fb950",successBackground:"#0f2419",error:"#f85149",errorBackground:"#381921",syntaxString:"#a5d6ff",syntaxNumber:"#79c0ff",syntaxBoolean:"#d2a8ff",syntaxNull:"#7d8590",syntaxKey:"#79c0ff",syntaxBracket:"#e6edf3",hoverBackground:"#161b22",selectionBackground:"rgba(121, 192, 255, 0.2)",collapsedBackground:"#1c2128",collapsedBackgroundHover:"#2d333b",collapsedText:"#79c0ff",indentLine:"#30363d"}},"min-light":{name:"min-light",colors:{background:"#ffffff",surfaceBackground:"#fafafa",border:"#e5e5e5",text:"#333333",textSecondary:"#888888",buttonBackground:"#f8f8f8",buttonBackgroundHover:"#eeeeee",buttonBorder:"#e0e0e0",buttonText:"#333333",buttonPrimary:"#007acc",buttonPrimaryHover:"#005a9e",success:"#22c55e",successBackground:"#f0fdf4",error:"#ef4444",errorBackground:"#fef2f2",syntaxString:"#22c55e",syntaxNumber:"#3b82f6",syntaxBoolean:"#8b5cf6",syntaxNull:"#6b7280",syntaxKey:"#1f2937",syntaxBracket:"#374151",hoverBackground:"#f9f9f9",selectionBackground:"rgba(59, 130, 246, 0.2)",collapsedBackground:"#e0f2fe",collapsedBackgroundHover:"#bae6fd",collapsedText:"#0284c7",indentLine:"#e5e7eb"}},"slack-ochin":{name:"slack-ochin",colors:{background:"#fefbf6",surfaceBackground:"#faf6f0",border:"#e8d5b7",text:"#4a3b2a",textSecondary:"#8b7355",buttonBackground:"#f4ede4",buttonBackgroundHover:"#efe5d8",buttonBorder:"#e8d5b7",buttonText:"#4a3b2a",buttonPrimary:"#ff6b35",buttonPrimaryHover:"#e55a2b",success:"#ff9500",successBackground:"#fff8f0",error:"#d73502",errorBackground:"#ffeee8",syntaxString:"#d73502",syntaxNumber:"#ff6b35",syntaxBoolean:"#b7472a",syntaxNull:"#8b7355",syntaxKey:"#4a3b2a",syntaxBracket:"#6b5444",hoverBackground:"#f8f2eb",selectionBackground:"rgba(255, 107, 53, 0.2)",collapsedBackground:"#ffe8d6",collapsedBackgroundHover:"#ffd4b0",collapsedText:"#d73502",indentLine:"#e8d5b7"}}};function qr(n="github-light"){return Mr[n]||It}const Ur={key:0,class:"json-format__toolbar"},Hr={class:"json-format__actions"},jr=["disabled"],Kr=["disabled"],Gr=["disabled"],Xr=["disabled"],zr={class:"json-format__info"},Wr={key:0,class:"json-format__status json-format__status--success"},Yr={key:1,class:"json-format__status json-format__status--error"},Qr={class:"json-format__content"},Zr={key:0,class:"json-format__error"},Jr={key:1,class:"json-format__error"},en={key:2,class:"json-format__viewer"},Ft=ft(o.defineComponent({name:"JsonFormat",__name:"index",props:{modelValue:{default:""},readonly:{type:Boolean,default:!1},maxDepth:{default:10},showToolbar:{type:Boolean,default:!0},theme:{default:"github-light"}},emits:["update:modelValue","copy-success","copy-error","expand-all","collapse-all","compress"],setup(n,{expose:t,emit:r}){o.useCssVars(C=>({"4782cf12":U.value.colors.border,"35b95bf9":U.value.colors.background,cda9ff90:U.value.colors.text,"41368ee0":U.value.colors.surfaceBackground,"47674bee":U.value.colors.buttonBorder,"0f08048b":U.value.colors.buttonBackground,cb00036c:U.value.colors.buttonText,"4a92191e":U.value.colors.buttonBackgroundHover,d30c3876:U.value.colors.buttonPrimary,"3d918877":U.value.colors.buttonPrimaryHover,"4f985866":U.value.colors.successBackground,"3847a518":U.value.colors.success,"28f0996b":U.value.colors.errorBackground,e9310f46:U.value.colors.error}));const a=n,i=r,u=o.ref(null),f=o.ref(""),x=o.ref(new Set),p=o.ref(null),m=o.ref(""),_=o.ref(!1),D=o.computed(()=>f.value===""),U=o.computed(()=>qr(a.theme)),K=C=>{if(C==null)return C;if(Array.isArray(C))return C.map(B=>K(B));if(typeof C=="object"){const B={},L=Object.keys(C).sort();for(const X of L)B[X]=K(C[X]);return B}return C},J=o.computed(()=>{const C=p.value!==null?p.value:u.value;return!C||!_.value?C:K(C)}),ue=o.computed(()=>m.value?null:J.value),H=C=>{if(!C.trim()){u.value=null,f.value="",p.value=null,m.value="";return}try{let B=C;const L=/(:\s*|,\s*|\[\s*)-?\d{16,}/.test(B),X=/(:\s*|,\s*|\[\s*)-?\d+\.\d*0+\s*[,}\]\s]*/.test(B);if(!L&&!X)try{u.value=JSON.parse(B),f.value="",p.value=null,m.value="",o.nextTick(()=>{ue.value!==null&&O()});return}catch{}B=(F=>{let Y="",ge=!1,Ee=!1,Te=0;for(;Te<F.length;){const ke=F[Te];if(ge)Ee?Ee=!1:ke==="\\"?Ee=!0:ke==='"'&&(ge=!1),Y+=ke,Te++;else if(ke==='"')ge=!0,Y+=ke,Te++;else{const De=F.slice(Te);let W=De.match(/^([:,\[\s]*)(-?\d{16,})(\s*[,\}\]\s]|$)/);if(W){Y+=W[1]+'{"__protected_number__":"'+W[2]+'"}'+W[3],Te+=W[0].length;continue}if(W=De.match(/^([:,\[\s]*)(-?\d+\.\d*0+)(\s*[,\}\]\s]|$)/),W){Y+=W[1]+'{"__protected_number__":"'+W[2]+'"}'+W[3],Te+=W[0].length;continue}Y+=ke,Te++}}return Y})(B),u.value=JSON.parse(B),f.value="",p.value=null,m.value="",o.nextTick(()=>{ue.value!==null&&O()})}catch(B){f.value=B instanceof Error?B.message:"Unknown parsing error",u.value=null,p.value=null,m.value=""}},de=C=>{if(!C||!C.expression.trim()){ye();return}if(!u.value){m.value="No valid JSON data to filter";return}try{let B;if(C.type==="jsonpath")B=we({path:C.expression,json:u.value}),B.length===1&&C.expression.includes("$[")===!1&&!C.expression.endsWith("[*]")?p.value=B[0]:p.value=B;else if(C.type==="js"){const{proxyData:L,indexMap:X}=oe(u.value),F=new Function("$",`
1
+ (function(We,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(We=typeof globalThis<"u"?globalThis:We||self,o(We.LoneFormat={},We.Vue))})(this,function(We,o){"use strict";class ir{add(t,r,a){if(typeof arguments[0]!="string")for(let i in arguments[0])this.add(i,arguments[0][i],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(i){this[i]=this[i]||[],r&&this[i][a?"unshift":"push"](r)},this)}run(t,r){this[t]=this[t]||[],this[t].forEach(function(a){a.call(r&&r.context?r.context:r,r)})}}class ar{constructor(t){this.jsep=t,this.registered={}}register(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];r.forEach(i=>{if(typeof i!="object"||!i.name||!i.init)throw new Error("Invalid JSEP plugin format");this.registered[i.name]||(i.init(this.jsep),this.registered[i.name]=i)})}}class M{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+M.version}static addUnaryOp(t){return M.max_unop_len=Math.max(t.length,M.max_unop_len),M.unary_ops[t]=1,M}static addBinaryOp(t,r,a){return M.max_binop_len=Math.max(t.length,M.max_binop_len),M.binary_ops[t]=r,a?M.right_associative.add(t):M.right_associative.delete(t),M}static addIdentifierChar(t){return M.additional_identifier_chars.add(t),M}static addLiteral(t,r){return M.literals[t]=r,M}static removeUnaryOp(t){return delete M.unary_ops[t],t.length===M.max_unop_len&&(M.max_unop_len=M.getMaxKeyLen(M.unary_ops)),M}static removeAllUnaryOps(){return M.unary_ops={},M.max_unop_len=0,M}static removeIdentifierChar(t){return M.additional_identifier_chars.delete(t),M}static removeBinaryOp(t){return delete M.binary_ops[t],t.length===M.max_binop_len&&(M.max_binop_len=M.getMaxKeyLen(M.binary_ops)),M.right_associative.delete(t),M}static removeAllBinaryOps(){return M.binary_ops={},M.max_binop_len=0,M}static removeLiteral(t){return delete M.literals[t],M}static removeAllLiterals(){return M.literals={},M}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new M(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(r=>r.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return M.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!M.binary_ops[String.fromCharCode(t)]||M.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return M.isIdentifierStart(t)||M.isDecimalDigit(t)}throwError(t){const r=new Error(t+" at character "+this.index);throw r.index=this.index,r.description=t,r}runHook(t,r){if(M.hooks[t]){const a={context:this,node:r};return M.hooks.run(t,a),a.node}return r}searchHook(t){if(M.hooks[t]){const r={context:this};return M.hooks[t].find(function(a){return a.call(r.context,r),r.node}),r.node}}gobbleSpaces(){let t=this.code;for(;t===M.SPACE_CODE||t===M.TAB_CODE||t===M.LF_CODE||t===M.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const t=this.gobbleExpressions(),r=t.length===1?t[0]:{type:M.COMPOUND,body:t};return this.runHook("after-all",r)}gobbleExpressions(t){let r=[],a,i;for(;this.index<this.expr.length;)if(a=this.code,a===M.SEMCOL_CODE||a===M.COMMA_CODE)this.index++;else if(i=this.gobbleExpression())r.push(i);else if(this.index<this.expr.length){if(a===t)break;this.throwError('Unexpected "'+this.char+'"')}return r}gobbleExpression(){const t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,M.max_binop_len),r=t.length;for(;r>0;){if(M.binary_ops.hasOwnProperty(t)&&(!M.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!M.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=r,t;t=t.substr(0,--r)}return!1}gobbleBinaryExpression(){let t,r,a,i,u,f,x,p,m;if(f=this.gobbleToken(),!f||(r=this.gobbleBinaryOp(),!r))return f;for(u={value:r,prec:M.binaryPrecedence(r),right_a:M.right_associative.has(r)},x=this.gobbleToken(),x||this.throwError("Expected expression after "+r),i=[f,u,x];r=this.gobbleBinaryOp();){if(a=M.binaryPrecedence(r),a===0){this.index-=r.length;break}u={value:r,prec:a,right_a:M.right_associative.has(r)},m=r;const S=v=>u.right_a&&v.right_a?a>v.prec:a<=v.prec;for(;i.length>2&&S(i[i.length-2]);)x=i.pop(),r=i.pop().value,f=i.pop(),t={type:M.BINARY_EXP,operator:r,left:f,right:x},i.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+m),i.push(u,t)}for(p=i.length-1,t=i[p];p>1;)t={type:M.BINARY_EXP,operator:i[p-1].value,left:i[p-2],right:t},p-=2;return t}gobbleToken(){let t,r,a,i;if(this.gobbleSpaces(),i=this.searchHook("gobble-token"),i)return this.runHook("after-token",i);if(t=this.code,M.isDecimalDigit(t)||t===M.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===M.SQUOTE_CODE||t===M.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(t===M.OBRACK_CODE)i=this.gobbleArray();else{for(r=this.expr.substr(this.index,M.max_unop_len),a=r.length;a>0;){if(M.unary_ops.hasOwnProperty(r)&&(!M.isIdentifierStart(this.code)||this.index+r.length<this.expr.length&&!M.isIdentifierPart(this.expr.charCodeAt(this.index+r.length)))){this.index+=a;const u=this.gobbleToken();return u||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:M.UNARY_EXP,operator:r,argument:u,prefix:!0})}r=r.substr(0,--a)}M.isIdentifierStart(t)?(i=this.gobbleIdentifier(),M.literals.hasOwnProperty(i.name)?i={type:M.LITERAL,value:M.literals[i.name],raw:i.name}:i.name===M.this_str&&(i={type:M.THIS_EXP})):t===M.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook("after-token",i)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let r=this.code;for(;r===M.PERIOD_CODE||r===M.OBRACK_CODE||r===M.OPAREN_CODE||r===M.QUMARK_CODE;){let a;if(r===M.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==M.PERIOD_CODE)break;a=!0,this.index+=2,this.gobbleSpaces(),r=this.code}this.index++,r===M.OBRACK_CODE?(t={type:M.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),r=this.code,r!==M.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):r===M.OPAREN_CODE?t={type:M.CALL_EXP,arguments:this.gobbleArguments(M.CPAREN_CODE),callee:t}:(r===M.PERIOD_CODE||a)&&(a&&this.index--,this.gobbleSpaces(),t={type:M.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),a&&(t.optional=!0),this.gobbleSpaces(),r=this.code}return t}gobbleNumericLiteral(){let t="",r,a;for(;M.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===M.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);M.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(r=this.char,r==="e"||r==="E"){for(t+=this.expr.charAt(this.index++),r=this.char,(r==="+"||r==="-")&&(t+=this.expr.charAt(this.index++));M.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);M.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+t+this.char+")")}return a=this.code,M.isIdentifierStart(a)?this.throwError("Variable names cannot start with a number ("+t+this.char+")"):(a===M.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===M.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:M.LITERAL,value:parseFloat(t),raw:t}}gobbleStringLiteral(){let t="";const r=this.index,a=this.expr.charAt(this.index++);let i=!1;for(;this.index<this.expr.length;){let u=this.expr.charAt(this.index++);if(u===a){i=!0;break}else if(u==="\\")switch(u=this.expr.charAt(this.index++),u){case"n":t+=`
2
+ `;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=u}else t+=u}return i||this.throwError('Unclosed quote after "'+t+'"'),{type:M.LITERAL,value:t,raw:this.expr.substring(r,this.index)}}gobbleIdentifier(){let t=this.code,r=this.index;for(M.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,M.isIdentifierPart(t));)this.index++;return{type:M.IDENTIFIER,name:this.expr.slice(r,this.index)}}gobbleArguments(t){const r=[];let a=!1,i=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let u=this.code;if(u===t){a=!0,this.index++,t===M.CPAREN_CODE&&i&&i>=r.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(u===M.COMMA_CODE){if(this.index++,i++,i!==r.length){if(t===M.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===M.CBRACK_CODE)for(let f=r.length;f<i;f++)r.push(null)}}else if(r.length!==i&&i!==0)this.throwError("Expected comma");else{const f=this.gobbleExpression();(!f||f.type===M.COMPOUND)&&this.throwError("Expected comma"),r.push(f)}}return a||this.throwError("Expected "+String.fromCharCode(t)),r}gobbleGroup(){this.index++;let t=this.gobbleExpressions(M.CPAREN_CODE);if(this.code===M.CPAREN_CODE)return this.index++,t.length===1?t[0]:t.length?{type:M.SEQUENCE_EXP,expressions:t}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:M.ARRAY_EXP,elements:this.gobbleArguments(M.CBRACK_CODE)}}}const ur=new ir;Object.assign(M,{hooks:ur,plugins:new ar(M),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),M.max_unop_len=M.getMaxKeyLen(M.unary_ops),M.max_binop_len=M.getMaxKeyLen(M.binary_ops);const Ze=n=>new M(n).parse(),lr=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(M).filter(n=>!lr.includes(n)&&Ze[n]===void 0).forEach(n=>{Ze[n]=M[n]}),Ze.Jsep=M;const cr="ConditionalExpression";var fr={name:"ternary",init(n){n.hooks.add("after-expression",function(r){if(r.node&&this.code===n.QUMARK_CODE){this.index++;const a=r.node,i=this.gobbleExpression();if(i||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===n.COLON_CODE){this.index++;const u=this.gobbleExpression();if(u||this.throwError("Expected expression"),r.node={type:cr,test:a,consequent:i,alternate:u},a.operator&&n.binary_ops[a.operator]<=.9){let f=a;for(;f.right.operator&&n.binary_ops[f.right.operator]<=.9;)f=f.right;r.node.test=f.right,f.right=r.node,r.node=a}}else this.throwError("Expected :")}})}};Ze.plugins.register(fr);const Rt=47,dr=92;var pr={name:"regex",init(n){n.hooks.add("gobble-token",function(r){if(this.code===Rt){const a=++this.index;let i=!1;for(;this.index<this.expr.length;){if(this.code===Rt&&!i){const u=this.expr.slice(a,this.index);let f="";for(;++this.index<this.expr.length;){const p=this.code;if(p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57)f+=this.char;else break}let x;try{x=new RegExp(u,f)}catch(p){this.throwError(p.message)}return r.node={type:n.LITERAL,value:x,raw:this.expr.slice(a-1,this.index)},r.node=this.gobbleTokenProperty(r.node),r.node}this.code===n.OBRACK_CODE?i=!0:i&&this.code===n.CBRACK_CODE&&(i=!1),this.index+=this.code===dr?2:1}this.throwError("Unclosed Regex")}})}};const Ct=43,ct={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|=","||=","&&=","??="]),updateOperators:[Ct,45],assignmentPrecedence:.9,init(n){const t=[n.IDENTIFIER,n.MEMBER_EXP];ct.assignmentOperators.forEach(a=>n.addBinaryOp(a,ct.assignmentPrecedence,!0)),n.hooks.add("gobble-token",function(i){const u=this.code;ct.updateOperators.some(f=>f===u&&f===this.expr.charCodeAt(this.index+1))&&(this.index+=2,i.node={type:"UpdateExpression",operator:u===Ct?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},(!i.node.argument||!t.includes(i.node.argument.type))&&this.throwError(`Unexpected ${i.node.operator}`))}),n.hooks.add("after-token",function(i){if(i.node){const u=this.code;ct.updateOperators.some(f=>f===u&&f===this.expr.charCodeAt(this.index+1))&&(t.includes(i.node.type)||this.throwError(`Unexpected ${i.node.operator}`),this.index+=2,i.node={type:"UpdateExpression",operator:u===Ct?"++":"--",argument:i.node,prefix:!1})}}),n.hooks.add("after-expression",function(i){i.node&&r(i.node)});function r(a){ct.assignmentOperators.has(a.operator)?(a.type="AssignmentExpression",r(a.left),r(a.right)):a.operator||Object.values(a).forEach(i=>{i&&typeof i=="object"&&r(i)})}}};Ze.plugins.register(pr,ct),Ze.addUnaryOp("typeof"),Ze.addLiteral("null",null),Ze.addLiteral("undefined",void 0);const hr=new Set(["constructor","__proto__","__defineGetter__","__defineSetter__"]),_e={evalAst(n,t){switch(n.type){case"BinaryExpression":case"LogicalExpression":return _e.evalBinaryExpression(n,t);case"Compound":return _e.evalCompound(n,t);case"ConditionalExpression":return _e.evalConditionalExpression(n,t);case"Identifier":return _e.evalIdentifier(n,t);case"Literal":return _e.evalLiteral(n,t);case"MemberExpression":return _e.evalMemberExpression(n,t);case"UnaryExpression":return _e.evalUnaryExpression(n,t);case"ArrayExpression":return _e.evalArrayExpression(n,t);case"CallExpression":return _e.evalCallExpression(n,t);case"AssignmentExpression":return _e.evalAssignmentExpression(n,t);default:throw SyntaxError("Unexpected expression",n)}},evalBinaryExpression(n,t){return{"||":(a,i)=>a||i(),"&&":(a,i)=>a&&i(),"|":(a,i)=>a|i(),"^":(a,i)=>a^i(),"&":(a,i)=>a&i(),"==":(a,i)=>a==i(),"!=":(a,i)=>a!=i(),"===":(a,i)=>a===i(),"!==":(a,i)=>a!==i(),"<":(a,i)=>a<i(),">":(a,i)=>a>i(),"<=":(a,i)=>a<=i(),">=":(a,i)=>a>=i(),"<<":(a,i)=>a<<i(),">>":(a,i)=>a>>i(),">>>":(a,i)=>a>>>i(),"+":(a,i)=>a+i(),"-":(a,i)=>a-i(),"*":(a,i)=>a*i(),"/":(a,i)=>a/i(),"%":(a,i)=>a%i()}[n.operator](_e.evalAst(n.left,t),()=>_e.evalAst(n.right,t))},evalCompound(n,t){let r;for(let a=0;a<n.body.length;a++){n.body[a].type==="Identifier"&&["var","let","const"].includes(n.body[a].name)&&n.body[a+1]&&n.body[a+1].type==="AssignmentExpression"&&(a+=1);const i=n.body[a];r=_e.evalAst(i,t)}return r},evalConditionalExpression(n,t){return _e.evalAst(n.test,t)?_e.evalAst(n.consequent,t):_e.evalAst(n.alternate,t)},evalIdentifier(n,t){if(Object.hasOwn(t,n.name))return t[n.name];throw ReferenceError(`${n.name} is not defined`)},evalLiteral(n){return n.value},evalMemberExpression(n,t){const r=String(n.computed?_e.evalAst(n.property):n.property.name),a=_e.evalAst(n.object,t);if(a==null)throw TypeError(`Cannot read properties of ${a} (reading '${r}')`);if(!Object.hasOwn(a,r)&&hr.has(r))throw TypeError(`Cannot read properties of ${a} (reading '${r}')`);const i=a[r];return typeof i=="function"?i.bind(a):i},evalUnaryExpression(n,t){return{"-":a=>-_e.evalAst(a,t),"!":a=>!_e.evalAst(a,t),"~":a=>~_e.evalAst(a,t),"+":a=>+_e.evalAst(a,t),typeof:a=>typeof _e.evalAst(a,t)}[n.operator](n.argument)},evalArrayExpression(n,t){return n.elements.map(r=>_e.evalAst(r,t))},evalCallExpression(n,t){const r=n.arguments.map(i=>_e.evalAst(i,t));return _e.evalAst(n.callee,t)(...r)},evalAssignmentExpression(n,t){if(n.left.type!=="Identifier")throw SyntaxError("Invalid left-hand side in assignment");const r=n.left.name,a=_e.evalAst(n.right,t);return t[r]=a,t[r]}};class mr{constructor(t){this.code=t,this.ast=Ze(this.code)}runInNewContext(t){const r=Object.assign(Object.create(null),t);return _e.evalAst(this.ast,r)}}function rt(n,t){return n=n.slice(),n.push(t),n}function Dt(n,t){return t=t.slice(),t.unshift(n),t}class gr extends Error{constructor(t){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=t,this.name="NewError"}}function we(n,t,r,a,i){if(!(this instanceof we))try{return new we(n,t,r,a,i)}catch(f){if(!f.avoidNew)throw f;return f.value}typeof n=="string"&&(i=a,a=r,r=t,t=n,n=null);const u=n&&typeof n=="object";if(n=n||{},this.json=n.json||r,this.path=n.path||t,this.resultType=n.resultType||"value",this.flatten=n.flatten||!1,this.wrap=Object.hasOwn(n,"wrap")?n.wrap:!0,this.sandbox=n.sandbox||{},this.eval=n.eval===void 0?"safe":n.eval,this.ignoreEvalErrors=typeof n.ignoreEvalErrors>"u"?!1:n.ignoreEvalErrors,this.parent=n.parent||null,this.parentProperty=n.parentProperty||null,this.callback=n.callback||a||null,this.otherTypeCallback=n.otherTypeCallback||i||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},n.autostart!==!1){const f={path:u?n.path:t};u?"json"in n&&(f.json=n.json):f.json=r;const x=this.evaluate(f);if(!x||typeof x!="object")throw new gr(x);return x}}we.prototype.evaluate=function(n,t,r,a){let i=this.parent,u=this.parentProperty,{flatten:f,wrap:x}=this;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=a||this.otherTypeCallback,t=t||this.json,n=n||this.path,n&&typeof n=="object"&&!Array.isArray(n)){if(!n.path&&n.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!Object.hasOwn(n,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:t}=n),f=Object.hasOwn(n,"flatten")?n.flatten:f,this.currResultType=Object.hasOwn(n,"resultType")?n.resultType:this.currResultType,this.currSandbox=Object.hasOwn(n,"sandbox")?n.sandbox:this.currSandbox,x=Object.hasOwn(n,"wrap")?n.wrap:x,this.currEval=Object.hasOwn(n,"eval")?n.eval:this.currEval,r=Object.hasOwn(n,"callback")?n.callback:r,this.currOtherTypeCallback=Object.hasOwn(n,"otherTypeCallback")?n.otherTypeCallback:this.currOtherTypeCallback,i=Object.hasOwn(n,"parent")?n.parent:i,u=Object.hasOwn(n,"parentProperty")?n.parentProperty:u,n=n.path}if(i=i||null,u=u||null,Array.isArray(n)&&(n=we.toPathString(n)),!n&&n!==""||!t)return;const p=we.toPathArray(n);p[0]==="$"&&p.length>1&&p.shift(),this._hasParentSelector=null;const m=this._trace(p,t,["$"],i,u,r).filter(function(S){return S&&!S.isParentSelector});return m.length?!x&&m.length===1&&!m[0].hasArrExpr?this._getPreferredOutput(m[0]):m.reduce((S,v)=>{const U=this._getPreferredOutput(v);return f&&Array.isArray(U)?S=S.concat(U):S.push(U),S},[]):x?[]:void 0},we.prototype._getPreferredOutput=function(n){const t=this.currResultType;switch(t){case"all":{const r=Array.isArray(n.path)?n.path:we.toPathArray(n.path);return n.pointer=we.toPointer(r),n.path=typeof n.path=="string"?n.path:we.toPathString(n.path),n}case"value":case"parent":case"parentProperty":return n[t];case"path":return we.toPathString(n[t]);case"pointer":return we.toPointer(n.path);default:throw new TypeError("Unknown result type")}},we.prototype._handleCallback=function(n,t,r){if(t){const a=this._getPreferredOutput(n);n.path=typeof n.path=="string"?n.path:we.toPathString(n.path),t(a,r,n)}},we.prototype._trace=function(n,t,r,a,i,u,f,x){let p;if(!n.length)return p={path:r,value:t,parent:a,parentProperty:i,hasArrExpr:f},this._handleCallback(p,u,"value"),p;const m=n[0],S=n.slice(1),v=[];function U(K){Array.isArray(K)?K.forEach(Y=>{v.push(Y)}):v.push(K)}if((typeof m!="string"||x)&&t&&Object.hasOwn(t,m))U(this._trace(S,t[m],rt(r,m),t,m,u,f));else if(m==="*")this._walk(t,K=>{U(this._trace(S,t[K],rt(r,K),t,K,u,!0,!0))});else if(m==="..")U(this._trace(S,t,r,a,i,u,f)),this._walk(t,K=>{typeof t[K]=="object"&&U(this._trace(n.slice(),t[K],rt(r,K),t,K,u,!0))});else{if(m==="^")return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:S,isParentSelector:!0};if(m==="~")return p={path:rt(r,m),value:i,parent:a,parentProperty:null},this._handleCallback(p,u,"property"),p;if(m==="$")U(this._trace(S,t,r,null,null,u,f));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(m))U(this._slice(m,S,t,r,a,i,u));else if(m.indexOf("?(")===0){if(this.currEval===!1)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");const K=m.replace(/^\?\((.*?)\)$/u,"$1"),Y=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(K);Y?this._walk(t,ae=>{const H=[Y[2]],de=Y[1]?t[ae][Y[1]]:t[ae];this._trace(H,de,r,a,i,u,!0).length>0&&U(this._trace(S,t[ae],rt(r,ae),t,ae,u,!0))}):this._walk(t,ae=>{this._eval(K,t[ae],ae,r,a,i)&&U(this._trace(S,t[ae],rt(r,ae),t,ae,u,!0))})}else if(m[0]==="("){if(this.currEval===!1)throw new Error("Eval [(expr)] prevented in JSONPath expression.");U(this._trace(Dt(this._eval(m,t,r.at(-1),r.slice(0,-1),a,i),S),t,r,a,i,u,f))}else if(m[0]==="@"){let K=!1;const Y=m.slice(1,-2);switch(Y){case"scalar":(!t||!["object","function"].includes(typeof t))&&(K=!0);break;case"boolean":case"string":case"undefined":case"function":typeof t===Y&&(K=!0);break;case"integer":Number.isFinite(t)&&!(t%1)&&(K=!0);break;case"number":Number.isFinite(t)&&(K=!0);break;case"nonFinite":typeof t=="number"&&!Number.isFinite(t)&&(K=!0);break;case"object":t&&typeof t===Y&&(K=!0);break;case"array":Array.isArray(t)&&(K=!0);break;case"other":K=this.currOtherTypeCallback(t,r,a,i);break;case"null":t===null&&(K=!0);break;default:throw new TypeError("Unknown value type "+Y)}if(K)return p={path:r,value:t,parent:a,parentProperty:i},this._handleCallback(p,u,"value"),p}else if(m[0]==="`"&&t&&Object.hasOwn(t,m.slice(1))){const K=m.slice(1);U(this._trace(S,t[K],rt(r,K),t,K,u,f,!0))}else if(m.includes(",")){const K=m.split(",");for(const Y of K)U(this._trace(Dt(Y,S),t,r,a,i,u,!0))}else!x&&t&&Object.hasOwn(t,m)&&U(this._trace(S,t[m],rt(r,m),t,m,u,f,!0))}if(this._hasParentSelector)for(let K=0;K<v.length;K++){const Y=v[K];if(Y&&Y.isParentSelector){const ae=this._trace(Y.expr,t,Y.path,a,i,u,f);if(Array.isArray(ae)){v[K]=ae[0];const H=ae.length;for(let de=1;de<H;de++)K++,v.splice(K,0,ae[de])}else v[K]=ae}}return v},we.prototype._walk=function(n,t){if(Array.isArray(n)){const r=n.length;for(let a=0;a<r;a++)t(a)}else n&&typeof n=="object"&&Object.keys(n).forEach(r=>{t(r)})},we.prototype._slice=function(n,t,r,a,i,u,f){if(!Array.isArray(r))return;const x=r.length,p=n.split(":"),m=p[2]&&Number.parseInt(p[2])||1;let S=p[0]&&Number.parseInt(p[0])||0,v=p[1]&&Number.parseInt(p[1])||x;S=S<0?Math.max(0,S+x):Math.min(x,S),v=v<0?Math.max(0,v+x):Math.min(x,v);const U=[];for(let K=S;K<v;K+=m)this._trace(Dt(K,t),r,a,i,u,f,!0).forEach(ae=>{U.push(ae)});return U},we.prototype._eval=function(n,t,r,a,i,u){this.currSandbox._$_parentProperty=u,this.currSandbox._$_parent=i,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=t;const f=n.includes("@path");f&&(this.currSandbox._$_path=we.toPathString(a.concat([r])));const x=this.currEval+"Script:"+n;if(!we.cache[x]){let p=n.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");if(f&&(p=p.replaceAll("@path","_$_path")),this.currEval==="safe"||this.currEval===!0||this.currEval===void 0)we.cache[x]=new this.safeVm.Script(p);else if(this.currEval==="native")we.cache[x]=new this.vm.Script(p);else if(typeof this.currEval=="function"&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,"runInNewContext")){const m=this.currEval;we.cache[x]=new m(p)}else if(typeof this.currEval=="function")we.cache[x]={runInNewContext:m=>this.currEval(p,m)};else throw new TypeError(`Unknown "eval" property "${this.currEval}"`)}try{return we.cache[x].runInNewContext(this.currSandbox)}catch(p){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+p.message+": "+n)}},we.cache={},we.toPathString=function(n){const t=n,r=t.length;let a="$";for(let i=1;i<r;i++)/^(~|\^|@.*?\(\))$/u.test(t[i])||(a+=/^[0-9*]+$/u.test(t[i])?"["+t[i]+"]":"['"+t[i]+"']");return a},we.toPointer=function(n){const t=n,r=t.length;let a="";for(let i=1;i<r;i++)/^(~|\^|@.*?\(\))$/u.test(t[i])||(a+="/"+t[i].toString().replaceAll("~","~0").replaceAll("/","~1"));return a},we.toPathArray=function(n){const{cache:t}=we;if(t[n])return t[n].concat();const r=[],i=n.replaceAll(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu,";$&;").replaceAll(/[['](\??\(.*?\))[\]'](?!.\])/gu,function(u,f){return"[#"+(r.push(f)-1)+"]"}).replaceAll(/\[['"]([^'\]]*)['"]\]/gu,function(u,f){return"['"+f.replaceAll(".","%@%").replaceAll("~","%%@@%%")+"']"}).replaceAll("~",";~;").replaceAll(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu,";").replaceAll("%@%",".").replaceAll("%%@@%%","~").replaceAll(/(?:;)?(\^+)(?:;)?/gu,function(u,f){return";"+f.split("").join(";")+";"}).replaceAll(/;;;|;;/gu,";..;").replaceAll(/;$|'?\]|'$/gu,"").split(";").map(function(u){const f=u.match(/#(\d+)/u);return!f||!f[1]?u:r[f[1]]});return t[n]=i,t[n].concat()},we.prototype.safeVm={Script:mr};const Er=function(n,t,r){const a=n.length;for(let i=0;i<a;i++){const u=n[i];r(u)&&t.push(n.splice(i--,1)[0])}};class yr{constructor(t){this.code=t}runInNewContext(t){let r=this.code;const a=Object.keys(t),i=[];Er(a,i,m=>typeof t[m]=="function");const u=a.map(m=>t[m]);r=i.reduce((m,S)=>{let v=t[S].toString();return/function/u.test(v)||(v="function "+v),"var "+S+"="+v+";"+m},"")+r,!/(['"])use strict\1/u.test(r)&&!a.includes("arguments")&&(r="var arguments = undefined;"+r),r=r.replace(/;\s*$/u,"");const x=r.lastIndexOf(";"),p=x!==-1?r.slice(0,x+1)+" return "+r.slice(x+1):" return "+r;return new Function(...a,p)(...u)}}we.prototype.vm={Script:yr};const br={class:"json-node"},Ar={key:0,class:"json-node__container"},xr={class:"json-node__line"},Nr=["contenteditable","onKeydown"],Cr={key:1,class:"json-node__colon"},Dr=["title"],vr=["title"],wr={key:4,class:"json-node__comma"},Tr={key:0,class:"json-node__children"},_r={class:"json-node__children-content"},Br={class:"json-node__line json-node__closing-bracket"},Sr={class:"json-node__bracket"},Or={key:0,class:"json-node__comma"},kr={key:1,class:"json-node__primitive"},Rr=["contenteditable","onKeydown"],Ir={key:1,class:"json-node__colon"},Fr=["title"],Pr=["contenteditable","onKeydown"],Lr={key:0,class:"json-node__comma"},Vr=o.defineComponent({name:"JsonNode",__name:"JsonNode",props:{value:{},keyName:{},level:{},path:{default:""},expanded:{},isLast:{type:Boolean,default:!1},theme:{}},emits:["update:value","toggle-expand","copy","update:key"],setup(n,{emit:t}){o.useCssVars(g=>({"2a18b018":g.level,"58a14b93":g.theme.colors.syntaxKey,"46fe1b3e":g.theme.colors.hoverBackground,fbe2c048:g.theme.colors.syntaxBracket,"4bd524bb":g.theme.colors.collapsedText,"3308d23c":g.theme.colors.collapsedBackground,"36380c60":g.theme.colors.collapsedBackgroundHover,"0892365d":g.theme.colors.syntaxString,"0015b195":g.theme.colors.syntaxNumber,"7db95f5c":g.theme.colors.syntaxBoolean,"88ec825a":g.theme.colors.syntaxNull,"537157f7":g.theme.colors.background,"3cee3331":g.theme.colors.selectionBackground,"81323cee":g.theme.colors.indentLine}));const r=n,a=t,i=o.ref(!1),u=o.ref(!1),f=o.ref(""),x=o.ref(""),p=o.ref("string"),m=o.ref(null),S=o.ref(null),v=g=>g!==null&&typeof g=="object"&&!Array.isArray(g)&&"__protected_number__"in g&&Object.keys(g).length===1,U=g=>v(g)?g.__protected_number__:"",K=o.computed(()=>v(r.value)?!1:r.value!==null&&typeof r.value=="object"),Y=o.computed(()=>Array.isArray(r.value)),ae=o.computed(()=>r.path?r.path:r.keyName?r.keyName:"root"),H=o.computed(()=>r.expanded.has(ae.value)),de=o.computed(()=>r.keyName),re=o.computed(()=>Y.value?"[":"{"),z=o.computed(()=>Y.value?"]":"}"),me=o.computed(()=>{if(!r.value)return"";const C=Object.keys(r.value).length;return Y.value?C>0?` ${C} items `:" ":C>0?` ${C} keys `:" "}),be=o.computed(()=>{const g=typeof r.value;return r.value===null?"json-node__value--null":g==="boolean"?"json-node__value--boolean":g==="number"||v(r.value)?"json-node__value--number":g==="string"?"json-node__value--string":""}),J=o.computed(()=>r.value===null?"null":typeof r.value=="boolean"||typeof r.value=="number"?String(r.value):v(r.value)?U(r.value):typeof r.value=="string"?`"${r.value}"`:String(r.value)),N=o.computed(()=>"Double-click to edit"),le=g=>r.level===0?g:ae.value?`${ae.value}.${g}`:g,w=g=>{const C=Object.keys(r.value);return C.indexOf(g)===C.length-1},y=()=>{a("toggle-expand",ae.value)},B=()=>{r.level!==0&&(i.value=!0,f.value=r.keyName,o.nextTick(()=>{if(m.value){m.value.focus();const g=document.createRange();g.selectNodeContents(m.value);const C=window.getSelection();C?.removeAllRanges(),C?.addRange(g)}}))},_=()=>{K.value||(u.value=!0,r.value===null?p.value="null":v(r.value)?p.value="protected-number":typeof r.value=="string"?p.value="string":typeof r.value=="number"?p.value="number":typeof r.value=="boolean"&&(p.value="boolean"),v(r.value)?x.value=U(r.value):typeof r.value=="string"?x.value=r.value:x.value=String(r.value),o.nextTick(()=>{if(S.value){S.value.focus();const g=document.createRange();g.selectNodeContents(S.value);const C=window.getSelection();C?.removeAllRanges(),C?.addRange(g)}}))},L=()=>{if(r.level===0||!i.value)return;const g=m.value?.innerText.trim()||"";if(!g){Z();return}if(g===r.keyName){i.value=!1;return}i.value=!1,a("update:key",ae.value,g)},$=()=>{if(u.value)try{let g;const C=S.value?.innerText.trim()||"";if(p.value==="string")C==="null"?g=null:C==="true"||C==="false"?g=C==="true":g=C;else if(p.value==="protected-number")g={__protected_number__:C};else if(C==="null")g=null;else if(C==="true"||C==="false")g=C==="true";else if(!isNaN(Number(C))&&C!==""){const V=Number(C);!Number.isSafeInteger(V)||C.length>15?g={__protected_number__:C}:g=V}else g=C;a("update:value",ae.value,g),u.value=!1}catch(g){console.error("Failed to parse value:",g),u.value=!1}},Z=()=>{i.value=!1,f.value=r.keyName},te=()=>{u.value=!1,v(r.value)?x.value=U(r.value):typeof r.value=="string"?x.value=r.value:x.value=String(r.value)};return(g,C)=>{const V=o.resolveComponent("JsonNode",!0);return o.openBlock(),o.createElementBlock("div",br,[K.value?(o.openBlock(),o.createElementBlock("div",Ar,[o.createElementVNode("div",xr,[g.keyName?(o.openBlock(),o.createElementBlock("span",{key:0,class:"json-node__key",contenteditable:i.value,onDblclick:B,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(Z,["escape"])],onBlur:L,ref_key:"keyRef",ref:m,title:"Double-click to edit key"},o.toDisplayString(i.value?f.value:`"${de.value}"`),41,Nr)):o.createCommentVNode("",!0),g.keyName?(o.openBlock(),o.createElementBlock("span",Cr,": ")):o.createCommentVNode("",!0),o.createElementVNode("span",{class:"json-node__bracket json-node__bracket--clickable",onClick:y,title:H.value?"Click to collapse":"Click to expand"},o.toDisplayString(re.value),9,Dr),H.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",{key:2,class:"json-node__collapsed-info",onClick:y,title:`Click to expand ${me.value.trim()}`},o.toDisplayString(me.value),9,vr)),H.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",{key:3,class:"json-node__bracket json-node__bracket--clickable",onClick:y,title:"Click to expand"},o.toDisplayString(z.value),1)),!H.value&&!g.isLast?(o.openBlock(),o.createElementBlock("span",wr,",")):o.createCommentVNode("",!0)]),H.value?(o.openBlock(),o.createElementBlock("div",Tr,[o.createElementVNode("div",_r,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(g.value,(j,R)=>(o.openBlock(),o.createElementBlock("div",{key:R,class:"json-node__child"},[o.createVNode(V,{value:j,"key-name":Y.value?"":String(R),level:g.level+1,path:le(String(R)),expanded:g.expanded,theme:g.theme,"onUpdate:value":C[0]||(C[0]=(ee,D)=>g.$emit("update:value",ee,D)),onToggleExpand:C[1]||(C[1]=ee=>g.$emit("toggle-expand",ee)),onCopy:C[2]||(C[2]=ee=>g.$emit("copy",ee)),"onUpdate:key":C[3]||(C[3]=(ee,D)=>g.$emit("update:key",ee,D)),"is-last":w(String(R))},null,8,["value","key-name","level","path","expanded","theme","is-last"])]))),128))]),o.createElementVNode("div",Br,[o.createElementVNode("span",Sr,o.toDisplayString(z.value),1),g.isLast?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Or,","))])])):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",kr,[g.keyName?(o.openBlock(),o.createElementBlock("span",{key:0,class:"json-node__key",contenteditable:i.value,onDblclick:B,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(Z,["escape"])],onBlur:L,ref_key:"keyRef",ref:m,title:"Double-click to edit key"},o.toDisplayString(i.value?f.value:`"${de.value}"`),41,Rr)):o.createCommentVNode("",!0),g.keyName?(o.openBlock(),o.createElementBlock("span",Ir,": ")):o.createCommentVNode("",!0),o.createElementVNode("span",{class:o.normalizeClass(["json-node__value-wrapper",be.value]),onDblclick:_,title:N.value},[o.createElementVNode("span",{class:"json-node__value",contenteditable:u.value,onKeydown:[o.withKeys(o.withModifiers($,["prevent"]),["enter"]),o.withKeys(te,["escape"])],onBlur:$,ref_key:"valueRef",ref:S},o.toDisplayString(u.value?x.value:J.value),41,Pr),g.isLast?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Lr,","))],42,Fr)]))])}}}),ft=(n,t)=>{const r=n.__vccOpts||n;for(const[a,i]of t)r[a]=i;return r},$r=ft(Vr,[["__scopeId","data-v-1472a8af"]]),It={name:"github-light",colors:{background:"#ffffff",surfaceBackground:"#f6f8fa",border:"#d0d7de",text:"#24292f",textSecondary:"#656d76",buttonBackground:"#f6f8fa",buttonBackgroundHover:"#f3f4f6",buttonBorder:"#d0d7de",buttonText:"#24292f",buttonPrimary:"#2da44e",buttonPrimaryHover:"#2c974b",success:"#1a7f37",successBackground:"#dafbe1",error:"#cf222e",errorBackground:"#ffebe9",syntaxString:"#0a3069",syntaxNumber:"#0969da",syntaxBoolean:"#8250df",syntaxNull:"#656d76",syntaxKey:"#0969da",syntaxBracket:"#24292f",hoverBackground:"#f6f8fa",selectionBackground:"rgba(9, 105, 218, 0.2)",collapsedBackground:"#ddf4ff",collapsedBackgroundHover:"#b6e3ff",collapsedText:"#0969da",indentLine:"#d0d7de"}},Mr={"github-light":It,"github-dark":{name:"github-dark",colors:{background:"#0d1117",surfaceBackground:"#161b22",border:"#30363d",text:"#e6edf3",textSecondary:"#7d8590",buttonBackground:"#21262d",buttonBackgroundHover:"#30363d",buttonBorder:"#30363d",buttonText:"#e6edf3",buttonPrimary:"#238636",buttonPrimaryHover:"#2ea043",success:"#3fb950",successBackground:"#0f2419",error:"#f85149",errorBackground:"#381921",syntaxString:"#a5d6ff",syntaxNumber:"#79c0ff",syntaxBoolean:"#d2a8ff",syntaxNull:"#7d8590",syntaxKey:"#79c0ff",syntaxBracket:"#e6edf3",hoverBackground:"#161b22",selectionBackground:"rgba(121, 192, 255, 0.2)",collapsedBackground:"#1c2128",collapsedBackgroundHover:"#2d333b",collapsedText:"#79c0ff",indentLine:"#30363d"}},"min-light":{name:"min-light",colors:{background:"#ffffff",surfaceBackground:"#fafafa",border:"#e5e5e5",text:"#333333",textSecondary:"#888888",buttonBackground:"#f8f8f8",buttonBackgroundHover:"#eeeeee",buttonBorder:"#e0e0e0",buttonText:"#333333",buttonPrimary:"#007acc",buttonPrimaryHover:"#005a9e",success:"#22c55e",successBackground:"#f0fdf4",error:"#ef4444",errorBackground:"#fef2f2",syntaxString:"#22c55e",syntaxNumber:"#3b82f6",syntaxBoolean:"#8b5cf6",syntaxNull:"#6b7280",syntaxKey:"#1f2937",syntaxBracket:"#374151",hoverBackground:"#f9f9f9",selectionBackground:"rgba(59, 130, 246, 0.2)",collapsedBackground:"#e0f2fe",collapsedBackgroundHover:"#bae6fd",collapsedText:"#0284c7",indentLine:"#e5e7eb"}},"slack-ochin":{name:"slack-ochin",colors:{background:"#fefbf6",surfaceBackground:"#faf6f0",border:"#e8d5b7",text:"#4a3b2a",textSecondary:"#8b7355",buttonBackground:"#f4ede4",buttonBackgroundHover:"#efe5d8",buttonBorder:"#e8d5b7",buttonText:"#4a3b2a",buttonPrimary:"#ff6b35",buttonPrimaryHover:"#e55a2b",success:"#ff9500",successBackground:"#fff8f0",error:"#d73502",errorBackground:"#ffeee8",syntaxString:"#d73502",syntaxNumber:"#ff6b35",syntaxBoolean:"#b7472a",syntaxNull:"#8b7355",syntaxKey:"#4a3b2a",syntaxBracket:"#6b5444",hoverBackground:"#f8f2eb",selectionBackground:"rgba(255, 107, 53, 0.2)",collapsedBackground:"#ffe8d6",collapsedBackgroundHover:"#ffd4b0",collapsedText:"#d73502",indentLine:"#e8d5b7"}}};function qr(n="github-light"){return Mr[n]||It}const Ur={key:0,class:"json-format__toolbar"},Hr={class:"json-format__actions"},jr=["disabled"],Kr=["disabled"],Gr=["disabled"],Xr=["disabled"],Wr={class:"json-format__info"},zr={key:0,class:"json-format__status json-format__status--success"},Yr={key:1,class:"json-format__status json-format__status--error"},Qr={class:"json-format__content"},Zr={key:0,class:"json-format__error"},Jr={key:1,class:"json-format__error"},en={key:2,class:"json-format__viewer"},Ft=ft(o.defineComponent({name:"JsonFormat",__name:"index",props:{modelValue:{default:""},readonly:{type:Boolean,default:!1},maxDepth:{default:10},showToolbar:{type:Boolean,default:!0},theme:{default:"github-light"}},emits:["update:modelValue","copy-success","copy-error","expand-all","collapse-all","compress"],setup(n,{expose:t,emit:r}){o.useCssVars(D=>({"4782cf12":U.value.colors.border,"35b95bf9":U.value.colors.background,cda9ff90:U.value.colors.text,"41368ee0":U.value.colors.surfaceBackground,"47674bee":U.value.colors.buttonBorder,"0f08048b":U.value.colors.buttonBackground,cb00036c:U.value.colors.buttonText,"4a92191e":U.value.colors.buttonBackgroundHover,d30c3876:U.value.colors.buttonPrimary,"3d918877":U.value.colors.buttonPrimaryHover,"4f985866":U.value.colors.successBackground,"3847a518":U.value.colors.success,"28f0996b":U.value.colors.errorBackground,e9310f46:U.value.colors.error}));const a=n,i=r,u=o.ref(null),f=o.ref(""),x=o.ref(new Set),p=o.ref(null),m=o.ref(""),S=o.ref(!1),v=o.computed(()=>f.value===""),U=o.computed(()=>qr(a.theme)),K=D=>{if(D==null)return D;if(Array.isArray(D))return D.map(O=>K(O));if(typeof D=="object"){const O={},F=Object.keys(D).sort();for(const G of F)O[G]=K(D[G]);return O}return D},Y=o.computed(()=>{const D=p.value!==null?p.value:u.value;return!D||!S.value?D:K(D)}),ae=o.computed(()=>m.value?null:Y.value),H=D=>{if(!D.trim()){u.value=null,f.value="",p.value=null,m.value="";return}try{let O=D;const F=/(:\s*|,\s*|\[\s*)-?\d{16,}/.test(O),G=/(:\s*|,\s*|\[\s*)-?\d+\.\d*0+\s*[,}\]\s]*/.test(O);if(!F&&!G)try{u.value=JSON.parse(O),f.value="",p.value=null,m.value="",o.nextTick(()=>{ae.value!==null&&_()});return}catch{}O=(P=>{let Q="",pe=!1,Ee=!1,Te=0;for(;Te<P.length;){const ke=P[Te];if(pe)Ee?Ee=!1:ke==="\\"?Ee=!0:ke==='"'&&(pe=!1),Q+=ke,Te++;else if(ke==='"')pe=!0,Q+=ke,Te++;else{const De=P.slice(Te);let W=De.match(/^([:,\[\s]*)(-?\d{16,})(\s*[,\}\]\s]|$)/);if(W){Q+=W[1]+'{"__protected_number__":"'+W[2]+'"}'+W[3],Te+=W[0].length;continue}if(W=De.match(/^([:,\[\s]*)(-?\d+\.\d*0+)(\s*[,\}\]\s]|$)/),W){Q+=W[1]+'{"__protected_number__":"'+W[2]+'"}'+W[3],Te+=W[0].length;continue}Q+=ke,Te++}}return Q})(O),u.value=JSON.parse(O),f.value="",p.value=null,m.value="",o.nextTick(()=>{ae.value!==null&&_()})}catch(O){f.value=O instanceof Error?O.message:"Unknown parsing error",u.value=null,p.value=null,m.value=""}},de=D=>{if(!D||!D.expression.trim()){be();return}if(!u.value){m.value="No valid JSON data to filter";return}try{let O;if(D.type==="jsonpath")O=we({path:D.expression,json:u.value}),O.length===1&&D.expression.includes("$[")===!1&&!D.expression.endsWith("[*]")?p.value=O[0]:p.value=O;else if(D.type==="js"){const{proxyData:F,indexMap:G}=re(u.value),P=new Function("$",`
3
3
  try {
4
- return ${C.expression};
4
+ return ${D.expression};
5
5
  } catch (error) {
6
6
  throw new Error('JavaScript expression error: ' + error.message);
7
7
  }
8
- `)(L);B=Q(u.value,F,X),p.value=B}else throw new Error(`Unsupported filter type: ${C.type}`);m.value="",o.nextTick(()=>{O()})}catch(B){m.value=B instanceof Error?B.message:"Filter execution error",p.value=null}},oe=(C,B="root")=>{const L=new Map,X=(F,Y)=>{if(F==null)return F;if(typeof F=="object"&&F.__protected_number__!==void 0){const ge=parseFloat(F.__protected_number__);return L.set(ge,Y),ge}if(Array.isArray(F)){const ge=F.map((Ee,Te)=>{const ke=`${Y}[${Te}]`,De=X(Ee,ke);return L.set(De,ke),De});return L.set(ge,Y),ge}if(typeof F=="object"){const ge={};for(const Ee in F)if(Object.prototype.hasOwnProperty.call(F,Ee)){const Te=Y==="root"?Ee:`${Y}.${Ee}`;ge[Ee]=X(F[Ee],Te)}return L.set(ge,Y),ge}return F};return{proxyData:X(C,B),indexMap:L}},Q=(C,B,L)=>{if(B===null||typeof B!="object")return B;if(Array.isArray(B))return B.map(F=>{const Y=L.get(F);if(Y){const ge=he(C,Y);if(ge!==void 0)return ge}return Q(C,F,L)});const X=L.get(B);if(X){const F=he(C,X);if(F!==void 0)return F}const z={};for(const F in B)Object.prototype.hasOwnProperty.call(B,F)&&(z[F]=Q(C,B[F],L));return z},he=(C,B)=>{if(B==="root")return C;const L=[];let X=B.replace(/^root\.?/,"");const z=/([^\[\].]+)|\[(\d+)\]/g;let F;for(;(F=z.exec(X))!==null;)F[1]?L.push(F[1]):F[2]!==void 0&&L.push(parseInt(F[2]));let Y=C;for(const ge of L){if(Y==null)return;Y=Y[ge]}return Y},ye=()=>{p.value=null,m.value=""},Z=()=>{_.value=!0},N=()=>{_.value=!1};o.watch(()=>a.modelValue,C=>{H(C)},{immediate:!0});const $=(C,B,L)=>{const X=Y=>{if(Y===null||typeof Y!="object")return Y;if(!Array.isArray(Y)&&"__protected_number__"in Y&&Object.keys(Y).length===1)return`__PROTECTED_NUMBER_${Y.__protected_number__}_PROTECTED_NUMBER__`;if(Array.isArray(Y))return Y.map(Ee=>X(Ee));const ge={};for(const[Ee,Te]of Object.entries(Y))ge[Ee]=X(Te);return ge},z=X(C);return JSON.stringify(z,B,L).replace(/"__PROTECTED_NUMBER_(.+?)_PROTECTED_NUMBER__"/g,"$1")},v=(C,B)=>{if(!a.readonly)try{const L=E(u.value,C,B),X=$(L,null,2);i("update:modelValue",X)}catch(L){console.error("Failed to update JSON:",L)}},E=(C,B,L)=>{if(!B||B==="root")return L;const X=B.split("."),z=q(C,X.slice(0,-1));let F=z;for(let ge=0;ge<X.length-1;ge++){const Ee=X[ge];Ee!=="root"&&(Array.isArray(F)?F=F[parseInt(Ee)]:F=F[Ee])}const Y=X[X.length-1];return Y==="root"?L:(Array.isArray(F)?F[parseInt(Y)]=L:F[Y]=L,z)},P=C=>{x.value.has(C)?x.value.delete(C):x.value.add(C)},O=()=>{const C=new Set,B=(L,X="")=>{L!==null&&typeof L=="object"&&(C.add(X||"root"),Array.isArray(L)?L.forEach((z,F)=>{const Y=X?`${X}.${F}`:`${F}`;B(z,Y)}):Object.keys(L).forEach(z=>{const F=X?`${X}.${z}`:z;B(L[z],F)}))};B(ue.value),x.value=C,i("expand-all")},S=()=>{x.value=new Set(["root"]),i("collapse-all")},G=async()=>{if(D.value)try{const C=ue.value,B=$(C,null,2);await navigator.clipboard.writeText(B),i("copy-success",B)}catch(C){console.error("Failed to copy JSON:",C),i("copy-error",C instanceof Error?C:new Error("Failed to copy JSON"))}},ee=()=>{if(D.value)try{const C=ue.value,B=$(C);i("update:modelValue",B),i("compress",B)}catch(C){console.error("Failed to compress JSON:",C)}},te=async C=>{try{let B;typeof C=="object"&&C!==null&&!Array.isArray(C)&&"__protected_number__"in C&&Object.keys(C).length===1?B=C.__protected_number__:typeof C=="string"?B=`"${C}"`:B=JSON.stringify(C),await navigator.clipboard.writeText(B)}catch(B){console.error("Failed to copy value:",B)}},g=(C,B)=>{if(!a.readonly)try{const L=T(u.value,C,B),X=$(L,null,2);i("update:modelValue",X),re(C,B)}catch(L){console.error("Failed to rename key:",L)}},T=(C,B,L)=>{if(!B||B==="root")return C;const X=B.split("."),z=q(C,X.slice(0,-1));if(X.length===1){const ge=X[0];return z&&typeof z=="object"&&!Array.isArray(z)?j(z,ge,L):z}let F=z;for(let ge=0;ge<X.length-1;ge++){const Ee=X[ge];Array.isArray(F)?F=F[parseInt(Ee)]:F=F[Ee]}const Y=X[X.length-1];if(!Array.isArray(F)&&F&&typeof F=="object"){const ge=j(F,Y,L),Ee=X.slice(0,-1);Ee.length>0&&I(z,Ee,ge)}return z},q=(C,B)=>{if(B.length===0)return C;if(Array.isArray(C)){const L=[...C],X=B[0],z=parseInt(X);return B.length===1||(L[z]=q(C[z],B.slice(1))),L}else if(C&&typeof C=="object"){const L={...C},X=B[0];return B.length===1||(L[X]=q(C[X],B.slice(1))),L}return C},j=(C,B,L)=>{if(!C||typeof C!="object"||Array.isArray(C))return C;const X=Object.keys(C),z={};for(const F of X)F===B?z[L]=C[F]:z[F]=C[F];return z},I=(C,B,L)=>{let X=C;for(let F=0;F<B.length-1;F++){const Y=B[F];Array.isArray(X)?X=X[parseInt(Y)]:X=X[Y]}const z=B[B.length-1];Array.isArray(X)?X[parseInt(z)]=L:X[z]=L},re=(C,B)=>{const L=new Set;x.value.forEach(X=>{if(X===C){const z=C.split(".");z[z.length-1]=B,L.add(z.join("."))}else if(X.startsWith(C+".")){const z=C.split(".");z[z.length-1]=B;const F=z.join("."),Y=X.substring(C.length);L.add(F+Y)}else L.add(X)}),x.value=L};return t({copyJson:G,compressSource:ee,expandAll:O,collapseAll:S,toggleExpand:P,updateValue:v,updateKey:g,filter:de,clearFilter:ye,sortKeys:Z,clearSortKeys:N,isSorted:()=>_.value,isValidJson:()=>D.value,getParsedJson:()=>u.value,getFilteredJson:()=>p.value,getExpandedNodes:()=>x.value,getParseError:()=>f.value,getFilterError:()=>m.value,parseJson:C=>H(C),copyValue:C=>te(C)}),(C,B)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["json-format",`json-format--${U.value.name}`])},[C.showToolbar?(o.openBlock(),o.createElementBlock("div",Ur,[o.createElementVNode("div",Hr,[o.createElementVNode("button",{class:"json-format__btn json-format__btn--primary",onClick:G,disabled:!D.value,title:"Copy JSON"}," 📋 Copy ",8,jr),o.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:O,disabled:!D.value,title:"Expand All"}," ⬇️ Expand All ",8,Kr),o.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:S,disabled:!D.value,title:"Collapse All"}," ➡️ Collapse All ",8,Gr),o.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:ee,disabled:!D.value,title:"Compress JSON"}," 📦 Compress ",8,Xr)]),o.createElementVNode("div",zr,[D.value?(o.openBlock(),o.createElementBlock("span",Wr," ✅ Valid JSON ")):(o.openBlock(),o.createElementBlock("span",Yr," ❌ Invalid JSON "))])])):o.createCommentVNode("",!0),o.createElementVNode("div",Qr,[D.value?m.value?(o.openBlock(),o.createElementBlock("div",Jr,[B[1]||(B[1]=o.createElementVNode("h4",null,"Filter Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(m.value),1)])):(o.openBlock(),o.createElementBlock("div",en,[o.createVNode($r,{value:ue.value,"key-name":"",level:0,expanded:x.value,"is-last":!0,theme:U.value,"onUpdate:value":v,onToggleExpand:P,onCopy:te,"onUpdate:key":g},null,8,["value","expanded","theme"])])):(o.openBlock(),o.createElementBlock("div",Zr,[B[0]||(B[0]=o.createElementVNode("h4",null,"JSON Parse Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(f.value),1)]))])],2))}}),[["__scopeId","data-v-030f8e3b"]]);function tn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var vt={},Pt;function rn(){return Pt||(Pt=1,function(n){var t=n;(function(r){var a="__namespace",i=function(e){return e==null},u=function(e){return e===a||Number.isInteger(e)&&e>=1&&e<=11},f=function(e){return e&&u(e.nodeType)&&typeof e.nodeName=="string"};function x(e){var s=Array.prototype.slice,d=e.length,b=function(w,ie){return function(){return ie.apply(this,w.concat(s.call(arguments)))}},h=function(){var w=s.call(arguments);return w.length<d?b(w,h):e.apply(this,s.apply(arguments,[0,d]))};return h}var p=function(e,s){for(var d=0;d<s.length;d+=1)e(s[d],d,s)},m=function(e,s,d){var b=s;return p(function(h,w){b=e(b,h,w)},d),b},_=function(e,s){var d=new Array(s.length);return p(function(b,h){d[h]=e(b)},s),d},D=function(e,s){var d=[];return p(function(b,h){e(b,h)&&d.push(b)},s),d},U=function(e,s){for(var d=0;d<e.length;d+=1)if(e[d]===s)return!0;return!1};function K(e){return function(){return e}}function J(e){return e.toString()}var ue=function(e,s){return s.join(e)},H=function(e,s,d){return e+d+s},de=Array.prototype.concat,oe=function(e,s){var d=new le;d.addArray(e);var b=d.toArray();return s?b.reverse():b},Q=32767;function he(e){for(var s=[],d=0;d<e.length;d+=Q){var b=e.slice(d,d+Q);s=de.apply(s,b)}return s}function ye(e,s){for(var d=Object(e),b=1;b<arguments.length;b++){var h=arguments[b];if(h!=null)for(var w in h)Object.prototype.hasOwnProperty.call(h,w)&&(d[w]=h[w])}return d}var Z={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NAMESPACE_NODE:a};N.prototype=new Object,N.prototype.constructor=N,N.superclass=Object.prototype;function N(){this.init()}N.prototype.init=function(){this.reduceActions=[],this.reduceActions[3]=function(e){return new G(e[0],e[2])},this.reduceActions[5]=function(e){return new ee(e[0],e[2])},this.reduceActions[7]=function(e){return new te(e[0],e[2])},this.reduceActions[8]=function(e){return new g(e[0],e[2])},this.reduceActions[10]=function(e){return new T(e[0],e[2])},this.reduceActions[11]=function(e){return new q(e[0],e[2])},this.reduceActions[12]=function(e){return new j(e[0],e[2])},this.reduceActions[13]=function(e){return new I(e[0],e[2])},this.reduceActions[15]=function(e){return new re(e[0],e[2])},this.reduceActions[16]=function(e){return new C(e[0],e[2])},this.reduceActions[18]=function(e){return new B(e[0],e[2])},this.reduceActions[19]=function(e){return new L(e[0],e[2])},this.reduceActions[20]=function(e){return new X(e[0],e[2])},this.reduceActions[22]=function(e){return new O(e[1])},this.reduceActions[24]=function(e){return new z(e[0],e[2])},this.reduceActions[25]=function(e){return new F(void 0,void 0,e[0])},this.reduceActions[27]=function(e){return e[0].locationPath=e[2],e[0]},this.reduceActions[28]=function(e){return e[0].locationPath=e[2],e[0].locationPath.steps.unshift(new W(W.DESCENDANTORSELF,A.nodeTest,[])),e[0]},this.reduceActions[29]=function(e){return new F(e[0],[],void 0)},this.reduceActions[30]=function(e){return fe.instance_of(e[0],F)?(e[0].filterPredicates==null&&(e[0].filterPredicates=[]),e[0].filterPredicates.push(e[1]),e[0]):new F(e[0],[e[1]],void 0)},this.reduceActions[32]=function(e){return e[1]},this.reduceActions[33]=function(e){return new R(e[0])},this.reduceActions[34]=function(e){return new M(e[0])},this.reduceActions[36]=function(e){return new Ce(e[0],[])},this.reduceActions[37]=function(e){return new Ce(e[0],e[2])},this.reduceActions[38]=function(e){return[e[0]]},this.reduceActions[39]=function(e){return e[2].unshift(e[0]),e[2]},this.reduceActions[43]=function(e){return new De(!0,[])},this.reduceActions[44]=function(e){return e[1].absolute=!0,e[1]},this.reduceActions[46]=function(e){return new De(!1,[e[0]])},this.reduceActions[47]=function(e){return e[0].steps.push(e[2]),e[0]},this.reduceActions[49]=function(e){return new W(e[0],e[1],[])},this.reduceActions[50]=function(e){return new W(W.CHILD,e[0],[])},this.reduceActions[51]=function(e){return new W(e[0],e[1],e[2])},this.reduceActions[52]=function(e){return new W(W.CHILD,e[0],e[1])},this.reduceActions[54]=function(e){return[e[0]]},this.reduceActions[55]=function(e){return e[1].unshift(e[0]),e[1]},this.reduceActions[56]=function(e){return e[0]=="ancestor"?W.ANCESTOR:e[0]=="ancestor-or-self"?W.ANCESTORORSELF:e[0]=="attribute"?W.ATTRIBUTE:e[0]=="child"?W.CHILD:e[0]=="descendant"?W.DESCENDANT:e[0]=="descendant-or-self"?W.DESCENDANTORSELF:e[0]=="following"?W.FOLLOWING:e[0]=="following-sibling"?W.FOLLOWINGSIBLING:e[0]=="namespace"?W.NAMESPACE:e[0]=="parent"?W.PARENT:e[0]=="preceding"?W.PRECEDING:e[0]=="preceding-sibling"?W.PRECEDINGSIBLING:e[0]=="self"?W.SELF:-1},this.reduceActions[57]=function(e){return W.ATTRIBUTE},this.reduceActions[59]=function(e){return e[0]=="comment"?A.commentTest:e[0]=="text"?A.textTest:e[0]=="processing-instruction"?A.anyPiTest:e[0]=="node"?A.nodeTest:new A(-1,void 0)},this.reduceActions[60]=function(e){return new A.PITest(e[2])},this.reduceActions[61]=function(e){return e[1]},this.reduceActions[63]=function(e){return e[1].absolute=!0,e[1].steps.unshift(new W(W.DESCENDANTORSELF,A.nodeTest,[])),e[1]},this.reduceActions[64]=function(e){return e[0].steps.push(new W(W.DESCENDANTORSELF,A.nodeTest,[])),e[0].steps.push(e[2]),e[0]},this.reduceActions[65]=function(e){return new W(W.SELF,A.nodeTest,[])},this.reduceActions[66]=function(e){return new W(W.PARENT,A.nodeTest,[])},this.reduceActions[67]=function(e){return new se(e[1])},this.reduceActions[68]=function(e){return A.nameTestAny},this.reduceActions[69]=function(e){return new A.NameTestPrefixAny(e[0].split(":")[0])},this.reduceActions[70]=function(e){return new A.NameTestQName(e[0])}},N.actionTable=[" s s sssssssss s ss s ss"," s ","r rrrrrrrrr rrrrrrr rr r "," rrrrr "," s s sssssssss s ss s ss","rs rrrrrrrr s sssssrrrrrr rrs rs "," s s sssssssss s ss s ss"," s "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s "," s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr r ","a ","r s rr r ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrs rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r srrrrrrrr rrrrrrs rr sr ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r "," sssss ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrr rrrrr rr r "," s "," s "," rrrrr "," s s sssssssss s sss s ss","r srrrrrrrr rrrrrrs rr r "," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss ss s ss"," s s sssssssss s ss s ss"," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr rr "," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," rr "," s "," rs ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrr rr r "," r "," s ","r srrrrrrrr rrrrrrs rr r ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s s sssssssss s ss s ss","r rrrrrrrrr rrrrrrr rr rr "," r "],N.actionTableNumber=[` 1 0 /.-,+*)(' & %$ # "!`," J ","a aaaaaaaaa aaaaaaa aa a "," YYYYY ",` 1 0 /.-,+*)(' & %$ # "!`,`K1 KKKKKKKK . +*)('KKKKKK KK# K" `,` 1 0 /.-,+*)(' & %$ # "!`," N "," O ","e eeeeeeeee eeeeeee ee ee ","f fffffffff fffffff ff ff ","d ddddddddd ddddddd dd dd ","B BBBBBBBBB BBBBBBB BB BB ","A AAAAAAAAA AAAAAAA AA AA "," P "," Q ",` 1 . +*)(' # " `,"b bbbbbbbbb bbbbbbb bb b "," ","! S !! ! ",'" T" "" " ',"$ V $$ U $$ $ ","& &ZY&& &XW && & ",") ))))) )))\\[ )) ) ",". ....._^] ..... .. . ","1 11111111 11111 11 1 ","5 55555555 55555` 55 5 ","7 77777777 777777 77 7 ","9 99999999 999999 99 9 ",": c:::::::: ::::::b :: a: ","I fIIIIIIII IIIIIIe II I ","= ========= ======= == == ","? ????????? ??????? ?? ?? ","C CCCCCCCCC CCCCCCC CC CC ","J JJJJJJJJ JJJJJJ JJ J ","M MMMMMMMM MMMMMM MM M ","N NNNNNNNNN NNNNNNN NN N ","P PPPPPPPPP PPPPPPP PP P "," +*)(' ","R RRRRRRRRR RRRRRRR RR aR ","U UUUUUUUUU UUUUUUU UU U ","Z ZZZZZZZZZ ZZZZZZZ ZZ ZZ ","c ccccccccc ccccccc cc cc "," j ","L fLLLLLLLL LLLLLLe LL L ","6 66666666 66666 66 6 "," k "," l "," XXXXX ",` 1 0 /.-,+*)(' & %$m # "!`,"_ f________ ______e __ _ ",` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 . +*)(' # " `,` 1 . +*)(' # " `,"> >>>>>>>>> >>>>>>> >> >> ",` 1 . +*)(' # " `,` 1 . +*)(' # " `,"Q QQQQQQQQQ QQQQQQQ QQ aQ ","V VVVVVVVVV VVVVVVV VV aV ","T TTTTTTTTT TTTTTTT TT T ","@ @@@@@@@@@ @@@@@@@ @@ @@ "," ‡ ","[ [[[[[[[[[ [[[[[[[ [[ [[ ","D DDDDDDDDD DDDDDDD DD DD "," HH "," ˆ "," F‰ ","# T# ## # ","% V %% U %% % ","' 'ZY'' 'XW '' ' ","( (ZY(( (XW (( ( ","+ +++++ +++\\[ ++ + ","* ***** ***\\[ ** * ","- ----- ---\\[ -- - ",", ,,,,, ,,,\\[ ,, , ","0 00000_^] 00000 00 0 ","/ /////_^] ///// // / ","2 22222222 22222 22 2 ","3 33333333 33333 33 3 ","4 44444444 44444 44 4 ","8 88888888 888888 88 8 "," ^ "," Š ","; f;;;;;;;; ;;;;;;e ;; ; ","< f<<<<<<<< <<<<<<e << < ","O OOOOOOOOO OOOOOOO OO O ","` ````````` ``````` `` ` ","S SSSSSSSSS SSSSSSS SS S ","W WWWWWWWWW WWWWWWW WW W ","\\ \\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\ \\\\ \\\\ ","E EEEEEEEEE EEEEEEE EE EE ",` 1 0 /.-,+*)(' & %$ # "!`,"] ]]]]]]]]] ]]]]]]] ]] ]] "," G "],N.gotoTable=["3456789:;<=>?@ AB CDEFGH IJ "," "," "," ","L456789:;<=>?@ AB CDEFGH IJ "," M EFGH IJ "," N;<=>?@ AB CDEFGH IJ "," "," "," "," "," "," "," "," "," "," S EFGH IJ "," "," "," "," "," "," "," "," "," "," "," "," "," e "," "," "," "," "," "," "," "," "," h J "," i j "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ ABpqCDEFGH IJ "," "," r6789:;<=>?@ AB CDEFGH IJ "," s789:;<=>?@ AB CDEFGH IJ "," t89:;<=>?@ AB CDEFGH IJ "," u89:;<=>?@ AB CDEFGH IJ "," v9:;<=>?@ AB CDEFGH IJ "," w9:;<=>?@ AB CDEFGH IJ "," x9:;<=>?@ AB CDEFGH IJ "," y9:;<=>?@ AB CDEFGH IJ "," z:;<=>?@ AB CDEFGH IJ "," {:;<=>?@ AB CDEFGH IJ "," |;<=>?@ AB CDEFGH IJ "," };<=>?@ AB CDEFGH IJ "," ~;<=>?@ AB CDEFGH IJ "," =>?@ AB CDEFGH IJ ","€456789:;<=>?@ AB CDEFGH IJ"," ‚ EFGH IJ "," ƒ EFGH IJ "," "," „ GH IJ "," … GH IJ "," i † "," i ‡ "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ ABŒqCDEFGH IJ "," "," "],N.productions=[[1,1,2],[2,1,3],[3,1,4],[3,3,3,-9,4],[4,1,5],[4,3,4,-8,5],[5,1,6],[5,3,5,-22,6],[5,3,5,-5,6],[6,1,7],[6,3,6,-23,7],[6,3,6,-24,7],[6,3,6,-6,7],[6,3,6,-7,7],[7,1,8],[7,3,7,-25,8],[7,3,7,-26,8],[8,1,9],[8,3,8,-12,9],[8,3,8,-11,9],[8,3,8,-10,9],[9,1,10],[9,2,-26,9],[10,1,11],[10,3,10,-27,11],[11,1,12],[11,1,13],[11,3,13,-28,14],[11,3,13,-4,14],[13,1,15],[13,2,13,16],[15,1,17],[15,3,-29,2,-30],[15,1,-15],[15,1,-16],[15,1,18],[18,3,-13,-29,-30],[18,4,-13,-29,19,-30],[19,1,20],[19,3,20,-31,19],[20,1,2],[12,1,14],[12,1,21],[21,1,-28],[21,2,-28,14],[21,1,22],[14,1,23],[14,3,14,-28,23],[14,1,24],[23,2,25,26],[23,1,26],[23,3,25,26,27],[23,2,26,27],[23,1,28],[27,1,16],[27,2,16,27],[25,2,-14,-3],[25,1,-32],[26,1,29],[26,3,-20,-29,-30],[26,4,-21,-29,-15,-30],[16,3,-33,30,-34],[30,1,2],[22,2,-4,14],[24,3,14,-4,23],[28,1,-35],[28,1,-2],[17,2,-36,-18],[29,1,-17],[29,1,-19],[29,1,-18]],N.DOUBLEDOT=2,N.DOUBLECOLON=3,N.DOUBLESLASH=4,N.NOTEQUAL=5,N.LESSTHANOREQUAL=6,N.GREATERTHANOREQUAL=7,N.AND=8,N.OR=9,N.MOD=10,N.DIV=11,N.MULTIPLYOPERATOR=12,N.FUNCTIONNAME=13,N.AXISNAME=14,N.LITERAL=15,N.NUMBER=16,N.ASTERISKNAMETEST=17,N.QNAME=18,N.NCNAMECOLONASTERISK=19,N.NODETYPE=20,N.PROCESSINGINSTRUCTIONWITHLITERAL=21,N.EQUALS=22,N.LESSTHAN=23,N.GREATERTHAN=24,N.PLUS=25,N.MINUS=26,N.BAR=27,N.SLASH=28,N.LEFTPARENTHESIS=29,N.RIGHTPARENTHESIS=30,N.COMMA=31,N.AT=32,N.LEFTBRACKET=33,N.RIGHTBRACKET=34,N.DOT=35,N.DOLLAR=36,N.prototype.tokenize=function(e){for(var s=[],d=[],b=e+"\0",h=0,w=b.charAt(h++);;){for(;w==" "||w==" "||w=="\r"||w==`
9
- `;)w=b.charAt(h++);if(w=="\0"||h>=b.length)break;if(w=="("){s.push(N.LEFTPARENTHESIS),d.push(w),w=b.charAt(h++);continue}if(w==")"){s.push(N.RIGHTPARENTHESIS),d.push(w),w=b.charAt(h++);continue}if(w=="["){s.push(N.LEFTBRACKET),d.push(w),w=b.charAt(h++);continue}if(w=="]"){s.push(N.RIGHTBRACKET),d.push(w),w=b.charAt(h++);continue}if(w=="@"){s.push(N.AT),d.push(w),w=b.charAt(h++);continue}if(w==","){s.push(N.COMMA),d.push(w),w=b.charAt(h++);continue}if(w=="|"){s.push(N.BAR),d.push(w),w=b.charAt(h++);continue}if(w=="+"){s.push(N.PLUS),d.push(w),w=b.charAt(h++);continue}if(w=="-"){s.push(N.MINUS),d.push(w),w=b.charAt(h++);continue}if(w=="="){s.push(N.EQUALS),d.push(w),w=b.charAt(h++);continue}if(w=="$"){s.push(N.DOLLAR),d.push(w),w=b.charAt(h++);continue}if(w=="."){if(w=b.charAt(h++),w=="."){s.push(N.DOUBLEDOT),d.push(".."),w=b.charAt(h++);continue}if(w>="0"&&w<="9"){var ie="."+w;for(w=b.charAt(h++);w>="0"&&w<="9";)ie+=w,w=b.charAt(h++);s.push(N.NUMBER),d.push(ie);continue}s.push(N.DOT),d.push(".");continue}if(w=="'"||w=='"'){for(var xe=w,Ne="";h<b.length&&(w=b.charAt(h))!==xe;)Ne+=w,h+=1;if(w!==xe)throw Me.fromMessage("Unterminated string literal: "+xe+Ne);h+=1,s.push(N.LITERAL),d.push(Ne),w=b.charAt(h++);continue}if(w>="0"&&w<="9"){var ie=w;for(w=b.charAt(h++);w>="0"&&w<="9";)ie+=w,w=b.charAt(h++);if(w=="."&&b.charAt(h)>="0"&&b.charAt(h)<="9")for(ie+=w,ie+=b.charAt(h++),w=b.charAt(h++);w>="0"&&w<="9";)ie+=w,w=b.charAt(h++);s.push(N.NUMBER),d.push(ie);continue}if(w=="*"){if(s.length>0){var ae=s[s.length-1];if(ae!=N.AT&&ae!=N.DOUBLECOLON&&ae!=N.LEFTPARENTHESIS&&ae!=N.LEFTBRACKET&&ae!=N.AND&&ae!=N.OR&&ae!=N.MOD&&ae!=N.DIV&&ae!=N.MULTIPLYOPERATOR&&ae!=N.SLASH&&ae!=N.DOUBLESLASH&&ae!=N.BAR&&ae!=N.PLUS&&ae!=N.MINUS&&ae!=N.EQUALS&&ae!=N.NOTEQUAL&&ae!=N.LESSTHAN&&ae!=N.LESSTHANOREQUAL&&ae!=N.GREATERTHAN&&ae!=N.GREATERTHANOREQUAL){s.push(N.MULTIPLYOPERATOR),d.push(w),w=b.charAt(h++);continue}}s.push(N.ASTERISKNAMETEST),d.push(w),w=b.charAt(h++);continue}if(w==":"&&b.charAt(h)==":"){s.push(N.DOUBLECOLON),d.push("::"),h++,w=b.charAt(h++);continue}if(w=="/"){if(w=b.charAt(h++),w=="/"){s.push(N.DOUBLESLASH),d.push("//"),w=b.charAt(h++);continue}s.push(N.SLASH),d.push("/");continue}if(w=="!"&&b.charAt(h)=="="){s.push(N.NOTEQUAL),d.push("!="),h++,w=b.charAt(h++);continue}if(w=="<"){if(b.charAt(h)=="="){s.push(N.LESSTHANOREQUAL),d.push("<="),h++,w=b.charAt(h++);continue}s.push(N.LESSTHAN),d.push("<"),w=b.charAt(h++);continue}if(w==">"){if(b.charAt(h)=="="){s.push(N.GREATERTHANOREQUAL),d.push(">="),h++,w=b.charAt(h++);continue}s.push(N.GREATERTHAN),d.push(">"),w=b.charAt(h++);continue}if(w=="_"||fe.isLetter(w.charCodeAt(0))){var ce=w;for(w=b.charAt(h++);fe.isNCNameChar(w.charCodeAt(0));)ce+=w,w=b.charAt(h++);if(s.length>0){var ae=s[s.length-1];if(ae!=N.AT&&ae!=N.DOUBLECOLON&&ae!=N.LEFTPARENTHESIS&&ae!=N.LEFTBRACKET&&ae!=N.AND&&ae!=N.OR&&ae!=N.MOD&&ae!=N.DIV&&ae!=N.MULTIPLYOPERATOR&&ae!=N.SLASH&&ae!=N.DOUBLESLASH&&ae!=N.BAR&&ae!=N.PLUS&&ae!=N.MINUS&&ae!=N.EQUALS&&ae!=N.NOTEQUAL&&ae!=N.LESSTHAN&&ae!=N.LESSTHANOREQUAL&&ae!=N.GREATERTHAN&&ae!=N.GREATERTHANOREQUAL){if(ce=="and"){s.push(N.AND),d.push(ce);continue}if(ce=="or"){s.push(N.OR),d.push(ce);continue}if(ce=="mod"){s.push(N.MOD),d.push(ce);continue}if(ce=="div"){s.push(N.DIV),d.push(ce);continue}}}if(w==":"){if(b.charAt(h)=="*"){s.push(N.NCNAMECOLONASTERISK),d.push(ce+":*"),h++,w=b.charAt(h++);continue}if(b.charAt(h)=="_"||fe.isLetter(b.charCodeAt(h))){for(ce+=":",w=b.charAt(h++);fe.isNCNameChar(w.charCodeAt(0));)ce+=w,w=b.charAt(h++);if(w=="("){s.push(N.FUNCTIONNAME),d.push(ce);continue}s.push(N.QNAME),d.push(ce);continue}if(b.charAt(h)==":"){s.push(N.AXISNAME),d.push(ce);continue}}if(w=="("){if(ce=="comment"||ce=="text"||ce=="node"){s.push(N.NODETYPE),d.push(ce);continue}if(ce=="processing-instruction"){b.charAt(h)==")"?s.push(N.NODETYPE):s.push(N.PROCESSINGINSTRUCTIONWITHLITERAL),d.push(ce);continue}s.push(N.FUNCTIONNAME),d.push(ce);continue}s.push(N.QNAME),d.push(ce);continue}throw new Error("Unexpected character "+w)}return s.push(1),d.push("[EOF]"),[s,d]},N.SHIFT="s",N.REDUCE="r",N.ACCEPT="a",N.prototype.parse=function(Ne){if(!Ne)throw new Error("XPath expression unspecified.");if(typeof Ne!="string")throw new Error("XPath expression must be a string.");var s,d,b=this.tokenize(Ne);if(b!=null){s=b[0],d=b[1];var h=0,w=[],ie=[],xe=[],Ne,ae,ce;for(w.push(0),ie.push(1),xe.push("_S"),ae=s[h],ce=d[h++];;)switch(Ne=w[w.length-1],N.actionTable[Ne].charAt(ae-1)){case N.SHIFT:ie.push(-ae),xe.push(ce),w.push(N.actionTableNumber[Ne].charCodeAt(ae-1)-32),ae=s[h],ce=d[h++];break;case N.REDUCE:for(var Le=N.productions[N.actionTableNumber[Ne].charCodeAt(ae-1)-32][1],Ke=[],Se=0;Se<Le;Se++)ie.pop(),Ke.unshift(xe.pop()),w.pop();var Qe=w[w.length-1];ie.push(N.productions[N.actionTableNumber[Ne].charCodeAt(ae-1)-32][0]),this.reduceActions[N.actionTableNumber[Ne].charCodeAt(ae-1)-32]==null?xe.push(Ke[0]):xe.push(this.reduceActions[N.actionTableNumber[Ne].charCodeAt(ae-1)-32](Ke)),w.push(N.gotoTable[Qe].charCodeAt(N.productions[N.actionTableNumber[Ne].charCodeAt(ae-1)-32][0]-2)-33);break;case N.ACCEPT:return new $(xe.pop());default:throw new Error("XPath parse error")}}},$.prototype=new Object,$.prototype.constructor=$,$.superclass=Object.prototype;function $(e){this.expression=e}$.prototype.toString=function(){return this.expression.toString()};function v(e,s,d){s in e||(e[s]=d)}$.prototype.evaluate=function(e){var s=e.expressionContextNode;if(!(i(s)||f(s)))throw new Error("Context node does not appear to be a valid DOM node.");return e.contextNode=e.expressionContextNode,e.contextSize=1,e.contextPosition=1,e.isHtml&&(v(e,"caseInsensitive",!0),v(e,"allowAnyNamespaceForNoPrefix",!0)),v(e,"caseInsensitive",!1),this.expression.evaluate(e)},$.XML_NAMESPACE_URI="http://www.w3.org/XML/1998/namespace",$.XMLNS_NAMESPACE_URI="http://www.w3.org/2000/xmlns/",E.prototype=new Object,E.prototype.constructor=E,E.superclass=Object.prototype;function E(){}E.prototype.init=function(){},E.prototype.toString=function(){return"<Expression>"},E.prototype.evaluate=function(e){throw new Error("Could not evaluate expression.")},P.prototype=new E,P.prototype.constructor=P,P.superclass=E.prototype;function P(e){arguments.length>0&&this.init(e)}P.prototype.init=function(e){this.rhs=e},O.prototype=new P,O.prototype.constructor=O,O.superclass=P.prototype;function O(e){arguments.length>0&&this.init(e)}O.prototype.init=function(e){O.superclass.init.call(this,e)},O.prototype.evaluate=function(e){return this.rhs.evaluate(e).number().negate()},O.prototype.toString=function(){return"-"+this.rhs.toString()},S.prototype=new E,S.prototype.constructor=S,S.superclass=E.prototype;function S(e,s){arguments.length>0&&this.init(e,s)}S.prototype.init=function(e,s){this.lhs=e,this.rhs=s},G.prototype=new S,G.prototype.constructor=G,G.superclass=S.prototype;function G(e,s){arguments.length>0&&this.init(e,s)}G.prototype.init=function(e,s){G.superclass.init.call(this,e,s)},G.prototype.toString=function(){return"("+this.lhs.toString()+" or "+this.rhs.toString()+")"},G.prototype.evaluate=function(e){var s=this.lhs.evaluate(e).bool();return s.booleanValue()?s:this.rhs.evaluate(e).bool()},ee.prototype=new S,ee.prototype.constructor=ee,ee.superclass=S.prototype;function ee(e,s){arguments.length>0&&this.init(e,s)}ee.prototype.init=function(e,s){ee.superclass.init.call(this,e,s)},ee.prototype.toString=function(){return"("+this.lhs.toString()+" and "+this.rhs.toString()+")"},ee.prototype.evaluate=function(e){var s=this.lhs.evaluate(e).bool();return s.booleanValue()?this.rhs.evaluate(e).bool():s},te.prototype=new S,te.prototype.constructor=te,te.superclass=S.prototype;function te(e,s){arguments.length>0&&this.init(e,s)}te.prototype.init=function(e,s){te.superclass.init.call(this,e,s)},te.prototype.toString=function(){return"("+this.lhs.toString()+" = "+this.rhs.toString()+")"},te.prototype.evaluate=function(e){return this.lhs.evaluate(e).equals(this.rhs.evaluate(e))},g.prototype=new S,g.prototype.constructor=g,g.superclass=S.prototype;function g(e,s){arguments.length>0&&this.init(e,s)}g.prototype.init=function(e,s){g.superclass.init.call(this,e,s)},g.prototype.toString=function(){return"("+this.lhs.toString()+" != "+this.rhs.toString()+")"},g.prototype.evaluate=function(e){return this.lhs.evaluate(e).notequal(this.rhs.evaluate(e))},T.prototype=new S,T.prototype.constructor=T,T.superclass=S.prototype;function T(e,s){arguments.length>0&&this.init(e,s)}T.prototype.init=function(e,s){T.superclass.init.call(this,e,s)},T.prototype.evaluate=function(e){return this.lhs.evaluate(e).lessthan(this.rhs.evaluate(e))},T.prototype.toString=function(){return"("+this.lhs.toString()+" < "+this.rhs.toString()+")"},q.prototype=new S,q.prototype.constructor=q,q.superclass=S.prototype;function q(e,s){arguments.length>0&&this.init(e,s)}q.prototype.init=function(e,s){q.superclass.init.call(this,e,s)},q.prototype.evaluate=function(e){return this.lhs.evaluate(e).greaterthan(this.rhs.evaluate(e))},q.prototype.toString=function(){return"("+this.lhs.toString()+" > "+this.rhs.toString()+")"},j.prototype=new S,j.prototype.constructor=j,j.superclass=S.prototype;function j(e,s){arguments.length>0&&this.init(e,s)}j.prototype.init=function(e,s){j.superclass.init.call(this,e,s)},j.prototype.evaluate=function(e){return this.lhs.evaluate(e).lessthanorequal(this.rhs.evaluate(e))},j.prototype.toString=function(){return"("+this.lhs.toString()+" <= "+this.rhs.toString()+")"},I.prototype=new S,I.prototype.constructor=I,I.superclass=S.prototype;function I(e,s){arguments.length>0&&this.init(e,s)}I.prototype.init=function(e,s){I.superclass.init.call(this,e,s)},I.prototype.evaluate=function(e){return this.lhs.evaluate(e).greaterthanorequal(this.rhs.evaluate(e))},I.prototype.toString=function(){return"("+this.lhs.toString()+" >= "+this.rhs.toString()+")"},re.prototype=new S,re.prototype.constructor=re,re.superclass=S.prototype;function re(e,s){arguments.length>0&&this.init(e,s)}re.prototype.init=function(e,s){re.superclass.init.call(this,e,s)},re.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().plus(this.rhs.evaluate(e).number())},re.prototype.toString=function(){return"("+this.lhs.toString()+" + "+this.rhs.toString()+")"},C.prototype=new S,C.prototype.constructor=C,C.superclass=S.prototype;function C(e,s){arguments.length>0&&this.init(e,s)}C.prototype.init=function(e,s){C.superclass.init.call(this,e,s)},C.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().minus(this.rhs.evaluate(e).number())},C.prototype.toString=function(){return"("+this.lhs.toString()+" - "+this.rhs.toString()+")"},B.prototype=new S,B.prototype.constructor=B,B.superclass=S.prototype;function B(e,s){arguments.length>0&&this.init(e,s)}B.prototype.init=function(e,s){B.superclass.init.call(this,e,s)},B.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().multiply(this.rhs.evaluate(e).number())},B.prototype.toString=function(){return"("+this.lhs.toString()+" * "+this.rhs.toString()+")"},L.prototype=new S,L.prototype.constructor=L,L.superclass=S.prototype;function L(e,s){arguments.length>0&&this.init(e,s)}L.prototype.init=function(e,s){L.superclass.init.call(this,e,s)},L.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().div(this.rhs.evaluate(e).number())},L.prototype.toString=function(){return"("+this.lhs.toString()+" div "+this.rhs.toString()+")"},X.prototype=new S,X.prototype.constructor=X,X.superclass=S.prototype;function X(e,s){arguments.length>0&&this.init(e,s)}X.prototype.init=function(e,s){X.superclass.init.call(this,e,s)},X.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().mod(this.rhs.evaluate(e).number())},X.prototype.toString=function(){return"("+this.lhs.toString()+" mod "+this.rhs.toString()+")"},z.prototype=new S,z.prototype.constructor=z,z.superclass=S.prototype;function z(e,s){arguments.length>0&&this.init(e,s)}z.prototype.init=function(e,s){z.superclass.init.call(this,e,s)},z.prototype.evaluate=function(e){return this.lhs.evaluate(e).nodeset().union(this.rhs.evaluate(e).nodeset())},z.prototype.toString=function(){return _(J,[this.lhs,this.rhs]).join(" | ")},F.prototype=new E,F.prototype.constructor=F,F.superclass=E.prototype;function F(e,s,d){arguments.length>0&&this.init(e,s,d)}F.prototype.init=function(e,s,d){F.superclass.init.call(this),this.filter=e,this.filterPredicates=s,this.locationPath=d};function Y(e){for(;e&&e.parentNode;)e=e.parentNode;return e}var ge=function(e,s,d,b){if(e.length===0)return d;var h=s.extend({});return m(function(w,ie){return h.contextSize=w.length,D(function(xe,Ne){return h.contextNode=xe,h.contextPosition=Ne+1,F.predicateMatches(ie,h)},w)},oe(d,b),e)};F.getRoot=function(e,s){var d=s[0];if(d&&d.nodeType===Z.DOCUMENT_NODE)return d;if(e.virtualRoot)return e.virtualRoot;if(!d)throw new Error("Context node not found when determining document root.");var b=d.ownerDocument;if(b)return b;for(var h=d;h.parentNode!=null;)h=h.parentNode;return h};var Ee=function(e){var s=String(e.name);return s==="xmlns"?"":s.substring(0,6)==="xmlns:"?s.substring(6,s.length):null};F.applyStep=function(e,s,d){if(!d)throw new Error("Context node not found when evaluating XPath step: "+e);var b=[];switch(s.contextNode=d,e.axis){case W.ANCESTOR:if(s.contextNode===s.virtualRoot)break;var h;for(s.contextNode.nodeType==Z.ATTRIBUTE_NODE?h=F.getOwnerElement(s.contextNode):h=s.contextNode.parentNode;h!=null&&(e.nodeTest.matches(h,s)&&b.push(h),h!==s.virtualRoot);)h=h.parentNode;break;case W.ANCESTORORSELF:for(var h=s.contextNode;h!=null&&(e.nodeTest.matches(h,s)&&b.push(h),h!==s.virtualRoot);h=h.nodeType==Z.ATTRIBUTE_NODE?F.getOwnerElement(h):h.parentNode);break;case W.ATTRIBUTE:var w=s.contextNode.attributes;if(w!=null)for(var ie=0;ie<w.length;ie++){var h=w.item(ie);e.nodeTest.matches(h,s)&&b.push(h)}break;case W.CHILD:for(var h=s.contextNode.firstChild;h!=null;h=h.nextSibling)e.nodeTest.matches(h,s)&&b.push(h);break;case W.DESCENDANT:for(var ce=[s.contextNode.firstChild];ce.length>0;)for(var h=ce.pop();h!=null;)e.nodeTest.matches(h,s)&&b.push(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling;break;case W.DESCENDANTORSELF:e.nodeTest.matches(s.contextNode,s)&&b.push(s.contextNode);for(var ce=[s.contextNode.firstChild];ce.length>0;)for(var h=ce.pop();h!=null;)e.nodeTest.matches(h,s)&&b.push(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling;break;case W.FOLLOWING:if(s.contextNode===s.virtualRoot)break;var ce=[];s.contextNode.firstChild!=null?ce.unshift(s.contextNode.firstChild):ce.unshift(s.contextNode.nextSibling);for(var h=s.contextNode.parentNode;h!=null&&h.nodeType!=Z.DOCUMENT_NODE&&h!==s.virtualRoot;h=h.parentNode)ce.unshift(h.nextSibling);do for(var h=ce.pop();h!=null;)e.nodeTest.matches(h,s)&&b.push(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling;while(ce.length>0);break;case W.FOLLOWINGSIBLING:if(s.contextNode===s.virtualRoot)break;for(var h=s.contextNode.nextSibling;h!=null;h=h.nextSibling)e.nodeTest.matches(h,s)&&b.push(h);break;case W.NAMESPACE:var xe={};if(s.contextNode.nodeType==Z.ELEMENT_NODE){xe.xml=new We("xml",null,$.XML_NAMESPACE_URI,s.contextNode);for(var h=s.contextNode;h!=null&&h.nodeType==Z.ELEMENT_NODE;h=h.parentNode)for(var ie=0;ie<h.attributes.length;ie++){var Ne=h.attributes.item(ie),ae=Ee(Ne);ae!=null&&xe[ae]==null&&(xe[ae]=new We(ae,Ne,Ne.value,s.contextNode))}for(var ae in xe){var d=xe[ae];e.nodeTest.matches(d,s)&&b.push(d)}}break;case W.PARENT:h=null,s.contextNode!==s.virtualRoot&&(s.contextNode.nodeType==Z.ATTRIBUTE_NODE?h=F.getOwnerElement(s.contextNode):h=s.contextNode.parentNode),h!=null&&e.nodeTest.matches(h,s)&&b.push(h);break;case W.PRECEDING:var ce;s.virtualRoot!=null?ce=[s.virtualRoot]:ce=[Y(s.contextNode)];e:for(;ce.length>0;)for(var h=ce.pop();h!=null;){if(h==s.contextNode)break e;e.nodeTest.matches(h,s)&&b.unshift(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling}break;case W.PRECEDINGSIBLING:if(s.contextNode===s.virtualRoot)break;for(var h=s.contextNode.previousSibling;h!=null;h=h.previousSibling)e.nodeTest.matches(h,s)&&b.push(h);break;case W.SELF:e.nodeTest.matches(s.contextNode,s)&&b.push(s.contextNode);break}return b};function Te(e,s,d){return ge(e.predicates,s,F.applyStep(e,s,d),U(Be,e.axis))}function ke(e,s,d){return he(_(Te.bind(null,d,e),s))}F.applySteps=function(e,s,d){return m(ke.bind(null,s),d,e)},F.prototype.applyFilter=function(e,s){if(!this.filter)return{nodes:[e.contextNode]};var d=this.filter.evaluate(e);if(!fe.instance_of(d,le)){if(this.filterPredicates!=null&&this.filterPredicates.length>0||this.locationPath!=null)throw new Error("Path expression filter must evaluate to a nodeset if predicates or location path are used");return{nonNodes:d}}return{nodes:ge(this.filterPredicates||[],s,d.toUnsortedArray(),!1)}},F.applyLocationPath=function(e,s,d){if(!e)return d;var b=e.absolute?[F.getRoot(s,d)]:d;return F.applySteps(e.steps,s,b)},F.prototype.evaluate=function(e){var s=ye(new He,e),d=this.applyFilter(e,s);if("nonNodes"in d)return d.nonNodes;var b=new le;return b.addArray(F.applyLocationPath(this.locationPath,s,d.nodes)),b},F.predicateMatches=function(e,s){var d=e.evaluate(s);return fe.instance_of(d,M)?s.contextPosition===d.numberValue():d.booleanValue()},F.predicateString=function(e){return H("[","]",e.toString())},F.predicatesString=function(e){return ue("",_(F.predicateString,e))},F.prototype.toString=function(){if(this.filter!=null){var e=J(this.filter);return fe.instance_of(this.filter,R)?H("'","'",e):this.filterPredicates!=null&&this.filterPredicates.length?H("(",")",e)+F.predicatesString(this.filterPredicates):this.locationPath!=null?e+(this.locationPath.absolute?"":"/")+J(this.locationPath):e}return J(this.locationPath)},F.getOwnerElement=function(e){if(e.ownerElement)return e.ownerElement;try{if(e.selectSingleNode)return e.selectSingleNode("..")}catch{}for(var s=e.nodeType==Z.DOCUMENT_NODE?e:e.ownerDocument,d=s.getElementsByTagName("*"),b=0;b<d.length;b++)for(var h=d.item(b),w=h.attributes,ie=0;ie<w.length;ie++){var xe=w.item(ie);if(xe===e)return h}return null},De.prototype=new Object,De.prototype.constructor=De,De.superclass=Object.prototype;function De(e,s){arguments.length>0&&this.init(e,s)}De.prototype.init=function(e,s){this.absolute=e,this.steps=s},De.prototype.toString=function(){return(this.absolute?"/":"")+_(J,this.steps).join("/")},W.prototype=new Object,W.prototype.constructor=W,W.superclass=Object.prototype;function W(e,s,d){arguments.length>0&&this.init(e,s,d)}W.prototype.init=function(e,s,d){this.axis=e,this.nodeTest=s,this.predicates=d},W.prototype.toString=function(){return W.STEPNAMES[this.axis]+"::"+this.nodeTest.toString()+F.predicatesString(this.predicates)},W.ANCESTOR=0,W.ANCESTORORSELF=1,W.ATTRIBUTE=2,W.CHILD=3,W.DESCENDANT=4,W.DESCENDANTORSELF=5,W.FOLLOWING=6,W.FOLLOWINGSIBLING=7,W.NAMESPACE=8,W.PARENT=9,W.PRECEDING=10,W.PRECEDINGSIBLING=11,W.SELF=12,W.STEPNAMES=m(function(e,s){return e[s[0]]=s[1],e},{},[[W.ANCESTOR,"ancestor"],[W.ANCESTORORSELF,"ancestor-or-self"],[W.ATTRIBUTE,"attribute"],[W.CHILD,"child"],[W.DESCENDANT,"descendant"],[W.DESCENDANTORSELF,"descendant-or-self"],[W.FOLLOWING,"following"],[W.FOLLOWINGSIBLING,"following-sibling"],[W.NAMESPACE,"namespace"],[W.PARENT,"parent"],[W.PRECEDING,"preceding"],[W.PRECEDINGSIBLING,"preceding-sibling"],[W.SELF,"self"]]);var Be=[W.ANCESTOR,W.ANCESTORORSELF,W.PARENT,W.PRECEDING,W.PRECEDINGSIBLING];A.prototype=new Object,A.prototype.constructor=A,A.superclass=Object.prototype;function A(e,s){arguments.length>0&&this.init(e,s)}A.prototype.init=function(e,s){this.type=e,this.value=s},A.prototype.toString=function(){return"<unknown nodetest type>"},A.prototype.matches=function(e,s){console.warn("unknown node test type")},A.NAMETESTANY=0,A.NAMETESTPREFIXANY=1,A.NAMETESTQNAME=2,A.COMMENT=3,A.TEXT=4,A.PI=5,A.NODE=6,A.isNodeType=function(e){return function(s){return U(e,s.nodeType)}},A.makeNodeTestType=function(e,s,d){var b=d||function(){};return b.prototype=new A(e),b.prototype.constructor=b,ye(b.prototype,s),b},A.makeNodeTypeTest=function(e,s,d){return new(A.makeNodeTestType(e,{matches:A.isNodeType(s),toString:K(d)}))},A.hasPrefix=function(e){return e.prefix||(e.nodeName||e.tagName).indexOf(":")!==-1},A.isElementOrAttribute=A.isNodeType([1,2]),A.nameSpaceMatches=function(e,s,d){var b=d.namespaceURI||"";if(!e)return!b||s.allowAnyNamespaceForNoPrefix&&!A.hasPrefix(d);var h=s.namespaceResolver.getNamespace(e,s.expressionContextNode);if(h==null)throw new Error("Cannot resolve QName "+e);return h===b},A.localNameMatches=function(e,s,d){var b=d.localName||d.nodeName;return s.caseInsensitive?e.toLowerCase()===b.toLowerCase():e===b},A.NameTestPrefixAny=A.makeNodeTestType(A.NAMETESTPREFIXANY,{matches:function(e,s){return A.isElementOrAttribute(e)&&A.nameSpaceMatches(this.prefix,s,e)},toString:function(){return this.prefix+":*"}},function(s){this.prefix=s}),A.NameTestQName=A.makeNodeTestType(A.NAMETESTQNAME,{matches:function(e,s){return A.isNodeType([Z.ELEMENT_NODE,Z.ATTRIBUTE_NODE,Z.NAMESPACE_NODE])(e)&&A.nameSpaceMatches(this.prefix,s,e)&&A.localNameMatches(this.localName,s,e)},toString:function(){return this.name}},function(s){var d=s.split(":");this.name=s,this.prefix=d.length>1?d[0]:null,this.localName=d[d.length>1?1:0]}),A.PITest=A.makeNodeTestType(A.PI,{matches:function(e,s){return A.isNodeType([Z.PROCESSING_INSTRUCTION_NODE])(e)&&(e.target||e.nodeName)===this.name},toString:function(){return H('processing-instruction("','")',this.name)}},function(e){this.name=e}),A.nameTestAny=A.makeNodeTypeTest(A.NAMETESTANY,[Z.ELEMENT_NODE,Z.ATTRIBUTE_NODE,Z.NAMESPACE_NODE],"*"),A.textTest=A.makeNodeTypeTest(A.TEXT,[Z.TEXT_NODE,Z.CDATA_SECTION_NODE],"text()"),A.commentTest=A.makeNodeTypeTest(A.COMMENT,[Z.COMMENT_NODE],"comment()"),A.nodeTest=A.makeNodeTypeTest(A.NODE,[Z.ELEMENT_NODE,Z.ATTRIBUTE_NODE,Z.TEXT_NODE,Z.CDATA_SECTION_NODE,Z.PROCESSING_INSTRUCTION_NODE,Z.COMMENT_NODE,Z.DOCUMENT_NODE],"node()"),A.anyPiTest=A.makeNodeTypeTest(A.PI,[Z.PROCESSING_INSTRUCTION_NODE],"processing-instruction()"),se.prototype=new E,se.prototype.constructor=se,se.superclass=E.prototype;function se(e){arguments.length>0&&this.init(e)}se.prototype.init=function(e){this.variable=e},se.prototype.toString=function(){return"$"+this.variable},se.prototype.evaluate=function(e){var s=fe.resolveQName(this.variable,e.namespaceResolver,e.contextNode,!1);if(s[0]==null)throw new Error("Cannot resolve QName "+fn);var d=e.variableResolver.getVariable(s[1],s[0]);if(!d)throw Me.fromMessage("Undeclared variable: "+this.toString());return d},Ce.prototype=new E,Ce.prototype.constructor=Ce,Ce.superclass=E.prototype;function Ce(e,s){arguments.length>0&&this.init(e,s)}Ce.prototype.init=function(e,s){this.functionName=e,this.arguments=s},Ce.prototype.toString=function(){for(var e=this.functionName+"(",s=0;s<this.arguments.length;s++)s>0&&(e+=", "),e+=this.arguments[s].toString();return e+")"},Ce.prototype.evaluate=function(e){var s=Pe.getFunctionFromContext(this.functionName,e);if(!s)throw new Error("Unknown function "+this.functionName);var d=[e].concat(this.arguments);return s.apply(e.functionResolver.thisArg,d)};var be=new Object;be.equals=function(e,s){return e.equals(s)},be.notequal=function(e,s){return e.notequal(s)},be.lessthan=function(e,s){return e.lessthan(s)},be.greaterthan=function(e,s){return e.greaterthan(s)},be.lessthanorequal=function(e,s){return e.lessthanorequal(s)},be.greaterthanorequal=function(e,s){return e.greaterthanorequal(s)},R.prototype=new E,R.prototype.constructor=R,R.superclass=E.prototype;function R(e){arguments.length>0&&this.init(e)}R.prototype.init=function(e){this.str=String(e)},R.prototype.toString=function(){return this.str},R.prototype.evaluate=function(e){return this},R.prototype.string=function(){return this},R.prototype.number=function(){return new M(this.str)},R.prototype.bool=function(){return new pe(this.str)},R.prototype.nodeset=function(){throw new Error("Cannot convert string to nodeset")},R.prototype.stringValue=function(){return this.str},R.prototype.numberValue=function(){return this.number().numberValue()},R.prototype.booleanValue=function(){return this.bool().booleanValue()},R.prototype.equals=function(e){return fe.instance_of(e,pe)?this.bool().equals(e):fe.instance_of(e,M)?this.number().equals(e):fe.instance_of(e,le)?e.compareWithString(this,be.equals):new pe(this.str==e.str)},R.prototype.notequal=function(e){return fe.instance_of(e,pe)?this.bool().notequal(e):fe.instance_of(e,M)?this.number().notequal(e):fe.instance_of(e,le)?e.compareWithString(this,be.notequal):new pe(this.str!=e.str)},R.prototype.lessthan=function(e){return this.number().lessthan(e)},R.prototype.greaterthan=function(e){return this.number().greaterthan(e)},R.prototype.lessthanorequal=function(e){return this.number().lessthanorequal(e)},R.prototype.greaterthanorequal=function(e){return this.number().greaterthanorequal(e)},M.prototype=new E,M.prototype.constructor=M,M.superclass=E.prototype;function M(e){arguments.length>0&&this.init(e)}M.prototype.init=function(e){this.num=typeof e=="string"?this.parse(e):Number(e)},M.prototype.numberFormat=/^\s*-?[0-9]*\.?[0-9]+\s*$/,M.prototype.parse=function(e){return this.numberFormat.test(e)?parseFloat(e):Number.NaN};function Re(e){for(var s=e.split("e-"),d=s[0].replace(".",""),b=Number(s[1]),h=0;h<b-1;h+=1)d="0"+d;return"0."+d}function Ue(e){for(var s=e.split("e"),d=s[0].replace(".",""),b=Number(s[1]),h=b+1-d.length,w=0;w<h;w+=1)d+="0";return d}M.prototype.toString=function(){var e=this.num.toString();return e.indexOf("e-")!==-1?Re(e):e.indexOf("e")!==-1?Ue(e):e},M.prototype.evaluate=function(e){return this},M.prototype.string=function(){return new R(this.toString())},M.prototype.number=function(){return this},M.prototype.bool=function(){return new pe(this.num)},M.prototype.nodeset=function(){throw new Error("Cannot convert number to nodeset")},M.prototype.stringValue=function(){return this.string().stringValue()},M.prototype.numberValue=function(){return this.num},M.prototype.booleanValue=function(){return this.bool().booleanValue()},M.prototype.negate=function(){return new M(-this.num)},M.prototype.equals=function(e){return fe.instance_of(e,pe)?this.bool().equals(e):fe.instance_of(e,R)?this.equals(e.number()):fe.instance_of(e,le)?e.compareWithNumber(this,be.equals):new pe(this.num==e.num)},M.prototype.notequal=function(e){return fe.instance_of(e,pe)?this.bool().notequal(e):fe.instance_of(e,R)?this.notequal(e.number()):fe.instance_of(e,le)?e.compareWithNumber(this,be.notequal):new pe(this.num!=e.num)},M.prototype.lessthan=function(e){return fe.instance_of(e,le)?e.compareWithNumber(this,be.greaterthan):fe.instance_of(e,pe)||fe.instance_of(e,R)?this.lessthan(e.number()):new pe(this.num<e.num)},M.prototype.greaterthan=function(e){return fe.instance_of(e,le)?e.compareWithNumber(this,be.lessthan):fe.instance_of(e,pe)||fe.instance_of(e,R)?this.greaterthan(e.number()):new pe(this.num>e.num)},M.prototype.lessthanorequal=function(e){return fe.instance_of(e,le)?e.compareWithNumber(this,be.greaterthanorequal):fe.instance_of(e,pe)||fe.instance_of(e,R)?this.lessthanorequal(e.number()):new pe(this.num<=e.num)},M.prototype.greaterthanorequal=function(e){return fe.instance_of(e,le)?e.compareWithNumber(this,be.lessthanorequal):fe.instance_of(e,pe)||fe.instance_of(e,R)?this.greaterthanorequal(e.number()):new pe(this.num>=e.num)},M.prototype.plus=function(e){return new M(this.num+e.num)},M.prototype.minus=function(e){return new M(this.num-e.num)},M.prototype.multiply=function(e){return new M(this.num*e.num)},M.prototype.div=function(e){return new M(this.num/e.num)},M.prototype.mod=function(e){return new M(this.num%e.num)},pe.prototype=new E,pe.prototype.constructor=pe,pe.superclass=E.prototype;function pe(e){arguments.length>0&&this.init(e)}pe.prototype.init=function(e){this.b=!!e},pe.prototype.toString=function(){return this.b.toString()},pe.prototype.evaluate=function(e){return this},pe.prototype.string=function(){return new R(this.b)},pe.prototype.number=function(){return new M(this.b)},pe.prototype.bool=function(){return this},pe.prototype.nodeset=function(){throw new Error("Cannot convert boolean to nodeset")},pe.prototype.stringValue=function(){return this.string().stringValue()},pe.prototype.numberValue=function(){return this.number().numberValue()},pe.prototype.booleanValue=function(){return this.b},pe.prototype.not=function(){return new pe(!this.b)},pe.prototype.equals=function(e){return fe.instance_of(e,R)||fe.instance_of(e,M)?this.equals(e.bool()):fe.instance_of(e,le)?e.compareWithBoolean(this,be.equals):new pe(this.b==e.b)},pe.prototype.notequal=function(e){return fe.instance_of(e,R)||fe.instance_of(e,M)?this.notequal(e.bool()):fe.instance_of(e,le)?e.compareWithBoolean(this,be.notequal):new pe(this.b!=e.b)},pe.prototype.lessthan=function(e){return this.number().lessthan(e)},pe.prototype.greaterthan=function(e){return this.number().greaterthan(e)},pe.prototype.lessthanorequal=function(e){return this.number().lessthanorequal(e)},pe.prototype.greaterthanorequal=function(e){return this.number().greaterthanorequal(e)},pe.true_=new pe(!0),pe.false_=new pe(!1),Ie.prototype=new Object,Ie.prototype.constructor=Ie,Ie.superclass=Object.prototype;function Ie(e){this.init(e)}Ie.prototype.init=function(e){this.left=null,this.right=null,this.node=e,this.depth=1},Ie.prototype.balance=function(){var e=this.left==null?0:this.left.depth,s=this.right==null?0:this.right.depth;if(e>s+1){var d=this.left.left==null?0:this.left.left.depth,b=this.left.right==null?0:this.left.right.depth;d<b&&this.left.rotateRR(),this.rotateLL()}else if(e+1<s){var h=this.right.right==null?0:this.right.right.depth,w=this.right.left==null?0:this.right.left.depth;w>h&&this.right.rotateLL(),this.rotateRR()}},Ie.prototype.rotateLL=function(){var e=this.node,s=this.right;this.node=this.left.node,this.right=this.left,this.left=this.left.left,this.right.left=this.right.right,this.right.right=s,this.right.node=e,this.right.updateInNewLocation(),this.updateInNewLocation()},Ie.prototype.rotateRR=function(){var e=this.node,s=this.left;this.node=this.right.node,this.left=this.right,this.right=this.right.right,this.left.right=this.left.left,this.left.left=s,this.left.node=e,this.left.updateInNewLocation(),this.updateInNewLocation()},Ie.prototype.updateInNewLocation=function(){this.getDepthFromChildren()},Ie.prototype.getDepthFromChildren=function(){this.depth=this.node==null?0:1,this.left!=null&&(this.depth=this.left.depth+1),this.right!=null&&this.depth<=this.right.depth&&(this.depth=this.right.depth+1)};function gt(e,s){if(e===s)return 0;if(e.compareDocumentPosition){var d=e.compareDocumentPosition(s);return d&1||d&10?1:d&20?-1:0}for(var b=0,h=0,w=e;w!=null;w=w.parentNode||w.ownerElement)b++;for(var ie=s;ie!=null;ie=ie.parentNode||ie.ownerElement)h++;if(b>h){for(;b>h;)e=e.parentNode||e.ownerElement,b--;if(e===s)return 1}else if(h>b){for(;h>b;)s=s.parentNode||s.ownerElement,h--;if(e===s)return-1}for(var xe=e.parentNode||e.ownerElement,Ne=s.parentNode||s.ownerElement;xe!==Ne;)e=xe,s=Ne,xe=e.parentNode||e.ownerElement,Ne=s.parentNode||s.ownerElement;var ae=Et(e),ce=Et(s);if(ae&&!ce)return-1;if(!ae&&ce)return 1;if(e.isXPathNamespace){if(e.nodeValue===$.XML_NAMESPACE_URI||!s.isXPathNamespace)return-1;if(s.nodeValue===$.XML_NAMESPACE_URI)return 1}else if(s.isXPathNamespace)return 1;if(xe)for(var Le=ae?xe.attributes:xe.childNodes,Ke=Le.length,Se=e.baseNode||e,Qe=s.baseNode||s,Xe=0;Xe<Ke;Xe+=1){var ot=Le[Xe];if(ot===Se)return-1;if(ot===Qe)return 1}throw new Error("Unexpected: could not determine node order")}Ie.prototype.add=function(e){if(e===this.node)return!1;var s=gt(e,this.node),d=!1;return s==-1?this.left==null?(this.left=new Ie(e),d=!0):(d=this.left.add(e),d&&this.balance()):s==1&&(this.right==null?(this.right=new Ie(e),d=!0):(d=this.right.add(e),d&&this.balance())),d&&this.getDepthFromChildren(),d},le.prototype=new E,le.prototype.constructor=le,le.superclass=E.prototype;function le(){this.init()}le.prototype.init=function(){this.tree=null,this.nodes=[],this.size=0},le.prototype.toString=function(){var e=this.first();return e==null?"":this.stringForNode(e)},le.prototype.evaluate=function(e){return this},le.prototype.string=function(){return new R(this.toString())},le.prototype.stringValue=function(){return this.toString()},le.prototype.number=function(){return new M(this.string())},le.prototype.numberValue=function(){return Number(this.string())},le.prototype.bool=function(){return new pe(this.booleanValue())},le.prototype.booleanValue=function(){return!!this.size},le.prototype.nodeset=function(){return this},le.prototype.stringForNode=function(e){return e.nodeType==Z.DOCUMENT_NODE||e.nodeType==Z.ELEMENT_NODE||e.nodeType===Z.DOCUMENT_FRAGMENT_NODE?this.stringForContainerNode(e):e.nodeType===Z.ATTRIBUTE_NODE?e.value||e.nodeValue:e.isNamespaceNode?e.namespace:e.nodeValue},le.prototype.stringForContainerNode=function(e){for(var s="",d=e.firstChild;d!=null;d=d.nextSibling){var b=d.nodeType;(b===1||b===3||b===4||b===9||b===11)&&(s+=this.stringForNode(d))}return s},le.prototype.buildTree=function(){if(!this.tree&&this.nodes.length){this.tree=new Ie(this.nodes[0]);for(var e=1;e<this.nodes.length;e+=1)this.tree.add(this.nodes[e])}return this.tree},le.prototype.first=function(){var e=this.buildTree();if(e==null)return null;for(;e.left!=null;)e=e.left;return e.node},le.prototype.add=function(e){for(var s=0;s<this.nodes.length;s+=1)if(e===this.nodes[s])return;this.tree=null,this.nodes.push(e),this.size+=1},le.prototype.addArray=function(e){var s=this;p(function(d){s.add(d)},e)},le.prototype.toArray=function(){var e=[];return this.toArrayRec(this.buildTree(),e),e},le.prototype.toArrayRec=function(e,s){e!=null&&(this.toArrayRec(e.left,s),s.push(e.node),this.toArrayRec(e.right,s))},le.prototype.toUnsortedArray=function(){return this.nodes.slice()},le.prototype.compareWithString=function(e,s){for(var d=this.toUnsortedArray(),b=0;b<d.length;b++){var h=d[b],w=new R(this.stringForNode(h)),ie=s(w,e);if(ie.booleanValue())return ie}return new pe(!1)},le.prototype.compareWithNumber=function(e,s){for(var d=this.toUnsortedArray(),b=0;b<d.length;b++){var h=d[b],w=new M(this.stringForNode(h)),ie=s(w,e);if(ie.booleanValue())return ie}return new pe(!1)},le.prototype.compareWithBoolean=function(e,s){return s(this.bool(),e)},le.prototype.compareWithNodeSet=function(e,s){for(var d=this.toUnsortedArray(),b=function(xe,Ne){return s(Ne,xe)},h=0;h<d.length;h++){var w=new R(this.stringForNode(d[h])),ie=e.compareWithString(w,b);if(ie.booleanValue())return ie}return new pe(!1)},le.compareWith=x(function(e,s){return fe.instance_of(s,R)?this.compareWithString(s,e):fe.instance_of(s,M)?this.compareWithNumber(s,e):fe.instance_of(s,pe)?this.compareWithBoolean(s,e):this.compareWithNodeSet(s,e)}),le.prototype.equals=le.compareWith(be.equals),le.prototype.notequal=le.compareWith(be.notequal),le.prototype.lessthan=le.compareWith(be.lessthan),le.prototype.greaterthan=le.compareWith(be.greaterthan),le.prototype.lessthanorequal=le.compareWith(be.lessthanorequal),le.prototype.greaterthanorequal=le.compareWith(be.greaterthanorequal),le.prototype.union=function(e){var s=new le;return s.addArray(this.toUnsortedArray()),s.addArray(e.toUnsortedArray()),s},We.prototype=new Object,We.prototype.constructor=We,We.superclass=Object.prototype;function We(e,s,d,b){this.isXPathNamespace=!0,this.baseNode=s,this.ownerDocument=b.ownerDocument,this.nodeName=e,this.prefix=e,this.localName=e,this.namespaceURI=null,this.nodeValue=d,this.ownerElement=b,this.nodeType=Z.NAMESPACE_NODE}We.prototype.toString=function(){return'{ "'+this.prefix+'", "'+this.namespaceURI+'" }'},He.prototype=new Object,He.prototype.constructor=He,He.superclass=Object.prototype;function He(e,s,d){this.variableResolver=e??new Ge,this.namespaceResolver=s??new je,this.functionResolver=d??new Pe}He.prototype.extend=function(e){return ye(new He,this,e)},Ge.prototype=new Object,Ge.prototype.constructor=Ge,Ge.superclass=Object.prototype;function Ge(){}Ge.prototype.getVariable=function(e,s){return null},Pe.prototype=new Object,Pe.prototype.constructor=Pe,Pe.superclass=Object.prototype;function Pe(e){this.thisArg=e??me,this.functions=new Object,this.addStandardFunctions()}Pe.prototype.addStandardFunctions=function(){this.functions["{}last"]=me.last,this.functions["{}position"]=me.position,this.functions["{}count"]=me.count,this.functions["{}id"]=me.id,this.functions["{}local-name"]=me.localName,this.functions["{}namespace-uri"]=me.namespaceURI,this.functions["{}name"]=me.name,this.functions["{}string"]=me.string,this.functions["{}concat"]=me.concat,this.functions["{}starts-with"]=me.startsWith,this.functions["{}contains"]=me.contains,this.functions["{}substring-before"]=me.substringBefore,this.functions["{}substring-after"]=me.substringAfter,this.functions["{}substring"]=me.substring,this.functions["{}string-length"]=me.stringLength,this.functions["{}normalize-space"]=me.normalizeSpace,this.functions["{}translate"]=me.translate,this.functions["{}boolean"]=me.boolean_,this.functions["{}not"]=me.not,this.functions["{}true"]=me.true_,this.functions["{}false"]=me.false_,this.functions["{}lang"]=me.lang,this.functions["{}number"]=me.number,this.functions["{}sum"]=me.sum,this.functions["{}floor"]=me.floor,this.functions["{}ceiling"]=me.ceiling,this.functions["{}round"]=me.round},Pe.prototype.addFunction=function(e,s,d){this.functions["{"+e+"}"+s]=d},Pe.getFunctionFromContext=function(e,s){var d=fe.resolveQName(e,s.namespaceResolver,s.contextNode,!1);if(d[0]===null)throw new Error("Cannot resolve QName "+name);return s.functionResolver.getFunction(d[1],d[0])},Pe.prototype.getFunction=function(e,s){return this.functions["{"+s+"}"+e]},je.prototype=new Object,je.prototype.constructor=je,je.superclass=Object.prototype;function je(){}je.prototype.getNamespace=function(e,s){if(e=="xml")return $.XML_NAMESPACE_URI;if(e=="xmlns")return $.XMLNS_NAMESPACE_URI;for(s.nodeType==Z.DOCUMENT_NODE?s=s.documentElement:s.nodeType==Z.ATTRIBUTE_NODE?s=F.getOwnerElement(s):s.nodeType!=Z.ELEMENT_NODE&&(s=s.parentNode);s!=null&&s.nodeType==Z.ELEMENT_NODE;){for(var d=s.attributes,b=0;b<d.length;b++){var h=d.item(b),w=h.name||h.nodeName;if(w==="xmlns"&&e===""||w==="xmlns:"+e)return String(h.value||h.nodeValue)}s=s.parentNode}return null};var me=new Object;me.last=function(e){if(arguments.length!=1)throw new Error("Function last expects ()");return new M(e.contextSize)},me.position=function(e){if(arguments.length!=1)throw new Error("Function position expects ()");return new M(e.contextPosition)},me.count=function(){var e=arguments[0],s;if(arguments.length!=2||!fe.instance_of(s=arguments[1].evaluate(e),le))throw new Error("Function count expects (node-set)");return new M(s.size)},me.id=function(){var e=arguments[0],s;if(arguments.length!=2)throw new Error("Function id expects (object)");s=arguments[1].evaluate(e),fe.instance_of(s,le)?s=s.toArray().join(" "):s=s.stringValue();for(var d=s.split(/[\x0d\x0a\x09\x20]+/),b=new le,h=e.contextNode.nodeType==Z.DOCUMENT_NODE?e.contextNode:e.contextNode.ownerDocument,w=0;w<d.length;w++){var ie;h.getElementById?ie=h.getElementById(d[w]):ie=fe.getElementById(h,d[w]),ie!=null&&b.add(ie)}return b},me.localName=function(e,s){var d;if(arguments.length==1)d=e.contextNode;else if(arguments.length==2)d=s.evaluate(e).first();else throw new Error("Function local-name expects (node-set?)");return d==null?new R(""):new R(d.localName||d.baseName||d.target||d.nodeName||"")},me.namespaceURI=function(){var e=arguments[0],s;if(arguments.length==1)s=e.contextNode;else if(arguments.length==2)s=arguments[1].evaluate(e).first();else throw new Error("Function namespace-uri expects (node-set?)");return s==null?new R(""):new R(s.namespaceURI||"")},me.name=function(){var e=arguments[0],s;if(arguments.length==1)s=e.contextNode;else if(arguments.length==2)s=arguments[1].evaluate(e).first();else throw new Error("Function name expects (node-set?)");return s==null?new R(""):s.nodeType==Z.ELEMENT_NODE?new R(s.nodeName):s.nodeType==Z.ATTRIBUTE_NODE?new R(s.name||s.nodeName):s.nodeType===Z.PROCESSING_INSTRUCTION_NODE?new R(s.target||s.nodeName):s.localName==null?new R(""):new R(s.localName)},me.string=function(){var e=arguments[0];if(arguments.length==1)return new R(le.prototype.stringForNode(e.contextNode));if(arguments.length==2)return arguments[1].evaluate(e).string();throw new Error("Function string expects (object?)")},me.concat=function(e){if(arguments.length<3)throw new Error("Function concat expects (string, string[, string]*)");for(var s="",d=1;d<arguments.length;d++)s+=arguments[d].evaluate(e).stringValue();return new R(s)},me.startsWith=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function startsWith expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();return new pe(s.substring(0,d.length)==d)},me.contains=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function contains expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();return new pe(s.indexOf(d)!==-1)},me.substringBefore=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function substring-before expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();return new R(s.substring(0,s.indexOf(d)))},me.substringAfter=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function substring-after expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();if(d.length==0)return new R(s);var b=s.indexOf(d);return b==-1?new R(""):new R(s.substring(b+d.length))},me.substring=function(){var e=arguments[0];if(!(arguments.length==3||arguments.length==4))throw new Error("Function substring expects (string, number, number?)");var s=arguments[1].evaluate(e).stringValue(),d=Math.round(arguments[2].evaluate(e).numberValue())-1,b=arguments.length==4?d+Math.round(arguments[3].evaluate(e).numberValue()):void 0;return new R(s.substring(d,b))},me.stringLength=function(){var e=arguments[0],s;if(arguments.length==1)s=le.prototype.stringForNode(e.contextNode);else if(arguments.length==2)s=arguments[1].evaluate(e).stringValue();else throw new Error("Function string-length expects (string?)");return new M(s.length)},me.normalizeSpace=function(){var e=arguments[0],s;if(arguments.length==1)s=le.prototype.stringForNode(e.contextNode);else if(arguments.length==2)s=arguments[1].evaluate(e).stringValue();else throw new Error("Function normalize-space expects (string?)");for(var d=0,b=s.length-1;fe.isSpace(s.charCodeAt(b));)b--;for(var h="";d<=b&&fe.isSpace(s.charCodeAt(d));)d++;for(;d<=b;)if(fe.isSpace(s.charCodeAt(d)))for(h+=" ";d<=b&&fe.isSpace(s.charCodeAt(d));)d++;else h+=s.charAt(d),d++;return new R(h)},me.translate=function(e,s,d,b){if(arguments.length!=4)throw new Error("Function translate expects (string, string, string)");var h=s.evaluate(e).stringValue(),w=d.evaluate(e).stringValue(),ie=b.evaluate(e).stringValue(),xe=m(function(ae,ce,Le){return ce in ae||(ae[ce]=Le>ie.length?"":ie[Le]),ae},{},w),Ne=ue("",_(function(ae){return ae in xe?xe[ae]:ae},h));return new R(Ne)},me.boolean_=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function boolean expects (object)");return arguments[1].evaluate(e).bool()},me.not=function(e,s){if(arguments.length!=2)throw new Error("Function not expects (object)");return s.evaluate(e).bool().not()},me.true_=function(){if(arguments.length!=1)throw new Error("Function true expects ()");return pe.true_},me.false_=function(){if(arguments.length!=1)throw new Error("Function false expects ()");return pe.false_},me.lang=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function lang expects (string)");for(var s,d=e.contextNode;d!=null&&d.nodeType!=Z.DOCUMENT_NODE;d=d.parentNode){var b=d.getAttributeNS($.XML_NAMESPACE_URI,"lang");if(b!=null){s=String(b);break}}if(s==null)return pe.false_;var h=arguments[1].evaluate(e).stringValue();return new pe(s.substring(0,h.length)==h&&(s.length==h.length||s.charAt(h.length)=="-"))},me.number=function(){var e=arguments[0];if(!(arguments.length==1||arguments.length==2))throw new Error("Function number expects (object?)");return arguments.length==1?new M(le.prototype.stringForNode(e.contextNode)):arguments[1].evaluate(e).number()},me.sum=function(){var e=arguments[0],s;if(arguments.length!=2||!fe.instance_of(s=arguments[1].evaluate(e),le))throw new Error("Function sum expects (node-set)");s=s.toUnsortedArray();for(var d=0,b=0;b<s.length;b++)d+=new M(le.prototype.stringForNode(s[b])).numberValue();return new M(d)},me.floor=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function floor expects (number)");return new M(Math.floor(arguments[1].evaluate(e).numberValue()))},me.ceiling=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function ceiling expects (number)");return new M(Math.ceil(arguments[1].evaluate(e).numberValue()))},me.round=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function round expects (number)");return new M(Math.round(arguments[1].evaluate(e).numberValue()))};var fe=new Object,Et=function(e){return e&&(e.nodeType===Z.ATTRIBUTE_NODE||e.ownerElement||e.isXPathNamespace)};fe.splitQName=function(e){var s=e.indexOf(":");return s==-1?[null,e]:[e.substring(0,s),e.substring(s+1)]},fe.resolveQName=function(e,s,d,b){var h=fe.splitQName(e);return h[0]!=null?h[0]=s.getNamespace(h[0],d):b?(h[0]=s.getNamespace("",d),h[0]==null&&(h[0]="")):h[0]="",h},fe.isSpace=function(e){return e==9||e==13||e==10||e==32},fe.isLetter=function(e){return e>=65&&e<=90||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=255||e>=256&&e<=305||e>=308&&e<=318||e>=321&&e<=328||e>=330&&e<=382||e>=384&&e<=451||e>=461&&e<=496||e>=500&&e<=501||e>=506&&e<=535||e>=592&&e<=680||e>=699&&e<=705||e==902||e>=904&&e<=906||e==908||e>=910&&e<=929||e>=931&&e<=974||e>=976&&e<=982||e==986||e==988||e==990||e==992||e>=994&&e<=1011||e>=1025&&e<=1036||e>=1038&&e<=1103||e>=1105&&e<=1116||e>=1118&&e<=1153||e>=1168&&e<=1220||e>=1223&&e<=1224||e>=1227&&e<=1228||e>=1232&&e<=1259||e>=1262&&e<=1269||e>=1272&&e<=1273||e>=1329&&e<=1366||e==1369||e>=1377&&e<=1414||e>=1488&&e<=1514||e>=1520&&e<=1522||e>=1569&&e<=1594||e>=1601&&e<=1610||e>=1649&&e<=1719||e>=1722&&e<=1726||e>=1728&&e<=1742||e>=1744&&e<=1747||e==1749||e>=1765&&e<=1766||e>=2309&&e<=2361||e==2365||e>=2392&&e<=2401||e>=2437&&e<=2444||e>=2447&&e<=2448||e>=2451&&e<=2472||e>=2474&&e<=2480||e==2482||e>=2486&&e<=2489||e>=2524&&e<=2525||e>=2527&&e<=2529||e>=2544&&e<=2545||e>=2565&&e<=2570||e>=2575&&e<=2576||e>=2579&&e<=2600||e>=2602&&e<=2608||e>=2610&&e<=2611||e>=2613&&e<=2614||e>=2616&&e<=2617||e>=2649&&e<=2652||e==2654||e>=2674&&e<=2676||e>=2693&&e<=2699||e==2701||e>=2703&&e<=2705||e>=2707&&e<=2728||e>=2730&&e<=2736||e>=2738&&e<=2739||e>=2741&&e<=2745||e==2749||e==2784||e>=2821&&e<=2828||e>=2831&&e<=2832||e>=2835&&e<=2856||e>=2858&&e<=2864||e>=2866&&e<=2867||e>=2870&&e<=2873||e==2877||e>=2908&&e<=2909||e>=2911&&e<=2913||e>=2949&&e<=2954||e>=2958&&e<=2960||e>=2962&&e<=2965||e>=2969&&e<=2970||e==2972||e>=2974&&e<=2975||e>=2979&&e<=2980||e>=2984&&e<=2986||e>=2990&&e<=2997||e>=2999&&e<=3001||e>=3077&&e<=3084||e>=3086&&e<=3088||e>=3090&&e<=3112||e>=3114&&e<=3123||e>=3125&&e<=3129||e>=3168&&e<=3169||e>=3205&&e<=3212||e>=3214&&e<=3216||e>=3218&&e<=3240||e>=3242&&e<=3251||e>=3253&&e<=3257||e==3294||e>=3296&&e<=3297||e>=3333&&e<=3340||e>=3342&&e<=3344||e>=3346&&e<=3368||e>=3370&&e<=3385||e>=3424&&e<=3425||e>=3585&&e<=3630||e==3632||e>=3634&&e<=3635||e>=3648&&e<=3653||e>=3713&&e<=3714||e==3716||e>=3719&&e<=3720||e==3722||e==3725||e>=3732&&e<=3735||e>=3737&&e<=3743||e>=3745&&e<=3747||e==3749||e==3751||e>=3754&&e<=3755||e>=3757&&e<=3758||e==3760||e>=3762&&e<=3763||e==3773||e>=3776&&e<=3780||e>=3904&&e<=3911||e>=3913&&e<=3945||e>=4256&&e<=4293||e>=4304&&e<=4342||e==4352||e>=4354&&e<=4355||e>=4357&&e<=4359||e==4361||e>=4363&&e<=4364||e>=4366&&e<=4370||e==4412||e==4414||e==4416||e==4428||e==4430||e==4432||e>=4436&&e<=4437||e==4441||e>=4447&&e<=4449||e==4451||e==4453||e==4455||e==4457||e>=4461&&e<=4462||e>=4466&&e<=4467||e==4469||e==4510||e==4520||e==4523||e>=4526&&e<=4527||e>=4535&&e<=4536||e==4538||e>=4540&&e<=4546||e==4587||e==4592||e==4601||e>=7680&&e<=7835||e>=7840&&e<=7929||e>=7936&&e<=7957||e>=7960&&e<=7965||e>=7968&&e<=8005||e>=8008&&e<=8013||e>=8016&&e<=8023||e==8025||e==8027||e==8029||e>=8031&&e<=8061||e>=8064&&e<=8116||e>=8118&&e<=8124||e==8126||e>=8130&&e<=8132||e>=8134&&e<=8140||e>=8144&&e<=8147||e>=8150&&e<=8155||e>=8160&&e<=8172||e>=8178&&e<=8180||e>=8182&&e<=8188||e==8486||e>=8490&&e<=8491||e==8494||e>=8576&&e<=8578||e>=12353&&e<=12436||e>=12449&&e<=12538||e>=12549&&e<=12588||e>=44032&&e<=55203||e>=19968&&e<=40869||e==12295||e>=12321&&e<=12329},fe.isNCNameChar=function(e){return e>=48&&e<=57||e>=1632&&e<=1641||e>=1776&&e<=1785||e>=2406&&e<=2415||e>=2534&&e<=2543||e>=2662&&e<=2671||e>=2790&&e<=2799||e>=2918&&e<=2927||e>=3047&&e<=3055||e>=3174&&e<=3183||e>=3302&&e<=3311||e>=3430&&e<=3439||e>=3664&&e<=3673||e>=3792&&e<=3801||e>=3872&&e<=3881||e==46||e==45||e==95||fe.isLetter(e)||e>=768&&e<=837||e>=864&&e<=865||e>=1155&&e<=1158||e>=1425&&e<=1441||e>=1443&&e<=1465||e>=1467&&e<=1469||e==1471||e>=1473&&e<=1474||e==1476||e>=1611&&e<=1618||e==1648||e>=1750&&e<=1756||e>=1757&&e<=1759||e>=1760&&e<=1764||e>=1767&&e<=1768||e>=1770&&e<=1773||e>=2305&&e<=2307||e==2364||e>=2366&&e<=2380||e==2381||e>=2385&&e<=2388||e>=2402&&e<=2403||e>=2433&&e<=2435||e==2492||e==2494||e==2495||e>=2496&&e<=2500||e>=2503&&e<=2504||e>=2507&&e<=2509||e==2519||e>=2530&&e<=2531||e==2562||e==2620||e==2622||e==2623||e>=2624&&e<=2626||e>=2631&&e<=2632||e>=2635&&e<=2637||e>=2672&&e<=2673||e>=2689&&e<=2691||e==2748||e>=2750&&e<=2757||e>=2759&&e<=2761||e>=2763&&e<=2765||e>=2817&&e<=2819||e==2876||e>=2878&&e<=2883||e>=2887&&e<=2888||e>=2891&&e<=2893||e>=2902&&e<=2903||e>=2946&&e<=2947||e>=3006&&e<=3010||e>=3014&&e<=3016||e>=3018&&e<=3021||e==3031||e>=3073&&e<=3075||e>=3134&&e<=3140||e>=3142&&e<=3144||e>=3146&&e<=3149||e>=3157&&e<=3158||e>=3202&&e<=3203||e>=3262&&e<=3268||e>=3270&&e<=3272||e>=3274&&e<=3277||e>=3285&&e<=3286||e>=3330&&e<=3331||e>=3390&&e<=3395||e>=3398&&e<=3400||e>=3402&&e<=3405||e==3415||e==3633||e>=3636&&e<=3642||e>=3655&&e<=3662||e==3761||e>=3764&&e<=3769||e>=3771&&e<=3772||e>=3784&&e<=3789||e>=3864&&e<=3865||e==3893||e==3895||e==3897||e==3902||e==3903||e>=3953&&e<=3972||e>=3974&&e<=3979||e>=3984&&e<=3989||e==3991||e>=3993&&e<=4013||e>=4017&&e<=4023||e==4025||e>=8400&&e<=8412||e==8417||e>=12330&&e<=12335||e==12441||e==12442||e==183||e==720||e==721||e==903||e==1600||e==3654||e==3782||e==12293||e>=12337&&e<=12341||e>=12445&&e<=12446||e>=12540&&e<=12542},fe.coalesceText=function(e){for(var s=e.firstChild;s!=null;s=s.nextSibling)if(s.nodeType==Z.TEXT_NODE||s.nodeType==Z.CDATA_SECTION_NODE){var d=s.nodeValue,b=s;for(s=s.nextSibling;s!=null&&(s.nodeType==Z.TEXT_NODE||s.nodeType==Z.CDATA_SECTION_NODE);){d+=s.nodeValue;var h=s;s=s.nextSibling,h.parentNode.removeChild(h)}if(b.nodeType==Z.CDATA_SECTION_NODE){var w=b.parentNode;if(b.nextSibling==null)w.removeChild(b),w.appendChild(w.ownerDocument.createTextNode(d));else{var ie=b.nextSibling;w.removeChild(b),w.insertBefore(w.ownerDocument.createTextNode(d),ie)}}else b.nodeValue=d;if(s==null)break}else s.nodeType==Z.ELEMENT_NODE&&fe.coalesceText(s)},fe.instance_of=function(e,s){for(;e!=null;){if(e.constructor===s)return!0;if(e===Object)return!1;e=e.constructor.superclass}return!1},fe.getElementById=function(e,s){if(e.nodeType==Z.ELEMENT_NODE&&(e.getAttribute("id")==s||e.getAttributeNS(null,"id")==s))return e;for(var d=e.firstChild;d!=null;d=d.nextSibling){var b=fe.getElementById(d,s);if(b!=null)return b}return null};var Me=function(){function e(d,b){var h=b?": "+b.toString():"";switch(d){case s.INVALID_EXPRESSION_ERR:return"Invalid expression"+h;case s.TYPE_ERR:return"Type error"+h}return null}function s(d,b,h){var w=Error.call(this,e(d,b)||h);return w.code=d,w.exception=b,w}return s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.superclass=Error,s.prototype.toString=function(){return this.message},s.fromMessage=function(d,b){return new s(null,b,d)},s.INVALID_EXPRESSION_ERR=51,s.TYPE_ERR=52,s}();Fe.prototype={},Fe.prototype.constructor=Fe,Fe.superclass=Object.prototype;function Fe(e,s,d){this.xpath=d.parse(e),this.context=new He,this.context.namespaceResolver=new tt(s)}Fe.getOwnerDocument=function(e){return e.nodeType===Z.DOCUMENT_NODE?e:e.ownerDocument},Fe.detectHtmlDom=function(e){if(!e)return!1;var s=Fe.getOwnerDocument(e);try{return s.implementation.hasFeature("HTML","2.0")}catch{return!0}},Fe.prototype.evaluate=function(e,s,d){this.context.expressionContextNode=e,this.context.caseInsensitive=Fe.detectHtmlDom(e);var b=this.xpath.evaluate(this.context);return new Ae(b,s)},tt.prototype={},tt.prototype.constructor=tt,tt.superclass=Object.prototype;function tt(e){this.xpathNSResolver=e}tt.prototype.getNamespace=function(e,s){return this.xpathNSResolver==null?null:this.xpathNSResolver.lookupNamespaceURI(e)},Ye.prototype={},Ye.prototype.constructor=Ye,Ye.superclass=Object.prototype;function Ye(e){this.node=e,this.namespaceResolver=new je}Ye.prototype.lookupNamespaceURI=function(e){return this.namespaceResolver.getNamespace(e,this.node)},Ae.prototype={},Ae.prototype.constructor=Ae,Ae.superclass=Object.prototype;function Ae(e,s){switch(s==Ae.ANY_TYPE&&(e.constructor===R?s=Ae.STRING_TYPE:e.constructor===M?s=Ae.NUMBER_TYPE:e.constructor===pe?s=Ae.BOOLEAN_TYPE:e.constructor===le&&(s=Ae.UNORDERED_NODE_ITERATOR_TYPE)),this.resultType=s,s){case Ae.NUMBER_TYPE:this.numberValue=e.numberValue();return;case Ae.STRING_TYPE:this.stringValue=e.stringValue();return;case Ae.BOOLEAN_TYPE:this.booleanValue=e.booleanValue();return;case Ae.ANY_UNORDERED_NODE_TYPE:case Ae.FIRST_ORDERED_NODE_TYPE:if(e.constructor===le){this.singleNodeValue=e.first();return}break;case Ae.UNORDERED_NODE_ITERATOR_TYPE:case Ae.ORDERED_NODE_ITERATOR_TYPE:if(e.constructor===le){this.invalidIteratorState=!1,this.nodes=e.toArray(),this.iteratorIndex=0;return}break;case Ae.UNORDERED_NODE_SNAPSHOT_TYPE:case Ae.ORDERED_NODE_SNAPSHOT_TYPE:if(e.constructor===le){this.nodes=e.toArray(),this.snapshotLength=this.nodes.length;return}break}throw new Me(Me.TYPE_ERR)}Ae.prototype.iterateNext=function(){if(this.resultType!=Ae.UNORDERED_NODE_ITERATOR_TYPE&&this.resultType!=Ae.ORDERED_NODE_ITERATOR_TYPE)throw new Me(Me.TYPE_ERR);return this.nodes[this.iteratorIndex++]},Ae.prototype.snapshotItem=function(e){if(this.resultType!=Ae.UNORDERED_NODE_SNAPSHOT_TYPE&&this.resultType!=Ae.ORDERED_NODE_SNAPSHOT_TYPE)throw new Me(Me.TYPE_ERR);return this.nodes[e]},Ae.ANY_TYPE=0,Ae.NUMBER_TYPE=1,Ae.STRING_TYPE=2,Ae.BOOLEAN_TYPE=3,Ae.UNORDERED_NODE_ITERATOR_TYPE=4,Ae.ORDERED_NODE_ITERATOR_TYPE=5,Ae.UNORDERED_NODE_SNAPSHOT_TYPE=6,Ae.ORDERED_NODE_SNAPSHOT_TYPE=7,Ae.ANY_UNORDERED_NODE_TYPE=8,Ae.FIRST_ORDERED_NODE_TYPE=9;function l(e,s){e.createExpression=function(d,b){try{return new Fe(d,b,s)}catch(h){throw new Me(Me.INVALID_EXPRESSION_ERR,h)}},e.createNSResolver=function(d){return new Ye(d)},e.evaluate=function(d,b,h,w,ie){if(w<0||w>9)throw{code:0,toString:function(){return"Request type not supported"}};return e.createExpression(d,h,s).evaluate(b,w,ie)}}try{var c=!0;try{document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("XPath",null)&&(c=!1)}catch{}c&&l(document,new N)}catch{}l(r,new N),function(){var e=new N,s=new je,d=new Pe,b=new Ge;function h(ne){return{getNamespace:function(ve,qe){var st=ne(ve,qe);return st||s.getNamespace(ve,qe)}}}function w(ne){return h(ne.getNamespace.bind(ne))}function ie(ne){return h(function(ve){return ne[ve]})}function xe(ne){return ne&&typeof ne.getNamespace=="function"?w(ne):typeof ne=="function"?h(ne):typeof ne=="object"?ie(ne):s}function Ne(ne){if(ne===null||typeof ne>"u"||ne instanceof R||ne instanceof pe||ne instanceof M||ne instanceof le)return ne;switch(typeof ne){case"string":return new R(ne);case"boolean":return new pe(ne);case"number":return new M(ne)}var ve=new le;return ve.addArray([].concat(ne)),ve}function ae(ne){return function(ve){var qe=Array.prototype.slice.call(arguments,1).map(function(ti){return ti.evaluate(ve)}),st=ne.apply(this,[].concat(ve,qe));return Ne(st)}}function ce(ne){return{getFunction:function(ve,qe){var st=ne(ve,qe);return st?ae(st):d.getFunction(ve,qe)}}}function Le(ne){return ce(ne.getFunction.bind(ne))}function Ke(ne){return ce(function(ve){return ne[ve]})}function Se(ne){return ne&&typeof ne.getFunction=="function"?Le(ne):typeof ne=="function"?ce(ne):typeof ne=="object"?Ke(ne):d}function Qe(ne){return{getVariable:function(ve,qe){var st=ne(ve,qe);return Ne(st)}}}function Xe(ne){if(ne){if(typeof ne.getVariable=="function")return Qe(ne.getVariable.bind(ne));if(typeof ne=="function")return Qe(ne);if(typeof ne=="object")return Qe(function(ve){return ne[ve]})}return b}function ot(ne,ve,qe){ne in qe&&(ve[ne]=qe[ne])}function Qs(ne){var ve=new He;return ne?(ve.namespaceResolver=xe(ne.namespaces),ve.functionResolver=Se(ne.functions),ve.variableResolver=Xe(ne.variables),ve.expressionContextNode=ne.node,ot("allowAnyNamespaceForNoPrefix",ve,ne),ot("isHtml",ve,ne)):ve.namespaceResolver=s,ve}function Zs(ne,ve){var qe=Qs(ve);return ne.evaluate(qe)}var Js={evaluate:function(ne){return Zs(this.expression,ne)},evaluateNumber:function(ne){return this.evaluate(ne).numberValue()},evaluateString:function(ne){return this.evaluate(ne).stringValue()},evaluateBoolean:function(ne){return this.evaluate(ne).booleanValue()},evaluateNodeSet:function(ne){return this.evaluate(ne).nodeset()},select:function(ne){return this.evaluateNodeSet(ne).toArray()},select1:function(ne){return this.select(ne)[0]}};function ei(ne){var ve=e.parse(ne);return Object.create(Js,{expression:{value:ve}})}r.parse=ei}(),ye(r,{XPath:$,XPathParser:N,XPathResult:Ae,Step:W,PathExpr:F,NodeTest:A,LocationPath:De,OrOperation:G,AndOperation:ee,BarOperation:z,EqualsOperation:te,NotEqualOperation:g,LessThanOperation:T,GreaterThanOperation:q,LessThanOrEqualOperation:j,GreaterThanOrEqualOperation:I,PlusOperation:re,MinusOperation:C,MultiplyOperation:B,DivOperation:L,ModOperation:X,UnaryMinusOperation:O,FunctionCall:Ce,VariableReference:se,XPathContext:He,XNodeSet:le,XBoolean:pe,XString:R,XNumber:M,NamespaceResolver:je,FunctionResolver:Pe,VariableResolver:Ge,Utilities:fe}),r.select=function(e,s,d){return r.selectWithResolver(e,s,null,d)},r.useNamespaces=function(e){var s={mappings:e||{},lookupNamespaceURI:function(d){return this.mappings[d]}};return function(d,b,h){return r.selectWithResolver(d,b,s,h)}},r.selectWithResolver=function(e,s,d,b){var h=new Fe(e,d,new N),w=Ae.ANY_TYPE,ie=h.evaluate(s,w,null);return ie.resultType==Ae.STRING_TYPE?ie=ie.stringValue:ie.resultType==Ae.NUMBER_TYPE?ie=ie.numberValue:ie.resultType==Ae.BOOLEAN_TYPE?ie=ie.booleanValue:(ie=ie.nodes,b&&(ie=ie[0])),ie},r.select1=function(e,s){return r.select(e,s,!0)};var y=function(e){return Array.isArray(e)&&e.every(f)},k=function(e){return function(s){return f(s)&&s.nodeType===e}};ye(r,{isNodeLike:f,isArrayOfNodes:y,isElement:k(Z.ELEMENT_NODE),isAttribute:k(Z.ATTRIBUTE_NODE),isTextNode:k(Z.TEXT_NODE),isCDATASection:k(Z.CDATA_SECTION_NODE),isProcessingInstruction:k(Z.PROCESSING_INSTRUCTION_NODE),isComment:k(Z.COMMENT_NODE),isDocumentNode:k(Z.DOCUMENT_NODE),isDocumentTypeNode:k(Z.DOCUMENT_TYPE_NODE),isDocumentFragment:k(Z.DOCUMENT_FRAGMENT_NODE)})})(t)}(vt)),vt}var nn=rn();const on=tn(nn);var dt={},Je={},it={},Lt;function yt(){if(Lt)return it;Lt=1;function n(u,f,x){if(x===void 0&&(x=Array.prototype),u&&typeof x.find=="function")return x.find.call(u,f);for(var p=0;p<u.length;p++)if(Object.prototype.hasOwnProperty.call(u,p)){var m=u[p];if(f.call(void 0,m,p,u))return m}}function t(u,f){return f===void 0&&(f=Object),f&&typeof f.freeze=="function"?f.freeze(u):u}function r(u,f){if(u===null||typeof u!="object")throw new TypeError("target is not an object");for(var x in f)Object.prototype.hasOwnProperty.call(f,x)&&(u[x]=f[x]);return u}var a=t({HTML:"text/html",isHTML:function(u){return u===a.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),i=t({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(u){return u===i.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return it.assign=r,it.find=n,it.freeze=t,it.MIME_TYPE=a,it.NAMESPACE=i,it}var Vt;function $t(){if(Vt)return Je;Vt=1;var n=yt(),t=n.find,r=n.NAMESPACE;function a(l){return l!==""}function i(l){return l?l.split(/[\t\n\f\r ]+/).filter(a):[]}function u(l,c){return l.hasOwnProperty(c)||(l[c]=!0),l}function f(l){if(!l)return[];var c=i(l);return Object.keys(c.reduce(u,{}))}function x(l){return function(c){return l&&l.indexOf(c)!==-1}}function p(l,c){for(var y in l)Object.prototype.hasOwnProperty.call(l,y)&&(c[y]=l[y])}function m(l,c){var y=l.prototype;if(!(y instanceof c)){let k=function(){};k.prototype=c.prototype,k=new k,p(y,k),l.prototype=y=k}y.constructor!=l&&(typeof l!="function"&&console.error("unknown Class:"+l),y.constructor=l)}var _={},D=_.ELEMENT_NODE=1,U=_.ATTRIBUTE_NODE=2,K=_.TEXT_NODE=3,J=_.CDATA_SECTION_NODE=4,ue=_.ENTITY_REFERENCE_NODE=5,H=_.ENTITY_NODE=6,de=_.PROCESSING_INSTRUCTION_NODE=7,oe=_.COMMENT_NODE=8,Q=_.DOCUMENT_NODE=9,he=_.DOCUMENT_TYPE_NODE=10,ye=_.DOCUMENT_FRAGMENT_NODE=11,Z=_.NOTATION_NODE=12,N={},$={};N.INDEX_SIZE_ERR=($[1]="Index size error",1),N.DOMSTRING_SIZE_ERR=($[2]="DOMString size error",2);var v=N.HIERARCHY_REQUEST_ERR=($[3]="Hierarchy request error",3);N.WRONG_DOCUMENT_ERR=($[4]="Wrong document",4),N.INVALID_CHARACTER_ERR=($[5]="Invalid character",5),N.NO_DATA_ALLOWED_ERR=($[6]="No data allowed",6),N.NO_MODIFICATION_ALLOWED_ERR=($[7]="No modification allowed",7);var E=N.NOT_FOUND_ERR=($[8]="Not found",8);N.NOT_SUPPORTED_ERR=($[9]="Not supported",9);var P=N.INUSE_ATTRIBUTE_ERR=($[10]="Attribute in use",10);N.INVALID_STATE_ERR=($[11]="Invalid state",11),N.SYNTAX_ERR=($[12]="Syntax error",12),N.INVALID_MODIFICATION_ERR=($[13]="Invalid modification",13),N.NAMESPACE_ERR=($[14]="Invalid namespace",14),N.INVALID_ACCESS_ERR=($[15]="Invalid access",15);function O(l,c){if(c instanceof Error)var y=c;else y=this,Error.call(this,$[l]),this.message=$[l],Error.captureStackTrace&&Error.captureStackTrace(this,O);return y.code=l,c&&(this.message=this.message+": "+c),y}O.prototype=Error.prototype,p(N,O);function S(){}S.prototype={length:0,item:function(l){return l>=0&&l<this.length?this[l]:null},toString:function(l,c){for(var y=[],k=0;k<this.length;k++)Fe(this[k],y,l,c);return y.join("")},filter:function(l){return Array.prototype.filter.call(this,l)},indexOf:function(l){return Array.prototype.indexOf.call(this,l)}};function G(l,c){this._node=l,this._refresh=c,ee(this)}function ee(l){var c=l._node._inc||l._node.ownerDocument._inc;if(l._inc!==c){var y=l._refresh(l._node);if(Ae(l,"length",y.length),!l.$$length||y.length<l.$$length)for(var k=y.length;k in l;k++)Object.prototype.hasOwnProperty.call(l,k)&&delete l[k];p(y,l),l._inc=c}}G.prototype.item=function(l){return ee(this),this[l]||null},m(G,S);function te(){}function g(l,c){for(var y=l.length;y--;)if(l[y]===c)return y}function T(l,c,y,k){if(k?c[g(c,k)]=y:c[c.length++]=y,l){y.ownerElement=l;var e=l.ownerDocument;e&&(k&&X(e,l,k),L(e,l,y))}}function q(l,c,y){var k=g(c,y);if(k>=0){for(var e=c.length-1;k<e;)c[k]=c[++k];if(c.length=e,l){var s=l.ownerDocument;s&&(X(s,l,y),y.ownerElement=null)}}else throw new O(E,new Error(l.tagName+"@"+y))}te.prototype={length:0,item:S.prototype.item,getNamedItem:function(l){for(var c=this.length;c--;){var y=this[c];if(y.nodeName==l)return y}},setNamedItem:function(l){var c=l.ownerElement;if(c&&c!=this._ownerElement)throw new O(P);var y=this.getNamedItem(l.nodeName);return T(this._ownerElement,this,l,y),y},setNamedItemNS:function(l){var c=l.ownerElement,y;if(c&&c!=this._ownerElement)throw new O(P);return y=this.getNamedItemNS(l.namespaceURI,l.localName),T(this._ownerElement,this,l,y),y},removeNamedItem:function(l){var c=this.getNamedItem(l);return q(this._ownerElement,this,c),c},removeNamedItemNS:function(l,c){var y=this.getNamedItemNS(l,c);return q(this._ownerElement,this,y),y},getNamedItemNS:function(l,c){for(var y=this.length;y--;){var k=this[y];if(k.localName==c&&k.namespaceURI==l)return k}return null}};function j(){}j.prototype={hasFeature:function(l,c){return!0},createDocument:function(l,c,y){var k=new B;if(k.implementation=this,k.childNodes=new S,k.doctype=y||null,y&&k.appendChild(y),c){var e=k.createElementNS(l,c);k.appendChild(e)}return k},createDocumentType:function(l,c,y){var k=new le;return k.name=l,k.nodeName=l,k.publicId=c||"",k.systemId=y||"",k}};function I(){}I.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(l,c){return Ce(this,l,c)},replaceChild:function(l,c){Ce(this,l,c,se),c&&this.removeChild(c)},removeChild:function(l){return F(this,l)},appendChild:function(l){return this.insertBefore(l,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(l){return Ye(this.ownerDocument||this,this,l)},normalize:function(){for(var l=this.firstChild;l;){var c=l.nextSibling;c&&c.nodeType==K&&l.nodeType==K?(this.removeChild(c),l.appendData(c.data)):(l.normalize(),l=c)}},isSupported:function(l,c){return this.ownerDocument.implementation.hasFeature(l,c)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(l){for(var c=this;c;){var y=c._nsMap;if(y){for(var k in y)if(Object.prototype.hasOwnProperty.call(y,k)&&y[k]===l)return k}c=c.nodeType==U?c.ownerDocument:c.parentNode}return null},lookupNamespaceURI:function(l){for(var c=this;c;){var y=c._nsMap;if(y&&Object.prototype.hasOwnProperty.call(y,l))return y[l];c=c.nodeType==U?c.ownerDocument:c.parentNode}return null},isDefaultNamespace:function(l){var c=this.lookupPrefix(l);return c==null}};function re(l){return l=="<"&&"&lt;"||l==">"&&"&gt;"||l=="&"&&"&amp;"||l=='"'&&"&quot;"||"&#"+l.charCodeAt()+";"}p(_,I),p(_,I.prototype);function C(l,c){if(c(l))return!0;if(l=l.firstChild)do if(C(l,c))return!0;while(l=l.nextSibling)}function B(){this.ownerDocument=this}function L(l,c,y){l&&l._inc++;var k=y.namespaceURI;k===r.XMLNS&&(c._nsMap[y.prefix?y.localName:""]=y.value)}function X(l,c,y,k){l&&l._inc++;var e=y.namespaceURI;e===r.XMLNS&&delete c._nsMap[y.prefix?y.localName:""]}function z(l,c,y){if(l&&l._inc){l._inc++;var k=c.childNodes;if(y)k[k.length++]=y;else{for(var e=c.firstChild,s=0;e;)k[s++]=e,e=e.nextSibling;k.length=s,delete k[k.length]}}}function F(l,c){var y=c.previousSibling,k=c.nextSibling;return y?y.nextSibling=k:l.firstChild=k,k?k.previousSibling=y:l.lastChild=y,c.parentNode=null,c.previousSibling=null,c.nextSibling=null,z(l.ownerDocument,l),c}function Y(l){return l&&(l.nodeType===I.DOCUMENT_NODE||l.nodeType===I.DOCUMENT_FRAGMENT_NODE||l.nodeType===I.ELEMENT_NODE)}function ge(l){return l&&(Te(l)||ke(l)||Ee(l)||l.nodeType===I.DOCUMENT_FRAGMENT_NODE||l.nodeType===I.COMMENT_NODE||l.nodeType===I.PROCESSING_INSTRUCTION_NODE)}function Ee(l){return l&&l.nodeType===I.DOCUMENT_TYPE_NODE}function Te(l){return l&&l.nodeType===I.ELEMENT_NODE}function ke(l){return l&&l.nodeType===I.TEXT_NODE}function De(l,c){var y=l.childNodes||[];if(t(y,Te)||Ee(c))return!1;var k=t(y,Ee);return!(c&&k&&y.indexOf(k)>y.indexOf(c))}function W(l,c){var y=l.childNodes||[];function k(s){return Te(s)&&s!==c}if(t(y,k))return!1;var e=t(y,Ee);return!(c&&e&&y.indexOf(e)>y.indexOf(c))}function Be(l,c,y){if(!Y(l))throw new O(v,"Unexpected parent node type "+l.nodeType);if(y&&y.parentNode!==l)throw new O(E,"child not in parent");if(!ge(c)||Ee(c)&&l.nodeType!==I.DOCUMENT_NODE)throw new O(v,"Unexpected node type "+c.nodeType+" for parent node type "+l.nodeType)}function A(l,c,y){var k=l.childNodes||[],e=c.childNodes||[];if(c.nodeType===I.DOCUMENT_FRAGMENT_NODE){var s=e.filter(Te);if(s.length>1||t(e,ke))throw new O(v,"More than one element or text in fragment");if(s.length===1&&!De(l,y))throw new O(v,"Element in fragment can not be inserted before doctype")}if(Te(c)&&!De(l,y))throw new O(v,"Only one element can be added and only after doctype");if(Ee(c)){if(t(k,Ee))throw new O(v,"Only one doctype is allowed");var d=t(k,Te);if(y&&k.indexOf(d)<k.indexOf(y))throw new O(v,"Doctype can only be inserted before an element");if(!y&&d)throw new O(v,"Doctype can not be appended since element is present")}}function se(l,c,y){var k=l.childNodes||[],e=c.childNodes||[];if(c.nodeType===I.DOCUMENT_FRAGMENT_NODE){var s=e.filter(Te);if(s.length>1||t(e,ke))throw new O(v,"More than one element or text in fragment");if(s.length===1&&!W(l,y))throw new O(v,"Element in fragment can not be inserted before doctype")}if(Te(c)&&!W(l,y))throw new O(v,"Only one element can be added and only after doctype");if(Ee(c)){if(t(k,function(h){return Ee(h)&&h!==y}))throw new O(v,"Only one doctype is allowed");var d=t(k,Te);if(y&&k.indexOf(d)<k.indexOf(y))throw new O(v,"Doctype can only be inserted before an element")}}function Ce(l,c,y,k){Be(l,c,y),l.nodeType===I.DOCUMENT_NODE&&(k||A)(l,c,y);var e=c.parentNode;if(e&&e.removeChild(c),c.nodeType===ye){var s=c.firstChild;if(s==null)return c;var d=c.lastChild}else s=d=c;var b=y?y.previousSibling:l.lastChild;s.previousSibling=b,d.nextSibling=y,b?b.nextSibling=s:l.firstChild=s,y==null?l.lastChild=d:y.previousSibling=d;do{s.parentNode=l;var h=l.ownerDocument||l;be(s,h)}while(s!==d&&(s=s.nextSibling));return z(l.ownerDocument||l,l),c.nodeType==ye&&(c.firstChild=c.lastChild=null),c}function be(l,c){if(l.ownerDocument!==c){if(l.ownerDocument=c,l.nodeType===D&&l.attributes)for(var y=0;y<l.attributes.length;y++){var k=l.attributes.item(y);k&&(k.ownerDocument=c)}for(var e=l.firstChild;e;)be(e,c),e=e.nextSibling}}function R(l,c){c.parentNode&&c.parentNode.removeChild(c),c.parentNode=l,c.previousSibling=l.lastChild,c.nextSibling=null,c.previousSibling?c.previousSibling.nextSibling=c:l.firstChild=c,l.lastChild=c,z(l.ownerDocument,l,c);var y=l.ownerDocument||l;return be(c,y),c}B.prototype={nodeName:"#document",nodeType:Q,doctype:null,documentElement:null,_inc:1,insertBefore:function(l,c){if(l.nodeType==ye){for(var y=l.firstChild;y;){var k=y.nextSibling;this.insertBefore(y,c),y=k}return l}return Ce(this,l,c),be(l,this),this.documentElement===null&&l.nodeType===D&&(this.documentElement=l),l},removeChild:function(l){return this.documentElement==l&&(this.documentElement=null),F(this,l)},replaceChild:function(l,c){Ce(this,l,c,se),be(l,this),c&&this.removeChild(c),Te(l)&&(this.documentElement=l)},importNode:function(l,c){return tt(this,l,c)},getElementById:function(l){var c=null;return C(this.documentElement,function(y){if(y.nodeType==D&&y.getAttribute("id")==l)return c=y,!0}),c},getElementsByClassName:function(l){var c=f(l);return new G(this,function(y){var k=[];return c.length>0&&C(y.documentElement,function(e){if(e!==y&&e.nodeType===D){var s=e.getAttribute("class");if(s){var d=l===s;if(!d){var b=f(s);d=c.every(x(b))}d&&k.push(e)}}}),k})},createElement:function(l){var c=new M;c.ownerDocument=this,c.nodeName=l,c.tagName=l,c.localName=l,c.childNodes=new S;var y=c.attributes=new te;return y._ownerElement=c,c},createDocumentFragment:function(){var l=new Pe;return l.ownerDocument=this,l.childNodes=new S,l},createTextNode:function(l){var c=new pe;return c.ownerDocument=this,c.appendData(l),c},createComment:function(l){var c=new Ie;return c.ownerDocument=this,c.appendData(l),c},createCDATASection:function(l){var c=new gt;return c.ownerDocument=this,c.appendData(l),c},createProcessingInstruction:function(l,c){var y=new je;return y.ownerDocument=this,y.tagName=y.nodeName=y.target=l,y.nodeValue=y.data=c,y},createAttribute:function(l){var c=new Re;return c.ownerDocument=this,c.name=l,c.nodeName=l,c.localName=l,c.specified=!0,c},createEntityReference:function(l){var c=new Ge;return c.ownerDocument=this,c.nodeName=l,c},createElementNS:function(l,c){var y=new M,k=c.split(":"),e=y.attributes=new te;return y.childNodes=new S,y.ownerDocument=this,y.nodeName=c,y.tagName=c,y.namespaceURI=l,k.length==2?(y.prefix=k[0],y.localName=k[1]):y.localName=c,e._ownerElement=y,y},createAttributeNS:function(l,c){var y=new Re,k=c.split(":");return y.ownerDocument=this,y.nodeName=c,y.name=c,y.namespaceURI=l,y.specified=!0,k.length==2?(y.prefix=k[0],y.localName=k[1]):y.localName=c,y}},m(B,I);function M(){this._nsMap={}}M.prototype={nodeType:D,hasAttribute:function(l){return this.getAttributeNode(l)!=null},getAttribute:function(l){var c=this.getAttributeNode(l);return c&&c.value||""},getAttributeNode:function(l){return this.attributes.getNamedItem(l)},setAttribute:function(l,c){var y=this.ownerDocument.createAttribute(l);y.value=y.nodeValue=""+c,this.setAttributeNode(y)},removeAttribute:function(l){var c=this.getAttributeNode(l);c&&this.removeAttributeNode(c)},appendChild:function(l){return l.nodeType===ye?this.insertBefore(l,null):R(this,l)},setAttributeNode:function(l){return this.attributes.setNamedItem(l)},setAttributeNodeNS:function(l){return this.attributes.setNamedItemNS(l)},removeAttributeNode:function(l){return this.attributes.removeNamedItem(l.nodeName)},removeAttributeNS:function(l,c){var y=this.getAttributeNodeNS(l,c);y&&this.removeAttributeNode(y)},hasAttributeNS:function(l,c){return this.getAttributeNodeNS(l,c)!=null},getAttributeNS:function(l,c){var y=this.getAttributeNodeNS(l,c);return y&&y.value||""},setAttributeNS:function(l,c,y){var k=this.ownerDocument.createAttributeNS(l,c);k.value=k.nodeValue=""+y,this.setAttributeNode(k)},getAttributeNodeNS:function(l,c){return this.attributes.getNamedItemNS(l,c)},getElementsByTagName:function(l){return new G(this,function(c){var y=[];return C(c,function(k){k!==c&&k.nodeType==D&&(l==="*"||k.tagName==l)&&y.push(k)}),y})},getElementsByTagNameNS:function(l,c){return new G(this,function(y){var k=[];return C(y,function(e){e!==y&&e.nodeType===D&&(l==="*"||e.namespaceURI===l)&&(c==="*"||e.localName==c)&&k.push(e)}),k})}},B.prototype.getElementsByTagName=M.prototype.getElementsByTagName,B.prototype.getElementsByTagNameNS=M.prototype.getElementsByTagNameNS,m(M,I);function Re(){}Re.prototype.nodeType=U,m(Re,I);function Ue(){}Ue.prototype={data:"",substringData:function(l,c){return this.data.substring(l,l+c)},appendData:function(l){l=this.data+l,this.nodeValue=this.data=l,this.length=l.length},insertData:function(l,c){this.replaceData(l,0,c)},appendChild:function(l){throw new Error($[v])},deleteData:function(l,c){this.replaceData(l,c,"")},replaceData:function(l,c,y){var k=this.data.substring(0,l),e=this.data.substring(l+c);y=k+y+e,this.nodeValue=this.data=y,this.length=y.length}},m(Ue,I);function pe(){}pe.prototype={nodeName:"#text",nodeType:K,splitText:function(l){var c=this.data,y=c.substring(l);c=c.substring(0,l),this.data=this.nodeValue=c,this.length=c.length;var k=this.ownerDocument.createTextNode(y);return this.parentNode&&this.parentNode.insertBefore(k,this.nextSibling),k}},m(pe,Ue);function Ie(){}Ie.prototype={nodeName:"#comment",nodeType:oe},m(Ie,Ue);function gt(){}gt.prototype={nodeName:"#cdata-section",nodeType:J},m(gt,Ue);function le(){}le.prototype.nodeType=he,m(le,I);function We(){}We.prototype.nodeType=Z,m(We,I);function He(){}He.prototype.nodeType=H,m(He,I);function Ge(){}Ge.prototype.nodeType=ue,m(Ge,I);function Pe(){}Pe.prototype.nodeName="#document-fragment",Pe.prototype.nodeType=ye,m(Pe,I);function je(){}je.prototype.nodeType=de,m(je,I);function me(){}me.prototype.serializeToString=function(l,c,y){return fe.call(l,c,y)},I.prototype.toString=fe;function fe(l,c){var y=[],k=this.nodeType==9&&this.documentElement||this,e=k.prefix,s=k.namespaceURI;if(s&&e==null){var e=k.lookupPrefix(s);if(e==null)var d=[{namespace:s,prefix:null}]}return Fe(this,y,l,c,d),y.join("")}function Et(l,c,y){var k=l.prefix||"",e=l.namespaceURI;if(!e||k==="xml"&&e===r.XML||e===r.XMLNS)return!1;for(var s=y.length;s--;){var d=y[s];if(d.prefix===k)return d.namespace!==e}return!0}function Me(l,c,y){l.push(" ",c,'="',y.replace(/[<>&"\t\n\r]/g,re),'"')}function Fe(l,c,y,k,e){if(e||(e=[]),k)if(l=k(l),l){if(typeof l=="string"){c.push(l);return}}else return;switch(l.nodeType){case D:var s=l.attributes,d=s.length,Se=l.firstChild,b=l.tagName;y=r.isHTML(l.namespaceURI)||y;var h=b;if(!y&&!l.prefix&&l.namespaceURI){for(var w,ie=0;ie<s.length;ie++)if(s.item(ie).name==="xmlns"){w=s.item(ie).value;break}if(!w)for(var xe=e.length-1;xe>=0;xe--){var Ne=e[xe];if(Ne.prefix===""&&Ne.namespace===l.namespaceURI){w=Ne.namespace;break}}if(w!==l.namespaceURI)for(var xe=e.length-1;xe>=0;xe--){var Ne=e[xe];if(Ne.namespace===l.namespaceURI){Ne.prefix&&(h=Ne.prefix+":"+b);break}}}c.push("<",h);for(var ae=0;ae<d;ae++){var ce=s.item(ae);ce.prefix=="xmlns"?e.push({prefix:ce.localName,namespace:ce.value}):ce.nodeName=="xmlns"&&e.push({prefix:"",namespace:ce.value})}for(var ae=0;ae<d;ae++){var ce=s.item(ae);if(Et(ce,y,e)){var Le=ce.prefix||"",Ke=ce.namespaceURI;Me(c,Le?"xmlns:"+Le:"xmlns",Ke),e.push({prefix:Le,namespace:Ke})}Fe(ce,c,y,k,e)}if(b===h&&Et(l,y,e)){var Le=l.prefix||"",Ke=l.namespaceURI;Me(c,Le?"xmlns:"+Le:"xmlns",Ke),e.push({prefix:Le,namespace:Ke})}if(Se||y&&!/^(?:meta|link|img|br|hr|input)$/i.test(b)){if(c.push(">"),y&&/^script$/i.test(b))for(;Se;)Se.data?c.push(Se.data):Fe(Se,c,y,k,e.slice()),Se=Se.nextSibling;else for(;Se;)Fe(Se,c,y,k,e.slice()),Se=Se.nextSibling;c.push("</",h,">")}else c.push("/>");return;case Q:case ye:for(var Se=l.firstChild;Se;)Fe(Se,c,y,k,e.slice()),Se=Se.nextSibling;return;case U:return Me(c,l.name,l.value);case K:return c.push(l.data.replace(/[<&>]/g,re));case J:return c.push("<![CDATA[",l.data,"]]>");case oe:return c.push("<!--",l.data,"-->");case he:var Qe=l.publicId,Xe=l.systemId;if(c.push("<!DOCTYPE ",l.name),Qe)c.push(" PUBLIC ",Qe),Xe&&Xe!="."&&c.push(" ",Xe),c.push(">");else if(Xe&&Xe!=".")c.push(" SYSTEM ",Xe,">");else{var ot=l.internalSubset;ot&&c.push(" [",ot,"]"),c.push(">")}return;case de:return c.push("<?",l.target," ",l.data,"?>");case ue:return c.push("&",l.nodeName,";");default:c.push("??",l.nodeName)}}function tt(l,c,y){var k;switch(c.nodeType){case D:k=c.cloneNode(!1),k.ownerDocument=l;case ye:break;case U:y=!0;break}if(k||(k=c.cloneNode(!1)),k.ownerDocument=l,k.parentNode=null,y)for(var e=c.firstChild;e;)k.appendChild(tt(l,e,y)),e=e.nextSibling;return k}function Ye(l,c,y){var k=new c.constructor;for(var e in c)if(Object.prototype.hasOwnProperty.call(c,e)){var s=c[e];typeof s!="object"&&s!=k[e]&&(k[e]=s)}switch(c.childNodes&&(k.childNodes=new S),k.ownerDocument=l,k.nodeType){case D:var d=c.attributes,b=k.attributes=new te,h=d.length;b._ownerElement=k;for(var w=0;w<h;w++)k.setAttributeNode(Ye(l,d.item(w),!0));break;case U:y=!0}if(y)for(var ie=c.firstChild;ie;)k.appendChild(Ye(l,ie,y)),ie=ie.nextSibling;return k}function Ae(l,c,y){l[c]=y}try{if(Object.defineProperty){let l=function(c){switch(c.nodeType){case D:case ye:var y=[];for(c=c.firstChild;c;)c.nodeType!==7&&c.nodeType!==8&&y.push(l(c)),c=c.nextSibling;return y.join("");default:return c.nodeValue}};Object.defineProperty(G.prototype,"length",{get:function(){return ee(this),this.$$length}}),Object.defineProperty(I.prototype,"textContent",{get:function(){return l(this)},set:function(c){switch(this.nodeType){case D:case ye:for(;this.firstChild;)this.removeChild(this.firstChild);(c||String(c))&&this.appendChild(this.ownerDocument.createTextNode(c));break;default:this.data=c,this.value=c,this.nodeValue=c}}}),Ae=function(c,y,k){c["$$"+y]=k}}}catch{}return Je.DocumentType=le,Je.DOMException=O,Je.DOMImplementation=j,Je.Element=M,Je.Node=I,Je.NodeList=S,Je.XMLSerializer=me,Je}var pt={},wt={},Mt;function sn(){return Mt||(Mt=1,function(n){var t=yt().freeze;n.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),n.HTML_ENTITIES=t({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:`
10
- `,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:"‌"}),n.entityMap=n.HTML_ENTITIES}(wt)),wt}var bt={},qt;function an(){if(qt)return bt;qt=1;var n=yt().NAMESPACE,t=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,r=new RegExp("[\\-\\.0-9"+t.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+t.source+r.source+"*(?::"+t.source+r.source+"*)?$"),i=0,u=1,f=2,x=3,p=4,m=5,_=6,D=7;function U(v,E){this.message=v,this.locator=E,Error.captureStackTrace&&Error.captureStackTrace(this,U)}U.prototype=new Error,U.prototype.name=U.name;function K(){}K.prototype={parse:function(v,E,P){var O=this.domBuilder;O.startDocument(),he(E,E={}),J(v,E,P,O,this.errorHandler),O.endDocument()}};function J(v,E,P,O,S){function G(R){if(R>65535){R-=65536;var M=55296+(R>>10),Re=56320+(R&1023);return String.fromCharCode(M,Re)}else return String.fromCharCode(R)}function ee(R){var M=R.slice(1,-1);return Object.hasOwnProperty.call(P,M)?P[M]:M.charAt(0)==="#"?G(parseInt(M.substr(1).replace("x","0x"))):(S.error("entity not found:"+R),R)}function te(R){if(R>B){var M=v.substring(B,R).replace(/&#?\w+;/g,ee);I&&g(B),O.characters(M,0,R-B),B=R}}function g(R,M){for(;R>=q&&(M=j.exec(v));)T=M.index,q=T+M[0].length,I.lineNumber++;I.columnNumber=R-T+1}for(var T=0,q=0,j=/.*(?:\r\n?|\n)|.*$/g,I=O.locator,re=[{currentNSMap:E}],C={},B=0;;){try{var L=v.indexOf("<",B);if(L<0){if(!v.substr(B).match(/^\s*$/)){var X=O.doc,z=X.createTextNode(v.substr(B));X.appendChild(z),O.currentElement=z}return}switch(L>B&&te(L),v.charAt(L+1)){case"/":var Be=v.indexOf(">",L+3),F=v.substring(L+2,Be).replace(/[ \t\n\r]+$/g,""),Y=re.pop();Be<0?(F=v.substring(L+2).replace(/[\s<].*/,""),S.error("end tag name: "+F+" is not complete:"+Y.tagName),Be=L+1+F.length):F.match(/\s</)&&(F=F.replace(/[\s<].*/,""),S.error("end tag name: "+F+" maybe not complete"),Be=L+1+F.length);var ge=Y.localNSMap,Ee=Y.tagName==F,Te=Ee||Y.tagName&&Y.tagName.toLowerCase()==F.toLowerCase();if(Te){if(O.endElement(Y.uri,Y.localName,F),ge)for(var ke in ge)Object.prototype.hasOwnProperty.call(ge,ke)&&O.endPrefixMapping(ke);Ee||S.fatalError("end tag name: "+F+" is not match the current start tagName:"+Y.tagName)}else re.push(Y);Be++;break;case"?":I&&g(L),Be=Z(v,L,O);break;case"!":I&&g(L),Be=ye(v,L,O,S);break;default:I&&g(L);var De=new N,W=re[re.length-1].currentNSMap,Be=H(v,L,De,W,ee,S),A=De.length;if(!De.closed&&Q(v,Be,De.tagName,C)&&(De.closed=!0,P.nbsp||S.warning("unclosed xml attribute")),I&&A){for(var se=ue(I,{}),Ce=0;Ce<A;Ce++){var be=De[Ce];g(be.offset),be.locator=ue(I,{})}O.locator=se,de(De,O,W)&&re.push(De),O.locator=I}else de(De,O,W)&&re.push(De);n.isHTML(De.uri)&&!De.closed?Be=oe(v,Be,De.tagName,ee,O):Be++}}catch(R){if(R instanceof U)throw R;S.error("element parse error: "+R),Be=-1}Be>B?B=Be:te(Math.max(L,B)+1)}}function ue(v,E){return E.lineNumber=v.lineNumber,E.columnNumber=v.columnNumber,E}function H(v,E,P,O,S,G){function ee(I,re,C){P.attributeNames.hasOwnProperty(I)&&G.fatalError("Attribute "+I+" redefined"),P.addValue(I,re.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,S),C)}for(var te,g,T=++E,q=i;;){var j=v.charAt(T);switch(j){case"=":if(q===u)te=v.slice(E,T),q=x;else if(q===f)q=x;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(q===x||q===u)if(q===u&&(G.warning('attribute value must after "="'),te=v.slice(E,T)),E=T+1,T=v.indexOf(j,E),T>0)g=v.slice(E,T),ee(te,g,E-1),q=m;else throw new Error("attribute value no end '"+j+"' match");else if(q==p)g=v.slice(E,T),ee(te,g,E),G.warning('attribute "'+te+'" missed start quot('+j+")!!"),E=T+1,q=m;else throw new Error('attribute value must after "="');break;case"/":switch(q){case i:P.setTagName(v.slice(E,T));case m:case _:case D:q=D,P.closed=!0;case p:case u:break;case f:P.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return G.error("unexpected end of input"),q==i&&P.setTagName(v.slice(E,T)),T;case">":switch(q){case i:P.setTagName(v.slice(E,T));case m:case _:case D:break;case p:case u:g=v.slice(E,T),g.slice(-1)==="/"&&(P.closed=!0,g=g.slice(0,-1));case f:q===f&&(g=te),q==p?(G.warning('attribute "'+g+'" missed quot(")!'),ee(te,g,E)):((!n.isHTML(O[""])||!g.match(/^(?:disabled|checked|selected)$/i))&&G.warning('attribute "'+g+'" missed value!! "'+g+'" instead!!'),ee(g,g,E));break;case x:throw new Error("attribute value missed!!")}return T;case"€":j=" ";default:if(j<=" ")switch(q){case i:P.setTagName(v.slice(E,T)),q=_;break;case u:te=v.slice(E,T),q=f;break;case p:var g=v.slice(E,T);G.warning('attribute "'+g+'" missed quot(")!!'),ee(te,g,E);case m:q=_;break}else switch(q){case f:P.tagName,(!n.isHTML(O[""])||!te.match(/^(?:disabled|checked|selected)$/i))&&G.warning('attribute "'+te+'" missed value!! "'+te+'" instead2!!'),ee(te,te,E),E=T,q=u;break;case m:G.warning('attribute space is required"'+te+'"!!');case _:q=u,E=T;break;case x:q=p,E=T;break;case D:throw new Error("elements closed character '/' and '>' must be connected to")}}T++}}function de(v,E,P){for(var O=v.tagName,S=null,j=v.length;j--;){var G=v[j],ee=G.qName,te=G.value,I=ee.indexOf(":");if(I>0)var g=G.prefix=ee.slice(0,I),T=ee.slice(I+1),q=g==="xmlns"&&T;else T=ee,g=null,q=ee==="xmlns"&&"";G.localName=T,q!==!1&&(S==null&&(S={},he(P,P={})),P[q]=S[q]=te,G.uri=n.XMLNS,E.startPrefixMapping(q,te))}for(var j=v.length;j--;){G=v[j];var g=G.prefix;g&&(g==="xml"&&(G.uri=n.XML),g!=="xmlns"&&(G.uri=P[g||""]))}var I=O.indexOf(":");I>0?(g=v.prefix=O.slice(0,I),T=v.localName=O.slice(I+1)):(g=null,T=v.localName=O);var re=v.uri=P[g||""];if(E.startElement(re,T,O,v),v.closed){if(E.endElement(re,T,O),S)for(g in S)Object.prototype.hasOwnProperty.call(S,g)&&E.endPrefixMapping(g)}else return v.currentNSMap=P,v.localNSMap=S,!0}function oe(v,E,P,O,S){if(/^(?:script|textarea)$/i.test(P)){var G=v.indexOf("</"+P+">",E),ee=v.substring(E+1,G);if(/[&<]/.test(ee))return/^script$/i.test(P)?(S.characters(ee,0,ee.length),G):(ee=ee.replace(/&#?\w+;/g,O),S.characters(ee,0,ee.length),G)}return E+1}function Q(v,E,P,O){var S=O[P];return S==null&&(S=v.lastIndexOf("</"+P+">"),S<E&&(S=v.lastIndexOf("</"+P)),O[P]=S),S<E}function he(v,E){for(var P in v)Object.prototype.hasOwnProperty.call(v,P)&&(E[P]=v[P])}function ye(v,E,P,O){var S=v.charAt(E+2);switch(S){case"-":if(v.charAt(E+3)==="-"){var G=v.indexOf("-->",E+4);return G>E?(P.comment(v,E+4,G-E-4),G+3):(O.error("Unclosed comment"),-1)}else return-1;default:if(v.substr(E+3,6)=="CDATA["){var G=v.indexOf("]]>",E+9);return P.startCDATA(),P.characters(v,E+9,G-E-9),P.endCDATA(),G+3}var ee=$(v,E),te=ee.length;if(te>1&&/!doctype/i.test(ee[0][0])){var g=ee[1][0],T=!1,q=!1;te>3&&(/^public$/i.test(ee[2][0])?(T=ee[3][0],q=te>4&&ee[4][0]):/^system$/i.test(ee[2][0])&&(q=ee[3][0]));var j=ee[te-1];return P.startDTD(g,T,q),P.endDTD(),j.index+j[0].length}}return-1}function Z(v,E,P){var O=v.indexOf("?>",E);if(O){var S=v.substring(E,O).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return S?(S[0].length,P.processingInstruction(S[1],S[2]),O+2):-1}return-1}function N(){this.attributeNames={}}N.prototype={setTagName:function(v){if(!a.test(v))throw new Error("invalid tagName:"+v);this.tagName=v},addValue:function(v,E,P){if(!a.test(v))throw new Error("invalid attribute:"+v);this.attributeNames[v]=this.length,this[this.length++]={qName:v,value:E,offset:P}},length:0,getLocalName:function(v){return this[v].localName},getLocator:function(v){return this[v].locator},getQName:function(v){return this[v].qName},getURI:function(v){return this[v].uri},getValue:function(v){return this[v].value}};function $(v,E){var P,O=[],S=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(S.lastIndex=E,S.exec(v);P=S.exec(v);)if(O.push(P),P[1])return O}return bt.XMLReader=K,bt.ParseError=U,bt}var Ut;function un(){if(Ut)return pt;Ut=1;var n=yt(),t=$t(),r=sn(),a=an(),i=t.DOMImplementation,u=n.NAMESPACE,f=a.ParseError,x=a.XMLReader;function p(H){return H.replace(/\r[\n\u0085]/g,`
8
+ `)(F);O=z(u.value,P,G),p.value=O}else throw new Error(`Unsupported filter type: ${D.type}`);m.value="",o.nextTick(()=>{_()})}catch(O){m.value=O instanceof Error?O.message:"Filter execution error",p.value=null}},re=(D,O="root")=>{const F=new Map,G=(P,Q)=>{if(P==null)return P;if(typeof P=="object"&&P.__protected_number__!==void 0){const pe=parseFloat(P.__protected_number__);return F.set(pe,Q),pe}if(Array.isArray(P)){const pe=P.map((Ee,Te)=>{const ke=`${Q}[${Te}]`,De=G(Ee,ke);return F.set(De,ke),De});return F.set(pe,Q),pe}if(typeof P=="object"){const pe={};for(const Ee in P)if(Object.prototype.hasOwnProperty.call(P,Ee)){const Te=Q==="root"?Ee:`${Q}.${Ee}`;pe[Ee]=G(P[Ee],Te)}return F.set(pe,Q),pe}return P};return{proxyData:G(D,O),indexMap:F}},z=(D,O,F)=>{if(O===null||typeof O!="object")return O;if(Array.isArray(O))return O.map(P=>{const Q=F.get(P);if(Q){const pe=me(D,Q);if(pe!==void 0)return pe}return z(D,P,F)});const G=F.get(O);if(G){const P=me(D,G);if(P!==void 0)return P}const X={};for(const P in O)Object.prototype.hasOwnProperty.call(O,P)&&(X[P]=z(D,O[P],F));return X},me=(D,O)=>{if(O==="root")return D;const F=[];let G=O.replace(/^root\.?/,"");const X=/([^\[\].]+)|\[(\d+)\]/g;let P;for(;(P=X.exec(G))!==null;)P[1]?F.push(P[1]):P[2]!==void 0&&F.push(parseInt(P[2]));let Q=D;for(const pe of F){if(Q==null)return;Q=Q[pe]}return Q},be=()=>{p.value=null,m.value=""},J=()=>{S.value=!0},N=()=>{S.value=!1};o.watch(()=>a.modelValue,D=>{H(D)},{immediate:!0});const le=(D,O,F)=>{const G=Q=>{if(Q===null||typeof Q!="object")return Q;if(!Array.isArray(Q)&&"__protected_number__"in Q&&Object.keys(Q).length===1)return`__PROTECTED_NUMBER_${Q.__protected_number__}_PROTECTED_NUMBER__`;if(Array.isArray(Q))return Q.map(Ee=>G(Ee));const pe={};for(const[Ee,Te]of Object.entries(Q))pe[Ee]=G(Te);return pe},X=G(D);return JSON.stringify(X,O,F).replace(/"__PROTECTED_NUMBER_(.+?)_PROTECTED_NUMBER__"/g,"$1")},w=(D,O)=>{if(!a.readonly)try{const F=y(u.value,D,O),G=le(F,null,2);i("update:modelValue",G)}catch(F){console.error("Failed to update JSON:",F)}},y=(D,O,F)=>{if(!O||O==="root")return F;const G=O.split("."),X=V(D,G.slice(0,-1));let P=X;for(let pe=0;pe<G.length-1;pe++){const Ee=G[pe];Ee!=="root"&&(Array.isArray(P)?P=P[parseInt(Ee)]:P=P[Ee])}const Q=G[G.length-1];return Q==="root"?F:(Array.isArray(P)?P[parseInt(Q)]=F:P[Q]=F,X)},B=D=>{x.value.has(D)?x.value.delete(D):x.value.add(D)},_=()=>{const D=new Set,O=(F,G="")=>{F!==null&&typeof F=="object"&&(D.add(G||"root"),Array.isArray(F)?F.forEach((X,P)=>{const Q=G?`${G}.${P}`:`${P}`;O(X,Q)}):Object.keys(F).forEach(X=>{const P=G?`${G}.${X}`:X;O(F[X],P)}))};O(ae.value),x.value=D,i("expand-all")},L=()=>{x.value=new Set(["root"]),i("collapse-all")},$=async()=>{if(v.value)try{const D=ae.value,O=le(D,null,2);await navigator.clipboard.writeText(O),i("copy-success",O)}catch(D){console.error("Failed to copy JSON:",D),i("copy-error",D instanceof Error?D:new Error("Failed to copy JSON"))}},Z=()=>{if(v.value)try{const D=ae.value,O=le(D);i("update:modelValue",O),i("compress",O)}catch(D){console.error("Failed to compress JSON:",D)}},te=async D=>{try{let O;typeof D=="object"&&D!==null&&!Array.isArray(D)&&"__protected_number__"in D&&Object.keys(D).length===1?O=D.__protected_number__:typeof D=="string"?O=`"${D}"`:O=JSON.stringify(D),await navigator.clipboard.writeText(O)}catch(O){console.error("Failed to copy value:",O)}},g=(D,O)=>{if(!a.readonly)try{const F=C(u.value,D,O),G=le(F,null,2);i("update:modelValue",G),ee(D,O)}catch(F){console.error("Failed to rename key:",F)}},C=(D,O,F)=>{if(!O||O==="root")return D;const G=O.split("."),X=V(D,G.slice(0,-1));if(G.length===1){const pe=G[0];return X&&typeof X=="object"&&!Array.isArray(X)?j(X,pe,F):X}let P=X;for(let pe=0;pe<G.length-1;pe++){const Ee=G[pe];Array.isArray(P)?P=P[parseInt(Ee)]:P=P[Ee]}const Q=G[G.length-1];if(!Array.isArray(P)&&P&&typeof P=="object"){const pe=j(P,Q,F),Ee=G.slice(0,-1);Ee.length>0&&R(X,Ee,pe)}return X},V=(D,O)=>{if(O.length===0)return D;if(Array.isArray(D)){const F=[...D],G=O[0],X=parseInt(G);return O.length===1||(F[X]=V(D[X],O.slice(1))),F}else if(D&&typeof D=="object"){const F={...D},G=O[0];return O.length===1||(F[G]=V(D[G],O.slice(1))),F}return D},j=(D,O,F)=>{if(!D||typeof D!="object"||Array.isArray(D))return D;const G=Object.keys(D),X={};for(const P of G)P===O?X[F]=D[P]:X[P]=D[P];return X},R=(D,O,F)=>{let G=D;for(let P=0;P<O.length-1;P++){const Q=O[P];Array.isArray(G)?G=G[parseInt(Q)]:G=G[Q]}const X=O[O.length-1];Array.isArray(G)?G[parseInt(X)]=F:G[X]=F},ee=(D,O)=>{const F=new Set;x.value.forEach(G=>{if(G===D){const X=D.split(".");X[X.length-1]=O,F.add(X.join("."))}else if(G.startsWith(D+".")){const X=D.split(".");X[X.length-1]=O;const P=X.join("."),Q=G.substring(D.length);F.add(P+Q)}else F.add(G)}),x.value=F};return t({copyJson:$,compressSource:Z,expandAll:_,collapseAll:L,toggleExpand:B,updateValue:w,updateKey:g,filter:de,clearFilter:be,sortKeys:J,clearSortKeys:N,isSorted:()=>S.value,isValidJson:()=>v.value,getParsedJson:()=>u.value,getFilteredJson:()=>p.value,getExpandedNodes:()=>x.value,getParseError:()=>f.value,getFilterError:()=>m.value,parseJson:D=>H(D),copyValue:D=>te(D)}),(D,O)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["json-format",`json-format--${U.value.name}`])},[D.showToolbar?(o.openBlock(),o.createElementBlock("div",Ur,[o.createElementVNode("div",Hr,[o.createElementVNode("button",{class:"json-format__btn json-format__btn--primary",onClick:$,disabled:!v.value,title:"Copy JSON"}," 📋 Copy ",8,jr),o.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:_,disabled:!v.value,title:"Expand All"}," ⬇️ Expand All ",8,Kr),o.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:L,disabled:!v.value,title:"Collapse All"}," ➡️ Collapse All ",8,Gr),o.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:Z,disabled:!v.value,title:"Compress JSON"}," 📦 Compress ",8,Xr)]),o.createElementVNode("div",Wr,[v.value?(o.openBlock(),o.createElementBlock("span",zr," ✅ Valid JSON ")):(o.openBlock(),o.createElementBlock("span",Yr," ❌ Invalid JSON "))])])):o.createCommentVNode("",!0),o.createElementVNode("div",Qr,[v.value?m.value?(o.openBlock(),o.createElementBlock("div",Jr,[O[1]||(O[1]=o.createElementVNode("h4",null,"Filter Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(m.value),1)])):(o.openBlock(),o.createElementBlock("div",en,[o.createVNode($r,{value:ae.value,"key-name":"",level:0,expanded:x.value,"is-last":!0,theme:U.value,"onUpdate:value":w,onToggleExpand:B,onCopy:te,"onUpdate:key":g},null,8,["value","expanded","theme"])])):(o.openBlock(),o.createElementBlock("div",Zr,[O[0]||(O[0]=o.createElementVNode("h4",null,"JSON Parse Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(f.value),1)]))])],2))}}),[["__scopeId","data-v-030f8e3b"]]);function tn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var vt={},Pt;function rn(){return Pt||(Pt=1,function(n){var t=n;(function(r){var a="__namespace",i=function(e){return e==null},u=function(e){return e===a||Number.isInteger(e)&&e>=1&&e<=11},f=function(e){return e&&u(e.nodeType)&&typeof e.nodeName=="string"};function x(e){var s=Array.prototype.slice,d=e.length,b=function(T,se){return function(){return se.apply(this,T.concat(s.call(arguments)))}},h=function(){var T=s.call(arguments);return T.length<d?b(T,h):e.apply(this,s.apply(arguments,[0,d]))};return h}var p=function(e,s){for(var d=0;d<s.length;d+=1)e(s[d],d,s)},m=function(e,s,d){var b=s;return p(function(h,T){b=e(b,h,T)},d),b},S=function(e,s){var d=new Array(s.length);return p(function(b,h){d[h]=e(b)},s),d},v=function(e,s){var d=[];return p(function(b,h){e(b,h)&&d.push(b)},s),d},U=function(e,s){for(var d=0;d<e.length;d+=1)if(e[d]===s)return!0;return!1};function K(e){return function(){return e}}function Y(e){return e.toString()}var ae=function(e,s){return s.join(e)},H=function(e,s,d){return e+d+s},de=Array.prototype.concat,re=function(e,s){var d=new ue;d.addArray(e);var b=d.toArray();return s?b.reverse():b},z=32767;function me(e){for(var s=[],d=0;d<e.length;d+=z){var b=e.slice(d,d+z);s=de.apply(s,b)}return s}function be(e,s){for(var d=Object(e),b=1;b<arguments.length;b++){var h=arguments[b];if(h!=null)for(var T in h)Object.prototype.hasOwnProperty.call(h,T)&&(d[T]=h[T])}return d}var J={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NAMESPACE_NODE:a};N.prototype=new Object,N.prototype.constructor=N,N.superclass=Object.prototype;function N(){this.init()}N.prototype.init=function(){this.reduceActions=[],this.reduceActions[3]=function(e){return new $(e[0],e[2])},this.reduceActions[5]=function(e){return new Z(e[0],e[2])},this.reduceActions[7]=function(e){return new te(e[0],e[2])},this.reduceActions[8]=function(e){return new g(e[0],e[2])},this.reduceActions[10]=function(e){return new C(e[0],e[2])},this.reduceActions[11]=function(e){return new V(e[0],e[2])},this.reduceActions[12]=function(e){return new j(e[0],e[2])},this.reduceActions[13]=function(e){return new R(e[0],e[2])},this.reduceActions[15]=function(e){return new ee(e[0],e[2])},this.reduceActions[16]=function(e){return new D(e[0],e[2])},this.reduceActions[18]=function(e){return new O(e[0],e[2])},this.reduceActions[19]=function(e){return new F(e[0],e[2])},this.reduceActions[20]=function(e){return new G(e[0],e[2])},this.reduceActions[22]=function(e){return new _(e[1])},this.reduceActions[24]=function(e){return new X(e[0],e[2])},this.reduceActions[25]=function(e){return new P(void 0,void 0,e[0])},this.reduceActions[27]=function(e){return e[0].locationPath=e[2],e[0]},this.reduceActions[28]=function(e){return e[0].locationPath=e[2],e[0].locationPath.steps.unshift(new W(W.DESCENDANTORSELF,A.nodeTest,[])),e[0]},this.reduceActions[29]=function(e){return new P(e[0],[],void 0)},this.reduceActions[30]=function(e){return fe.instance_of(e[0],P)?(e[0].filterPredicates==null&&(e[0].filterPredicates=[]),e[0].filterPredicates.push(e[1]),e[0]):new P(e[0],[e[1]],void 0)},this.reduceActions[32]=function(e){return e[1]},this.reduceActions[33]=function(e){return new I(e[0])},this.reduceActions[34]=function(e){return new q(e[0])},this.reduceActions[36]=function(e){return new Ce(e[0],[])},this.reduceActions[37]=function(e){return new Ce(e[0],e[2])},this.reduceActions[38]=function(e){return[e[0]]},this.reduceActions[39]=function(e){return e[2].unshift(e[0]),e[2]},this.reduceActions[43]=function(e){return new De(!0,[])},this.reduceActions[44]=function(e){return e[1].absolute=!0,e[1]},this.reduceActions[46]=function(e){return new De(!1,[e[0]])},this.reduceActions[47]=function(e){return e[0].steps.push(e[2]),e[0]},this.reduceActions[49]=function(e){return new W(e[0],e[1],[])},this.reduceActions[50]=function(e){return new W(W.CHILD,e[0],[])},this.reduceActions[51]=function(e){return new W(e[0],e[1],e[2])},this.reduceActions[52]=function(e){return new W(W.CHILD,e[0],e[1])},this.reduceActions[54]=function(e){return[e[0]]},this.reduceActions[55]=function(e){return e[1].unshift(e[0]),e[1]},this.reduceActions[56]=function(e){return e[0]=="ancestor"?W.ANCESTOR:e[0]=="ancestor-or-self"?W.ANCESTORORSELF:e[0]=="attribute"?W.ATTRIBUTE:e[0]=="child"?W.CHILD:e[0]=="descendant"?W.DESCENDANT:e[0]=="descendant-or-self"?W.DESCENDANTORSELF:e[0]=="following"?W.FOLLOWING:e[0]=="following-sibling"?W.FOLLOWINGSIBLING:e[0]=="namespace"?W.NAMESPACE:e[0]=="parent"?W.PARENT:e[0]=="preceding"?W.PRECEDING:e[0]=="preceding-sibling"?W.PRECEDINGSIBLING:e[0]=="self"?W.SELF:-1},this.reduceActions[57]=function(e){return W.ATTRIBUTE},this.reduceActions[59]=function(e){return e[0]=="comment"?A.commentTest:e[0]=="text"?A.textTest:e[0]=="processing-instruction"?A.anyPiTest:e[0]=="node"?A.nodeTest:new A(-1,void 0)},this.reduceActions[60]=function(e){return new A.PITest(e[2])},this.reduceActions[61]=function(e){return e[1]},this.reduceActions[63]=function(e){return e[1].absolute=!0,e[1].steps.unshift(new W(W.DESCENDANTORSELF,A.nodeTest,[])),e[1]},this.reduceActions[64]=function(e){return e[0].steps.push(new W(W.DESCENDANTORSELF,A.nodeTest,[])),e[0].steps.push(e[2]),e[0]},this.reduceActions[65]=function(e){return new W(W.SELF,A.nodeTest,[])},this.reduceActions[66]=function(e){return new W(W.PARENT,A.nodeTest,[])},this.reduceActions[67]=function(e){return new oe(e[1])},this.reduceActions[68]=function(e){return A.nameTestAny},this.reduceActions[69]=function(e){return new A.NameTestPrefixAny(e[0].split(":")[0])},this.reduceActions[70]=function(e){return new A.NameTestQName(e[0])}},N.actionTable=[" s s sssssssss s ss s ss"," s ","r rrrrrrrrr rrrrrrr rr r "," rrrrr "," s s sssssssss s ss s ss","rs rrrrrrrr s sssssrrrrrr rrs rs "," s s sssssssss s ss s ss"," s "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s "," s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr r ","a ","r s rr r ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrs rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r srrrrrrrr rrrrrrs rr sr ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r "," sssss ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrr rrrrr rr r "," s "," s "," rrrrr "," s s sssssssss s sss s ss","r srrrrrrrr rrrrrrs rr r "," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss ss s ss"," s s sssssssss s ss s ss"," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr rr "," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," rr "," s "," rs ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrr rr r "," r "," s ","r srrrrrrrr rrrrrrs rr r ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s s sssssssss s ss s ss","r rrrrrrrrr rrrrrrr rr rr "," r "],N.actionTableNumber=[` 1 0 /.-,+*)(' & %$ # "!`," J ","a aaaaaaaaa aaaaaaa aa a "," YYYYY ",` 1 0 /.-,+*)(' & %$ # "!`,`K1 KKKKKKKK . +*)('KKKKKK KK# K" `,` 1 0 /.-,+*)(' & %$ # "!`," N "," O ","e eeeeeeeee eeeeeee ee ee ","f fffffffff fffffff ff ff ","d ddddddddd ddddddd dd dd ","B BBBBBBBBB BBBBBBB BB BB ","A AAAAAAAAA AAAAAAA AA AA "," P "," Q ",` 1 . +*)(' # " `,"b bbbbbbbbb bbbbbbb bb b "," ","! S !! ! ",'" T" "" " ',"$ V $$ U $$ $ ","& &ZY&& &XW && & ",") ))))) )))\\[ )) ) ",". ....._^] ..... .. . ","1 11111111 11111 11 1 ","5 55555555 55555` 55 5 ","7 77777777 777777 77 7 ","9 99999999 999999 99 9 ",": c:::::::: ::::::b :: a: ","I fIIIIIIII IIIIIIe II I ","= ========= ======= == == ","? ????????? ??????? ?? ?? ","C CCCCCCCCC CCCCCCC CC CC ","J JJJJJJJJ JJJJJJ JJ J ","M MMMMMMMM MMMMMM MM M ","N NNNNNNNNN NNNNNNN NN N ","P PPPPPPPPP PPPPPPP PP P "," +*)(' ","R RRRRRRRRR RRRRRRR RR aR ","U UUUUUUUUU UUUUUUU UU U ","Z ZZZZZZZZZ ZZZZZZZ ZZ ZZ ","c ccccccccc ccccccc cc cc "," j ","L fLLLLLLLL LLLLLLe LL L ","6 66666666 66666 66 6 "," k "," l "," XXXXX ",` 1 0 /.-,+*)(' & %$m # "!`,"_ f________ ______e __ _ ",` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 . +*)(' # " `,` 1 . +*)(' # " `,"> >>>>>>>>> >>>>>>> >> >> ",` 1 . +*)(' # " `,` 1 . +*)(' # " `,"Q QQQQQQQQQ QQQQQQQ QQ aQ ","V VVVVVVVVV VVVVVVV VV aV ","T TTTTTTTTT TTTTTTT TT T ","@ @@@@@@@@@ @@@@@@@ @@ @@ "," ‡ ","[ [[[[[[[[[ [[[[[[[ [[ [[ ","D DDDDDDDDD DDDDDDD DD DD "," HH "," ˆ "," F‰ ","# T# ## # ","% V %% U %% % ","' 'ZY'' 'XW '' ' ","( (ZY(( (XW (( ( ","+ +++++ +++\\[ ++ + ","* ***** ***\\[ ** * ","- ----- ---\\[ -- - ",", ,,,,, ,,,\\[ ,, , ","0 00000_^] 00000 00 0 ","/ /////_^] ///// // / ","2 22222222 22222 22 2 ","3 33333333 33333 33 3 ","4 44444444 44444 44 4 ","8 88888888 888888 88 8 "," ^ "," Š ","; f;;;;;;;; ;;;;;;e ;; ; ","< f<<<<<<<< <<<<<<e << < ","O OOOOOOOOO OOOOOOO OO O ","` ````````` ``````` `` ` ","S SSSSSSSSS SSSSSSS SS S ","W WWWWWWWWW WWWWWWW WW W ","\\ \\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\ \\\\ \\\\ ","E EEEEEEEEE EEEEEEE EE EE ",` 1 0 /.-,+*)(' & %$ # "!`,"] ]]]]]]]]] ]]]]]]] ]] ]] "," G "],N.gotoTable=["3456789:;<=>?@ AB CDEFGH IJ "," "," "," ","L456789:;<=>?@ AB CDEFGH IJ "," M EFGH IJ "," N;<=>?@ AB CDEFGH IJ "," "," "," "," "," "," "," "," "," "," S EFGH IJ "," "," "," "," "," "," "," "," "," "," "," "," "," e "," "," "," "," "," "," "," "," "," h J "," i j "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ ABpqCDEFGH IJ "," "," r6789:;<=>?@ AB CDEFGH IJ "," s789:;<=>?@ AB CDEFGH IJ "," t89:;<=>?@ AB CDEFGH IJ "," u89:;<=>?@ AB CDEFGH IJ "," v9:;<=>?@ AB CDEFGH IJ "," w9:;<=>?@ AB CDEFGH IJ "," x9:;<=>?@ AB CDEFGH IJ "," y9:;<=>?@ AB CDEFGH IJ "," z:;<=>?@ AB CDEFGH IJ "," {:;<=>?@ AB CDEFGH IJ "," |;<=>?@ AB CDEFGH IJ "," };<=>?@ AB CDEFGH IJ "," ~;<=>?@ AB CDEFGH IJ "," =>?@ AB CDEFGH IJ ","€456789:;<=>?@ AB CDEFGH IJ"," ‚ EFGH IJ "," ƒ EFGH IJ "," "," „ GH IJ "," … GH IJ "," i † "," i ‡ "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ ABŒqCDEFGH IJ "," "," "],N.productions=[[1,1,2],[2,1,3],[3,1,4],[3,3,3,-9,4],[4,1,5],[4,3,4,-8,5],[5,1,6],[5,3,5,-22,6],[5,3,5,-5,6],[6,1,7],[6,3,6,-23,7],[6,3,6,-24,7],[6,3,6,-6,7],[6,3,6,-7,7],[7,1,8],[7,3,7,-25,8],[7,3,7,-26,8],[8,1,9],[8,3,8,-12,9],[8,3,8,-11,9],[8,3,8,-10,9],[9,1,10],[9,2,-26,9],[10,1,11],[10,3,10,-27,11],[11,1,12],[11,1,13],[11,3,13,-28,14],[11,3,13,-4,14],[13,1,15],[13,2,13,16],[15,1,17],[15,3,-29,2,-30],[15,1,-15],[15,1,-16],[15,1,18],[18,3,-13,-29,-30],[18,4,-13,-29,19,-30],[19,1,20],[19,3,20,-31,19],[20,1,2],[12,1,14],[12,1,21],[21,1,-28],[21,2,-28,14],[21,1,22],[14,1,23],[14,3,14,-28,23],[14,1,24],[23,2,25,26],[23,1,26],[23,3,25,26,27],[23,2,26,27],[23,1,28],[27,1,16],[27,2,16,27],[25,2,-14,-3],[25,1,-32],[26,1,29],[26,3,-20,-29,-30],[26,4,-21,-29,-15,-30],[16,3,-33,30,-34],[30,1,2],[22,2,-4,14],[24,3,14,-4,23],[28,1,-35],[28,1,-2],[17,2,-36,-18],[29,1,-17],[29,1,-19],[29,1,-18]],N.DOUBLEDOT=2,N.DOUBLECOLON=3,N.DOUBLESLASH=4,N.NOTEQUAL=5,N.LESSTHANOREQUAL=6,N.GREATERTHANOREQUAL=7,N.AND=8,N.OR=9,N.MOD=10,N.DIV=11,N.MULTIPLYOPERATOR=12,N.FUNCTIONNAME=13,N.AXISNAME=14,N.LITERAL=15,N.NUMBER=16,N.ASTERISKNAMETEST=17,N.QNAME=18,N.NCNAMECOLONASTERISK=19,N.NODETYPE=20,N.PROCESSINGINSTRUCTIONWITHLITERAL=21,N.EQUALS=22,N.LESSTHAN=23,N.GREATERTHAN=24,N.PLUS=25,N.MINUS=26,N.BAR=27,N.SLASH=28,N.LEFTPARENTHESIS=29,N.RIGHTPARENTHESIS=30,N.COMMA=31,N.AT=32,N.LEFTBRACKET=33,N.RIGHTBRACKET=34,N.DOT=35,N.DOLLAR=36,N.prototype.tokenize=function(e){for(var s=[],d=[],b=e+"\0",h=0,T=b.charAt(h++);;){for(;T==" "||T==" "||T=="\r"||T==`
9
+ `;)T=b.charAt(h++);if(T=="\0"||h>=b.length)break;if(T=="("){s.push(N.LEFTPARENTHESIS),d.push(T),T=b.charAt(h++);continue}if(T==")"){s.push(N.RIGHTPARENTHESIS),d.push(T),T=b.charAt(h++);continue}if(T=="["){s.push(N.LEFTBRACKET),d.push(T),T=b.charAt(h++);continue}if(T=="]"){s.push(N.RIGHTBRACKET),d.push(T),T=b.charAt(h++);continue}if(T=="@"){s.push(N.AT),d.push(T),T=b.charAt(h++);continue}if(T==","){s.push(N.COMMA),d.push(T),T=b.charAt(h++);continue}if(T=="|"){s.push(N.BAR),d.push(T),T=b.charAt(h++);continue}if(T=="+"){s.push(N.PLUS),d.push(T),T=b.charAt(h++);continue}if(T=="-"){s.push(N.MINUS),d.push(T),T=b.charAt(h++);continue}if(T=="="){s.push(N.EQUALS),d.push(T),T=b.charAt(h++);continue}if(T=="$"){s.push(N.DOLLAR),d.push(T),T=b.charAt(h++);continue}if(T=="."){if(T=b.charAt(h++),T=="."){s.push(N.DOUBLEDOT),d.push(".."),T=b.charAt(h++);continue}if(T>="0"&&T<="9"){var se="."+T;for(T=b.charAt(h++);T>="0"&&T<="9";)se+=T,T=b.charAt(h++);s.push(N.NUMBER),d.push(se);continue}s.push(N.DOT),d.push(".");continue}if(T=="'"||T=='"'){for(var xe=T,Ne="";h<b.length&&(T=b.charAt(h))!==xe;)Ne+=T,h+=1;if(T!==xe)throw Me.fromMessage("Unterminated string literal: "+xe+Ne);h+=1,s.push(N.LITERAL),d.push(Ne),T=b.charAt(h++);continue}if(T>="0"&&T<="9"){var se=T;for(T=b.charAt(h++);T>="0"&&T<="9";)se+=T,T=b.charAt(h++);if(T=="."&&b.charAt(h)>="0"&&b.charAt(h)<="9")for(se+=T,se+=b.charAt(h++),T=b.charAt(h++);T>="0"&&T<="9";)se+=T,T=b.charAt(h++);s.push(N.NUMBER),d.push(se);continue}if(T=="*"){if(s.length>0){var ie=s[s.length-1];if(ie!=N.AT&&ie!=N.DOUBLECOLON&&ie!=N.LEFTPARENTHESIS&&ie!=N.LEFTBRACKET&&ie!=N.AND&&ie!=N.OR&&ie!=N.MOD&&ie!=N.DIV&&ie!=N.MULTIPLYOPERATOR&&ie!=N.SLASH&&ie!=N.DOUBLESLASH&&ie!=N.BAR&&ie!=N.PLUS&&ie!=N.MINUS&&ie!=N.EQUALS&&ie!=N.NOTEQUAL&&ie!=N.LESSTHAN&&ie!=N.LESSTHANOREQUAL&&ie!=N.GREATERTHAN&&ie!=N.GREATERTHANOREQUAL){s.push(N.MULTIPLYOPERATOR),d.push(T),T=b.charAt(h++);continue}}s.push(N.ASTERISKNAMETEST),d.push(T),T=b.charAt(h++);continue}if(T==":"&&b.charAt(h)==":"){s.push(N.DOUBLECOLON),d.push("::"),h++,T=b.charAt(h++);continue}if(T=="/"){if(T=b.charAt(h++),T=="/"){s.push(N.DOUBLESLASH),d.push("//"),T=b.charAt(h++);continue}s.push(N.SLASH),d.push("/");continue}if(T=="!"&&b.charAt(h)=="="){s.push(N.NOTEQUAL),d.push("!="),h++,T=b.charAt(h++);continue}if(T=="<"){if(b.charAt(h)=="="){s.push(N.LESSTHANOREQUAL),d.push("<="),h++,T=b.charAt(h++);continue}s.push(N.LESSTHAN),d.push("<"),T=b.charAt(h++);continue}if(T==">"){if(b.charAt(h)=="="){s.push(N.GREATERTHANOREQUAL),d.push(">="),h++,T=b.charAt(h++);continue}s.push(N.GREATERTHAN),d.push(">"),T=b.charAt(h++);continue}if(T=="_"||fe.isLetter(T.charCodeAt(0))){var ce=T;for(T=b.charAt(h++);fe.isNCNameChar(T.charCodeAt(0));)ce+=T,T=b.charAt(h++);if(s.length>0){var ie=s[s.length-1];if(ie!=N.AT&&ie!=N.DOUBLECOLON&&ie!=N.LEFTPARENTHESIS&&ie!=N.LEFTBRACKET&&ie!=N.AND&&ie!=N.OR&&ie!=N.MOD&&ie!=N.DIV&&ie!=N.MULTIPLYOPERATOR&&ie!=N.SLASH&&ie!=N.DOUBLESLASH&&ie!=N.BAR&&ie!=N.PLUS&&ie!=N.MINUS&&ie!=N.EQUALS&&ie!=N.NOTEQUAL&&ie!=N.LESSTHAN&&ie!=N.LESSTHANOREQUAL&&ie!=N.GREATERTHAN&&ie!=N.GREATERTHANOREQUAL){if(ce=="and"){s.push(N.AND),d.push(ce);continue}if(ce=="or"){s.push(N.OR),d.push(ce);continue}if(ce=="mod"){s.push(N.MOD),d.push(ce);continue}if(ce=="div"){s.push(N.DIV),d.push(ce);continue}}}if(T==":"){if(b.charAt(h)=="*"){s.push(N.NCNAMECOLONASTERISK),d.push(ce+":*"),h++,T=b.charAt(h++);continue}if(b.charAt(h)=="_"||fe.isLetter(b.charCodeAt(h))){for(ce+=":",T=b.charAt(h++);fe.isNCNameChar(T.charCodeAt(0));)ce+=T,T=b.charAt(h++);if(T=="("){s.push(N.FUNCTIONNAME),d.push(ce);continue}s.push(N.QNAME),d.push(ce);continue}if(b.charAt(h)==":"){s.push(N.AXISNAME),d.push(ce);continue}}if(T=="("){if(ce=="comment"||ce=="text"||ce=="node"){s.push(N.NODETYPE),d.push(ce);continue}if(ce=="processing-instruction"){b.charAt(h)==")"?s.push(N.NODETYPE):s.push(N.PROCESSINGINSTRUCTIONWITHLITERAL),d.push(ce);continue}s.push(N.FUNCTIONNAME),d.push(ce);continue}s.push(N.QNAME),d.push(ce);continue}throw new Error("Unexpected character "+T)}return s.push(1),d.push("[EOF]"),[s,d]},N.SHIFT="s",N.REDUCE="r",N.ACCEPT="a",N.prototype.parse=function(Ne){if(!Ne)throw new Error("XPath expression unspecified.");if(typeof Ne!="string")throw new Error("XPath expression must be a string.");var s,d,b=this.tokenize(Ne);if(b!=null){s=b[0],d=b[1];var h=0,T=[],se=[],xe=[],Ne,ie,ce;for(T.push(0),se.push(1),xe.push("_S"),ie=s[h],ce=d[h++];;)switch(Ne=T[T.length-1],N.actionTable[Ne].charAt(ie-1)){case N.SHIFT:se.push(-ie),xe.push(ce),T.push(N.actionTableNumber[Ne].charCodeAt(ie-1)-32),ie=s[h],ce=d[h++];break;case N.REDUCE:for(var Le=N.productions[N.actionTableNumber[Ne].charCodeAt(ie-1)-32][1],Ke=[],Se=0;Se<Le;Se++)se.pop(),Ke.unshift(xe.pop()),T.pop();var Qe=T[T.length-1];se.push(N.productions[N.actionTableNumber[Ne].charCodeAt(ie-1)-32][0]),this.reduceActions[N.actionTableNumber[Ne].charCodeAt(ie-1)-32]==null?xe.push(Ke[0]):xe.push(this.reduceActions[N.actionTableNumber[Ne].charCodeAt(ie-1)-32](Ke)),T.push(N.gotoTable[Qe].charCodeAt(N.productions[N.actionTableNumber[Ne].charCodeAt(ie-1)-32][0]-2)-33);break;case N.ACCEPT:return new le(xe.pop());default:throw new Error("XPath parse error")}}},le.prototype=new Object,le.prototype.constructor=le,le.superclass=Object.prototype;function le(e){this.expression=e}le.prototype.toString=function(){return this.expression.toString()};function w(e,s,d){s in e||(e[s]=d)}le.prototype.evaluate=function(e){var s=e.expressionContextNode;if(!(i(s)||f(s)))throw new Error("Context node does not appear to be a valid DOM node.");return e.contextNode=e.expressionContextNode,e.contextSize=1,e.contextPosition=1,e.isHtml&&(w(e,"caseInsensitive",!0),w(e,"allowAnyNamespaceForNoPrefix",!0)),w(e,"caseInsensitive",!1),this.expression.evaluate(e)},le.XML_NAMESPACE_URI="http://www.w3.org/XML/1998/namespace",le.XMLNS_NAMESPACE_URI="http://www.w3.org/2000/xmlns/",y.prototype=new Object,y.prototype.constructor=y,y.superclass=Object.prototype;function y(){}y.prototype.init=function(){},y.prototype.toString=function(){return"<Expression>"},y.prototype.evaluate=function(e){throw new Error("Could not evaluate expression.")},B.prototype=new y,B.prototype.constructor=B,B.superclass=y.prototype;function B(e){arguments.length>0&&this.init(e)}B.prototype.init=function(e){this.rhs=e},_.prototype=new B,_.prototype.constructor=_,_.superclass=B.prototype;function _(e){arguments.length>0&&this.init(e)}_.prototype.init=function(e){_.superclass.init.call(this,e)},_.prototype.evaluate=function(e){return this.rhs.evaluate(e).number().negate()},_.prototype.toString=function(){return"-"+this.rhs.toString()},L.prototype=new y,L.prototype.constructor=L,L.superclass=y.prototype;function L(e,s){arguments.length>0&&this.init(e,s)}L.prototype.init=function(e,s){this.lhs=e,this.rhs=s},$.prototype=new L,$.prototype.constructor=$,$.superclass=L.prototype;function $(e,s){arguments.length>0&&this.init(e,s)}$.prototype.init=function(e,s){$.superclass.init.call(this,e,s)},$.prototype.toString=function(){return"("+this.lhs.toString()+" or "+this.rhs.toString()+")"},$.prototype.evaluate=function(e){var s=this.lhs.evaluate(e).bool();return s.booleanValue()?s:this.rhs.evaluate(e).bool()},Z.prototype=new L,Z.prototype.constructor=Z,Z.superclass=L.prototype;function Z(e,s){arguments.length>0&&this.init(e,s)}Z.prototype.init=function(e,s){Z.superclass.init.call(this,e,s)},Z.prototype.toString=function(){return"("+this.lhs.toString()+" and "+this.rhs.toString()+")"},Z.prototype.evaluate=function(e){var s=this.lhs.evaluate(e).bool();return s.booleanValue()?this.rhs.evaluate(e).bool():s},te.prototype=new L,te.prototype.constructor=te,te.superclass=L.prototype;function te(e,s){arguments.length>0&&this.init(e,s)}te.prototype.init=function(e,s){te.superclass.init.call(this,e,s)},te.prototype.toString=function(){return"("+this.lhs.toString()+" = "+this.rhs.toString()+")"},te.prototype.evaluate=function(e){return this.lhs.evaluate(e).equals(this.rhs.evaluate(e))},g.prototype=new L,g.prototype.constructor=g,g.superclass=L.prototype;function g(e,s){arguments.length>0&&this.init(e,s)}g.prototype.init=function(e,s){g.superclass.init.call(this,e,s)},g.prototype.toString=function(){return"("+this.lhs.toString()+" != "+this.rhs.toString()+")"},g.prototype.evaluate=function(e){return this.lhs.evaluate(e).notequal(this.rhs.evaluate(e))},C.prototype=new L,C.prototype.constructor=C,C.superclass=L.prototype;function C(e,s){arguments.length>0&&this.init(e,s)}C.prototype.init=function(e,s){C.superclass.init.call(this,e,s)},C.prototype.evaluate=function(e){return this.lhs.evaluate(e).lessthan(this.rhs.evaluate(e))},C.prototype.toString=function(){return"("+this.lhs.toString()+" < "+this.rhs.toString()+")"},V.prototype=new L,V.prototype.constructor=V,V.superclass=L.prototype;function V(e,s){arguments.length>0&&this.init(e,s)}V.prototype.init=function(e,s){V.superclass.init.call(this,e,s)},V.prototype.evaluate=function(e){return this.lhs.evaluate(e).greaterthan(this.rhs.evaluate(e))},V.prototype.toString=function(){return"("+this.lhs.toString()+" > "+this.rhs.toString()+")"},j.prototype=new L,j.prototype.constructor=j,j.superclass=L.prototype;function j(e,s){arguments.length>0&&this.init(e,s)}j.prototype.init=function(e,s){j.superclass.init.call(this,e,s)},j.prototype.evaluate=function(e){return this.lhs.evaluate(e).lessthanorequal(this.rhs.evaluate(e))},j.prototype.toString=function(){return"("+this.lhs.toString()+" <= "+this.rhs.toString()+")"},R.prototype=new L,R.prototype.constructor=R,R.superclass=L.prototype;function R(e,s){arguments.length>0&&this.init(e,s)}R.prototype.init=function(e,s){R.superclass.init.call(this,e,s)},R.prototype.evaluate=function(e){return this.lhs.evaluate(e).greaterthanorequal(this.rhs.evaluate(e))},R.prototype.toString=function(){return"("+this.lhs.toString()+" >= "+this.rhs.toString()+")"},ee.prototype=new L,ee.prototype.constructor=ee,ee.superclass=L.prototype;function ee(e,s){arguments.length>0&&this.init(e,s)}ee.prototype.init=function(e,s){ee.superclass.init.call(this,e,s)},ee.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().plus(this.rhs.evaluate(e).number())},ee.prototype.toString=function(){return"("+this.lhs.toString()+" + "+this.rhs.toString()+")"},D.prototype=new L,D.prototype.constructor=D,D.superclass=L.prototype;function D(e,s){arguments.length>0&&this.init(e,s)}D.prototype.init=function(e,s){D.superclass.init.call(this,e,s)},D.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().minus(this.rhs.evaluate(e).number())},D.prototype.toString=function(){return"("+this.lhs.toString()+" - "+this.rhs.toString()+")"},O.prototype=new L,O.prototype.constructor=O,O.superclass=L.prototype;function O(e,s){arguments.length>0&&this.init(e,s)}O.prototype.init=function(e,s){O.superclass.init.call(this,e,s)},O.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().multiply(this.rhs.evaluate(e).number())},O.prototype.toString=function(){return"("+this.lhs.toString()+" * "+this.rhs.toString()+")"},F.prototype=new L,F.prototype.constructor=F,F.superclass=L.prototype;function F(e,s){arguments.length>0&&this.init(e,s)}F.prototype.init=function(e,s){F.superclass.init.call(this,e,s)},F.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().div(this.rhs.evaluate(e).number())},F.prototype.toString=function(){return"("+this.lhs.toString()+" div "+this.rhs.toString()+")"},G.prototype=new L,G.prototype.constructor=G,G.superclass=L.prototype;function G(e,s){arguments.length>0&&this.init(e,s)}G.prototype.init=function(e,s){G.superclass.init.call(this,e,s)},G.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().mod(this.rhs.evaluate(e).number())},G.prototype.toString=function(){return"("+this.lhs.toString()+" mod "+this.rhs.toString()+")"},X.prototype=new L,X.prototype.constructor=X,X.superclass=L.prototype;function X(e,s){arguments.length>0&&this.init(e,s)}X.prototype.init=function(e,s){X.superclass.init.call(this,e,s)},X.prototype.evaluate=function(e){return this.lhs.evaluate(e).nodeset().union(this.rhs.evaluate(e).nodeset())},X.prototype.toString=function(){return S(Y,[this.lhs,this.rhs]).join(" | ")},P.prototype=new y,P.prototype.constructor=P,P.superclass=y.prototype;function P(e,s,d){arguments.length>0&&this.init(e,s,d)}P.prototype.init=function(e,s,d){P.superclass.init.call(this),this.filter=e,this.filterPredicates=s,this.locationPath=d};function Q(e){for(;e&&e.parentNode;)e=e.parentNode;return e}var pe=function(e,s,d,b){if(e.length===0)return d;var h=s.extend({});return m(function(T,se){return h.contextSize=T.length,v(function(xe,Ne){return h.contextNode=xe,h.contextPosition=Ne+1,P.predicateMatches(se,h)},T)},re(d,b),e)};P.getRoot=function(e,s){var d=s[0];if(d&&d.nodeType===J.DOCUMENT_NODE)return d;if(e.virtualRoot)return e.virtualRoot;if(!d)throw new Error("Context node not found when determining document root.");var b=d.ownerDocument;if(b)return b;for(var h=d;h.parentNode!=null;)h=h.parentNode;return h};var Ee=function(e){var s=String(e.name);return s==="xmlns"?"":s.substring(0,6)==="xmlns:"?s.substring(6,s.length):null};P.applyStep=function(e,s,d){if(!d)throw new Error("Context node not found when evaluating XPath step: "+e);var b=[];switch(s.contextNode=d,e.axis){case W.ANCESTOR:if(s.contextNode===s.virtualRoot)break;var h;for(s.contextNode.nodeType==J.ATTRIBUTE_NODE?h=P.getOwnerElement(s.contextNode):h=s.contextNode.parentNode;h!=null&&(e.nodeTest.matches(h,s)&&b.push(h),h!==s.virtualRoot);)h=h.parentNode;break;case W.ANCESTORORSELF:for(var h=s.contextNode;h!=null&&(e.nodeTest.matches(h,s)&&b.push(h),h!==s.virtualRoot);h=h.nodeType==J.ATTRIBUTE_NODE?P.getOwnerElement(h):h.parentNode);break;case W.ATTRIBUTE:var T=s.contextNode.attributes;if(T!=null)for(var se=0;se<T.length;se++){var h=T.item(se);e.nodeTest.matches(h,s)&&b.push(h)}break;case W.CHILD:for(var h=s.contextNode.firstChild;h!=null;h=h.nextSibling)e.nodeTest.matches(h,s)&&b.push(h);break;case W.DESCENDANT:for(var ce=[s.contextNode.firstChild];ce.length>0;)for(var h=ce.pop();h!=null;)e.nodeTest.matches(h,s)&&b.push(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling;break;case W.DESCENDANTORSELF:e.nodeTest.matches(s.contextNode,s)&&b.push(s.contextNode);for(var ce=[s.contextNode.firstChild];ce.length>0;)for(var h=ce.pop();h!=null;)e.nodeTest.matches(h,s)&&b.push(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling;break;case W.FOLLOWING:if(s.contextNode===s.virtualRoot)break;var ce=[];s.contextNode.firstChild!=null?ce.unshift(s.contextNode.firstChild):ce.unshift(s.contextNode.nextSibling);for(var h=s.contextNode.parentNode;h!=null&&h.nodeType!=J.DOCUMENT_NODE&&h!==s.virtualRoot;h=h.parentNode)ce.unshift(h.nextSibling);do for(var h=ce.pop();h!=null;)e.nodeTest.matches(h,s)&&b.push(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling;while(ce.length>0);break;case W.FOLLOWINGSIBLING:if(s.contextNode===s.virtualRoot)break;for(var h=s.contextNode.nextSibling;h!=null;h=h.nextSibling)e.nodeTest.matches(h,s)&&b.push(h);break;case W.NAMESPACE:var xe={};if(s.contextNode.nodeType==J.ELEMENT_NODE){xe.xml=new ze("xml",null,le.XML_NAMESPACE_URI,s.contextNode);for(var h=s.contextNode;h!=null&&h.nodeType==J.ELEMENT_NODE;h=h.parentNode)for(var se=0;se<h.attributes.length;se++){var Ne=h.attributes.item(se),ie=Ee(Ne);ie!=null&&xe[ie]==null&&(xe[ie]=new ze(ie,Ne,Ne.value,s.contextNode))}for(var ie in xe){var d=xe[ie];e.nodeTest.matches(d,s)&&b.push(d)}}break;case W.PARENT:h=null,s.contextNode!==s.virtualRoot&&(s.contextNode.nodeType==J.ATTRIBUTE_NODE?h=P.getOwnerElement(s.contextNode):h=s.contextNode.parentNode),h!=null&&e.nodeTest.matches(h,s)&&b.push(h);break;case W.PRECEDING:var ce;s.virtualRoot!=null?ce=[s.virtualRoot]:ce=[Q(s.contextNode)];e:for(;ce.length>0;)for(var h=ce.pop();h!=null;){if(h==s.contextNode)break e;e.nodeTest.matches(h,s)&&b.unshift(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling}break;case W.PRECEDINGSIBLING:if(s.contextNode===s.virtualRoot)break;for(var h=s.contextNode.previousSibling;h!=null;h=h.previousSibling)e.nodeTest.matches(h,s)&&b.push(h);break;case W.SELF:e.nodeTest.matches(s.contextNode,s)&&b.push(s.contextNode);break}return b};function Te(e,s,d){return pe(e.predicates,s,P.applyStep(e,s,d),U(Be,e.axis))}function ke(e,s,d){return me(S(Te.bind(null,d,e),s))}P.applySteps=function(e,s,d){return m(ke.bind(null,s),d,e)},P.prototype.applyFilter=function(e,s){if(!this.filter)return{nodes:[e.contextNode]};var d=this.filter.evaluate(e);if(!fe.instance_of(d,ue)){if(this.filterPredicates!=null&&this.filterPredicates.length>0||this.locationPath!=null)throw new Error("Path expression filter must evaluate to a nodeset if predicates or location path are used");return{nonNodes:d}}return{nodes:pe(this.filterPredicates||[],s,d.toUnsortedArray(),!1)}},P.applyLocationPath=function(e,s,d){if(!e)return d;var b=e.absolute?[P.getRoot(s,d)]:d;return P.applySteps(e.steps,s,b)},P.prototype.evaluate=function(e){var s=be(new He,e),d=this.applyFilter(e,s);if("nonNodes"in d)return d.nonNodes;var b=new ue;return b.addArray(P.applyLocationPath(this.locationPath,s,d.nodes)),b},P.predicateMatches=function(e,s){var d=e.evaluate(s);return fe.instance_of(d,q)?s.contextPosition===d.numberValue():d.booleanValue()},P.predicateString=function(e){return H("[","]",e.toString())},P.predicatesString=function(e){return ae("",S(P.predicateString,e))},P.prototype.toString=function(){if(this.filter!=null){var e=Y(this.filter);return fe.instance_of(this.filter,I)?H("'","'",e):this.filterPredicates!=null&&this.filterPredicates.length?H("(",")",e)+P.predicatesString(this.filterPredicates):this.locationPath!=null?e+(this.locationPath.absolute?"":"/")+Y(this.locationPath):e}return Y(this.locationPath)},P.getOwnerElement=function(e){if(e.ownerElement)return e.ownerElement;try{if(e.selectSingleNode)return e.selectSingleNode("..")}catch{}for(var s=e.nodeType==J.DOCUMENT_NODE?e:e.ownerDocument,d=s.getElementsByTagName("*"),b=0;b<d.length;b++)for(var h=d.item(b),T=h.attributes,se=0;se<T.length;se++){var xe=T.item(se);if(xe===e)return h}return null},De.prototype=new Object,De.prototype.constructor=De,De.superclass=Object.prototype;function De(e,s){arguments.length>0&&this.init(e,s)}De.prototype.init=function(e,s){this.absolute=e,this.steps=s},De.prototype.toString=function(){return(this.absolute?"/":"")+S(Y,this.steps).join("/")},W.prototype=new Object,W.prototype.constructor=W,W.superclass=Object.prototype;function W(e,s,d){arguments.length>0&&this.init(e,s,d)}W.prototype.init=function(e,s,d){this.axis=e,this.nodeTest=s,this.predicates=d},W.prototype.toString=function(){return W.STEPNAMES[this.axis]+"::"+this.nodeTest.toString()+P.predicatesString(this.predicates)},W.ANCESTOR=0,W.ANCESTORORSELF=1,W.ATTRIBUTE=2,W.CHILD=3,W.DESCENDANT=4,W.DESCENDANTORSELF=5,W.FOLLOWING=6,W.FOLLOWINGSIBLING=7,W.NAMESPACE=8,W.PARENT=9,W.PRECEDING=10,W.PRECEDINGSIBLING=11,W.SELF=12,W.STEPNAMES=m(function(e,s){return e[s[0]]=s[1],e},{},[[W.ANCESTOR,"ancestor"],[W.ANCESTORORSELF,"ancestor-or-self"],[W.ATTRIBUTE,"attribute"],[W.CHILD,"child"],[W.DESCENDANT,"descendant"],[W.DESCENDANTORSELF,"descendant-or-self"],[W.FOLLOWING,"following"],[W.FOLLOWINGSIBLING,"following-sibling"],[W.NAMESPACE,"namespace"],[W.PARENT,"parent"],[W.PRECEDING,"preceding"],[W.PRECEDINGSIBLING,"preceding-sibling"],[W.SELF,"self"]]);var Be=[W.ANCESTOR,W.ANCESTORORSELF,W.PARENT,W.PRECEDING,W.PRECEDINGSIBLING];A.prototype=new Object,A.prototype.constructor=A,A.superclass=Object.prototype;function A(e,s){arguments.length>0&&this.init(e,s)}A.prototype.init=function(e,s){this.type=e,this.value=s},A.prototype.toString=function(){return"<unknown nodetest type>"},A.prototype.matches=function(e,s){console.warn("unknown node test type")},A.NAMETESTANY=0,A.NAMETESTPREFIXANY=1,A.NAMETESTQNAME=2,A.COMMENT=3,A.TEXT=4,A.PI=5,A.NODE=6,A.isNodeType=function(e){return function(s){return U(e,s.nodeType)}},A.makeNodeTestType=function(e,s,d){var b=d||function(){};return b.prototype=new A(e),b.prototype.constructor=b,be(b.prototype,s),b},A.makeNodeTypeTest=function(e,s,d){return new(A.makeNodeTestType(e,{matches:A.isNodeType(s),toString:K(d)}))},A.hasPrefix=function(e){return e.prefix||(e.nodeName||e.tagName).indexOf(":")!==-1},A.isElementOrAttribute=A.isNodeType([1,2]),A.nameSpaceMatches=function(e,s,d){var b=d.namespaceURI||"";if(!e)return!b||s.allowAnyNamespaceForNoPrefix&&!A.hasPrefix(d);var h=s.namespaceResolver.getNamespace(e,s.expressionContextNode);if(h==null)throw new Error("Cannot resolve QName "+e);return h===b},A.localNameMatches=function(e,s,d){var b=d.localName||d.nodeName;return s.caseInsensitive?e.toLowerCase()===b.toLowerCase():e===b},A.NameTestPrefixAny=A.makeNodeTestType(A.NAMETESTPREFIXANY,{matches:function(e,s){return A.isElementOrAttribute(e)&&A.nameSpaceMatches(this.prefix,s,e)},toString:function(){return this.prefix+":*"}},function(s){this.prefix=s}),A.NameTestQName=A.makeNodeTestType(A.NAMETESTQNAME,{matches:function(e,s){return A.isNodeType([J.ELEMENT_NODE,J.ATTRIBUTE_NODE,J.NAMESPACE_NODE])(e)&&A.nameSpaceMatches(this.prefix,s,e)&&A.localNameMatches(this.localName,s,e)},toString:function(){return this.name}},function(s){var d=s.split(":");this.name=s,this.prefix=d.length>1?d[0]:null,this.localName=d[d.length>1?1:0]}),A.PITest=A.makeNodeTestType(A.PI,{matches:function(e,s){return A.isNodeType([J.PROCESSING_INSTRUCTION_NODE])(e)&&(e.target||e.nodeName)===this.name},toString:function(){return H('processing-instruction("','")',this.name)}},function(e){this.name=e}),A.nameTestAny=A.makeNodeTypeTest(A.NAMETESTANY,[J.ELEMENT_NODE,J.ATTRIBUTE_NODE,J.NAMESPACE_NODE],"*"),A.textTest=A.makeNodeTypeTest(A.TEXT,[J.TEXT_NODE,J.CDATA_SECTION_NODE],"text()"),A.commentTest=A.makeNodeTypeTest(A.COMMENT,[J.COMMENT_NODE],"comment()"),A.nodeTest=A.makeNodeTypeTest(A.NODE,[J.ELEMENT_NODE,J.ATTRIBUTE_NODE,J.TEXT_NODE,J.CDATA_SECTION_NODE,J.PROCESSING_INSTRUCTION_NODE,J.COMMENT_NODE,J.DOCUMENT_NODE],"node()"),A.anyPiTest=A.makeNodeTypeTest(A.PI,[J.PROCESSING_INSTRUCTION_NODE],"processing-instruction()"),oe.prototype=new y,oe.prototype.constructor=oe,oe.superclass=y.prototype;function oe(e){arguments.length>0&&this.init(e)}oe.prototype.init=function(e){this.variable=e},oe.prototype.toString=function(){return"$"+this.variable},oe.prototype.evaluate=function(e){var s=fe.resolveQName(this.variable,e.namespaceResolver,e.contextNode,!1);if(s[0]==null)throw new Error("Cannot resolve QName "+fn);var d=e.variableResolver.getVariable(s[1],s[0]);if(!d)throw Me.fromMessage("Undeclared variable: "+this.toString());return d},Ce.prototype=new y,Ce.prototype.constructor=Ce,Ce.superclass=y.prototype;function Ce(e,s){arguments.length>0&&this.init(e,s)}Ce.prototype.init=function(e,s){this.functionName=e,this.arguments=s},Ce.prototype.toString=function(){for(var e=this.functionName+"(",s=0;s<this.arguments.length;s++)s>0&&(e+=", "),e+=this.arguments[s].toString();return e+")"},Ce.prototype.evaluate=function(e){var s=Pe.getFunctionFromContext(this.functionName,e);if(!s)throw new Error("Unknown function "+this.functionName);var d=[e].concat(this.arguments);return s.apply(e.functionResolver.thisArg,d)};var ye=new Object;ye.equals=function(e,s){return e.equals(s)},ye.notequal=function(e,s){return e.notequal(s)},ye.lessthan=function(e,s){return e.lessthan(s)},ye.greaterthan=function(e,s){return e.greaterthan(s)},ye.lessthanorequal=function(e,s){return e.lessthanorequal(s)},ye.greaterthanorequal=function(e,s){return e.greaterthanorequal(s)},I.prototype=new y,I.prototype.constructor=I,I.superclass=y.prototype;function I(e){arguments.length>0&&this.init(e)}I.prototype.init=function(e){this.str=String(e)},I.prototype.toString=function(){return this.str},I.prototype.evaluate=function(e){return this},I.prototype.string=function(){return this},I.prototype.number=function(){return new q(this.str)},I.prototype.bool=function(){return new he(this.str)},I.prototype.nodeset=function(){throw new Error("Cannot convert string to nodeset")},I.prototype.stringValue=function(){return this.str},I.prototype.numberValue=function(){return this.number().numberValue()},I.prototype.booleanValue=function(){return this.bool().booleanValue()},I.prototype.equals=function(e){return fe.instance_of(e,he)?this.bool().equals(e):fe.instance_of(e,q)?this.number().equals(e):fe.instance_of(e,ue)?e.compareWithString(this,ye.equals):new he(this.str==e.str)},I.prototype.notequal=function(e){return fe.instance_of(e,he)?this.bool().notequal(e):fe.instance_of(e,q)?this.number().notequal(e):fe.instance_of(e,ue)?e.compareWithString(this,ye.notequal):new he(this.str!=e.str)},I.prototype.lessthan=function(e){return this.number().lessthan(e)},I.prototype.greaterthan=function(e){return this.number().greaterthan(e)},I.prototype.lessthanorequal=function(e){return this.number().lessthanorequal(e)},I.prototype.greaterthanorequal=function(e){return this.number().greaterthanorequal(e)},q.prototype=new y,q.prototype.constructor=q,q.superclass=y.prototype;function q(e){arguments.length>0&&this.init(e)}q.prototype.init=function(e){this.num=typeof e=="string"?this.parse(e):Number(e)},q.prototype.numberFormat=/^\s*-?[0-9]*\.?[0-9]+\s*$/,q.prototype.parse=function(e){return this.numberFormat.test(e)?parseFloat(e):Number.NaN};function Re(e){for(var s=e.split("e-"),d=s[0].replace(".",""),b=Number(s[1]),h=0;h<b-1;h+=1)d="0"+d;return"0."+d}function Ue(e){for(var s=e.split("e"),d=s[0].replace(".",""),b=Number(s[1]),h=b+1-d.length,T=0;T<h;T+=1)d+="0";return d}q.prototype.toString=function(){var e=this.num.toString();return e.indexOf("e-")!==-1?Re(e):e.indexOf("e")!==-1?Ue(e):e},q.prototype.evaluate=function(e){return this},q.prototype.string=function(){return new I(this.toString())},q.prototype.number=function(){return this},q.prototype.bool=function(){return new he(this.num)},q.prototype.nodeset=function(){throw new Error("Cannot convert number to nodeset")},q.prototype.stringValue=function(){return this.string().stringValue()},q.prototype.numberValue=function(){return this.num},q.prototype.booleanValue=function(){return this.bool().booleanValue()},q.prototype.negate=function(){return new q(-this.num)},q.prototype.equals=function(e){return fe.instance_of(e,he)?this.bool().equals(e):fe.instance_of(e,I)?this.equals(e.number()):fe.instance_of(e,ue)?e.compareWithNumber(this,ye.equals):new he(this.num==e.num)},q.prototype.notequal=function(e){return fe.instance_of(e,he)?this.bool().notequal(e):fe.instance_of(e,I)?this.notequal(e.number()):fe.instance_of(e,ue)?e.compareWithNumber(this,ye.notequal):new he(this.num!=e.num)},q.prototype.lessthan=function(e){return fe.instance_of(e,ue)?e.compareWithNumber(this,ye.greaterthan):fe.instance_of(e,he)||fe.instance_of(e,I)?this.lessthan(e.number()):new he(this.num<e.num)},q.prototype.greaterthan=function(e){return fe.instance_of(e,ue)?e.compareWithNumber(this,ye.lessthan):fe.instance_of(e,he)||fe.instance_of(e,I)?this.greaterthan(e.number()):new he(this.num>e.num)},q.prototype.lessthanorequal=function(e){return fe.instance_of(e,ue)?e.compareWithNumber(this,ye.greaterthanorequal):fe.instance_of(e,he)||fe.instance_of(e,I)?this.lessthanorequal(e.number()):new he(this.num<=e.num)},q.prototype.greaterthanorequal=function(e){return fe.instance_of(e,ue)?e.compareWithNumber(this,ye.lessthanorequal):fe.instance_of(e,he)||fe.instance_of(e,I)?this.greaterthanorequal(e.number()):new he(this.num>=e.num)},q.prototype.plus=function(e){return new q(this.num+e.num)},q.prototype.minus=function(e){return new q(this.num-e.num)},q.prototype.multiply=function(e){return new q(this.num*e.num)},q.prototype.div=function(e){return new q(this.num/e.num)},q.prototype.mod=function(e){return new q(this.num%e.num)},he.prototype=new y,he.prototype.constructor=he,he.superclass=y.prototype;function he(e){arguments.length>0&&this.init(e)}he.prototype.init=function(e){this.b=!!e},he.prototype.toString=function(){return this.b.toString()},he.prototype.evaluate=function(e){return this},he.prototype.string=function(){return new I(this.b)},he.prototype.number=function(){return new q(this.b)},he.prototype.bool=function(){return this},he.prototype.nodeset=function(){throw new Error("Cannot convert boolean to nodeset")},he.prototype.stringValue=function(){return this.string().stringValue()},he.prototype.numberValue=function(){return this.number().numberValue()},he.prototype.booleanValue=function(){return this.b},he.prototype.not=function(){return new he(!this.b)},he.prototype.equals=function(e){return fe.instance_of(e,I)||fe.instance_of(e,q)?this.equals(e.bool()):fe.instance_of(e,ue)?e.compareWithBoolean(this,ye.equals):new he(this.b==e.b)},he.prototype.notequal=function(e){return fe.instance_of(e,I)||fe.instance_of(e,q)?this.notequal(e.bool()):fe.instance_of(e,ue)?e.compareWithBoolean(this,ye.notequal):new he(this.b!=e.b)},he.prototype.lessthan=function(e){return this.number().lessthan(e)},he.prototype.greaterthan=function(e){return this.number().greaterthan(e)},he.prototype.lessthanorequal=function(e){return this.number().lessthanorequal(e)},he.prototype.greaterthanorequal=function(e){return this.number().greaterthanorequal(e)},he.true_=new he(!0),he.false_=new he(!1),Ie.prototype=new Object,Ie.prototype.constructor=Ie,Ie.superclass=Object.prototype;function Ie(e){this.init(e)}Ie.prototype.init=function(e){this.left=null,this.right=null,this.node=e,this.depth=1},Ie.prototype.balance=function(){var e=this.left==null?0:this.left.depth,s=this.right==null?0:this.right.depth;if(e>s+1){var d=this.left.left==null?0:this.left.left.depth,b=this.left.right==null?0:this.left.right.depth;d<b&&this.left.rotateRR(),this.rotateLL()}else if(e+1<s){var h=this.right.right==null?0:this.right.right.depth,T=this.right.left==null?0:this.right.left.depth;T>h&&this.right.rotateLL(),this.rotateRR()}},Ie.prototype.rotateLL=function(){var e=this.node,s=this.right;this.node=this.left.node,this.right=this.left,this.left=this.left.left,this.right.left=this.right.right,this.right.right=s,this.right.node=e,this.right.updateInNewLocation(),this.updateInNewLocation()},Ie.prototype.rotateRR=function(){var e=this.node,s=this.left;this.node=this.right.node,this.left=this.right,this.right=this.right.right,this.left.right=this.left.left,this.left.left=s,this.left.node=e,this.left.updateInNewLocation(),this.updateInNewLocation()},Ie.prototype.updateInNewLocation=function(){this.getDepthFromChildren()},Ie.prototype.getDepthFromChildren=function(){this.depth=this.node==null?0:1,this.left!=null&&(this.depth=this.left.depth+1),this.right!=null&&this.depth<=this.right.depth&&(this.depth=this.right.depth+1)};function gt(e,s){if(e===s)return 0;if(e.compareDocumentPosition){var d=e.compareDocumentPosition(s);return d&1||d&10?1:d&20?-1:0}for(var b=0,h=0,T=e;T!=null;T=T.parentNode||T.ownerElement)b++;for(var se=s;se!=null;se=se.parentNode||se.ownerElement)h++;if(b>h){for(;b>h;)e=e.parentNode||e.ownerElement,b--;if(e===s)return 1}else if(h>b){for(;h>b;)s=s.parentNode||s.ownerElement,h--;if(e===s)return-1}for(var xe=e.parentNode||e.ownerElement,Ne=s.parentNode||s.ownerElement;xe!==Ne;)e=xe,s=Ne,xe=e.parentNode||e.ownerElement,Ne=s.parentNode||s.ownerElement;var ie=Et(e),ce=Et(s);if(ie&&!ce)return-1;if(!ie&&ce)return 1;if(e.isXPathNamespace){if(e.nodeValue===le.XML_NAMESPACE_URI||!s.isXPathNamespace)return-1;if(s.nodeValue===le.XML_NAMESPACE_URI)return 1}else if(s.isXPathNamespace)return 1;if(xe)for(var Le=ie?xe.attributes:xe.childNodes,Ke=Le.length,Se=e.baseNode||e,Qe=s.baseNode||s,Xe=0;Xe<Ke;Xe+=1){var ot=Le[Xe];if(ot===Se)return-1;if(ot===Qe)return 1}throw new Error("Unexpected: could not determine node order")}Ie.prototype.add=function(e){if(e===this.node)return!1;var s=gt(e,this.node),d=!1;return s==-1?this.left==null?(this.left=new Ie(e),d=!0):(d=this.left.add(e),d&&this.balance()):s==1&&(this.right==null?(this.right=new Ie(e),d=!0):(d=this.right.add(e),d&&this.balance())),d&&this.getDepthFromChildren(),d},ue.prototype=new y,ue.prototype.constructor=ue,ue.superclass=y.prototype;function ue(){this.init()}ue.prototype.init=function(){this.tree=null,this.nodes=[],this.size=0},ue.prototype.toString=function(){var e=this.first();return e==null?"":this.stringForNode(e)},ue.prototype.evaluate=function(e){return this},ue.prototype.string=function(){return new I(this.toString())},ue.prototype.stringValue=function(){return this.toString()},ue.prototype.number=function(){return new q(this.string())},ue.prototype.numberValue=function(){return Number(this.string())},ue.prototype.bool=function(){return new he(this.booleanValue())},ue.prototype.booleanValue=function(){return!!this.size},ue.prototype.nodeset=function(){return this},ue.prototype.stringForNode=function(e){return e.nodeType==J.DOCUMENT_NODE||e.nodeType==J.ELEMENT_NODE||e.nodeType===J.DOCUMENT_FRAGMENT_NODE?this.stringForContainerNode(e):e.nodeType===J.ATTRIBUTE_NODE?e.value||e.nodeValue:e.isNamespaceNode?e.namespace:e.nodeValue},ue.prototype.stringForContainerNode=function(e){for(var s="",d=e.firstChild;d!=null;d=d.nextSibling){var b=d.nodeType;(b===1||b===3||b===4||b===9||b===11)&&(s+=this.stringForNode(d))}return s},ue.prototype.buildTree=function(){if(!this.tree&&this.nodes.length){this.tree=new Ie(this.nodes[0]);for(var e=1;e<this.nodes.length;e+=1)this.tree.add(this.nodes[e])}return this.tree},ue.prototype.first=function(){var e=this.buildTree();if(e==null)return null;for(;e.left!=null;)e=e.left;return e.node},ue.prototype.add=function(e){for(var s=0;s<this.nodes.length;s+=1)if(e===this.nodes[s])return;this.tree=null,this.nodes.push(e),this.size+=1},ue.prototype.addArray=function(e){var s=this;p(function(d){s.add(d)},e)},ue.prototype.toArray=function(){var e=[];return this.toArrayRec(this.buildTree(),e),e},ue.prototype.toArrayRec=function(e,s){e!=null&&(this.toArrayRec(e.left,s),s.push(e.node),this.toArrayRec(e.right,s))},ue.prototype.toUnsortedArray=function(){return this.nodes.slice()},ue.prototype.compareWithString=function(e,s){for(var d=this.toUnsortedArray(),b=0;b<d.length;b++){var h=d[b],T=new I(this.stringForNode(h)),se=s(T,e);if(se.booleanValue())return se}return new he(!1)},ue.prototype.compareWithNumber=function(e,s){for(var d=this.toUnsortedArray(),b=0;b<d.length;b++){var h=d[b],T=new q(this.stringForNode(h)),se=s(T,e);if(se.booleanValue())return se}return new he(!1)},ue.prototype.compareWithBoolean=function(e,s){return s(this.bool(),e)},ue.prototype.compareWithNodeSet=function(e,s){for(var d=this.toUnsortedArray(),b=function(xe,Ne){return s(Ne,xe)},h=0;h<d.length;h++){var T=new I(this.stringForNode(d[h])),se=e.compareWithString(T,b);if(se.booleanValue())return se}return new he(!1)},ue.compareWith=x(function(e,s){return fe.instance_of(s,I)?this.compareWithString(s,e):fe.instance_of(s,q)?this.compareWithNumber(s,e):fe.instance_of(s,he)?this.compareWithBoolean(s,e):this.compareWithNodeSet(s,e)}),ue.prototype.equals=ue.compareWith(ye.equals),ue.prototype.notequal=ue.compareWith(ye.notequal),ue.prototype.lessthan=ue.compareWith(ye.lessthan),ue.prototype.greaterthan=ue.compareWith(ye.greaterthan),ue.prototype.lessthanorequal=ue.compareWith(ye.lessthanorequal),ue.prototype.greaterthanorequal=ue.compareWith(ye.greaterthanorequal),ue.prototype.union=function(e){var s=new ue;return s.addArray(this.toUnsortedArray()),s.addArray(e.toUnsortedArray()),s},ze.prototype=new Object,ze.prototype.constructor=ze,ze.superclass=Object.prototype;function ze(e,s,d,b){this.isXPathNamespace=!0,this.baseNode=s,this.ownerDocument=b.ownerDocument,this.nodeName=e,this.prefix=e,this.localName=e,this.namespaceURI=null,this.nodeValue=d,this.ownerElement=b,this.nodeType=J.NAMESPACE_NODE}ze.prototype.toString=function(){return'{ "'+this.prefix+'", "'+this.namespaceURI+'" }'},He.prototype=new Object,He.prototype.constructor=He,He.superclass=Object.prototype;function He(e,s,d){this.variableResolver=e??new Ge,this.namespaceResolver=s??new je,this.functionResolver=d??new Pe}He.prototype.extend=function(e){return be(new He,this,e)},Ge.prototype=new Object,Ge.prototype.constructor=Ge,Ge.superclass=Object.prototype;function Ge(){}Ge.prototype.getVariable=function(e,s){return null},Pe.prototype=new Object,Pe.prototype.constructor=Pe,Pe.superclass=Object.prototype;function Pe(e){this.thisArg=e??ge,this.functions=new Object,this.addStandardFunctions()}Pe.prototype.addStandardFunctions=function(){this.functions["{}last"]=ge.last,this.functions["{}position"]=ge.position,this.functions["{}count"]=ge.count,this.functions["{}id"]=ge.id,this.functions["{}local-name"]=ge.localName,this.functions["{}namespace-uri"]=ge.namespaceURI,this.functions["{}name"]=ge.name,this.functions["{}string"]=ge.string,this.functions["{}concat"]=ge.concat,this.functions["{}starts-with"]=ge.startsWith,this.functions["{}contains"]=ge.contains,this.functions["{}substring-before"]=ge.substringBefore,this.functions["{}substring-after"]=ge.substringAfter,this.functions["{}substring"]=ge.substring,this.functions["{}string-length"]=ge.stringLength,this.functions["{}normalize-space"]=ge.normalizeSpace,this.functions["{}translate"]=ge.translate,this.functions["{}boolean"]=ge.boolean_,this.functions["{}not"]=ge.not,this.functions["{}true"]=ge.true_,this.functions["{}false"]=ge.false_,this.functions["{}lang"]=ge.lang,this.functions["{}number"]=ge.number,this.functions["{}sum"]=ge.sum,this.functions["{}floor"]=ge.floor,this.functions["{}ceiling"]=ge.ceiling,this.functions["{}round"]=ge.round},Pe.prototype.addFunction=function(e,s,d){this.functions["{"+e+"}"+s]=d},Pe.getFunctionFromContext=function(e,s){var d=fe.resolveQName(e,s.namespaceResolver,s.contextNode,!1);if(d[0]===null)throw new Error("Cannot resolve QName "+name);return s.functionResolver.getFunction(d[1],d[0])},Pe.prototype.getFunction=function(e,s){return this.functions["{"+s+"}"+e]},je.prototype=new Object,je.prototype.constructor=je,je.superclass=Object.prototype;function je(){}je.prototype.getNamespace=function(e,s){if(e=="xml")return le.XML_NAMESPACE_URI;if(e=="xmlns")return le.XMLNS_NAMESPACE_URI;for(s.nodeType==J.DOCUMENT_NODE?s=s.documentElement:s.nodeType==J.ATTRIBUTE_NODE?s=P.getOwnerElement(s):s.nodeType!=J.ELEMENT_NODE&&(s=s.parentNode);s!=null&&s.nodeType==J.ELEMENT_NODE;){for(var d=s.attributes,b=0;b<d.length;b++){var h=d.item(b),T=h.name||h.nodeName;if(T==="xmlns"&&e===""||T==="xmlns:"+e)return String(h.value||h.nodeValue)}s=s.parentNode}return null};var ge=new Object;ge.last=function(e){if(arguments.length!=1)throw new Error("Function last expects ()");return new q(e.contextSize)},ge.position=function(e){if(arguments.length!=1)throw new Error("Function position expects ()");return new q(e.contextPosition)},ge.count=function(){var e=arguments[0],s;if(arguments.length!=2||!fe.instance_of(s=arguments[1].evaluate(e),ue))throw new Error("Function count expects (node-set)");return new q(s.size)},ge.id=function(){var e=arguments[0],s;if(arguments.length!=2)throw new Error("Function id expects (object)");s=arguments[1].evaluate(e),fe.instance_of(s,ue)?s=s.toArray().join(" "):s=s.stringValue();for(var d=s.split(/[\x0d\x0a\x09\x20]+/),b=new ue,h=e.contextNode.nodeType==J.DOCUMENT_NODE?e.contextNode:e.contextNode.ownerDocument,T=0;T<d.length;T++){var se;h.getElementById?se=h.getElementById(d[T]):se=fe.getElementById(h,d[T]),se!=null&&b.add(se)}return b},ge.localName=function(e,s){var d;if(arguments.length==1)d=e.contextNode;else if(arguments.length==2)d=s.evaluate(e).first();else throw new Error("Function local-name expects (node-set?)");return d==null?new I(""):new I(d.localName||d.baseName||d.target||d.nodeName||"")},ge.namespaceURI=function(){var e=arguments[0],s;if(arguments.length==1)s=e.contextNode;else if(arguments.length==2)s=arguments[1].evaluate(e).first();else throw new Error("Function namespace-uri expects (node-set?)");return s==null?new I(""):new I(s.namespaceURI||"")},ge.name=function(){var e=arguments[0],s;if(arguments.length==1)s=e.contextNode;else if(arguments.length==2)s=arguments[1].evaluate(e).first();else throw new Error("Function name expects (node-set?)");return s==null?new I(""):s.nodeType==J.ELEMENT_NODE?new I(s.nodeName):s.nodeType==J.ATTRIBUTE_NODE?new I(s.name||s.nodeName):s.nodeType===J.PROCESSING_INSTRUCTION_NODE?new I(s.target||s.nodeName):s.localName==null?new I(""):new I(s.localName)},ge.string=function(){var e=arguments[0];if(arguments.length==1)return new I(ue.prototype.stringForNode(e.contextNode));if(arguments.length==2)return arguments[1].evaluate(e).string();throw new Error("Function string expects (object?)")},ge.concat=function(e){if(arguments.length<3)throw new Error("Function concat expects (string, string[, string]*)");for(var s="",d=1;d<arguments.length;d++)s+=arguments[d].evaluate(e).stringValue();return new I(s)},ge.startsWith=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function startsWith expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();return new he(s.substring(0,d.length)==d)},ge.contains=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function contains expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();return new he(s.indexOf(d)!==-1)},ge.substringBefore=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function substring-before expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();return new I(s.substring(0,s.indexOf(d)))},ge.substringAfter=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function substring-after expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();if(d.length==0)return new I(s);var b=s.indexOf(d);return b==-1?new I(""):new I(s.substring(b+d.length))},ge.substring=function(){var e=arguments[0];if(!(arguments.length==3||arguments.length==4))throw new Error("Function substring expects (string, number, number?)");var s=arguments[1].evaluate(e).stringValue(),d=Math.round(arguments[2].evaluate(e).numberValue())-1,b=arguments.length==4?d+Math.round(arguments[3].evaluate(e).numberValue()):void 0;return new I(s.substring(d,b))},ge.stringLength=function(){var e=arguments[0],s;if(arguments.length==1)s=ue.prototype.stringForNode(e.contextNode);else if(arguments.length==2)s=arguments[1].evaluate(e).stringValue();else throw new Error("Function string-length expects (string?)");return new q(s.length)},ge.normalizeSpace=function(){var e=arguments[0],s;if(arguments.length==1)s=ue.prototype.stringForNode(e.contextNode);else if(arguments.length==2)s=arguments[1].evaluate(e).stringValue();else throw new Error("Function normalize-space expects (string?)");for(var d=0,b=s.length-1;fe.isSpace(s.charCodeAt(b));)b--;for(var h="";d<=b&&fe.isSpace(s.charCodeAt(d));)d++;for(;d<=b;)if(fe.isSpace(s.charCodeAt(d)))for(h+=" ";d<=b&&fe.isSpace(s.charCodeAt(d));)d++;else h+=s.charAt(d),d++;return new I(h)},ge.translate=function(e,s,d,b){if(arguments.length!=4)throw new Error("Function translate expects (string, string, string)");var h=s.evaluate(e).stringValue(),T=d.evaluate(e).stringValue(),se=b.evaluate(e).stringValue(),xe=m(function(ie,ce,Le){return ce in ie||(ie[ce]=Le>se.length?"":se[Le]),ie},{},T),Ne=ae("",S(function(ie){return ie in xe?xe[ie]:ie},h));return new I(Ne)},ge.boolean_=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function boolean expects (object)");return arguments[1].evaluate(e).bool()},ge.not=function(e,s){if(arguments.length!=2)throw new Error("Function not expects (object)");return s.evaluate(e).bool().not()},ge.true_=function(){if(arguments.length!=1)throw new Error("Function true expects ()");return he.true_},ge.false_=function(){if(arguments.length!=1)throw new Error("Function false expects ()");return he.false_},ge.lang=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function lang expects (string)");for(var s,d=e.contextNode;d!=null&&d.nodeType!=J.DOCUMENT_NODE;d=d.parentNode){var b=d.getAttributeNS(le.XML_NAMESPACE_URI,"lang");if(b!=null){s=String(b);break}}if(s==null)return he.false_;var h=arguments[1].evaluate(e).stringValue();return new he(s.substring(0,h.length)==h&&(s.length==h.length||s.charAt(h.length)=="-"))},ge.number=function(){var e=arguments[0];if(!(arguments.length==1||arguments.length==2))throw new Error("Function number expects (object?)");return arguments.length==1?new q(ue.prototype.stringForNode(e.contextNode)):arguments[1].evaluate(e).number()},ge.sum=function(){var e=arguments[0],s;if(arguments.length!=2||!fe.instance_of(s=arguments[1].evaluate(e),ue))throw new Error("Function sum expects (node-set)");s=s.toUnsortedArray();for(var d=0,b=0;b<s.length;b++)d+=new q(ue.prototype.stringForNode(s[b])).numberValue();return new q(d)},ge.floor=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function floor expects (number)");return new q(Math.floor(arguments[1].evaluate(e).numberValue()))},ge.ceiling=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function ceiling expects (number)");return new q(Math.ceil(arguments[1].evaluate(e).numberValue()))},ge.round=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function round expects (number)");return new q(Math.round(arguments[1].evaluate(e).numberValue()))};var fe=new Object,Et=function(e){return e&&(e.nodeType===J.ATTRIBUTE_NODE||e.ownerElement||e.isXPathNamespace)};fe.splitQName=function(e){var s=e.indexOf(":");return s==-1?[null,e]:[e.substring(0,s),e.substring(s+1)]},fe.resolveQName=function(e,s,d,b){var h=fe.splitQName(e);return h[0]!=null?h[0]=s.getNamespace(h[0],d):b?(h[0]=s.getNamespace("",d),h[0]==null&&(h[0]="")):h[0]="",h},fe.isSpace=function(e){return e==9||e==13||e==10||e==32},fe.isLetter=function(e){return e>=65&&e<=90||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=255||e>=256&&e<=305||e>=308&&e<=318||e>=321&&e<=328||e>=330&&e<=382||e>=384&&e<=451||e>=461&&e<=496||e>=500&&e<=501||e>=506&&e<=535||e>=592&&e<=680||e>=699&&e<=705||e==902||e>=904&&e<=906||e==908||e>=910&&e<=929||e>=931&&e<=974||e>=976&&e<=982||e==986||e==988||e==990||e==992||e>=994&&e<=1011||e>=1025&&e<=1036||e>=1038&&e<=1103||e>=1105&&e<=1116||e>=1118&&e<=1153||e>=1168&&e<=1220||e>=1223&&e<=1224||e>=1227&&e<=1228||e>=1232&&e<=1259||e>=1262&&e<=1269||e>=1272&&e<=1273||e>=1329&&e<=1366||e==1369||e>=1377&&e<=1414||e>=1488&&e<=1514||e>=1520&&e<=1522||e>=1569&&e<=1594||e>=1601&&e<=1610||e>=1649&&e<=1719||e>=1722&&e<=1726||e>=1728&&e<=1742||e>=1744&&e<=1747||e==1749||e>=1765&&e<=1766||e>=2309&&e<=2361||e==2365||e>=2392&&e<=2401||e>=2437&&e<=2444||e>=2447&&e<=2448||e>=2451&&e<=2472||e>=2474&&e<=2480||e==2482||e>=2486&&e<=2489||e>=2524&&e<=2525||e>=2527&&e<=2529||e>=2544&&e<=2545||e>=2565&&e<=2570||e>=2575&&e<=2576||e>=2579&&e<=2600||e>=2602&&e<=2608||e>=2610&&e<=2611||e>=2613&&e<=2614||e>=2616&&e<=2617||e>=2649&&e<=2652||e==2654||e>=2674&&e<=2676||e>=2693&&e<=2699||e==2701||e>=2703&&e<=2705||e>=2707&&e<=2728||e>=2730&&e<=2736||e>=2738&&e<=2739||e>=2741&&e<=2745||e==2749||e==2784||e>=2821&&e<=2828||e>=2831&&e<=2832||e>=2835&&e<=2856||e>=2858&&e<=2864||e>=2866&&e<=2867||e>=2870&&e<=2873||e==2877||e>=2908&&e<=2909||e>=2911&&e<=2913||e>=2949&&e<=2954||e>=2958&&e<=2960||e>=2962&&e<=2965||e>=2969&&e<=2970||e==2972||e>=2974&&e<=2975||e>=2979&&e<=2980||e>=2984&&e<=2986||e>=2990&&e<=2997||e>=2999&&e<=3001||e>=3077&&e<=3084||e>=3086&&e<=3088||e>=3090&&e<=3112||e>=3114&&e<=3123||e>=3125&&e<=3129||e>=3168&&e<=3169||e>=3205&&e<=3212||e>=3214&&e<=3216||e>=3218&&e<=3240||e>=3242&&e<=3251||e>=3253&&e<=3257||e==3294||e>=3296&&e<=3297||e>=3333&&e<=3340||e>=3342&&e<=3344||e>=3346&&e<=3368||e>=3370&&e<=3385||e>=3424&&e<=3425||e>=3585&&e<=3630||e==3632||e>=3634&&e<=3635||e>=3648&&e<=3653||e>=3713&&e<=3714||e==3716||e>=3719&&e<=3720||e==3722||e==3725||e>=3732&&e<=3735||e>=3737&&e<=3743||e>=3745&&e<=3747||e==3749||e==3751||e>=3754&&e<=3755||e>=3757&&e<=3758||e==3760||e>=3762&&e<=3763||e==3773||e>=3776&&e<=3780||e>=3904&&e<=3911||e>=3913&&e<=3945||e>=4256&&e<=4293||e>=4304&&e<=4342||e==4352||e>=4354&&e<=4355||e>=4357&&e<=4359||e==4361||e>=4363&&e<=4364||e>=4366&&e<=4370||e==4412||e==4414||e==4416||e==4428||e==4430||e==4432||e>=4436&&e<=4437||e==4441||e>=4447&&e<=4449||e==4451||e==4453||e==4455||e==4457||e>=4461&&e<=4462||e>=4466&&e<=4467||e==4469||e==4510||e==4520||e==4523||e>=4526&&e<=4527||e>=4535&&e<=4536||e==4538||e>=4540&&e<=4546||e==4587||e==4592||e==4601||e>=7680&&e<=7835||e>=7840&&e<=7929||e>=7936&&e<=7957||e>=7960&&e<=7965||e>=7968&&e<=8005||e>=8008&&e<=8013||e>=8016&&e<=8023||e==8025||e==8027||e==8029||e>=8031&&e<=8061||e>=8064&&e<=8116||e>=8118&&e<=8124||e==8126||e>=8130&&e<=8132||e>=8134&&e<=8140||e>=8144&&e<=8147||e>=8150&&e<=8155||e>=8160&&e<=8172||e>=8178&&e<=8180||e>=8182&&e<=8188||e==8486||e>=8490&&e<=8491||e==8494||e>=8576&&e<=8578||e>=12353&&e<=12436||e>=12449&&e<=12538||e>=12549&&e<=12588||e>=44032&&e<=55203||e>=19968&&e<=40869||e==12295||e>=12321&&e<=12329},fe.isNCNameChar=function(e){return e>=48&&e<=57||e>=1632&&e<=1641||e>=1776&&e<=1785||e>=2406&&e<=2415||e>=2534&&e<=2543||e>=2662&&e<=2671||e>=2790&&e<=2799||e>=2918&&e<=2927||e>=3047&&e<=3055||e>=3174&&e<=3183||e>=3302&&e<=3311||e>=3430&&e<=3439||e>=3664&&e<=3673||e>=3792&&e<=3801||e>=3872&&e<=3881||e==46||e==45||e==95||fe.isLetter(e)||e>=768&&e<=837||e>=864&&e<=865||e>=1155&&e<=1158||e>=1425&&e<=1441||e>=1443&&e<=1465||e>=1467&&e<=1469||e==1471||e>=1473&&e<=1474||e==1476||e>=1611&&e<=1618||e==1648||e>=1750&&e<=1756||e>=1757&&e<=1759||e>=1760&&e<=1764||e>=1767&&e<=1768||e>=1770&&e<=1773||e>=2305&&e<=2307||e==2364||e>=2366&&e<=2380||e==2381||e>=2385&&e<=2388||e>=2402&&e<=2403||e>=2433&&e<=2435||e==2492||e==2494||e==2495||e>=2496&&e<=2500||e>=2503&&e<=2504||e>=2507&&e<=2509||e==2519||e>=2530&&e<=2531||e==2562||e==2620||e==2622||e==2623||e>=2624&&e<=2626||e>=2631&&e<=2632||e>=2635&&e<=2637||e>=2672&&e<=2673||e>=2689&&e<=2691||e==2748||e>=2750&&e<=2757||e>=2759&&e<=2761||e>=2763&&e<=2765||e>=2817&&e<=2819||e==2876||e>=2878&&e<=2883||e>=2887&&e<=2888||e>=2891&&e<=2893||e>=2902&&e<=2903||e>=2946&&e<=2947||e>=3006&&e<=3010||e>=3014&&e<=3016||e>=3018&&e<=3021||e==3031||e>=3073&&e<=3075||e>=3134&&e<=3140||e>=3142&&e<=3144||e>=3146&&e<=3149||e>=3157&&e<=3158||e>=3202&&e<=3203||e>=3262&&e<=3268||e>=3270&&e<=3272||e>=3274&&e<=3277||e>=3285&&e<=3286||e>=3330&&e<=3331||e>=3390&&e<=3395||e>=3398&&e<=3400||e>=3402&&e<=3405||e==3415||e==3633||e>=3636&&e<=3642||e>=3655&&e<=3662||e==3761||e>=3764&&e<=3769||e>=3771&&e<=3772||e>=3784&&e<=3789||e>=3864&&e<=3865||e==3893||e==3895||e==3897||e==3902||e==3903||e>=3953&&e<=3972||e>=3974&&e<=3979||e>=3984&&e<=3989||e==3991||e>=3993&&e<=4013||e>=4017&&e<=4023||e==4025||e>=8400&&e<=8412||e==8417||e>=12330&&e<=12335||e==12441||e==12442||e==183||e==720||e==721||e==903||e==1600||e==3654||e==3782||e==12293||e>=12337&&e<=12341||e>=12445&&e<=12446||e>=12540&&e<=12542},fe.coalesceText=function(e){for(var s=e.firstChild;s!=null;s=s.nextSibling)if(s.nodeType==J.TEXT_NODE||s.nodeType==J.CDATA_SECTION_NODE){var d=s.nodeValue,b=s;for(s=s.nextSibling;s!=null&&(s.nodeType==J.TEXT_NODE||s.nodeType==J.CDATA_SECTION_NODE);){d+=s.nodeValue;var h=s;s=s.nextSibling,h.parentNode.removeChild(h)}if(b.nodeType==J.CDATA_SECTION_NODE){var T=b.parentNode;if(b.nextSibling==null)T.removeChild(b),T.appendChild(T.ownerDocument.createTextNode(d));else{var se=b.nextSibling;T.removeChild(b),T.insertBefore(T.ownerDocument.createTextNode(d),se)}}else b.nodeValue=d;if(s==null)break}else s.nodeType==J.ELEMENT_NODE&&fe.coalesceText(s)},fe.instance_of=function(e,s){for(;e!=null;){if(e.constructor===s)return!0;if(e===Object)return!1;e=e.constructor.superclass}return!1},fe.getElementById=function(e,s){if(e.nodeType==J.ELEMENT_NODE&&(e.getAttribute("id")==s||e.getAttributeNS(null,"id")==s))return e;for(var d=e.firstChild;d!=null;d=d.nextSibling){var b=fe.getElementById(d,s);if(b!=null)return b}return null};var Me=function(){function e(d,b){var h=b?": "+b.toString():"";switch(d){case s.INVALID_EXPRESSION_ERR:return"Invalid expression"+h;case s.TYPE_ERR:return"Type error"+h}return null}function s(d,b,h){var T=Error.call(this,e(d,b)||h);return T.code=d,T.exception=b,T}return s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.superclass=Error,s.prototype.toString=function(){return this.message},s.fromMessage=function(d,b){return new s(null,b,d)},s.INVALID_EXPRESSION_ERR=51,s.TYPE_ERR=52,s}();Fe.prototype={},Fe.prototype.constructor=Fe,Fe.superclass=Object.prototype;function Fe(e,s,d){this.xpath=d.parse(e),this.context=new He,this.context.namespaceResolver=new tt(s)}Fe.getOwnerDocument=function(e){return e.nodeType===J.DOCUMENT_NODE?e:e.ownerDocument},Fe.detectHtmlDom=function(e){if(!e)return!1;var s=Fe.getOwnerDocument(e);try{return s.implementation.hasFeature("HTML","2.0")}catch{return!0}},Fe.prototype.evaluate=function(e,s,d){this.context.expressionContextNode=e,this.context.caseInsensitive=Fe.detectHtmlDom(e);var b=this.xpath.evaluate(this.context);return new Ae(b,s)},tt.prototype={},tt.prototype.constructor=tt,tt.superclass=Object.prototype;function tt(e){this.xpathNSResolver=e}tt.prototype.getNamespace=function(e,s){return this.xpathNSResolver==null?null:this.xpathNSResolver.lookupNamespaceURI(e)},Ye.prototype={},Ye.prototype.constructor=Ye,Ye.superclass=Object.prototype;function Ye(e){this.node=e,this.namespaceResolver=new je}Ye.prototype.lookupNamespaceURI=function(e){return this.namespaceResolver.getNamespace(e,this.node)},Ae.prototype={},Ae.prototype.constructor=Ae,Ae.superclass=Object.prototype;function Ae(e,s){switch(s==Ae.ANY_TYPE&&(e.constructor===I?s=Ae.STRING_TYPE:e.constructor===q?s=Ae.NUMBER_TYPE:e.constructor===he?s=Ae.BOOLEAN_TYPE:e.constructor===ue&&(s=Ae.UNORDERED_NODE_ITERATOR_TYPE)),this.resultType=s,s){case Ae.NUMBER_TYPE:this.numberValue=e.numberValue();return;case Ae.STRING_TYPE:this.stringValue=e.stringValue();return;case Ae.BOOLEAN_TYPE:this.booleanValue=e.booleanValue();return;case Ae.ANY_UNORDERED_NODE_TYPE:case Ae.FIRST_ORDERED_NODE_TYPE:if(e.constructor===ue){this.singleNodeValue=e.first();return}break;case Ae.UNORDERED_NODE_ITERATOR_TYPE:case Ae.ORDERED_NODE_ITERATOR_TYPE:if(e.constructor===ue){this.invalidIteratorState=!1,this.nodes=e.toArray(),this.iteratorIndex=0;return}break;case Ae.UNORDERED_NODE_SNAPSHOT_TYPE:case Ae.ORDERED_NODE_SNAPSHOT_TYPE:if(e.constructor===ue){this.nodes=e.toArray(),this.snapshotLength=this.nodes.length;return}break}throw new Me(Me.TYPE_ERR)}Ae.prototype.iterateNext=function(){if(this.resultType!=Ae.UNORDERED_NODE_ITERATOR_TYPE&&this.resultType!=Ae.ORDERED_NODE_ITERATOR_TYPE)throw new Me(Me.TYPE_ERR);return this.nodes[this.iteratorIndex++]},Ae.prototype.snapshotItem=function(e){if(this.resultType!=Ae.UNORDERED_NODE_SNAPSHOT_TYPE&&this.resultType!=Ae.ORDERED_NODE_SNAPSHOT_TYPE)throw new Me(Me.TYPE_ERR);return this.nodes[e]},Ae.ANY_TYPE=0,Ae.NUMBER_TYPE=1,Ae.STRING_TYPE=2,Ae.BOOLEAN_TYPE=3,Ae.UNORDERED_NODE_ITERATOR_TYPE=4,Ae.ORDERED_NODE_ITERATOR_TYPE=5,Ae.UNORDERED_NODE_SNAPSHOT_TYPE=6,Ae.ORDERED_NODE_SNAPSHOT_TYPE=7,Ae.ANY_UNORDERED_NODE_TYPE=8,Ae.FIRST_ORDERED_NODE_TYPE=9;function l(e,s){e.createExpression=function(d,b){try{return new Fe(d,b,s)}catch(h){throw new Me(Me.INVALID_EXPRESSION_ERR,h)}},e.createNSResolver=function(d){return new Ye(d)},e.evaluate=function(d,b,h,T,se){if(T<0||T>9)throw{code:0,toString:function(){return"Request type not supported"}};return e.createExpression(d,h,s).evaluate(b,T,se)}}try{var c=!0;try{document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("XPath",null)&&(c=!1)}catch{}c&&l(document,new N)}catch{}l(r,new N),function(){var e=new N,s=new je,d=new Pe,b=new Ge;function h(ne){return{getNamespace:function(ve,qe){var st=ne(ve,qe);return st||s.getNamespace(ve,qe)}}}function T(ne){return h(ne.getNamespace.bind(ne))}function se(ne){return h(function(ve){return ne[ve]})}function xe(ne){return ne&&typeof ne.getNamespace=="function"?T(ne):typeof ne=="function"?h(ne):typeof ne=="object"?se(ne):s}function Ne(ne){if(ne===null||typeof ne>"u"||ne instanceof I||ne instanceof he||ne instanceof q||ne instanceof ue)return ne;switch(typeof ne){case"string":return new I(ne);case"boolean":return new he(ne);case"number":return new q(ne)}var ve=new ue;return ve.addArray([].concat(ne)),ve}function ie(ne){return function(ve){var qe=Array.prototype.slice.call(arguments,1).map(function(ti){return ti.evaluate(ve)}),st=ne.apply(this,[].concat(ve,qe));return Ne(st)}}function ce(ne){return{getFunction:function(ve,qe){var st=ne(ve,qe);return st?ie(st):d.getFunction(ve,qe)}}}function Le(ne){return ce(ne.getFunction.bind(ne))}function Ke(ne){return ce(function(ve){return ne[ve]})}function Se(ne){return ne&&typeof ne.getFunction=="function"?Le(ne):typeof ne=="function"?ce(ne):typeof ne=="object"?Ke(ne):d}function Qe(ne){return{getVariable:function(ve,qe){var st=ne(ve,qe);return Ne(st)}}}function Xe(ne){if(ne){if(typeof ne.getVariable=="function")return Qe(ne.getVariable.bind(ne));if(typeof ne=="function")return Qe(ne);if(typeof ne=="object")return Qe(function(ve){return ne[ve]})}return b}function ot(ne,ve,qe){ne in qe&&(ve[ne]=qe[ne])}function Qs(ne){var ve=new He;return ne?(ve.namespaceResolver=xe(ne.namespaces),ve.functionResolver=Se(ne.functions),ve.variableResolver=Xe(ne.variables),ve.expressionContextNode=ne.node,ot("allowAnyNamespaceForNoPrefix",ve,ne),ot("isHtml",ve,ne)):ve.namespaceResolver=s,ve}function Zs(ne,ve){var qe=Qs(ve);return ne.evaluate(qe)}var Js={evaluate:function(ne){return Zs(this.expression,ne)},evaluateNumber:function(ne){return this.evaluate(ne).numberValue()},evaluateString:function(ne){return this.evaluate(ne).stringValue()},evaluateBoolean:function(ne){return this.evaluate(ne).booleanValue()},evaluateNodeSet:function(ne){return this.evaluate(ne).nodeset()},select:function(ne){return this.evaluateNodeSet(ne).toArray()},select1:function(ne){return this.select(ne)[0]}};function ei(ne){var ve=e.parse(ne);return Object.create(Js,{expression:{value:ve}})}r.parse=ei}(),be(r,{XPath:le,XPathParser:N,XPathResult:Ae,Step:W,PathExpr:P,NodeTest:A,LocationPath:De,OrOperation:$,AndOperation:Z,BarOperation:X,EqualsOperation:te,NotEqualOperation:g,LessThanOperation:C,GreaterThanOperation:V,LessThanOrEqualOperation:j,GreaterThanOrEqualOperation:R,PlusOperation:ee,MinusOperation:D,MultiplyOperation:O,DivOperation:F,ModOperation:G,UnaryMinusOperation:_,FunctionCall:Ce,VariableReference:oe,XPathContext:He,XNodeSet:ue,XBoolean:he,XString:I,XNumber:q,NamespaceResolver:je,FunctionResolver:Pe,VariableResolver:Ge,Utilities:fe}),r.select=function(e,s,d){return r.selectWithResolver(e,s,null,d)},r.useNamespaces=function(e){var s={mappings:e||{},lookupNamespaceURI:function(d){return this.mappings[d]}};return function(d,b,h){return r.selectWithResolver(d,b,s,h)}},r.selectWithResolver=function(e,s,d,b){var h=new Fe(e,d,new N),T=Ae.ANY_TYPE,se=h.evaluate(s,T,null);return se.resultType==Ae.STRING_TYPE?se=se.stringValue:se.resultType==Ae.NUMBER_TYPE?se=se.numberValue:se.resultType==Ae.BOOLEAN_TYPE?se=se.booleanValue:(se=se.nodes,b&&(se=se[0])),se},r.select1=function(e,s){return r.select(e,s,!0)};var E=function(e){return Array.isArray(e)&&e.every(f)},k=function(e){return function(s){return f(s)&&s.nodeType===e}};be(r,{isNodeLike:f,isArrayOfNodes:E,isElement:k(J.ELEMENT_NODE),isAttribute:k(J.ATTRIBUTE_NODE),isTextNode:k(J.TEXT_NODE),isCDATASection:k(J.CDATA_SECTION_NODE),isProcessingInstruction:k(J.PROCESSING_INSTRUCTION_NODE),isComment:k(J.COMMENT_NODE),isDocumentNode:k(J.DOCUMENT_NODE),isDocumentTypeNode:k(J.DOCUMENT_TYPE_NODE),isDocumentFragment:k(J.DOCUMENT_FRAGMENT_NODE)})})(t)}(vt)),vt}var nn=rn();const on=tn(nn);var dt={},Je={},it={},Lt;function yt(){if(Lt)return it;Lt=1;function n(u,f,x){if(x===void 0&&(x=Array.prototype),u&&typeof x.find=="function")return x.find.call(u,f);for(var p=0;p<u.length;p++)if(Object.prototype.hasOwnProperty.call(u,p)){var m=u[p];if(f.call(void 0,m,p,u))return m}}function t(u,f){return f===void 0&&(f=Object),f&&typeof f.freeze=="function"?f.freeze(u):u}function r(u,f){if(u===null||typeof u!="object")throw new TypeError("target is not an object");for(var x in f)Object.prototype.hasOwnProperty.call(f,x)&&(u[x]=f[x]);return u}var a=t({HTML:"text/html",isHTML:function(u){return u===a.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),i=t({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(u){return u===i.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return it.assign=r,it.find=n,it.freeze=t,it.MIME_TYPE=a,it.NAMESPACE=i,it}var Vt;function $t(){if(Vt)return Je;Vt=1;var n=yt(),t=n.find,r=n.NAMESPACE;function a(l){return l!==""}function i(l){return l?l.split(/[\t\n\f\r ]+/).filter(a):[]}function u(l,c){return l.hasOwnProperty(c)||(l[c]=!0),l}function f(l){if(!l)return[];var c=i(l);return Object.keys(c.reduce(u,{}))}function x(l){return function(c){return l&&l.indexOf(c)!==-1}}function p(l,c){for(var E in l)Object.prototype.hasOwnProperty.call(l,E)&&(c[E]=l[E])}function m(l,c){var E=l.prototype;if(!(E instanceof c)){let k=function(){};k.prototype=c.prototype,k=new k,p(E,k),l.prototype=E=k}E.constructor!=l&&(typeof l!="function"&&console.error("unknown Class:"+l),E.constructor=l)}var S={},v=S.ELEMENT_NODE=1,U=S.ATTRIBUTE_NODE=2,K=S.TEXT_NODE=3,Y=S.CDATA_SECTION_NODE=4,ae=S.ENTITY_REFERENCE_NODE=5,H=S.ENTITY_NODE=6,de=S.PROCESSING_INSTRUCTION_NODE=7,re=S.COMMENT_NODE=8,z=S.DOCUMENT_NODE=9,me=S.DOCUMENT_TYPE_NODE=10,be=S.DOCUMENT_FRAGMENT_NODE=11,J=S.NOTATION_NODE=12,N={},le={};N.INDEX_SIZE_ERR=(le[1]="Index size error",1),N.DOMSTRING_SIZE_ERR=(le[2]="DOMString size error",2);var w=N.HIERARCHY_REQUEST_ERR=(le[3]="Hierarchy request error",3);N.WRONG_DOCUMENT_ERR=(le[4]="Wrong document",4),N.INVALID_CHARACTER_ERR=(le[5]="Invalid character",5),N.NO_DATA_ALLOWED_ERR=(le[6]="No data allowed",6),N.NO_MODIFICATION_ALLOWED_ERR=(le[7]="No modification allowed",7);var y=N.NOT_FOUND_ERR=(le[8]="Not found",8);N.NOT_SUPPORTED_ERR=(le[9]="Not supported",9);var B=N.INUSE_ATTRIBUTE_ERR=(le[10]="Attribute in use",10);N.INVALID_STATE_ERR=(le[11]="Invalid state",11),N.SYNTAX_ERR=(le[12]="Syntax error",12),N.INVALID_MODIFICATION_ERR=(le[13]="Invalid modification",13),N.NAMESPACE_ERR=(le[14]="Invalid namespace",14),N.INVALID_ACCESS_ERR=(le[15]="Invalid access",15);function _(l,c){if(c instanceof Error)var E=c;else E=this,Error.call(this,le[l]),this.message=le[l],Error.captureStackTrace&&Error.captureStackTrace(this,_);return E.code=l,c&&(this.message=this.message+": "+c),E}_.prototype=Error.prototype,p(N,_);function L(){}L.prototype={length:0,item:function(l){return l>=0&&l<this.length?this[l]:null},toString:function(l,c){for(var E=[],k=0;k<this.length;k++)Fe(this[k],E,l,c);return E.join("")},filter:function(l){return Array.prototype.filter.call(this,l)},indexOf:function(l){return Array.prototype.indexOf.call(this,l)}};function $(l,c){this._node=l,this._refresh=c,Z(this)}function Z(l){var c=l._node._inc||l._node.ownerDocument._inc;if(l._inc!==c){var E=l._refresh(l._node);if(Ae(l,"length",E.length),!l.$$length||E.length<l.$$length)for(var k=E.length;k in l;k++)Object.prototype.hasOwnProperty.call(l,k)&&delete l[k];p(E,l),l._inc=c}}$.prototype.item=function(l){return Z(this),this[l]||null},m($,L);function te(){}function g(l,c){for(var E=l.length;E--;)if(l[E]===c)return E}function C(l,c,E,k){if(k?c[g(c,k)]=E:c[c.length++]=E,l){E.ownerElement=l;var e=l.ownerDocument;e&&(k&&G(e,l,k),F(e,l,E))}}function V(l,c,E){var k=g(c,E);if(k>=0){for(var e=c.length-1;k<e;)c[k]=c[++k];if(c.length=e,l){var s=l.ownerDocument;s&&(G(s,l,E),E.ownerElement=null)}}else throw new _(y,new Error(l.tagName+"@"+E))}te.prototype={length:0,item:L.prototype.item,getNamedItem:function(l){for(var c=this.length;c--;){var E=this[c];if(E.nodeName==l)return E}},setNamedItem:function(l){var c=l.ownerElement;if(c&&c!=this._ownerElement)throw new _(B);var E=this.getNamedItem(l.nodeName);return C(this._ownerElement,this,l,E),E},setNamedItemNS:function(l){var c=l.ownerElement,E;if(c&&c!=this._ownerElement)throw new _(B);return E=this.getNamedItemNS(l.namespaceURI,l.localName),C(this._ownerElement,this,l,E),E},removeNamedItem:function(l){var c=this.getNamedItem(l);return V(this._ownerElement,this,c),c},removeNamedItemNS:function(l,c){var E=this.getNamedItemNS(l,c);return V(this._ownerElement,this,E),E},getNamedItemNS:function(l,c){for(var E=this.length;E--;){var k=this[E];if(k.localName==c&&k.namespaceURI==l)return k}return null}};function j(){}j.prototype={hasFeature:function(l,c){return!0},createDocument:function(l,c,E){var k=new O;if(k.implementation=this,k.childNodes=new L,k.doctype=E||null,E&&k.appendChild(E),c){var e=k.createElementNS(l,c);k.appendChild(e)}return k},createDocumentType:function(l,c,E){var k=new ue;return k.name=l,k.nodeName=l,k.publicId=c||"",k.systemId=E||"",k}};function R(){}R.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(l,c){return Ce(this,l,c)},replaceChild:function(l,c){Ce(this,l,c,oe),c&&this.removeChild(c)},removeChild:function(l){return P(this,l)},appendChild:function(l){return this.insertBefore(l,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(l){return Ye(this.ownerDocument||this,this,l)},normalize:function(){for(var l=this.firstChild;l;){var c=l.nextSibling;c&&c.nodeType==K&&l.nodeType==K?(this.removeChild(c),l.appendData(c.data)):(l.normalize(),l=c)}},isSupported:function(l,c){return this.ownerDocument.implementation.hasFeature(l,c)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(l){for(var c=this;c;){var E=c._nsMap;if(E){for(var k in E)if(Object.prototype.hasOwnProperty.call(E,k)&&E[k]===l)return k}c=c.nodeType==U?c.ownerDocument:c.parentNode}return null},lookupNamespaceURI:function(l){for(var c=this;c;){var E=c._nsMap;if(E&&Object.prototype.hasOwnProperty.call(E,l))return E[l];c=c.nodeType==U?c.ownerDocument:c.parentNode}return null},isDefaultNamespace:function(l){var c=this.lookupPrefix(l);return c==null}};function ee(l){return l=="<"&&"&lt;"||l==">"&&"&gt;"||l=="&"&&"&amp;"||l=='"'&&"&quot;"||"&#"+l.charCodeAt()+";"}p(S,R),p(S,R.prototype);function D(l,c){if(c(l))return!0;if(l=l.firstChild)do if(D(l,c))return!0;while(l=l.nextSibling)}function O(){this.ownerDocument=this}function F(l,c,E){l&&l._inc++;var k=E.namespaceURI;k===r.XMLNS&&(c._nsMap[E.prefix?E.localName:""]=E.value)}function G(l,c,E,k){l&&l._inc++;var e=E.namespaceURI;e===r.XMLNS&&delete c._nsMap[E.prefix?E.localName:""]}function X(l,c,E){if(l&&l._inc){l._inc++;var k=c.childNodes;if(E)k[k.length++]=E;else{for(var e=c.firstChild,s=0;e;)k[s++]=e,e=e.nextSibling;k.length=s,delete k[k.length]}}}function P(l,c){var E=c.previousSibling,k=c.nextSibling;return E?E.nextSibling=k:l.firstChild=k,k?k.previousSibling=E:l.lastChild=E,c.parentNode=null,c.previousSibling=null,c.nextSibling=null,X(l.ownerDocument,l),c}function Q(l){return l&&(l.nodeType===R.DOCUMENT_NODE||l.nodeType===R.DOCUMENT_FRAGMENT_NODE||l.nodeType===R.ELEMENT_NODE)}function pe(l){return l&&(Te(l)||ke(l)||Ee(l)||l.nodeType===R.DOCUMENT_FRAGMENT_NODE||l.nodeType===R.COMMENT_NODE||l.nodeType===R.PROCESSING_INSTRUCTION_NODE)}function Ee(l){return l&&l.nodeType===R.DOCUMENT_TYPE_NODE}function Te(l){return l&&l.nodeType===R.ELEMENT_NODE}function ke(l){return l&&l.nodeType===R.TEXT_NODE}function De(l,c){var E=l.childNodes||[];if(t(E,Te)||Ee(c))return!1;var k=t(E,Ee);return!(c&&k&&E.indexOf(k)>E.indexOf(c))}function W(l,c){var E=l.childNodes||[];function k(s){return Te(s)&&s!==c}if(t(E,k))return!1;var e=t(E,Ee);return!(c&&e&&E.indexOf(e)>E.indexOf(c))}function Be(l,c,E){if(!Q(l))throw new _(w,"Unexpected parent node type "+l.nodeType);if(E&&E.parentNode!==l)throw new _(y,"child not in parent");if(!pe(c)||Ee(c)&&l.nodeType!==R.DOCUMENT_NODE)throw new _(w,"Unexpected node type "+c.nodeType+" for parent node type "+l.nodeType)}function A(l,c,E){var k=l.childNodes||[],e=c.childNodes||[];if(c.nodeType===R.DOCUMENT_FRAGMENT_NODE){var s=e.filter(Te);if(s.length>1||t(e,ke))throw new _(w,"More than one element or text in fragment");if(s.length===1&&!De(l,E))throw new _(w,"Element in fragment can not be inserted before doctype")}if(Te(c)&&!De(l,E))throw new _(w,"Only one element can be added and only after doctype");if(Ee(c)){if(t(k,Ee))throw new _(w,"Only one doctype is allowed");var d=t(k,Te);if(E&&k.indexOf(d)<k.indexOf(E))throw new _(w,"Doctype can only be inserted before an element");if(!E&&d)throw new _(w,"Doctype can not be appended since element is present")}}function oe(l,c,E){var k=l.childNodes||[],e=c.childNodes||[];if(c.nodeType===R.DOCUMENT_FRAGMENT_NODE){var s=e.filter(Te);if(s.length>1||t(e,ke))throw new _(w,"More than one element or text in fragment");if(s.length===1&&!W(l,E))throw new _(w,"Element in fragment can not be inserted before doctype")}if(Te(c)&&!W(l,E))throw new _(w,"Only one element can be added and only after doctype");if(Ee(c)){if(t(k,function(h){return Ee(h)&&h!==E}))throw new _(w,"Only one doctype is allowed");var d=t(k,Te);if(E&&k.indexOf(d)<k.indexOf(E))throw new _(w,"Doctype can only be inserted before an element")}}function Ce(l,c,E,k){Be(l,c,E),l.nodeType===R.DOCUMENT_NODE&&(k||A)(l,c,E);var e=c.parentNode;if(e&&e.removeChild(c),c.nodeType===be){var s=c.firstChild;if(s==null)return c;var d=c.lastChild}else s=d=c;var b=E?E.previousSibling:l.lastChild;s.previousSibling=b,d.nextSibling=E,b?b.nextSibling=s:l.firstChild=s,E==null?l.lastChild=d:E.previousSibling=d;do{s.parentNode=l;var h=l.ownerDocument||l;ye(s,h)}while(s!==d&&(s=s.nextSibling));return X(l.ownerDocument||l,l),c.nodeType==be&&(c.firstChild=c.lastChild=null),c}function ye(l,c){if(l.ownerDocument!==c){if(l.ownerDocument=c,l.nodeType===v&&l.attributes)for(var E=0;E<l.attributes.length;E++){var k=l.attributes.item(E);k&&(k.ownerDocument=c)}for(var e=l.firstChild;e;)ye(e,c),e=e.nextSibling}}function I(l,c){c.parentNode&&c.parentNode.removeChild(c),c.parentNode=l,c.previousSibling=l.lastChild,c.nextSibling=null,c.previousSibling?c.previousSibling.nextSibling=c:l.firstChild=c,l.lastChild=c,X(l.ownerDocument,l,c);var E=l.ownerDocument||l;return ye(c,E),c}O.prototype={nodeName:"#document",nodeType:z,doctype:null,documentElement:null,_inc:1,insertBefore:function(l,c){if(l.nodeType==be){for(var E=l.firstChild;E;){var k=E.nextSibling;this.insertBefore(E,c),E=k}return l}return Ce(this,l,c),ye(l,this),this.documentElement===null&&l.nodeType===v&&(this.documentElement=l),l},removeChild:function(l){return this.documentElement==l&&(this.documentElement=null),P(this,l)},replaceChild:function(l,c){Ce(this,l,c,oe),ye(l,this),c&&this.removeChild(c),Te(l)&&(this.documentElement=l)},importNode:function(l,c){return tt(this,l,c)},getElementById:function(l){var c=null;return D(this.documentElement,function(E){if(E.nodeType==v&&E.getAttribute("id")==l)return c=E,!0}),c},getElementsByClassName:function(l){var c=f(l);return new $(this,function(E){var k=[];return c.length>0&&D(E.documentElement,function(e){if(e!==E&&e.nodeType===v){var s=e.getAttribute("class");if(s){var d=l===s;if(!d){var b=f(s);d=c.every(x(b))}d&&k.push(e)}}}),k})},createElement:function(l){var c=new q;c.ownerDocument=this,c.nodeName=l,c.tagName=l,c.localName=l,c.childNodes=new L;var E=c.attributes=new te;return E._ownerElement=c,c},createDocumentFragment:function(){var l=new Pe;return l.ownerDocument=this,l.childNodes=new L,l},createTextNode:function(l){var c=new he;return c.ownerDocument=this,c.appendData(l),c},createComment:function(l){var c=new Ie;return c.ownerDocument=this,c.appendData(l),c},createCDATASection:function(l){var c=new gt;return c.ownerDocument=this,c.appendData(l),c},createProcessingInstruction:function(l,c){var E=new je;return E.ownerDocument=this,E.tagName=E.nodeName=E.target=l,E.nodeValue=E.data=c,E},createAttribute:function(l){var c=new Re;return c.ownerDocument=this,c.name=l,c.nodeName=l,c.localName=l,c.specified=!0,c},createEntityReference:function(l){var c=new Ge;return c.ownerDocument=this,c.nodeName=l,c},createElementNS:function(l,c){var E=new q,k=c.split(":"),e=E.attributes=new te;return E.childNodes=new L,E.ownerDocument=this,E.nodeName=c,E.tagName=c,E.namespaceURI=l,k.length==2?(E.prefix=k[0],E.localName=k[1]):E.localName=c,e._ownerElement=E,E},createAttributeNS:function(l,c){var E=new Re,k=c.split(":");return E.ownerDocument=this,E.nodeName=c,E.name=c,E.namespaceURI=l,E.specified=!0,k.length==2?(E.prefix=k[0],E.localName=k[1]):E.localName=c,E}},m(O,R);function q(){this._nsMap={}}q.prototype={nodeType:v,hasAttribute:function(l){return this.getAttributeNode(l)!=null},getAttribute:function(l){var c=this.getAttributeNode(l);return c&&c.value||""},getAttributeNode:function(l){return this.attributes.getNamedItem(l)},setAttribute:function(l,c){var E=this.ownerDocument.createAttribute(l);E.value=E.nodeValue=""+c,this.setAttributeNode(E)},removeAttribute:function(l){var c=this.getAttributeNode(l);c&&this.removeAttributeNode(c)},appendChild:function(l){return l.nodeType===be?this.insertBefore(l,null):I(this,l)},setAttributeNode:function(l){return this.attributes.setNamedItem(l)},setAttributeNodeNS:function(l){return this.attributes.setNamedItemNS(l)},removeAttributeNode:function(l){return this.attributes.removeNamedItem(l.nodeName)},removeAttributeNS:function(l,c){var E=this.getAttributeNodeNS(l,c);E&&this.removeAttributeNode(E)},hasAttributeNS:function(l,c){return this.getAttributeNodeNS(l,c)!=null},getAttributeNS:function(l,c){var E=this.getAttributeNodeNS(l,c);return E&&E.value||""},setAttributeNS:function(l,c,E){var k=this.ownerDocument.createAttributeNS(l,c);k.value=k.nodeValue=""+E,this.setAttributeNode(k)},getAttributeNodeNS:function(l,c){return this.attributes.getNamedItemNS(l,c)},getElementsByTagName:function(l){return new $(this,function(c){var E=[];return D(c,function(k){k!==c&&k.nodeType==v&&(l==="*"||k.tagName==l)&&E.push(k)}),E})},getElementsByTagNameNS:function(l,c){return new $(this,function(E){var k=[];return D(E,function(e){e!==E&&e.nodeType===v&&(l==="*"||e.namespaceURI===l)&&(c==="*"||e.localName==c)&&k.push(e)}),k})}},O.prototype.getElementsByTagName=q.prototype.getElementsByTagName,O.prototype.getElementsByTagNameNS=q.prototype.getElementsByTagNameNS,m(q,R);function Re(){}Re.prototype.nodeType=U,m(Re,R);function Ue(){}Ue.prototype={data:"",substringData:function(l,c){return this.data.substring(l,l+c)},appendData:function(l){l=this.data+l,this.nodeValue=this.data=l,this.length=l.length},insertData:function(l,c){this.replaceData(l,0,c)},appendChild:function(l){throw new Error(le[w])},deleteData:function(l,c){this.replaceData(l,c,"")},replaceData:function(l,c,E){var k=this.data.substring(0,l),e=this.data.substring(l+c);E=k+E+e,this.nodeValue=this.data=E,this.length=E.length}},m(Ue,R);function he(){}he.prototype={nodeName:"#text",nodeType:K,splitText:function(l){var c=this.data,E=c.substring(l);c=c.substring(0,l),this.data=this.nodeValue=c,this.length=c.length;var k=this.ownerDocument.createTextNode(E);return this.parentNode&&this.parentNode.insertBefore(k,this.nextSibling),k}},m(he,Ue);function Ie(){}Ie.prototype={nodeName:"#comment",nodeType:re},m(Ie,Ue);function gt(){}gt.prototype={nodeName:"#cdata-section",nodeType:Y},m(gt,Ue);function ue(){}ue.prototype.nodeType=me,m(ue,R);function ze(){}ze.prototype.nodeType=J,m(ze,R);function He(){}He.prototype.nodeType=H,m(He,R);function Ge(){}Ge.prototype.nodeType=ae,m(Ge,R);function Pe(){}Pe.prototype.nodeName="#document-fragment",Pe.prototype.nodeType=be,m(Pe,R);function je(){}je.prototype.nodeType=de,m(je,R);function ge(){}ge.prototype.serializeToString=function(l,c,E){return fe.call(l,c,E)},R.prototype.toString=fe;function fe(l,c){var E=[],k=this.nodeType==9&&this.documentElement||this,e=k.prefix,s=k.namespaceURI;if(s&&e==null){var e=k.lookupPrefix(s);if(e==null)var d=[{namespace:s,prefix:null}]}return Fe(this,E,l,c,d),E.join("")}function Et(l,c,E){var k=l.prefix||"",e=l.namespaceURI;if(!e||k==="xml"&&e===r.XML||e===r.XMLNS)return!1;for(var s=E.length;s--;){var d=E[s];if(d.prefix===k)return d.namespace!==e}return!0}function Me(l,c,E){l.push(" ",c,'="',E.replace(/[<>&"\t\n\r]/g,ee),'"')}function Fe(l,c,E,k,e){if(e||(e=[]),k)if(l=k(l),l){if(typeof l=="string"){c.push(l);return}}else return;switch(l.nodeType){case v:var s=l.attributes,d=s.length,Se=l.firstChild,b=l.tagName;E=r.isHTML(l.namespaceURI)||E;var h=b;if(!E&&!l.prefix&&l.namespaceURI){for(var T,se=0;se<s.length;se++)if(s.item(se).name==="xmlns"){T=s.item(se).value;break}if(!T)for(var xe=e.length-1;xe>=0;xe--){var Ne=e[xe];if(Ne.prefix===""&&Ne.namespace===l.namespaceURI){T=Ne.namespace;break}}if(T!==l.namespaceURI)for(var xe=e.length-1;xe>=0;xe--){var Ne=e[xe];if(Ne.namespace===l.namespaceURI){Ne.prefix&&(h=Ne.prefix+":"+b);break}}}c.push("<",h);for(var ie=0;ie<d;ie++){var ce=s.item(ie);ce.prefix=="xmlns"?e.push({prefix:ce.localName,namespace:ce.value}):ce.nodeName=="xmlns"&&e.push({prefix:"",namespace:ce.value})}for(var ie=0;ie<d;ie++){var ce=s.item(ie);if(Et(ce,E,e)){var Le=ce.prefix||"",Ke=ce.namespaceURI;Me(c,Le?"xmlns:"+Le:"xmlns",Ke),e.push({prefix:Le,namespace:Ke})}Fe(ce,c,E,k,e)}if(b===h&&Et(l,E,e)){var Le=l.prefix||"",Ke=l.namespaceURI;Me(c,Le?"xmlns:"+Le:"xmlns",Ke),e.push({prefix:Le,namespace:Ke})}if(Se||E&&!/^(?:meta|link|img|br|hr|input)$/i.test(b)){if(c.push(">"),E&&/^script$/i.test(b))for(;Se;)Se.data?c.push(Se.data):Fe(Se,c,E,k,e.slice()),Se=Se.nextSibling;else for(;Se;)Fe(Se,c,E,k,e.slice()),Se=Se.nextSibling;c.push("</",h,">")}else c.push("/>");return;case z:case be:for(var Se=l.firstChild;Se;)Fe(Se,c,E,k,e.slice()),Se=Se.nextSibling;return;case U:return Me(c,l.name,l.value);case K:return c.push(l.data.replace(/[<&>]/g,ee));case Y:return c.push("<![CDATA[",l.data,"]]>");case re:return c.push("<!--",l.data,"-->");case me:var Qe=l.publicId,Xe=l.systemId;if(c.push("<!DOCTYPE ",l.name),Qe)c.push(" PUBLIC ",Qe),Xe&&Xe!="."&&c.push(" ",Xe),c.push(">");else if(Xe&&Xe!=".")c.push(" SYSTEM ",Xe,">");else{var ot=l.internalSubset;ot&&c.push(" [",ot,"]"),c.push(">")}return;case de:return c.push("<?",l.target," ",l.data,"?>");case ae:return c.push("&",l.nodeName,";");default:c.push("??",l.nodeName)}}function tt(l,c,E){var k;switch(c.nodeType){case v:k=c.cloneNode(!1),k.ownerDocument=l;case be:break;case U:E=!0;break}if(k||(k=c.cloneNode(!1)),k.ownerDocument=l,k.parentNode=null,E)for(var e=c.firstChild;e;)k.appendChild(tt(l,e,E)),e=e.nextSibling;return k}function Ye(l,c,E){var k=new c.constructor;for(var e in c)if(Object.prototype.hasOwnProperty.call(c,e)){var s=c[e];typeof s!="object"&&s!=k[e]&&(k[e]=s)}switch(c.childNodes&&(k.childNodes=new L),k.ownerDocument=l,k.nodeType){case v:var d=c.attributes,b=k.attributes=new te,h=d.length;b._ownerElement=k;for(var T=0;T<h;T++)k.setAttributeNode(Ye(l,d.item(T),!0));break;case U:E=!0}if(E)for(var se=c.firstChild;se;)k.appendChild(Ye(l,se,E)),se=se.nextSibling;return k}function Ae(l,c,E){l[c]=E}try{if(Object.defineProperty){let l=function(c){switch(c.nodeType){case v:case be:var E=[];for(c=c.firstChild;c;)c.nodeType!==7&&c.nodeType!==8&&E.push(l(c)),c=c.nextSibling;return E.join("");default:return c.nodeValue}};Object.defineProperty($.prototype,"length",{get:function(){return Z(this),this.$$length}}),Object.defineProperty(R.prototype,"textContent",{get:function(){return l(this)},set:function(c){switch(this.nodeType){case v:case be:for(;this.firstChild;)this.removeChild(this.firstChild);(c||String(c))&&this.appendChild(this.ownerDocument.createTextNode(c));break;default:this.data=c,this.value=c,this.nodeValue=c}}}),Ae=function(c,E,k){c["$$"+E]=k}}}catch{}return Je.DocumentType=ue,Je.DOMException=_,Je.DOMImplementation=j,Je.Element=q,Je.Node=R,Je.NodeList=L,Je.XMLSerializer=ge,Je}var pt={},wt={},Mt;function sn(){return Mt||(Mt=1,function(n){var t=yt().freeze;n.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),n.HTML_ENTITIES=t({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:`
10
+ `,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:"‌"}),n.entityMap=n.HTML_ENTITIES}(wt)),wt}var bt={},qt;function an(){if(qt)return bt;qt=1;var n=yt().NAMESPACE,t=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,r=new RegExp("[\\-\\.0-9"+t.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+t.source+r.source+"*(?::"+t.source+r.source+"*)?$"),i=0,u=1,f=2,x=3,p=4,m=5,S=6,v=7;function U(w,y){this.message=w,this.locator=y,Error.captureStackTrace&&Error.captureStackTrace(this,U)}U.prototype=new Error,U.prototype.name=U.name;function K(){}K.prototype={parse:function(w,y,B){var _=this.domBuilder;_.startDocument(),me(y,y={}),Y(w,y,B,_,this.errorHandler),_.endDocument()}};function Y(w,y,B,_,L){function $(I){if(I>65535){I-=65536;var q=55296+(I>>10),Re=56320+(I&1023);return String.fromCharCode(q,Re)}else return String.fromCharCode(I)}function Z(I){var q=I.slice(1,-1);return Object.hasOwnProperty.call(B,q)?B[q]:q.charAt(0)==="#"?$(parseInt(q.substr(1).replace("x","0x"))):(L.error("entity not found:"+I),I)}function te(I){if(I>O){var q=w.substring(O,I).replace(/&#?\w+;/g,Z);R&&g(O),_.characters(q,0,I-O),O=I}}function g(I,q){for(;I>=V&&(q=j.exec(w));)C=q.index,V=C+q[0].length,R.lineNumber++;R.columnNumber=I-C+1}for(var C=0,V=0,j=/.*(?:\r\n?|\n)|.*$/g,R=_.locator,ee=[{currentNSMap:y}],D={},O=0;;){try{var F=w.indexOf("<",O);if(F<0){if(!w.substr(O).match(/^\s*$/)){var G=_.doc,X=G.createTextNode(w.substr(O));G.appendChild(X),_.currentElement=X}return}switch(F>O&&te(F),w.charAt(F+1)){case"/":var Be=w.indexOf(">",F+3),P=w.substring(F+2,Be).replace(/[ \t\n\r]+$/g,""),Q=ee.pop();Be<0?(P=w.substring(F+2).replace(/[\s<].*/,""),L.error("end tag name: "+P+" is not complete:"+Q.tagName),Be=F+1+P.length):P.match(/\s</)&&(P=P.replace(/[\s<].*/,""),L.error("end tag name: "+P+" maybe not complete"),Be=F+1+P.length);var pe=Q.localNSMap,Ee=Q.tagName==P,Te=Ee||Q.tagName&&Q.tagName.toLowerCase()==P.toLowerCase();if(Te){if(_.endElement(Q.uri,Q.localName,P),pe)for(var ke in pe)Object.prototype.hasOwnProperty.call(pe,ke)&&_.endPrefixMapping(ke);Ee||L.fatalError("end tag name: "+P+" is not match the current start tagName:"+Q.tagName)}else ee.push(Q);Be++;break;case"?":R&&g(F),Be=J(w,F,_);break;case"!":R&&g(F),Be=be(w,F,_,L);break;default:R&&g(F);var De=new N,W=ee[ee.length-1].currentNSMap,Be=H(w,F,De,W,Z,L),A=De.length;if(!De.closed&&z(w,Be,De.tagName,D)&&(De.closed=!0,B.nbsp||L.warning("unclosed xml attribute")),R&&A){for(var oe=ae(R,{}),Ce=0;Ce<A;Ce++){var ye=De[Ce];g(ye.offset),ye.locator=ae(R,{})}_.locator=oe,de(De,_,W)&&ee.push(De),_.locator=R}else de(De,_,W)&&ee.push(De);n.isHTML(De.uri)&&!De.closed?Be=re(w,Be,De.tagName,Z,_):Be++}}catch(I){if(I instanceof U)throw I;L.error("element parse error: "+I),Be=-1}Be>O?O=Be:te(Math.max(F,O)+1)}}function ae(w,y){return y.lineNumber=w.lineNumber,y.columnNumber=w.columnNumber,y}function H(w,y,B,_,L,$){function Z(R,ee,D){B.attributeNames.hasOwnProperty(R)&&$.fatalError("Attribute "+R+" redefined"),B.addValue(R,ee.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,L),D)}for(var te,g,C=++y,V=i;;){var j=w.charAt(C);switch(j){case"=":if(V===u)te=w.slice(y,C),V=x;else if(V===f)V=x;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(V===x||V===u)if(V===u&&($.warning('attribute value must after "="'),te=w.slice(y,C)),y=C+1,C=w.indexOf(j,y),C>0)g=w.slice(y,C),Z(te,g,y-1),V=m;else throw new Error("attribute value no end '"+j+"' match");else if(V==p)g=w.slice(y,C),Z(te,g,y),$.warning('attribute "'+te+'" missed start quot('+j+")!!"),y=C+1,V=m;else throw new Error('attribute value must after "="');break;case"/":switch(V){case i:B.setTagName(w.slice(y,C));case m:case S:case v:V=v,B.closed=!0;case p:case u:break;case f:B.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return $.error("unexpected end of input"),V==i&&B.setTagName(w.slice(y,C)),C;case">":switch(V){case i:B.setTagName(w.slice(y,C));case m:case S:case v:break;case p:case u:g=w.slice(y,C),g.slice(-1)==="/"&&(B.closed=!0,g=g.slice(0,-1));case f:V===f&&(g=te),V==p?($.warning('attribute "'+g+'" missed quot(")!'),Z(te,g,y)):((!n.isHTML(_[""])||!g.match(/^(?:disabled|checked|selected)$/i))&&$.warning('attribute "'+g+'" missed value!! "'+g+'" instead!!'),Z(g,g,y));break;case x:throw new Error("attribute value missed!!")}return C;case"€":j=" ";default:if(j<=" ")switch(V){case i:B.setTagName(w.slice(y,C)),V=S;break;case u:te=w.slice(y,C),V=f;break;case p:var g=w.slice(y,C);$.warning('attribute "'+g+'" missed quot(")!!'),Z(te,g,y);case m:V=S;break}else switch(V){case f:B.tagName,(!n.isHTML(_[""])||!te.match(/^(?:disabled|checked|selected)$/i))&&$.warning('attribute "'+te+'" missed value!! "'+te+'" instead2!!'),Z(te,te,y),y=C,V=u;break;case m:$.warning('attribute space is required"'+te+'"!!');case S:V=u,y=C;break;case x:V=p,y=C;break;case v:throw new Error("elements closed character '/' and '>' must be connected to")}}C++}}function de(w,y,B){for(var _=w.tagName,L=null,j=w.length;j--;){var $=w[j],Z=$.qName,te=$.value,R=Z.indexOf(":");if(R>0)var g=$.prefix=Z.slice(0,R),C=Z.slice(R+1),V=g==="xmlns"&&C;else C=Z,g=null,V=Z==="xmlns"&&"";$.localName=C,V!==!1&&(L==null&&(L={},me(B,B={})),B[V]=L[V]=te,$.uri=n.XMLNS,y.startPrefixMapping(V,te))}for(var j=w.length;j--;){$=w[j];var g=$.prefix;g&&(g==="xml"&&($.uri=n.XML),g!=="xmlns"&&($.uri=B[g||""]))}var R=_.indexOf(":");R>0?(g=w.prefix=_.slice(0,R),C=w.localName=_.slice(R+1)):(g=null,C=w.localName=_);var ee=w.uri=B[g||""];if(y.startElement(ee,C,_,w),w.closed){if(y.endElement(ee,C,_),L)for(g in L)Object.prototype.hasOwnProperty.call(L,g)&&y.endPrefixMapping(g)}else return w.currentNSMap=B,w.localNSMap=L,!0}function re(w,y,B,_,L){if(/^(?:script|textarea)$/i.test(B)){var $=w.indexOf("</"+B+">",y),Z=w.substring(y+1,$);if(/[&<]/.test(Z))return/^script$/i.test(B)?(L.characters(Z,0,Z.length),$):(Z=Z.replace(/&#?\w+;/g,_),L.characters(Z,0,Z.length),$)}return y+1}function z(w,y,B,_){var L=_[B];return L==null&&(L=w.lastIndexOf("</"+B+">"),L<y&&(L=w.lastIndexOf("</"+B)),_[B]=L),L<y}function me(w,y){for(var B in w)Object.prototype.hasOwnProperty.call(w,B)&&(y[B]=w[B])}function be(w,y,B,_){var L=w.charAt(y+2);switch(L){case"-":if(w.charAt(y+3)==="-"){var $=w.indexOf("-->",y+4);return $>y?(B.comment(w,y+4,$-y-4),$+3):(_.error("Unclosed comment"),-1)}else return-1;default:if(w.substr(y+3,6)=="CDATA["){var $=w.indexOf("]]>",y+9);return B.startCDATA(),B.characters(w,y+9,$-y-9),B.endCDATA(),$+3}var Z=le(w,y),te=Z.length;if(te>1&&/!doctype/i.test(Z[0][0])){var g=Z[1][0],C=!1,V=!1;te>3&&(/^public$/i.test(Z[2][0])?(C=Z[3][0],V=te>4&&Z[4][0]):/^system$/i.test(Z[2][0])&&(V=Z[3][0]));var j=Z[te-1];return B.startDTD(g,C,V),B.endDTD(),j.index+j[0].length}}return-1}function J(w,y,B){var _=w.indexOf("?>",y);if(_){var L=w.substring(y,_).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return L?(L[0].length,B.processingInstruction(L[1],L[2]),_+2):-1}return-1}function N(){this.attributeNames={}}N.prototype={setTagName:function(w){if(!a.test(w))throw new Error("invalid tagName:"+w);this.tagName=w},addValue:function(w,y,B){if(!a.test(w))throw new Error("invalid attribute:"+w);this.attributeNames[w]=this.length,this[this.length++]={qName:w,value:y,offset:B}},length:0,getLocalName:function(w){return this[w].localName},getLocator:function(w){return this[w].locator},getQName:function(w){return this[w].qName},getURI:function(w){return this[w].uri},getValue:function(w){return this[w].value}};function le(w,y){var B,_=[],L=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(L.lastIndex=y,L.exec(w);B=L.exec(w);)if(_.push(B),B[1])return _}return bt.XMLReader=K,bt.ParseError=U,bt}var Ut;function un(){if(Ut)return pt;Ut=1;var n=yt(),t=$t(),r=sn(),a=an(),i=t.DOMImplementation,u=n.NAMESPACE,f=a.ParseError,x=a.XMLReader;function p(H){return H.replace(/\r[\n\u0085]/g,`
11
11
  `).replace(/[\r\u0085\u2028]/g,`
12
- `)}function m(H){this.options=H||{locator:{}}}m.prototype.parseFromString=function(H,de){var oe=this.options,Q=new x,he=oe.domBuilder||new D,ye=oe.errorHandler,Z=oe.locator,N=oe.xmlns||{},$=/\/x?html?$/.test(de),v=$?r.HTML_ENTITIES:r.XML_ENTITIES;Z&&he.setDocumentLocator(Z),Q.errorHandler=_(ye,he,Z),Q.domBuilder=oe.domBuilder||he,$&&(N[""]=u.HTML),N.xml=N.xml||u.XML;var E=oe.normalizeLineEndings||p;return H&&typeof H=="string"?Q.parse(E(H),N,v):Q.errorHandler.error("invalid doc source"),he.doc};function _(H,de,oe){if(!H){if(de instanceof D)return de;H=de}var Q={},he=H instanceof Function;oe=oe||{};function ye(Z){var N=H[Z];!N&&he&&(N=H.length==2?function($){H(Z,$)}:H),Q[Z]=N&&function($){N("[xmldom "+Z+"] "+$+K(oe))}||function(){}}return ye("warning"),ye("error"),ye("fatalError"),Q}function D(){this.cdata=!1}function U(H,de){de.lineNumber=H.lineNumber,de.columnNumber=H.columnNumber}D.prototype={startDocument:function(){this.doc=new i().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(H,de,oe,Q){var he=this.doc,ye=he.createElementNS(H,oe||de),Z=Q.length;ue(this,ye),this.currentElement=ye,this.locator&&U(this.locator,ye);for(var N=0;N<Z;N++){var H=Q.getURI(N),$=Q.getValue(N),oe=Q.getQName(N),v=he.createAttributeNS(H,oe);this.locator&&U(Q.getLocator(N),v),v.value=v.nodeValue=$,ye.setAttributeNode(v)}},endElement:function(H,de,oe){var Q=this.currentElement;Q.tagName,this.currentElement=Q.parentNode},startPrefixMapping:function(H,de){},endPrefixMapping:function(H){},processingInstruction:function(H,de){var oe=this.doc.createProcessingInstruction(H,de);this.locator&&U(this.locator,oe),ue(this,oe)},ignorableWhitespace:function(H,de,oe){},characters:function(H,de,oe){if(H=J.apply(this,arguments),H){if(this.cdata)var Q=this.doc.createCDATASection(H);else var Q=this.doc.createTextNode(H);this.currentElement?this.currentElement.appendChild(Q):/^\s*$/.test(H)&&this.doc.appendChild(Q),this.locator&&U(this.locator,Q)}},skippedEntity:function(H){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(H){(this.locator=H)&&(H.lineNumber=0)},comment:function(H,de,oe){H=J.apply(this,arguments);var Q=this.doc.createComment(H);this.locator&&U(this.locator,Q),ue(this,Q)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(H,de,oe){var Q=this.doc.implementation;if(Q&&Q.createDocumentType){var he=Q.createDocumentType(H,de,oe);this.locator&&U(this.locator,he),ue(this,he),this.doc.doctype=he}},warning:function(H){console.warn("[xmldom warning] "+H,K(this.locator))},error:function(H){console.error("[xmldom error] "+H,K(this.locator))},fatalError:function(H){throw new f(H,this.locator)}};function K(H){if(H)return`
13
- @`+(H.systemId||"")+"#[line:"+H.lineNumber+",col:"+H.columnNumber+"]"}function J(H,de,oe){return typeof H=="string"?H.substr(de,oe):H.length>=de+oe||de?new java.lang.String(H,de,oe)+"":H}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(H){D.prototype[H]=function(){return null}});function ue(H,de){H.currentElement?H.currentElement.appendChild(de):H.doc.appendChild(de)}return pt.__DOMHandler=D,pt.normalizeLineEndings=p,pt.DOMParser=m,pt}var Ht;function ln(){if(Ht)return dt;Ht=1;var n=$t();return dt.DOMImplementation=n.DOMImplementation,dt.XMLSerializer=n.XMLSerializer,dt.DOMParser=un().DOMParser,dt}var jt=ln();const cn={key:0,class:"xml-node__comment"},dn={key:1,class:"xml-node__cdata"},pn={key:2,class:"xml-node__element"},hn={key:0,class:"xml-node__line"},mn=["contenteditable","onKeydown"],gn=["contenteditable","onDblclick","onKeydown"],En=["contenteditable","onDblclick","onKeydown"],yn=["contenteditable","onKeydown"],bn={key:1,class:"xml-node__line"},An=["contenteditable","onKeydown"],xn=["contenteditable","onDblclick","onKeydown"],Nn=["contenteditable","onDblclick","onKeydown"],Cn=["contenteditable","onKeydown"],Dn={key:2,class:"xml-node__line"},vn=["contenteditable","onKeydown"],wn=["contenteditable","onDblclick","onKeydown"],Tn=["contenteditable","onDblclick","onKeydown"],_n={key:3,class:"xml-node__line"},Bn=["contenteditable","onKeydown"],Sn=["contenteditable","onDblclick","onKeydown"],On=["contenteditable","onDblclick","onKeydown"],kn={key:4},Rn={key:0,class:"xml-node__line"},In=["contenteditable","onKeydown"],Fn=["contenteditable","onDblclick","onKeydown"],Pn=["contenteditable","onDblclick","onKeydown"],Ln=["title"],Vn={class:"xml-node__line"},$n=["title"],Mn=["contenteditable","onKeydown"],qn={key:1},Un=["contenteditable","onKeydown"],Hn=["contenteditable","onDblclick","onKeydown"],jn=["contenteditable","onDblclick","onKeydown"],Kn=["title"],Gn={key:0,class:"xml-node__children"},Xn={key:0,class:"xml-node__text"},zn=["contenteditable","onKeydown"],Wn={key:1,class:"xml-node__line"},Yn=ft(o.defineComponent({__name:"XmlNode",props:{node:{},index:{},level:{default:0},parentPath:{default:""},expanded:{},theme:{},selfClosingTags:{default:()=>new Set}},emits:["toggle-expand","copy","update:tagName","update:attributeName","update:attributeValue","update:textContent","update:cdataContent"],setup(n,{emit:t}){o.useCssVars(A=>({a71f898c:A.theme.colors.indentLine}));const r=n,a=t,i=o.ref(!1),u=o.ref(null),f=o.ref(null),x=o.ref(!1),p=o.ref(!1),m=o.ref(""),_=o.ref(""),D=o.ref(""),U=o.ref(""),K=o.ref(""),J=o.ref(null),ue=o.ref(null),H=o.ref(null),de=o.ref(null),oe=o.ref(null),Q=o.computed(()=>Object.keys(r.node).find(se=>!se.startsWith(":")&&!se.startsWith("#"))||""),he=o.computed(()=>Q.value?r.parentPath?`${r.parentPath}.${Q.value}[${r.index}]`:`${Q.value}[${r.index}]`:""),ye=o.computed(()=>r.expanded.has(he.value)),Z=o.computed(()=>r.node["#comment"]?"comment":r.node.__cdata?"cdata":Q.value?"element":"unknown"),N=o.computed(()=>{const A=r.node[":@"]||{},se={};return Object.keys(A).forEach(Ce=>{Ce.startsWith("@_")&&(se[Ce.substring(2)]=A[Ce])}),se}),$=o.computed(()=>{if(Z.value!=="element"||!Q.value)return[];const A=r.node[Q.value];return Array.isArray(A)?A:[]}),v=o.computed(()=>$.value.some(A=>A.__cdata)),E=o.computed(()=>{if(!v.value)return"";const A=$.value.find(se=>se.__cdata);if(A&&Array.isArray(A.__cdata)){const se=A.__cdata;if(se.length>0&&se[0]["#text"])return se[0]["#text"]}return""}),P=o.computed(()=>{if(Z.value!=="element"||!Q.value||v.value)return"";const A=r.node[Q.value];if(!Array.isArray(A))return"";const se=A.find(Ce=>Ce["#text"]);return se?se["#text"]:""}),O=o.computed(()=>{if(Z.value!=="comment")return"";const A=r.node["#comment"];return Array.isArray(A)&&A.length>0&&A[0]["#text"]||""}),S=o.computed(()=>$.value.some(A=>Object.keys(A).some(Ce=>!Ce.startsWith("#")&&!Ce.startsWith(":")))),G=o.computed(()=>S.value?$.value.filter(A=>Object.keys(A).some(Ce=>!Ce.startsWith("#")&&!Ce.startsWith(":"))).length:0),ee=o.computed(()=>Z.value==="element"&&!S.value&&P.value!==""),te=o.computed(()=>Z.value==="element"&&!S.value&&P.value===""),g=o.computed(()=>te.value&&r.selfClosingTags?.has(Q.value)||!1),T=()=>{S.value&&a("toggle-expand",he.value)},q=(A,se)=>`${he.value}-child-${se}`,j=()=>`${he.value}.${Q.value}`,I=()=>{i.value=!0,m.value=Q.value,o.nextTick(()=>{if(J.value){J.value.focus();const A=document.createRange();A.selectNodeContents(J.value);const se=window.getSelection();se?.removeAllRanges(),se?.addRange(A)}})},re=A=>{u.value=A,_.value=A,o.nextTick(()=>{if(ue.value){ue.value.focus();const se=document.createRange();se.selectNodeContents(ue.value);const Ce=window.getSelection();Ce?.removeAllRanges(),Ce?.addRange(se)}})},C=A=>{f.value=A,D.value=N.value[A]||"",o.nextTick(()=>{if(H.value){H.value.focus();const se=document.createRange();se.selectNodeContents(H.value);const Ce=window.getSelection();Ce?.removeAllRanges(),Ce?.addRange(se)}})},B=()=>{x.value=!0,U.value=P.value,o.nextTick(()=>{if(de.value){de.value.focus();const A=document.createRange();A.selectNodeContents(de.value);const se=window.getSelection();se?.removeAllRanges(),se?.addRange(A)}})},L=()=>{if(!i.value)return;const A=J.value?.innerText.trim()||"";if(!A||A===Q.value){i.value=!1;return}i.value=!1,a("update:tagName",he.value,Q.value,A)},X=()=>{if(!u.value)return;const A=u.value,se=ue.value?.innerText.trim()||"";if(!se||se===A){u.value=null;return}u.value=null,a("update:attributeName",he.value,A,se)},z=()=>{if(!f.value)return;const A=f.value,se=H.value?.innerText.trim()||"";f.value=null,a("update:attributeValue",he.value,A,se)},F=()=>{if(!x.value)return;const A=de.value?.innerText||"";if(A===P.value){x.value=!1;return}x.value=!1,a("update:textContent",he.value,A)},Y=()=>{i.value=!1,m.value=Q.value},ge=()=>{u.value&&(_.value=u.value,u.value=null)},Ee=()=>{f.value&&(D.value=N.value[f.value]||"",f.value=null)},Te=()=>{x.value=!1,U.value=P.value},ke=()=>{p.value=!0,K.value=E.value,o.nextTick(()=>{if(oe.value){oe.value.focus();const A=document.createRange();A.selectNodeContents(oe.value);const se=window.getSelection();se?.removeAllRanges(),se?.addRange(A)}})},De=()=>{if(!p.value)return;const A=oe.value?.innerText||"";if(A===E.value){p.value=!1;return}p.value=!1,a("update:cdataContent",he.value,A)},W=()=>{p.value=!1,K.value=E.value},Be=A=>{S.value&&(A.preventDefault(),I())};return(A,se)=>{const Ce=o.resolveComponent("XmlNode",!0);return o.openBlock(),o.createElementBlock("div",{class:"xml-node",style:o.normalizeStyle({paddingLeft:A.level>0?"16px":"0"})},[Z.value==="comment"?(o.openBlock(),o.createElementBlock("div",cn,[o.createElementVNode("span",{style:o.normalizeStyle({color:A.theme.colors.xmlComment})}," <!-- "+o.toDisplayString(O.value)+" --> ",5)])):Z.value==="cdata"?(o.openBlock(),o.createElementBlock("div",dn,[o.createElementVNode("span",{style:o.normalizeStyle({color:A.theme.colors.xmlCdata})}," <![CDATA["+o.toDisplayString(A.node.__cdata)+"]]> ",5)])):Z.value==="element"?(o.openBlock(),o.createElementBlock("div",pn,[v.value?(o.openBlock(),o.createElementBlock("div",hn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:I,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(Y,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:J,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:Q.value),45,mn),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(be,R)=>(o.openBlock(),o.createElementBlock("span",{key:R,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:u.value===R,onDblclick:M=>re(R),onKeydown:[o.withKeys(o.withModifiers(X,["prevent"]),["enter"]),o.withKeys(ge,["escape"])],onBlur:X,ref_for:!0,ref:M=>{u.value===R&&(ue.value=M)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===R?_.value:R),45,gn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:f.value===R,onDblclick:M=>C(R),onKeydown:[o.withKeys(o.withModifiers(z,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:z,ref_for:!0,ref:M=>{f.value===R&&(H.value=M)},title:"Double-click to edit attribute value"},o.toDisplayString(f.value===R?D.value:be),45,En),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4),o.createElementVNode("span",{class:"xml-node__cdata",style:o.normalizeStyle({color:A.theme.colors.xmlCdata})},"<![CDATA[",4),o.createElementVNode("span",{class:"xml-node__cdata-content xml-node__cdata-content--editable",style:o.normalizeStyle({color:A.theme.colors.xmlCdata}),contenteditable:p.value,onDblclick:ke,onKeydown:[o.withKeys(o.withModifiers(De,["prevent"]),["enter"]),o.withKeys(W,["escape"])],onBlur:De,ref_key:"cdataContentRef",ref:oe,title:"Double-click to edit CDATA content"},o.toDisplayString(p.value?K.value:E.value),45,yn),o.createElementVNode("span",{class:"xml-node__cdata",style:o.normalizeStyle({color:A.theme.colors.xmlCdata})},"]]>",4),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:A.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:Q.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)])):ee.value?(o.openBlock(),o.createElementBlock("div",bn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:I,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(Y,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:J,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:Q.value),45,An),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(be,R)=>(o.openBlock(),o.createElementBlock("span",{key:R,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:u.value===R,onDblclick:M=>re(R),onKeydown:[o.withKeys(o.withModifiers(X,["prevent"]),["enter"]),o.withKeys(ge,["escape"])],onBlur:X,ref_for:!0,ref:M=>{u.value===R&&(ue.value=M)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===R?_.value:R),45,xn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:f.value===R,onDblclick:M=>C(R),onKeydown:[o.withKeys(o.withModifiers(z,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:z,ref_for:!0,ref:M=>{f.value===R&&(H.value=M)},title:"Double-click to edit attribute value"},o.toDisplayString(f.value===R?D.value:be),45,Nn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4),o.createElementVNode("span",{class:"xml-node__text-content xml-node__text-content--editable",style:o.normalizeStyle({color:A.theme.colors.xmlText}),contenteditable:x.value,onDblclick:B,onKeydown:[o.withKeys(o.withModifiers(F,["prevent"]),["enter"]),o.withKeys(Te,["escape"])],onBlur:F,ref_key:"textContentRef",ref:de,title:"Double-click to edit text content"},o.toDisplayString(x.value?U.value:P.value),45,Cn),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:A.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:Q.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)])):te.value&&g.value?(o.openBlock(),o.createElementBlock("div",Dn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:I,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(Y,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:J,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:Q.value),45,vn),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(be,R)=>(o.openBlock(),o.createElementBlock("span",{key:R,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:u.value===R,onDblclick:M=>re(R),onKeydown:[o.withKeys(o.withModifiers(X,["prevent"]),["enter"]),o.withKeys(ge,["escape"])],onBlur:X,ref_for:!0,ref:M=>{u.value===R&&(ue.value=M)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===R?_.value:R),45,wn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:f.value===R,onDblclick:M=>C(R),onKeydown:[o.withKeys(o.withModifiers(z,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:z,ref_for:!0,ref:M=>{f.value===R&&(H.value=M)},title:"Double-click to edit attribute value"},o.toDisplayString(f.value===R?D.value:be),45,Tn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})}," />",4)])):te.value?(o.openBlock(),o.createElementBlock("div",_n,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:I,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(Y,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:J,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:Q.value),45,Bn),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(be,R)=>(o.openBlock(),o.createElementBlock("span",{key:R,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:u.value===R,onDblclick:M=>re(R),onKeydown:[o.withKeys(o.withModifiers(X,["prevent"]),["enter"]),o.withKeys(ge,["escape"])],onBlur:X,ref_for:!0,ref:M=>{u.value===R&&(ue.value=M)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===R?_.value:R),45,Sn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:f.value===R,onDblclick:M=>C(R),onKeydown:[o.withKeys(o.withModifiers(z,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:z,ref_for:!0,ref:M=>{f.value===R&&(H.value=M)},title:"Double-click to edit attribute value"},o.toDisplayString(f.value===R?D.value:be),45,On),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"></",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:A.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:Q.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)])):(o.openBlock(),o.createElementBlock("div",kn,[!ye.value&&S.value?(o.openBlock(),o.createElementBlock("div",Rn,[o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:se[0]||(se[0]=be=>T()),title:"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:o.withModifiers(I,["stop"]),onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(Y,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:J,title:"Double-click or right-click to edit tag name"},o.toDisplayString(i.value?m.value:Q.value),45,In)]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(be,R)=>(o.openBlock(),o.createElementBlock("span",{key:R,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:u.value===R,onDblclick:M=>re(R),onKeydown:[o.withKeys(o.withModifiers(X,["prevent"]),["enter"]),o.withKeys(ge,["escape"])],onBlur:X,ref_for:!0,ref:M=>{u.value===R&&(ue.value=M)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===R?_.value:R),45,Fn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:f.value===R,onDblclick:M=>C(R),onKeydown:[o.withKeys(o.withModifiers(z,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:z,ref_for:!0,ref:M=>{f.value===R&&(H.value=M)},title:"Double-click to edit attribute value"},o.toDisplayString(f.value===R?D.value:be),45,Pn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:se[1]||(se[1]=be=>T()),title:"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)]),o.createElementVNode("span",{class:"xml-node__collapsed-badge",style:o.normalizeStyle({backgroundColor:A.theme.colors.collapsedBackground,color:A.theme.colors.collapsedText}),onClick:se[2]||(se[2]=be=>T()),title:`Click to expand ${G.value} child element${G.value>1?"s":""}`},o.toDisplayString(G.value)+" child"+o.toDisplayString(G.value>1?"ren":""),13,Ln),o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:se[3]||(se[3]=be=>T()),title:"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:A.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:Q.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)])])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",Vn,[S.value?(o.openBlock(),o.createElementBlock("span",{key:0,class:"xml-node__clickable-part",onClick:se[4]||(se[4]=be=>T()),title:ye.value?"Click to collapse":"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:o.withModifiers(I,["stop"]),onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(Y,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:J,title:"Double-click or right-click to edit tag name"},o.toDisplayString(i.value?m.value:Q.value),45,Mn)],8,$n)):(o.openBlock(),o.createElementBlock("span",qn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:I,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(Y,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:J,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:Q.value),45,Un)])),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(be,R)=>(o.openBlock(),o.createElementBlock("span",{key:R,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:u.value===R,onDblclick:M=>re(R),onKeydown:[o.withKeys(o.withModifiers(X,["prevent"]),["enter"]),o.withKeys(ge,["escape"])],onBlur:X,ref_for:!0,ref:M=>{u.value===R&&(ue.value=M)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===R?_.value:R),45,Hn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:f.value===R,onDblclick:M=>C(R),onKeydown:[o.withKeys(o.withModifiers(z,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:z,ref_for:!0,ref:M=>{f.value===R&&(H.value=M)},title:"Double-click to edit attribute value"},o.toDisplayString(f.value===R?D.value:be),45,jn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),S.value?(o.openBlock(),o.createElementBlock("span",{key:2,class:"xml-node__clickable-part",onClick:se[5]||(se[5]=be=>T()),title:ye.value?"Click to collapse":"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)],8,Kn)):(o.openBlock(),o.createElementBlock("span",{key:3,class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},o.toDisplayString(S.value?">":"/>"),5))]),ye.value&&S.value?(o.openBlock(),o.createElementBlock("div",Gn,[$.value.length===0&&P.value.trim()?(o.openBlock(),o.createElementBlock("div",Xn,[o.createElementVNode("span",{class:"xml-node__text-content xml-node__text-content--editable",style:o.normalizeStyle({color:A.theme.colors.xmlText}),contenteditable:x.value,onDblclick:B,onKeydown:[o.withKeys(o.withModifiers(F,["prevent"]),["enter"]),o.withKeys(Te,["escape"])],onBlur:F,ref_key:"textContentRef",ref:de,title:"Double-click to edit text content"},o.toDisplayString(x.value?U.value:P.value),45,zn)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList($.value,(be,R)=>(o.openBlock(),o.createBlock(Ce,{key:q(be,R),node:be,index:R,level:A.level+1,"parent-path":j(),expanded:A.expanded,theme:A.theme,selfClosingTags:A.selfClosingTags,onToggleExpand:se[6]||(se[6]=M=>A.$emit("toggle-expand",M)),onCopy:se[7]||(se[7]=M=>A.$emit("copy",M)),"onUpdate:tagName":se[8]||(se[8]=(M,Re,Ue)=>A.$emit("update:tagName",M,Re,Ue)),"onUpdate:attributeName":se[9]||(se[9]=(M,Re,Ue)=>A.$emit("update:attributeName",M,Re,Ue)),"onUpdate:attributeValue":se[10]||(se[10]=(M,Re,Ue)=>A.$emit("update:attributeValue",M,Re,Ue)),"onUpdate:textContent":se[11]||(se[11]=(M,Re)=>A.$emit("update:textContent",M,Re)),"onUpdate:cdataContent":se[12]||(se[12]=(M,Re)=>A.$emit("update:cdataContent",M,Re))},null,8,["node","index","level","parent-path","expanded","theme","selfClosingTags"]))),128))])):o.createCommentVNode("",!0),ye.value&&S.value?(o.openBlock(),o.createElementBlock("div",Wn,[o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:se[13]||(se[13]=be=>T()),title:"Click to collapse"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:A.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:Q.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)])])):o.createCommentVNode("",!0)],64))]))])):o.createCommentVNode("",!0)],4)}}}),[["__scopeId","data-v-acda96f3"]]),Kt={"github-light":{name:"github-light",colors:{background:"#ffffff",surfaceBackground:"#f6f8fa",border:"#d0d7de",text:"#24292f",textSecondary:"#57606a",buttonBackground:"#f6f8fa",buttonBackgroundHover:"#f3f4f6",buttonBorder:"#d0d7de",buttonText:"#24292f",buttonPrimary:"#1f883d",buttonPrimaryHover:"#1a7f37",success:"#1f883d",successBackground:"#dafbe1",error:"#cf222e",errorBackground:"#ffebe9",xmlTag:"#116329",xmlAttribute:"#0550ae",xmlAttributeValue:"#0a3069",xmlText:"#24292f",xmlComment:"#6e7781",xmlCdata:"#8250df",xmlDeclaration:"#953800",xmlBracket:"#6e7781",xmlEquals:"#6e7781",xmlQuote:"#0550ae",collapsedBackground:"#ddf4ff",collapsedText:"#0969da",indentLine:"#d0d7de"}},"github-dark":{name:"github-dark",colors:{background:"#0d1117",surfaceBackground:"#161b22",border:"#30363d",text:"#c9d1d9",textSecondary:"#8b949e",buttonBackground:"#21262d",buttonBackgroundHover:"#30363d",buttonBorder:"#30363d",buttonText:"#c9d1d9",buttonPrimary:"#238636",buttonPrimaryHover:"#2ea043",success:"#3fb950",successBackground:"#0f2e1c",error:"#f85149",errorBackground:"#3d1319",xmlTag:"#7ee787",xmlAttribute:"#79c0ff",xmlAttributeValue:"#a5d6ff",xmlText:"#c9d1d9",xmlComment:"#8b949e",xmlCdata:"#d2a8ff",xmlDeclaration:"#ffa657",xmlBracket:"#8b949e",xmlEquals:"#8b949e",xmlQuote:"#79c0ff",collapsedBackground:"#1c2d41",collapsedText:"#58a6ff",indentLine:"#30363d"}},"min-light":{name:"min-light",colors:{background:"#ffffff",surfaceBackground:"#fafafa",border:"#e5e5e5",text:"#171717",textSecondary:"#737373",buttonBackground:"#fafafa",buttonBackgroundHover:"#f5f5f5",buttonBorder:"#e5e5e5",buttonText:"#171717",buttonPrimary:"#22c55e",buttonPrimaryHover:"#16a34a",success:"#22c55e",successBackground:"#dcfce7",error:"#ef4444",errorBackground:"#fee2e2",xmlTag:"#16a34a",xmlAttribute:"#2563eb",xmlAttributeValue:"#1e40af",xmlText:"#171717",xmlComment:"#737373",xmlCdata:"#9333ea",xmlDeclaration:"#ea580c",xmlBracket:"#737373",xmlEquals:"#737373",xmlQuote:"#2563eb",collapsedBackground:"#dbeafe",collapsedText:"#1d4ed8",indentLine:"#e5e7eb"}},"slack-ochin":{name:"slack-ochin",colors:{background:"#fef5ed",surfaceBackground:"#fef9f3",border:"#e9dcc9",text:"#3d3c40",textSecondary:"#616061",buttonBackground:"#fef9f3",buttonBackgroundHover:"#f9f0e5",buttonBorder:"#e9dcc9",buttonText:"#3d3c40",buttonPrimary:"#007a5a",buttonPrimaryHover:"#006644",success:"#007a5a",successBackground:"#d1f4e0",error:"#e01e5a",errorBackground:"#ffdbea",xmlTag:"#007a5a",xmlAttribute:"#1264a3",xmlAttributeValue:"#0b4c8c",xmlText:"#3d3c40",xmlComment:"#616061",xmlCdata:"#8b2eff",xmlDeclaration:"#e8912d",xmlBracket:"#616061",xmlEquals:"#616061",xmlQuote:"#1264a3",collapsedBackground:"#d8eaf5",collapsedText:"#0b4c8c",indentLine:"#e8d5b7"}}},Qn=n=>Kt[n]||Kt["github-light"],Gt=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Zn=Gt+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Jn="["+Gt+"]["+Zn+"]*",eo=new RegExp("^"+Jn+"$");function Xt(n,t){const r=[];let a=t.exec(n);for(;a;){const i=[];i.startIndex=t.lastIndex-a[0].length;const u=a.length;for(let f=0;f<u;f++)i.push(a[f]);r.push(i),a=t.exec(n)}return r}const At=function(n){const t=eo.exec(n);return!(t===null||typeof t>"u")};function to(n){return typeof n<"u"}const ro={allowBooleanAttributes:!1,unpairedTags:[]};function zt(n,t){t=Object.assign({},ro,t);const r=[];let a=!1,i=!1;n[0]==="\uFEFF"&&(n=n.substr(1));for(let u=0;u<n.length;u++)if(n[u]==="<"&&n[u+1]==="?"){if(u+=2,u=Yt(n,u),u.err)return u}else if(n[u]==="<"){let f=u;if(u++,n[u]==="!"){u=Qt(n,u);continue}else{let x=!1;n[u]==="/"&&(x=!0,u++);let p="";for(;u<n.length&&n[u]!==">"&&n[u]!==" "&&n[u]!==" "&&n[u]!==`
14
- `&&n[u]!=="\r";u++)p+=n[u];if(p=p.trim(),p[p.length-1]==="/"&&(p=p.substring(0,p.length-1),u--),!co(p)){let D;return p.trim().length===0?D="Invalid space after '<'.":D="Tag '"+p+"' is an invalid name.",Oe("InvalidTag",D,Ve(n,u))}const m=so(n,u);if(m===!1)return Oe("InvalidAttr","Attributes for '"+p+"' have open quote.",Ve(n,u));let _=m.value;if(u=m.index,_[_.length-1]==="/"){const D=u-_.length;_=_.substring(0,_.length-1);const U=Zt(_,t);if(U===!0)a=!0;else return Oe(U.err.code,U.err.msg,Ve(n,D+U.err.line))}else if(x)if(m.tagClosed){if(_.trim().length>0)return Oe("InvalidTag","Closing tag '"+p+"' can't have attributes or invalid starting.",Ve(n,f));if(r.length===0)return Oe("InvalidTag","Closing tag '"+p+"' has not been opened.",Ve(n,f));{const D=r.pop();if(p!==D.tagName){let U=Ve(n,D.tagStartPos);return Oe("InvalidTag","Expected closing tag '"+D.tagName+"' (opened in line "+U.line+", col "+U.col+") instead of closing tag '"+p+"'.",Ve(n,f))}r.length==0&&(i=!0)}}else return Oe("InvalidTag","Closing tag '"+p+"' doesn't have proper closing.",Ve(n,u));else{const D=Zt(_,t);if(D!==!0)return Oe(D.err.code,D.err.msg,Ve(n,u-_.length+D.err.line));if(i===!0)return Oe("InvalidXml","Multiple possible root nodes found.",Ve(n,u));t.unpairedTags.indexOf(p)!==-1||r.push({tagName:p,tagStartPos:f}),a=!0}for(u++;u<n.length;u++)if(n[u]==="<")if(n[u+1]==="!"){u++,u=Qt(n,u);continue}else if(n[u+1]==="?"){if(u=Yt(n,++u),u.err)return u}else break;else if(n[u]==="&"){const D=uo(n,u);if(D==-1)return Oe("InvalidChar","char '&' is not expected.",Ve(n,u));u=D}else if(i===!0&&!Wt(n[u]))return Oe("InvalidXml","Extra text at the end",Ve(n,u));n[u]==="<"&&u--}}else{if(Wt(n[u]))continue;return Oe("InvalidChar","char '"+n[u]+"' is not expected.",Ve(n,u))}if(a){if(r.length==1)return Oe("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Ve(n,r[0].tagStartPos));if(r.length>0)return Oe("InvalidXml","Invalid '"+JSON.stringify(r.map(u=>u.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Oe("InvalidXml","Start tag expected.",1);return!0}function Wt(n){return n===" "||n===" "||n===`
15
- `||n==="\r"}function Yt(n,t){const r=t;for(;t<n.length;t++)if(n[t]=="?"||n[t]==" "){const a=n.substr(r,t-r);if(t>5&&a==="xml")return Oe("InvalidXml","XML declaration allowed only at the start of the document.",Ve(n,t));if(n[t]=="?"&&n[t+1]==">"){t++;break}else continue}return t}function Qt(n,t){if(n.length>t+5&&n[t+1]==="-"&&n[t+2]==="-"){for(t+=3;t<n.length;t++)if(n[t]==="-"&&n[t+1]==="-"&&n[t+2]===">"){t+=2;break}}else if(n.length>t+8&&n[t+1]==="D"&&n[t+2]==="O"&&n[t+3]==="C"&&n[t+4]==="T"&&n[t+5]==="Y"&&n[t+6]==="P"&&n[t+7]==="E"){let r=1;for(t+=8;t<n.length;t++)if(n[t]==="<")r++;else if(n[t]===">"&&(r--,r===0))break}else if(n.length>t+9&&n[t+1]==="["&&n[t+2]==="C"&&n[t+3]==="D"&&n[t+4]==="A"&&n[t+5]==="T"&&n[t+6]==="A"&&n[t+7]==="["){for(t+=8;t<n.length;t++)if(n[t]==="]"&&n[t+1]==="]"&&n[t+2]===">"){t+=2;break}}return t}const no='"',oo="'";function so(n,t){let r="",a="",i=!1;for(;t<n.length;t++){if(n[t]===no||n[t]===oo)a===""?a=n[t]:a!==n[t]||(a="");else if(n[t]===">"&&a===""){i=!0;break}r+=n[t]}return a!==""?!1:{value:r,index:t,tagClosed:i}}const io=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Zt(n,t){const r=Xt(n,io),a={};for(let i=0;i<r.length;i++){if(r[i][1].length===0)return Oe("InvalidAttr","Attribute '"+r[i][2]+"' has no space in starting.",ht(r[i]));if(r[i][3]!==void 0&&r[i][4]===void 0)return Oe("InvalidAttr","Attribute '"+r[i][2]+"' is without value.",ht(r[i]));if(r[i][3]===void 0&&!t.allowBooleanAttributes)return Oe("InvalidAttr","boolean attribute '"+r[i][2]+"' is not allowed.",ht(r[i]));const u=r[i][2];if(!lo(u))return Oe("InvalidAttr","Attribute '"+u+"' is an invalid name.",ht(r[i]));if(!a.hasOwnProperty(u))a[u]=1;else return Oe("InvalidAttr","Attribute '"+u+"' is repeated.",ht(r[i]))}return!0}function ao(n,t){let r=/\d/;for(n[t]==="x"&&(t++,r=/[\da-fA-F]/);t<n.length;t++){if(n[t]===";")return t;if(!n[t].match(r))break}return-1}function uo(n,t){if(t++,n[t]===";")return-1;if(n[t]==="#")return t++,ao(n,t);let r=0;for(;t<n.length;t++,r++)if(!(n[t].match(/\w/)&&r<20)){if(n[t]===";")break;return-1}return t}function Oe(n,t,r){return{err:{code:n,msg:t,line:r.line||r,col:r.col}}}function lo(n){return At(n)}function co(n){return At(n)}function Ve(n,t){const r=n.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function ht(n){return n.startIndex+n[1].length}const fo={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(n,t){return t},attributeValueProcessor:function(n,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(n,t,r){return n},captureMetaData:!1},po=function(n){return Object.assign({},fo,n)};let xt;typeof Symbol!="function"?xt="@@xmlMetadata":xt=Symbol("XML Node Metadata");class at{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,r){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:r})}addChild(t,r){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),r!==void 0&&(this.child[this.child.length-1][xt]={startIndex:r})}static getMetaDataSymbol(){return xt}}class ho{constructor(t){this.suppressValidationErr=!t}readDocType(t,r){const a={};if(t[r+3]==="O"&&t[r+4]==="C"&&t[r+5]==="T"&&t[r+6]==="Y"&&t[r+7]==="P"&&t[r+8]==="E"){r=r+9;let i=1,u=!1,f=!1,x="";for(;r<t.length;r++)if(t[r]==="<"&&!f){if(u&&ut(t,"!ENTITY",r)){r+=7;let p,m;[p,m,r]=this.readEntityExp(t,r+1,this.suppressValidationErr),m.indexOf("&")===-1&&(a[p]={regx:RegExp(`&${p};`,"g"),val:m})}else if(u&&ut(t,"!ELEMENT",r)){r+=8;const{index:p}=this.readElementExp(t,r+1);r=p}else if(u&&ut(t,"!ATTLIST",r))r+=8;else if(u&&ut(t,"!NOTATION",r)){r+=9;const{index:p}=this.readNotationExp(t,r+1,this.suppressValidationErr);r=p}else if(ut(t,"!--",r))f=!0;else throw new Error("Invalid DOCTYPE");i++,x=""}else if(t[r]===">"){if(f?t[r-1]==="-"&&t[r-2]==="-"&&(f=!1,i--):i--,i===0)break}else t[r]==="["?u=!0:x+=t[r];if(i!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:a,i:r}}readEntityExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r])&&t[r]!=='"'&&t[r]!=="'";)a+=t[r],r++;if(mt(a),r=$e(t,r),!this.suppressValidationErr){if(t.substring(r,r+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(t[r]==="%")throw new Error("Parameter entities are not supported")}let i="";return[r,i]=this.readIdentifierVal(t,r,"entity"),r--,[a,i,r]}readNotationExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r]);)a+=t[r],r++;!this.suppressValidationErr&&mt(a),r=$e(t,r);const i=t.substring(r,r+6).toUpperCase();if(!this.suppressValidationErr&&i!=="SYSTEM"&&i!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${i}"`);r+=i.length,r=$e(t,r);let u=null,f=null;if(i==="PUBLIC")[r,u]=this.readIdentifierVal(t,r,"publicIdentifier"),r=$e(t,r),(t[r]==='"'||t[r]==="'")&&([r,f]=this.readIdentifierVal(t,r,"systemIdentifier"));else if(i==="SYSTEM"&&([r,f]=this.readIdentifierVal(t,r,"systemIdentifier"),!this.suppressValidationErr&&!f))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:a,publicIdentifier:u,systemIdentifier:f,index:--r}}readIdentifierVal(t,r,a){let i="";const u=t[r];if(u!=='"'&&u!=="'")throw new Error(`Expected quoted string, found "${u}"`);for(r++;r<t.length&&t[r]!==u;)i+=t[r],r++;if(t[r]!==u)throw new Error(`Unterminated ${a} value`);return r++,[r,i]}readElementExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r]);)a+=t[r],r++;if(!this.suppressValidationErr&&!At(a))throw new Error(`Invalid element name: "${a}"`);r=$e(t,r);let i="";if(t[r]==="E"&&ut(t,"MPTY",r))r+=4;else if(t[r]==="A"&&ut(t,"NY",r))r+=2;else if(t[r]==="("){for(r++;r<t.length&&t[r]!==")";)i+=t[r],r++;if(t[r]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${t[r]}"`);return{elementName:a,contentModel:i.trim(),index:r}}readAttlistExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r]);)a+=t[r],r++;mt(a),r=$e(t,r);let i="";for(;r<t.length&&!/\s/.test(t[r]);)i+=t[r],r++;if(!mt(i))throw new Error(`Invalid attribute name: "${i}"`);r=$e(t,r);let u="";if(t.substring(r,r+8).toUpperCase()==="NOTATION"){if(u="NOTATION",r+=8,r=$e(t,r),t[r]!=="(")throw new Error(`Expected '(', found "${t[r]}"`);r++;let x=[];for(;r<t.length&&t[r]!==")";){let p="";for(;r<t.length&&t[r]!=="|"&&t[r]!==")";)p+=t[r],r++;if(p=p.trim(),!mt(p))throw new Error(`Invalid notation name: "${p}"`);x.push(p),t[r]==="|"&&(r++,r=$e(t,r))}if(t[r]!==")")throw new Error("Unterminated list of notations");r++,u+=" ("+x.join("|")+")"}else{for(;r<t.length&&!/\s/.test(t[r]);)u+=t[r],r++;const x=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!x.includes(u.toUpperCase()))throw new Error(`Invalid attribute type: "${u}"`)}r=$e(t,r);let f="";return t.substring(r,r+8).toUpperCase()==="#REQUIRED"?(f="#REQUIRED",r+=8):t.substring(r,r+7).toUpperCase()==="#IMPLIED"?(f="#IMPLIED",r+=7):[r,f]=this.readIdentifierVal(t,r,"ATTLIST"),{elementName:a,attributeName:i,attributeType:u,defaultValue:f,index:r}}}const $e=(n,t)=>{for(;t<n.length&&/\s/.test(n[t]);)t++;return t};function ut(n,t,r){for(let a=0;a<t.length;a++)if(t[a]!==n[r+a+1])return!1;return!0}function mt(n){if(At(n))return n;throw new Error(`Invalid entity name ${n}`)}const mo=/^[-+]?0x[a-fA-F0-9]+$/,go=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Eo={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function yo(n,t={}){if(t=Object.assign({},Eo,t),!n||typeof n!="string")return n;let r=n.trim();if(t.skipLike!==void 0&&t.skipLike.test(r))return n;if(n==="0")return 0;if(t.hex&&mo.test(r))return No(r,16);if(r.search(/.+[eE].+/)!==-1)return Ao(n,r,t);{const a=go.exec(r);if(a){const i=a[1]||"",u=a[2];let f=xo(a[3]);const x=i?n[u.length+1]===".":n[u.length]===".";if(!t.leadingZeros&&(u.length>1||u.length===1&&!x))return n;{const p=Number(r),m=String(p);if(p===0)return p;if(m.search(/[eE]/)!==-1)return t.eNotation?p:n;if(r.indexOf(".")!==-1)return m==="0"||m===f||m===`${i}${f}`?p:n;let _=u?f:r;return u?_===m||i+_===m?p:n:_===m||_===i+m?p:n}}else return n}}const bo=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Ao(n,t,r){if(!r.eNotation)return n;const a=t.match(bo);if(a){let i=a[1]||"";const u=a[3].indexOf("e")===-1?"E":"e",f=a[2],x=i?n[f.length+1]===u:n[f.length]===u;return f.length>1&&x?n:f.length===1&&(a[3].startsWith(`.${u}`)||a[3][0]===u)?Number(t):r.leadingZeros&&!x?(t=(a[1]||"")+a[3],Number(t)):n}else return n}function xo(n){return n&&n.indexOf(".")!==-1&&(n=n.replace(/0+$/,""),n==="."?n="0":n[0]==="."?n="0"+n:n[n.length-1]==="."&&(n=n.substring(0,n.length-1))),n}function No(n,t){if(parseInt)return parseInt(n,t);if(Number.parseInt)return Number.parseInt(n,t);if(window&&window.parseInt)return window.parseInt(n,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function Jt(n){return typeof n=="function"?n:Array.isArray(n)?t=>{for(const r of n)if(typeof r=="string"&&t===r||r instanceof RegExp&&r.test(t))return!0}:()=>!1}class Co{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(r,a)=>String.fromCodePoint(Number.parseInt(a,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(r,a)=>String.fromCodePoint(Number.parseInt(a,16))}},this.addExternalEntities=Do,this.parseXml=Bo,this.parseTextData=vo,this.resolveNameSpace=wo,this.buildAttributesMap=_o,this.isItStopNode=Ro,this.replaceEntitiesValue=Oo,this.readStopNodeData=Fo,this.saveTextToParentTag=ko,this.addChild=So,this.ignoreAttributesFn=Jt(this.options.ignoreAttributes)}}function Do(n){const t=Object.keys(n);for(let r=0;r<t.length;r++){const a=t[r];this.lastEntities[a]={regex:new RegExp("&"+a+";","g"),val:n[a]}}}function vo(n,t,r,a,i,u,f){if(n!==void 0&&(this.options.trimValues&&!a&&(n=n.trim()),n.length>0)){f||(n=this.replaceEntitiesValue(n));const x=this.options.tagValueProcessor(t,n,r,i,u);return x==null?n:typeof x!=typeof n||x!==n?x:this.options.trimValues?_t(n,this.options.parseTagValue,this.options.numberParseOptions):n.trim()===n?_t(n,this.options.parseTagValue,this.options.numberParseOptions):n}}function wo(n){if(this.options.removeNSPrefix){const t=n.split(":"),r=n.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(n=r+t[1])}return n}const To=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function _o(n,t,r){if(this.options.ignoreAttributes!==!0&&typeof n=="string"){const a=Xt(n,To),i=a.length,u={};for(let f=0;f<i;f++){const x=this.resolveNameSpace(a[f][1]);if(this.ignoreAttributesFn(x,t))continue;let p=a[f][4],m=this.options.attributeNamePrefix+x;if(x.length)if(this.options.transformAttributeName&&(m=this.options.transformAttributeName(m)),m==="__proto__"&&(m="#__proto__"),p!==void 0){this.options.trimValues&&(p=p.trim()),p=this.replaceEntitiesValue(p);const _=this.options.attributeValueProcessor(x,p,t);_==null?u[m]=p:typeof _!=typeof p||_!==p?u[m]=_:u[m]=_t(p,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(u[m]=!0)}if(!Object.keys(u).length)return;if(this.options.attributesGroupName){const f={};return f[this.options.attributesGroupName]=u,f}return u}}const Bo=function(n){n=n.replace(/\r\n?/g,`
16
- `);const t=new at("!xml");let r=t,a="",i="";const u=new ho(this.options.processEntities);for(let f=0;f<n.length;f++)if(n[f]==="<")if(n[f+1]==="/"){const p=lt(n,">",f,"Closing Tag is not closed.");let m=n.substring(f+2,p).trim();if(this.options.removeNSPrefix){const U=m.indexOf(":");U!==-1&&(m=m.substr(U+1))}this.options.transformTagName&&(m=this.options.transformTagName(m)),r&&(a=this.saveTextToParentTag(a,r,i));const _=i.substring(i.lastIndexOf(".")+1);if(m&&this.options.unpairedTags.indexOf(m)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${m}>`);let D=0;_&&this.options.unpairedTags.indexOf(_)!==-1?(D=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):D=i.lastIndexOf("."),i=i.substring(0,D),r=this.tagsNodeStack.pop(),a="",f=p}else if(n[f+1]==="?"){let p=Tt(n,f,!1,"?>");if(!p)throw new Error("Pi Tag is not closed.");if(a=this.saveTextToParentTag(a,r,i),!(this.options.ignoreDeclaration&&p.tagName==="?xml"||this.options.ignorePiTags)){const m=new at(p.tagName);m.add(this.options.textNodeName,""),p.tagName!==p.tagExp&&p.attrExpPresent&&(m[":@"]=this.buildAttributesMap(p.tagExp,i,p.tagName)),this.addChild(r,m,i,f)}f=p.closeIndex+1}else if(n.substr(f+1,3)==="!--"){const p=lt(n,"-->",f+4,"Comment is not closed.");if(this.options.commentPropName){const m=n.substring(f+4,p-2);a=this.saveTextToParentTag(a,r,i),r.add(this.options.commentPropName,[{[this.options.textNodeName]:m}])}f=p}else if(n.substr(f+1,2)==="!D"){const p=u.readDocType(n,f);this.docTypeEntities=p.entities,f=p.i}else if(n.substr(f+1,2)==="!["){const p=lt(n,"]]>",f,"CDATA is not closed.")-2,m=n.substring(f+9,p);a=this.saveTextToParentTag(a,r,i);let _=this.parseTextData(m,r.tagname,i,!0,!1,!0,!0);_==null&&(_=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:m}]):r.add(this.options.textNodeName,_),f=p+2}else{let p=Tt(n,f,this.options.removeNSPrefix),m=p.tagName;const _=p.rawTagName;let D=p.tagExp,U=p.attrExpPresent,K=p.closeIndex;this.options.transformTagName&&(m=this.options.transformTagName(m)),r&&a&&r.tagname!=="!xml"&&(a=this.saveTextToParentTag(a,r,i,!1));const J=r;J&&this.options.unpairedTags.indexOf(J.tagname)!==-1&&(r=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),m!==t.tagname&&(i+=i?"."+m:m);const ue=f;if(this.isItStopNode(this.options.stopNodes,i,m)){let H="";if(D.length>0&&D.lastIndexOf("/")===D.length-1)m[m.length-1]==="/"?(m=m.substr(0,m.length-1),i=i.substr(0,i.length-1),D=m):D=D.substr(0,D.length-1),f=p.closeIndex;else if(this.options.unpairedTags.indexOf(m)!==-1)f=p.closeIndex;else{const oe=this.readStopNodeData(n,_,K+1);if(!oe)throw new Error(`Unexpected end of ${_}`);f=oe.i,H=oe.tagContent}const de=new at(m);m!==D&&U&&(de[":@"]=this.buildAttributesMap(D,i,m)),H&&(H=this.parseTextData(H,m,i,!0,U,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),de.add(this.options.textNodeName,H),this.addChild(r,de,i,ue)}else{if(D.length>0&&D.lastIndexOf("/")===D.length-1){m[m.length-1]==="/"?(m=m.substr(0,m.length-1),i=i.substr(0,i.length-1),D=m):D=D.substr(0,D.length-1),this.options.transformTagName&&(m=this.options.transformTagName(m));const H=new at(m);m!==D&&U&&(H[":@"]=this.buildAttributesMap(D,i,m)),this.addChild(r,H,i,ue),i=i.substr(0,i.lastIndexOf("."))}else{const H=new at(m);this.tagsNodeStack.push(r),m!==D&&U&&(H[":@"]=this.buildAttributesMap(D,i,m)),this.addChild(r,H,i,ue),r=H}a="",f=K}}else a+=n[f];return t.child};function So(n,t,r,a){this.options.captureMetaData||(a=void 0);const i=this.options.updateTag(t.tagname,r,t[":@"]);i===!1||(typeof i=="string"&&(t.tagname=i),n.addChild(t,a))}const Oo=function(n){if(this.options.processEntities){for(let t in this.docTypeEntities){const r=this.docTypeEntities[t];n=n.replace(r.regx,r.val)}for(let t in this.lastEntities){const r=this.lastEntities[t];n=n.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];n=n.replace(r.regex,r.val)}n=n.replace(this.ampEntity.regex,this.ampEntity.val)}return n};function ko(n,t,r,a){return n&&(a===void 0&&(a=t.child.length===0),n=this.parseTextData(n,t.tagname,r,!1,t[":@"]?Object.keys(t[":@"]).length!==0:!1,a),n!==void 0&&n!==""&&t.add(this.options.textNodeName,n),n=""),n}function Ro(n,t,r){const a="*."+r;for(const i in n){const u=n[i];if(a===u||t===u)return!0}return!1}function Io(n,t,r=">"){let a,i="";for(let u=t;u<n.length;u++){let f=n[u];if(a)f===a&&(a="");else if(f==='"'||f==="'")a=f;else if(f===r[0])if(r[1]){if(n[u+1]===r[1])return{data:i,index:u}}else return{data:i,index:u};else f===" "&&(f=" ");i+=f}}function lt(n,t,r,a){const i=n.indexOf(t,r);if(i===-1)throw new Error(a);return i+t.length-1}function Tt(n,t,r,a=">"){const i=Io(n,t+1,a);if(!i)return;let u=i.data;const f=i.index,x=u.search(/\s/);let p=u,m=!0;x!==-1&&(p=u.substring(0,x),u=u.substring(x+1).trimStart());const _=p;if(r){const D=p.indexOf(":");D!==-1&&(p=p.substr(D+1),m=p!==i.data.substr(D+1))}return{tagName:p,tagExp:u,closeIndex:f,attrExpPresent:m,rawTagName:_}}function Fo(n,t,r){const a=r;let i=1;for(;r<n.length;r++)if(n[r]==="<")if(n[r+1]==="/"){const u=lt(n,">",r,`${t} is not closed`);if(n.substring(r+2,u).trim()===t&&(i--,i===0))return{tagContent:n.substring(a,r),i:u};r=u}else if(n[r+1]==="?")r=lt(n,"?>",r+1,"StopNode is not closed.");else if(n.substr(r+1,3)==="!--")r=lt(n,"-->",r+3,"StopNode is not closed.");else if(n.substr(r+1,2)==="![")r=lt(n,"]]>",r,"StopNode is not closed.")-2;else{const u=Tt(n,r,">");u&&((u&&u.tagName)===t&&u.tagExp[u.tagExp.length-1]!=="/"&&i++,r=u.closeIndex)}}function _t(n,t,r){if(t&&typeof n=="string"){const a=n.trim();return a==="true"?!0:a==="false"?!1:yo(n,r)}else return to(n)?n:""}const Bt=at.getMetaDataSymbol();function Po(n,t){return er(n,t)}function er(n,t,r){let a;const i={};for(let u=0;u<n.length;u++){const f=n[u],x=Lo(f);let p="";if(r===void 0?p=x:p=r+"."+x,x===t.textNodeName)a===void 0?a=f[x]:a+=""+f[x];else{if(x===void 0)continue;if(f[x]){let m=er(f[x],t,p);const _=$o(m,t);f[Bt]!==void 0&&(m[Bt]=f[Bt]),f[":@"]?Vo(m,f[":@"],p,t):Object.keys(m).length===1&&m[t.textNodeName]!==void 0&&!t.alwaysCreateTextNode?m=m[t.textNodeName]:Object.keys(m).length===0&&(t.alwaysCreateTextNode?m[t.textNodeName]="":m=""),i[x]!==void 0&&i.hasOwnProperty(x)?(Array.isArray(i[x])||(i[x]=[i[x]]),i[x].push(m)):t.isArray(x,p,_)?i[x]=[m]:i[x]=m}}}return typeof a=="string"?a.length>0&&(i[t.textNodeName]=a):a!==void 0&&(i[t.textNodeName]=a),i}function Lo(n){const t=Object.keys(n);for(let r=0;r<t.length;r++){const a=t[r];if(a!==":@")return a}}function Vo(n,t,r,a){if(t){const i=Object.keys(t),u=i.length;for(let f=0;f<u;f++){const x=i[f];a.isArray(x,r+"."+x,!0,!0)?n[x]=[t[x]]:n[x]=t[x]}}}function $o(n,t){const{textNodeName:r}=t,a=Object.keys(n).length;return!!(a===0||a===1&&(n[r]||typeof n[r]=="boolean"||n[r]===0))}class Mo{constructor(t){this.externalEntities={},this.options=po(t)}parse(t,r){if(typeof t!="string"&&t.toString)t=t.toString();else if(typeof t!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(r){r===!0&&(r={});const u=zt(t,r);if(u!==!0)throw Error(`${u.err.msg}:${u.err.line}:${u.err.col}`)}const a=new Co(this.options);a.addExternalEntities(this.externalEntities);const i=a.parseXml(t);return this.options.preserveOrder||i===void 0?i:Po(i,this.options)}addEntity(t,r){if(r.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(t.indexOf("&")!==-1||t.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(r==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=r}static getMetaDataSymbol(){return at.getMetaDataSymbol()}}const qo=`
17
- `;function Uo(n,t){let r="";return t.format&&t.indentBy.length>0&&(r=qo),tr(n,t,"",r)}function tr(n,t,r,a){let i="",u=!1;for(let f=0;f<n.length;f++){const x=n[f],p=Ho(x);if(p===void 0)continue;let m="";if(r.length===0?m=p:m=`${r}.${p}`,p===t.textNodeName){let J=x[p];jo(m,t)||(J=t.tagValueProcessor(p,J),J=nr(J,t)),u&&(i+=a),i+=J,u=!1;continue}else if(p===t.cdataPropName){u&&(i+=a),i+=`<![CDATA[${x[p][0][t.textNodeName]}]]>`,u=!1;continue}else if(p===t.commentPropName){i+=a+`<!--${x[p][0][t.textNodeName]}-->`,u=!0;continue}else if(p[0]==="?"){const J=rr(x[":@"],t),ue=p==="?xml"?"":a;let H=x[p][0][t.textNodeName];H=H.length!==0?" "+H:"",i+=ue+`<${p}${H}${J}?>`,u=!0;continue}let _=a;_!==""&&(_+=t.indentBy);const D=rr(x[":@"],t),U=a+`<${p}${D}`,K=tr(x[p],t,m,_);t.unpairedTags.indexOf(p)!==-1?t.suppressUnpairedNode?i+=U+">":i+=U+"/>":(!K||K.length===0)&&t.suppressEmptyNode?i+=U+"/>":K&&K.endsWith(">")?i+=U+`>${K}${a}</${p}>`:(i+=U+">",K&&a!==""&&(K.includes("/>")||K.includes("</"))?i+=a+t.indentBy+K+a:i+=K,i+=`</${p}>`),u=!0}return i}function Ho(n){const t=Object.keys(n);for(let r=0;r<t.length;r++){const a=t[r];if(n.hasOwnProperty(a)&&a!==":@")return a}}function rr(n,t){let r="";if(n&&!t.ignoreAttributes)for(let a in n){if(!n.hasOwnProperty(a))continue;let i=t.attributeValueProcessor(a,n[a]);i=nr(i,t),i===!0&&t.suppressBooleanAttributes?r+=` ${a.substr(t.attributeNamePrefix.length)}`:r+=` ${a.substr(t.attributeNamePrefix.length)}="${i}"`}return r}function jo(n,t){n=n.substr(0,n.length-t.textNodeName.length-1);let r=n.substr(n.lastIndexOf(".")+1);for(let a in t.stopNodes)if(t.stopNodes[a]===n||t.stopNodes[a]==="*."+r)return!0;return!1}function nr(n,t){if(n&&n.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const a=t.entities[r];n=n.replace(a.regex,a.val)}return n}const Ko={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(n,t){return t},attributeValueProcessor:function(n,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function nt(n){this.options=Object.assign({},Ko,n),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=Jt(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=zo),this.processTextOrObjNode=Go,this.options.format?(this.indentate=Xo,this.tagEndChar=`>
12
+ `)}function m(H){this.options=H||{locator:{}}}m.prototype.parseFromString=function(H,de){var re=this.options,z=new x,me=re.domBuilder||new v,be=re.errorHandler,J=re.locator,N=re.xmlns||{},le=/\/x?html?$/.test(de),w=le?r.HTML_ENTITIES:r.XML_ENTITIES;J&&me.setDocumentLocator(J),z.errorHandler=S(be,me,J),z.domBuilder=re.domBuilder||me,le&&(N[""]=u.HTML),N.xml=N.xml||u.XML;var y=re.normalizeLineEndings||p;return H&&typeof H=="string"?z.parse(y(H),N,w):z.errorHandler.error("invalid doc source"),me.doc};function S(H,de,re){if(!H){if(de instanceof v)return de;H=de}var z={},me=H instanceof Function;re=re||{};function be(J){var N=H[J];!N&&me&&(N=H.length==2?function(le){H(J,le)}:H),z[J]=N&&function(le){N("[xmldom "+J+"] "+le+K(re))}||function(){}}return be("warning"),be("error"),be("fatalError"),z}function v(){this.cdata=!1}function U(H,de){de.lineNumber=H.lineNumber,de.columnNumber=H.columnNumber}v.prototype={startDocument:function(){this.doc=new i().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(H,de,re,z){var me=this.doc,be=me.createElementNS(H,re||de),J=z.length;ae(this,be),this.currentElement=be,this.locator&&U(this.locator,be);for(var N=0;N<J;N++){var H=z.getURI(N),le=z.getValue(N),re=z.getQName(N),w=me.createAttributeNS(H,re);this.locator&&U(z.getLocator(N),w),w.value=w.nodeValue=le,be.setAttributeNode(w)}},endElement:function(H,de,re){var z=this.currentElement;z.tagName,this.currentElement=z.parentNode},startPrefixMapping:function(H,de){},endPrefixMapping:function(H){},processingInstruction:function(H,de){var re=this.doc.createProcessingInstruction(H,de);this.locator&&U(this.locator,re),ae(this,re)},ignorableWhitespace:function(H,de,re){},characters:function(H,de,re){if(H=Y.apply(this,arguments),H){if(this.cdata)var z=this.doc.createCDATASection(H);else var z=this.doc.createTextNode(H);this.currentElement?this.currentElement.appendChild(z):/^\s*$/.test(H)&&this.doc.appendChild(z),this.locator&&U(this.locator,z)}},skippedEntity:function(H){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(H){(this.locator=H)&&(H.lineNumber=0)},comment:function(H,de,re){H=Y.apply(this,arguments);var z=this.doc.createComment(H);this.locator&&U(this.locator,z),ae(this,z)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(H,de,re){var z=this.doc.implementation;if(z&&z.createDocumentType){var me=z.createDocumentType(H,de,re);this.locator&&U(this.locator,me),ae(this,me),this.doc.doctype=me}},warning:function(H){console.warn("[xmldom warning] "+H,K(this.locator))},error:function(H){console.error("[xmldom error] "+H,K(this.locator))},fatalError:function(H){throw new f(H,this.locator)}};function K(H){if(H)return`
13
+ @`+(H.systemId||"")+"#[line:"+H.lineNumber+",col:"+H.columnNumber+"]"}function Y(H,de,re){return typeof H=="string"?H.substr(de,re):H.length>=de+re||de?new java.lang.String(H,de,re)+"":H}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(H){v.prototype[H]=function(){return null}});function ae(H,de){H.currentElement?H.currentElement.appendChild(de):H.doc.appendChild(de)}return pt.__DOMHandler=v,pt.normalizeLineEndings=p,pt.DOMParser=m,pt}var Ht;function ln(){if(Ht)return dt;Ht=1;var n=$t();return dt.DOMImplementation=n.DOMImplementation,dt.XMLSerializer=n.XMLSerializer,dt.DOMParser=un().DOMParser,dt}var jt=ln();const cn={key:0,class:"xml-node__comment"},dn={key:1,class:"xml-node__cdata"},pn={key:2,class:"xml-node__element"},hn={key:0,class:"xml-node__line"},mn=["contenteditable","onKeydown"],gn=["contenteditable","onDblclick","onKeydown"],En=["contenteditable","onDblclick","onKeydown"],yn=["contenteditable","onKeydown"],bn={key:1,class:"xml-node__line"},An=["contenteditable","onKeydown"],xn=["contenteditable","onDblclick","onKeydown"],Nn=["contenteditable","onDblclick","onKeydown"],Cn=["contenteditable","onKeydown"],Dn={key:2,class:"xml-node__line"},vn=["contenteditable","onKeydown"],wn=["contenteditable","onDblclick","onKeydown"],Tn=["contenteditable","onDblclick","onKeydown"],_n={key:3,class:"xml-node__line"},Bn=["contenteditable","onKeydown"],Sn=["contenteditable","onDblclick","onKeydown"],On=["contenteditable","onDblclick","onKeydown"],kn={key:4},Rn={key:0,class:"xml-node__line"},In=["contenteditable","onKeydown"],Fn=["contenteditable","onDblclick","onKeydown"],Pn=["contenteditable","onDblclick","onKeydown"],Ln=["title"],Vn={class:"xml-node__line"},$n=["title"],Mn=["contenteditable","onKeydown"],qn={key:1},Un=["contenteditable","onKeydown"],Hn=["contenteditable","onDblclick","onKeydown"],jn=["contenteditable","onDblclick","onKeydown"],Kn=["title"],Gn={key:0,class:"xml-node__children"},Xn={key:0,class:"xml-node__text"},Wn=["contenteditable","onKeydown"],zn={key:1,class:"xml-node__line"},Yn=ft(o.defineComponent({__name:"XmlNode",props:{node:{},index:{},level:{default:0},parentPath:{default:""},expanded:{},theme:{},selfClosingTags:{default:()=>new Set}},emits:["toggle-expand","copy","update:tagName","update:attributeName","update:attributeValue","update:textContent","update:cdataContent"],setup(n,{emit:t}){o.useCssVars(A=>({a71f898c:A.theme.colors.indentLine}));const r=n,a=t,i=o.ref(!1),u=o.ref(null),f=o.ref(null),x=o.ref(!1),p=o.ref(!1),m=o.ref(""),S=o.ref(""),v=o.ref(""),U=o.ref(""),K=o.ref(""),Y=o.ref(null),ae=o.ref(null),H=o.ref(null),de=o.ref(null),re=o.ref(null),z=o.computed(()=>Object.keys(r.node).find(oe=>!oe.startsWith(":")&&!oe.startsWith("#"))||""),me=o.computed(()=>z.value?r.parentPath?`${r.parentPath}.${z.value}[${r.index}]`:`${z.value}[${r.index}]`:""),be=o.computed(()=>r.expanded.has(me.value)),J=o.computed(()=>r.node["#comment"]?"comment":r.node.__cdata?"cdata":z.value?"element":"unknown"),N=o.computed(()=>{const A=r.node[":@"]||{},oe={};return Object.keys(A).forEach(Ce=>{Ce.startsWith("@_")&&(oe[Ce.substring(2)]=A[Ce])}),oe}),le=o.computed(()=>{if(J.value!=="element"||!z.value)return[];const A=r.node[z.value];return Array.isArray(A)?A:[]}),w=o.computed(()=>le.value.some(A=>A.__cdata)),y=o.computed(()=>{if(!w.value)return"";const A=le.value.find(oe=>oe.__cdata);if(A&&Array.isArray(A.__cdata)){const oe=A.__cdata;if(oe.length>0&&oe[0]["#text"])return oe[0]["#text"]}return""}),B=o.computed(()=>{if(J.value!=="element"||!z.value||w.value)return"";const A=r.node[z.value];if(!Array.isArray(A))return"";const oe=A.find(Ce=>Ce["#text"]);return oe?oe["#text"]:""}),_=o.computed(()=>{if(J.value!=="comment")return"";const A=r.node["#comment"];return Array.isArray(A)&&A.length>0&&A[0]["#text"]||""}),L=o.computed(()=>le.value.some(A=>Object.keys(A).some(Ce=>!Ce.startsWith("#")&&!Ce.startsWith(":")))),$=o.computed(()=>L.value?le.value.filter(A=>Object.keys(A).some(Ce=>!Ce.startsWith("#")&&!Ce.startsWith(":"))).length:0),Z=o.computed(()=>J.value==="element"&&!L.value&&B.value!==""),te=o.computed(()=>J.value==="element"&&!L.value&&B.value===""),g=o.computed(()=>te.value&&r.selfClosingTags?.has(z.value)||!1),C=()=>{L.value&&a("toggle-expand",me.value)},V=(A,oe)=>`${me.value}-child-${oe}`,j=()=>`${me.value}.${z.value}`,R=()=>{i.value=!0,m.value=z.value,o.nextTick(()=>{if(Y.value){Y.value.focus();const A=document.createRange();A.selectNodeContents(Y.value);const oe=window.getSelection();oe?.removeAllRanges(),oe?.addRange(A)}})},ee=A=>{u.value=A,S.value=A,o.nextTick(()=>{if(ae.value){ae.value.focus();const oe=document.createRange();oe.selectNodeContents(ae.value);const Ce=window.getSelection();Ce?.removeAllRanges(),Ce?.addRange(oe)}})},D=A=>{f.value=A,v.value=N.value[A]||"",o.nextTick(()=>{if(H.value){H.value.focus();const oe=document.createRange();oe.selectNodeContents(H.value);const Ce=window.getSelection();Ce?.removeAllRanges(),Ce?.addRange(oe)}})},O=()=>{x.value=!0,U.value=B.value,o.nextTick(()=>{if(de.value){de.value.focus();const A=document.createRange();A.selectNodeContents(de.value);const oe=window.getSelection();oe?.removeAllRanges(),oe?.addRange(A)}})},F=()=>{if(!i.value)return;const A=Y.value?.innerText.trim()||"";if(!A||A===z.value){i.value=!1;return}i.value=!1,a("update:tagName",me.value,z.value,A)},G=()=>{if(!u.value)return;const A=u.value,oe=ae.value?.innerText.trim()||"";if(!oe||oe===A){u.value=null;return}u.value=null,a("update:attributeName",me.value,A,oe)},X=()=>{if(!f.value)return;const A=f.value,oe=H.value?.innerText.trim()||"";f.value=null,a("update:attributeValue",me.value,A,oe)},P=()=>{if(!x.value)return;const A=de.value?.innerText||"";if(A===B.value){x.value=!1;return}x.value=!1,a("update:textContent",me.value,A)},Q=()=>{i.value=!1,m.value=z.value},pe=()=>{u.value&&(S.value=u.value,u.value=null)},Ee=()=>{f.value&&(v.value=N.value[f.value]||"",f.value=null)},Te=()=>{x.value=!1,U.value=B.value},ke=()=>{p.value=!0,K.value=y.value,o.nextTick(()=>{if(re.value){re.value.focus();const A=document.createRange();A.selectNodeContents(re.value);const oe=window.getSelection();oe?.removeAllRanges(),oe?.addRange(A)}})},De=()=>{if(!p.value)return;const A=re.value?.innerText||"";if(A===y.value){p.value=!1;return}p.value=!1,a("update:cdataContent",me.value,A)},W=()=>{p.value=!1,K.value=y.value},Be=A=>{L.value&&(A.preventDefault(),R())};return(A,oe)=>{const Ce=o.resolveComponent("XmlNode",!0);return o.openBlock(),o.createElementBlock("div",{class:"xml-node",style:o.normalizeStyle({paddingLeft:A.level>0?"16px":"0"})},[J.value==="comment"?(o.openBlock(),o.createElementBlock("div",cn,[o.createElementVNode("span",{style:o.normalizeStyle({color:A.theme.colors.xmlComment})}," <!-- "+o.toDisplayString(_.value)+" --> ",5)])):J.value==="cdata"?(o.openBlock(),o.createElementBlock("div",dn,[o.createElementVNode("span",{style:o.normalizeStyle({color:A.theme.colors.xmlCdata})}," <![CDATA["+o.toDisplayString(A.node.__cdata)+"]]> ",5)])):J.value==="element"?(o.openBlock(),o.createElementBlock("div",pn,[w.value?(o.openBlock(),o.createElementBlock("div",hn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:R,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(F,["prevent"]),["enter"]),o.withKeys(Q,["escape"])],onBlur:F,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:z.value),45,mn),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(ye,I)=>(o.openBlock(),o.createElementBlock("span",{key:I,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:u.value===I,onDblclick:q=>ee(I),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(pe,["escape"])],onBlur:G,ref_for:!0,ref:q=>{u.value===I&&(ae.value=q)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===I?S.value:I),45,gn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:f.value===I,onDblclick:q=>D(I),onKeydown:[o.withKeys(o.withModifiers(X,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:X,ref_for:!0,ref:q=>{f.value===I&&(H.value=q)},title:"Double-click to edit attribute value"},o.toDisplayString(f.value===I?v.value:ye),45,En),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4),o.createElementVNode("span",{class:"xml-node__cdata",style:o.normalizeStyle({color:A.theme.colors.xmlCdata})},"<![CDATA[",4),o.createElementVNode("span",{class:"xml-node__cdata-content xml-node__cdata-content--editable",style:o.normalizeStyle({color:A.theme.colors.xmlCdata}),contenteditable:p.value,onDblclick:ke,onKeydown:[o.withKeys(o.withModifiers(De,["prevent"]),["enter"]),o.withKeys(W,["escape"])],onBlur:De,ref_key:"cdataContentRef",ref:re,title:"Double-click to edit CDATA content"},o.toDisplayString(p.value?K.value:y.value),45,yn),o.createElementVNode("span",{class:"xml-node__cdata",style:o.normalizeStyle({color:A.theme.colors.xmlCdata})},"]]>",4),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:A.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:z.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)])):Z.value?(o.openBlock(),o.createElementBlock("div",bn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:R,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(F,["prevent"]),["enter"]),o.withKeys(Q,["escape"])],onBlur:F,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:z.value),45,An),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(ye,I)=>(o.openBlock(),o.createElementBlock("span",{key:I,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:u.value===I,onDblclick:q=>ee(I),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(pe,["escape"])],onBlur:G,ref_for:!0,ref:q=>{u.value===I&&(ae.value=q)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===I?S.value:I),45,xn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:f.value===I,onDblclick:q=>D(I),onKeydown:[o.withKeys(o.withModifiers(X,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:X,ref_for:!0,ref:q=>{f.value===I&&(H.value=q)},title:"Double-click to edit attribute value"},o.toDisplayString(f.value===I?v.value:ye),45,Nn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4),o.createElementVNode("span",{class:"xml-node__text-content xml-node__text-content--editable",style:o.normalizeStyle({color:A.theme.colors.xmlText}),contenteditable:x.value,onDblclick:O,onKeydown:[o.withKeys(o.withModifiers(P,["prevent"]),["enter"]),o.withKeys(Te,["escape"])],onBlur:P,ref_key:"textContentRef",ref:de,title:"Double-click to edit text content"},o.toDisplayString(x.value?U.value:B.value),45,Cn),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:A.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:z.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)])):te.value&&g.value?(o.openBlock(),o.createElementBlock("div",Dn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:R,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(F,["prevent"]),["enter"]),o.withKeys(Q,["escape"])],onBlur:F,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:z.value),45,vn),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(ye,I)=>(o.openBlock(),o.createElementBlock("span",{key:I,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:u.value===I,onDblclick:q=>ee(I),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(pe,["escape"])],onBlur:G,ref_for:!0,ref:q=>{u.value===I&&(ae.value=q)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===I?S.value:I),45,wn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:f.value===I,onDblclick:q=>D(I),onKeydown:[o.withKeys(o.withModifiers(X,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:X,ref_for:!0,ref:q=>{f.value===I&&(H.value=q)},title:"Double-click to edit attribute value"},o.toDisplayString(f.value===I?v.value:ye),45,Tn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})}," />",4)])):te.value?(o.openBlock(),o.createElementBlock("div",_n,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:R,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(F,["prevent"]),["enter"]),o.withKeys(Q,["escape"])],onBlur:F,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:z.value),45,Bn),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(ye,I)=>(o.openBlock(),o.createElementBlock("span",{key:I,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:u.value===I,onDblclick:q=>ee(I),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(pe,["escape"])],onBlur:G,ref_for:!0,ref:q=>{u.value===I&&(ae.value=q)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===I?S.value:I),45,Sn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:f.value===I,onDblclick:q=>D(I),onKeydown:[o.withKeys(o.withModifiers(X,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:X,ref_for:!0,ref:q=>{f.value===I&&(H.value=q)},title:"Double-click to edit attribute value"},o.toDisplayString(f.value===I?v.value:ye),45,On),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"></",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:A.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:z.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)])):(o.openBlock(),o.createElementBlock("div",kn,[!be.value&&L.value?(o.openBlock(),o.createElementBlock("div",Rn,[o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:oe[0]||(oe[0]=ye=>C()),title:"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:o.withModifiers(R,["stop"]),onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(F,["prevent"]),["enter"]),o.withKeys(Q,["escape"])],onBlur:F,ref_key:"tagNameRef",ref:Y,title:"Double-click or right-click to edit tag name"},o.toDisplayString(i.value?m.value:z.value),45,In)]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(ye,I)=>(o.openBlock(),o.createElementBlock("span",{key:I,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:u.value===I,onDblclick:q=>ee(I),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(pe,["escape"])],onBlur:G,ref_for:!0,ref:q=>{u.value===I&&(ae.value=q)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===I?S.value:I),45,Fn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:f.value===I,onDblclick:q=>D(I),onKeydown:[o.withKeys(o.withModifiers(X,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:X,ref_for:!0,ref:q=>{f.value===I&&(H.value=q)},title:"Double-click to edit attribute value"},o.toDisplayString(f.value===I?v.value:ye),45,Pn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:oe[1]||(oe[1]=ye=>C()),title:"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)]),o.createElementVNode("span",{class:"xml-node__collapsed-badge",style:o.normalizeStyle({backgroundColor:A.theme.colors.collapsedBackground,color:A.theme.colors.collapsedText}),onClick:oe[2]||(oe[2]=ye=>C()),title:`Click to expand ${$.value} child element${$.value>1?"s":""}`},o.toDisplayString($.value)+" child"+o.toDisplayString($.value>1?"ren":""),13,Ln),o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:oe[3]||(oe[3]=ye=>C()),title:"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:A.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:z.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)])])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",Vn,[L.value?(o.openBlock(),o.createElementBlock("span",{key:0,class:"xml-node__clickable-part",onClick:oe[4]||(oe[4]=ye=>C()),title:be.value?"Click to collapse":"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:o.withModifiers(R,["stop"]),onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(F,["prevent"]),["enter"]),o.withKeys(Q,["escape"])],onBlur:F,ref_key:"tagNameRef",ref:Y,title:"Double-click or right-click to edit tag name"},o.toDisplayString(i.value?m.value:z.value),45,Mn)],8,$n)):(o.openBlock(),o.createElementBlock("span",qn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:R,onKeydown:[o.withKeys(o.withModifiers(F,["prevent"]),["enter"]),o.withKeys(Q,["escape"])],onBlur:F,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:z.value),45,Un)])),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(N.value,(ye,I)=>(o.openBlock(),o.createElementBlock("span",{key:I,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:u.value===I,onDblclick:q=>ee(I),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(pe,["escape"])],onBlur:G,ref_for:!0,ref:q=>{u.value===I&&(ae.value=q)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===I?S.value:I),45,Hn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:f.value===I,onDblclick:q=>D(I),onKeydown:[o.withKeys(o.withModifiers(X,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:X,ref_for:!0,ref:q=>{f.value===I&&(H.value=q)},title:"Double-click to edit attribute value"},o.toDisplayString(f.value===I?v.value:ye),45,jn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),L.value?(o.openBlock(),o.createElementBlock("span",{key:2,class:"xml-node__clickable-part",onClick:oe[5]||(oe[5]=ye=>C()),title:be.value?"Click to collapse":"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)],8,Kn)):(o.openBlock(),o.createElementBlock("span",{key:3,class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},o.toDisplayString(L.value?">":"/>"),5))]),be.value&&L.value?(o.openBlock(),o.createElementBlock("div",Gn,[le.value.length===0&&B.value.trim()?(o.openBlock(),o.createElementBlock("div",Xn,[o.createElementVNode("span",{class:"xml-node__text-content xml-node__text-content--editable",style:o.normalizeStyle({color:A.theme.colors.xmlText}),contenteditable:x.value,onDblclick:O,onKeydown:[o.withKeys(o.withModifiers(P,["prevent"]),["enter"]),o.withKeys(Te,["escape"])],onBlur:P,ref_key:"textContentRef",ref:de,title:"Double-click to edit text content"},o.toDisplayString(x.value?U.value:B.value),45,Wn)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(le.value,(ye,I)=>(o.openBlock(),o.createBlock(Ce,{key:V(ye,I),node:ye,index:I,level:A.level+1,"parent-path":j(),expanded:A.expanded,theme:A.theme,selfClosingTags:A.selfClosingTags,onToggleExpand:oe[6]||(oe[6]=q=>A.$emit("toggle-expand",q)),onCopy:oe[7]||(oe[7]=q=>A.$emit("copy",q)),"onUpdate:tagName":oe[8]||(oe[8]=(q,Re,Ue)=>A.$emit("update:tagName",q,Re,Ue)),"onUpdate:attributeName":oe[9]||(oe[9]=(q,Re,Ue)=>A.$emit("update:attributeName",q,Re,Ue)),"onUpdate:attributeValue":oe[10]||(oe[10]=(q,Re,Ue)=>A.$emit("update:attributeValue",q,Re,Ue)),"onUpdate:textContent":oe[11]||(oe[11]=(q,Re)=>A.$emit("update:textContent",q,Re)),"onUpdate:cdataContent":oe[12]||(oe[12]=(q,Re)=>A.$emit("update:cdataContent",q,Re))},null,8,["node","index","level","parent-path","expanded","theme","selfClosingTags"]))),128))])):o.createCommentVNode("",!0),be.value&&L.value?(o.openBlock(),o.createElementBlock("div",zn,[o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:oe[13]||(oe[13]=ye=>C()),title:"Click to collapse"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:A.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:z.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)])])):o.createCommentVNode("",!0)],64))]))])):o.createCommentVNode("",!0)],4)}}}),[["__scopeId","data-v-acda96f3"]]),Kt={"github-light":{name:"github-light",colors:{background:"#ffffff",surfaceBackground:"#f6f8fa",border:"#d0d7de",text:"#24292f",textSecondary:"#57606a",buttonBackground:"#f6f8fa",buttonBackgroundHover:"#f3f4f6",buttonBorder:"#d0d7de",buttonText:"#24292f",buttonPrimary:"#1f883d",buttonPrimaryHover:"#1a7f37",success:"#1f883d",successBackground:"#dafbe1",error:"#cf222e",errorBackground:"#ffebe9",xmlTag:"#116329",xmlAttribute:"#0550ae",xmlAttributeValue:"#0a3069",xmlText:"#24292f",xmlComment:"#6e7781",xmlCdata:"#8250df",xmlDeclaration:"#953800",xmlBracket:"#6e7781",xmlEquals:"#6e7781",xmlQuote:"#0550ae",collapsedBackground:"#ddf4ff",collapsedText:"#0969da",indentLine:"#d0d7de"}},"github-dark":{name:"github-dark",colors:{background:"#0d1117",surfaceBackground:"#161b22",border:"#30363d",text:"#c9d1d9",textSecondary:"#8b949e",buttonBackground:"#21262d",buttonBackgroundHover:"#30363d",buttonBorder:"#30363d",buttonText:"#c9d1d9",buttonPrimary:"#238636",buttonPrimaryHover:"#2ea043",success:"#3fb950",successBackground:"#0f2e1c",error:"#f85149",errorBackground:"#3d1319",xmlTag:"#7ee787",xmlAttribute:"#79c0ff",xmlAttributeValue:"#a5d6ff",xmlText:"#c9d1d9",xmlComment:"#8b949e",xmlCdata:"#d2a8ff",xmlDeclaration:"#ffa657",xmlBracket:"#8b949e",xmlEquals:"#8b949e",xmlQuote:"#79c0ff",collapsedBackground:"#1c2d41",collapsedText:"#58a6ff",indentLine:"#30363d"}},"min-light":{name:"min-light",colors:{background:"#ffffff",surfaceBackground:"#fafafa",border:"#e5e5e5",text:"#171717",textSecondary:"#737373",buttonBackground:"#fafafa",buttonBackgroundHover:"#f5f5f5",buttonBorder:"#e5e5e5",buttonText:"#171717",buttonPrimary:"#22c55e",buttonPrimaryHover:"#16a34a",success:"#22c55e",successBackground:"#dcfce7",error:"#ef4444",errorBackground:"#fee2e2",xmlTag:"#16a34a",xmlAttribute:"#2563eb",xmlAttributeValue:"#1e40af",xmlText:"#171717",xmlComment:"#737373",xmlCdata:"#9333ea",xmlDeclaration:"#ea580c",xmlBracket:"#737373",xmlEquals:"#737373",xmlQuote:"#2563eb",collapsedBackground:"#dbeafe",collapsedText:"#1d4ed8",indentLine:"#e5e7eb"}},"slack-ochin":{name:"slack-ochin",colors:{background:"#fef5ed",surfaceBackground:"#fef9f3",border:"#e9dcc9",text:"#3d3c40",textSecondary:"#616061",buttonBackground:"#fef9f3",buttonBackgroundHover:"#f9f0e5",buttonBorder:"#e9dcc9",buttonText:"#3d3c40",buttonPrimary:"#007a5a",buttonPrimaryHover:"#006644",success:"#007a5a",successBackground:"#d1f4e0",error:"#e01e5a",errorBackground:"#ffdbea",xmlTag:"#007a5a",xmlAttribute:"#1264a3",xmlAttributeValue:"#0b4c8c",xmlText:"#3d3c40",xmlComment:"#616061",xmlCdata:"#8b2eff",xmlDeclaration:"#e8912d",xmlBracket:"#616061",xmlEquals:"#616061",xmlQuote:"#1264a3",collapsedBackground:"#d8eaf5",collapsedText:"#0b4c8c",indentLine:"#e8d5b7"}}},Qn=n=>Kt[n]||Kt["github-light"],Gt=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Zn=Gt+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Jn="["+Gt+"]["+Zn+"]*",eo=new RegExp("^"+Jn+"$");function Xt(n,t){const r=[];let a=t.exec(n);for(;a;){const i=[];i.startIndex=t.lastIndex-a[0].length;const u=a.length;for(let f=0;f<u;f++)i.push(a[f]);r.push(i),a=t.exec(n)}return r}const At=function(n){const t=eo.exec(n);return!(t===null||typeof t>"u")};function to(n){return typeof n<"u"}const ro={allowBooleanAttributes:!1,unpairedTags:[]};function Wt(n,t){t=Object.assign({},ro,t);const r=[];let a=!1,i=!1;n[0]==="\uFEFF"&&(n=n.substr(1));for(let u=0;u<n.length;u++)if(n[u]==="<"&&n[u+1]==="?"){if(u+=2,u=Yt(n,u),u.err)return u}else if(n[u]==="<"){let f=u;if(u++,n[u]==="!"){u=Qt(n,u);continue}else{let x=!1;n[u]==="/"&&(x=!0,u++);let p="";for(;u<n.length&&n[u]!==">"&&n[u]!==" "&&n[u]!==" "&&n[u]!==`
14
+ `&&n[u]!=="\r";u++)p+=n[u];if(p=p.trim(),p[p.length-1]==="/"&&(p=p.substring(0,p.length-1),u--),!co(p)){let v;return p.trim().length===0?v="Invalid space after '<'.":v="Tag '"+p+"' is an invalid name.",Oe("InvalidTag",v,Ve(n,u))}const m=so(n,u);if(m===!1)return Oe("InvalidAttr","Attributes for '"+p+"' have open quote.",Ve(n,u));let S=m.value;if(u=m.index,S[S.length-1]==="/"){const v=u-S.length;S=S.substring(0,S.length-1);const U=Zt(S,t);if(U===!0)a=!0;else return Oe(U.err.code,U.err.msg,Ve(n,v+U.err.line))}else if(x)if(m.tagClosed){if(S.trim().length>0)return Oe("InvalidTag","Closing tag '"+p+"' can't have attributes or invalid starting.",Ve(n,f));if(r.length===0)return Oe("InvalidTag","Closing tag '"+p+"' has not been opened.",Ve(n,f));{const v=r.pop();if(p!==v.tagName){let U=Ve(n,v.tagStartPos);return Oe("InvalidTag","Expected closing tag '"+v.tagName+"' (opened in line "+U.line+", col "+U.col+") instead of closing tag '"+p+"'.",Ve(n,f))}r.length==0&&(i=!0)}}else return Oe("InvalidTag","Closing tag '"+p+"' doesn't have proper closing.",Ve(n,u));else{const v=Zt(S,t);if(v!==!0)return Oe(v.err.code,v.err.msg,Ve(n,u-S.length+v.err.line));if(i===!0)return Oe("InvalidXml","Multiple possible root nodes found.",Ve(n,u));t.unpairedTags.indexOf(p)!==-1||r.push({tagName:p,tagStartPos:f}),a=!0}for(u++;u<n.length;u++)if(n[u]==="<")if(n[u+1]==="!"){u++,u=Qt(n,u);continue}else if(n[u+1]==="?"){if(u=Yt(n,++u),u.err)return u}else break;else if(n[u]==="&"){const v=uo(n,u);if(v==-1)return Oe("InvalidChar","char '&' is not expected.",Ve(n,u));u=v}else if(i===!0&&!zt(n[u]))return Oe("InvalidXml","Extra text at the end",Ve(n,u));n[u]==="<"&&u--}}else{if(zt(n[u]))continue;return Oe("InvalidChar","char '"+n[u]+"' is not expected.",Ve(n,u))}if(a){if(r.length==1)return Oe("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Ve(n,r[0].tagStartPos));if(r.length>0)return Oe("InvalidXml","Invalid '"+JSON.stringify(r.map(u=>u.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Oe("InvalidXml","Start tag expected.",1);return!0}function zt(n){return n===" "||n===" "||n===`
15
+ `||n==="\r"}function Yt(n,t){const r=t;for(;t<n.length;t++)if(n[t]=="?"||n[t]==" "){const a=n.substr(r,t-r);if(t>5&&a==="xml")return Oe("InvalidXml","XML declaration allowed only at the start of the document.",Ve(n,t));if(n[t]=="?"&&n[t+1]==">"){t++;break}else continue}return t}function Qt(n,t){if(n.length>t+5&&n[t+1]==="-"&&n[t+2]==="-"){for(t+=3;t<n.length;t++)if(n[t]==="-"&&n[t+1]==="-"&&n[t+2]===">"){t+=2;break}}else if(n.length>t+8&&n[t+1]==="D"&&n[t+2]==="O"&&n[t+3]==="C"&&n[t+4]==="T"&&n[t+5]==="Y"&&n[t+6]==="P"&&n[t+7]==="E"){let r=1;for(t+=8;t<n.length;t++)if(n[t]==="<")r++;else if(n[t]===">"&&(r--,r===0))break}else if(n.length>t+9&&n[t+1]==="["&&n[t+2]==="C"&&n[t+3]==="D"&&n[t+4]==="A"&&n[t+5]==="T"&&n[t+6]==="A"&&n[t+7]==="["){for(t+=8;t<n.length;t++)if(n[t]==="]"&&n[t+1]==="]"&&n[t+2]===">"){t+=2;break}}return t}const no='"',oo="'";function so(n,t){let r="",a="",i=!1;for(;t<n.length;t++){if(n[t]===no||n[t]===oo)a===""?a=n[t]:a!==n[t]||(a="");else if(n[t]===">"&&a===""){i=!0;break}r+=n[t]}return a!==""?!1:{value:r,index:t,tagClosed:i}}const io=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Zt(n,t){const r=Xt(n,io),a={};for(let i=0;i<r.length;i++){if(r[i][1].length===0)return Oe("InvalidAttr","Attribute '"+r[i][2]+"' has no space in starting.",ht(r[i]));if(r[i][3]!==void 0&&r[i][4]===void 0)return Oe("InvalidAttr","Attribute '"+r[i][2]+"' is without value.",ht(r[i]));if(r[i][3]===void 0&&!t.allowBooleanAttributes)return Oe("InvalidAttr","boolean attribute '"+r[i][2]+"' is not allowed.",ht(r[i]));const u=r[i][2];if(!lo(u))return Oe("InvalidAttr","Attribute '"+u+"' is an invalid name.",ht(r[i]));if(!a.hasOwnProperty(u))a[u]=1;else return Oe("InvalidAttr","Attribute '"+u+"' is repeated.",ht(r[i]))}return!0}function ao(n,t){let r=/\d/;for(n[t]==="x"&&(t++,r=/[\da-fA-F]/);t<n.length;t++){if(n[t]===";")return t;if(!n[t].match(r))break}return-1}function uo(n,t){if(t++,n[t]===";")return-1;if(n[t]==="#")return t++,ao(n,t);let r=0;for(;t<n.length;t++,r++)if(!(n[t].match(/\w/)&&r<20)){if(n[t]===";")break;return-1}return t}function Oe(n,t,r){return{err:{code:n,msg:t,line:r.line||r,col:r.col}}}function lo(n){return At(n)}function co(n){return At(n)}function Ve(n,t){const r=n.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function ht(n){return n.startIndex+n[1].length}const fo={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(n,t){return t},attributeValueProcessor:function(n,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(n,t,r){return n},captureMetaData:!1},po=function(n){return Object.assign({},fo,n)};let xt;typeof Symbol!="function"?xt="@@xmlMetadata":xt=Symbol("XML Node Metadata");class at{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,r){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:r})}addChild(t,r){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),r!==void 0&&(this.child[this.child.length-1][xt]={startIndex:r})}static getMetaDataSymbol(){return xt}}class ho{constructor(t){this.suppressValidationErr=!t}readDocType(t,r){const a={};if(t[r+3]==="O"&&t[r+4]==="C"&&t[r+5]==="T"&&t[r+6]==="Y"&&t[r+7]==="P"&&t[r+8]==="E"){r=r+9;let i=1,u=!1,f=!1,x="";for(;r<t.length;r++)if(t[r]==="<"&&!f){if(u&&ut(t,"!ENTITY",r)){r+=7;let p,m;[p,m,r]=this.readEntityExp(t,r+1,this.suppressValidationErr),m.indexOf("&")===-1&&(a[p]={regx:RegExp(`&${p};`,"g"),val:m})}else if(u&&ut(t,"!ELEMENT",r)){r+=8;const{index:p}=this.readElementExp(t,r+1);r=p}else if(u&&ut(t,"!ATTLIST",r))r+=8;else if(u&&ut(t,"!NOTATION",r)){r+=9;const{index:p}=this.readNotationExp(t,r+1,this.suppressValidationErr);r=p}else if(ut(t,"!--",r))f=!0;else throw new Error("Invalid DOCTYPE");i++,x=""}else if(t[r]===">"){if(f?t[r-1]==="-"&&t[r-2]==="-"&&(f=!1,i--):i--,i===0)break}else t[r]==="["?u=!0:x+=t[r];if(i!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:a,i:r}}readEntityExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r])&&t[r]!=='"'&&t[r]!=="'";)a+=t[r],r++;if(mt(a),r=$e(t,r),!this.suppressValidationErr){if(t.substring(r,r+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(t[r]==="%")throw new Error("Parameter entities are not supported")}let i="";return[r,i]=this.readIdentifierVal(t,r,"entity"),r--,[a,i,r]}readNotationExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r]);)a+=t[r],r++;!this.suppressValidationErr&&mt(a),r=$e(t,r);const i=t.substring(r,r+6).toUpperCase();if(!this.suppressValidationErr&&i!=="SYSTEM"&&i!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${i}"`);r+=i.length,r=$e(t,r);let u=null,f=null;if(i==="PUBLIC")[r,u]=this.readIdentifierVal(t,r,"publicIdentifier"),r=$e(t,r),(t[r]==='"'||t[r]==="'")&&([r,f]=this.readIdentifierVal(t,r,"systemIdentifier"));else if(i==="SYSTEM"&&([r,f]=this.readIdentifierVal(t,r,"systemIdentifier"),!this.suppressValidationErr&&!f))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:a,publicIdentifier:u,systemIdentifier:f,index:--r}}readIdentifierVal(t,r,a){let i="";const u=t[r];if(u!=='"'&&u!=="'")throw new Error(`Expected quoted string, found "${u}"`);for(r++;r<t.length&&t[r]!==u;)i+=t[r],r++;if(t[r]!==u)throw new Error(`Unterminated ${a} value`);return r++,[r,i]}readElementExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r]);)a+=t[r],r++;if(!this.suppressValidationErr&&!At(a))throw new Error(`Invalid element name: "${a}"`);r=$e(t,r);let i="";if(t[r]==="E"&&ut(t,"MPTY",r))r+=4;else if(t[r]==="A"&&ut(t,"NY",r))r+=2;else if(t[r]==="("){for(r++;r<t.length&&t[r]!==")";)i+=t[r],r++;if(t[r]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${t[r]}"`);return{elementName:a,contentModel:i.trim(),index:r}}readAttlistExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r]);)a+=t[r],r++;mt(a),r=$e(t,r);let i="";for(;r<t.length&&!/\s/.test(t[r]);)i+=t[r],r++;if(!mt(i))throw new Error(`Invalid attribute name: "${i}"`);r=$e(t,r);let u="";if(t.substring(r,r+8).toUpperCase()==="NOTATION"){if(u="NOTATION",r+=8,r=$e(t,r),t[r]!=="(")throw new Error(`Expected '(', found "${t[r]}"`);r++;let x=[];for(;r<t.length&&t[r]!==")";){let p="";for(;r<t.length&&t[r]!=="|"&&t[r]!==")";)p+=t[r],r++;if(p=p.trim(),!mt(p))throw new Error(`Invalid notation name: "${p}"`);x.push(p),t[r]==="|"&&(r++,r=$e(t,r))}if(t[r]!==")")throw new Error("Unterminated list of notations");r++,u+=" ("+x.join("|")+")"}else{for(;r<t.length&&!/\s/.test(t[r]);)u+=t[r],r++;const x=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!x.includes(u.toUpperCase()))throw new Error(`Invalid attribute type: "${u}"`)}r=$e(t,r);let f="";return t.substring(r,r+8).toUpperCase()==="#REQUIRED"?(f="#REQUIRED",r+=8):t.substring(r,r+7).toUpperCase()==="#IMPLIED"?(f="#IMPLIED",r+=7):[r,f]=this.readIdentifierVal(t,r,"ATTLIST"),{elementName:a,attributeName:i,attributeType:u,defaultValue:f,index:r}}}const $e=(n,t)=>{for(;t<n.length&&/\s/.test(n[t]);)t++;return t};function ut(n,t,r){for(let a=0;a<t.length;a++)if(t[a]!==n[r+a+1])return!1;return!0}function mt(n){if(At(n))return n;throw new Error(`Invalid entity name ${n}`)}const mo=/^[-+]?0x[a-fA-F0-9]+$/,go=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Eo={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function yo(n,t={}){if(t=Object.assign({},Eo,t),!n||typeof n!="string")return n;let r=n.trim();if(t.skipLike!==void 0&&t.skipLike.test(r))return n;if(n==="0")return 0;if(t.hex&&mo.test(r))return No(r,16);if(r.search(/.+[eE].+/)!==-1)return Ao(n,r,t);{const a=go.exec(r);if(a){const i=a[1]||"",u=a[2];let f=xo(a[3]);const x=i?n[u.length+1]===".":n[u.length]===".";if(!t.leadingZeros&&(u.length>1||u.length===1&&!x))return n;{const p=Number(r),m=String(p);if(p===0)return p;if(m.search(/[eE]/)!==-1)return t.eNotation?p:n;if(r.indexOf(".")!==-1)return m==="0"||m===f||m===`${i}${f}`?p:n;let S=u?f:r;return u?S===m||i+S===m?p:n:S===m||S===i+m?p:n}}else return n}}const bo=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Ao(n,t,r){if(!r.eNotation)return n;const a=t.match(bo);if(a){let i=a[1]||"";const u=a[3].indexOf("e")===-1?"E":"e",f=a[2],x=i?n[f.length+1]===u:n[f.length]===u;return f.length>1&&x?n:f.length===1&&(a[3].startsWith(`.${u}`)||a[3][0]===u)?Number(t):r.leadingZeros&&!x?(t=(a[1]||"")+a[3],Number(t)):n}else return n}function xo(n){return n&&n.indexOf(".")!==-1&&(n=n.replace(/0+$/,""),n==="."?n="0":n[0]==="."?n="0"+n:n[n.length-1]==="."&&(n=n.substring(0,n.length-1))),n}function No(n,t){if(parseInt)return parseInt(n,t);if(Number.parseInt)return Number.parseInt(n,t);if(window&&window.parseInt)return window.parseInt(n,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function Jt(n){return typeof n=="function"?n:Array.isArray(n)?t=>{for(const r of n)if(typeof r=="string"&&t===r||r instanceof RegExp&&r.test(t))return!0}:()=>!1}class Co{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(r,a)=>String.fromCodePoint(Number.parseInt(a,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(r,a)=>String.fromCodePoint(Number.parseInt(a,16))}},this.addExternalEntities=Do,this.parseXml=Bo,this.parseTextData=vo,this.resolveNameSpace=wo,this.buildAttributesMap=_o,this.isItStopNode=Ro,this.replaceEntitiesValue=Oo,this.readStopNodeData=Fo,this.saveTextToParentTag=ko,this.addChild=So,this.ignoreAttributesFn=Jt(this.options.ignoreAttributes)}}function Do(n){const t=Object.keys(n);for(let r=0;r<t.length;r++){const a=t[r];this.lastEntities[a]={regex:new RegExp("&"+a+";","g"),val:n[a]}}}function vo(n,t,r,a,i,u,f){if(n!==void 0&&(this.options.trimValues&&!a&&(n=n.trim()),n.length>0)){f||(n=this.replaceEntitiesValue(n));const x=this.options.tagValueProcessor(t,n,r,i,u);return x==null?n:typeof x!=typeof n||x!==n?x:this.options.trimValues?_t(n,this.options.parseTagValue,this.options.numberParseOptions):n.trim()===n?_t(n,this.options.parseTagValue,this.options.numberParseOptions):n}}function wo(n){if(this.options.removeNSPrefix){const t=n.split(":"),r=n.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(n=r+t[1])}return n}const To=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function _o(n,t,r){if(this.options.ignoreAttributes!==!0&&typeof n=="string"){const a=Xt(n,To),i=a.length,u={};for(let f=0;f<i;f++){const x=this.resolveNameSpace(a[f][1]);if(this.ignoreAttributesFn(x,t))continue;let p=a[f][4],m=this.options.attributeNamePrefix+x;if(x.length)if(this.options.transformAttributeName&&(m=this.options.transformAttributeName(m)),m==="__proto__"&&(m="#__proto__"),p!==void 0){this.options.trimValues&&(p=p.trim()),p=this.replaceEntitiesValue(p);const S=this.options.attributeValueProcessor(x,p,t);S==null?u[m]=p:typeof S!=typeof p||S!==p?u[m]=S:u[m]=_t(p,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(u[m]=!0)}if(!Object.keys(u).length)return;if(this.options.attributesGroupName){const f={};return f[this.options.attributesGroupName]=u,f}return u}}const Bo=function(n){n=n.replace(/\r\n?/g,`
16
+ `);const t=new at("!xml");let r=t,a="",i="";const u=new ho(this.options.processEntities);for(let f=0;f<n.length;f++)if(n[f]==="<")if(n[f+1]==="/"){const p=lt(n,">",f,"Closing Tag is not closed.");let m=n.substring(f+2,p).trim();if(this.options.removeNSPrefix){const U=m.indexOf(":");U!==-1&&(m=m.substr(U+1))}this.options.transformTagName&&(m=this.options.transformTagName(m)),r&&(a=this.saveTextToParentTag(a,r,i));const S=i.substring(i.lastIndexOf(".")+1);if(m&&this.options.unpairedTags.indexOf(m)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${m}>`);let v=0;S&&this.options.unpairedTags.indexOf(S)!==-1?(v=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):v=i.lastIndexOf("."),i=i.substring(0,v),r=this.tagsNodeStack.pop(),a="",f=p}else if(n[f+1]==="?"){let p=Tt(n,f,!1,"?>");if(!p)throw new Error("Pi Tag is not closed.");if(a=this.saveTextToParentTag(a,r,i),!(this.options.ignoreDeclaration&&p.tagName==="?xml"||this.options.ignorePiTags)){const m=new at(p.tagName);m.add(this.options.textNodeName,""),p.tagName!==p.tagExp&&p.attrExpPresent&&(m[":@"]=this.buildAttributesMap(p.tagExp,i,p.tagName)),this.addChild(r,m,i,f)}f=p.closeIndex+1}else if(n.substr(f+1,3)==="!--"){const p=lt(n,"-->",f+4,"Comment is not closed.");if(this.options.commentPropName){const m=n.substring(f+4,p-2);a=this.saveTextToParentTag(a,r,i),r.add(this.options.commentPropName,[{[this.options.textNodeName]:m}])}f=p}else if(n.substr(f+1,2)==="!D"){const p=u.readDocType(n,f);this.docTypeEntities=p.entities,f=p.i}else if(n.substr(f+1,2)==="!["){const p=lt(n,"]]>",f,"CDATA is not closed.")-2,m=n.substring(f+9,p);a=this.saveTextToParentTag(a,r,i);let S=this.parseTextData(m,r.tagname,i,!0,!1,!0,!0);S==null&&(S=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:m}]):r.add(this.options.textNodeName,S),f=p+2}else{let p=Tt(n,f,this.options.removeNSPrefix),m=p.tagName;const S=p.rawTagName;let v=p.tagExp,U=p.attrExpPresent,K=p.closeIndex;this.options.transformTagName&&(m=this.options.transformTagName(m)),r&&a&&r.tagname!=="!xml"&&(a=this.saveTextToParentTag(a,r,i,!1));const Y=r;Y&&this.options.unpairedTags.indexOf(Y.tagname)!==-1&&(r=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),m!==t.tagname&&(i+=i?"."+m:m);const ae=f;if(this.isItStopNode(this.options.stopNodes,i,m)){let H="";if(v.length>0&&v.lastIndexOf("/")===v.length-1)m[m.length-1]==="/"?(m=m.substr(0,m.length-1),i=i.substr(0,i.length-1),v=m):v=v.substr(0,v.length-1),f=p.closeIndex;else if(this.options.unpairedTags.indexOf(m)!==-1)f=p.closeIndex;else{const re=this.readStopNodeData(n,S,K+1);if(!re)throw new Error(`Unexpected end of ${S}`);f=re.i,H=re.tagContent}const de=new at(m);m!==v&&U&&(de[":@"]=this.buildAttributesMap(v,i,m)),H&&(H=this.parseTextData(H,m,i,!0,U,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),de.add(this.options.textNodeName,H),this.addChild(r,de,i,ae)}else{if(v.length>0&&v.lastIndexOf("/")===v.length-1){m[m.length-1]==="/"?(m=m.substr(0,m.length-1),i=i.substr(0,i.length-1),v=m):v=v.substr(0,v.length-1),this.options.transformTagName&&(m=this.options.transformTagName(m));const H=new at(m);m!==v&&U&&(H[":@"]=this.buildAttributesMap(v,i,m)),this.addChild(r,H,i,ae),i=i.substr(0,i.lastIndexOf("."))}else{const H=new at(m);this.tagsNodeStack.push(r),m!==v&&U&&(H[":@"]=this.buildAttributesMap(v,i,m)),this.addChild(r,H,i,ae),r=H}a="",f=K}}else a+=n[f];return t.child};function So(n,t,r,a){this.options.captureMetaData||(a=void 0);const i=this.options.updateTag(t.tagname,r,t[":@"]);i===!1||(typeof i=="string"&&(t.tagname=i),n.addChild(t,a))}const Oo=function(n){if(this.options.processEntities){for(let t in this.docTypeEntities){const r=this.docTypeEntities[t];n=n.replace(r.regx,r.val)}for(let t in this.lastEntities){const r=this.lastEntities[t];n=n.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];n=n.replace(r.regex,r.val)}n=n.replace(this.ampEntity.regex,this.ampEntity.val)}return n};function ko(n,t,r,a){return n&&(a===void 0&&(a=t.child.length===0),n=this.parseTextData(n,t.tagname,r,!1,t[":@"]?Object.keys(t[":@"]).length!==0:!1,a),n!==void 0&&n!==""&&t.add(this.options.textNodeName,n),n=""),n}function Ro(n,t,r){const a="*."+r;for(const i in n){const u=n[i];if(a===u||t===u)return!0}return!1}function Io(n,t,r=">"){let a,i="";for(let u=t;u<n.length;u++){let f=n[u];if(a)f===a&&(a="");else if(f==='"'||f==="'")a=f;else if(f===r[0])if(r[1]){if(n[u+1]===r[1])return{data:i,index:u}}else return{data:i,index:u};else f===" "&&(f=" ");i+=f}}function lt(n,t,r,a){const i=n.indexOf(t,r);if(i===-1)throw new Error(a);return i+t.length-1}function Tt(n,t,r,a=">"){const i=Io(n,t+1,a);if(!i)return;let u=i.data;const f=i.index,x=u.search(/\s/);let p=u,m=!0;x!==-1&&(p=u.substring(0,x),u=u.substring(x+1).trimStart());const S=p;if(r){const v=p.indexOf(":");v!==-1&&(p=p.substr(v+1),m=p!==i.data.substr(v+1))}return{tagName:p,tagExp:u,closeIndex:f,attrExpPresent:m,rawTagName:S}}function Fo(n,t,r){const a=r;let i=1;for(;r<n.length;r++)if(n[r]==="<")if(n[r+1]==="/"){const u=lt(n,">",r,`${t} is not closed`);if(n.substring(r+2,u).trim()===t&&(i--,i===0))return{tagContent:n.substring(a,r),i:u};r=u}else if(n[r+1]==="?")r=lt(n,"?>",r+1,"StopNode is not closed.");else if(n.substr(r+1,3)==="!--")r=lt(n,"-->",r+3,"StopNode is not closed.");else if(n.substr(r+1,2)==="![")r=lt(n,"]]>",r,"StopNode is not closed.")-2;else{const u=Tt(n,r,">");u&&((u&&u.tagName)===t&&u.tagExp[u.tagExp.length-1]!=="/"&&i++,r=u.closeIndex)}}function _t(n,t,r){if(t&&typeof n=="string"){const a=n.trim();return a==="true"?!0:a==="false"?!1:yo(n,r)}else return to(n)?n:""}const Bt=at.getMetaDataSymbol();function Po(n,t){return er(n,t)}function er(n,t,r){let a;const i={};for(let u=0;u<n.length;u++){const f=n[u],x=Lo(f);let p="";if(r===void 0?p=x:p=r+"."+x,x===t.textNodeName)a===void 0?a=f[x]:a+=""+f[x];else{if(x===void 0)continue;if(f[x]){let m=er(f[x],t,p);const S=$o(m,t);f[Bt]!==void 0&&(m[Bt]=f[Bt]),f[":@"]?Vo(m,f[":@"],p,t):Object.keys(m).length===1&&m[t.textNodeName]!==void 0&&!t.alwaysCreateTextNode?m=m[t.textNodeName]:Object.keys(m).length===0&&(t.alwaysCreateTextNode?m[t.textNodeName]="":m=""),i[x]!==void 0&&i.hasOwnProperty(x)?(Array.isArray(i[x])||(i[x]=[i[x]]),i[x].push(m)):t.isArray(x,p,S)?i[x]=[m]:i[x]=m}}}return typeof a=="string"?a.length>0&&(i[t.textNodeName]=a):a!==void 0&&(i[t.textNodeName]=a),i}function Lo(n){const t=Object.keys(n);for(let r=0;r<t.length;r++){const a=t[r];if(a!==":@")return a}}function Vo(n,t,r,a){if(t){const i=Object.keys(t),u=i.length;for(let f=0;f<u;f++){const x=i[f];a.isArray(x,r+"."+x,!0,!0)?n[x]=[t[x]]:n[x]=t[x]}}}function $o(n,t){const{textNodeName:r}=t,a=Object.keys(n).length;return!!(a===0||a===1&&(n[r]||typeof n[r]=="boolean"||n[r]===0))}class Mo{constructor(t){this.externalEntities={},this.options=po(t)}parse(t,r){if(typeof t!="string"&&t.toString)t=t.toString();else if(typeof t!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(r){r===!0&&(r={});const u=Wt(t,r);if(u!==!0)throw Error(`${u.err.msg}:${u.err.line}:${u.err.col}`)}const a=new Co(this.options);a.addExternalEntities(this.externalEntities);const i=a.parseXml(t);return this.options.preserveOrder||i===void 0?i:Po(i,this.options)}addEntity(t,r){if(r.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(t.indexOf("&")!==-1||t.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(r==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=r}static getMetaDataSymbol(){return at.getMetaDataSymbol()}}const qo=`
17
+ `;function Uo(n,t){let r="";return t.format&&t.indentBy.length>0&&(r=qo),tr(n,t,"",r)}function tr(n,t,r,a){let i="",u=!1;for(let f=0;f<n.length;f++){const x=n[f],p=Ho(x);if(p===void 0)continue;let m="";if(r.length===0?m=p:m=`${r}.${p}`,p===t.textNodeName){let Y=x[p];jo(m,t)||(Y=t.tagValueProcessor(p,Y),Y=nr(Y,t)),u&&(i+=a),i+=Y,u=!1;continue}else if(p===t.cdataPropName){u&&(i+=a),i+=`<![CDATA[${x[p][0][t.textNodeName]}]]>`,u=!1;continue}else if(p===t.commentPropName){i+=a+`<!--${x[p][0][t.textNodeName]}-->`,u=!0;continue}else if(p[0]==="?"){const Y=rr(x[":@"],t),ae=p==="?xml"?"":a;let H=x[p][0][t.textNodeName];H=H.length!==0?" "+H:"",i+=ae+`<${p}${H}${Y}?>`,u=!0;continue}let S=a;S!==""&&(S+=t.indentBy);const v=rr(x[":@"],t),U=a+`<${p}${v}`,K=tr(x[p],t,m,S);t.unpairedTags.indexOf(p)!==-1?t.suppressUnpairedNode?i+=U+">":i+=U+"/>":(!K||K.length===0)&&t.suppressEmptyNode?i+=U+"/>":K&&K.endsWith(">")?i+=U+`>${K}${a}</${p}>`:(i+=U+">",K&&a!==""&&(K.includes("/>")||K.includes("</"))?i+=a+t.indentBy+K+a:i+=K,i+=`</${p}>`),u=!0}return i}function Ho(n){const t=Object.keys(n);for(let r=0;r<t.length;r++){const a=t[r];if(n.hasOwnProperty(a)&&a!==":@")return a}}function rr(n,t){let r="";if(n&&!t.ignoreAttributes)for(let a in n){if(!n.hasOwnProperty(a))continue;let i=t.attributeValueProcessor(a,n[a]);i=nr(i,t),i===!0&&t.suppressBooleanAttributes?r+=` ${a.substr(t.attributeNamePrefix.length)}`:r+=` ${a.substr(t.attributeNamePrefix.length)}="${i}"`}return r}function jo(n,t){n=n.substr(0,n.length-t.textNodeName.length-1);let r=n.substr(n.lastIndexOf(".")+1);for(let a in t.stopNodes)if(t.stopNodes[a]===n||t.stopNodes[a]==="*."+r)return!0;return!1}function nr(n,t){if(n&&n.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const a=t.entities[r];n=n.replace(a.regex,a.val)}return n}const Ko={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(n,t){return t},attributeValueProcessor:function(n,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function nt(n){this.options=Object.assign({},Ko,n),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=Jt(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Wo),this.processTextOrObjNode=Go,this.options.format?(this.indentate=Xo,this.tagEndChar=`>
18
18
  `,this.newLine=`
19
- `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}nt.prototype.build=function(n){return this.options.preserveOrder?Uo(n,this.options):(Array.isArray(n)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(n={[this.options.arrayNodeName]:n}),this.j2x(n,0,[]).val)},nt.prototype.j2x=function(n,t,r){let a="",i="";const u=r.join(".");for(let f in n)if(Object.prototype.hasOwnProperty.call(n,f))if(typeof n[f]>"u")this.isAttribute(f)&&(i+="");else if(n[f]===null)this.isAttribute(f)||f===this.options.cdataPropName?i+="":f[0]==="?"?i+=this.indentate(t)+"<"+f+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+f+"/"+this.tagEndChar;else if(n[f]instanceof Date)i+=this.buildTextValNode(n[f],f,"",t);else if(typeof n[f]!="object"){const x=this.isAttribute(f);if(x&&!this.ignoreAttributesFn(x,u))a+=this.buildAttrPairStr(x,""+n[f]);else if(!x)if(f===this.options.textNodeName){let p=this.options.tagValueProcessor(f,""+n[f]);i+=this.replaceEntitiesValue(p)}else i+=this.buildTextValNode(n[f],f,"",t)}else if(Array.isArray(n[f])){const x=n[f].length;let p="",m="";for(let _=0;_<x;_++){const D=n[f][_];if(!(typeof D>"u"))if(D===null)f[0]==="?"?i+=this.indentate(t)+"<"+f+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+f+"/"+this.tagEndChar;else if(typeof D=="object")if(this.options.oneListGroup){const U=this.j2x(D,t+1,r.concat(f));p+=U.val,this.options.attributesGroupName&&D.hasOwnProperty(this.options.attributesGroupName)&&(m+=U.attrStr)}else p+=this.processTextOrObjNode(D,f,t,r);else if(this.options.oneListGroup){let U=this.options.tagValueProcessor(f,D);U=this.replaceEntitiesValue(U),p+=U}else p+=this.buildTextValNode(D,f,"",t)}this.options.oneListGroup&&(p=this.buildObjectNode(p,f,m,t)),i+=p}else if(this.options.attributesGroupName&&f===this.options.attributesGroupName){const x=Object.keys(n[f]),p=x.length;for(let m=0;m<p;m++)a+=this.buildAttrPairStr(x[m],""+n[f][x[m]])}else i+=this.processTextOrObjNode(n[f],f,t,r);return{attrStr:a,val:i}},nt.prototype.buildAttrPairStr=function(n,t){return t=this.options.attributeValueProcessor(n,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&t==="true"?" "+n:" "+n+'="'+t+'"'};function Go(n,t,r,a){const i=this.j2x(n,r+1,a.concat(t));return n[this.options.textNodeName]!==void 0&&Object.keys(n).length===1?this.buildTextValNode(n[this.options.textNodeName],t,i.attrStr,r):this.buildObjectNode(i.val,t,i.attrStr,r)}nt.prototype.buildObjectNode=function(n,t,r,a){if(n==="")return t[0]==="?"?this.indentate(a)+"<"+t+r+"?"+this.tagEndChar:this.indentate(a)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let i="</"+t+this.tagEndChar,u="";return t[0]==="?"&&(u="?",i=""),(r||r==="")&&n.indexOf("<")===-1?this.indentate(a)+"<"+t+r+u+">"+n+i:this.options.commentPropName!==!1&&t===this.options.commentPropName&&u.length===0?this.indentate(a)+`<!--${n}-->`+this.newLine:this.indentate(a)+"<"+t+r+u+this.tagEndChar+n+this.indentate(a)+i}},nt.prototype.closeTag=function(n){let t="";return this.options.unpairedTags.indexOf(n)!==-1?this.options.suppressUnpairedNode||(t="/"):this.options.suppressEmptyNode?t="/":t=`></${n}`,t},nt.prototype.buildTextValNode=function(n,t,r,a){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName)return this.indentate(a)+`<![CDATA[${n}]]>`+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(a)+`<!--${n}-->`+this.newLine;if(t[0]==="?")return this.indentate(a)+"<"+t+r+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,n);return i=this.replaceEntitiesValue(i),i===""?this.indentate(a)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(a)+"<"+t+r+">"+i+"</"+t+this.tagEndChar}},nt.prototype.replaceEntitiesValue=function(n){if(n&&n.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];n=n.replace(r.regex,r.val)}return n};function Xo(n){return this.options.indentBy.repeat(n)}function zo(n){return n.startsWith(this.options.attributeNamePrefix)&&n!==this.options.textNodeName?n.substr(this.attrPrefixLen):!1}const Wo={validate:zt},Yo={ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:"#text",ignoreDeclaration:!1,commentPropName:"#comment",cdataPropName:"__cdata",preserveOrder:!0,parseAttributeValue:!1,trimValues:!1,parseTagValue:!1,processEntities:!1,htmlEntities:!1,ignoreNameSpace:!1,allowBooleanAttributes:!0,unpairedTags:[],stopNodes:[],alwaysCreateTextNode:!1},Qo={ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:"#text",format:!0,indentBy:" ",suppressEmptyNode:!1,suppressBooleanAttributes:!1,suppressUnpairedNode:!1},Zo=n=>{const t=/<!\[CDATA\[([\s\S]*?)\]\]>/g,r=[];let a;for(;(a=t.exec(n))!==null;)r.push({start:a.index,end:a.index+a[0].length});const i=_=>r.some(D=>_>=D.start&&_<D.end),u=/&([a-zA-Z0-9#]+);/g,f=["lt","gt","amp","quot","apos"];let x,p=1,m=0;for(;(x=u.exec(n))!==null;){const _=x[1],D=x.index;if(i(D))continue;const U=n.substring(m,D);if(p+=(U.match(/\n/g)||[]).length,m=D,_.startsWith("#")){const K=_.substring(1);if(K.startsWith("x")||K.startsWith("X")){const J=K.substring(1);if(!/^[0-9a-fA-F]+$/.test(J))return{valid:!1,error:`Line ${p}: Invalid hexadecimal character reference '&${_};'`}}else if(!/^[0-9]+$/.test(K))return{valid:!1,error:`Line ${p}: Invalid numeric character reference '&${_};'`};continue}if(!f.includes(_))return{valid:!1,error:`Line ${p}: Invalid entity reference '&${_};'. Valid predefined entities are: &lt; &gt; &amp; &quot; &apos;`}}return{valid:!0}},Jo=n=>{try{const t=Wo.validate(n,{allowBooleanAttributes:!0});if(t!==!0)return{valid:!1,error:`Line ${t.err.line}: ${t.err.msg}`};const r=Zo(n);return r.valid?{valid:!0}:r}catch(t){return{valid:!1,error:t instanceof Error?t.message:"Unknown validation error"}}},St=(n,t)=>{try{return new Mo({...Yo,...t}).parse(n)}catch(r){throw new Error(`XML 解析失败: ${r instanceof Error?r.message:"Unknown error"}`)}},Ot=(n,t)=>{try{let a=new nt({...Qo,format:t?.format??!0,indentBy:t?.indentBy??" "}).build(n);return t?.showDeclaration!==!1&&!a.startsWith("<?xml")&&(a=`<?xml version="1.0" encoding="UTF-8"?>
19
+ `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}nt.prototype.build=function(n){return this.options.preserveOrder?Uo(n,this.options):(Array.isArray(n)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(n={[this.options.arrayNodeName]:n}),this.j2x(n,0,[]).val)},nt.prototype.j2x=function(n,t,r){let a="",i="";const u=r.join(".");for(let f in n)if(Object.prototype.hasOwnProperty.call(n,f))if(typeof n[f]>"u")this.isAttribute(f)&&(i+="");else if(n[f]===null)this.isAttribute(f)||f===this.options.cdataPropName?i+="":f[0]==="?"?i+=this.indentate(t)+"<"+f+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+f+"/"+this.tagEndChar;else if(n[f]instanceof Date)i+=this.buildTextValNode(n[f],f,"",t);else if(typeof n[f]!="object"){const x=this.isAttribute(f);if(x&&!this.ignoreAttributesFn(x,u))a+=this.buildAttrPairStr(x,""+n[f]);else if(!x)if(f===this.options.textNodeName){let p=this.options.tagValueProcessor(f,""+n[f]);i+=this.replaceEntitiesValue(p)}else i+=this.buildTextValNode(n[f],f,"",t)}else if(Array.isArray(n[f])){const x=n[f].length;let p="",m="";for(let S=0;S<x;S++){const v=n[f][S];if(!(typeof v>"u"))if(v===null)f[0]==="?"?i+=this.indentate(t)+"<"+f+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+f+"/"+this.tagEndChar;else if(typeof v=="object")if(this.options.oneListGroup){const U=this.j2x(v,t+1,r.concat(f));p+=U.val,this.options.attributesGroupName&&v.hasOwnProperty(this.options.attributesGroupName)&&(m+=U.attrStr)}else p+=this.processTextOrObjNode(v,f,t,r);else if(this.options.oneListGroup){let U=this.options.tagValueProcessor(f,v);U=this.replaceEntitiesValue(U),p+=U}else p+=this.buildTextValNode(v,f,"",t)}this.options.oneListGroup&&(p=this.buildObjectNode(p,f,m,t)),i+=p}else if(this.options.attributesGroupName&&f===this.options.attributesGroupName){const x=Object.keys(n[f]),p=x.length;for(let m=0;m<p;m++)a+=this.buildAttrPairStr(x[m],""+n[f][x[m]])}else i+=this.processTextOrObjNode(n[f],f,t,r);return{attrStr:a,val:i}},nt.prototype.buildAttrPairStr=function(n,t){return t=this.options.attributeValueProcessor(n,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&t==="true"?" "+n:" "+n+'="'+t+'"'};function Go(n,t,r,a){const i=this.j2x(n,r+1,a.concat(t));return n[this.options.textNodeName]!==void 0&&Object.keys(n).length===1?this.buildTextValNode(n[this.options.textNodeName],t,i.attrStr,r):this.buildObjectNode(i.val,t,i.attrStr,r)}nt.prototype.buildObjectNode=function(n,t,r,a){if(n==="")return t[0]==="?"?this.indentate(a)+"<"+t+r+"?"+this.tagEndChar:this.indentate(a)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let i="</"+t+this.tagEndChar,u="";return t[0]==="?"&&(u="?",i=""),(r||r==="")&&n.indexOf("<")===-1?this.indentate(a)+"<"+t+r+u+">"+n+i:this.options.commentPropName!==!1&&t===this.options.commentPropName&&u.length===0?this.indentate(a)+`<!--${n}-->`+this.newLine:this.indentate(a)+"<"+t+r+u+this.tagEndChar+n+this.indentate(a)+i}},nt.prototype.closeTag=function(n){let t="";return this.options.unpairedTags.indexOf(n)!==-1?this.options.suppressUnpairedNode||(t="/"):this.options.suppressEmptyNode?t="/":t=`></${n}`,t},nt.prototype.buildTextValNode=function(n,t,r,a){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName)return this.indentate(a)+`<![CDATA[${n}]]>`+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(a)+`<!--${n}-->`+this.newLine;if(t[0]==="?")return this.indentate(a)+"<"+t+r+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,n);return i=this.replaceEntitiesValue(i),i===""?this.indentate(a)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(a)+"<"+t+r+">"+i+"</"+t+this.tagEndChar}},nt.prototype.replaceEntitiesValue=function(n){if(n&&n.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];n=n.replace(r.regex,r.val)}return n};function Xo(n){return this.options.indentBy.repeat(n)}function Wo(n){return n.startsWith(this.options.attributeNamePrefix)&&n!==this.options.textNodeName?n.substr(this.attrPrefixLen):!1}const zo={validate:Wt},Yo={ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:"#text",ignoreDeclaration:!1,commentPropName:"#comment",cdataPropName:"__cdata",preserveOrder:!0,parseAttributeValue:!1,trimValues:!1,parseTagValue:!1,processEntities:!1,htmlEntities:!1,ignoreNameSpace:!1,allowBooleanAttributes:!0,unpairedTags:[],stopNodes:[],alwaysCreateTextNode:!1},Qo={ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:"#text",format:!0,indentBy:" ",suppressEmptyNode:!1,suppressBooleanAttributes:!1,suppressUnpairedNode:!1},Zo=n=>{const t=/<!\[CDATA\[([\s\S]*?)\]\]>/g,r=[];let a;for(;(a=t.exec(n))!==null;)r.push({start:a.index,end:a.index+a[0].length});const i=S=>r.some(v=>S>=v.start&&S<v.end),u=/&([a-zA-Z0-9#]+);/g,f=["lt","gt","amp","quot","apos"];let x,p=1,m=0;for(;(x=u.exec(n))!==null;){const S=x[1],v=x.index;if(i(v))continue;const U=n.substring(m,v);if(p+=(U.match(/\n/g)||[]).length,m=v,S.startsWith("#")){const K=S.substring(1);if(K.startsWith("x")||K.startsWith("X")){const Y=K.substring(1);if(!/^[0-9a-fA-F]+$/.test(Y))return{valid:!1,error:`Line ${p}: Invalid hexadecimal character reference '&${S};'`}}else if(!/^[0-9]+$/.test(K))return{valid:!1,error:`Line ${p}: Invalid numeric character reference '&${S};'`};continue}if(!f.includes(S))return{valid:!1,error:`Line ${p}: Invalid entity reference '&${S};'. Valid predefined entities are: &lt; &gt; &amp; &quot; &apos;`}}return{valid:!0}},Jo=n=>{try{const t=zo.validate(n,{allowBooleanAttributes:!0});if(t!==!0)return{valid:!1,error:`Line ${t.err.line}: ${t.err.msg}`};const r=Zo(n);return r.valid?{valid:!0}:r}catch(t){return{valid:!1,error:t instanceof Error?t.message:"Unknown validation error"}}},St=(n,t)=>{try{return new Mo({...Yo,...t}).parse(n)}catch(r){throw new Error(`XML 解析失败: ${r instanceof Error?r.message:"Unknown error"}`)}},Ot=(n,t)=>{try{let a=new nt({...Qo,format:t?.format??!0,indentBy:t?.indentBy??" "}).build(n);return t?.showDeclaration!==!1&&!a.startsWith("<?xml")&&(a=`<?xml version="1.0" encoding="UTF-8"?>
20
20
  `+a),a}catch(r){throw new Error(`XML 构建失败: ${r instanceof Error?r.message:"Unknown error"}`)}},es=(n,t)=>Array.isArray(n)?et(n,{format:!1,originalXml:t}):Ot(n,{format:!1,showDeclaration:!1}),ts=(n,t)=>{const r=St(n);return Array.isArray(r)?et(r,{indent:t?.indentBy,originalXml:n}):Ot(r,t)},or=n=>{const t=new Set,r=/<([a-zA-Z0-9_-]+)(?:\s[^>]*)?\s*\/>/g;let a;for(;(a=r.exec(n))!==null;)t.add(a[1]);return t},et=(n,t={})=>{const r=t.indent!==void 0?t.indent:" ",a=t.level||0,i=t.format!==!1,u=i?r.repeat(a):"",f=i?`
21
- `:"";let x=t.selfClosingTags;!x&&t.originalXml&&a===0&&(x=or(t.originalXml));let p="";for(const m of n){if(m["?xml"]){const Q=m[":@"]||{},he=Object.entries(Q).map(([ye,Z])=>`${ye.startsWith("@_")?ye.substring(2):ye}="${Z}"`).join(" ");p+=`<?xml ${he}?>${f}`;continue}if(m["#comment"]){const Q=m["#comment"];if(Array.isArray(Q)&&Q.length>0){const he=Q[0]["#text"]||Q[0];p+=`${u}<!--${he}-->${f}`}continue}const _=Object.keys(m).find(Q=>!Q.startsWith(":")&&!Q.startsWith("#")&&!Q.startsWith("__"));if(!_)continue;const D=m[_],U=m[":@"]||{},K=Object.entries(U).map(([Q,he])=>`${Q.startsWith("@_")?Q.substring(2):Q}="${he}"`).join(" "),J=K?" "+K:"";if(!Array.isArray(D)||D.length===0){x&&x.has(_)?p+=`${u}<${_}${J}/>${f}`:p+=`${u}<${_}${J}></${_}>${f}`;continue}const ue=D.length===1&&D[0]["#text"]!==void 0,H=ue?D[0]["#text"]:"",de=D.some(Q=>Q.__cdata),oe=ue&&H==="";if(de){const Q=D.find(he=>he.__cdata);if(Q){const he=Q.__cdata[0]["#text"]||"";p+=`${u}<${_}${J}><![CDATA[${he}]]></${_}>${f}`}}else oe?p+=`${u}<${_}${J}></${_}>${f}`:ue?p+=`${u}<${_}${J}>${H}</${_}>${f}`:(p+=`${u}<${_}${J}>${f}`,p+=et(D,{indent:r,level:a+1,format:i,selfClosingTags:x}),p+=`${u}</${_}>${f}`)}return p},rs={key:0,class:"xml-format__toolbar"},ns={class:"xml-format__actions"},os=["disabled"],ss=["disabled"],is=["disabled"],as=["disabled"],us=["disabled"],ls={class:"xml-format__info"},cs={key:0,class:"xml-format__status xml-format__status--success"},fs={key:1,class:"xml-format__status xml-format__status--error"},ds={class:"xml-format__content"},ps={key:0,class:"xml-format__error"},hs={key:1,class:"xml-format__error"},ms={key:2,class:"xml-format__viewer"},gs=ft(o.defineComponent({__name:"index",props:{modelValue:{default:""},readonly:{type:Boolean,default:!1},maxDepth:{default:10},showToolbar:{type:Boolean,default:!0},theme:{default:"github-light"},showComments:{type:Boolean,default:!0},showCdata:{type:Boolean,default:!0},preserveWhitespace:{type:Boolean,default:!1}},emits:["update:modelValue","copy-success","copy-error","expand-all","collapse-all","compress","format"],setup(n,{expose:t,emit:r}){o.useCssVars(g=>({"123bc86d":J.value.colors.border,"6ddcbe22":J.value.colors.background,dd0094a4:J.value.colors.text,"094dda4c":J.value.colors.surfaceBackground,"0ab18d02":J.value.colors.buttonBorder,"854b8dfe":J.value.colors.buttonBackground,"2dd84340":J.value.colors.buttonText,"55fdce8a":J.value.colors.buttonBackgroundHover,"437af30f":J.value.colors.buttonPrimary,bfaf1126:J.value.colors.buttonPrimaryHover,"7c1f183c":J.value.colors.success,"6b8cb2b0":J.value.colors.successBackground,c4ad1cb2:J.value.colors.error,cc2a0396:J.value.colors.errorBackground}));const a=n,i=r,u=o.ref(null),f=o.ref(""),x=o.ref(new Set),p=o.ref(null),m=o.ref(""),_=o.ref(""),D=o.ref(new Set),U=o.computed(()=>f.value===""),K=o.computed(()=>m.value?null:p.value!==null?p.value:u.value),J=o.computed(()=>Qn(a.theme)),ue=o.computed(()=>{const g=K.value;return!g||!Array.isArray(g)?[]:g.map((T,q)=>({node:T,originalIndex:q})).filter(T=>!T.node["?xml"])}),H=o.computed(()=>{const g=K.value;if(!g||!Array.isArray(g))return null;const T=g.find(I=>I["?xml"]);if(!T||!T[":@"])return null;const q=T[":@"],j=[];return q["@_version"]&&j.push(`version="${q["@_version"]}"`),q["@_encoding"]&&j.push(`encoding="${q["@_encoding"]}"`),q["@_standalone"]&&j.push(`standalone="${q["@_standalone"]}"`),j.length>0?`<?xml ${j.join(" ")}?>`:null}),de=o.computed(()=>ue.value),oe=g=>{if(!g||!g.trim()){f.value="",u.value=null,_.value="",p.value=null,m.value="";return}try{const T=Jo(g);if(!T.valid){f.value=T.error||"Invalid XML",u.value=null,_.value="",D.value=new Set;return}_.value=g,D.value=or(g),u.value=St(g),f.value="",p.value=null,m.value="",o.nextTick(()=>{he()})}catch(T){f.value=T instanceof Error?T.message:"Unknown parse error",u.value=null,_.value="",p.value=null,m.value=""}},Q=g=>{x.value.has(g)?x.value.delete(g):x.value.add(g)},he=()=>{const g=new Set,T=(q,j="")=>{Array.isArray(q)&&q.forEach((I,re)=>{const C=Object.keys(I).find(X=>!X.startsWith(":")&&!X.startsWith("#"));if(!C)return;const B=j?`${j}.${C}[${re}]`:`${C}[${re}]`;g.add(B);const L=I[C];Array.isArray(L)&&T(L,B+"."+C)})};ue.value.forEach(({node:q,originalIndex:j})=>{const I=Object.keys(q).find(re=>!re.startsWith(":")&&!re.startsWith("#"));if(I){const re=`${I}[${j}]`;g.add(re);const C=q[I];Array.isArray(C)&&T(C,re+"."+I)}}),x.value=g,i("expand-all")},ye=()=>{x.value.clear(),i("collapse-all")},Z=async()=>{if(U.value)try{const g=K.value||u.value;if(!g)return;const T=Array.isArray(g)?et(g,{indent:" ",selfClosingTags:D.value}):Ot(g,{format:!0,indentBy:" "});await navigator.clipboard.writeText(T),i("copy-success",T)}catch(g){const T=g instanceof Error?g:new Error("Copy failed");i("copy-error",T),console.error("Failed to copy XML:",g)}},N=()=>{if(!(!U.value||!u.value))try{const g=es(u.value,a.modelValue);i("update:modelValue",g),i("compress",g)}catch(g){console.error("Failed to compress XML:",g)}},$=()=>{if(U.value)try{const g=ts(a.modelValue,{format:!0,indentBy:" "});i("update:modelValue",g),i("format",g)}catch(g){console.error("Failed to format XML:",g)}},v=g=>{if(!g||!g.expression.trim()){E();return}if(!u.value||!_.value){m.value="No valid XML data to filter";return}try{const q=new jt.DOMParser().parseFromString(_.value,"text/xml"),j=on.select(g.expression,q);if(!j||Array.isArray(j)&&j.length===0){p.value=[],m.value="";return}const I=new jt.XMLSerializer;let re="";Array.isArray(j)?(re=`<result>
22
- `,j.forEach(C=>{C.nodeType===1?re+=" "+I.serializeToString(C)+`
23
- `:C.nodeType===2?re+=` <attribute name="${C.name}" value="${C.value}"/>
24
- `:C.nodeType===3&&(re+=` <text>${C.nodeValue}</text>
25
- `)}),re+="</result>"):re=I.serializeToString(j),p.value=St(re),m.value="",o.nextTick(()=>{he()})}catch(T){m.value=T instanceof Error?T.message:"Filter execution error",p.value=null}},E=()=>{p.value=null,m.value="",o.nextTick(()=>{he()})},P=async g=>{try{const T=typeof g=="string"?g:JSON.stringify(g,null,2);await navigator.clipboard.writeText(T),i("copy-success",T)}catch(T){const q=T instanceof Error?T:new Error("Copy failed");i("copy-error",q),console.error("Failed to copy value:",T)}},O=(g,T,q)=>{if(!(!u.value||!Array.isArray(u.value)))try{const j=g.split(/\./).filter(Boolean);let I=u.value;for(let C=0;C<j.length;C++){const B=j[C],L=B.match(/^(.+?)\[(\d+)\]$/);if(L){const X=L[1],z=parseInt(L[2]);if(C===j.length-1){if(Array.isArray(I)&&I[z]){const F=I[z];if(F[T]){const Y=F[T];delete F[T],F[q]=Y,D.value.has(T)&&(D.value.delete(T),D.value.add(q))}}}else Array.isArray(I)&&I[z]&&(I=I[z])}else I[B]&&(I=I[B])}const re=et(u.value,{indent:" ",selfClosingTags:D.value});i("update:modelValue",re)}catch(j){console.error("Failed to update tag name:",j)}},S=(g,T,q)=>{if(!(!u.value||!Array.isArray(u.value)))try{const j=g.split(/\./).filter(Boolean);let I=u.value;for(let C=0;C<j.length;C++){const B=j[C],L=B.match(/^(.+?)\[(\d+)\]$/);if(L){const X=L[1],z=parseInt(L[2]);if(C===j.length-1){if(Array.isArray(I)&&I[z]){const Y=I[z][":@"];if(Y&&Y[`@_${T}`]!==void 0){const ge=Y[`@_${T}`];delete Y[`@_${T}`],Y[`@_${q}`]=ge}}}else Array.isArray(I)&&I[z]&&(I=I[z])}else I[B]&&(I=I[B])}const re=et(u.value,{indent:" ",selfClosingTags:D.value});i("update:modelValue",re)}catch(j){console.error("Failed to update attribute name:",j)}},G=(g,T,q)=>{if(!(!u.value||!Array.isArray(u.value)))try{const j=g.split(/\./).filter(Boolean);let I=u.value;for(let C=0;C<j.length;C++){const B=j[C],L=B.match(/^(.+?)\[(\d+)\]$/);if(L){const X=L[1],z=parseInt(L[2]);if(C===j.length-1){if(Array.isArray(I)&&I[z]){const Y=I[z][":@"];Y&&Y[`@_${T}`]!==void 0&&(Y[`@_${T}`]=q)}}else Array.isArray(I)&&I[z]&&(I=I[z])}else I[B]&&(I=I[B])}const re=et(u.value,{indent:" ",selfClosingTags:D.value});i("update:modelValue",re)}catch(j){console.error("Failed to update attribute value:",j)}},ee=(g,T)=>{if(!(!u.value||!Array.isArray(u.value)))try{const q=g.split(/\./).filter(Boolean);let j=u.value,I="";for(let C=0;C<q.length;C++){const B=q[C],L=B.match(/^(.+?)\[(\d+)\]$/);if(L){const X=L[1],z=parseInt(L[2]);if(C===q.length-1){if(Array.isArray(j)&&j[z]){const F=j[z];if(I=Object.keys(F).find(Y=>!Y.startsWith(":")&&!Y.startsWith("#"))||"",I&&Array.isArray(F[I])){const Y=F[I],ge=Y.findIndex(Ee=>Ee["#text"]!==void 0);ge!==-1?Y[ge]["#text"]=T:Y.push({"#text":T})}}}else Array.isArray(j)&&j[z]&&(j=j[z])}else j[B]&&(j=j[B])}const re=et(u.value,{indent:" ",selfClosingTags:D.value});i("update:modelValue",re)}catch(q){console.error("Failed to update text content:",q)}},te=(g,T)=>{if(!(!u.value||!Array.isArray(u.value)))try{const q=g.split(/\./).filter(Boolean);let j=u.value;for(let re=0;re<q.length;re++){const C=q[re],B=C.match(/^(.+?)\[(\d+)\]$/);if(B){const L=B[1],X=parseInt(B[2]);if(re===q.length-1){if(Array.isArray(j)&&j[X]){const z=j[X],F=Object.keys(z).find(Y=>!Y.startsWith(":")&&!Y.startsWith("#"));if(F&&Array.isArray(z[F])){const Y=z[F],ge=Y.findIndex(Ee=>Ee.__cdata!==void 0);if(ge!==-1){const Ee=Y[ge];Array.isArray(Ee.__cdata)&&Ee.__cdata[0]&&(Ee.__cdata[0]["#text"]=T)}else Y.push({__cdata:[{"#text":T}]})}}}else Array.isArray(j)&&j[X]&&(j=j[X])}else j[C]&&(j=j[C])}const I=et(u.value,{indent:" ",selfClosingTags:D.value});i("update:modelValue",I)}catch(q){console.error("Failed to update CDATA content:",q)}};return o.watch(()=>a.modelValue,g=>{oe(g)},{immediate:!0}),t({copyXml:Z,compressSource:N,formatSource:$,expandAll:he,collapseAll:ye,toggleExpand:Q,filter:v,clearFilter:E,isValidXml:()=>U.value,getParsedXml:()=>u.value,getFilteredXml:()=>p.value,getExpandedNodes:()=>x.value,getParseError:()=>f.value,getFilterError:()=>m.value,parseXmlString:g=>oe(g),copyValue:g=>P(g)}),(g,T)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["xml-format",`xml-format--${J.value.name}`])},[g.showToolbar?(o.openBlock(),o.createElementBlock("div",rs,[o.createElementVNode("div",ns,[o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--primary",onClick:Z,disabled:!U.value,title:"Copy XML"}," 📋 Copy ",8,os),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:he,disabled:!U.value,title:"Expand All"}," ⬇️ Expand All ",8,ss),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:ye,disabled:!U.value,title:"Collapse All"}," ➡️ Collapse All ",8,is),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:N,disabled:!U.value,title:"Compress XML"}," 📦 Compress ",8,as),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:$,disabled:!U.value,title:"Format XML"}," ✨ Format ",8,us)]),o.createElementVNode("div",ls,[U.value?(o.openBlock(),o.createElementBlock("span",cs," ✅ Valid XML ")):(o.openBlock(),o.createElementBlock("span",fs," ❌ Invalid XML "))])])):o.createCommentVNode("",!0),o.createElementVNode("div",ds,[U.value?m.value?(o.openBlock(),o.createElementBlock("div",hs,[T[1]||(T[1]=o.createElementVNode("h4",null,"Filter Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(m.value),1)])):(o.openBlock(),o.createElementBlock("div",ms,[H.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"xml-declaration",style:o.normalizeStyle({color:J.value.colors.xmlDeclaration})},o.toDisplayString(H.value),5)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(de.value,(q,j)=>(o.openBlock(),o.createBlock(Yn,{key:j,node:q.node,index:q.originalIndex,level:0,expanded:x.value,theme:J.value,selfClosingTags:D.value,onToggleExpand:Q,onCopy:P,"onUpdate:tagName":O,"onUpdate:attributeName":S,"onUpdate:attributeValue":G,"onUpdate:textContent":ee,"onUpdate:cdataContent":te},null,8,["node","index","expanded","theme","selfClosingTags"]))),128))])):(o.openBlock(),o.createElementBlock("div",ps,[T[0]||(T[0]=o.createElementVNode("h4",null,"XML Parse Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(f.value),1)]))])],2))}}),[["__scopeId","data-v-adf2b2e1"]]),sr={"github-light":{name:"github-light",colors:{background:"#ffffff",surfaceBackground:"#f6f8fa",hoverBackground:"#f3f4f6",border:"#d0d7de",text:"#24292f",textSecondary:"#57606a",buttonBackground:"#f6f8fa",buttonBackgroundHover:"#f3f4f6",buttonBorder:"#d0d7de",buttonText:"#24292f",buttonPrimary:"#1f883d",buttonPrimaryHover:"#1a7f37",success:"#1f883d",successBackground:"#dafbe1",error:"#cf222e",errorBackground:"#ffebe9",sqlKeyword:"#cf222e",sqlFunction:"#8250df",sqlString:"#0a3069",sqlNumber:"#0550ae",sqlComment:"#6e7781",sqlOperator:"#cf222e",sqlIdentifier:"#24292f",sqlPunctuation:"#24292f",collapsedBackground:"#ddf4ff",collapsedText:"#0969da",indentLine:"#d0d7de"}},"github-dark":{name:"github-dark",colors:{background:"#0d1117",surfaceBackground:"#161b22",hoverBackground:"#30363d",border:"#30363d",text:"#c9d1d9",textSecondary:"#8b949e",buttonBackground:"#21262d",buttonBackgroundHover:"#30363d",buttonBorder:"#30363d",buttonText:"#c9d1d9",buttonPrimary:"#238636",buttonPrimaryHover:"#2ea043",success:"#3fb950",successBackground:"#0f2e1c",error:"#f85149",errorBackground:"#3d1319",sqlKeyword:"#ff7b72",sqlFunction:"#d2a8ff",sqlString:"#a5d6ff",sqlNumber:"#79c0ff",sqlComment:"#8b949e",sqlOperator:"#ff7b72",sqlIdentifier:"#c9d1d9",sqlPunctuation:"#c9d1d9",collapsedBackground:"#1c2d41",collapsedText:"#58a6ff",indentLine:"#30363d"}},"min-light":{name:"min-light",colors:{background:"#ffffff",surfaceBackground:"#fafafa",hoverBackground:"#f5f5f5",border:"#e5e5e5",text:"#171717",textSecondary:"#737373",buttonBackground:"#fafafa",buttonBackgroundHover:"#f5f5f5",buttonBorder:"#e5e5e5",buttonText:"#171717",buttonPrimary:"#22c55e",buttonPrimaryHover:"#16a34a",success:"#22c55e",successBackground:"#dcfce7",error:"#ef4444",errorBackground:"#fee2e2",sqlKeyword:"#dc2626",sqlFunction:"#9333ea",sqlString:"#1e40af",sqlNumber:"#2563eb",sqlComment:"#737373",sqlOperator:"#dc2626",sqlIdentifier:"#171717",sqlPunctuation:"#171717",collapsedBackground:"#dbeafe",collapsedText:"#1d4ed8",indentLine:"#e0e0e0"}},"slack-ochin":{name:"slack-ochin",colors:{background:"#fef5ed",surfaceBackground:"#fef9f3",hoverBackground:"#f9f0e5",border:"#e9dcc9",text:"#3d3c40",textSecondary:"#616061",buttonBackground:"#fef9f3",buttonBackgroundHover:"#f9f0e5",buttonBorder:"#e9dcc9",buttonText:"#3d3c40",buttonPrimary:"#007a5a",buttonPrimaryHover:"#006644",success:"#007a5a",successBackground:"#d1f4e0",error:"#e01e5a",errorBackground:"#ffdbea",sqlKeyword:"#e01e5a",sqlFunction:"#8b2eff",sqlString:"#0b4c8c",sqlNumber:"#1264a3",sqlComment:"#616061",sqlOperator:"#e01e5a",sqlIdentifier:"#3d3c40",sqlPunctuation:"#3d3c40",collapsedBackground:"#d8eaf5",collapsedText:"#0b4c8c",indentLine:"#3e4348"}}},Es=n=>sr[n]||sr["github-light"],Nt=["SELECT","FROM","WHERE","JOIN","INNER","LEFT","RIGHT","FULL","OUTER","ON","GROUP","BY","HAVING","ORDER","LIMIT","OFFSET","INSERT","INTO","VALUES","UPDATE","SET","DELETE","CREATE","ALTER","DROP","TABLE","DATABASE","INDEX","VIEW","AND","OR","NOT","IN","BETWEEN","LIKE","IS","NULL","AS","DISTINCT","UNION","ALL","EXISTS","CASE","WHEN","THEN","ELSE","END"],ys=["WITH","SELECT","FROM","WHERE","GROUP BY","HAVING","ORDER BY","LIMIT","INSERT","UPDATE","DELETE","CREATE","ALTER","DROP","JOIN","INNER JOIN","LEFT JOIN","RIGHT JOIN","FULL JOIN","OUTER JOIN"],bs=n=>{try{if(!n||!n.trim())return{valid:!1,error:"SQL string is empty"};const t=n.toUpperCase();if(!Nt.some(x=>new RegExp(`\\b${x}\\b`).test(t)))return{valid:!1,error:"No valid SQL keywords found"};let a=0;for(const x of n)if(x==="("&&a++,x===")"&&a--,a<0)return{valid:!1,error:"Mismatched parentheses"};if(a!==0)return{valid:!1,error:"Mismatched parentheses"};let i=0,u=0,f=!1;for(let x=0;x<n.length;x++){const p=n[x];if(f){f=!1;continue}if(p==="\\"){f=!0;continue}p==="'"&&i++,p==='"'&&u++}return i%2!==0?{valid:!1,error:"Mismatched single quotes"}:u%2!==0?{valid:!1,error:"Mismatched double quotes"}:{valid:!0}}catch(t){return{valid:!1,error:t instanceof Error?t.message:"Unknown validation error"}}},kt=(n,t)=>{try{const r=t?.tabWidth||2,a=t?.keywordCase||"upper",i=" ".repeat(r);let u=n.trim();const f=[],x=/CREATE\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?(\w+)\s*\(/gi;let p,m=u,_=0;for(;(p=x.exec(u))!==null;){const $=p[1],v=/IF\s+NOT\s+EXISTS/i.test(p[0]),E=p.index,P=p.index+p[0].length;let O=1,S=P;for(;S<u.length&&O>0;)u[S]==="("?O++:u[S]===")"&&O--,S++;if(O!==0)continue;const G=S-1,ee=u.substring(P,G),g=u.substring(G+1).match(/^([^;]*);/);if(!g)continue;const T=g[1],q=G+1+g[0].length,j=a==="upper"?"CREATE TABLE":"create table",I=v?a==="upper"?" IF NOT EXISTS":" if not exists":"",re=[];let C="",B=0;for(let F=0;F<ee.length;F++){const Y=ee[F];Y==="("?(B++,C+=Y):Y===")"?(B--,C+=Y):Y===","&&B===0?(C.trim()&&re.push(C.trim()),C=""):C+=Y}C.trim()&&re.push(C.trim());let L=`${j}${I} ${$} (`;re.forEach((F,Y)=>{L+=`
26
- ${i}${F}`,Y<re.length-1&&(L+=",")}),L+=`
27
- ) ${T.trim()};`;const X=`__CREATE_TABLE_${f.length}__`;f.push({placeholder:X,content:L});const z=u.substring(E,q);m=m.replace(z,X)}u=m;const D=[];u=u.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,$=>(D.push({type:"string",value:$}),`__PROTECTED_${D.length-1}__`)),u=u.replace(/--[^\n]*/g,$=>(D.push({type:"comment",value:$}),`__PROTECTED_${D.length-1}__`)),u=u.replace(/\/\*[\s\S]*?\*\//g,$=>(D.push({type:"comment",value:$}),`__PROTECTED_${D.length-1}__`)),u=u.replace(/,(?!\s)/g,", ").replace(/\s*\bAS\b\s*/gi," AS ").replace(/\s*\bOVER\b\s*/gi," OVER ").replace(/\s*\b(DESC|ASC)\b\s*/gi," $1 ").replace(/\s*([<>=!]+)\s*/g," $1 ").replace(/\s*\bON\b\s*/gi," ON ").replace(/\)([A-Z])/gi,") $1").replace(/[ \t]+/g," ").replace(/ +$/gm,"").replace(/^ +/gm,""),a==="upper"?Nt.forEach($=>{const v=new RegExp(`\\b${$}\\b`,"gi");u=u.replace(v,$.toUpperCase())}):a==="lower"&&Nt.forEach($=>{const v=new RegExp(`\\b${$}\\b`,"gi");u=u.replace(v,$.toLowerCase())});const U=["WITH","SELECT","FROM","WHERE","GROUP BY","HAVING","ORDER BY","LIMIT","OFFSET","INNER JOIN","LEFT JOIN","RIGHT JOIN","FULL JOIN","CROSS JOIN","OUTER JOIN","JOIN","UNION","UNION ALL","INTERSECT","EXCEPT","INSERT INTO","UPDATE","DELETE FROM","CREATE","ALTER","DROP"];U.sort(($,v)=>v.length-$.length),u=u.replace(/\b(WITH)\s+(\w+)\s+(AS)\s*\(/gi,($,v,E,P)=>`${a==="upper"?"WITH":"with"}
28
- ${i}${E} ${a==="upper"?"AS":"as"} (`);const K=$=>{const v=$.split(`
29
- `),E=[];let P=!1,O=0,S=0;for(let G=0;G<v.length;G++){const ee=v[G],te=ee.trim();if(/^\s*\w+\s+AS\s*\(/.test(ee)){P=!0,O=1,S=1,E.push(i+ee.trim());continue}if(P){let g=!1,T="";for(const q of te)(q==='"'||q==="'")&&!g?(g=!0,T=q):q===T&&g?g=!1:g||(q==="("?S++:q===")"&&S--);S===0?(P=!1,E.push(i+")")):te?E.push(i+ee):E.push("")}else E.push(ee)}return E.join(`
30
- `)},J=[];U.forEach(($,v)=>{if($.includes(" ")){const E=a==="upper"?$:$.toLowerCase(),P=new RegExp(`\\b${$}\\b`,"gi"),O=`__KEYWORD_${v}__`;u=u.replace(P,O),J.push({placeholder:O,original:E})}}),U.forEach($=>{if(!$.includes(" ")&&$!=="WITH"){const v=a==="upper"?$:$.toLowerCase(),E=new RegExp(`\\b${$}\\b`,"gi");u=u.replace(E,`
31
- ${v}`)}}),J.forEach(({placeholder:$,original:v})=>{u=u.replace(new RegExp($,"g"),`
32
- ${v}`)}),u=($=>{let v=$;const E=/\b(\w+)\s+OVER\s*\(/gi;let P;for(;(P=E.exec(v))!==null;){const O=P[1],S=P.index+P[0].length;let G=1,ee=S;for(;G>0&&ee<v.length;)v[ee]==="("?G++:v[ee]===")"&&G--,ee++;if(G===0){const te=v.substring(S,ee-1).trim(),g=a==="upper"?"OVER":"over",T=/\bORDER\s+BY\b/i.test(te),q=/\bPARTITION\s+BY\b/i.test(te);if(T||q){let j=te;if(T){const re=a==="upper"?"ORDER BY":"order by";j=j.replace(/\bORDER\s+BY\s+(.+)/gi,(C,B)=>`
33
- ${i}${re}
34
- ${i}${i}${B.trim()}`)}if(q){const re=a==="upper"?"PARTITION BY":"partition by";j=j.replace(/\bPARTITION\s+BY\s+(.+)/gi,(C,B)=>`
35
- ${i}${re}
36
- ${i}${i}${B.trim()}`)}const I=`${O} ${g} (${j}
37
- ${i})`;v=v.substring(0,P.index)+I+v.substring(ee),E.lastIndex=P.index+I.length}}}return v})(u),u=u.replace(/\b((?:INNER\s+|LEFT\s+|RIGHT\s+|FULL\s+|CROSS\s+|OUTER\s+)?JOIN\s+[^\n]+?)\s+ON\s+(.+?)(?=\n|$)/gi,($,v,E)=>`${v} ${a==="upper"?"ON":"on"} ${E.trim()}`),u=u.replace(/\b(WHERE)\s+([^\n]+?)(?=\s+AND\b|\s+OR\b|\n|$)/gis,($,v,E)=>{const P=a==="upper"?"WHERE":"where",O=E.trim();return`${P}
38
- ${i}${O}`}),u=u.replace(/\b(HAVING)\s+(?!\n)(.+?)(?=\n|$)/gis,($,v,E)=>`${a==="upper"?"HAVING":"having"}
39
- ${i}${E.trim()}`),u=u.replace(/\b(ORDER BY)\s+(?!\n)([^,\n]+?)(?=\n|$|;)/gis,($,v,E)=>{const P=a==="upper"?"ORDER BY":"order by";return E.includes(",")?$:`${P}
40
- ${i}${E.trim()}`}),u=u.replace(/\b(INSERT\s+INTO)\s+(\w+)\s*\(([^)]+)\)\s*(VALUES)\s*(.+?)(?=;|$)/gis,($,v,E,P,O,S)=>{const G=a==="upper"?"INSERT INTO":"insert into",ee=a==="upper"?"VALUES":"values",te=P.split(",").map(C=>C.trim()).join(", ");let g=`${G}
41
- ${i}${E} (${te})
42
- ${ee}`;const T=[];let q=0,j="",I=!1,re="";for(let C=0;C<S.length;C++){const B=S[C],L=C>0?S[C-1]:"";(B==='"'||B==="'")&&L!=="\\"&&(I?B===re&&(I=!1):(I=!0,re=B)),I?j+=B:B==="("?(q===0?j="":j+=B,q++):B===")"?(q--,q===0?T.push(j.trim()):j+=B):q>0&&(j+=B)}return T.forEach((C,B)=>{const L=C.split(/,\s*(?=(?:[^']*'[^']*')*[^']*$)/).map(X=>X.trim());g+=`
43
- `+i+"(",L.forEach((X,z)=>{g+=`
44
- `+i+i+X,z<L.length-1&&(g+=",")}),g+=`
45
- `+i+")",B<T.length-1&&(g+=",")}),g}),u=u.replace(/\b(UPDATE\s+)(\w+)\s+(SET)\s+([^\n]+?)(?=\n(?:WHERE)|$|;)/gis,($,v,E,P,O)=>{const S=a==="upper"?"UPDATE":"update",G=a==="upper"?"SET":"set",ee=O.split(/,\s*(?![^()]*\))/).map(g=>g.trim());let te=`${S} ${E}
46
- ${G}`;return ee.forEach((g,T)=>{te+=`
47
- ${i}${g}`,T<ee.length-1&&(te+=",")}),te}),["AND","OR"].forEach($=>{const v=a==="upper"?$:$.toLowerCase(),E=new RegExp(`\\s*\\b${$}\\b`,"gi");u=u.replace(E,`
48
- ${i}${v}`)});const de=u.split(`
49
- `),oe=[],Q=$=>{const v=[];let E="",P=0;for(let O=0;O<$.length;O++){const S=$[O];S==="("?(P++,E+=S):S===")"?(P--,E+=S):S===","&&P===0?(v.push(E.trim()),E=""):E+=S}return E.trim()&&v.push(E.trim()),v},he=$=>{if(!/\bCASE\b/i.test($))return[$];const v=[],E=[];let P=$.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,te=>{const g=E.length;return E.push(te),`__STRING_${g}__`});const O=/\b(CASE)\b([\s\S]*?)\b(END)\b/gi;let S=0,G;for(;(G=O.exec(P))!==null;){if(G.index>S){const T=P.substring(S,G.index).trim();T&&v.push(T)}v.push("CASE");const g=G[2].split(/\b(WHEN|ELSE)\b/gi);for(let T=0;T<g.length;T++){const q=g[T].trim();if(q){if(/^WHEN$/i.test(q)){const j=g[++T]?.trim()||"",I=j.match(/^(.*?)\s+THEN\s+(.*)$/i);if(I){const re=a==="upper"?"WHEN":"when",C=a==="upper"?"THEN":"then";v.push(i+re+" "+I[1].trim()+" "+C+" "+I[2].trim())}else{const re=a==="upper"?"WHEN":"when";v.push(i+re+" "+j)}}else if(/^ELSE$/i.test(q)){const j=g[++T]?.trim()||"",I=a==="upper"?"ELSE":"else";v.push(i+I+" "+j)}}}v.push("END"),S=O.lastIndex}if(S<P.length){const te=P.substring(S).trim();te&&(v[v.length-1]+=" "+te)}return v.map(te=>te.replace(/__STRING_(\d+)__/g,(g,T)=>E[parseInt(T)]))};for(let $=0;$<de.length;$++){const v=de[$],E=v.trim();if(v!==E&&E.length>0&&!/^(SELECT|FROM|GROUP BY|ORDER BY)\b/i.test(E)){oe.push(v);continue}if(/^SELECT\b/i.test(E)){const O=E.match(/^(SELECT\s+(?:DISTINCT\s+)?)(.*)/i);if(O){const S=O[1].trim(),G=O[2],ee=Q(G);oe.push(S),ee.forEach((te,g)=>{const T=g===ee.length-1;if(/\bCASE\b/i.test(te)){const q=he(te);q.forEach((j,I)=>{I===0?oe.push(i+j):I===q.length-1?oe.push(i+j+(T?"":",")):oe.push(i+j)})}else T?oe.push(i+te):oe.push(i+te+",")})}else oe.push(E)}else if(/^FROM\b/i.test(E)){const O=E.match(/^(FROM\s+)(.*)/i);if(O){const S=O[1].trim(),G=O[2].trim();oe.push(S),oe.push(i+G)}else oe.push(E)}else if(/^(INNER\s+JOIN|LEFT\s+JOIN|RIGHT\s+JOIN|FULL\s+JOIN|CROSS\s+JOIN|OUTER\s+JOIN|JOIN)\b/i.test(E))oe.push(i+E);else if(/^GROUP BY\b/i.test(E)){const O=E.match(/^(GROUP BY\s+)(.*)/i);if(O){const S=O[1].trim(),G=O[2],ee=Q(G);ee.length>1?(oe.push(S),ee.forEach((te,g)=>{g===ee.length-1?oe.push(i+te):oe.push(i+te+",")})):oe.push(v)}else oe.push(v)}else if(/^ORDER BY\b/i.test(E)){const O=E.match(/^(ORDER BY\s+)(.*)/i);if(O){const S=O[1].trim(),G=O[2],ee=Q(G);ee.length>1?(oe.push(S),ee.forEach((te,g)=>{g===ee.length-1?oe.push(i+te):oe.push(i+te+",")})):oe.push(E)}else oe.push(E)}else oe.push(E)}u=oe.join(`
21
+ `:"";let x=t.selfClosingTags;!x&&t.originalXml&&a===0&&(x=or(t.originalXml));let p="";for(const m of n){if(m["?xml"]){const z=m[":@"]||{},me=Object.entries(z).map(([be,J])=>`${be.startsWith("@_")?be.substring(2):be}="${J}"`).join(" ");p+=`<?xml ${me}?>${f}`;continue}if(m["#comment"]){const z=m["#comment"];if(Array.isArray(z)&&z.length>0){const me=z[0]["#text"]||z[0];p+=`${u}<!--${me}-->${f}`}continue}const S=Object.keys(m).find(z=>!z.startsWith(":")&&!z.startsWith("#")&&!z.startsWith("__"));if(!S)continue;const v=m[S],U=m[":@"]||{},K=Object.entries(U).map(([z,me])=>`${z.startsWith("@_")?z.substring(2):z}="${me}"`).join(" "),Y=K?" "+K:"";if(!Array.isArray(v)||v.length===0){x&&x.has(S)?p+=`${u}<${S}${Y}/>${f}`:p+=`${u}<${S}${Y}></${S}>${f}`;continue}const ae=v.length===1&&v[0]["#text"]!==void 0,H=ae?v[0]["#text"]:"",de=v.some(z=>z.__cdata),re=ae&&H==="";if(de){const z=v.find(me=>me.__cdata);if(z){const me=z.__cdata[0]["#text"]||"";p+=`${u}<${S}${Y}><![CDATA[${me}]]></${S}>${f}`}}else re?p+=`${u}<${S}${Y}></${S}>${f}`:ae?p+=`${u}<${S}${Y}>${H}</${S}>${f}`:(p+=`${u}<${S}${Y}>${f}`,p+=et(v,{indent:r,level:a+1,format:i,selfClosingTags:x}),p+=`${u}</${S}>${f}`)}return p},rs={key:0,class:"xml-format__toolbar"},ns={class:"xml-format__actions"},os=["disabled"],ss=["disabled"],is=["disabled"],as=["disabled"],us=["disabled"],ls={class:"xml-format__info"},cs={key:0,class:"xml-format__status xml-format__status--success"},fs={key:1,class:"xml-format__status xml-format__status--error"},ds={class:"xml-format__content"},ps={key:0,class:"xml-format__error"},hs={key:1,class:"xml-format__error"},ms={key:2,class:"xml-format__viewer"},gs=ft(o.defineComponent({__name:"index",props:{modelValue:{default:""},readonly:{type:Boolean,default:!1},maxDepth:{default:10},showToolbar:{type:Boolean,default:!0},theme:{default:"github-light"},showComments:{type:Boolean,default:!0},showCdata:{type:Boolean,default:!0},preserveWhitespace:{type:Boolean,default:!1}},emits:["update:modelValue","copy-success","copy-error","expand-all","collapse-all","compress","format"],setup(n,{expose:t,emit:r}){o.useCssVars(g=>({"123bc86d":Y.value.colors.border,"6ddcbe22":Y.value.colors.background,dd0094a4:Y.value.colors.text,"094dda4c":Y.value.colors.surfaceBackground,"0ab18d02":Y.value.colors.buttonBorder,"854b8dfe":Y.value.colors.buttonBackground,"2dd84340":Y.value.colors.buttonText,"55fdce8a":Y.value.colors.buttonBackgroundHover,"437af30f":Y.value.colors.buttonPrimary,bfaf1126:Y.value.colors.buttonPrimaryHover,"7c1f183c":Y.value.colors.success,"6b8cb2b0":Y.value.colors.successBackground,c4ad1cb2:Y.value.colors.error,cc2a0396:Y.value.colors.errorBackground}));const a=n,i=r,u=o.ref(null),f=o.ref(""),x=o.ref(new Set),p=o.ref(null),m=o.ref(""),S=o.ref(""),v=o.ref(new Set),U=o.computed(()=>f.value===""),K=o.computed(()=>m.value?null:p.value!==null?p.value:u.value),Y=o.computed(()=>Qn(a.theme)),ae=o.computed(()=>{const g=K.value;return!g||!Array.isArray(g)?[]:g.map((C,V)=>({node:C,originalIndex:V})).filter(C=>!C.node["?xml"])}),H=o.computed(()=>{const g=K.value;if(!g||!Array.isArray(g))return null;const C=g.find(R=>R["?xml"]);if(!C||!C[":@"])return null;const V=C[":@"],j=[];return V["@_version"]&&j.push(`version="${V["@_version"]}"`),V["@_encoding"]&&j.push(`encoding="${V["@_encoding"]}"`),V["@_standalone"]&&j.push(`standalone="${V["@_standalone"]}"`),j.length>0?`<?xml ${j.join(" ")}?>`:null}),de=o.computed(()=>ae.value),re=g=>{if(!g||!g.trim()){f.value="",u.value=null,S.value="",p.value=null,m.value="";return}try{const C=Jo(g);if(!C.valid){f.value=C.error||"Invalid XML",u.value=null,S.value="",v.value=new Set;return}S.value=g,v.value=or(g),u.value=St(g),f.value="",p.value=null,m.value="",o.nextTick(()=>{me()})}catch(C){f.value=C instanceof Error?C.message:"Unknown parse error",u.value=null,S.value="",p.value=null,m.value=""}},z=g=>{x.value.has(g)?x.value.delete(g):x.value.add(g)},me=()=>{const g=new Set,C=(V,j="")=>{Array.isArray(V)&&V.forEach((R,ee)=>{const D=Object.keys(R).find(G=>!G.startsWith(":")&&!G.startsWith("#"));if(!D)return;const O=j?`${j}.${D}[${ee}]`:`${D}[${ee}]`;g.add(O);const F=R[D];Array.isArray(F)&&C(F,O+"."+D)})};ae.value.forEach(({node:V,originalIndex:j})=>{const R=Object.keys(V).find(ee=>!ee.startsWith(":")&&!ee.startsWith("#"));if(R){const ee=`${R}[${j}]`;g.add(ee);const D=V[R];Array.isArray(D)&&C(D,ee+"."+R)}}),x.value=g,i("expand-all")},be=()=>{x.value.clear(),i("collapse-all")},J=async()=>{if(U.value)try{const g=K.value||u.value;if(!g)return;const C=Array.isArray(g)?et(g,{indent:" ",selfClosingTags:v.value}):Ot(g,{format:!0,indentBy:" "});await navigator.clipboard.writeText(C),i("copy-success",C)}catch(g){const C=g instanceof Error?g:new Error("Copy failed");i("copy-error",C),console.error("Failed to copy XML:",g)}},N=()=>{if(!(!U.value||!u.value))try{const g=es(u.value,a.modelValue);i("update:modelValue",g),i("compress",g)}catch(g){console.error("Failed to compress XML:",g)}},le=()=>{if(U.value)try{const g=ts(a.modelValue,{format:!0,indentBy:" "});i("update:modelValue",g),i("format",g)}catch(g){console.error("Failed to format XML:",g)}},w=g=>{if(!g||!g.expression.trim()){y();return}if(!u.value||!S.value){m.value="No valid XML data to filter";return}try{const V=new jt.DOMParser().parseFromString(S.value,"text/xml"),j=on.select(g.expression,V);if(!j||Array.isArray(j)&&j.length===0){p.value=[],m.value="";return}const R=new jt.XMLSerializer;let ee="";Array.isArray(j)?(ee=`<result>
22
+ `,j.forEach(D=>{D.nodeType===1?ee+=" "+R.serializeToString(D)+`
23
+ `:D.nodeType===2?ee+=` <attribute name="${D.name}" value="${D.value}"/>
24
+ `:D.nodeType===3&&(ee+=` <text>${D.nodeValue}</text>
25
+ `)}),ee+="</result>"):ee=R.serializeToString(j),p.value=St(ee),m.value="",o.nextTick(()=>{me()})}catch(C){m.value=C instanceof Error?C.message:"Filter execution error",p.value=null}},y=()=>{p.value=null,m.value="",o.nextTick(()=>{me()})},B=async g=>{try{const C=typeof g=="string"?g:JSON.stringify(g,null,2);await navigator.clipboard.writeText(C),i("copy-success",C)}catch(C){const V=C instanceof Error?C:new Error("Copy failed");i("copy-error",V),console.error("Failed to copy value:",C)}},_=(g,C,V)=>{if(!(!u.value||!Array.isArray(u.value)))try{const j=g.split(/\./).filter(Boolean);let R=u.value;for(let D=0;D<j.length;D++){const O=j[D],F=O.match(/^(.+?)\[(\d+)\]$/);if(F){const G=F[1],X=parseInt(F[2]);if(D===j.length-1){if(Array.isArray(R)&&R[X]){const P=R[X];if(P[C]){const Q=P[C];delete P[C],P[V]=Q,v.value.has(C)&&(v.value.delete(C),v.value.add(V))}}}else Array.isArray(R)&&R[X]&&(R=R[X])}else R[O]&&(R=R[O])}const ee=et(u.value,{indent:" ",selfClosingTags:v.value});i("update:modelValue",ee)}catch(j){console.error("Failed to update tag name:",j)}},L=(g,C,V)=>{if(!(!u.value||!Array.isArray(u.value)))try{const j=g.split(/\./).filter(Boolean);let R=u.value;for(let D=0;D<j.length;D++){const O=j[D],F=O.match(/^(.+?)\[(\d+)\]$/);if(F){const G=F[1],X=parseInt(F[2]);if(D===j.length-1){if(Array.isArray(R)&&R[X]){const Q=R[X][":@"];if(Q&&Q[`@_${C}`]!==void 0){const pe=Q[`@_${C}`];delete Q[`@_${C}`],Q[`@_${V}`]=pe}}}else Array.isArray(R)&&R[X]&&(R=R[X])}else R[O]&&(R=R[O])}const ee=et(u.value,{indent:" ",selfClosingTags:v.value});i("update:modelValue",ee)}catch(j){console.error("Failed to update attribute name:",j)}},$=(g,C,V)=>{if(!(!u.value||!Array.isArray(u.value)))try{const j=g.split(/\./).filter(Boolean);let R=u.value;for(let D=0;D<j.length;D++){const O=j[D],F=O.match(/^(.+?)\[(\d+)\]$/);if(F){const G=F[1],X=parseInt(F[2]);if(D===j.length-1){if(Array.isArray(R)&&R[X]){const Q=R[X][":@"];Q&&Q[`@_${C}`]!==void 0&&(Q[`@_${C}`]=V)}}else Array.isArray(R)&&R[X]&&(R=R[X])}else R[O]&&(R=R[O])}const ee=et(u.value,{indent:" ",selfClosingTags:v.value});i("update:modelValue",ee)}catch(j){console.error("Failed to update attribute value:",j)}},Z=(g,C)=>{if(!(!u.value||!Array.isArray(u.value)))try{const V=g.split(/\./).filter(Boolean);let j=u.value,R="";for(let D=0;D<V.length;D++){const O=V[D],F=O.match(/^(.+?)\[(\d+)\]$/);if(F){const G=F[1],X=parseInt(F[2]);if(D===V.length-1){if(Array.isArray(j)&&j[X]){const P=j[X];if(R=Object.keys(P).find(Q=>!Q.startsWith(":")&&!Q.startsWith("#"))||"",R&&Array.isArray(P[R])){const Q=P[R],pe=Q.findIndex(Ee=>Ee["#text"]!==void 0);pe!==-1?Q[pe]["#text"]=C:Q.push({"#text":C})}}}else Array.isArray(j)&&j[X]&&(j=j[X])}else j[O]&&(j=j[O])}const ee=et(u.value,{indent:" ",selfClosingTags:v.value});i("update:modelValue",ee)}catch(V){console.error("Failed to update text content:",V)}},te=(g,C)=>{if(!(!u.value||!Array.isArray(u.value)))try{const V=g.split(/\./).filter(Boolean);let j=u.value;for(let ee=0;ee<V.length;ee++){const D=V[ee],O=D.match(/^(.+?)\[(\d+)\]$/);if(O){const F=O[1],G=parseInt(O[2]);if(ee===V.length-1){if(Array.isArray(j)&&j[G]){const X=j[G],P=Object.keys(X).find(Q=>!Q.startsWith(":")&&!Q.startsWith("#"));if(P&&Array.isArray(X[P])){const Q=X[P],pe=Q.findIndex(Ee=>Ee.__cdata!==void 0);if(pe!==-1){const Ee=Q[pe];Array.isArray(Ee.__cdata)&&Ee.__cdata[0]&&(Ee.__cdata[0]["#text"]=C)}else Q.push({__cdata:[{"#text":C}]})}}}else Array.isArray(j)&&j[G]&&(j=j[G])}else j[D]&&(j=j[D])}const R=et(u.value,{indent:" ",selfClosingTags:v.value});i("update:modelValue",R)}catch(V){console.error("Failed to update CDATA content:",V)}};return o.watch(()=>a.modelValue,g=>{re(g)},{immediate:!0}),t({copyXml:J,compressSource:N,formatSource:le,expandAll:me,collapseAll:be,toggleExpand:z,filter:w,clearFilter:y,isValidXml:()=>U.value,getParsedXml:()=>u.value,getFilteredXml:()=>p.value,getExpandedNodes:()=>x.value,getParseError:()=>f.value,getFilterError:()=>m.value,parseXmlString:g=>re(g),copyValue:g=>B(g)}),(g,C)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["xml-format",`xml-format--${Y.value.name}`])},[g.showToolbar?(o.openBlock(),o.createElementBlock("div",rs,[o.createElementVNode("div",ns,[o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--primary",onClick:J,disabled:!U.value,title:"Copy XML"}," 📋 Copy ",8,os),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:me,disabled:!U.value,title:"Expand All"}," ⬇️ Expand All ",8,ss),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:be,disabled:!U.value,title:"Collapse All"}," ➡️ Collapse All ",8,is),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:N,disabled:!U.value,title:"Compress XML"}," 📦 Compress ",8,as),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:le,disabled:!U.value,title:"Format XML"}," ✨ Format ",8,us)]),o.createElementVNode("div",ls,[U.value?(o.openBlock(),o.createElementBlock("span",cs," ✅ Valid XML ")):(o.openBlock(),o.createElementBlock("span",fs," ❌ Invalid XML "))])])):o.createCommentVNode("",!0),o.createElementVNode("div",ds,[U.value?m.value?(o.openBlock(),o.createElementBlock("div",hs,[C[1]||(C[1]=o.createElementVNode("h4",null,"Filter Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(m.value),1)])):(o.openBlock(),o.createElementBlock("div",ms,[H.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"xml-declaration",style:o.normalizeStyle({color:Y.value.colors.xmlDeclaration})},o.toDisplayString(H.value),5)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(de.value,(V,j)=>(o.openBlock(),o.createBlock(Yn,{key:j,node:V.node,index:V.originalIndex,level:0,expanded:x.value,theme:Y.value,selfClosingTags:v.value,onToggleExpand:z,onCopy:B,"onUpdate:tagName":_,"onUpdate:attributeName":L,"onUpdate:attributeValue":$,"onUpdate:textContent":Z,"onUpdate:cdataContent":te},null,8,["node","index","expanded","theme","selfClosingTags"]))),128))])):(o.openBlock(),o.createElementBlock("div",ps,[C[0]||(C[0]=o.createElementVNode("h4",null,"XML Parse Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(f.value),1)]))])],2))}}),[["__scopeId","data-v-adf2b2e1"]]),sr={"github-light":{name:"github-light",colors:{background:"#ffffff",surfaceBackground:"#f6f8fa",hoverBackground:"#f3f4f6",border:"#d0d7de",text:"#24292f",textSecondary:"#57606a",buttonBackground:"#f6f8fa",buttonBackgroundHover:"#f3f4f6",buttonBorder:"#d0d7de",buttonText:"#24292f",buttonPrimary:"#1f883d",buttonPrimaryHover:"#1a7f37",success:"#1f883d",successBackground:"#dafbe1",error:"#cf222e",errorBackground:"#ffebe9",sqlKeyword:"#cf222e",sqlFunction:"#8250df",sqlString:"#0a3069",sqlNumber:"#0550ae",sqlComment:"#6e7781",sqlOperator:"#cf222e",sqlIdentifier:"#24292f",sqlPunctuation:"#24292f",collapsedBackground:"#ddf4ff",collapsedText:"#0969da",indentLine:"#d0d7de"}},"github-dark":{name:"github-dark",colors:{background:"#0d1117",surfaceBackground:"#161b22",hoverBackground:"#30363d",border:"#30363d",text:"#c9d1d9",textSecondary:"#8b949e",buttonBackground:"#21262d",buttonBackgroundHover:"#30363d",buttonBorder:"#30363d",buttonText:"#c9d1d9",buttonPrimary:"#238636",buttonPrimaryHover:"#2ea043",success:"#3fb950",successBackground:"#0f2e1c",error:"#f85149",errorBackground:"#3d1319",sqlKeyword:"#ff7b72",sqlFunction:"#d2a8ff",sqlString:"#a5d6ff",sqlNumber:"#79c0ff",sqlComment:"#8b949e",sqlOperator:"#ff7b72",sqlIdentifier:"#c9d1d9",sqlPunctuation:"#c9d1d9",collapsedBackground:"#1c2d41",collapsedText:"#58a6ff",indentLine:"#30363d"}},"min-light":{name:"min-light",colors:{background:"#ffffff",surfaceBackground:"#fafafa",hoverBackground:"#f5f5f5",border:"#e5e5e5",text:"#171717",textSecondary:"#737373",buttonBackground:"#fafafa",buttonBackgroundHover:"#f5f5f5",buttonBorder:"#e5e5e5",buttonText:"#171717",buttonPrimary:"#22c55e",buttonPrimaryHover:"#16a34a",success:"#22c55e",successBackground:"#dcfce7",error:"#ef4444",errorBackground:"#fee2e2",sqlKeyword:"#dc2626",sqlFunction:"#9333ea",sqlString:"#1e40af",sqlNumber:"#2563eb",sqlComment:"#737373",sqlOperator:"#dc2626",sqlIdentifier:"#171717",sqlPunctuation:"#171717",collapsedBackground:"#dbeafe",collapsedText:"#1d4ed8",indentLine:"#e0e0e0"}},"slack-ochin":{name:"slack-ochin",colors:{background:"#fef5ed",surfaceBackground:"#fef9f3",hoverBackground:"#f9f0e5",border:"#e9dcc9",text:"#3d3c40",textSecondary:"#616061",buttonBackground:"#fef9f3",buttonBackgroundHover:"#f9f0e5",buttonBorder:"#e9dcc9",buttonText:"#3d3c40",buttonPrimary:"#007a5a",buttonPrimaryHover:"#006644",success:"#007a5a",successBackground:"#d1f4e0",error:"#e01e5a",errorBackground:"#ffdbea",sqlKeyword:"#e01e5a",sqlFunction:"#8b2eff",sqlString:"#0b4c8c",sqlNumber:"#1264a3",sqlComment:"#616061",sqlOperator:"#e01e5a",sqlIdentifier:"#3d3c40",sqlPunctuation:"#3d3c40",collapsedBackground:"#d8eaf5",collapsedText:"#0b4c8c",indentLine:"#3e4348"}}},Es=n=>sr[n]||sr["github-light"],Nt=["SELECT","FROM","WHERE","JOIN","INNER","LEFT","RIGHT","FULL","OUTER","ON","GROUP","BY","HAVING","ORDER","LIMIT","OFFSET","INSERT","INTO","VALUES","UPDATE","SET","DELETE","CREATE","ALTER","DROP","TABLE","DATABASE","INDEX","VIEW","AND","OR","NOT","IN","BETWEEN","LIKE","IS","NULL","AS","DISTINCT","UNION","ALL","EXISTS","CASE","WHEN","THEN","ELSE","END"],ys=["WITH","SELECT","FROM","WHERE","GROUP BY","HAVING","ORDER BY","LIMIT","INSERT","UPDATE","DELETE","CREATE","ALTER","DROP","JOIN","INNER JOIN","LEFT JOIN","RIGHT JOIN","FULL JOIN","OUTER JOIN"],bs=n=>{try{if(!n||!n.trim())return{valid:!1,error:"SQL string is empty"};const t=n.toUpperCase();if(!Nt.some(x=>new RegExp(`\\b${x}\\b`).test(t)))return{valid:!1,error:"No valid SQL keywords found"};let a=0;for(const x of n)if(x==="("&&a++,x===")"&&a--,a<0)return{valid:!1,error:"Mismatched parentheses"};if(a!==0)return{valid:!1,error:"Mismatched parentheses"};let i=0,u=0,f=!1;for(let x=0;x<n.length;x++){const p=n[x];if(f){f=!1;continue}if(p==="\\"){f=!0;continue}p==="'"&&i++,p==='"'&&u++}return i%2!==0?{valid:!1,error:"Mismatched single quotes"}:u%2!==0?{valid:!1,error:"Mismatched double quotes"}:{valid:!0}}catch(t){return{valid:!1,error:t instanceof Error?t.message:"Unknown validation error"}}},kt=(n,t)=>{try{const r=t?.tabWidth||2,a=t?.keywordCase||"upper",i=" ".repeat(r);let u=n.trim();const f=[],x=/CREATE\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?(\w+)\s*\(/gi;let p,m=u,S=0;for(;(p=x.exec(u))!==null;){const w=p[1],y=/IF\s+NOT\s+EXISTS/i.test(p[0]),B=p.index,_=p.index+p[0].length;let L=1,$=_;for(;$<u.length&&L>0;)u[$]==="("?L++:u[$]===")"&&L--,$++;if(L!==0)continue;const Z=$-1,te=u.substring(_,Z),C=u.substring(Z+1).match(/^([^;]*);/);if(!C)continue;const V=C[1],j=Z+1+C[0].length,R=a==="upper"?"CREATE TABLE":"create table",ee=y?a==="upper"?" IF NOT EXISTS":" if not exists":"",D=[];let O="",F=0;for(let Q=0;Q<te.length;Q++){const pe=te[Q];pe==="("?(F++,O+=pe):pe===")"?(F--,O+=pe):pe===","&&F===0?(O.trim()&&D.push(O.trim()),O=""):O+=pe}O.trim()&&D.push(O.trim());let G=`${R}${ee} ${w} (`;D.forEach((Q,pe)=>{G+=`
26
+ ${i}${Q}`,pe<D.length-1&&(G+=",")}),G+=`
27
+ ) ${V.trim()};`;const X=`__CREATE_TABLE_${f.length}__`;f.push({placeholder:X,content:G});const P=u.substring(B,j);m=m.replace(P,X)}u=m;const v=[];u=u.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,w=>(v.push({type:"string",value:w}),`__PROTECTED_${v.length-1}__`)),u=u.replace(/--[^\n]*/g,w=>(v.push({type:"comment",value:w}),`__PROTECTED_${v.length-1}__`)),u=u.replace(/\/\*[\s\S]*?\*\//g,w=>(v.push({type:"comment",value:w}),`__PROTECTED_${v.length-1}__`)),u=u.replace(/,(?!\s)/g,", ").replace(/\s*\bAS\b\s*/gi," AS ").replace(/\s*\bOVER\b\s*/gi," OVER ").replace(/\s*\b(DESC|ASC)\b\s*/gi," $1 ").replace(/\s*([<>=!]+)\s*/g," $1 ").replace(/\s*\bON\b\s*/gi," ON ").replace(/\)([A-Z])/gi,") $1").replace(/[ \t]+/g," ").replace(/ +$/gm,"").replace(/^ +/gm,""),a==="upper"?Nt.forEach(w=>{const y=new RegExp(`\\b${w}\\b`,"gi");u=u.replace(y,w.toUpperCase())}):a==="lower"&&Nt.forEach(w=>{const y=new RegExp(`\\b${w}\\b`,"gi");u=u.replace(y,w.toLowerCase())});const U=["WITH","SELECT","FROM","WHERE","GROUP BY","HAVING","ORDER BY","LIMIT","OFFSET","INNER JOIN","LEFT JOIN","RIGHT JOIN","FULL JOIN","CROSS JOIN","OUTER JOIN","JOIN","UNION","UNION ALL","INTERSECT","EXCEPT","INSERT INTO","UPDATE","DELETE FROM","CREATE","ALTER","DROP"];U.sort((w,y)=>y.length-w.length),u=u.replace(/\b(WITH)\s+(\w+)\s+(AS)\s*\(/gi,(w,y,B,_)=>`${a==="upper"?"WITH":"with"}
28
+ ${i}${B} ${a==="upper"?"AS":"as"} (`);const K=w=>{const y=w.split(`
29
+ `),B=[];let _=!1,L=0,$=0;for(let Z=0;Z<y.length;Z++){const te=y[Z],g=te.trim();if(/^\s*\w+\s+AS\s*\(/.test(te)){_=!0,L=1,$=1,B.push(i+te.trim());continue}if(_){let C=!1,V="";for(const j of g)(j==='"'||j==="'")&&!C?(C=!0,V=j):j===V&&C?C=!1:C||(j==="("?$++:j===")"&&$--);$===0?(_=!1,B.push(i+")")):g?B.push(i+te):B.push("")}else B.push(te)}return B.join(`
30
+ `)},Y=[];U.forEach((w,y)=>{if(w.includes(" ")){const B=a==="upper"?w:w.toLowerCase(),_=new RegExp(`\\b${w}\\b`,"gi"),L=`__KEYWORD_${y}__`;u=u.replace(_,L),Y.push({placeholder:L,original:B})}}),U.forEach(w=>{if(!w.includes(" ")&&w!=="WITH"){const y=a==="upper"?w:w.toLowerCase(),B=new RegExp(`\\b${w}\\b`,"gi");u=u.replace(B,`
31
+ ${y}`)}}),Y.forEach(({placeholder:w,original:y})=>{u=u.replace(new RegExp(w,"g"),`
32
+ ${y}`)}),u=(w=>{let y=w;const B=/\b(\w+)\s+OVER\s*\(/gi;let _;for(;(_=B.exec(y))!==null;){const L=_[1],$=_.index+_[0].length;let Z=1,te=$;for(;Z>0&&te<y.length;)y[te]==="("?Z++:y[te]===")"&&Z--,te++;if(Z===0){const g=y.substring($,te-1).trim(),C=a==="upper"?"OVER":"over",V=/\bORDER\s+BY\b/i.test(g),j=/\bPARTITION\s+BY\b/i.test(g);if(V||j){let R=g;if(V){const D=a==="upper"?"ORDER BY":"order by";R=R.replace(/\bORDER\s+BY\s+(.+)/gi,(O,F)=>`
33
+ ${i}${D}
34
+ ${i}${i}${F.trim()}`)}if(j){const D=a==="upper"?"PARTITION BY":"partition by";R=R.replace(/\bPARTITION\s+BY\s+(.+)/gi,(O,F)=>`
35
+ ${i}${D}
36
+ ${i}${i}${F.trim()}`)}const ee=`${L} ${C} (${R}
37
+ ${i})`;y=y.substring(0,_.index)+ee+y.substring(te),B.lastIndex=_.index+ee.length}}}return y})(u),u=u.replace(/\b((?:INNER\s+|LEFT\s+|RIGHT\s+|FULL\s+|CROSS\s+|OUTER\s+)?JOIN\s+[^\n]+?)\s+ON\s+(.+?)(?=\n|$)/gi,(w,y,B)=>`${y} ${a==="upper"?"ON":"on"} ${B.trim()}`),u=u.replace(/\b(WHERE)\s+([^\n]+?)(?=\s+AND\b|\s+OR\b|\n|$)/gis,(w,y,B)=>{const _=a==="upper"?"WHERE":"where",L=B.trim();return`${_}
38
+ ${i}${L}`}),u=u.replace(/\b(HAVING)\s+(?!\n)(.+?)(?=\n|$)/gis,(w,y,B)=>`${a==="upper"?"HAVING":"having"}
39
+ ${i}${B.trim()}`),u=u.replace(/\b(ORDER BY)\s+(?!\n)([^,\n]+?)(?=\n|$|;)/gis,(w,y,B)=>{const _=a==="upper"?"ORDER BY":"order by";return B.includes(",")?w:`${_}
40
+ ${i}${B.trim()}`}),u=u.replace(/\b(INSERT\s+INTO)\s+(\w+)\s*\(([^)]+)\)\s*(VALUES)\s*(.+?)(?=;|$)/gis,(w,y,B,_,L,$)=>{const Z=a==="upper"?"INSERT INTO":"insert into",te=a==="upper"?"VALUES":"values",g=_.split(",").map(O=>O.trim()).join(", ");let C=`${Z}
41
+ ${i}${B} (${g})
42
+ ${te}`;const V=[];let j=0,R="",ee=!1,D="";for(let O=0;O<$.length;O++){const F=$[O],G=O>0?$[O-1]:"";(F==='"'||F==="'")&&G!=="\\"&&(ee?F===D&&(ee=!1):(ee=!0,D=F)),ee?R+=F:F==="("?(j===0?R="":R+=F,j++):F===")"?(j--,j===0?V.push(R.trim()):R+=F):j>0&&(R+=F)}return V.forEach((O,F)=>{const G=O.split(/,\s*(?=(?:[^']*'[^']*')*[^']*$)/).map(X=>X.trim());C+=`
43
+ `+i+"(",G.forEach((X,P)=>{C+=`
44
+ `+i+i+X,P<G.length-1&&(C+=",")}),C+=`
45
+ `+i+")",F<V.length-1&&(C+=",")}),C}),u=u.replace(/\b(UPDATE\s+)(\w+)\s+(SET)\s+([^\n]+?)(?=\n(?:WHERE)|$|;)/gis,(w,y,B,_,L)=>{const $=a==="upper"?"UPDATE":"update",Z=a==="upper"?"SET":"set",te=L.split(/,\s*(?![^()]*\))/).map(C=>C.trim());let g=`${$} ${B}
46
+ ${Z}`;return te.forEach((C,V)=>{g+=`
47
+ ${i}${C}`,V<te.length-1&&(g+=",")}),g}),["AND","OR"].forEach(w=>{const y=a==="upper"?w:w.toLowerCase(),B=new RegExp(`\\s*\\b${w}\\b`,"gi");u=u.replace(B,`
48
+ ${i}${y}`)});const de=u.split(`
49
+ `),re=[];let z=0;const me=w=>{const y=[];let B="",_=0;for(let L=0;L<w.length;L++){const $=w[L];$==="("?(_++,B+=$):$===")"?(_--,B+=$):$===","&&_===0?(y.push(B.trim()),B=""):B+=$}return B.trim()&&y.push(B.trim()),y},be=w=>{if(!/\bCASE\b/i.test(w))return[w];const y=[],B=[];let _=w.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,g=>{const C=B.length;return B.push(g),`__STRING_${C}__`});const L=/\b(CASE)\b([\s\S]*?)\b(END)\b/gi;let $=0,Z;for(;(Z=L.exec(_))!==null;){if(Z.index>$){const V=_.substring($,Z.index).trim();V&&y.push(V)}y.push("CASE");const C=Z[2].split(/\b(WHEN|ELSE)\b/gi);for(let V=0;V<C.length;V++){const j=C[V].trim();if(j){if(/^WHEN$/i.test(j)){const R=C[++V]?.trim()||"",ee=R.match(/^(.*?)\s+THEN\s+(.*)$/i);if(ee){const D=a==="upper"?"WHEN":"when",O=a==="upper"?"THEN":"then";y.push(i+D+" "+ee[1].trim()+" "+O+" "+ee[2].trim())}else{const D=a==="upper"?"WHEN":"when";y.push(i+D+" "+R)}}else if(/^ELSE$/i.test(j)){const R=C[++V]?.trim()||"",ee=a==="upper"?"ELSE":"else";y.push(i+ee+" "+R)}}}y.push("END"),$=L.lastIndex}if($<_.length){const g=_.substring($).trim();g&&(y[y.length-1]+=" "+g)}return y.map(g=>g.replace(/__STRING_(\d+)__/g,(C,V)=>B[parseInt(V)]))};for(let w=0;w<de.length;w++){const y=de[w],B=y.trim();/^\)\s+AS\s+/i.test(B)&&(z=Math.max(0,z-1));const _=i.repeat(z);if(y!==B&&B.length>0&&!/^(SELECT|FROM|GROUP BY|ORDER BY)\b/i.test(B)){re.push(_+y);continue}if(/^SELECT\b/i.test(B)){const $=B.match(/^(SELECT\s+(?:DISTINCT\s+)?)(.*)/i);if($){const Z=$[1].trim(),te=$[2],g=me(te);re.push(_+Z),g.forEach((C,V)=>{const j=V===g.length-1;if(/\bCASE\b/i.test(C)){const R=be(C);R.forEach((ee,D)=>{D===0?re.push(_+i+ee):D===R.length-1?re.push(_+i+ee+(j?"":",")):re.push(_+i+ee)})}else j?re.push(_+i+C):re.push(_+i+C+",")})}else re.push(_+B)}else if(/^FROM\b/i.test(B)){const $=B.match(/^(FROM\s+)(.*)/i);if($){const Z=$[1].trim(),te=$[2].trim();re.push(_+Z),te==="("?(re.push(_+i+"("),z++):re.push(_+i+te)}else re.push(_+B)}else if(/^(INNER\s+JOIN|LEFT\s+JOIN|RIGHT\s+JOIN|FULL\s+JOIN|CROSS\s+JOIN|OUTER\s+JOIN|JOIN)\b/i.test(B))re.push(_+i+B);else if(/^GROUP BY\b/i.test(B)){const $=B.match(/^(GROUP BY\s+)(.*)/i);if($){const Z=$[1].trim(),te=$[2],g=me(te);g.length>1?(re.push(_+Z),g.forEach((C,V)=>{V===g.length-1?re.push(_+i+C):re.push(_+i+C+",")})):re.push(_+y)}else re.push(_+y)}else if(/^ORDER BY\b/i.test(B)){const $=B.match(/^(ORDER BY\s+)(.*)/i);if($){const Z=$[1].trim(),te=$[2],g=me(te);g.length>1?(re.push(_+Z),g.forEach((C,V)=>{V===g.length-1?re.push(_+i+C):re.push(_+i+C+",")})):re.push(_+B)}else re.push(_+B)}else/^\)\s+AS\s+/i.test(B),re.push(_+B)}u=re.join(`
50
50
  `),u=u.split(`
51
- `).filter($=>$.trim().length>0).join(`
52
- `),D.forEach(($,v)=>{u=u.replace(`__PROTECTED_${v}__`,$.value)}),f.forEach(({placeholder:$,content:v})=>{u=u.replace($,v)});const ye=u.split(`
53
- `),Z=[];for(let $=0;$<ye.length;$++){const v=ye[$],E=v.trim();if(v.startsWith(" ")||v.startsWith(" ")){Z.push(v);continue}if(U.some(G=>new RegExp(`^${G}\\b`,"i").test(E))){Z.push(E);continue}let S="";for(let G=$-1;G>=0;G--){const ee=ye[G].trim(),te=U.find(g=>new RegExp(`^${g}\\b`,"i").test(ee));if(te){S=te;break}}/^(AND|OR)\b/i.test(E)||S.match(/^SELECT$/i)||S.match(/^(WHERE|HAVING)$/i)||S.match(/JOIN$/i)||S.match(/^ORDER BY$/i)?Z.push(i+E):Z.push(E)}let N=Z.join(`
54
- `);return N=K(N),N}catch(r){throw new Error(`SQL 格式化失败: ${r instanceof Error?r.message:"Unknown error"}`)}},As=n=>{try{let t=n.replace(/--[^\n]*/g,"").replace(/\/\*[\s\S]*?\*\//g,"");const r=[];return t=t.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,a=>(r.push(a),`__STRING_${r.length-1}__`)),t=t.replace(/\s+/g," ").replace(/\s*([(),;])\s*/g,"$1").trim(),r.forEach((a,i)=>{t=t.replace(`__STRING_${i}__`,a)}),t}catch(t){throw new Error(`SQL 压缩失败: ${t instanceof Error?t.message:"Unknown error"}`)}},xs=n=>{const t=[];try{const a=kt(n,{keywordCase:"upper"}).split(`
55
- `);let i=null,u=[],f=[];for(const x of a){const p=x.trim();if(!p){i&&u.push(x);continue}if(p.startsWith("--")||p.startsWith("/*")){i?u.push(x):f.push(x);continue}let _=!1,D="UNKNOWN";for(const U of ys)if(new RegExp(`^${U}\\b`,"i").test(p)){_=!0,D=U.replace(/ /g," ");break}_?(i&&u.length>0&&(i.content=u.join(`
51
+ `).filter(w=>w.trim().length>0).join(`
52
+ `),v.forEach((w,y)=>{u=u.replace(`__PROTECTED_${y}__`,w.value)}),f.forEach(({placeholder:w,content:y})=>{u=u.replace(w,y)});const J=u.split(`
53
+ `),N=[];for(let w=0;w<J.length;w++){const y=J[w],B=y.trim();if(y.startsWith(" ")||y.startsWith(" ")){N.push(y);continue}if(U.some(Z=>new RegExp(`^${Z}\\b`,"i").test(B))){N.push(B);continue}let $="";for(let Z=w-1;Z>=0;Z--){const te=J[Z].trim(),g=U.find(C=>new RegExp(`^${C}\\b`,"i").test(te));if(g){$=g;break}}/^(AND|OR)\b/i.test(B)||$.match(/^SELECT$/i)||$.match(/^(WHERE|HAVING)$/i)||$.match(/JOIN$/i)||$.match(/^ORDER BY$/i)?N.push(i+B):N.push(B)}let le=N.join(`
54
+ `);return le=K(le),le}catch(r){throw new Error(`SQL 格式化失败: ${r instanceof Error?r.message:"Unknown error"}`)}},As=n=>{try{let t=n.replace(/--[^\n]*/g,"").replace(/\/\*[\s\S]*?\*\//g,"");const r=[];return t=t.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,a=>(r.push(a),`__STRING_${r.length-1}__`)),t=t.replace(/\s+/g," ").replace(/\s*([(),;])\s*/g,"$1").trim(),r.forEach((a,i)=>{t=t.replace(`__STRING_${i}__`,a)}),t}catch(t){throw new Error(`SQL 压缩失败: ${t instanceof Error?t.message:"Unknown error"}`)}},xs=n=>{const t=[];try{const a=kt(n,{keywordCase:"upper"}).split(`
55
+ `);let i=null,u=[],f=[];for(const x of a){const p=x.trim();if(!p){i&&u.push(x);continue}if(p.startsWith("--")||p.startsWith("/*")){i?u.push(x):f.push(x);continue}let S=!1,v="UNKNOWN";for(const U of ys)if(new RegExp(`^${U}\\b`,"i").test(p)){S=!0,v=U.replace(/ /g," ");break}S?(f.length>0&&(t.push({type:"UNKNOWN",content:f.join(`
56
+ `),raw:f.join(`
57
+ `),collapsible:!1,path:`clause-${t.length}`}),f=[]),i&&u.length>0&&(i.content=u.join(`
56
58
  `),i.raw=u.join(`
57
- `),t.push(i)),u=[...f,x],f=[],i={type:D,content:"",raw:"",collapsible:!0,path:`clause-${t.length}`}):i?u.push(x):(u=[...f,x],f=[],i={type:"UNKNOWN",content:"",raw:"",collapsible:!1,path:`clause-${t.length}`})}return i&&u.length>0&&(i.content=u.join(`
59
+ `),t.push(i)),u=[x],i={type:v,content:"",raw:"",collapsible:!0,path:`clause-${t.length}`}):i?u.push(x):(u=[...f,x],f=[],i={type:"UNKNOWN",content:"",raw:"",collapsible:!1,path:`clause-${t.length}`})}return i&&u.length>0&&(i.content=u.join(`
58
60
  `),i.raw=u.join(`
59
61
  `),t.push(i)),f.length>0&&t.push({type:"UNKNOWN",content:f.join(`
60
62
  `),raw:f.join(`
61
- `),collapsible:!1,path:`clause-${t.length}`}),{clauses:t,raw:n}}catch{return{clauses:[{type:"UNKNOWN",content:n,raw:n,collapsible:!1,path:"clause-0"}],raw:n}}},Ns=n=>{const t=[];let r=n;const a=["COUNT","SUM","AVG","MAX","MIN","UPPER","LOWER","SUBSTRING","CONCAT","LENGTH","TRIM","NOW","DATE","YEAR","MONTH","DAY","COALESCE","CAST","CONVERT","ROUND","ABS","FLOOR","CEIL"],i=["=","!=","<>","<",">","<=",">=","+","-","*","/","%","||"],u=["(",")",",",";","."];for(;r.length>0;){let f=!1;const x=r.match(/^(\s+)/);if(x){t.push({type:"whitespace",value:x[1]}),r=r.slice(x[1].length);continue}const p=r.match(/^(--[^\n]*)/);if(p){t.push({type:"comment",value:p[1]}),r=r.slice(p[1].length);continue}const m=r.match(/^(\/\*[\s\S]*?\*\/)/);if(m){t.push({type:"comment",value:m[1]}),r=r.slice(m[1].length);continue}const _=r.match(/^(["'])(?:(?=(\\?))\2.)*?\1/);if(_){t.push({type:"string",value:_[0]}),r=r.slice(_[0].length);continue}const D=r.match(/^(\d+\.?\d*|\.\d+)/);if(D){t.push({type:"number",value:D[1]}),r=r.slice(D[1].length);continue}for(const K of i)if(r.startsWith(K)){t.push({type:"operator",value:K}),r=r.slice(K.length),f=!0;break}if(f)continue;for(const K of u)if(r.startsWith(K)){t.push({type:"punctuation",value:K}),r=r.slice(K.length),f=!0;break}if(f)continue;const U=r.match(/^([a-zA-Z_][a-zA-Z0-9_]*)/);if(U){const K=U[1],J=K.toUpperCase();Nt.includes(J)?t.push({type:"keyword",value:K}):a.includes(J)?t.push({type:"function",value:K}):t.push({type:"identifier",value:K}),r=r.slice(K.length);continue}t.push({type:"punctuation",value:r[0]}),r=r.slice(1)}return t},Cs={key:0,class:"sql-format__toolbar"},Ds={class:"sql-format__actions"},vs=["disabled"],ws=["disabled"],Ts=["disabled"],_s=["disabled"],Bs=["disabled"],Ss={class:"sql-format__info"},Os={key:0,class:"sql-format__status sql-format__status--success"},ks={key:1,class:"sql-format__status sql-format__status--error"},Rs={class:"sql-format__content"},Is={key:0,class:"sql-format__error"},Fs={key:1,class:"sql-format__viewer"},Ps={key:0,class:"sql-format__clauses"},Ls=["onClick"],Vs=["onClick","title"],$s={key:1,class:"sql-format__toggle-spacer"},Ms={class:"sql-format__clause-keyword"},qs={class:"sql-format__clause-code"},Us=["innerHTML"],Hs={key:0,class:"sql-format__clause-content"},js={class:"sql-format__clause-code"},Ks=["innerHTML"],Gs={key:1,class:"sql-format__code"},Xs=["innerHTML"],zs=ft(o.defineComponent({__name:"index",props:{modelValue:{default:""},readonly:{type:Boolean,default:!1},showToolbar:{type:Boolean,default:!0},theme:{default:"github-light"},dialect:{default:"sql"},tabWidth:{default:2}},emits:["update:modelValue","copy-success","copy-error","expand-all","collapse-all","compress","format"],setup(n,{expose:t,emit:r}){o.useCssVars(E=>({"0a8c63a5":D.value.colors.background,"2c1838e4":D.value.colors.text,"68c05623":D.value.colors.border,"7ab5f764":D.value.colors.surfaceBackground,"6f07b296":D.value.colors.buttonBorder,e02cc992:D.value.colors.buttonBackground,"6f5305f6":D.value.colors.buttonText,"4a36af76":D.value.colors.buttonBackgroundHover,"3043ac99":D.value.colors.buttonPrimary,"0c682423":D.value.colors.buttonPrimaryHover,"2a2cd18c":D.value.colors.successBackground,"3bfd9cec":D.value.colors.success,"776b7d3f":D.value.colors.errorBackground,56215531:D.value.colors.error,"5073ce20":D.value.colors.textSecondary}));const a=n,i=r,u=o.ref(""),f=o.ref(a.dialect),x=o.ref([]),p=o.ref(new Set),m=o.ref(""),_=o.computed(()=>u.value===""),D=o.computed(()=>Es(a.theme)),U=E=>{if(!E||!E.trim()){u.value="",x.value=[],p.value.clear();return}try{const P=bs(E);if(!P.valid){u.value=P.error||"Invalid SQL",x.value=[],m.value="";return}const O=xs(E);x.value=O.clauses,m.value=kt(E,{dialect:f.value,tabWidth:a.tabWidth}),p.value=new Set(O.clauses.map(S=>S.path||"")),u.value=""}catch(P){u.value=P instanceof Error?P.message:"Unknown parse error",x.value=[],m.value=""}},K=E=>{const P=Ns(E),O=D.value.colors;return P.map(S=>{let G=O.text;switch(S.type){case"keyword":G=O.sqlKeyword;break;case"function":G=O.sqlFunction;break;case"string":G=O.sqlString;break;case"number":G=O.sqlNumber;break;case"comment":G=O.sqlComment;break;case"operator":G=O.sqlOperator;break;case"identifier":G=O.sqlIdentifier;break;case"punctuation":G=O.sqlPunctuation;break;case"whitespace":return S.value.replace(/ /g,"&nbsp;").replace(/\n/g,`
62
- `)}const ee=S.value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");return`<span style="color: ${G}">${ee}</span>`}).join("")},J=E=>{p.value.has(E)?p.value.delete(E):p.value.add(E),p.value=new Set(p.value)},ue=E=>p.value.has(E),H=E=>{const P=E.content.split(`
63
- `);if(P.length===0)return"";for(const O of P)if(O.trim())return O;return""},de=E=>{const P=H(E),O=ue(E.path||""),S=!!oe(E);return E.collapsible&&!O&&S?`${K(P)}<span style="color: ${D.value.colors.textSecondary}; opacity: 0.6; font-style: italic; margin-left: 4px;"> ...</span>`:K(P)},oe=E=>{const P=E.content.split(`
64
- `);if(P.length<=1)return"";let O=0;for(let G=0;G<P.length;G++)if(P[G].trim()){O=G;break}return P.slice(O+1).join(`
65
- `)},Q=()=>{p.value=new Set(x.value.map(E=>E.path||"")),i("expand-all")},he=()=>{p.value=new Set,i("collapse-all")},ye=async()=>{if(_.value)try{const E=m.value||a.modelValue;await navigator.clipboard.writeText(E),i("copy-success",E)}catch(E){const P=E instanceof Error?E:new Error("Failed to copy");i("copy-error",P)}},Z=()=>{if(_.value)try{const E=kt(a.modelValue,{dialect:f.value,tabWidth:a.tabWidth});i("update:modelValue",E),i("format",E)}catch(E){console.error("Format error:",E)}},N=()=>{if(_.value)try{const E=As(a.modelValue);i("update:modelValue",E),i("compress",E)}catch(E){console.error("Compress error:",E)}},$=()=>null,v=()=>u.value;return o.watch(()=>a.modelValue,E=>{U(E)},{immediate:!0}),o.watch(()=>a.dialect,E=>{f.value=E}),t({copySql:ye,formatSource:Z,compressSource:N,expandAll:Q,collapseAll:he,toggleExpand:J,isValidSql:()=>_.value,getParsedSql:$,getParseError:v}),(E,P)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["sql-format",`sql-format--${D.value.name}`])},[E.showToolbar?(o.openBlock(),o.createElementBlock("div",Cs,[o.createElementVNode("div",Ds,[o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--primary",onClick:ye,disabled:!_.value,title:"Copy SQL"}," 📋 Copy ",8,vs),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:Z,disabled:!_.value,title:"Format SQL"}," ✨ Format ",8,ws),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:N,disabled:!_.value,title:"Compress SQL"}," 📦 Compress ",8,Ts),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:Q,disabled:!_.value||x.value.length===0,title:"Expand All Clauses"}," ⬇️ Expand All ",8,_s),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:he,disabled:!_.value||x.value.length===0,title:"Collapse All Clauses"}," ⬆️ Collapse All ",8,Bs),o.withDirectives(o.createElementVNode("select",{"onUpdate:modelValue":P[0]||(P[0]=O=>f.value=O),class:"sql-format__dialect-select",title:"SQL Dialect"},P[1]||(P[1]=[o.createStaticVNode('<option value="sql" data-v-1535e918>SQL</option><option value="mysql" data-v-1535e918>MySQL</option><option value="postgresql" data-v-1535e918>PostgreSQL</option><option value="sqlite" data-v-1535e918>SQLite</option><option value="plsql" data-v-1535e918>PL/SQL</option><option value="tsql" data-v-1535e918>T-SQL</option>',6)]),512),[[o.vModelSelect,f.value]])]),o.createElementVNode("div",Ss,[_.value?(o.openBlock(),o.createElementBlock("span",Os," ✅ Valid SQL ")):(o.openBlock(),o.createElementBlock("span",ks," ❌ Invalid SQL "))])])):o.createCommentVNode("",!0),o.createElementVNode("div",Rs,[_.value?(o.openBlock(),o.createElementBlock("div",Fs,[x.value.length>0?(o.openBlock(),o.createElementBlock("div",Ps,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(x.value,O=>(o.openBlock(),o.createElementBlock("div",{key:O.path,class:"sql-format__clause"},[o.createElementVNode("div",{class:"sql-format__clause-header",onClick:S=>O.collapsible&&J(O.path||"")},[O.collapsible?(o.openBlock(),o.createElementBlock("button",{key:0,class:"sql-format__toggle-btn",onClick:o.withModifiers(S=>J(O.path||""),["stop"]),title:ue(O.path||"")?"Collapse":"Expand"},[o.createElementVNode("span",{class:o.normalizeClass(["sql-format__toggle-icon",{"sql-format__toggle-icon--expanded":ue(O.path||"")}])},"▶",2)],8,Vs)):(o.openBlock(),o.createElementBlock("span",$s)),o.createElementVNode("div",Ms,[o.createElementVNode("pre",qs,[o.createElementVNode("code",{innerHTML:de(O)},null,8,Us)])])],8,Ls),ue(O.path||"")&&oe(O)?(o.openBlock(),o.createElementBlock("div",Hs,[o.createElementVNode("pre",js,[o.createElementVNode("code",{innerHTML:K(oe(O))},null,8,Ks)])])):o.createCommentVNode("",!0)]))),128))])):(o.openBlock(),o.createElementBlock("pre",Gs,[o.createElementVNode("code",{innerHTML:K(a.modelValue)},null,8,Xs)]))])):(o.openBlock(),o.createElementBlock("div",Is,[P[2]||(P[2]=o.createElementVNode("h4",null,"SQL Parse Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(u.value),1)]))])],2))}}),[["__scopeId","data-v-1535e918"]]),Ws=[Ft],Ys={install:n=>{Ws.forEach(t=>{const r=t.name||t.__name||"UnknownComponent";n.component(r,t)})}};ze.JsonFormat=Ft,ze.SqlFormat=zs,ze.XmlFormat=gs,ze.default=Ys,Object.defineProperties(ze,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
63
+ `),collapsible:!1,path:`clause-${t.length}`}),{clauses:t,raw:n}}catch{return{clauses:[{type:"UNKNOWN",content:n,raw:n,collapsible:!1,path:"clause-0"}],raw:n}}},Ns=n=>{const t=[];let r=n;const a=["COUNT","SUM","AVG","MAX","MIN","UPPER","LOWER","SUBSTRING","CONCAT","LENGTH","TRIM","NOW","DATE","YEAR","MONTH","DAY","COALESCE","CAST","CONVERT","ROUND","ABS","FLOOR","CEIL"],i=["=","!=","<>","<",">","<=",">=","+","-","*","/","%","||"],u=["(",")",",",";","."];for(;r.length>0;){let f=!1;const x=r.match(/^(\s+)/);if(x){t.push({type:"whitespace",value:x[1]}),r=r.slice(x[1].length);continue}const p=r.match(/^(--[^\n]*)/);if(p){t.push({type:"comment",value:p[1]}),r=r.slice(p[1].length);continue}const m=r.match(/^(\/\*[\s\S]*?\*\/)/);if(m){t.push({type:"comment",value:m[1]}),r=r.slice(m[1].length);continue}const S=r.match(/^(["'])(?:(?=(\\?))\2.)*?\1/);if(S){t.push({type:"string",value:S[0]}),r=r.slice(S[0].length);continue}const v=r.match(/^(\d+\.?\d*|\.\d+)/);if(v){t.push({type:"number",value:v[1]}),r=r.slice(v[1].length);continue}for(const K of i)if(r.startsWith(K)){t.push({type:"operator",value:K}),r=r.slice(K.length),f=!0;break}if(f)continue;for(const K of u)if(r.startsWith(K)){t.push({type:"punctuation",value:K}),r=r.slice(K.length),f=!0;break}if(f)continue;const U=r.match(/^([a-zA-Z_][a-zA-Z0-9_]*)/);if(U){const K=U[1],Y=K.toUpperCase();Nt.includes(Y)?t.push({type:"keyword",value:K}):a.includes(Y)?t.push({type:"function",value:K}):t.push({type:"identifier",value:K}),r=r.slice(K.length);continue}t.push({type:"punctuation",value:r[0]}),r=r.slice(1)}return t},Cs={key:0,class:"sql-format__toolbar"},Ds={class:"sql-format__actions"},vs=["disabled"],ws=["disabled"],Ts=["disabled"],_s=["disabled"],Bs=["disabled"],Ss={class:"sql-format__info"},Os={key:0,class:"sql-format__status sql-format__status--success"},ks={key:1,class:"sql-format__status sql-format__status--error"},Rs={class:"sql-format__content"},Is={key:0,class:"sql-format__error"},Fs={key:1,class:"sql-format__viewer"},Ps={key:0,class:"sql-format__clauses"},Ls=["onClick"],Vs=["onClick","title"],$s={key:1,class:"sql-format__toggle-spacer"},Ms={class:"sql-format__clause-keyword"},qs={class:"sql-format__clause-code"},Us=["innerHTML"],Hs={key:0,class:"sql-format__clause-content"},js={class:"sql-format__clause-code"},Ks=["innerHTML"],Gs={key:1,class:"sql-format__code"},Xs=["innerHTML"],Ws=ft(o.defineComponent({__name:"index",props:{modelValue:{default:""},readonly:{type:Boolean,default:!1},showToolbar:{type:Boolean,default:!0},theme:{default:"github-light"},dialect:{default:"sql"},tabWidth:{default:2}},emits:["update:modelValue","copy-success","copy-error","expand-all","collapse-all","compress","format"],setup(n,{expose:t,emit:r}){o.useCssVars(y=>({"36e4ab9e":v.value.colors.background,"1b3fa0c6":v.value.colors.text,"8634fac8":v.value.colors.border,"8e57156a":v.value.colors.surfaceBackground,"3fe2546e":v.value.colors.buttonBorder,"68a04470":v.value.colors.buttonBackground,c8a96422:v.value.colors.buttonText,"6f984aa8":v.value.colors.buttonBackgroundHover,b4b99400:v.value.colors.buttonPrimary,dbcd39c8:v.value.colors.buttonPrimaryHover,29081521:v.value.colors.successBackground,"6c7dff93":v.value.colors.success,"130e48e6":v.value.colors.errorBackground,"58d83598":v.value.colors.error,"4d25a257":v.value.colors.textSecondary}));const a=n,i=r,u=o.ref(""),f=o.ref(a.dialect),x=o.ref([]),p=o.ref(new Set),m=o.ref(""),S=o.computed(()=>u.value===""),v=o.computed(()=>Es(a.theme)),U=y=>{if(!y||!y.trim()){u.value="",x.value=[],p.value.clear();return}try{const B=bs(y);if(!B.valid){u.value=B.error||"Invalid SQL",x.value=[],m.value="";return}const _=xs(y);x.value=_.clauses,m.value=kt(y,{dialect:f.value,tabWidth:a.tabWidth}),p.value=new Set(_.clauses.map(L=>L.path||"")),u.value=""}catch(B){u.value=B instanceof Error?B.message:"Unknown parse error",x.value=[],m.value=""}},K=y=>{const B=Ns(y),_=v.value.colors;return B.map(L=>{let $=_.text;switch(L.type){case"keyword":$=_.sqlKeyword;break;case"function":$=_.sqlFunction;break;case"string":$=_.sqlString;break;case"number":$=_.sqlNumber;break;case"comment":$=_.sqlComment;break;case"operator":$=_.sqlOperator;break;case"identifier":$=_.sqlIdentifier;break;case"punctuation":$=_.sqlPunctuation;break;case"whitespace":return L.value.replace(/ /g,"&nbsp;").replace(/\n/g,`
64
+ `)}const Z=L.value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");return`<span style="color: ${$}">${Z}</span>`}).join("")},Y=y=>{p.value.has(y)?p.value.delete(y):p.value.add(y),p.value=new Set(p.value)},ae=y=>p.value.has(y),H=y=>{const B=y.content.split(`
65
+ `);if(B.length===0)return"";for(const _ of B)if(_.trim())return _;return""},de=y=>{const B=H(y),_=ae(y.path||""),L=!!re(y);return y.collapsible&&!_&&L?`${K(B)}<span style="color: ${v.value.colors.textSecondary}; opacity: 0.6; font-style: italic; margin-left: 4px;"> ...</span>`:K(B)},re=y=>{const B=y.content.split(`
66
+ `);if(B.length<=1)return"";let _=0;for(let $=0;$<B.length;$++)if(B[$].trim()){_=$;break}return B.slice(_+1).join(`
67
+ `)},z=()=>{p.value=new Set(x.value.map(y=>y.path||"")),i("expand-all")},me=()=>{p.value=new Set,i("collapse-all")},be=async()=>{if(S.value)try{const y=m.value||a.modelValue;await navigator.clipboard.writeText(y),i("copy-success",y)}catch(y){const B=y instanceof Error?y:new Error("Failed to copy");i("copy-error",B)}},J=()=>{if(S.value)try{const y=kt(a.modelValue,{dialect:f.value,tabWidth:a.tabWidth});i("update:modelValue",y),i("format",y)}catch(y){console.error("Format error:",y)}},N=()=>{if(S.value)try{const y=As(a.modelValue);i("update:modelValue",y),i("compress",y)}catch(y){console.error("Compress error:",y)}},le=()=>null,w=()=>u.value;return o.watch(()=>a.modelValue,y=>{U(y)},{immediate:!0}),o.watch(()=>a.dialect,y=>{f.value=y}),t({copySql:be,formatSource:J,compressSource:N,expandAll:z,collapseAll:me,toggleExpand:Y,isValidSql:()=>S.value,getParsedSql:le,getParseError:w}),(y,B)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["sql-format",`sql-format--${v.value.name}`])},[y.showToolbar?(o.openBlock(),o.createElementBlock("div",Cs,[o.createElementVNode("div",Ds,[o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--primary",onClick:be,disabled:!S.value,title:"Copy SQL"}," 📋 Copy ",8,vs),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:J,disabled:!S.value,title:"Format SQL"}," ✨ Format ",8,ws),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:N,disabled:!S.value,title:"Compress SQL"}," 📦 Compress ",8,Ts),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:z,disabled:!S.value||x.value.length===0,title:"Expand All Clauses"}," ⬇️ Expand All ",8,_s),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:me,disabled:!S.value||x.value.length===0,title:"Collapse All Clauses"}," ⬆️ Collapse All ",8,Bs),o.withDirectives(o.createElementVNode("select",{"onUpdate:modelValue":B[0]||(B[0]=_=>f.value=_),class:"sql-format__dialect-select",title:"SQL Dialect"},B[1]||(B[1]=[o.createStaticVNode('<option value="sql" data-v-990d3559>SQL</option><option value="mysql" data-v-990d3559>MySQL</option><option value="postgresql" data-v-990d3559>PostgreSQL</option><option value="sqlite" data-v-990d3559>SQLite</option><option value="plsql" data-v-990d3559>PL/SQL</option><option value="tsql" data-v-990d3559>T-SQL</option>',6)]),512),[[o.vModelSelect,f.value]])]),o.createElementVNode("div",Ss,[S.value?(o.openBlock(),o.createElementBlock("span",Os," ✅ Valid SQL ")):(o.openBlock(),o.createElementBlock("span",ks," ❌ Invalid SQL "))])])):o.createCommentVNode("",!0),o.createElementVNode("div",Rs,[S.value?(o.openBlock(),o.createElementBlock("div",Fs,[x.value.length>0?(o.openBlock(),o.createElementBlock("div",Ps,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(x.value,_=>(o.openBlock(),o.createElementBlock("div",{key:_.path,class:"sql-format__clause"},[o.createElementVNode("div",{class:"sql-format__clause-header",onClick:L=>_.collapsible&&Y(_.path||"")},[_.collapsible?(o.openBlock(),o.createElementBlock("button",{key:0,class:"sql-format__toggle-btn",onClick:o.withModifiers(L=>Y(_.path||""),["stop"]),title:ae(_.path||"")?"Collapse":"Expand"},[o.createElementVNode("span",{class:o.normalizeClass(["sql-format__toggle-icon",{"sql-format__toggle-icon--expanded":ae(_.path||"")}])},"▶",2)],8,Vs)):(o.openBlock(),o.createElementBlock("span",$s)),o.createElementVNode("div",Ms,[o.createElementVNode("pre",qs,[o.createElementVNode("code",{innerHTML:de(_)},null,8,Us)])])],8,Ls),ae(_.path||"")&&re(_)?(o.openBlock(),o.createElementBlock("div",Hs,[o.createElementVNode("pre",js,[o.createElementVNode("code",{innerHTML:K(re(_))},null,8,Ks)])])):o.createCommentVNode("",!0)]))),128))])):(o.openBlock(),o.createElementBlock("pre",Gs,[o.createElementVNode("code",{innerHTML:K(a.modelValue)},null,8,Xs)]))])):(o.openBlock(),o.createElementBlock("div",Is,[B[2]||(B[2]=o.createElementVNode("h4",null,"SQL Parse Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(u.value),1)]))])],2))}}),[["__scopeId","data-v-990d3559"]]),zs=[Ft],Ys={install:n=>{zs.forEach(t=>{const r=t.name||t.__name||"UnknownComponent";n.component(r,t)})}};We.JsonFormat=Ft,We.SqlFormat=Ws,We.XmlFormat=gs,We.default=Ys,Object.defineProperties(We,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});