lone-format 0.9.6 → 0.9.9

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,55 +1,65 @@
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 I{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+I.version}static addUnaryOp(t){return I.max_unop_len=Math.max(t.length,I.max_unop_len),I.unary_ops[t]=1,I}static addBinaryOp(t,r,a){return I.max_binop_len=Math.max(t.length,I.max_binop_len),I.binary_ops[t]=r,a?I.right_associative.add(t):I.right_associative.delete(t),I}static addIdentifierChar(t){return I.additional_identifier_chars.add(t),I}static addLiteral(t,r){return I.literals[t]=r,I}static removeUnaryOp(t){return delete I.unary_ops[t],t.length===I.max_unop_len&&(I.max_unop_len=I.getMaxKeyLen(I.unary_ops)),I}static removeAllUnaryOps(){return I.unary_ops={},I.max_unop_len=0,I}static removeIdentifierChar(t){return I.additional_identifier_chars.delete(t),I}static removeBinaryOp(t){return delete I.binary_ops[t],t.length===I.max_binop_len&&(I.max_binop_len=I.getMaxKeyLen(I.binary_ops)),I.right_associative.delete(t),I}static removeAllBinaryOps(){return I.binary_ops={},I.max_binop_len=0,I}static removeLiteral(t){return delete I.literals[t],I}static removeAllLiterals(){return I.literals={},I}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 I(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 I.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!I.binary_ops[String.fromCharCode(t)]||I.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return I.isIdentifierStart(t)||I.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(I.hooks[t]){const a={context:this,node:r};return I.hooks.run(t,a),a.node}return r}searchHook(t){if(I.hooks[t]){const r={context:this};return I.hooks[t].find(function(a){return a.call(r.context,r),r.node}),r.node}}gobbleSpaces(){let t=this.code;for(;t===I.SPACE_CODE||t===I.TAB_CODE||t===I.LF_CODE||t===I.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:I.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===I.SEMCOL_CODE||a===I.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,I.max_binop_len),r=t.length;for(;r>0;){if(I.binary_ops.hasOwnProperty(t)&&(!I.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!I.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,c,b,p,m;if(c=this.gobbleToken(),!c||(r=this.gobbleBinaryOp(),!r))return c;for(u={value:r,prec:I.binaryPrecedence(r),right_a:I.right_associative.has(r)},b=this.gobbleToken(),b||this.throwError("Expected expression after "+r),i=[c,u,b];r=this.gobbleBinaryOp();){if(a=I.binaryPrecedence(r),a===0){this.index-=r.length;break}u={value:r,prec:a,right_a:I.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]);)b=i.pop(),r=i.pop().value,c=i.pop(),t={type:I.BINARY_EXP,operator:r,left:c,right:b},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:I.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,I.isDecimalDigit(t)||t===I.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===I.SQUOTE_CODE||t===I.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(t===I.OBRACK_CODE)i=this.gobbleArray();else{for(r=this.expr.substr(this.index,I.max_unop_len),a=r.length;a>0;){if(I.unary_ops.hasOwnProperty(r)&&(!I.isIdentifierStart(this.code)||this.index+r.length<this.expr.length&&!I.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:I.UNARY_EXP,operator:r,argument:u,prefix:!0})}r=r.substr(0,--a)}I.isIdentifierStart(t)?(i=this.gobbleIdentifier(),I.literals.hasOwnProperty(i.name)?i={type:I.LITERAL,value:I.literals[i.name],raw:i.name}:i.name===I.this_str&&(i={type:I.THIS_EXP})):t===I.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===I.PERIOD_CODE||r===I.OBRACK_CODE||r===I.OPAREN_CODE||r===I.QUMARK_CODE;){let a;if(r===I.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==I.PERIOD_CODE)break;a=!0,this.index+=2,this.gobbleSpaces(),r=this.code}this.index++,r===I.OBRACK_CODE?(t={type:I.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),r=this.code,r!==I.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):r===I.OPAREN_CODE?t={type:I.CALL_EXP,arguments:this.gobbleArguments(I.CPAREN_CODE),callee:t}:(r===I.PERIOD_CODE||a)&&(a&&this.index--,this.gobbleSpaces(),t={type:I.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(;I.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===I.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);I.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++));I.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);I.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+t+this.char+")")}return a=this.code,I.isIdentifierStart(a)?this.throwError("Variable names cannot start with a number ("+t+this.char+")"):(a===I.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===I.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:I.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:I.LITERAL,value:t,raw:this.expr.substring(r,this.index)}}gobbleIdentifier(){let t=this.code,r=this.index;for(I.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,I.isIdentifierPart(t));)this.index++;return{type:I.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===I.CPAREN_CODE&&i&&i>=r.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(u===I.COMMA_CODE){if(this.index++,i++,i!==r.length){if(t===I.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===I.CBRACK_CODE)for(let c=r.length;c<i;c++)r.push(null)}}else if(r.length!==i&&i!==0)this.throwError("Expected comma");else{const c=this.gobbleExpression();(!c||c.type===I.COMPOUND)&&this.throwError("Expected comma"),r.push(c)}}return a||this.throwError("Expected "+String.fromCharCode(t)),r}gobbleGroup(){this.index++;let t=this.gobbleExpressions(I.CPAREN_CODE);if(this.code===I.CPAREN_CODE)return this.index++,t.length===1?t[0]:t.length?{type:I.SEQUENCE_EXP,expressions:t}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:I.ARRAY_EXP,elements:this.gobbleArguments(I.CBRACK_CODE)}}}const ur=new ir;Object.assign(I,{hooks:ur,plugins:new ar(I),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"}),I.max_unop_len=I.getMaxKeyLen(I.unary_ops),I.max_binop_len=I.getMaxKeyLen(I.binary_ops);const Ze=n=>new I(n).parse(),lr=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(I).filter(n=>!lr.includes(n)&&Ze[n]===void 0).forEach(n=>{Ze[n]=I[n]}),Ze.Jsep=I;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 c=a;for(;c.right.operator&&n.binary_ops[c.right.operator]<=.9;)c=c.right;r.node.test=c.right,c.right=r.node,r.node=a}}else this.throwError("Expected :")}})}};Ze.plugins.register(fr);const kt=47,dr=92;var pr={name:"regex",init(n){n.hooks.add("gobble-token",function(r){if(this.code===kt){const a=++this.index;let i=!1;for(;this.index<this.expr.length;){if(this.code===kt&&!i){const u=this.expr.slice(a,this.index);let c="";for(;++this.index<this.expr.length;){const p=this.code;if(p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57)c+=this.char;else break}let b;try{b=new RegExp(u,c)}catch(p){this.throwError(p.message)}return r.node={type:n.LITERAL,value:b,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(c=>c===u&&c===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(c=>c===u&&c===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__"]),Te={evalAst(n,t){switch(n.type){case"BinaryExpression":case"LogicalExpression":return Te.evalBinaryExpression(n,t);case"Compound":return Te.evalCompound(n,t);case"ConditionalExpression":return Te.evalConditionalExpression(n,t);case"Identifier":return Te.evalIdentifier(n,t);case"Literal":return Te.evalLiteral(n,t);case"MemberExpression":return Te.evalMemberExpression(n,t);case"UnaryExpression":return Te.evalUnaryExpression(n,t);case"ArrayExpression":return Te.evalArrayExpression(n,t);case"CallExpression":return Te.evalCallExpression(n,t);case"AssignmentExpression":return Te.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](Te.evalAst(n.left,t),()=>Te.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=Te.evalAst(i,t)}return r},evalConditionalExpression(n,t){return Te.evalAst(n.test,t)?Te.evalAst(n.consequent,t):Te.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?Te.evalAst(n.property):n.property.name),a=Te.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=>-Te.evalAst(a,t),"!":a=>!Te.evalAst(a,t),"~":a=>~Te.evalAst(a,t),"+":a=>+Te.evalAst(a,t),typeof:a=>typeof Te.evalAst(a,t)}[n.operator](n.argument)},evalArrayExpression(n,t){return n.elements.map(r=>Te.evalAst(r,t))},evalCallExpression(n,t){const r=n.arguments.map(i=>Te.evalAst(i,t));return Te.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=Te.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 Te.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(c){if(!c.avoidNew)throw c;return c.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 c={path:u?n.path:t};u?"json"in n&&(c.json=n.json):c.json=r;const b=this.evaluate(c);if(!b||typeof b!="object")throw new gr(b);return b}}we.prototype.evaluate=function(n,t,r,a){let i=this.parent,u=this.parentProperty,{flatten:c,wrap:b}=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),c=Object.hasOwn(n,"flatten")?n.flatten:c,this.currResultType=Object.hasOwn(n,"resultType")?n.resultType:this.currResultType,this.currSandbox=Object.hasOwn(n,"sandbox")?n.sandbox:this.currSandbox,b=Object.hasOwn(n,"wrap")?n.wrap:b,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?!b&&m.length===1&&!m[0].hasArrExpr?this._getPreferredOutput(m[0]):m.reduce((_,D)=>{const V=this._getPreferredOutput(D);return c&&Array.isArray(V)?_=_.concat(V):_.push(V),_},[]):b?[]: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,c,b){let p;if(!n.length)return p={path:r,value:t,parent:a,parentProperty:i,hasArrExpr:c},this._handleCallback(p,u,"value"),p;const m=n[0],_=n.slice(1),D=[];function V(j){Array.isArray(j)?j.forEach(Y=>{D.push(Y)}):D.push(j)}if((typeof m!="string"||b)&&t&&Object.hasOwn(t,m))V(this._trace(_,t[m],rt(r,m),t,m,u,c));else if(m==="*")this._walk(t,j=>{V(this._trace(_,t[j],rt(r,j),t,j,u,!0,!0))});else if(m==="..")V(this._trace(_,t,r,a,i,u,c)),this._walk(t,j=>{typeof t[j]=="object"&&V(this._trace(n.slice(),t[j],rt(r,j),t,j,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==="$")V(this._trace(_,t,r,null,null,u,c));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(m))V(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 j=m.replace(/^\?\((.*?)\)$/u,"$1"),Y=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(j);Y?this._walk(t,ie=>{const v=[Y[2]],H=Y[1]?t[ie][Y[1]]:t[ie];this._trace(v,H,r,a,i,u,!0).length>0&&V(this._trace(_,t[ie],rt(r,ie),t,ie,u,!0))}):this._walk(t,ie=>{this._eval(j,t[ie],ie,r,a,i)&&V(this._trace(_,t[ie],rt(r,ie),t,ie,u,!0))})}else if(m[0]==="("){if(this.currEval===!1)throw new Error("Eval [(expr)] prevented in JSONPath expression.");V(this._trace(Dt(this._eval(m,t,r.at(-1),r.slice(0,-1),a,i),_),t,r,a,i,u,c))}else if(m[0]==="@"){let j=!1;const Y=m.slice(1,-2);switch(Y){case"scalar":(!t||!["object","function"].includes(typeof t))&&(j=!0);break;case"boolean":case"string":case"undefined":case"function":typeof t===Y&&(j=!0);break;case"integer":Number.isFinite(t)&&!(t%1)&&(j=!0);break;case"number":Number.isFinite(t)&&(j=!0);break;case"nonFinite":typeof t=="number"&&!Number.isFinite(t)&&(j=!0);break;case"object":t&&typeof t===Y&&(j=!0);break;case"array":Array.isArray(t)&&(j=!0);break;case"other":j=this.currOtherTypeCallback(t,r,a,i);break;case"null":t===null&&(j=!0);break;default:throw new TypeError("Unknown value type "+Y)}if(j)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 j=m.slice(1);V(this._trace(_,t[j],rt(r,j),t,j,u,c,!0))}else if(m.includes(",")){const j=m.split(",");for(const Y of j)V(this._trace(Dt(Y,_),t,r,a,i,u,!0))}else!b&&t&&Object.hasOwn(t,m)&&V(this._trace(_,t[m],rt(r,m),t,m,u,c,!0))}if(this._hasParentSelector)for(let j=0;j<D.length;j++){const Y=D[j];if(Y&&Y.isParentSelector){const ie=this._trace(Y.expr,t,Y.path,a,i,u,c);if(Array.isArray(ie)){D[j]=ie[0];const v=ie.length;for(let H=1;H<v;H++)j++,D.splice(j,0,ie[H])}else D[j]=ie}}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,c){if(!Array.isArray(r))return;const b=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])||b;_=_<0?Math.max(0,_+b):Math.min(b,_),D=D<0?Math.max(0,D+b):Math.min(b,D);const V=[];for(let j=_;j<D;j+=m)this._trace(Dt(j,t),r,a,i,u,c,!0).forEach(ie=>{V.push(ie)});return V},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 c=n.includes("@path");c&&(this.currSandbox._$_path=we.toPathString(a.concat([r])));const b=this.currEval+"Script:"+n;if(!we.cache[b]){let p=n.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");if(c&&(p=p.replaceAll("@path","_$_path")),this.currEval==="safe"||this.currEval===!0||this.currEval===void 0)we.cache[b]=new this.safeVm.Script(p);else if(this.currEval==="native")we.cache[b]=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[b]=new m(p)}else if(typeof this.currEval=="function")we.cache[b]={runInNewContext:m=>this.currEval(p,m)};else throw new TypeError(`Unknown "eval" property "${this.currEval}"`)}try{return we.cache[b].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,c){return"[#"+(r.push(c)-1)+"]"}).replaceAll(/\[['"]([^'\]]*)['"]\]/gu,function(u,c){return"['"+c.replaceAll(".","%@%").replaceAll("~","%%@@%%")+"']"}).replaceAll("~",";~;").replaceAll(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu,";").replaceAll("%@%",".").replaceAll("%%@@%%","~").replaceAll(/(?:;)?(\^+)(?:;)?/gu,function(u,c){return";"+c.split("").join(";")+";"}).replaceAll(/;;;|;;/gu,";..;").replaceAll(/;$|'?\]|'$/gu,"").split(";").map(function(u){const c=u.match(/#(\d+)/u);return!c||!c[1]?u:r[c[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 b=r.lastIndexOf(";"),p=b!==-1?r.slice(0,b+1)+" return "+r.slice(b+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"},_r={key:0,class:"json-node__children"},Tr={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(x=>({"2a18b018":x.level,"58a14b93":x.theme.colors.syntaxKey,"46fe1b3e":x.theme.colors.hoverBackground,fbe2c048:x.theme.colors.syntaxBracket,"4bd524bb":x.theme.colors.collapsedText,"3308d23c":x.theme.colors.collapsedBackground,"36380c60":x.theme.colors.collapsedBackgroundHover,"0892365d":x.theme.colors.syntaxString,"0015b195":x.theme.colors.syntaxNumber,"7db95f5c":x.theme.colors.syntaxBoolean,"88ec825a":x.theme.colors.syntaxNull,"537157f7":x.theme.colors.background,"3cee3331":x.theme.colors.selectionBackground,"81323cee":x.theme.colors.indentLine}));const r=n,a=t,i=o.ref(!1),u=o.ref(!1),c=o.ref(""),b=o.ref(""),p=o.ref("string"),m=o.ref(null),_=o.ref(null),D=x=>x!==null&&typeof x=="object"&&!Array.isArray(x)&&"__protected_number__"in x&&Object.keys(x).length===1,V=x=>D(x)?x.__protected_number__:"",j=o.computed(()=>D(r.value)?!1:r.value!==null&&typeof r.value=="object"),Y=o.computed(()=>Array.isArray(r.value)),ie=o.computed(()=>r.path?r.path:r.keyName?r.keyName:"root"),v=o.computed(()=>r.expanded.has(ie.value)),H=o.computed(()=>r.keyName),K=o.computed(()=>Y.value?"[":"{"),$=o.computed(()=>Y.value?"]":"}"),ae=o.computed(()=>{if(!r.value)return"";const B=Object.keys(r.value).length;return Y.value?B>0?` ${B} items `:" ":B>0?` ${B} keys `:" "}),ee=o.computed(()=>{const x=typeof r.value;return r.value===null?"json-node__value--null":x==="boolean"?"json-node__value--boolean":x==="number"||D(r.value)?"json-node__value--number":x==="string"?"json-node__value--string":""}),U=o.computed(()=>r.value===null?"null":typeof r.value=="boolean"||typeof r.value=="number"?String(r.value):D(r.value)?V(r.value):typeof r.value=="string"?`"${r.value}"`:String(r.value)),A=o.computed(()=>"Double-click to edit"),te=x=>r.level===0?x:ie.value?`${ie.value}.${x}`:x,N=x=>{const B=Object.keys(r.value);return B.indexOf(x)===B.length-1},T=()=>{a("toggle-expand",ie.value)},q=()=>{r.level!==0&&(i.value=!0,c.value=r.keyName,o.nextTick(()=>{if(m.value){m.value.focus();const x=document.createRange();x.selectNodeContents(m.value);const B=window.getSelection();B?.removeAllRanges(),B?.addRange(x)}}))},W=()=>{j.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)?b.value=V(r.value):typeof r.value=="string"?b.value=r.value:b.value=String(r.value),o.nextTick(()=>{if(_.value){_.value.focus();const x=document.createRange();x.selectNodeContents(_.value);const B=window.getSelection();B?.removeAllRanges(),B?.addRange(x)}}))},M=()=>{if(r.level===0||!i.value)return;const x=m.value?.innerText.trim()||"";if(!x){he();return}if(x===r.keyName){i.value=!1;return}i.value=!1,a("update:key",ie.value,x)},de=()=>{if(u.value)try{let x;const B=_.value?.innerText.trim()||"";if(p.value==="string")B==="null"?x=null:B==="true"||B==="false"?x=B==="true":x=B;else if(p.value==="protected-number")x={__protected_number__:B};else if(B==="null")x=null;else if(B==="true"||B==="false")x=B==="true";else if(!isNaN(Number(B))&&B!==""){const X=Number(B);!Number.isSafeInteger(X)||B.length>15?x={__protected_number__:B}:x=X}else x=B;a("update:value",ie.value,x),u.value=!1}catch(x){console.error("Failed to parse value:",x),u.value=!1}},he=()=>{i.value=!1,c.value=r.keyName},ye=()=>{u.value=!1,D(r.value)?b.value=V(r.value):typeof r.value=="string"?b.value=r.value:b.value=String(r.value)};return(x,B)=>{const X=o.resolveComponent("JsonNode",!0);return o.openBlock(),o.createElementBlock("div",br,[j.value?(o.openBlock(),o.createElementBlock("div",Ar,[o.createElementVNode("div",xr,[x.keyName?(o.openBlock(),o.createElementBlock("span",{key:0,class:"json-node__key",contenteditable:i.value,onDblclick:q,onKeydown:[o.withKeys(o.withModifiers(M,["prevent"]),["enter"]),o.withKeys(he,["escape"])],onBlur:M,ref_key:"keyRef",ref:m,title:"Double-click to edit key"},o.toDisplayString(i.value?c.value:`"${H.value}"`),41,Nr)):o.createCommentVNode("",!0),x.keyName?(o.openBlock(),o.createElementBlock("span",Cr,": ")):o.createCommentVNode("",!0),o.createElementVNode("span",{class:"json-node__bracket json-node__bracket--clickable",onClick:T,title:v.value?"Click to collapse":"Click to expand"},o.toDisplayString(K.value),9,Dr),v.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",{key:2,class:"json-node__collapsed-info",onClick:T,title:`Click to expand ${ae.value.trim()}`},o.toDisplayString(ae.value),9,vr)),v.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",{key:3,class:"json-node__bracket json-node__bracket--clickable",onClick:T,title:"Click to expand"},o.toDisplayString($.value),1)),!v.value&&!x.isLast?(o.openBlock(),o.createElementBlock("span",wr,",")):o.createCommentVNode("",!0)]),v.value?(o.openBlock(),o.createElementBlock("div",_r,[o.createElementVNode("div",Tr,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(x.value,(Z,F)=>(o.openBlock(),o.createElementBlock("div",{key:F,class:"json-node__child"},[o.createVNode(X,{value:Z,"key-name":Y.value?"":String(F),level:x.level+1,path:te(String(F)),expanded:x.expanded,theme:x.theme,"onUpdate:value":B[0]||(B[0]=(le,w)=>x.$emit("update:value",le,w)),onToggleExpand:B[1]||(B[1]=le=>x.$emit("toggle-expand",le)),onCopy:B[2]||(B[2]=le=>x.$emit("copy",le)),"onUpdate:key":B[3]||(B[3]=(le,w)=>x.$emit("update:key",le,w)),"is-last":N(String(F))},null,8,["value","key-name","level","path","expanded","theme","is-last"])]))),128))]),o.createElementVNode("div",Br,[o.createElementVNode("span",Sr,o.toDisplayString($.value),1),x.isLast?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Or,","))])])):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",kr,[x.keyName?(o.openBlock(),o.createElementBlock("span",{key:0,class:"json-node__key",contenteditable:i.value,onDblclick:q,onKeydown:[o.withKeys(o.withModifiers(M,["prevent"]),["enter"]),o.withKeys(he,["escape"])],onBlur:M,ref_key:"keyRef",ref:m,title:"Double-click to edit key"},o.toDisplayString(i.value?c.value:`"${H.value}"`),41,Rr)):o.createCommentVNode("",!0),x.keyName?(o.openBlock(),o.createElementBlock("span",Ir,": ")):o.createCommentVNode("",!0),o.createElementVNode("span",{class:o.normalizeClass(["json-node__value-wrapper",ee.value]),onDblclick:W,title:A.value},[o.createElementVNode("span",{class:"json-node__value",contenteditable:u.value,onKeydown:[o.withKeys(o.withModifiers(de,["prevent"]),["enter"]),o.withKeys(ye,["escape"])],onBlur:de,ref_key:"valueRef",ref:_},o.toDisplayString(u.value?b.value:U.value),41,Pr),x.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"]]),Rt={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":Rt,"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 Ur(n="github-light"){return Mr[n]||Rt}const qr={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"},It=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(w=>({"0e2b28fa":V.value.colors.border,f3d81a08:V.value.colors.background,"0af7d57b":V.value.colors.text,"5ee5c82d":V.value.colors.surfaceBackground,ff458768:V.value.colors.buttonBorder,c0efe564:V.value.colors.buttonBackground,"2a4ad566":V.value.colors.buttonText,e48626e4:V.value.colors.buttonBackgroundHover,"748549e2":V.value.colors.buttonPrimary,a39b270c:V.value.colors.buttonPrimaryHover,"61cd2ffa":V.value.colors.successBackground,"43ed24f5":V.value.colors.success,"9c8a2770":V.value.colors.errorBackground,"53354b7a":V.value.colors.error}));const a=n,i=r,u=o.ref(null),c=o.ref(""),b=o.ref(new Set),p=o.ref(null),m=o.ref(""),_=o.ref(!1),D=o.computed(()=>c.value===""),V=o.computed(()=>Ur(a.theme)),j=w=>{if(w==null)return w;if(Array.isArray(w))return w.map(k=>j(k));if(typeof w=="object"){const k={},L=Object.keys(w).sort();for(const G of L)k[G]=j(w[G]);return k}return w},Y=o.computed(()=>{const w=p.value!==null?p.value:u.value;return!w||!_.value?w:j(w)}),ie=o.computed(()=>m.value?null:Y.value),v=w=>{if(!w.trim()){u.value=null,c.value="",p.value=null,m.value="";return}try{let k=w;const L=/(:\s*|,\s*|\[\s*)-?\d{16,}/.test(k),G=/(:\s*|,\s*|\[\s*)-?\d+\.\d*0+\s*[,}\]\s]*/.test(k);if(!L&&!G)try{u.value=JSON.parse(k),c.value="",p.value=null,m.value="",o.nextTick(()=>{ie.value!==null&&W()});return}catch{}k=(R=>{let J="",ge=!1,Ee=!1,_e=0;for(;_e<R.length;){const ke=R[_e];if(ge)Ee?Ee=!1:ke==="\\"?Ee=!0:ke==='"'&&(ge=!1),J+=ke,_e++;else if(ke==='"')ge=!0,J+=ke,_e++;else{const De=R.slice(_e);let z=De.match(/^([:,\[\s]*)(-?\d{16,})(\s*[,\}\]\s]|$)/);if(z){J+=z[1]+'{"__protected_number__":"'+z[2]+'"}'+z[3],_e+=z[0].length;continue}if(z=De.match(/^([:,\[\s]*)(-?\d+\.\d*0+)(\s*[,\}\]\s]|$)/),z){J+=z[1]+'{"__protected_number__":"'+z[2]+'"}'+z[3],_e+=z[0].length;continue}J+=ke,_e++}}return J})(k),u.value=JSON.parse(k),c.value="",p.value=null,m.value="",o.nextTick(()=>{ie.value!==null&&W()})}catch(k){c.value=k instanceof Error?k.message:"Unknown parsing error",u.value=null,p.value=null,m.value=""}},H=w=>{if(!w||!w.expression.trim()){ee();return}if(!u.value){m.value="No valid JSON data to filter";return}try{let k;if(w.type==="jsonpath")k=we({path:w.expression,json:u.value}),k.length===1&&w.expression.includes("$[")===!1&&!w.expression.endsWith("[*]")?p.value=k[0]:p.value=k;else if(w.type==="js"){const{proxyData:L,indexMap:G}=K(u.value),R=new Function("$",`
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("$",`
3
3
  try {
4
- return ${w.expression};
4
+ return ${C.expression};
5
5
  } catch (error) {
6
6
  throw new Error('JavaScript expression error: ' + error.message);
7
7
  }
8
- `)(L);k=$(u.value,R,G),p.value=k}else throw new Error(`Unsupported filter type: ${w.type}`);m.value="",o.nextTick(()=>{W()})}catch(k){m.value=k instanceof Error?k.message:"Filter execution error",p.value=null}},K=(w,k="root")=>{const L=new Map,G=(R,J)=>{if(R==null)return R;if(typeof R=="object"&&R.__protected_number__!==void 0){const ge=parseFloat(R.__protected_number__);return L.set(ge,J),ge}if(Array.isArray(R)){const ge=R.map((Ee,_e)=>{const ke=`${J}[${_e}]`,De=G(Ee,ke);return L.set(De,ke),De});return L.set(ge,J),ge}if(typeof R=="object"){const ge={};for(const Ee in R)if(Object.prototype.hasOwnProperty.call(R,Ee)){const _e=J==="root"?Ee:`${J}.${Ee}`;ge[Ee]=G(R[Ee],_e)}return L.set(ge,J),ge}return R};return{proxyData:G(w,k),indexMap:L}},$=(w,k,L)=>{if(k===null||typeof k!="object")return k;if(Array.isArray(k))return k.map(R=>{const J=L.get(R);if(J){const ge=ae(w,J);if(ge!==void 0)return ge}return $(w,R,L)});const G=L.get(k);if(G){const R=ae(w,G);if(R!==void 0)return R}const Q={};for(const R in k)Object.prototype.hasOwnProperty.call(k,R)&&(Q[R]=$(w,k[R],L));return Q},ae=(w,k)=>{if(k==="root")return w;const L=[];let G=k.replace(/^root\.?/,"");const Q=/([^\[\].]+)|\[(\d+)\]/g;let R;for(;(R=Q.exec(G))!==null;)R[1]?L.push(R[1]):R[2]!==void 0&&L.push(parseInt(R[2]));let J=w;for(const ge of L){if(J==null)return;J=J[ge]}return J},ee=()=>{p.value=null,m.value=""},U=()=>{_.value=!0},A=()=>{_.value=!1};o.watch(()=>a.modelValue,w=>{v(w)},{immediate:!0});const te=(w,k,L)=>{const G=J=>{if(J===null||typeof J!="object")return J;if(!Array.isArray(J)&&"__protected_number__"in J&&Object.keys(J).length===1)return`__PROTECTED_NUMBER_${J.__protected_number__}_PROTECTED_NUMBER__`;if(Array.isArray(J))return J.map(Ee=>G(Ee));const ge={};for(const[Ee,_e]of Object.entries(J))ge[Ee]=G(_e);return ge},Q=G(w);return JSON.stringify(Q,k,L).replace(/"__PROTECTED_NUMBER_(.+?)_PROTECTED_NUMBER__"/g,"$1")},N=(w,k)=>{if(!a.readonly)try{const L=T(u.value,w,k),G=te(L,null,2);i("update:modelValue",G)}catch(L){console.error("Failed to update JSON:",L)}},T=(w,k,L)=>{if(!k||k==="root")return L;const G=k.split("."),Q=X(w,G.slice(0,-1));let R=Q;for(let ge=0;ge<G.length-1;ge++){const Ee=G[ge];Ee!=="root"&&(Array.isArray(R)?R=R[parseInt(Ee)]:R=R[Ee])}const J=G[G.length-1];return J==="root"?L:(Array.isArray(R)?R[parseInt(J)]=L:R[J]=L,Q)},q=w=>{b.value.has(w)?b.value.delete(w):b.value.add(w)},W=()=>{const w=new Set,k=(L,G="")=>{L!==null&&typeof L=="object"&&(w.add(G||"root"),Array.isArray(L)?L.forEach((Q,R)=>{const J=G?`${G}.${R}`:`${R}`;k(Q,J)}):Object.keys(L).forEach(Q=>{const R=G?`${G}.${Q}`:Q;k(L[Q],R)}))};k(ie.value),b.value=w,i("expand-all")},M=()=>{b.value=new Set(["root"]),i("collapse-all")},de=async()=>{if(D.value)try{const w=ie.value,k=te(w,null,2);await navigator.clipboard.writeText(k),i("copy-success",k)}catch(w){console.error("Failed to copy JSON:",w),i("copy-error",w instanceof Error?w:new Error("Failed to copy JSON"))}},he=()=>{if(D.value)try{const w=ie.value,k=te(w);i("update:modelValue",k),i("compress",k)}catch(w){console.error("Failed to compress JSON:",w)}},ye=async w=>{try{let k;typeof w=="object"&&w!==null&&!Array.isArray(w)&&"__protected_number__"in w&&Object.keys(w).length===1?k=w.__protected_number__:typeof w=="string"?k=`"${w}"`:k=JSON.stringify(w),await navigator.clipboard.writeText(k)}catch(k){console.error("Failed to copy value:",k)}},x=(w,k)=>{if(!a.readonly)try{const L=B(u.value,w,k),G=te(L,null,2);i("update:modelValue",G),le(w,k)}catch(L){console.error("Failed to rename key:",L)}},B=(w,k,L)=>{if(!k||k==="root")return w;const G=k.split("."),Q=X(w,G.slice(0,-1));if(G.length===1){const ge=G[0];return Q&&typeof Q=="object"&&!Array.isArray(Q)?Z(Q,ge,L):Q}let R=Q;for(let ge=0;ge<G.length-1;ge++){const Ee=G[ge];Array.isArray(R)?R=R[parseInt(Ee)]:R=R[Ee]}const J=G[G.length-1];if(!Array.isArray(R)&&R&&typeof R=="object"){const ge=Z(R,J,L),Ee=G.slice(0,-1);Ee.length>0&&F(Q,Ee,ge)}return Q},X=(w,k)=>{if(k.length===0)return w;if(Array.isArray(w)){const L=[...w],G=k[0],Q=parseInt(G);return k.length===1||(L[Q]=X(w[Q],k.slice(1))),L}else if(w&&typeof w=="object"){const L={...w},G=k[0];return k.length===1||(L[G]=X(w[G],k.slice(1))),L}return w},Z=(w,k,L)=>{if(!w||typeof w!="object"||Array.isArray(w))return w;const G=Object.keys(w),Q={};for(const R of G)R===k?Q[L]=w[R]:Q[R]=w[R];return Q},F=(w,k,L)=>{let G=w;for(let R=0;R<k.length-1;R++){const J=k[R];Array.isArray(G)?G=G[parseInt(J)]:G=G[J]}const Q=k[k.length-1];Array.isArray(G)?G[parseInt(Q)]=L:G[Q]=L},le=(w,k)=>{const L=new Set;b.value.forEach(G=>{if(G===w){const Q=w.split(".");Q[Q.length-1]=k,L.add(Q.join("."))}else if(G.startsWith(w+".")){const Q=w.split(".");Q[Q.length-1]=k;const R=Q.join("."),J=G.substring(w.length);L.add(R+J)}else L.add(G)}),b.value=L};return t({copyJson:de,compressSource:he,expandAll:W,collapseAll:M,toggleExpand:q,updateValue:N,updateKey:x,filter:H,clearFilter:ee,sortKeys:U,clearSortKeys:A,isSorted:()=>_.value,isValidJson:()=>D.value,getParsedJson:()=>u.value,getFilteredJson:()=>p.value,getExpandedNodes:()=>b.value,getParseError:()=>c.value,getFilterError:()=>m.value,parseJson:w=>v(w),copyValue:w=>ye(w)}),(w,k)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["json-format",`json-format--${V.value.name}`])},[w.showToolbar?(o.openBlock(),o.createElementBlock("div",qr,[o.createElementVNode("div",Hr,[o.createElementVNode("button",{class:"json-format__btn json-format__btn--primary",onClick:de,disabled:!D.value,title:"Copy JSON"}," 📋 Copy ",8,jr),o.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:W,disabled:!D.value,title:"Expand All"}," ⬇️ Expand All ",8,Kr),o.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:M,disabled:!D.value,title:"Collapse All"}," ➡️ Collapse All ",8,Gr),o.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:he,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,[k[1]||(k[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:ie.value,"key-name":"",level:0,expanded:b.value,"is-last":!0,theme:V.value,"onUpdate:value":N,onToggleExpand:q,onCopy:ye,"onUpdate:key":x},null,8,["value","expanded","theme"])])):(o.openBlock(),o.createElementBlock("div",Zr,[k[0]||(k[0]=o.createElementVNode("h4",null,"JSON Parse Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(c.value),1)]))])],2))}}),[["__scopeId","data-v-94157be3"]]);function tn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var vt={},Ft;function rn(){return Ft||(Ft=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},c=function(e){return e&&u(e.nodeType)&&typeof e.nodeName=="string"};function b(e){var s=Array.prototype.slice,d=e.length,E=function(C,oe){return function(){return oe.apply(this,C.concat(s.call(arguments)))}},h=function(){var C=s.call(arguments);return C.length<d?E(C,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 E=s;return p(function(h,C){E=e(E,h,C)},d),E},_=function(e,s){var d=new Array(s.length);return p(function(E,h){d[h]=e(E)},s),d},D=function(e,s){var d=[];return p(function(E,h){e(E,h)&&d.push(E)},s),d},V=function(e,s){for(var d=0;d<e.length;d+=1)if(e[d]===s)return!0;return!1};function j(e){return function(){return e}}function Y(e){return e.toString()}var ie=function(e,s){return s.join(e)},v=function(e,s,d){return e+d+s},H=Array.prototype.concat,K=function(e,s){var d=new ue;d.addArray(e);var E=d.toArray();return s?E.reverse():E},$=32767;function ae(e){for(var s=[],d=0;d<e.length;d+=$){var E=e.slice(d,d+$);s=H.apply(s,E)}return s}function ee(e,s){for(var d=Object(e),E=1;E<arguments.length;E++){var h=arguments[E];if(h!=null)for(var C in h)Object.prototype.hasOwnProperty.call(h,C)&&(d[C]=h[C])}return d}var U={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};A.prototype=new Object,A.prototype.constructor=A,A.superclass=Object.prototype;function A(){this.init()}A.prototype.init=function(){this.reduceActions=[],this.reduceActions[3]=function(e){return new de(e[0],e[2])},this.reduceActions[5]=function(e){return new he(e[0],e[2])},this.reduceActions[7]=function(e){return new ye(e[0],e[2])},this.reduceActions[8]=function(e){return new x(e[0],e[2])},this.reduceActions[10]=function(e){return new B(e[0],e[2])},this.reduceActions[11]=function(e){return new X(e[0],e[2])},this.reduceActions[12]=function(e){return new Z(e[0],e[2])},this.reduceActions[13]=function(e){return new F(e[0],e[2])},this.reduceActions[15]=function(e){return new le(e[0],e[2])},this.reduceActions[16]=function(e){return new w(e[0],e[2])},this.reduceActions[18]=function(e){return new k(e[0],e[2])},this.reduceActions[19]=function(e){return new L(e[0],e[2])},this.reduceActions[20]=function(e){return new G(e[0],e[2])},this.reduceActions[22]=function(e){return new W(e[1])},this.reduceActions[24]=function(e){return new Q(e[0],e[2])},this.reduceActions[25]=function(e){return new R(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 z(z.DESCENDANTORSELF,y.nodeTest,[])),e[0]},this.reduceActions[29]=function(e){return new R(e[0],[],void 0)},this.reduceActions[30]=function(e){return fe.instance_of(e[0],R)?(e[0].filterPredicates==null&&(e[0].filterPredicates=[]),e[0].filterPredicates.push(e[1]),e[0]):new R(e[0],[e[1]],void 0)},this.reduceActions[32]=function(e){return e[1]},this.reduceActions[33]=function(e){return new O(e[0])},this.reduceActions[34]=function(e){return new P(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 z(e[0],e[1],[])},this.reduceActions[50]=function(e){return new z(z.CHILD,e[0],[])},this.reduceActions[51]=function(e){return new z(e[0],e[1],e[2])},this.reduceActions[52]=function(e){return new z(z.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"?z.ANCESTOR:e[0]=="ancestor-or-self"?z.ANCESTORORSELF:e[0]=="attribute"?z.ATTRIBUTE:e[0]=="child"?z.CHILD:e[0]=="descendant"?z.DESCENDANT:e[0]=="descendant-or-self"?z.DESCENDANTORSELF:e[0]=="following"?z.FOLLOWING:e[0]=="following-sibling"?z.FOLLOWINGSIBLING:e[0]=="namespace"?z.NAMESPACE:e[0]=="parent"?z.PARENT:e[0]=="preceding"?z.PRECEDING:e[0]=="preceding-sibling"?z.PRECEDINGSIBLING:e[0]=="self"?z.SELF:-1},this.reduceActions[57]=function(e){return z.ATTRIBUTE},this.reduceActions[59]=function(e){return e[0]=="comment"?y.commentTest:e[0]=="text"?y.textTest:e[0]=="processing-instruction"?y.anyPiTest:e[0]=="node"?y.nodeTest:new y(-1,void 0)},this.reduceActions[60]=function(e){return new y.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 z(z.DESCENDANTORSELF,y.nodeTest,[])),e[1]},this.reduceActions[64]=function(e){return e[0].steps.push(new z(z.DESCENDANTORSELF,y.nodeTest,[])),e[0].steps.push(e[2]),e[0]},this.reduceActions[65]=function(e){return new z(z.SELF,y.nodeTest,[])},this.reduceActions[66]=function(e){return new z(z.PARENT,y.nodeTest,[])},this.reduceActions[67]=function(e){return new ne(e[1])},this.reduceActions[68]=function(e){return y.nameTestAny},this.reduceActions[69]=function(e){return new y.NameTestPrefixAny(e[0].split(":")[0])},this.reduceActions[70]=function(e){return new y.NameTestQName(e[0])}},A.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 "],A.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 "],A.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 "," "," "],A.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]],A.DOUBLEDOT=2,A.DOUBLECOLON=3,A.DOUBLESLASH=4,A.NOTEQUAL=5,A.LESSTHANOREQUAL=6,A.GREATERTHANOREQUAL=7,A.AND=8,A.OR=9,A.MOD=10,A.DIV=11,A.MULTIPLYOPERATOR=12,A.FUNCTIONNAME=13,A.AXISNAME=14,A.LITERAL=15,A.NUMBER=16,A.ASTERISKNAMETEST=17,A.QNAME=18,A.NCNAMECOLONASTERISK=19,A.NODETYPE=20,A.PROCESSINGINSTRUCTIONWITHLITERAL=21,A.EQUALS=22,A.LESSTHAN=23,A.GREATERTHAN=24,A.PLUS=25,A.MINUS=26,A.BAR=27,A.SLASH=28,A.LEFTPARENTHESIS=29,A.RIGHTPARENTHESIS=30,A.COMMA=31,A.AT=32,A.LEFTBRACKET=33,A.RIGHTBRACKET=34,A.DOT=35,A.DOLLAR=36,A.prototype.tokenize=function(e){for(var s=[],d=[],E=e+"\0",h=0,C=E.charAt(h++);;){for(;C==" "||C==" "||C=="\r"||C==`
9
- `;)C=E.charAt(h++);if(C=="\0"||h>=E.length)break;if(C=="("){s.push(A.LEFTPARENTHESIS),d.push(C),C=E.charAt(h++);continue}if(C==")"){s.push(A.RIGHTPARENTHESIS),d.push(C),C=E.charAt(h++);continue}if(C=="["){s.push(A.LEFTBRACKET),d.push(C),C=E.charAt(h++);continue}if(C=="]"){s.push(A.RIGHTBRACKET),d.push(C),C=E.charAt(h++);continue}if(C=="@"){s.push(A.AT),d.push(C),C=E.charAt(h++);continue}if(C==","){s.push(A.COMMA),d.push(C),C=E.charAt(h++);continue}if(C=="|"){s.push(A.BAR),d.push(C),C=E.charAt(h++);continue}if(C=="+"){s.push(A.PLUS),d.push(C),C=E.charAt(h++);continue}if(C=="-"){s.push(A.MINUS),d.push(C),C=E.charAt(h++);continue}if(C=="="){s.push(A.EQUALS),d.push(C),C=E.charAt(h++);continue}if(C=="$"){s.push(A.DOLLAR),d.push(C),C=E.charAt(h++);continue}if(C=="."){if(C=E.charAt(h++),C=="."){s.push(A.DOUBLEDOT),d.push(".."),C=E.charAt(h++);continue}if(C>="0"&&C<="9"){var oe="."+C;for(C=E.charAt(h++);C>="0"&&C<="9";)oe+=C,C=E.charAt(h++);s.push(A.NUMBER),d.push(oe);continue}s.push(A.DOT),d.push(".");continue}if(C=="'"||C=='"'){for(var xe=C,Ne="";h<E.length&&(C=E.charAt(h))!==xe;)Ne+=C,h+=1;if(C!==xe)throw Me.fromMessage("Unterminated string literal: "+xe+Ne);h+=1,s.push(A.LITERAL),d.push(Ne),C=E.charAt(h++);continue}if(C>="0"&&C<="9"){var oe=C;for(C=E.charAt(h++);C>="0"&&C<="9";)oe+=C,C=E.charAt(h++);if(C=="."&&E.charAt(h)>="0"&&E.charAt(h)<="9")for(oe+=C,oe+=E.charAt(h++),C=E.charAt(h++);C>="0"&&C<="9";)oe+=C,C=E.charAt(h++);s.push(A.NUMBER),d.push(oe);continue}if(C=="*"){if(s.length>0){var se=s[s.length-1];if(se!=A.AT&&se!=A.DOUBLECOLON&&se!=A.LEFTPARENTHESIS&&se!=A.LEFTBRACKET&&se!=A.AND&&se!=A.OR&&se!=A.MOD&&se!=A.DIV&&se!=A.MULTIPLYOPERATOR&&se!=A.SLASH&&se!=A.DOUBLESLASH&&se!=A.BAR&&se!=A.PLUS&&se!=A.MINUS&&se!=A.EQUALS&&se!=A.NOTEQUAL&&se!=A.LESSTHAN&&se!=A.LESSTHANOREQUAL&&se!=A.GREATERTHAN&&se!=A.GREATERTHANOREQUAL){s.push(A.MULTIPLYOPERATOR),d.push(C),C=E.charAt(h++);continue}}s.push(A.ASTERISKNAMETEST),d.push(C),C=E.charAt(h++);continue}if(C==":"&&E.charAt(h)==":"){s.push(A.DOUBLECOLON),d.push("::"),h++,C=E.charAt(h++);continue}if(C=="/"){if(C=E.charAt(h++),C=="/"){s.push(A.DOUBLESLASH),d.push("//"),C=E.charAt(h++);continue}s.push(A.SLASH),d.push("/");continue}if(C=="!"&&E.charAt(h)=="="){s.push(A.NOTEQUAL),d.push("!="),h++,C=E.charAt(h++);continue}if(C=="<"){if(E.charAt(h)=="="){s.push(A.LESSTHANOREQUAL),d.push("<="),h++,C=E.charAt(h++);continue}s.push(A.LESSTHAN),d.push("<"),C=E.charAt(h++);continue}if(C==">"){if(E.charAt(h)=="="){s.push(A.GREATERTHANOREQUAL),d.push(">="),h++,C=E.charAt(h++);continue}s.push(A.GREATERTHAN),d.push(">"),C=E.charAt(h++);continue}if(C=="_"||fe.isLetter(C.charCodeAt(0))){var ce=C;for(C=E.charAt(h++);fe.isNCNameChar(C.charCodeAt(0));)ce+=C,C=E.charAt(h++);if(s.length>0){var se=s[s.length-1];if(se!=A.AT&&se!=A.DOUBLECOLON&&se!=A.LEFTPARENTHESIS&&se!=A.LEFTBRACKET&&se!=A.AND&&se!=A.OR&&se!=A.MOD&&se!=A.DIV&&se!=A.MULTIPLYOPERATOR&&se!=A.SLASH&&se!=A.DOUBLESLASH&&se!=A.BAR&&se!=A.PLUS&&se!=A.MINUS&&se!=A.EQUALS&&se!=A.NOTEQUAL&&se!=A.LESSTHAN&&se!=A.LESSTHANOREQUAL&&se!=A.GREATERTHAN&&se!=A.GREATERTHANOREQUAL){if(ce=="and"){s.push(A.AND),d.push(ce);continue}if(ce=="or"){s.push(A.OR),d.push(ce);continue}if(ce=="mod"){s.push(A.MOD),d.push(ce);continue}if(ce=="div"){s.push(A.DIV),d.push(ce);continue}}}if(C==":"){if(E.charAt(h)=="*"){s.push(A.NCNAMECOLONASTERISK),d.push(ce+":*"),h++,C=E.charAt(h++);continue}if(E.charAt(h)=="_"||fe.isLetter(E.charCodeAt(h))){for(ce+=":",C=E.charAt(h++);fe.isNCNameChar(C.charCodeAt(0));)ce+=C,C=E.charAt(h++);if(C=="("){s.push(A.FUNCTIONNAME),d.push(ce);continue}s.push(A.QNAME),d.push(ce);continue}if(E.charAt(h)==":"){s.push(A.AXISNAME),d.push(ce);continue}}if(C=="("){if(ce=="comment"||ce=="text"||ce=="node"){s.push(A.NODETYPE),d.push(ce);continue}if(ce=="processing-instruction"){E.charAt(h)==")"?s.push(A.NODETYPE):s.push(A.PROCESSINGINSTRUCTIONWITHLITERAL),d.push(ce);continue}s.push(A.FUNCTIONNAME),d.push(ce);continue}s.push(A.QNAME),d.push(ce);continue}throw new Error("Unexpected character "+C)}return s.push(1),d.push("[EOF]"),[s,d]},A.SHIFT="s",A.REDUCE="r",A.ACCEPT="a",A.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,E=this.tokenize(Ne);if(E!=null){s=E[0],d=E[1];var h=0,C=[],oe=[],xe=[],Ne,se,ce;for(C.push(0),oe.push(1),xe.push("_S"),se=s[h],ce=d[h++];;)switch(Ne=C[C.length-1],A.actionTable[Ne].charAt(se-1)){case A.SHIFT:oe.push(-se),xe.push(ce),C.push(A.actionTableNumber[Ne].charCodeAt(se-1)-32),se=s[h],ce=d[h++];break;case A.REDUCE:for(var Le=A.productions[A.actionTableNumber[Ne].charCodeAt(se-1)-32][1],Ke=[],Se=0;Se<Le;Se++)oe.pop(),Ke.unshift(xe.pop()),C.pop();var Qe=C[C.length-1];oe.push(A.productions[A.actionTableNumber[Ne].charCodeAt(se-1)-32][0]),this.reduceActions[A.actionTableNumber[Ne].charCodeAt(se-1)-32]==null?xe.push(Ke[0]):xe.push(this.reduceActions[A.actionTableNumber[Ne].charCodeAt(se-1)-32](Ke)),C.push(A.gotoTable[Qe].charCodeAt(A.productions[A.actionTableNumber[Ne].charCodeAt(se-1)-32][0]-2)-33);break;case A.ACCEPT:return new te(xe.pop());default:throw new Error("XPath parse error")}}},te.prototype=new Object,te.prototype.constructor=te,te.superclass=Object.prototype;function te(e){this.expression=e}te.prototype.toString=function(){return this.expression.toString()};function N(e,s,d){s in e||(e[s]=d)}te.prototype.evaluate=function(e){var s=e.expressionContextNode;if(!(i(s)||c(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&&(N(e,"caseInsensitive",!0),N(e,"allowAnyNamespaceForNoPrefix",!0)),N(e,"caseInsensitive",!1),this.expression.evaluate(e)},te.XML_NAMESPACE_URI="http://www.w3.org/XML/1998/namespace",te.XMLNS_NAMESPACE_URI="http://www.w3.org/2000/xmlns/",T.prototype=new Object,T.prototype.constructor=T,T.superclass=Object.prototype;function T(){}T.prototype.init=function(){},T.prototype.toString=function(){return"<Expression>"},T.prototype.evaluate=function(e){throw new Error("Could not evaluate expression.")},q.prototype=new T,q.prototype.constructor=q,q.superclass=T.prototype;function q(e){arguments.length>0&&this.init(e)}q.prototype.init=function(e){this.rhs=e},W.prototype=new q,W.prototype.constructor=W,W.superclass=q.prototype;function W(e){arguments.length>0&&this.init(e)}W.prototype.init=function(e){W.superclass.init.call(this,e)},W.prototype.evaluate=function(e){return this.rhs.evaluate(e).number().negate()},W.prototype.toString=function(){return"-"+this.rhs.toString()},M.prototype=new T,M.prototype.constructor=M,M.superclass=T.prototype;function M(e,s){arguments.length>0&&this.init(e,s)}M.prototype.init=function(e,s){this.lhs=e,this.rhs=s},de.prototype=new M,de.prototype.constructor=de,de.superclass=M.prototype;function de(e,s){arguments.length>0&&this.init(e,s)}de.prototype.init=function(e,s){de.superclass.init.call(this,e,s)},de.prototype.toString=function(){return"("+this.lhs.toString()+" or "+this.rhs.toString()+")"},de.prototype.evaluate=function(e){var s=this.lhs.evaluate(e).bool();return s.booleanValue()?s:this.rhs.evaluate(e).bool()},he.prototype=new M,he.prototype.constructor=he,he.superclass=M.prototype;function he(e,s){arguments.length>0&&this.init(e,s)}he.prototype.init=function(e,s){he.superclass.init.call(this,e,s)},he.prototype.toString=function(){return"("+this.lhs.toString()+" and "+this.rhs.toString()+")"},he.prototype.evaluate=function(e){var s=this.lhs.evaluate(e).bool();return s.booleanValue()?this.rhs.evaluate(e).bool():s},ye.prototype=new M,ye.prototype.constructor=ye,ye.superclass=M.prototype;function ye(e,s){arguments.length>0&&this.init(e,s)}ye.prototype.init=function(e,s){ye.superclass.init.call(this,e,s)},ye.prototype.toString=function(){return"("+this.lhs.toString()+" = "+this.rhs.toString()+")"},ye.prototype.evaluate=function(e){return this.lhs.evaluate(e).equals(this.rhs.evaluate(e))},x.prototype=new M,x.prototype.constructor=x,x.superclass=M.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.toString=function(){return"("+this.lhs.toString()+" != "+this.rhs.toString()+")"},x.prototype.evaluate=function(e){return this.lhs.evaluate(e).notequal(this.rhs.evaluate(e))},B.prototype=new M,B.prototype.constructor=B,B.superclass=M.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).lessthan(this.rhs.evaluate(e))},B.prototype.toString=function(){return"("+this.lhs.toString()+" < "+this.rhs.toString()+")"},X.prototype=new M,X.prototype.constructor=X,X.superclass=M.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).greaterthan(this.rhs.evaluate(e))},X.prototype.toString=function(){return"("+this.lhs.toString()+" > "+this.rhs.toString()+")"},Z.prototype=new M,Z.prototype.constructor=Z,Z.superclass=M.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).lessthanorequal(this.rhs.evaluate(e))},Z.prototype.toString=function(){return"("+this.lhs.toString()+" <= "+this.rhs.toString()+")"},F.prototype=new M,F.prototype.constructor=F,F.superclass=M.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).greaterthanorequal(this.rhs.evaluate(e))},F.prototype.toString=function(){return"("+this.lhs.toString()+" >= "+this.rhs.toString()+")"},le.prototype=new M,le.prototype.constructor=le,le.superclass=M.prototype;function le(e,s){arguments.length>0&&this.init(e,s)}le.prototype.init=function(e,s){le.superclass.init.call(this,e,s)},le.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().plus(this.rhs.evaluate(e).number())},le.prototype.toString=function(){return"("+this.lhs.toString()+" + "+this.rhs.toString()+")"},w.prototype=new M,w.prototype.constructor=w,w.superclass=M.prototype;function w(e,s){arguments.length>0&&this.init(e,s)}w.prototype.init=function(e,s){w.superclass.init.call(this,e,s)},w.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().minus(this.rhs.evaluate(e).number())},w.prototype.toString=function(){return"("+this.lhs.toString()+" - "+this.rhs.toString()+")"},k.prototype=new M,k.prototype.constructor=k,k.superclass=M.prototype;function k(e,s){arguments.length>0&&this.init(e,s)}k.prototype.init=function(e,s){k.superclass.init.call(this,e,s)},k.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().multiply(this.rhs.evaluate(e).number())},k.prototype.toString=function(){return"("+this.lhs.toString()+" * "+this.rhs.toString()+")"},L.prototype=new M,L.prototype.constructor=L,L.superclass=M.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()+")"},G.prototype=new M,G.prototype.constructor=G,G.superclass=M.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()+")"},Q.prototype=new M,Q.prototype.constructor=Q,Q.superclass=M.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).nodeset().union(this.rhs.evaluate(e).nodeset())},Q.prototype.toString=function(){return _(Y,[this.lhs,this.rhs]).join(" | ")},R.prototype=new T,R.prototype.constructor=R,R.superclass=T.prototype;function R(e,s,d){arguments.length>0&&this.init(e,s,d)}R.prototype.init=function(e,s,d){R.superclass.init.call(this),this.filter=e,this.filterPredicates=s,this.locationPath=d};function J(e){for(;e&&e.parentNode;)e=e.parentNode;return e}var ge=function(e,s,d,E){if(e.length===0)return d;var h=s.extend({});return m(function(C,oe){return h.contextSize=C.length,D(function(xe,Ne){return h.contextNode=xe,h.contextPosition=Ne+1,R.predicateMatches(oe,h)},C)},K(d,E),e)};R.getRoot=function(e,s){var d=s[0];if(d&&d.nodeType===U.DOCUMENT_NODE)return d;if(e.virtualRoot)return e.virtualRoot;if(!d)throw new Error("Context node not found when determining document root.");var E=d.ownerDocument;if(E)return E;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};R.applyStep=function(e,s,d){if(!d)throw new Error("Context node not found when evaluating XPath step: "+e);var E=[];switch(s.contextNode=d,e.axis){case z.ANCESTOR:if(s.contextNode===s.virtualRoot)break;var h;for(s.contextNode.nodeType==U.ATTRIBUTE_NODE?h=R.getOwnerElement(s.contextNode):h=s.contextNode.parentNode;h!=null&&(e.nodeTest.matches(h,s)&&E.push(h),h!==s.virtualRoot);)h=h.parentNode;break;case z.ANCESTORORSELF:for(var h=s.contextNode;h!=null&&(e.nodeTest.matches(h,s)&&E.push(h),h!==s.virtualRoot);h=h.nodeType==U.ATTRIBUTE_NODE?R.getOwnerElement(h):h.parentNode);break;case z.ATTRIBUTE:var C=s.contextNode.attributes;if(C!=null)for(var oe=0;oe<C.length;oe++){var h=C.item(oe);e.nodeTest.matches(h,s)&&E.push(h)}break;case z.CHILD:for(var h=s.contextNode.firstChild;h!=null;h=h.nextSibling)e.nodeTest.matches(h,s)&&E.push(h);break;case z.DESCENDANT:for(var ce=[s.contextNode.firstChild];ce.length>0;)for(var h=ce.pop();h!=null;)e.nodeTest.matches(h,s)&&E.push(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling;break;case z.DESCENDANTORSELF:e.nodeTest.matches(s.contextNode,s)&&E.push(s.contextNode);for(var ce=[s.contextNode.firstChild];ce.length>0;)for(var h=ce.pop();h!=null;)e.nodeTest.matches(h,s)&&E.push(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling;break;case z.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!=U.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)&&E.push(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling;while(ce.length>0);break;case z.FOLLOWINGSIBLING:if(s.contextNode===s.virtualRoot)break;for(var h=s.contextNode.nextSibling;h!=null;h=h.nextSibling)e.nodeTest.matches(h,s)&&E.push(h);break;case z.NAMESPACE:var xe={};if(s.contextNode.nodeType==U.ELEMENT_NODE){xe.xml=new We("xml",null,te.XML_NAMESPACE_URI,s.contextNode);for(var h=s.contextNode;h!=null&&h.nodeType==U.ELEMENT_NODE;h=h.parentNode)for(var oe=0;oe<h.attributes.length;oe++){var Ne=h.attributes.item(oe),se=Ee(Ne);se!=null&&xe[se]==null&&(xe[se]=new We(se,Ne,Ne.value,s.contextNode))}for(var se in xe){var d=xe[se];e.nodeTest.matches(d,s)&&E.push(d)}}break;case z.PARENT:h=null,s.contextNode!==s.virtualRoot&&(s.contextNode.nodeType==U.ATTRIBUTE_NODE?h=R.getOwnerElement(s.contextNode):h=s.contextNode.parentNode),h!=null&&e.nodeTest.matches(h,s)&&E.push(h);break;case z.PRECEDING:var ce;s.virtualRoot!=null?ce=[s.virtualRoot]:ce=[J(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)&&E.unshift(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling}break;case z.PRECEDINGSIBLING:if(s.contextNode===s.virtualRoot)break;for(var h=s.contextNode.previousSibling;h!=null;h=h.previousSibling)e.nodeTest.matches(h,s)&&E.push(h);break;case z.SELF:e.nodeTest.matches(s.contextNode,s)&&E.push(s.contextNode);break}return E};function _e(e,s,d){return ge(e.predicates,s,R.applyStep(e,s,d),V(Be,e.axis))}function ke(e,s,d){return ae(_(_e.bind(null,d,e),s))}R.applySteps=function(e,s,d){return m(ke.bind(null,s),d,e)},R.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:ge(this.filterPredicates||[],s,d.toUnsortedArray(),!1)}},R.applyLocationPath=function(e,s,d){if(!e)return d;var E=e.absolute?[R.getRoot(s,d)]:d;return R.applySteps(e.steps,s,E)},R.prototype.evaluate=function(e){var s=ee(new He,e),d=this.applyFilter(e,s);if("nonNodes"in d)return d.nonNodes;var E=new ue;return E.addArray(R.applyLocationPath(this.locationPath,s,d.nodes)),E},R.predicateMatches=function(e,s){var d=e.evaluate(s);return fe.instance_of(d,P)?s.contextPosition===d.numberValue():d.booleanValue()},R.predicateString=function(e){return v("[","]",e.toString())},R.predicatesString=function(e){return ie("",_(R.predicateString,e))},R.prototype.toString=function(){if(this.filter!=null){var e=Y(this.filter);return fe.instance_of(this.filter,O)?v("'","'",e):this.filterPredicates!=null&&this.filterPredicates.length?v("(",")",e)+R.predicatesString(this.filterPredicates):this.locationPath!=null?e+(this.locationPath.absolute?"":"/")+Y(this.locationPath):e}return Y(this.locationPath)},R.getOwnerElement=function(e){if(e.ownerElement)return e.ownerElement;try{if(e.selectSingleNode)return e.selectSingleNode("..")}catch{}for(var s=e.nodeType==U.DOCUMENT_NODE?e:e.ownerDocument,d=s.getElementsByTagName("*"),E=0;E<d.length;E++)for(var h=d.item(E),C=h.attributes,oe=0;oe<C.length;oe++){var xe=C.item(oe);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?"/":"")+_(Y,this.steps).join("/")},z.prototype=new Object,z.prototype.constructor=z,z.superclass=Object.prototype;function z(e,s,d){arguments.length>0&&this.init(e,s,d)}z.prototype.init=function(e,s,d){this.axis=e,this.nodeTest=s,this.predicates=d},z.prototype.toString=function(){return z.STEPNAMES[this.axis]+"::"+this.nodeTest.toString()+R.predicatesString(this.predicates)},z.ANCESTOR=0,z.ANCESTORORSELF=1,z.ATTRIBUTE=2,z.CHILD=3,z.DESCENDANT=4,z.DESCENDANTORSELF=5,z.FOLLOWING=6,z.FOLLOWINGSIBLING=7,z.NAMESPACE=8,z.PARENT=9,z.PRECEDING=10,z.PRECEDINGSIBLING=11,z.SELF=12,z.STEPNAMES=m(function(e,s){return e[s[0]]=s[1],e},{},[[z.ANCESTOR,"ancestor"],[z.ANCESTORORSELF,"ancestor-or-self"],[z.ATTRIBUTE,"attribute"],[z.CHILD,"child"],[z.DESCENDANT,"descendant"],[z.DESCENDANTORSELF,"descendant-or-self"],[z.FOLLOWING,"following"],[z.FOLLOWINGSIBLING,"following-sibling"],[z.NAMESPACE,"namespace"],[z.PARENT,"parent"],[z.PRECEDING,"preceding"],[z.PRECEDINGSIBLING,"preceding-sibling"],[z.SELF,"self"]]);var Be=[z.ANCESTOR,z.ANCESTORORSELF,z.PARENT,z.PRECEDING,z.PRECEDINGSIBLING];y.prototype=new Object,y.prototype.constructor=y,y.superclass=Object.prototype;function y(e,s){arguments.length>0&&this.init(e,s)}y.prototype.init=function(e,s){this.type=e,this.value=s},y.prototype.toString=function(){return"<unknown nodetest type>"},y.prototype.matches=function(e,s){console.warn("unknown node test type")},y.NAMETESTANY=0,y.NAMETESTPREFIXANY=1,y.NAMETESTQNAME=2,y.COMMENT=3,y.TEXT=4,y.PI=5,y.NODE=6,y.isNodeType=function(e){return function(s){return V(e,s.nodeType)}},y.makeNodeTestType=function(e,s,d){var E=d||function(){};return E.prototype=new y(e),E.prototype.constructor=E,ee(E.prototype,s),E},y.makeNodeTypeTest=function(e,s,d){return new(y.makeNodeTestType(e,{matches:y.isNodeType(s),toString:j(d)}))},y.hasPrefix=function(e){return e.prefix||(e.nodeName||e.tagName).indexOf(":")!==-1},y.isElementOrAttribute=y.isNodeType([1,2]),y.nameSpaceMatches=function(e,s,d){var E=d.namespaceURI||"";if(!e)return!E||s.allowAnyNamespaceForNoPrefix&&!y.hasPrefix(d);var h=s.namespaceResolver.getNamespace(e,s.expressionContextNode);if(h==null)throw new Error("Cannot resolve QName "+e);return h===E},y.localNameMatches=function(e,s,d){var E=d.localName||d.nodeName;return s.caseInsensitive?e.toLowerCase()===E.toLowerCase():e===E},y.NameTestPrefixAny=y.makeNodeTestType(y.NAMETESTPREFIXANY,{matches:function(e,s){return y.isElementOrAttribute(e)&&y.nameSpaceMatches(this.prefix,s,e)},toString:function(){return this.prefix+":*"}},function(s){this.prefix=s}),y.NameTestQName=y.makeNodeTestType(y.NAMETESTQNAME,{matches:function(e,s){return y.isNodeType([U.ELEMENT_NODE,U.ATTRIBUTE_NODE,U.NAMESPACE_NODE])(e)&&y.nameSpaceMatches(this.prefix,s,e)&&y.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]}),y.PITest=y.makeNodeTestType(y.PI,{matches:function(e,s){return y.isNodeType([U.PROCESSING_INSTRUCTION_NODE])(e)&&(e.target||e.nodeName)===this.name},toString:function(){return v('processing-instruction("','")',this.name)}},function(e){this.name=e}),y.nameTestAny=y.makeNodeTypeTest(y.NAMETESTANY,[U.ELEMENT_NODE,U.ATTRIBUTE_NODE,U.NAMESPACE_NODE],"*"),y.textTest=y.makeNodeTypeTest(y.TEXT,[U.TEXT_NODE,U.CDATA_SECTION_NODE],"text()"),y.commentTest=y.makeNodeTypeTest(y.COMMENT,[U.COMMENT_NODE],"comment()"),y.nodeTest=y.makeNodeTypeTest(y.NODE,[U.ELEMENT_NODE,U.ATTRIBUTE_NODE,U.TEXT_NODE,U.CDATA_SECTION_NODE,U.PROCESSING_INSTRUCTION_NODE,U.COMMENT_NODE,U.DOCUMENT_NODE],"node()"),y.anyPiTest=y.makeNodeTypeTest(y.PI,[U.PROCESSING_INSTRUCTION_NODE],"processing-instruction()"),ne.prototype=new T,ne.prototype.constructor=ne,ne.superclass=T.prototype;function ne(e){arguments.length>0&&this.init(e)}ne.prototype.init=function(e){this.variable=e},ne.prototype.toString=function(){return"$"+this.variable},ne.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 T,Ce.prototype.constructor=Ce,Ce.superclass=T.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)},O.prototype=new T,O.prototype.constructor=O,O.superclass=T.prototype;function O(e){arguments.length>0&&this.init(e)}O.prototype.init=function(e){this.str=String(e)},O.prototype.toString=function(){return this.str},O.prototype.evaluate=function(e){return this},O.prototype.string=function(){return this},O.prototype.number=function(){return new P(this.str)},O.prototype.bool=function(){return new pe(this.str)},O.prototype.nodeset=function(){throw new Error("Cannot convert string to nodeset")},O.prototype.stringValue=function(){return this.str},O.prototype.numberValue=function(){return this.number().numberValue()},O.prototype.booleanValue=function(){return this.bool().booleanValue()},O.prototype.equals=function(e){return fe.instance_of(e,pe)?this.bool().equals(e):fe.instance_of(e,P)?this.number().equals(e):fe.instance_of(e,ue)?e.compareWithString(this,be.equals):new pe(this.str==e.str)},O.prototype.notequal=function(e){return fe.instance_of(e,pe)?this.bool().notequal(e):fe.instance_of(e,P)?this.number().notequal(e):fe.instance_of(e,ue)?e.compareWithString(this,be.notequal):new pe(this.str!=e.str)},O.prototype.lessthan=function(e){return this.number().lessthan(e)},O.prototype.greaterthan=function(e){return this.number().greaterthan(e)},O.prototype.lessthanorequal=function(e){return this.number().lessthanorequal(e)},O.prototype.greaterthanorequal=function(e){return this.number().greaterthanorequal(e)},P.prototype=new T,P.prototype.constructor=P,P.superclass=T.prototype;function P(e){arguments.length>0&&this.init(e)}P.prototype.init=function(e){this.num=typeof e=="string"?this.parse(e):Number(e)},P.prototype.numberFormat=/^\s*-?[0-9]*\.?[0-9]+\s*$/,P.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(".",""),E=Number(s[1]),h=0;h<E-1;h+=1)d="0"+d;return"0."+d}function qe(e){for(var s=e.split("e"),d=s[0].replace(".",""),E=Number(s[1]),h=E+1-d.length,C=0;C<h;C+=1)d+="0";return d}P.prototype.toString=function(){var e=this.num.toString();return e.indexOf("e-")!==-1?Re(e):e.indexOf("e")!==-1?qe(e):e},P.prototype.evaluate=function(e){return this},P.prototype.string=function(){return new O(this.toString())},P.prototype.number=function(){return this},P.prototype.bool=function(){return new pe(this.num)},P.prototype.nodeset=function(){throw new Error("Cannot convert number to nodeset")},P.prototype.stringValue=function(){return this.string().stringValue()},P.prototype.numberValue=function(){return this.num},P.prototype.booleanValue=function(){return this.bool().booleanValue()},P.prototype.negate=function(){return new P(-this.num)},P.prototype.equals=function(e){return fe.instance_of(e,pe)?this.bool().equals(e):fe.instance_of(e,O)?this.equals(e.number()):fe.instance_of(e,ue)?e.compareWithNumber(this,be.equals):new pe(this.num==e.num)},P.prototype.notequal=function(e){return fe.instance_of(e,pe)?this.bool().notequal(e):fe.instance_of(e,O)?this.notequal(e.number()):fe.instance_of(e,ue)?e.compareWithNumber(this,be.notequal):new pe(this.num!=e.num)},P.prototype.lessthan=function(e){return fe.instance_of(e,ue)?e.compareWithNumber(this,be.greaterthan):fe.instance_of(e,pe)||fe.instance_of(e,O)?this.lessthan(e.number()):new pe(this.num<e.num)},P.prototype.greaterthan=function(e){return fe.instance_of(e,ue)?e.compareWithNumber(this,be.lessthan):fe.instance_of(e,pe)||fe.instance_of(e,O)?this.greaterthan(e.number()):new pe(this.num>e.num)},P.prototype.lessthanorequal=function(e){return fe.instance_of(e,ue)?e.compareWithNumber(this,be.greaterthanorequal):fe.instance_of(e,pe)||fe.instance_of(e,O)?this.lessthanorequal(e.number()):new pe(this.num<=e.num)},P.prototype.greaterthanorequal=function(e){return fe.instance_of(e,ue)?e.compareWithNumber(this,be.lessthanorequal):fe.instance_of(e,pe)||fe.instance_of(e,O)?this.greaterthanorequal(e.number()):new pe(this.num>=e.num)},P.prototype.plus=function(e){return new P(this.num+e.num)},P.prototype.minus=function(e){return new P(this.num-e.num)},P.prototype.multiply=function(e){return new P(this.num*e.num)},P.prototype.div=function(e){return new P(this.num/e.num)},P.prototype.mod=function(e){return new P(this.num%e.num)},pe.prototype=new T,pe.prototype.constructor=pe,pe.superclass=T.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 O(this.b)},pe.prototype.number=function(){return new P(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,O)||fe.instance_of(e,P)?this.equals(e.bool()):fe.instance_of(e,ue)?e.compareWithBoolean(this,be.equals):new pe(this.b==e.b)},pe.prototype.notequal=function(e){return fe.instance_of(e,O)||fe.instance_of(e,P)?this.notequal(e.bool()):fe.instance_of(e,ue)?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,E=this.left.right==null?0:this.left.right.depth;d<E&&this.left.rotateRR(),this.rotateLL()}else if(e+1<s){var h=this.right.right==null?0:this.right.right.depth,C=this.right.left==null?0:this.right.left.depth;C>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 E=0,h=0,C=e;C!=null;C=C.parentNode||C.ownerElement)E++;for(var oe=s;oe!=null;oe=oe.parentNode||oe.ownerElement)h++;if(E>h){for(;E>h;)e=e.parentNode||e.ownerElement,E--;if(e===s)return 1}else if(h>E){for(;h>E;)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 se=Et(e),ce=Et(s);if(se&&!ce)return-1;if(!se&&ce)return 1;if(e.isXPathNamespace){if(e.nodeValue===te.XML_NAMESPACE_URI||!s.isXPathNamespace)return-1;if(s.nodeValue===te.XML_NAMESPACE_URI)return 1}else if(s.isXPathNamespace)return 1;if(xe)for(var Le=se?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 T,ue.prototype.constructor=ue,ue.superclass=T.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 O(this.toString())},ue.prototype.stringValue=function(){return this.toString()},ue.prototype.number=function(){return new P(this.string())},ue.prototype.numberValue=function(){return Number(this.string())},ue.prototype.bool=function(){return new pe(this.booleanValue())},ue.prototype.booleanValue=function(){return!!this.size},ue.prototype.nodeset=function(){return this},ue.prototype.stringForNode=function(e){return e.nodeType==U.DOCUMENT_NODE||e.nodeType==U.ELEMENT_NODE||e.nodeType===U.DOCUMENT_FRAGMENT_NODE?this.stringForContainerNode(e):e.nodeType===U.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 E=d.nodeType;(E===1||E===3||E===4||E===9||E===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(),E=0;E<d.length;E++){var h=d[E],C=new O(this.stringForNode(h)),oe=s(C,e);if(oe.booleanValue())return oe}return new pe(!1)},ue.prototype.compareWithNumber=function(e,s){for(var d=this.toUnsortedArray(),E=0;E<d.length;E++){var h=d[E],C=new P(this.stringForNode(h)),oe=s(C,e);if(oe.booleanValue())return oe}return new pe(!1)},ue.prototype.compareWithBoolean=function(e,s){return s(this.bool(),e)},ue.prototype.compareWithNodeSet=function(e,s){for(var d=this.toUnsortedArray(),E=function(xe,Ne){return s(Ne,xe)},h=0;h<d.length;h++){var C=new O(this.stringForNode(d[h])),oe=e.compareWithString(C,E);if(oe.booleanValue())return oe}return new pe(!1)},ue.compareWith=b(function(e,s){return fe.instance_of(s,O)?this.compareWithString(s,e):fe.instance_of(s,P)?this.compareWithNumber(s,e):fe.instance_of(s,pe)?this.compareWithBoolean(s,e):this.compareWithNodeSet(s,e)}),ue.prototype.equals=ue.compareWith(be.equals),ue.prototype.notequal=ue.compareWith(be.notequal),ue.prototype.lessthan=ue.compareWith(be.lessthan),ue.prototype.greaterthan=ue.compareWith(be.greaterthan),ue.prototype.lessthanorequal=ue.compareWith(be.lessthanorequal),ue.prototype.greaterthanorequal=ue.compareWith(be.greaterthanorequal),ue.prototype.union=function(e){var s=new ue;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,E){this.isXPathNamespace=!0,this.baseNode=s,this.ownerDocument=E.ownerDocument,this.nodeName=e,this.prefix=e,this.localName=e,this.namespaceURI=null,this.nodeValue=d,this.ownerElement=E,this.nodeType=U.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 ee(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 te.XML_NAMESPACE_URI;if(e=="xmlns")return te.XMLNS_NAMESPACE_URI;for(s.nodeType==U.DOCUMENT_NODE?s=s.documentElement:s.nodeType==U.ATTRIBUTE_NODE?s=R.getOwnerElement(s):s.nodeType!=U.ELEMENT_NODE&&(s=s.parentNode);s!=null&&s.nodeType==U.ELEMENT_NODE;){for(var d=s.attributes,E=0;E<d.length;E++){var h=d.item(E),C=h.name||h.nodeName;if(C==="xmlns"&&e===""||C==="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 P(e.contextSize)},me.position=function(e){if(arguments.length!=1)throw new Error("Function position expects ()");return new P(e.contextPosition)},me.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 P(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,ue)?s=s.toArray().join(" "):s=s.stringValue();for(var d=s.split(/[\x0d\x0a\x09\x20]+/),E=new ue,h=e.contextNode.nodeType==U.DOCUMENT_NODE?e.contextNode:e.contextNode.ownerDocument,C=0;C<d.length;C++){var oe;h.getElementById?oe=h.getElementById(d[C]):oe=fe.getElementById(h,d[C]),oe!=null&&E.add(oe)}return E},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 O(""):new O(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 O(""):new O(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 O(""):s.nodeType==U.ELEMENT_NODE?new O(s.nodeName):s.nodeType==U.ATTRIBUTE_NODE?new O(s.name||s.nodeName):s.nodeType===U.PROCESSING_INSTRUCTION_NODE?new O(s.target||s.nodeName):s.localName==null?new O(""):new O(s.localName)},me.string=function(){var e=arguments[0];if(arguments.length==1)return new O(ue.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 O(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 O(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 O(s);var E=s.indexOf(d);return E==-1?new O(""):new O(s.substring(E+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,E=arguments.length==4?d+Math.round(arguments[3].evaluate(e).numberValue()):void 0;return new O(s.substring(d,E))},me.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 P(s.length)},me.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,E=s.length-1;fe.isSpace(s.charCodeAt(E));)E--;for(var h="";d<=E&&fe.isSpace(s.charCodeAt(d));)d++;for(;d<=E;)if(fe.isSpace(s.charCodeAt(d)))for(h+=" ";d<=E&&fe.isSpace(s.charCodeAt(d));)d++;else h+=s.charAt(d),d++;return new O(h)},me.translate=function(e,s,d,E){if(arguments.length!=4)throw new Error("Function translate expects (string, string, string)");var h=s.evaluate(e).stringValue(),C=d.evaluate(e).stringValue(),oe=E.evaluate(e).stringValue(),xe=m(function(se,ce,Le){return ce in se||(se[ce]=Le>oe.length?"":oe[Le]),se},{},C),Ne=ie("",_(function(se){return se in xe?xe[se]:se},h));return new O(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!=U.DOCUMENT_NODE;d=d.parentNode){var E=d.getAttributeNS(te.XML_NAMESPACE_URI,"lang");if(E!=null){s=String(E);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 P(ue.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),ue))throw new Error("Function sum expects (node-set)");s=s.toUnsortedArray();for(var d=0,E=0;E<s.length;E++)d+=new P(ue.prototype.stringForNode(s[E])).numberValue();return new P(d)},me.floor=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function floor expects (number)");return new P(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 P(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 P(Math.round(arguments[1].evaluate(e).numberValue()))};var fe=new Object,Et=function(e){return e&&(e.nodeType===U.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,E){var h=fe.splitQName(e);return h[0]!=null?h[0]=s.getNamespace(h[0],d):E?(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==U.TEXT_NODE||s.nodeType==U.CDATA_SECTION_NODE){var d=s.nodeValue,E=s;for(s=s.nextSibling;s!=null&&(s.nodeType==U.TEXT_NODE||s.nodeType==U.CDATA_SECTION_NODE);){d+=s.nodeValue;var h=s;s=s.nextSibling,h.parentNode.removeChild(h)}if(E.nodeType==U.CDATA_SECTION_NODE){var C=E.parentNode;if(E.nextSibling==null)C.removeChild(E),C.appendChild(C.ownerDocument.createTextNode(d));else{var oe=E.nextSibling;C.removeChild(E),C.insertBefore(C.ownerDocument.createTextNode(d),oe)}}else E.nodeValue=d;if(s==null)break}else s.nodeType==U.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==U.ELEMENT_NODE&&(e.getAttribute("id")==s||e.getAttributeNS(null,"id")==s))return e;for(var d=e.firstChild;d!=null;d=d.nextSibling){var E=fe.getElementById(d,s);if(E!=null)return E}return null};var Me=function(){function e(d,E){var h=E?": "+E.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,E,h){var C=Error.call(this,e(d,E)||h);return C.code=d,C.exception=E,C}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,E){return new s(null,E,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===U.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 E=this.xpath.evaluate(this.context);return new Ae(E,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===O?s=Ae.STRING_TYPE:e.constructor===P?s=Ae.NUMBER_TYPE:e.constructor===pe?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,E){try{return new Fe(d,E,s)}catch(h){throw new Me(Me.INVALID_EXPRESSION_ERR,h)}},e.createNSResolver=function(d){return new Ye(d)},e.evaluate=function(d,E,h,C,oe){if(C<0||C>9)throw{code:0,toString:function(){return"Request type not supported"}};return e.createExpression(d,h,s).evaluate(E,C,oe)}}try{var f=!0;try{document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("XPath",null)&&(f=!1)}catch{}f&&l(document,new A)}catch{}l(r,new A),function(){var e=new A,s=new je,d=new Pe,E=new Ge;function h(re){return{getNamespace:function(ve,Ue){var st=re(ve,Ue);return st||s.getNamespace(ve,Ue)}}}function C(re){return h(re.getNamespace.bind(re))}function oe(re){return h(function(ve){return re[ve]})}function xe(re){return re&&typeof re.getNamespace=="function"?C(re):typeof re=="function"?h(re):typeof re=="object"?oe(re):s}function Ne(re){if(re===null||typeof re>"u"||re instanceof O||re instanceof pe||re instanceof P||re instanceof ue)return re;switch(typeof re){case"string":return new O(re);case"boolean":return new pe(re);case"number":return new P(re)}var ve=new ue;return ve.addArray([].concat(re)),ve}function se(re){return function(ve){var Ue=Array.prototype.slice.call(arguments,1).map(function(ti){return ti.evaluate(ve)}),st=re.apply(this,[].concat(ve,Ue));return Ne(st)}}function ce(re){return{getFunction:function(ve,Ue){var st=re(ve,Ue);return st?se(st):d.getFunction(ve,Ue)}}}function Le(re){return ce(re.getFunction.bind(re))}function Ke(re){return ce(function(ve){return re[ve]})}function Se(re){return re&&typeof re.getFunction=="function"?Le(re):typeof re=="function"?ce(re):typeof re=="object"?Ke(re):d}function Qe(re){return{getVariable:function(ve,Ue){var st=re(ve,Ue);return Ne(st)}}}function Xe(re){if(re){if(typeof re.getVariable=="function")return Qe(re.getVariable.bind(re));if(typeof re=="function")return Qe(re);if(typeof re=="object")return Qe(function(ve){return re[ve]})}return E}function ot(re,ve,Ue){re in Ue&&(ve[re]=Ue[re])}function Qs(re){var ve=new He;return re?(ve.namespaceResolver=xe(re.namespaces),ve.functionResolver=Se(re.functions),ve.variableResolver=Xe(re.variables),ve.expressionContextNode=re.node,ot("allowAnyNamespaceForNoPrefix",ve,re),ot("isHtml",ve,re)):ve.namespaceResolver=s,ve}function Zs(re,ve){var Ue=Qs(ve);return re.evaluate(Ue)}var Js={evaluate:function(re){return Zs(this.expression,re)},evaluateNumber:function(re){return this.evaluate(re).numberValue()},evaluateString:function(re){return this.evaluate(re).stringValue()},evaluateBoolean:function(re){return this.evaluate(re).booleanValue()},evaluateNodeSet:function(re){return this.evaluate(re).nodeset()},select:function(re){return this.evaluateNodeSet(re).toArray()},select1:function(re){return this.select(re)[0]}};function ei(re){var ve=e.parse(re);return Object.create(Js,{expression:{value:ve}})}r.parse=ei}(),ee(r,{XPath:te,XPathParser:A,XPathResult:Ae,Step:z,PathExpr:R,NodeTest:y,LocationPath:De,OrOperation:de,AndOperation:he,BarOperation:Q,EqualsOperation:ye,NotEqualOperation:x,LessThanOperation:B,GreaterThanOperation:X,LessThanOrEqualOperation:Z,GreaterThanOrEqualOperation:F,PlusOperation:le,MinusOperation:w,MultiplyOperation:k,DivOperation:L,ModOperation:G,UnaryMinusOperation:W,FunctionCall:Ce,VariableReference:ne,XPathContext:He,XNodeSet:ue,XBoolean:pe,XString:O,XNumber:P,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,E,h){return r.selectWithResolver(d,E,s,h)}},r.selectWithResolver=function(e,s,d,E){var h=new Fe(e,d,new A),C=Ae.ANY_TYPE,oe=h.evaluate(s,C,null);return oe.resultType==Ae.STRING_TYPE?oe=oe.stringValue:oe.resultType==Ae.NUMBER_TYPE?oe=oe.numberValue:oe.resultType==Ae.BOOLEAN_TYPE?oe=oe.booleanValue:(oe=oe.nodes,E&&(oe=oe[0])),oe},r.select1=function(e,s){return r.select(e,s,!0)};var g=function(e){return Array.isArray(e)&&e.every(c)},S=function(e){return function(s){return c(s)&&s.nodeType===e}};ee(r,{isNodeLike:c,isArrayOfNodes:g,isElement:S(U.ELEMENT_NODE),isAttribute:S(U.ATTRIBUTE_NODE),isTextNode:S(U.TEXT_NODE),isCDATASection:S(U.CDATA_SECTION_NODE),isProcessingInstruction:S(U.PROCESSING_INSTRUCTION_NODE),isComment:S(U.COMMENT_NODE),isDocumentNode:S(U.DOCUMENT_NODE),isDocumentTypeNode:S(U.DOCUMENT_TYPE_NODE),isDocumentFragment:S(U.DOCUMENT_FRAGMENT_NODE)})})(t)}(vt)),vt}var nn=rn();const on=tn(nn);var dt={},Je={},it={},Pt;function yt(){if(Pt)return it;Pt=1;function n(u,c,b){if(b===void 0&&(b=Array.prototype),u&&typeof b.find=="function")return b.find.call(u,c);for(var p=0;p<u.length;p++)if(Object.prototype.hasOwnProperty.call(u,p)){var m=u[p];if(c.call(void 0,m,p,u))return m}}function t(u,c){return c===void 0&&(c=Object),c&&typeof c.freeze=="function"?c.freeze(u):u}function r(u,c){if(u===null||typeof u!="object")throw new TypeError("target is not an object");for(var b in c)Object.prototype.hasOwnProperty.call(c,b)&&(u[b]=c[b]);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 Lt;function Vt(){if(Lt)return Je;Lt=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,f){return l.hasOwnProperty(f)||(l[f]=!0),l}function c(l){if(!l)return[];var f=i(l);return Object.keys(f.reduce(u,{}))}function b(l){return function(f){return l&&l.indexOf(f)!==-1}}function p(l,f){for(var g in l)Object.prototype.hasOwnProperty.call(l,g)&&(f[g]=l[g])}function m(l,f){var g=l.prototype;if(!(g instanceof f)){let S=function(){};S.prototype=f.prototype,S=new S,p(g,S),l.prototype=g=S}g.constructor!=l&&(typeof l!="function"&&console.error("unknown Class:"+l),g.constructor=l)}var _={},D=_.ELEMENT_NODE=1,V=_.ATTRIBUTE_NODE=2,j=_.TEXT_NODE=3,Y=_.CDATA_SECTION_NODE=4,ie=_.ENTITY_REFERENCE_NODE=5,v=_.ENTITY_NODE=6,H=_.PROCESSING_INSTRUCTION_NODE=7,K=_.COMMENT_NODE=8,$=_.DOCUMENT_NODE=9,ae=_.DOCUMENT_TYPE_NODE=10,ee=_.DOCUMENT_FRAGMENT_NODE=11,U=_.NOTATION_NODE=12,A={},te={};A.INDEX_SIZE_ERR=(te[1]="Index size error",1),A.DOMSTRING_SIZE_ERR=(te[2]="DOMString size error",2);var N=A.HIERARCHY_REQUEST_ERR=(te[3]="Hierarchy request error",3);A.WRONG_DOCUMENT_ERR=(te[4]="Wrong document",4),A.INVALID_CHARACTER_ERR=(te[5]="Invalid character",5),A.NO_DATA_ALLOWED_ERR=(te[6]="No data allowed",6),A.NO_MODIFICATION_ALLOWED_ERR=(te[7]="No modification allowed",7);var T=A.NOT_FOUND_ERR=(te[8]="Not found",8);A.NOT_SUPPORTED_ERR=(te[9]="Not supported",9);var q=A.INUSE_ATTRIBUTE_ERR=(te[10]="Attribute in use",10);A.INVALID_STATE_ERR=(te[11]="Invalid state",11),A.SYNTAX_ERR=(te[12]="Syntax error",12),A.INVALID_MODIFICATION_ERR=(te[13]="Invalid modification",13),A.NAMESPACE_ERR=(te[14]="Invalid namespace",14),A.INVALID_ACCESS_ERR=(te[15]="Invalid access",15);function W(l,f){if(f instanceof Error)var g=f;else g=this,Error.call(this,te[l]),this.message=te[l],Error.captureStackTrace&&Error.captureStackTrace(this,W);return g.code=l,f&&(this.message=this.message+": "+f),g}W.prototype=Error.prototype,p(A,W);function M(){}M.prototype={length:0,item:function(l){return l>=0&&l<this.length?this[l]:null},toString:function(l,f){for(var g=[],S=0;S<this.length;S++)Fe(this[S],g,l,f);return g.join("")},filter:function(l){return Array.prototype.filter.call(this,l)},indexOf:function(l){return Array.prototype.indexOf.call(this,l)}};function de(l,f){this._node=l,this._refresh=f,he(this)}function he(l){var f=l._node._inc||l._node.ownerDocument._inc;if(l._inc!==f){var g=l._refresh(l._node);if(Ae(l,"length",g.length),!l.$$length||g.length<l.$$length)for(var S=g.length;S in l;S++)Object.prototype.hasOwnProperty.call(l,S)&&delete l[S];p(g,l),l._inc=f}}de.prototype.item=function(l){return he(this),this[l]||null},m(de,M);function ye(){}function x(l,f){for(var g=l.length;g--;)if(l[g]===f)return g}function B(l,f,g,S){if(S?f[x(f,S)]=g:f[f.length++]=g,l){g.ownerElement=l;var e=l.ownerDocument;e&&(S&&G(e,l,S),L(e,l,g))}}function X(l,f,g){var S=x(f,g);if(S>=0){for(var e=f.length-1;S<e;)f[S]=f[++S];if(f.length=e,l){var s=l.ownerDocument;s&&(G(s,l,g),g.ownerElement=null)}}else throw new W(T,new Error(l.tagName+"@"+g))}ye.prototype={length:0,item:M.prototype.item,getNamedItem:function(l){for(var f=this.length;f--;){var g=this[f];if(g.nodeName==l)return g}},setNamedItem:function(l){var f=l.ownerElement;if(f&&f!=this._ownerElement)throw new W(q);var g=this.getNamedItem(l.nodeName);return B(this._ownerElement,this,l,g),g},setNamedItemNS:function(l){var f=l.ownerElement,g;if(f&&f!=this._ownerElement)throw new W(q);return g=this.getNamedItemNS(l.namespaceURI,l.localName),B(this._ownerElement,this,l,g),g},removeNamedItem:function(l){var f=this.getNamedItem(l);return X(this._ownerElement,this,f),f},removeNamedItemNS:function(l,f){var g=this.getNamedItemNS(l,f);return X(this._ownerElement,this,g),g},getNamedItemNS:function(l,f){for(var g=this.length;g--;){var S=this[g];if(S.localName==f&&S.namespaceURI==l)return S}return null}};function Z(){}Z.prototype={hasFeature:function(l,f){return!0},createDocument:function(l,f,g){var S=new k;if(S.implementation=this,S.childNodes=new M,S.doctype=g||null,g&&S.appendChild(g),f){var e=S.createElementNS(l,f);S.appendChild(e)}return S},createDocumentType:function(l,f,g){var S=new ue;return S.name=l,S.nodeName=l,S.publicId=f||"",S.systemId=g||"",S}};function F(){}F.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,f){return Ce(this,l,f)},replaceChild:function(l,f){Ce(this,l,f,ne),f&&this.removeChild(f)},removeChild:function(l){return R(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 f=l.nextSibling;f&&f.nodeType==j&&l.nodeType==j?(this.removeChild(f),l.appendData(f.data)):(l.normalize(),l=f)}},isSupported:function(l,f){return this.ownerDocument.implementation.hasFeature(l,f)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(l){for(var f=this;f;){var g=f._nsMap;if(g){for(var S in g)if(Object.prototype.hasOwnProperty.call(g,S)&&g[S]===l)return S}f=f.nodeType==V?f.ownerDocument:f.parentNode}return null},lookupNamespaceURI:function(l){for(var f=this;f;){var g=f._nsMap;if(g&&Object.prototype.hasOwnProperty.call(g,l))return g[l];f=f.nodeType==V?f.ownerDocument:f.parentNode}return null},isDefaultNamespace:function(l){var f=this.lookupPrefix(l);return f==null}};function le(l){return l=="<"&&"&lt;"||l==">"&&"&gt;"||l=="&"&&"&amp;"||l=='"'&&"&quot;"||"&#"+l.charCodeAt()+";"}p(_,F),p(_,F.prototype);function w(l,f){if(f(l))return!0;if(l=l.firstChild)do if(w(l,f))return!0;while(l=l.nextSibling)}function k(){this.ownerDocument=this}function L(l,f,g){l&&l._inc++;var S=g.namespaceURI;S===r.XMLNS&&(f._nsMap[g.prefix?g.localName:""]=g.value)}function G(l,f,g,S){l&&l._inc++;var e=g.namespaceURI;e===r.XMLNS&&delete f._nsMap[g.prefix?g.localName:""]}function Q(l,f,g){if(l&&l._inc){l._inc++;var S=f.childNodes;if(g)S[S.length++]=g;else{for(var e=f.firstChild,s=0;e;)S[s++]=e,e=e.nextSibling;S.length=s,delete S[S.length]}}}function R(l,f){var g=f.previousSibling,S=f.nextSibling;return g?g.nextSibling=S:l.firstChild=S,S?S.previousSibling=g:l.lastChild=g,f.parentNode=null,f.previousSibling=null,f.nextSibling=null,Q(l.ownerDocument,l),f}function J(l){return l&&(l.nodeType===F.DOCUMENT_NODE||l.nodeType===F.DOCUMENT_FRAGMENT_NODE||l.nodeType===F.ELEMENT_NODE)}function ge(l){return l&&(_e(l)||ke(l)||Ee(l)||l.nodeType===F.DOCUMENT_FRAGMENT_NODE||l.nodeType===F.COMMENT_NODE||l.nodeType===F.PROCESSING_INSTRUCTION_NODE)}function Ee(l){return l&&l.nodeType===F.DOCUMENT_TYPE_NODE}function _e(l){return l&&l.nodeType===F.ELEMENT_NODE}function ke(l){return l&&l.nodeType===F.TEXT_NODE}function De(l,f){var g=l.childNodes||[];if(t(g,_e)||Ee(f))return!1;var S=t(g,Ee);return!(f&&S&&g.indexOf(S)>g.indexOf(f))}function z(l,f){var g=l.childNodes||[];function S(s){return _e(s)&&s!==f}if(t(g,S))return!1;var e=t(g,Ee);return!(f&&e&&g.indexOf(e)>g.indexOf(f))}function Be(l,f,g){if(!J(l))throw new W(N,"Unexpected parent node type "+l.nodeType);if(g&&g.parentNode!==l)throw new W(T,"child not in parent");if(!ge(f)||Ee(f)&&l.nodeType!==F.DOCUMENT_NODE)throw new W(N,"Unexpected node type "+f.nodeType+" for parent node type "+l.nodeType)}function y(l,f,g){var S=l.childNodes||[],e=f.childNodes||[];if(f.nodeType===F.DOCUMENT_FRAGMENT_NODE){var s=e.filter(_e);if(s.length>1||t(e,ke))throw new W(N,"More than one element or text in fragment");if(s.length===1&&!De(l,g))throw new W(N,"Element in fragment can not be inserted before doctype")}if(_e(f)&&!De(l,g))throw new W(N,"Only one element can be added and only after doctype");if(Ee(f)){if(t(S,Ee))throw new W(N,"Only one doctype is allowed");var d=t(S,_e);if(g&&S.indexOf(d)<S.indexOf(g))throw new W(N,"Doctype can only be inserted before an element");if(!g&&d)throw new W(N,"Doctype can not be appended since element is present")}}function ne(l,f,g){var S=l.childNodes||[],e=f.childNodes||[];if(f.nodeType===F.DOCUMENT_FRAGMENT_NODE){var s=e.filter(_e);if(s.length>1||t(e,ke))throw new W(N,"More than one element or text in fragment");if(s.length===1&&!z(l,g))throw new W(N,"Element in fragment can not be inserted before doctype")}if(_e(f)&&!z(l,g))throw new W(N,"Only one element can be added and only after doctype");if(Ee(f)){if(t(S,function(h){return Ee(h)&&h!==g}))throw new W(N,"Only one doctype is allowed");var d=t(S,_e);if(g&&S.indexOf(d)<S.indexOf(g))throw new W(N,"Doctype can only be inserted before an element")}}function Ce(l,f,g,S){Be(l,f,g),l.nodeType===F.DOCUMENT_NODE&&(S||y)(l,f,g);var e=f.parentNode;if(e&&e.removeChild(f),f.nodeType===ee){var s=f.firstChild;if(s==null)return f;var d=f.lastChild}else s=d=f;var E=g?g.previousSibling:l.lastChild;s.previousSibling=E,d.nextSibling=g,E?E.nextSibling=s:l.firstChild=s,g==null?l.lastChild=d:g.previousSibling=d;do{s.parentNode=l;var h=l.ownerDocument||l;be(s,h)}while(s!==d&&(s=s.nextSibling));return Q(l.ownerDocument||l,l),f.nodeType==ee&&(f.firstChild=f.lastChild=null),f}function be(l,f){if(l.ownerDocument!==f){if(l.ownerDocument=f,l.nodeType===D&&l.attributes)for(var g=0;g<l.attributes.length;g++){var S=l.attributes.item(g);S&&(S.ownerDocument=f)}for(var e=l.firstChild;e;)be(e,f),e=e.nextSibling}}function O(l,f){f.parentNode&&f.parentNode.removeChild(f),f.parentNode=l,f.previousSibling=l.lastChild,f.nextSibling=null,f.previousSibling?f.previousSibling.nextSibling=f:l.firstChild=f,l.lastChild=f,Q(l.ownerDocument,l,f);var g=l.ownerDocument||l;return be(f,g),f}k.prototype={nodeName:"#document",nodeType:$,doctype:null,documentElement:null,_inc:1,insertBefore:function(l,f){if(l.nodeType==ee){for(var g=l.firstChild;g;){var S=g.nextSibling;this.insertBefore(g,f),g=S}return l}return Ce(this,l,f),be(l,this),this.documentElement===null&&l.nodeType===D&&(this.documentElement=l),l},removeChild:function(l){return this.documentElement==l&&(this.documentElement=null),R(this,l)},replaceChild:function(l,f){Ce(this,l,f,ne),be(l,this),f&&this.removeChild(f),_e(l)&&(this.documentElement=l)},importNode:function(l,f){return tt(this,l,f)},getElementById:function(l){var f=null;return w(this.documentElement,function(g){if(g.nodeType==D&&g.getAttribute("id")==l)return f=g,!0}),f},getElementsByClassName:function(l){var f=c(l);return new de(this,function(g){var S=[];return f.length>0&&w(g.documentElement,function(e){if(e!==g&&e.nodeType===D){var s=e.getAttribute("class");if(s){var d=l===s;if(!d){var E=c(s);d=f.every(b(E))}d&&S.push(e)}}}),S})},createElement:function(l){var f=new P;f.ownerDocument=this,f.nodeName=l,f.tagName=l,f.localName=l,f.childNodes=new M;var g=f.attributes=new ye;return g._ownerElement=f,f},createDocumentFragment:function(){var l=new Pe;return l.ownerDocument=this,l.childNodes=new M,l},createTextNode:function(l){var f=new pe;return f.ownerDocument=this,f.appendData(l),f},createComment:function(l){var f=new Ie;return f.ownerDocument=this,f.appendData(l),f},createCDATASection:function(l){var f=new gt;return f.ownerDocument=this,f.appendData(l),f},createProcessingInstruction:function(l,f){var g=new je;return g.ownerDocument=this,g.tagName=g.nodeName=g.target=l,g.nodeValue=g.data=f,g},createAttribute:function(l){var f=new Re;return f.ownerDocument=this,f.name=l,f.nodeName=l,f.localName=l,f.specified=!0,f},createEntityReference:function(l){var f=new Ge;return f.ownerDocument=this,f.nodeName=l,f},createElementNS:function(l,f){var g=new P,S=f.split(":"),e=g.attributes=new ye;return g.childNodes=new M,g.ownerDocument=this,g.nodeName=f,g.tagName=f,g.namespaceURI=l,S.length==2?(g.prefix=S[0],g.localName=S[1]):g.localName=f,e._ownerElement=g,g},createAttributeNS:function(l,f){var g=new Re,S=f.split(":");return g.ownerDocument=this,g.nodeName=f,g.name=f,g.namespaceURI=l,g.specified=!0,S.length==2?(g.prefix=S[0],g.localName=S[1]):g.localName=f,g}},m(k,F);function P(){this._nsMap={}}P.prototype={nodeType:D,hasAttribute:function(l){return this.getAttributeNode(l)!=null},getAttribute:function(l){var f=this.getAttributeNode(l);return f&&f.value||""},getAttributeNode:function(l){return this.attributes.getNamedItem(l)},setAttribute:function(l,f){var g=this.ownerDocument.createAttribute(l);g.value=g.nodeValue=""+f,this.setAttributeNode(g)},removeAttribute:function(l){var f=this.getAttributeNode(l);f&&this.removeAttributeNode(f)},appendChild:function(l){return l.nodeType===ee?this.insertBefore(l,null):O(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,f){var g=this.getAttributeNodeNS(l,f);g&&this.removeAttributeNode(g)},hasAttributeNS:function(l,f){return this.getAttributeNodeNS(l,f)!=null},getAttributeNS:function(l,f){var g=this.getAttributeNodeNS(l,f);return g&&g.value||""},setAttributeNS:function(l,f,g){var S=this.ownerDocument.createAttributeNS(l,f);S.value=S.nodeValue=""+g,this.setAttributeNode(S)},getAttributeNodeNS:function(l,f){return this.attributes.getNamedItemNS(l,f)},getElementsByTagName:function(l){return new de(this,function(f){var g=[];return w(f,function(S){S!==f&&S.nodeType==D&&(l==="*"||S.tagName==l)&&g.push(S)}),g})},getElementsByTagNameNS:function(l,f){return new de(this,function(g){var S=[];return w(g,function(e){e!==g&&e.nodeType===D&&(l==="*"||e.namespaceURI===l)&&(f==="*"||e.localName==f)&&S.push(e)}),S})}},k.prototype.getElementsByTagName=P.prototype.getElementsByTagName,k.prototype.getElementsByTagNameNS=P.prototype.getElementsByTagNameNS,m(P,F);function Re(){}Re.prototype.nodeType=V,m(Re,F);function qe(){}qe.prototype={data:"",substringData:function(l,f){return this.data.substring(l,l+f)},appendData:function(l){l=this.data+l,this.nodeValue=this.data=l,this.length=l.length},insertData:function(l,f){this.replaceData(l,0,f)},appendChild:function(l){throw new Error(te[N])},deleteData:function(l,f){this.replaceData(l,f,"")},replaceData:function(l,f,g){var S=this.data.substring(0,l),e=this.data.substring(l+f);g=S+g+e,this.nodeValue=this.data=g,this.length=g.length}},m(qe,F);function pe(){}pe.prototype={nodeName:"#text",nodeType:j,splitText:function(l){var f=this.data,g=f.substring(l);f=f.substring(0,l),this.data=this.nodeValue=f,this.length=f.length;var S=this.ownerDocument.createTextNode(g);return this.parentNode&&this.parentNode.insertBefore(S,this.nextSibling),S}},m(pe,qe);function Ie(){}Ie.prototype={nodeName:"#comment",nodeType:K},m(Ie,qe);function gt(){}gt.prototype={nodeName:"#cdata-section",nodeType:Y},m(gt,qe);function ue(){}ue.prototype.nodeType=ae,m(ue,F);function We(){}We.prototype.nodeType=U,m(We,F);function He(){}He.prototype.nodeType=v,m(He,F);function Ge(){}Ge.prototype.nodeType=ie,m(Ge,F);function Pe(){}Pe.prototype.nodeName="#document-fragment",Pe.prototype.nodeType=ee,m(Pe,F);function je(){}je.prototype.nodeType=H,m(je,F);function me(){}me.prototype.serializeToString=function(l,f,g){return fe.call(l,f,g)},F.prototype.toString=fe;function fe(l,f){var g=[],S=this.nodeType==9&&this.documentElement||this,e=S.prefix,s=S.namespaceURI;if(s&&e==null){var e=S.lookupPrefix(s);if(e==null)var d=[{namespace:s,prefix:null}]}return Fe(this,g,l,f,d),g.join("")}function Et(l,f,g){var S=l.prefix||"",e=l.namespaceURI;if(!e||S==="xml"&&e===r.XML||e===r.XMLNS)return!1;for(var s=g.length;s--;){var d=g[s];if(d.prefix===S)return d.namespace!==e}return!0}function Me(l,f,g){l.push(" ",f,'="',g.replace(/[<>&"\t\n\r]/g,le),'"')}function Fe(l,f,g,S,e){if(e||(e=[]),S)if(l=S(l),l){if(typeof l=="string"){f.push(l);return}}else return;switch(l.nodeType){case D:var s=l.attributes,d=s.length,Se=l.firstChild,E=l.tagName;g=r.isHTML(l.namespaceURI)||g;var h=E;if(!g&&!l.prefix&&l.namespaceURI){for(var C,oe=0;oe<s.length;oe++)if(s.item(oe).name==="xmlns"){C=s.item(oe).value;break}if(!C)for(var xe=e.length-1;xe>=0;xe--){var Ne=e[xe];if(Ne.prefix===""&&Ne.namespace===l.namespaceURI){C=Ne.namespace;break}}if(C!==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+":"+E);break}}}f.push("<",h);for(var se=0;se<d;se++){var ce=s.item(se);ce.prefix=="xmlns"?e.push({prefix:ce.localName,namespace:ce.value}):ce.nodeName=="xmlns"&&e.push({prefix:"",namespace:ce.value})}for(var se=0;se<d;se++){var ce=s.item(se);if(Et(ce,g,e)){var Le=ce.prefix||"",Ke=ce.namespaceURI;Me(f,Le?"xmlns:"+Le:"xmlns",Ke),e.push({prefix:Le,namespace:Ke})}Fe(ce,f,g,S,e)}if(E===h&&Et(l,g,e)){var Le=l.prefix||"",Ke=l.namespaceURI;Me(f,Le?"xmlns:"+Le:"xmlns",Ke),e.push({prefix:Le,namespace:Ke})}if(Se||g&&!/^(?:meta|link|img|br|hr|input)$/i.test(E)){if(f.push(">"),g&&/^script$/i.test(E))for(;Se;)Se.data?f.push(Se.data):Fe(Se,f,g,S,e.slice()),Se=Se.nextSibling;else for(;Se;)Fe(Se,f,g,S,e.slice()),Se=Se.nextSibling;f.push("</",h,">")}else f.push("/>");return;case $:case ee:for(var Se=l.firstChild;Se;)Fe(Se,f,g,S,e.slice()),Se=Se.nextSibling;return;case V:return Me(f,l.name,l.value);case j:return f.push(l.data.replace(/[<&>]/g,le));case Y:return f.push("<![CDATA[",l.data,"]]>");case K:return f.push("<!--",l.data,"-->");case ae:var Qe=l.publicId,Xe=l.systemId;if(f.push("<!DOCTYPE ",l.name),Qe)f.push(" PUBLIC ",Qe),Xe&&Xe!="."&&f.push(" ",Xe),f.push(">");else if(Xe&&Xe!=".")f.push(" SYSTEM ",Xe,">");else{var ot=l.internalSubset;ot&&f.push(" [",ot,"]"),f.push(">")}return;case H:return f.push("<?",l.target," ",l.data,"?>");case ie:return f.push("&",l.nodeName,";");default:f.push("??",l.nodeName)}}function tt(l,f,g){var S;switch(f.nodeType){case D:S=f.cloneNode(!1),S.ownerDocument=l;case ee:break;case V:g=!0;break}if(S||(S=f.cloneNode(!1)),S.ownerDocument=l,S.parentNode=null,g)for(var e=f.firstChild;e;)S.appendChild(tt(l,e,g)),e=e.nextSibling;return S}function Ye(l,f,g){var S=new f.constructor;for(var e in f)if(Object.prototype.hasOwnProperty.call(f,e)){var s=f[e];typeof s!="object"&&s!=S[e]&&(S[e]=s)}switch(f.childNodes&&(S.childNodes=new M),S.ownerDocument=l,S.nodeType){case D:var d=f.attributes,E=S.attributes=new ye,h=d.length;E._ownerElement=S;for(var C=0;C<h;C++)S.setAttributeNode(Ye(l,d.item(C),!0));break;case V:g=!0}if(g)for(var oe=f.firstChild;oe;)S.appendChild(Ye(l,oe,g)),oe=oe.nextSibling;return S}function Ae(l,f,g){l[f]=g}try{if(Object.defineProperty){let l=function(f){switch(f.nodeType){case D:case ee:var g=[];for(f=f.firstChild;f;)f.nodeType!==7&&f.nodeType!==8&&g.push(l(f)),f=f.nextSibling;return g.join("");default:return f.nodeValue}};Object.defineProperty(de.prototype,"length",{get:function(){return he(this),this.$$length}}),Object.defineProperty(F.prototype,"textContent",{get:function(){return l(this)},set:function(f){switch(this.nodeType){case D:case ee:for(;this.firstChild;)this.removeChild(this.firstChild);(f||String(f))&&this.appendChild(this.ownerDocument.createTextNode(f));break;default:this.data=f,this.value=f,this.nodeValue=f}}}),Ae=function(f,g,S){f["$$"+g]=S}}}catch{}return Je.DocumentType=ue,Je.DOMException=W,Je.DOMImplementation=Z,Je.Element=P,Je.Node=F,Je.NodeList=M,Je.XMLSerializer=me,Je}var pt={},wt={},$t;function sn(){return $t||($t=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={},Mt;function an(){if(Mt)return bt;Mt=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,c=2,b=3,p=4,m=5,_=6,D=7;function V(N,T){this.message=N,this.locator=T,Error.captureStackTrace&&Error.captureStackTrace(this,V)}V.prototype=new Error,V.prototype.name=V.name;function j(){}j.prototype={parse:function(N,T,q){var W=this.domBuilder;W.startDocument(),ae(T,T={}),Y(N,T,q,W,this.errorHandler),W.endDocument()}};function Y(N,T,q,W,M){function de(O){if(O>65535){O-=65536;var P=55296+(O>>10),Re=56320+(O&1023);return String.fromCharCode(P,Re)}else return String.fromCharCode(O)}function he(O){var P=O.slice(1,-1);return Object.hasOwnProperty.call(q,P)?q[P]:P.charAt(0)==="#"?de(parseInt(P.substr(1).replace("x","0x"))):(M.error("entity not found:"+O),O)}function ye(O){if(O>k){var P=N.substring(k,O).replace(/&#?\w+;/g,he);F&&x(k),W.characters(P,0,O-k),k=O}}function x(O,P){for(;O>=X&&(P=Z.exec(N));)B=P.index,X=B+P[0].length,F.lineNumber++;F.columnNumber=O-B+1}for(var B=0,X=0,Z=/.*(?:\r\n?|\n)|.*$/g,F=W.locator,le=[{currentNSMap:T}],w={},k=0;;){try{var L=N.indexOf("<",k);if(L<0){if(!N.substr(k).match(/^\s*$/)){var G=W.doc,Q=G.createTextNode(N.substr(k));G.appendChild(Q),W.currentElement=Q}return}switch(L>k&&ye(L),N.charAt(L+1)){case"/":var Be=N.indexOf(">",L+3),R=N.substring(L+2,Be).replace(/[ \t\n\r]+$/g,""),J=le.pop();Be<0?(R=N.substring(L+2).replace(/[\s<].*/,""),M.error("end tag name: "+R+" is not complete:"+J.tagName),Be=L+1+R.length):R.match(/\s</)&&(R=R.replace(/[\s<].*/,""),M.error("end tag name: "+R+" maybe not complete"),Be=L+1+R.length);var ge=J.localNSMap,Ee=J.tagName==R,_e=Ee||J.tagName&&J.tagName.toLowerCase()==R.toLowerCase();if(_e){if(W.endElement(J.uri,J.localName,R),ge)for(var ke in ge)Object.prototype.hasOwnProperty.call(ge,ke)&&W.endPrefixMapping(ke);Ee||M.fatalError("end tag name: "+R+" is not match the current start tagName:"+J.tagName)}else le.push(J);Be++;break;case"?":F&&x(L),Be=U(N,L,W);break;case"!":F&&x(L),Be=ee(N,L,W,M);break;default:F&&x(L);var De=new A,z=le[le.length-1].currentNSMap,Be=v(N,L,De,z,he,M),y=De.length;if(!De.closed&&$(N,Be,De.tagName,w)&&(De.closed=!0,q.nbsp||M.warning("unclosed xml attribute")),F&&y){for(var ne=ie(F,{}),Ce=0;Ce<y;Ce++){var be=De[Ce];x(be.offset),be.locator=ie(F,{})}W.locator=ne,H(De,W,z)&&le.push(De),W.locator=F}else H(De,W,z)&&le.push(De);n.isHTML(De.uri)&&!De.closed?Be=K(N,Be,De.tagName,he,W):Be++}}catch(O){if(O instanceof V)throw O;M.error("element parse error: "+O),Be=-1}Be>k?k=Be:ye(Math.max(L,k)+1)}}function ie(N,T){return T.lineNumber=N.lineNumber,T.columnNumber=N.columnNumber,T}function v(N,T,q,W,M,de){function he(F,le,w){q.attributeNames.hasOwnProperty(F)&&de.fatalError("Attribute "+F+" redefined"),q.addValue(F,le.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,M),w)}for(var ye,x,B=++T,X=i;;){var Z=N.charAt(B);switch(Z){case"=":if(X===u)ye=N.slice(T,B),X=b;else if(X===c)X=b;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(X===b||X===u)if(X===u&&(de.warning('attribute value must after "="'),ye=N.slice(T,B)),T=B+1,B=N.indexOf(Z,T),B>0)x=N.slice(T,B),he(ye,x,T-1),X=m;else throw new Error("attribute value no end '"+Z+"' match");else if(X==p)x=N.slice(T,B),he(ye,x,T),de.warning('attribute "'+ye+'" missed start quot('+Z+")!!"),T=B+1,X=m;else throw new Error('attribute value must after "="');break;case"/":switch(X){case i:q.setTagName(N.slice(T,B));case m:case _:case D:X=D,q.closed=!0;case p:case u:break;case c:q.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return de.error("unexpected end of input"),X==i&&q.setTagName(N.slice(T,B)),B;case">":switch(X){case i:q.setTagName(N.slice(T,B));case m:case _:case D:break;case p:case u:x=N.slice(T,B),x.slice(-1)==="/"&&(q.closed=!0,x=x.slice(0,-1));case c:X===c&&(x=ye),X==p?(de.warning('attribute "'+x+'" missed quot(")!'),he(ye,x,T)):((!n.isHTML(W[""])||!x.match(/^(?:disabled|checked|selected)$/i))&&de.warning('attribute "'+x+'" missed value!! "'+x+'" instead!!'),he(x,x,T));break;case b:throw new Error("attribute value missed!!")}return B;case"€":Z=" ";default:if(Z<=" ")switch(X){case i:q.setTagName(N.slice(T,B)),X=_;break;case u:ye=N.slice(T,B),X=c;break;case p:var x=N.slice(T,B);de.warning('attribute "'+x+'" missed quot(")!!'),he(ye,x,T);case m:X=_;break}else switch(X){case c:q.tagName,(!n.isHTML(W[""])||!ye.match(/^(?:disabled|checked|selected)$/i))&&de.warning('attribute "'+ye+'" missed value!! "'+ye+'" instead2!!'),he(ye,ye,T),T=B,X=u;break;case m:de.warning('attribute space is required"'+ye+'"!!');case _:X=u,T=B;break;case b:X=p,T=B;break;case D:throw new Error("elements closed character '/' and '>' must be connected to")}}B++}}function H(N,T,q){for(var W=N.tagName,M=null,Z=N.length;Z--;){var de=N[Z],he=de.qName,ye=de.value,F=he.indexOf(":");if(F>0)var x=de.prefix=he.slice(0,F),B=he.slice(F+1),X=x==="xmlns"&&B;else B=he,x=null,X=he==="xmlns"&&"";de.localName=B,X!==!1&&(M==null&&(M={},ae(q,q={})),q[X]=M[X]=ye,de.uri=n.XMLNS,T.startPrefixMapping(X,ye))}for(var Z=N.length;Z--;){de=N[Z];var x=de.prefix;x&&(x==="xml"&&(de.uri=n.XML),x!=="xmlns"&&(de.uri=q[x||""]))}var F=W.indexOf(":");F>0?(x=N.prefix=W.slice(0,F),B=N.localName=W.slice(F+1)):(x=null,B=N.localName=W);var le=N.uri=q[x||""];if(T.startElement(le,B,W,N),N.closed){if(T.endElement(le,B,W),M)for(x in M)Object.prototype.hasOwnProperty.call(M,x)&&T.endPrefixMapping(x)}else return N.currentNSMap=q,N.localNSMap=M,!0}function K(N,T,q,W,M){if(/^(?:script|textarea)$/i.test(q)){var de=N.indexOf("</"+q+">",T),he=N.substring(T+1,de);if(/[&<]/.test(he))return/^script$/i.test(q)?(M.characters(he,0,he.length),de):(he=he.replace(/&#?\w+;/g,W),M.characters(he,0,he.length),de)}return T+1}function $(N,T,q,W){var M=W[q];return M==null&&(M=N.lastIndexOf("</"+q+">"),M<T&&(M=N.lastIndexOf("</"+q)),W[q]=M),M<T}function ae(N,T){for(var q in N)Object.prototype.hasOwnProperty.call(N,q)&&(T[q]=N[q])}function ee(N,T,q,W){var M=N.charAt(T+2);switch(M){case"-":if(N.charAt(T+3)==="-"){var de=N.indexOf("-->",T+4);return de>T?(q.comment(N,T+4,de-T-4),de+3):(W.error("Unclosed comment"),-1)}else return-1;default:if(N.substr(T+3,6)=="CDATA["){var de=N.indexOf("]]>",T+9);return q.startCDATA(),q.characters(N,T+9,de-T-9),q.endCDATA(),de+3}var he=te(N,T),ye=he.length;if(ye>1&&/!doctype/i.test(he[0][0])){var x=he[1][0],B=!1,X=!1;ye>3&&(/^public$/i.test(he[2][0])?(B=he[3][0],X=ye>4&&he[4][0]):/^system$/i.test(he[2][0])&&(X=he[3][0]));var Z=he[ye-1];return q.startDTD(x,B,X),q.endDTD(),Z.index+Z[0].length}}return-1}function U(N,T,q){var W=N.indexOf("?>",T);if(W){var M=N.substring(T,W).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return M?(M[0].length,q.processingInstruction(M[1],M[2]),W+2):-1}return-1}function A(){this.attributeNames={}}A.prototype={setTagName:function(N){if(!a.test(N))throw new Error("invalid tagName:"+N);this.tagName=N},addValue:function(N,T,q){if(!a.test(N))throw new Error("invalid attribute:"+N);this.attributeNames[N]=this.length,this[this.length++]={qName:N,value:T,offset:q}},length:0,getLocalName:function(N){return this[N].localName},getLocator:function(N){return this[N].locator},getQName:function(N){return this[N].qName},getURI:function(N){return this[N].uri},getValue:function(N){return this[N].value}};function te(N,T){var q,W=[],M=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(M.lastIndex=T,M.exec(N);q=M.exec(N);)if(W.push(q),q[1])return W}return bt.XMLReader=j,bt.ParseError=V,bt}var Ut;function un(){if(Ut)return pt;Ut=1;var n=yt(),t=Vt(),r=sn(),a=an(),i=t.DOMImplementation,u=n.NAMESPACE,c=a.ParseError,b=a.XMLReader;function p(v){return v.replace(/\r[\n\u0085]/g,`
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,`
11
11
  `).replace(/[\r\u0085\u2028]/g,`
12
- `)}function m(v){this.options=v||{locator:{}}}m.prototype.parseFromString=function(v,H){var K=this.options,$=new b,ae=K.domBuilder||new D,ee=K.errorHandler,U=K.locator,A=K.xmlns||{},te=/\/x?html?$/.test(H),N=te?r.HTML_ENTITIES:r.XML_ENTITIES;U&&ae.setDocumentLocator(U),$.errorHandler=_(ee,ae,U),$.domBuilder=K.domBuilder||ae,te&&(A[""]=u.HTML),A.xml=A.xml||u.XML;var T=K.normalizeLineEndings||p;return v&&typeof v=="string"?$.parse(T(v),A,N):$.errorHandler.error("invalid doc source"),ae.doc};function _(v,H,K){if(!v){if(H instanceof D)return H;v=H}var $={},ae=v instanceof Function;K=K||{};function ee(U){var A=v[U];!A&&ae&&(A=v.length==2?function(te){v(U,te)}:v),$[U]=A&&function(te){A("[xmldom "+U+"] "+te+j(K))}||function(){}}return ee("warning"),ee("error"),ee("fatalError"),$}function D(){this.cdata=!1}function V(v,H){H.lineNumber=v.lineNumber,H.columnNumber=v.columnNumber}D.prototype={startDocument:function(){this.doc=new i().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(v,H,K,$){var ae=this.doc,ee=ae.createElementNS(v,K||H),U=$.length;ie(this,ee),this.currentElement=ee,this.locator&&V(this.locator,ee);for(var A=0;A<U;A++){var v=$.getURI(A),te=$.getValue(A),K=$.getQName(A),N=ae.createAttributeNS(v,K);this.locator&&V($.getLocator(A),N),N.value=N.nodeValue=te,ee.setAttributeNode(N)}},endElement:function(v,H,K){var $=this.currentElement;$.tagName,this.currentElement=$.parentNode},startPrefixMapping:function(v,H){},endPrefixMapping:function(v){},processingInstruction:function(v,H){var K=this.doc.createProcessingInstruction(v,H);this.locator&&V(this.locator,K),ie(this,K)},ignorableWhitespace:function(v,H,K){},characters:function(v,H,K){if(v=Y.apply(this,arguments),v){if(this.cdata)var $=this.doc.createCDATASection(v);else var $=this.doc.createTextNode(v);this.currentElement?this.currentElement.appendChild($):/^\s*$/.test(v)&&this.doc.appendChild($),this.locator&&V(this.locator,$)}},skippedEntity:function(v){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(v){(this.locator=v)&&(v.lineNumber=0)},comment:function(v,H,K){v=Y.apply(this,arguments);var $=this.doc.createComment(v);this.locator&&V(this.locator,$),ie(this,$)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(v,H,K){var $=this.doc.implementation;if($&&$.createDocumentType){var ae=$.createDocumentType(v,H,K);this.locator&&V(this.locator,ae),ie(this,ae),this.doc.doctype=ae}},warning:function(v){console.warn("[xmldom warning] "+v,j(this.locator))},error:function(v){console.error("[xmldom error] "+v,j(this.locator))},fatalError:function(v){throw new c(v,this.locator)}};function j(v){if(v)return`
13
- @`+(v.systemId||"")+"#[line:"+v.lineNumber+",col:"+v.columnNumber+"]"}function Y(v,H,K){return typeof v=="string"?v.substr(H,K):v.length>=H+K||H?new java.lang.String(v,H,K)+"":v}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(v){D.prototype[v]=function(){return null}});function ie(v,H){v.currentElement?v.currentElement.appendChild(H):v.doc.appendChild(H)}return pt.__DOMHandler=D,pt.normalizeLineEndings=p,pt.DOMParser=m,pt}var qt;function ln(){if(qt)return dt;qt=1;var n=Vt();return dt.DOMImplementation=n.DOMImplementation,dt.XMLSerializer=n.XMLSerializer,dt.DOMParser=un().DOMParser,dt}var Ht=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"],_n=["contenteditable","onDblclick","onKeydown"],Tn={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"],Un={key:1},qn=["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(y=>({a71f898c:y.theme.colors.indentLine}));const r=n,a=t,i=o.ref(!1),u=o.ref(null),c=o.ref(null),b=o.ref(!1),p=o.ref(!1),m=o.ref(""),_=o.ref(""),D=o.ref(""),V=o.ref(""),j=o.ref(""),Y=o.ref(null),ie=o.ref(null),v=o.ref(null),H=o.ref(null),K=o.ref(null),$=o.computed(()=>Object.keys(r.node).find(ne=>!ne.startsWith(":")&&!ne.startsWith("#"))||""),ae=o.computed(()=>$.value?r.parentPath?`${r.parentPath}.${$.value}[${r.index}]`:`${$.value}[${r.index}]`:""),ee=o.computed(()=>r.expanded.has(ae.value)),U=o.computed(()=>r.node["#comment"]?"comment":r.node.__cdata?"cdata":$.value?"element":"unknown"),A=o.computed(()=>{const y=r.node[":@"]||{},ne={};return Object.keys(y).forEach(Ce=>{Ce.startsWith("@_")&&(ne[Ce.substring(2)]=y[Ce])}),ne}),te=o.computed(()=>{if(U.value!=="element"||!$.value)return[];const y=r.node[$.value];return Array.isArray(y)?y:[]}),N=o.computed(()=>te.value.some(y=>y.__cdata)),T=o.computed(()=>{if(!N.value)return"";const y=te.value.find(ne=>ne.__cdata);if(y&&Array.isArray(y.__cdata)){const ne=y.__cdata;if(ne.length>0&&ne[0]["#text"])return ne[0]["#text"]}return""}),q=o.computed(()=>{if(U.value!=="element"||!$.value||N.value)return"";const y=r.node[$.value];if(!Array.isArray(y))return"";const ne=y.find(Ce=>Ce["#text"]);return ne?ne["#text"]:""}),W=o.computed(()=>{if(U.value!=="comment")return"";const y=r.node["#comment"];return Array.isArray(y)&&y.length>0&&y[0]["#text"]||""}),M=o.computed(()=>te.value.some(y=>Object.keys(y).some(Ce=>!Ce.startsWith("#")&&!Ce.startsWith(":")))),de=o.computed(()=>M.value?te.value.filter(y=>Object.keys(y).some(Ce=>!Ce.startsWith("#")&&!Ce.startsWith(":"))).length:0),he=o.computed(()=>U.value==="element"&&!M.value&&q.value!==""),ye=o.computed(()=>U.value==="element"&&!M.value&&q.value===""),x=o.computed(()=>ye.value&&r.selfClosingTags?.has($.value)||!1),B=()=>{M.value&&a("toggle-expand",ae.value)},X=(y,ne)=>`${ae.value}-child-${ne}`,Z=()=>`${ae.value}.${$.value}`,F=()=>{i.value=!0,m.value=$.value,o.nextTick(()=>{if(Y.value){Y.value.focus();const y=document.createRange();y.selectNodeContents(Y.value);const ne=window.getSelection();ne?.removeAllRanges(),ne?.addRange(y)}})},le=y=>{u.value=y,_.value=y,o.nextTick(()=>{if(ie.value){ie.value.focus();const ne=document.createRange();ne.selectNodeContents(ie.value);const Ce=window.getSelection();Ce?.removeAllRanges(),Ce?.addRange(ne)}})},w=y=>{c.value=y,D.value=A.value[y]||"",o.nextTick(()=>{if(v.value){v.value.focus();const ne=document.createRange();ne.selectNodeContents(v.value);const Ce=window.getSelection();Ce?.removeAllRanges(),Ce?.addRange(ne)}})},k=()=>{b.value=!0,V.value=q.value,o.nextTick(()=>{if(H.value){H.value.focus();const y=document.createRange();y.selectNodeContents(H.value);const ne=window.getSelection();ne?.removeAllRanges(),ne?.addRange(y)}})},L=()=>{if(!i.value)return;const y=Y.value?.innerText.trim()||"";if(!y||y===$.value){i.value=!1;return}i.value=!1,a("update:tagName",ae.value,$.value,y)},G=()=>{if(!u.value)return;const y=u.value,ne=ie.value?.innerText.trim()||"";if(!ne||ne===y){u.value=null;return}u.value=null,a("update:attributeName",ae.value,y,ne)},Q=()=>{if(!c.value)return;const y=c.value,ne=v.value?.innerText.trim()||"";c.value=null,a("update:attributeValue",ae.value,y,ne)},R=()=>{if(!b.value)return;const y=H.value?.innerText||"";if(y===q.value){b.value=!1;return}b.value=!1,a("update:textContent",ae.value,y)},J=()=>{i.value=!1,m.value=$.value},ge=()=>{u.value&&(_.value=u.value,u.value=null)},Ee=()=>{c.value&&(D.value=A.value[c.value]||"",c.value=null)},_e=()=>{b.value=!1,V.value=q.value},ke=()=>{p.value=!0,j.value=T.value,o.nextTick(()=>{if(K.value){K.value.focus();const y=document.createRange();y.selectNodeContents(K.value);const ne=window.getSelection();ne?.removeAllRanges(),ne?.addRange(y)}})},De=()=>{if(!p.value)return;const y=K.value?.innerText||"";if(y===T.value){p.value=!1;return}p.value=!1,a("update:cdataContent",ae.value,y)},z=()=>{p.value=!1,j.value=T.value},Be=y=>{M.value&&(y.preventDefault(),F())};return(y,ne)=>{const Ce=o.resolveComponent("XmlNode",!0);return o.openBlock(),o.createElementBlock("div",{class:"xml-node",style:o.normalizeStyle({paddingLeft:y.level>0?"16px":"0"})},[U.value==="comment"?(o.openBlock(),o.createElementBlock("div",cn,[o.createElementVNode("span",{style:o.normalizeStyle({color:y.theme.colors.xmlComment})}," <!-- "+o.toDisplayString(W.value)+" --> ",5)])):U.value==="cdata"?(o.openBlock(),o.createElementBlock("div",dn,[o.createElementVNode("span",{style:o.normalizeStyle({color:y.theme.colors.xmlCdata})}," <![CDATA["+o.toDisplayString(y.node.__cdata)+"]]> ",5)])):U.value==="element"?(o.openBlock(),o.createElementBlock("div",pn,[N.value?(o.openBlock(),o.createElementBlock("div",hn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:y.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:F,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(J,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:$.value),45,mn),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(be,O)=>(o.openBlock(),o.createElementBlock("span",{key:O,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttribute}),contenteditable:u.value===O,onDblclick:P=>le(O),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(ge,["escape"])],onBlur:G,ref_for:!0,ref:P=>{u.value===O&&(ie.value=P)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===O?_.value:O),45,gn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:y.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttributeValue}),contenteditable:c.value===O,onDblclick:P=>w(O),onKeydown:[o.withKeys(o.withModifiers(Q,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:Q,ref_for:!0,ref:P=>{c.value===O&&(v.value=P)},title:"Double-click to edit attribute value"},o.toDisplayString(c.value===O?D.value:be),45,En),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},">",4),o.createElementVNode("span",{class:"xml-node__cdata",style:o.normalizeStyle({color:y.theme.colors.xmlCdata})},"<![CDATA[",4),o.createElementVNode("span",{class:"xml-node__cdata-content xml-node__cdata-content--editable",style:o.normalizeStyle({color:y.theme.colors.xmlCdata}),contenteditable:p.value,onDblclick:ke,onKeydown:[o.withKeys(o.withModifiers(De,["prevent"]),["enter"]),o.withKeys(z,["escape"])],onBlur:De,ref_key:"cdataContentRef",ref:K,title:"Double-click to edit CDATA content"},o.toDisplayString(p.value?j.value:T.value),45,yn),o.createElementVNode("span",{class:"xml-node__cdata",style:o.normalizeStyle({color:y.theme.colors.xmlCdata})},"]]>",4),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:y.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:$.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},">",4)])):he.value?(o.openBlock(),o.createElementBlock("div",bn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:y.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:F,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(J,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:$.value),45,An),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(be,O)=>(o.openBlock(),o.createElementBlock("span",{key:O,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttribute}),contenteditable:u.value===O,onDblclick:P=>le(O),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(ge,["escape"])],onBlur:G,ref_for:!0,ref:P=>{u.value===O&&(ie.value=P)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===O?_.value:O),45,xn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:y.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttributeValue}),contenteditable:c.value===O,onDblclick:P=>w(O),onKeydown:[o.withKeys(o.withModifiers(Q,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:Q,ref_for:!0,ref:P=>{c.value===O&&(v.value=P)},title:"Double-click to edit attribute value"},o.toDisplayString(c.value===O?D.value:be),45,Nn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},">",4),o.createElementVNode("span",{class:"xml-node__text-content xml-node__text-content--editable",style:o.normalizeStyle({color:y.theme.colors.xmlText}),contenteditable:b.value,onDblclick:k,onKeydown:[o.withKeys(o.withModifiers(R,["prevent"]),["enter"]),o.withKeys(_e,["escape"])],onBlur:R,ref_key:"textContentRef",ref:H,title:"Double-click to edit text content"},o.toDisplayString(b.value?V.value:q.value),45,Cn),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:y.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:$.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},">",4)])):ye.value&&x.value?(o.openBlock(),o.createElementBlock("div",Dn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:y.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:F,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(J,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:$.value),45,vn),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(be,O)=>(o.openBlock(),o.createElementBlock("span",{key:O,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttribute}),contenteditable:u.value===O,onDblclick:P=>le(O),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(ge,["escape"])],onBlur:G,ref_for:!0,ref:P=>{u.value===O&&(ie.value=P)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===O?_.value:O),45,wn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:y.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttributeValue}),contenteditable:c.value===O,onDblclick:P=>w(O),onKeydown:[o.withKeys(o.withModifiers(Q,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:Q,ref_for:!0,ref:P=>{c.value===O&&(v.value=P)},title:"Double-click to edit attribute value"},o.toDisplayString(c.value===O?D.value:be),45,_n),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})}," />",4)])):ye.value?(o.openBlock(),o.createElementBlock("div",Tn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:y.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:F,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(J,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:$.value),45,Bn),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(be,O)=>(o.openBlock(),o.createElementBlock("span",{key:O,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttribute}),contenteditable:u.value===O,onDblclick:P=>le(O),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(ge,["escape"])],onBlur:G,ref_for:!0,ref:P=>{u.value===O&&(ie.value=P)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===O?_.value:O),45,Sn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:y.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttributeValue}),contenteditable:c.value===O,onDblclick:P=>w(O),onKeydown:[o.withKeys(o.withModifiers(Q,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:Q,ref_for:!0,ref:P=>{c.value===O&&(v.value=P)},title:"Double-click to edit attribute value"},o.toDisplayString(c.value===O?D.value:be),45,On),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"></",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:y.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:$.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},">",4)])):(o.openBlock(),o.createElementBlock("div",kn,[!ee.value&&M.value?(o.openBlock(),o.createElementBlock("div",Rn,[o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:ne[0]||(ne[0]=be=>B()),title:"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:y.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:o.withModifiers(F,["stop"]),onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(J,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:Y,title:"Double-click or right-click to edit tag name"},o.toDisplayString(i.value?m.value:$.value),45,In)]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(be,O)=>(o.openBlock(),o.createElementBlock("span",{key:O,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttribute}),contenteditable:u.value===O,onDblclick:P=>le(O),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(ge,["escape"])],onBlur:G,ref_for:!0,ref:P=>{u.value===O&&(ie.value=P)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===O?_.value:O),45,Fn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:y.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttributeValue}),contenteditable:c.value===O,onDblclick:P=>w(O),onKeydown:[o.withKeys(o.withModifiers(Q,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:Q,ref_for:!0,ref:P=>{c.value===O&&(v.value=P)},title:"Double-click to edit attribute value"},o.toDisplayString(c.value===O?D.value:be),45,Pn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:ne[1]||(ne[1]=be=>B()),title:"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},">",4)]),o.createElementVNode("span",{class:"xml-node__collapsed-badge",style:o.normalizeStyle({backgroundColor:y.theme.colors.collapsedBackground,color:y.theme.colors.collapsedText}),onClick:ne[2]||(ne[2]=be=>B()),title:`Click to expand ${de.value} child element${de.value>1?"s":""}`},o.toDisplayString(de.value)+" child"+o.toDisplayString(de.value>1?"ren":""),13,Ln),o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:ne[3]||(ne[3]=be=>B()),title:"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:y.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:$.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},">",4)])])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",Vn,[M.value?(o.openBlock(),o.createElementBlock("span",{key:0,class:"xml-node__clickable-part",onClick:ne[4]||(ne[4]=be=>B()),title:ee.value?"Click to collapse":"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:y.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:o.withModifiers(F,["stop"]),onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(J,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:Y,title:"Double-click or right-click to edit tag name"},o.toDisplayString(i.value?m.value:$.value),45,Mn)],8,$n)):(o.openBlock(),o.createElementBlock("span",Un,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:y.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:F,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(J,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:$.value),45,qn)])),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(be,O)=>(o.openBlock(),o.createElementBlock("span",{key:O,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttribute}),contenteditable:u.value===O,onDblclick:P=>le(O),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(ge,["escape"])],onBlur:G,ref_for:!0,ref:P=>{u.value===O&&(ie.value=P)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===O?_.value:O),45,Hn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:y.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttributeValue}),contenteditable:c.value===O,onDblclick:P=>w(O),onKeydown:[o.withKeys(o.withModifiers(Q,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:Q,ref_for:!0,ref:P=>{c.value===O&&(v.value=P)},title:"Double-click to edit attribute value"},o.toDisplayString(c.value===O?D.value:be),45,jn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4)]))),128)),M.value?(o.openBlock(),o.createElementBlock("span",{key:2,class:"xml-node__clickable-part",onClick:ne[5]||(ne[5]=be=>B()),title:ee.value?"Click to collapse":"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},">",4)],8,Kn)):(o.openBlock(),o.createElementBlock("span",{key:3,class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},o.toDisplayString(M.value?">":"/>"),5))]),ee.value&&M.value?(o.openBlock(),o.createElementBlock("div",Gn,[te.value.length===0&&q.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:y.theme.colors.xmlText}),contenteditable:b.value,onDblclick:k,onKeydown:[o.withKeys(o.withModifiers(R,["prevent"]),["enter"]),o.withKeys(_e,["escape"])],onBlur:R,ref_key:"textContentRef",ref:H,title:"Double-click to edit text content"},o.toDisplayString(b.value?V.value:q.value),45,zn)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(te.value,(be,O)=>(o.openBlock(),o.createBlock(Ce,{key:X(be,O),node:be,index:O,level:y.level+1,"parent-path":Z(),expanded:y.expanded,theme:y.theme,selfClosingTags:y.selfClosingTags,onToggleExpand:ne[6]||(ne[6]=P=>y.$emit("toggle-expand",P)),onCopy:ne[7]||(ne[7]=P=>y.$emit("copy",P)),"onUpdate:tagName":ne[8]||(ne[8]=(P,Re,qe)=>y.$emit("update:tagName",P,Re,qe)),"onUpdate:attributeName":ne[9]||(ne[9]=(P,Re,qe)=>y.$emit("update:attributeName",P,Re,qe)),"onUpdate:attributeValue":ne[10]||(ne[10]=(P,Re,qe)=>y.$emit("update:attributeValue",P,Re,qe)),"onUpdate:textContent":ne[11]||(ne[11]=(P,Re)=>y.$emit("update:textContent",P,Re)),"onUpdate:cdataContent":ne[12]||(ne[12]=(P,Re)=>y.$emit("update:cdataContent",P,Re))},null,8,["node","index","level","parent-path","expanded","theme","selfClosingTags"]))),128))])):o.createCommentVNode("",!0),ee.value&&M.value?(o.openBlock(),o.createElementBlock("div",Wn,[o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:ne[13]||(ne[13]=be=>B()),title:"Click to collapse"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:y.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:$.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},">",4)])])):o.createCommentVNode("",!0)],64))]))])):o.createCommentVNode("",!0)],4)}}}),[["__scopeId","data-v-acda96f3"]]),jt={"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=>jt[n]||jt["github-light"],Kt=":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=Kt+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Jn="["+Kt+"]["+Zn+"]*",eo=new RegExp("^"+Jn+"$");function Gt(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 c=0;c<u;c++)i.push(a[c]);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 Xt(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=Wt(n,u),u.err)return u}else if(n[u]==="<"){let c=u;if(u++,n[u]==="!"){u=Yt(n,u);continue}else{let b=!1;n[u]==="/"&&(b=!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 V=Qt(_,t);if(V===!0)a=!0;else return Oe(V.err.code,V.err.msg,Ve(n,D+V.err.line))}else if(b)if(m.tagClosed){if(_.trim().length>0)return Oe("InvalidTag","Closing tag '"+p+"' can't have attributes or invalid starting.",Ve(n,c));if(r.length===0)return Oe("InvalidTag","Closing tag '"+p+"' has not been opened.",Ve(n,c));{const D=r.pop();if(p!==D.tagName){let V=Ve(n,D.tagStartPos);return Oe("InvalidTag","Expected closing tag '"+D.tagName+"' (opened in line "+V.line+", col "+V.col+") instead of closing tag '"+p+"'.",Ve(n,c))}r.length==0&&(i=!0)}}else return Oe("InvalidTag","Closing tag '"+p+"' doesn't have proper closing.",Ve(n,u));else{const D=Qt(_,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:c}),a=!0}for(u++;u<n.length;u++)if(n[u]==="<")if(n[u+1]==="!"){u++,u=Yt(n,u);continue}else if(n[u+1]==="?"){if(u=Wt(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&&!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 Wt(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 Yt(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 Qt(n,t){const r=Gt(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,c=!1,b="";for(;r<t.length;r++)if(t[r]==="<"&&!c){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))c=!0;else throw new Error("Invalid DOCTYPE");i++,b=""}else if(t[r]===">"){if(c?t[r-1]==="-"&&t[r-2]==="-"&&(c=!1,i--):i--,i===0)break}else t[r]==="["?u=!0:b+=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,c=null;if(i==="PUBLIC")[r,u]=this.readIdentifierVal(t,r,"publicIdentifier"),r=$e(t,r),(t[r]==='"'||t[r]==="'")&&([r,c]=this.readIdentifierVal(t,r,"systemIdentifier"));else if(i==="SYSTEM"&&([r,c]=this.readIdentifierVal(t,r,"systemIdentifier"),!this.suppressValidationErr&&!c))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:a,publicIdentifier:u,systemIdentifier:c,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 b=[];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}"`);b.push(p),t[r]==="|"&&(r++,r=$e(t,r))}if(t[r]!==")")throw new Error("Unterminated list of notations");r++,u+=" ("+b.join("|")+")"}else{for(;r<t.length&&!/\s/.test(t[r]);)u+=t[r],r++;const b=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!b.includes(u.toUpperCase()))throw new Error(`Invalid attribute type: "${u}"`)}r=$e(t,r);let c="";return t.substring(r,r+8).toUpperCase()==="#REQUIRED"?(c="#REQUIRED",r+=8):t.substring(r,r+7).toUpperCase()==="#IMPLIED"?(c="#IMPLIED",r+=7):[r,c]=this.readIdentifierVal(t,r,"ATTLIST"),{elementName:a,attributeName:i,attributeType:u,defaultValue:c,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 c=xo(a[3]);const b=i?n[u.length+1]===".":n[u.length]===".";if(!t.leadingZeros&&(u.length>1||u.length===1&&!b))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===c||m===`${i}${c}`?p:n;let _=u?c: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",c=a[2],b=i?n[c.length+1]===u:n[c.length]===u;return c.length>1&&b?n:c.length===1&&(a[3].startsWith(`.${u}`)||a[3][0]===u)?Number(t):r.leadingZeros&&!b?(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 Zt(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=To,this.isItStopNode=Ro,this.replaceEntitiesValue=Oo,this.readStopNodeData=Fo,this.saveTextToParentTag=ko,this.addChild=So,this.ignoreAttributesFn=Zt(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,c){if(n!==void 0&&(this.options.trimValues&&!a&&(n=n.trim()),n.length>0)){c||(n=this.replaceEntitiesValue(n));const b=this.options.tagValueProcessor(t,n,r,i,u);return b==null?n:typeof b!=typeof n||b!==n?b:this.options.trimValues?Tt(n,this.options.parseTagValue,this.options.numberParseOptions):n.trim()===n?Tt(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 _o=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function To(n,t,r){if(this.options.ignoreAttributes!==!0&&typeof n=="string"){const a=Gt(n,_o),i=a.length,u={};for(let c=0;c<i;c++){const b=this.resolveNameSpace(a[c][1]);if(this.ignoreAttributesFn(b,t))continue;let p=a[c][4],m=this.options.attributeNamePrefix+b;if(b.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(b,p,t);_==null?u[m]=p:typeof _!=typeof p||_!==p?u[m]=_:u[m]=Tt(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 c={};return c[this.options.attributesGroupName]=u,c}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 c=0;c<n.length;c++)if(n[c]==="<")if(n[c+1]==="/"){const p=lt(n,">",c,"Closing Tag is not closed.");let m=n.substring(c+2,p).trim();if(this.options.removeNSPrefix){const V=m.indexOf(":");V!==-1&&(m=m.substr(V+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="",c=p}else if(n[c+1]==="?"){let p=_t(n,c,!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,c)}c=p.closeIndex+1}else if(n.substr(c+1,3)==="!--"){const p=lt(n,"-->",c+4,"Comment is not closed.");if(this.options.commentPropName){const m=n.substring(c+4,p-2);a=this.saveTextToParentTag(a,r,i),r.add(this.options.commentPropName,[{[this.options.textNodeName]:m}])}c=p}else if(n.substr(c+1,2)==="!D"){const p=u.readDocType(n,c);this.docTypeEntities=p.entities,c=p.i}else if(n.substr(c+1,2)==="!["){const p=lt(n,"]]>",c,"CDATA is not closed.")-2,m=n.substring(c+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,_),c=p+2}else{let p=_t(n,c,this.options.removeNSPrefix),m=p.tagName;const _=p.rawTagName;let D=p.tagExp,V=p.attrExpPresent,j=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 ie=c;if(this.isItStopNode(this.options.stopNodes,i,m)){let v="";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),c=p.closeIndex;else if(this.options.unpairedTags.indexOf(m)!==-1)c=p.closeIndex;else{const K=this.readStopNodeData(n,_,j+1);if(!K)throw new Error(`Unexpected end of ${_}`);c=K.i,v=K.tagContent}const H=new at(m);m!==D&&V&&(H[":@"]=this.buildAttributesMap(D,i,m)),v&&(v=this.parseTextData(v,m,i,!0,V,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),H.add(this.options.textNodeName,v),this.addChild(r,H,i,ie)}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 v=new at(m);m!==D&&V&&(v[":@"]=this.buildAttributesMap(D,i,m)),this.addChild(r,v,i,ie),i=i.substr(0,i.lastIndexOf("."))}else{const v=new at(m);this.tagsNodeStack.push(r),m!==D&&V&&(v[":@"]=this.buildAttributesMap(D,i,m)),this.addChild(r,v,i,ie),r=v}a="",c=j}}else a+=n[c];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 c=n[u];if(a)c===a&&(a="");else if(c==='"'||c==="'")a=c;else if(c===r[0])if(r[1]){if(n[u+1]===r[1])return{data:i,index:u}}else return{data:i,index:u};else c===" "&&(c=" ");i+=c}}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 _t(n,t,r,a=">"){const i=Io(n,t+1,a);if(!i)return;let u=i.data;const c=i.index,b=u.search(/\s/);let p=u,m=!0;b!==-1&&(p=u.substring(0,b),u=u.substring(b+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:c,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=_t(n,r,">");u&&((u&&u.tagName)===t&&u.tagExp[u.tagExp.length-1]!=="/"&&i++,r=u.closeIndex)}}function Tt(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 Jt(n,t)}function Jt(n,t,r){let a;const i={};for(let u=0;u<n.length;u++){const c=n[u],b=Lo(c);let p="";if(r===void 0?p=b:p=r+"."+b,b===t.textNodeName)a===void 0?a=c[b]:a+=""+c[b];else{if(b===void 0)continue;if(c[b]){let m=Jt(c[b],t,p);const _=$o(m,t);c[Bt]!==void 0&&(m[Bt]=c[Bt]),c[":@"]?Vo(m,c[":@"],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[b]!==void 0&&i.hasOwnProperty(b)?(Array.isArray(i[b])||(i[b]=[i[b]]),i[b].push(m)):t.isArray(b,p,_)?i[b]=[m]:i[b]=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 c=0;c<u;c++){const b=i[c];a.isArray(b,r+"."+b,!0,!0)?n[b]=[t[b]]:n[b]=t[b]}}}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=Xt(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 Uo=`
17
- `;function qo(n,t){let r="";return t.format&&t.indentBy.length>0&&(r=Uo),er(n,t,"",r)}function er(n,t,r,a){let i="",u=!1;for(let c=0;c<n.length;c++){const b=n[c],p=Ho(b);if(p===void 0)continue;let m="";if(r.length===0?m=p:m=`${r}.${p}`,p===t.textNodeName){let Y=b[p];jo(m,t)||(Y=t.tagValueProcessor(p,Y),Y=rr(Y,t)),u&&(i+=a),i+=Y,u=!1;continue}else if(p===t.cdataPropName){u&&(i+=a),i+=`<![CDATA[${b[p][0][t.textNodeName]}]]>`,u=!1;continue}else if(p===t.commentPropName){i+=a+`<!--${b[p][0][t.textNodeName]}-->`,u=!0;continue}else if(p[0]==="?"){const Y=tr(b[":@"],t),ie=p==="?xml"?"":a;let v=b[p][0][t.textNodeName];v=v.length!==0?" "+v:"",i+=ie+`<${p}${v}${Y}?>`,u=!0;continue}let _=a;_!==""&&(_+=t.indentBy);const D=tr(b[":@"],t),V=a+`<${p}${D}`,j=er(b[p],t,m,_);t.unpairedTags.indexOf(p)!==-1?t.suppressUnpairedNode?i+=V+">":i+=V+"/>":(!j||j.length===0)&&t.suppressEmptyNode?i+=V+"/>":j&&j.endsWith(">")?i+=V+`>${j}${a}</${p}>`:(i+=V+">",j&&a!==""&&(j.includes("/>")||j.includes("</"))?i+=a+t.indentBy+j+a:i+=j,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 tr(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=rr(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 rr(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=Zt(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 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=`>
18
18
  `,this.newLine=`
19
- `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}nt.prototype.build=function(n){return this.options.preserveOrder?qo(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 c in n)if(Object.prototype.hasOwnProperty.call(n,c))if(typeof n[c]>"u")this.isAttribute(c)&&(i+="");else if(n[c]===null)this.isAttribute(c)||c===this.options.cdataPropName?i+="":c[0]==="?"?i+=this.indentate(t)+"<"+c+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+c+"/"+this.tagEndChar;else if(n[c]instanceof Date)i+=this.buildTextValNode(n[c],c,"",t);else if(typeof n[c]!="object"){const b=this.isAttribute(c);if(b&&!this.ignoreAttributesFn(b,u))a+=this.buildAttrPairStr(b,""+n[c]);else if(!b)if(c===this.options.textNodeName){let p=this.options.tagValueProcessor(c,""+n[c]);i+=this.replaceEntitiesValue(p)}else i+=this.buildTextValNode(n[c],c,"",t)}else if(Array.isArray(n[c])){const b=n[c].length;let p="",m="";for(let _=0;_<b;_++){const D=n[c][_];if(!(typeof D>"u"))if(D===null)c[0]==="?"?i+=this.indentate(t)+"<"+c+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+c+"/"+this.tagEndChar;else if(typeof D=="object")if(this.options.oneListGroup){const V=this.j2x(D,t+1,r.concat(c));p+=V.val,this.options.attributesGroupName&&D.hasOwnProperty(this.options.attributesGroupName)&&(m+=V.attrStr)}else p+=this.processTextOrObjNode(D,c,t,r);else if(this.options.oneListGroup){let V=this.options.tagValueProcessor(c,D);V=this.replaceEntitiesValue(V),p+=V}else p+=this.buildTextValNode(D,c,"",t)}this.options.oneListGroup&&(p=this.buildObjectNode(p,c,m,t)),i+=p}else if(this.options.attributesGroupName&&c===this.options.attributesGroupName){const b=Object.keys(n[c]),p=b.length;for(let m=0;m<p;m++)a+=this.buildAttrPairStr(b[m],""+n[c][b[m]])}else i+=this.processTextOrObjNode(n[c],c,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:Xt},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=/&([a-zA-Z0-9#]+);/g,r=["lt","gt","amp","quot","apos"];let a,i=1,u=0;for(;(a=t.exec(n))!==null;){const c=a[1],b=a.index,p=n.substring(u,b);if(i+=(p.match(/\n/g)||[]).length,u=b,c.startsWith("#")){const m=c.substring(1);if(m.startsWith("x")||m.startsWith("X")){const _=m.substring(1);if(!/^[0-9a-fA-F]+$/.test(_))return{valid:!1,error:`Line ${i}: Invalid hexadecimal character reference '&${c};'`}}else if(!/^[0-9]+$/.test(m))return{valid:!1,error:`Line ${i}: Invalid numeric character reference '&${c};'`};continue}if(!r.includes(c))return{valid:!1,error:`Line ${i}: Invalid entity reference '&${c};'. 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"?>
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)},nr=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):"",c=i?`
21
- `:"";let b=t.selfClosingTags;!b&&t.originalXml&&a===0&&(b=nr(t.originalXml));let p="";for(const m of n){if(m["?xml"]){const $=m[":@"]||{},ae=Object.entries($).map(([ee,U])=>`${ee.startsWith("@_")?ee.substring(2):ee}="${U}"`).join(" ");p+=`<?xml ${ae}?>${c}`;continue}if(m["#comment"]){const $=m["#comment"];if(Array.isArray($)&&$.length>0){const ae=$[0]["#text"]||$[0];p+=`${u}<!--${ae}-->${c}`}continue}const _=Object.keys(m).find($=>!$.startsWith(":")&&!$.startsWith("#")&&!$.startsWith("__"));if(!_)continue;const D=m[_],V=m[":@"]||{},j=Object.entries(V).map(([$,ae])=>`${$.startsWith("@_")?$.substring(2):$}="${ae}"`).join(" "),Y=j?" "+j:"";if(!Array.isArray(D)||D.length===0){b&&b.has(_)?p+=`${u}<${_}${Y}/>${c}`:p+=`${u}<${_}${Y}></${_}>${c}`;continue}const ie=D.length===1&&D[0]["#text"]!==void 0,v=ie?D[0]["#text"]:"",H=D.some($=>$.__cdata),K=ie&&v==="";if(H){const $=D.find(ae=>ae.__cdata);if($){const ae=$.__cdata[0]["#text"]||"";p+=`${u}<${_}${Y}><![CDATA[${ae}]]></${_}>${c}`}}else K?p+=`${u}<${_}${Y}></${_}>${c}`:ie?p+=`${u}<${_}${Y}>${v}</${_}>${c}`:(p+=`${u}<${_}${Y}>${c}`,p+=et(D,{indent:r,level:a+1,format:i,selfClosingTags:b}),p+=`${u}</${_}>${c}`)}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(x=>({"0182b876":Y.value.colors.border,78071047:Y.value.colors.background,"43b18706":Y.value.colors.text,"52bf9efc":Y.value.colors.surfaceBackground,"7c039a52":Y.value.colors.buttonBorder,b936734e:Y.value.colors.buttonBackground,"46649ad0":Y.value.colors.buttonText,"56b12263":Y.value.colors.buttonBackgroundHover,"670324b7":Y.value.colors.buttonPrimary,"2dc50ec5":Y.value.colors.buttonPrimaryHover,"7549038a":Y.value.colors.success,"46d3d058":Y.value.colors.successBackground,"31b1cb4f":Y.value.colors.error,"07a53446":Y.value.colors.errorBackground}));const a=n,i=r,u=o.ref(null),c=o.ref(""),b=o.ref(new Set),p=o.ref(null),m=o.ref(""),_=o.ref(""),D=o.ref(new Set),V=o.computed(()=>c.value===""),j=o.computed(()=>m.value?null:p.value!==null?p.value:u.value),Y=o.computed(()=>Qn(a.theme)),ie=o.computed(()=>{const x=j.value;return!x||!Array.isArray(x)?[]:x.map((B,X)=>({node:B,originalIndex:X})).filter(B=>!B.node["?xml"])}),v=o.computed(()=>{const x=j.value;if(!x||!Array.isArray(x))return null;const B=x.find(F=>F["?xml"]);if(!B||!B[":@"])return null;const X=B[":@"],Z=[];return X["@_version"]&&Z.push(`version="${X["@_version"]}"`),X["@_encoding"]&&Z.push(`encoding="${X["@_encoding"]}"`),X["@_standalone"]&&Z.push(`standalone="${X["@_standalone"]}"`),Z.length>0?`<?xml ${Z.join(" ")}?>`:null}),H=o.computed(()=>ie.value),K=x=>{if(!x||!x.trim()){c.value="",u.value=null,_.value="",p.value=null,m.value="";return}try{const B=Jo(x);if(!B.valid){c.value=B.error||"Invalid XML",u.value=null,_.value="",D.value=new Set;return}_.value=x,D.value=nr(x),u.value=St(x),c.value="",p.value=null,m.value="",o.nextTick(()=>{ae()})}catch(B){c.value=B instanceof Error?B.message:"Unknown parse error",u.value=null,_.value="",p.value=null,m.value=""}},$=x=>{b.value.has(x)?b.value.delete(x):b.value.add(x)},ae=()=>{const x=new Set,B=(X,Z="")=>{Array.isArray(X)&&X.forEach((F,le)=>{const w=Object.keys(F).find(G=>!G.startsWith(":")&&!G.startsWith("#"));if(!w)return;const k=Z?`${Z}.${w}[${le}]`:`${w}[${le}]`;x.add(k);const L=F[w];Array.isArray(L)&&B(L,k+"."+w)})};ie.value.forEach(({node:X,originalIndex:Z})=>{const F=Object.keys(X).find(le=>!le.startsWith(":")&&!le.startsWith("#"));if(F){const le=`${F}[${Z}]`;x.add(le);const w=X[F];Array.isArray(w)&&B(w,le+"."+F)}}),b.value=x,i("expand-all")},ee=()=>{b.value.clear(),i("collapse-all")},U=async()=>{if(V.value)try{const x=j.value||u.value;if(!x)return;const B=Array.isArray(x)?et(x,{indent:" ",selfClosingTags:D.value}):Ot(x,{format:!0,indentBy:" "});await navigator.clipboard.writeText(B),i("copy-success",B)}catch(x){const B=x instanceof Error?x:new Error("Copy failed");i("copy-error",B),console.error("Failed to copy XML:",x)}},A=()=>{if(!(!V.value||!u.value))try{const x=es(u.value,a.modelValue);i("update:modelValue",x),i("compress",x)}catch(x){console.error("Failed to compress XML:",x)}},te=()=>{if(V.value)try{const x=ts(a.modelValue,{format:!0,indentBy:" "});i("update:modelValue",x),i("format",x)}catch(x){console.error("Failed to format XML:",x)}},N=x=>{if(!x||!x.expression.trim()){T();return}if(!u.value||!_.value){m.value="No valid XML data to filter";return}try{const X=new Ht.DOMParser().parseFromString(_.value,"text/xml"),Z=on.select(x.expression,X);if(!Z||Array.isArray(Z)&&Z.length===0){p.value=[],m.value="";return}const F=new Ht.XMLSerializer;let le="";Array.isArray(Z)?(le=`<result>
22
- `,Z.forEach(w=>{w.nodeType===1?le+=" "+F.serializeToString(w)+`
23
- `:w.nodeType===2?le+=` <attribute name="${w.name}" value="${w.value}"/>
24
- `:w.nodeType===3&&(le+=` <text>${w.nodeValue}</text>
25
- `)}),le+="</result>"):le=F.serializeToString(Z),p.value=St(le),m.value="",o.nextTick(()=>{ae()})}catch(B){m.value=B instanceof Error?B.message:"Filter execution error",p.value=null}},T=()=>{p.value=null,m.value="",o.nextTick(()=>{ae()})},q=async x=>{try{const B=typeof x=="string"?x:JSON.stringify(x,null,2);await navigator.clipboard.writeText(B),i("copy-success",B)}catch(B){const X=B instanceof Error?B:new Error("Copy failed");i("copy-error",X),console.error("Failed to copy value:",B)}},W=(x,B,X)=>{if(!(!u.value||!Array.isArray(u.value)))try{const Z=x.split(/\./).filter(Boolean);let F=u.value;for(let w=0;w<Z.length;w++){const k=Z[w],L=k.match(/^(.+?)\[(\d+)\]$/);if(L){const G=L[1],Q=parseInt(L[2]);if(w===Z.length-1){if(Array.isArray(F)&&F[Q]){const R=F[Q];if(R[B]){const J=R[B];delete R[B],R[X]=J,D.value.has(B)&&(D.value.delete(B),D.value.add(X))}}}else Array.isArray(F)&&F[Q]&&(F=F[Q])}else F[k]&&(F=F[k])}const le=et(u.value,{indent:" ",selfClosingTags:D.value});i("update:modelValue",le)}catch(Z){console.error("Failed to update tag name:",Z)}},M=(x,B,X)=>{if(!(!u.value||!Array.isArray(u.value)))try{const Z=x.split(/\./).filter(Boolean);let F=u.value;for(let w=0;w<Z.length;w++){const k=Z[w],L=k.match(/^(.+?)\[(\d+)\]$/);if(L){const G=L[1],Q=parseInt(L[2]);if(w===Z.length-1){if(Array.isArray(F)&&F[Q]){const J=F[Q][":@"];if(J&&J[`@_${B}`]!==void 0){const ge=J[`@_${B}`];delete J[`@_${B}`],J[`@_${X}`]=ge}}}else Array.isArray(F)&&F[Q]&&(F=F[Q])}else F[k]&&(F=F[k])}const le=et(u.value,{indent:" ",selfClosingTags:D.value});i("update:modelValue",le)}catch(Z){console.error("Failed to update attribute name:",Z)}},de=(x,B,X)=>{if(!(!u.value||!Array.isArray(u.value)))try{const Z=x.split(/\./).filter(Boolean);let F=u.value;for(let w=0;w<Z.length;w++){const k=Z[w],L=k.match(/^(.+?)\[(\d+)\]$/);if(L){const G=L[1],Q=parseInt(L[2]);if(w===Z.length-1){if(Array.isArray(F)&&F[Q]){const J=F[Q][":@"];J&&J[`@_${B}`]!==void 0&&(J[`@_${B}`]=X)}}else Array.isArray(F)&&F[Q]&&(F=F[Q])}else F[k]&&(F=F[k])}const le=et(u.value,{indent:" ",selfClosingTags:D.value});i("update:modelValue",le)}catch(Z){console.error("Failed to update attribute value:",Z)}},he=(x,B)=>{if(!(!u.value||!Array.isArray(u.value)))try{const X=x.split(/\./).filter(Boolean);let Z=u.value,F="";for(let w=0;w<X.length;w++){const k=X[w],L=k.match(/^(.+?)\[(\d+)\]$/);if(L){const G=L[1],Q=parseInt(L[2]);if(w===X.length-1){if(Array.isArray(Z)&&Z[Q]){const R=Z[Q];if(F=Object.keys(R).find(J=>!J.startsWith(":")&&!J.startsWith("#"))||"",F&&Array.isArray(R[F])){const J=R[F],ge=J.findIndex(Ee=>Ee["#text"]!==void 0);ge!==-1?J[ge]["#text"]=B:J.push({"#text":B})}}}else Array.isArray(Z)&&Z[Q]&&(Z=Z[Q])}else Z[k]&&(Z=Z[k])}const le=et(u.value,{indent:" ",selfClosingTags:D.value});i("update:modelValue",le)}catch(X){console.error("Failed to update text content:",X)}},ye=(x,B)=>{if(!(!u.value||!Array.isArray(u.value)))try{const X=x.split(/\./).filter(Boolean);let Z=u.value;for(let le=0;le<X.length;le++){const w=X[le],k=w.match(/^(.+?)\[(\d+)\]$/);if(k){const L=k[1],G=parseInt(k[2]);if(le===X.length-1){if(Array.isArray(Z)&&Z[G]){const Q=Z[G],R=Object.keys(Q).find(J=>!J.startsWith(":")&&!J.startsWith("#"));if(R&&Array.isArray(Q[R])){const J=Q[R],ge=J.findIndex(Ee=>Ee.__cdata!==void 0);if(ge!==-1){const Ee=J[ge];Array.isArray(Ee.__cdata)&&Ee.__cdata[0]&&(Ee.__cdata[0]["#text"]=B)}else J.push({__cdata:[{"#text":B}]})}}}else Array.isArray(Z)&&Z[G]&&(Z=Z[G])}else Z[w]&&(Z=Z[w])}const F=et(u.value,{indent:" ",selfClosingTags:D.value});i("update:modelValue",F)}catch(X){console.error("Failed to update CDATA content:",X)}};return o.watch(()=>a.modelValue,x=>{K(x)},{immediate:!0}),t({copyXml:U,compressSource:A,formatSource:te,expandAll:ae,collapseAll:ee,toggleExpand:$,filter:N,clearFilter:T,isValidXml:()=>V.value,getParsedXml:()=>u.value,getFilteredXml:()=>p.value,getExpandedNodes:()=>b.value,getParseError:()=>c.value,getFilterError:()=>m.value,parseXmlString:x=>K(x),copyValue:x=>q(x)}),(x,B)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["xml-format",`xml-format--${Y.value.name}`])},[x.showToolbar?(o.openBlock(),o.createElementBlock("div",rs,[o.createElementVNode("div",ns,[o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--primary",onClick:U,disabled:!V.value,title:"Copy XML"}," 📋 Copy ",8,os),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:ae,disabled:!V.value,title:"Expand All"}," ⬇️ Expand All ",8,ss),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:ee,disabled:!V.value,title:"Collapse All"}," ➡️ Collapse All ",8,is),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:A,disabled:!V.value,title:"Compress XML"}," 📦 Compress ",8,as),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:te,disabled:!V.value,title:"Format XML"}," ✨ Format ",8,us)]),o.createElementVNode("div",ls,[V.value?(o.openBlock(),o.createElementBlock("span",cs," ✅ Valid XML ")):(o.openBlock(),o.createElementBlock("span",fs," ❌ Invalid XML "))])])):o.createCommentVNode("",!0),o.createElementVNode("div",ds,[V.value?m.value?(o.openBlock(),o.createElementBlock("div",hs,[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",ms,[v.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"xml-declaration",style:o.normalizeStyle({color:Y.value.colors.xmlDeclaration})},o.toDisplayString(v.value),5)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(H.value,(X,Z)=>(o.openBlock(),o.createBlock(Yn,{key:Z,node:X.node,index:X.originalIndex,level:0,expanded:b.value,theme:Y.value,selfClosingTags:D.value,onToggleExpand:$,onCopy:q,"onUpdate:tagName":W,"onUpdate:attributeName":M,"onUpdate:attributeValue":de,"onUpdate:textContent":he,"onUpdate:cdataContent":ye},null,8,["node","index","expanded","theme","selfClosingTags"]))),128))])):(o.openBlock(),o.createElementBlock("div",ps,[B[0]||(B[0]=o.createElementVNode("h4",null,"XML Parse Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(c.value),1)]))])],2))}}),[["__scopeId","data-v-c6e64630"]]),or={"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=>or[n]||or["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(b=>new RegExp(`\\b${b}\\b`).test(t)))return{valid:!1,error:"No valid SQL keywords found"};let a=0;for(const b of n)if(b==="("&&a++,b===")"&&a--,a<0)return{valid:!1,error:"Mismatched parentheses"};if(a!==0)return{valid:!1,error:"Mismatched parentheses"};let i=0,u=0,c=!1;for(let b=0;b<n.length;b++){const p=n[b];if(c){c=!1;continue}if(p==="\\"){c=!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"}}},sr=(n,t)=>{try{const r=t?.tabWidth||2,a=t?.keywordCase||"upper",i=" ".repeat(r);let u=n.trim();const c=[];u=u.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,v=>(c.push({type:"string",value:v}),`__PROTECTED_${c.length-1}__`)),u=u.replace(/--[^\n]*/g,v=>(c.push({type:"comment",value:v}),`__PROTECTED_${c.length-1}__`)),u=u.replace(/\/\*[\s\S]*?\*\//g,v=>(c.push({type:"comment",value:v}),`__PROTECTED_${c.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(v=>{const H=new RegExp(`\\b${v}\\b`,"gi");u=u.replace(H,v.toUpperCase())}):a==="lower"&&Nt.forEach(v=>{const H=new RegExp(`\\b${v}\\b`,"gi");u=u.replace(H,v.toLowerCase())});const b=["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"];b.sort((v,H)=>H.length-v.length);const p=[];b.forEach((v,H)=>{if(v.includes(" ")){const K=a==="upper"?v:v.toLowerCase(),$=new RegExp(`\\b${v}\\b`,"gi"),ae=`__KEYWORD_${H}__`;u=u.replace($,ae),p.push({placeholder:ae,original:K})}}),b.forEach(v=>{if(!v.includes(" ")){const H=a==="upper"?v:v.toLowerCase(),K=new RegExp(`\\b${v}\\b`,"gi");u=u.replace(K,`
26
- ${H}`)}}),p.forEach(({placeholder:v,original:H})=>{u=u.replace(new RegExp(v,"g"),`
27
- ${H}`)}),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,H,K)=>`${H}
28
- ${i}${a==="upper"?"ON":"on"} ${K.trim()}`),u=u.replace(/\b(WHERE)\s+([^\n]+?)(?=\s+AND\b|\s+OR\b|\n|$)/gis,(v,H,K)=>{const $=a==="upper"?"WHERE":"where",ae=K.trim();return`${$}
29
- ${i}${ae}`}),u=u.replace(/\b(HAVING)\s+(?!\n)(.+?)(?=\n|$)/gis,(v,H,K)=>`${a==="upper"?"HAVING":"having"}
30
- ${i}${K.trim()}`),u=u.replace(/\b(ORDER BY)\s+(?!\n)([^,\n]+?)(?=\n|$|;)/gis,(v,H,K)=>{const $=a==="upper"?"ORDER BY":"order by";return K.includes(",")?v:`${$}
31
- ${i}${K.trim()}`}),u=u.replace(/\b(INSERT\s+INTO)\s+(\w+)\s*\(([^)]+)\)\s*(VALUES)/gis,(v,H,K,$,ae)=>{const ee=a==="upper"?"INSERT INTO":"insert into",U=a==="upper"?"VALUES":"values",A=$.split(",").map(N=>N.trim());let te=`${ee} ${K}
32
- (`;return te+=A.join(`,
33
- `),te+=`)
34
- ${U}`,te}),u=u.replace(/\b(VALUES)\s*\n?\s*\(([^)]+)\)/gis,(v,H,K)=>{const $=a==="upper"?"VALUES":"values",ae=K.split(/,\s*(?=(?:[^']*'[^']*')*[^']*$)/).map(U=>U.trim());let ee=`${$}
35
- (`;return ee+=ae.join(`,
36
- `),ee+=")",ee}),u=u.replace(/\b(UPDATE\s+)(\w+)\s+(SET)\s+([^\n]+?)(?=\n(?:WHERE)|$|;)/gis,(v,H,K,$,ae)=>{const ee=a==="upper"?"UPDATE":"update",U=a==="upper"?"SET":"set",A=ae.split(/,\s*(?![^()]*\))/).map(N=>N.trim());let te=`${ee} ${K}
37
- ${U}`;return A.forEach((N,T)=>{te+=`
38
- ${i}${N}`,T<A.length-1&&(te+=",")}),te}),["AND","OR"].forEach(v=>{const H=a==="upper"?v:v.toLowerCase(),K=new RegExp(`\\b${v}\\b`,"gi");u=u.replace(K,`
39
- ${i}${H}`)});const _=u.split(`
40
- `),D=[],V=v=>{const H=[];let K="",$=0;for(let ae=0;ae<v.length;ae++){const ee=v[ae];ee==="("?($++,K+=ee):ee===")"?($--,K+=ee):ee===","&&$===0?(H.push(K.trim()),K=""):K+=ee}return K.trim()&&H.push(K.trim()),H},j=v=>{if(!/\bCASE\b/i.test(v))return[v];const H=[],K=[];let $=v.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,te=>{const N=K.length;return K.push(te),`__STRING_${N}__`});const ae=/\b(CASE)\b([\s\S]*?)\b(END)\b/gi;let ee=0,U;for(;(U=ae.exec($))!==null;){if(U.index>ee){const T=$.substring(ee,U.index).trim();T&&H.push(T)}H.push("CASE");const N=U[2].split(/\b(WHEN|ELSE)\b/gi);for(let T=0;T<N.length;T++){const q=N[T].trim();if(q){if(/^WHEN$/i.test(q)){const W=N[++T]?.trim()||"",M=W.match(/^(.*?)\s+THEN\s+(.*)$/i);M?H.push(i+"WHEN "+M[1].trim()+" THEN "+M[2].trim()):H.push(i+"WHEN "+W)}else if(/^ELSE$/i.test(q)){const W=N[++T]?.trim()||"";H.push(i+"ELSE "+W)}}}H.push("END"),ee=ae.lastIndex}if(ee<$.length){const te=$.substring(ee).trim();te&&(H[H.length-1]+=" "+te)}return H.map(te=>te.replace(/__STRING_(\d+)__/g,(N,T)=>K[parseInt(T)]))};for(let v=0;v<_.length;v++){const H=_[v].trim();if(/^SELECT\b/i.test(H)){const K=H.match(/^(SELECT\s+(?:DISTINCT\s+)?)(.*)/i);if(K){const $=K[1].trim(),ae=K[2],ee=V(ae);D.push($),ee.forEach((U,A)=>{const te=A===ee.length-1;if(/\bCASE\b/i.test(U)){const N=j(U);N.forEach((T,q)=>{q===0?D.push(i+T):q===N.length-1?D.push(i+T+(te?"":",")):D.push(T)})}else te?D.push(i+U):D.push(i+U+",")})}else D.push(H)}else if(/^GROUP BY\b/i.test(H)){const K=H.match(/^(GROUP BY\s+)(.*)/i);if(K){const $=K[1].trim(),ae=K[2],ee=V(ae);ee.length>1?(D.push($),ee.forEach((U,A)=>{A===ee.length-1?D.push(i+U):D.push(i+U+",")})):D.push(H)}else D.push(H)}else if(/^ORDER BY\b/i.test(H)){const K=H.match(/^(ORDER BY\s+)(.*)/i);if(K){const $=K[1].trim(),ae=K[2],ee=V(ae);ee.length>1?(D.push($),ee.forEach((U,A)=>{A===ee.length-1?D.push(i+U):D.push(i+U+",")})):D.push(H)}else D.push(H)}else D.push(H)}u=D.join(`
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"?>
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(`
41
50
  `),u=u.split(`
42
- `).filter(v=>v.trim().length>0).join(`
43
- `),c.forEach((v,H)=>{u=u.replace(`__PROTECTED_${H}__`,v.value)});const Y=u.split(`
44
- `),ie=[];for(let v=0;v<Y.length;v++){const H=Y[v],K=H.trim();if(H.startsWith(" ")||H.startsWith(" ")){ie.push(H);continue}if(b.some(U=>new RegExp(`^${U}\\b`,"i").test(K))){ie.push(K);continue}let ee="";for(let U=v-1;U>=0;U--){const A=Y[U].trim(),te=b.find(N=>new RegExp(`^${N}\\b`,"i").test(A));if(te){ee=te;break}}/^(AND|OR)\b/i.test(K)?ie.push(K):ee.match(/^(WHERE|HAVING)$/i)||ee.match(/JOIN$/i)||ee.match(/^ORDER BY$/i)?ie.push(i+K):ie.push(K)}return ie.join(`
45
- `)}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=sr(n,{keywordCase:"upper"}).split(`
46
- `);let i=null,u=[],c=[];for(const b of a){const p=b.trim();if(!p){i&&u.push(b);continue}if(p.startsWith("--")||p.startsWith("/*")){i?u.push(b):c.push(b);continue}let _=!1,D="UNKNOWN";for(const V of ys)if(new RegExp(`^${V}\\b`,"i").test(p)){_=!0,D=V.replace(/ /g," ");break}_?(i&&u.length>0&&(i.content=u.join(`
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(`
47
56
  `),i.raw=u.join(`
48
- `),t.push(i)),u=[...c,b],c=[],i={type:D,content:"",raw:"",collapsible:!0,path:`clause-${t.length}`}):i?u.push(b):(u=[...c,b],c=[],i={type:"UNKNOWN",content:"",raw:"",collapsible:!1,path:`clause-${t.length}`})}return i&&u.length>0&&(i.content=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(`
49
58
  `),i.raw=u.join(`
50
- `),t.push(i)),c.length>0&&t.push({type:"UNKNOWN",content:c.join(`
51
- `),raw:c.join(`
52
- `),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 c=!1;const b=r.match(/^(\s+)/);if(b){t.push({type:"whitespace",value:b[1]}),r=r.slice(b[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 j of i)if(r.startsWith(j)){t.push({type:"operator",value:j}),r=r.slice(j.length),c=!0;break}if(c)continue;for(const j of u)if(r.startsWith(j)){t.push({type:"punctuation",value:j}),r=r.slice(j.length),c=!0;break}if(c)continue;const V=r.match(/^([a-zA-Z_][a-zA-Z0-9_]*)/);if(V){const j=V[1],Y=j.toUpperCase();Nt.includes(Y)?t.push({type:"keyword",value:j}):a.includes(Y)?t.push({type:"function",value:j}):t.push({type:"identifier",value:j}),r=r.slice(j.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"],_s=["disabled"],Ts=["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"},Us={class:"sql-format__clause-code"},qs=["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(N=>({"64cbdf35":_.value.colors.background,"1c3fa074":_.value.colors.text,"26a7cc9a":_.value.colors.border,ea614c58:_.value.colors.surfaceBackground,de6a0376:_.value.colors.buttonBorder,"5ee22ac7":_.value.colors.buttonBackground,"6cdafcf4":_.value.colors.buttonText,bcb15a96:_.value.colors.buttonBackgroundHover,"71cfc709":_.value.colors.buttonPrimary,"0109e09a":_.value.colors.buttonPrimaryHover,"09fa0cac":_.value.colors.successBackground,"358a4b5c":_.value.colors.success,f34a88a2:_.value.colors.errorBackground,"6ae6dfa1":_.value.colors.error,19523360:_.value.colors.textSecondary}));const a=n,i=r,u=o.ref(""),c=o.ref(a.dialect),b=o.ref([]),p=o.ref(new Set),m=o.computed(()=>u.value===""),_=o.computed(()=>Es(a.theme)),D=N=>{if(!N||!N.trim()){u.value="",b.value=[],p.value.clear();return}try{const T=bs(N);if(!T.valid){u.value=T.error||"Invalid SQL",b.value=[];return}const q=xs(N);b.value=q.clauses,p.value=new Set(q.clauses.map(W=>W.path||"")),u.value=""}catch(T){u.value=T instanceof Error?T.message:"Unknown parse error",b.value=[]}},V=N=>{const T=Ns(N),q=_.value.colors;return T.map(W=>{let M=q.text;switch(W.type){case"keyword":M=q.sqlKeyword;break;case"function":M=q.sqlFunction;break;case"string":M=q.sqlString;break;case"number":M=q.sqlNumber;break;case"comment":M=q.sqlComment;break;case"operator":M=q.sqlOperator;break;case"identifier":M=q.sqlIdentifier;break;case"punctuation":M=q.sqlPunctuation;break;case"whitespace":return W.value}const de=W.value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");return`<span style="color: ${M}">${de}</span>`}).join("")},j=N=>{p.value.has(N)?p.value.delete(N):p.value.add(N),p.value=new Set(p.value)},Y=N=>p.value.has(N),ie=N=>{const T=N.content.split(`
53
- `);if(T.length===0)return"";for(const q of T)if(q.trim())return q;return""},v=N=>{const T=ie(N),q=Y(N.path||""),W=!!H(N);return N.collapsible&&!q&&W?`${V(T)}<span style="color: ${_.value.colors.textSecondary}; opacity: 0.6; font-style: italic; margin-left: 4px;"> ...</span>`:V(T)},H=N=>{const T=N.content.split(`
54
- `);if(T.length<=1)return"";let q=0;for(let M=0;M<T.length;M++)if(T[M].trim()){q=M;break}return T.slice(q+1).join(`
55
- `)},K=()=>{p.value=new Set(b.value.map(N=>N.path||"")),i("expand-all")},$=()=>{p.value=new Set,i("collapse-all")},ae=async()=>{if(m.value)try{await navigator.clipboard.writeText(a.modelValue),i("copy-success",a.modelValue)}catch(N){const T=N instanceof Error?N:new Error("Failed to copy");i("copy-error",T)}},ee=()=>{if(m.value)try{const N=sr(a.modelValue,{dialect:c.value,tabWidth:a.tabWidth});i("update:modelValue",N),i("format",N)}catch(N){console.error("Format error:",N)}},U=()=>{if(m.value)try{const N=As(a.modelValue);i("update:modelValue",N),i("compress",N)}catch(N){console.error("Compress error:",N)}},A=()=>null,te=()=>u.value;return o.watch(()=>a.modelValue,N=>{D(N)},{immediate:!0}),o.watch(()=>a.dialect,N=>{c.value=N}),t({copySql:ae,formatSource:ee,compressSource:U,expandAll:K,collapseAll:$,toggleExpand:j,isValidSql:()=>m.value,getParsedSql:A,getParseError:te}),(N,T)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["sql-format",`sql-format--${_.value.name}`])},[N.showToolbar?(o.openBlock(),o.createElementBlock("div",Cs,[o.createElementVNode("div",Ds,[o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--primary",onClick:ae,disabled:!m.value,title:"Copy SQL"}," 📋 Copy ",8,vs),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:ee,disabled:!m.value,title:"Format SQL"}," ✨ Format ",8,ws),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:U,disabled:!m.value,title:"Compress SQL"}," 📦 Compress ",8,_s),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:K,disabled:!m.value||b.value.length===0,title:"Expand All Clauses"}," ⬇️ Expand All ",8,Ts),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:$,disabled:!m.value||b.value.length===0,title:"Collapse All Clauses"}," ⬆️ Collapse All ",8,Bs),o.withDirectives(o.createElementVNode("select",{"onUpdate:modelValue":T[0]||(T[0]=q=>c.value=q),class:"sql-format__dialect-select",title:"SQL Dialect"},T[1]||(T[1]=[o.createStaticVNode('<option value="sql" data-v-64a81173>SQL</option><option value="mysql" data-v-64a81173>MySQL</option><option value="postgresql" data-v-64a81173>PostgreSQL</option><option value="sqlite" data-v-64a81173>SQLite</option><option value="plsql" data-v-64a81173>PL/SQL</option><option value="tsql" data-v-64a81173>T-SQL</option>',6)]),512),[[o.vModelSelect,c.value]])]),o.createElementVNode("div",Ss,[m.value?(o.openBlock(),o.createElementBlock("span",Os," ✅ Valid SQL ")):(o.openBlock(),o.createElementBlock("span",ks," ❌ Invalid SQL "))])])):o.createCommentVNode("",!0),o.createElementVNode("div",Rs,[m.value?(o.openBlock(),o.createElementBlock("div",Fs,[b.value.length>0?(o.openBlock(),o.createElementBlock("div",Ps,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(b.value,q=>(o.openBlock(),o.createElementBlock("div",{key:q.path,class:"sql-format__clause"},[o.createElementVNode("div",{class:"sql-format__clause-header",onClick:W=>q.collapsible&&j(q.path||"")},[q.collapsible?(o.openBlock(),o.createElementBlock("button",{key:0,class:"sql-format__toggle-btn",onClick:o.withModifiers(W=>j(q.path||""),["stop"]),title:Y(q.path||"")?"Collapse":"Expand"},[o.createElementVNode("span",{class:o.normalizeClass(["sql-format__toggle-icon",{"sql-format__toggle-icon--expanded":Y(q.path||"")}])},"▶",2)],8,Vs)):(o.openBlock(),o.createElementBlock("span",$s)),o.createElementVNode("div",Ms,[o.createElementVNode("pre",Us,[o.createElementVNode("code",{innerHTML:v(q)},null,8,qs)])])],8,Ls),Y(q.path||"")&&H(q)?(o.openBlock(),o.createElementBlock("div",Hs,[o.createElementVNode("pre",js,[o.createElementVNode("code",{innerHTML:V(H(q))},null,8,Ks)])])):o.createCommentVNode("",!0)]))),128))])):(o.openBlock(),o.createElementBlock("pre",Gs,[o.createElementVNode("code",{innerHTML:V(a.modelValue)},null,8,Xs)]))])):(o.openBlock(),o.createElementBlock("div",Is,[T[2]||(T[2]=o.createElementVNode("h4",null,"SQL Parse Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(u.value),1)]))])],2))}}),[["__scopeId","data-v-64a81173"]]),Ws=[It],Ys={install:n=>{Ws.forEach(t=>{const r=t.name||t.__name||"UnknownComponent";n.component(r,t)})}};ze.JsonFormat=It,ze.SqlFormat=zs,ze.XmlFormat=gs,ze.default=Ys,Object.defineProperties(ze,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
59
+ `),t.push(i)),f.length>0&&t.push({type:"UNKNOWN",content:f.join(`
60
+ `),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"}})});