claude-intern 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +400 -268
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,45 +1,47 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
-
var
|
|
4
|
-
`).replace(/^/gm," ".repeat(2))}let _=[`Usage: ${Z.commandUsage($)}`,""],
|
|
5
|
-
`)}padWidth($,Z){return Math.max(Z.longestOptionTermLength($,Z),Z.longestGlobalOptionTermLength($,Z),Z.longestSubcommandTermLength($,Z),Z.longestArgumentTermLength($,Z))}wrap($,Z,Y,
|
|
3
|
+
var nQ=Object.create;var{getPrototypeOf:oQ,defineProperty:k8,getOwnPropertyNames:_7,getOwnPropertyDescriptor:rQ}=Object,H7=Object.prototype.hasOwnProperty;var b6=($,Z,Y)=>{Y=$!=null?nQ(oQ($)):{};let X=Z||!$||!$.__esModule?k8(Y,"default",{value:$,enumerable:!0}):Y;for(let z of _7($))if(!H7.call(X,z))k8(X,z,{get:()=>$[z],enumerable:!0});return X},V7=new WeakMap,B7=($)=>{var Z=V7.get($),Y;if(Z)return Z;if(Z=k8({},"__esModule",{value:!0}),$&&typeof $==="object"||typeof $==="function")_7($).map((X)=>!H7.call(Z,X)&&k8(Z,X,{get:()=>$[X],enumerable:!(Y=rQ($,X))||Y.enumerable}));return V7.set($,Z),Z},x=($,Z)=>()=>(Z||$((Z={exports:{}}).exports,Z),Z.exports);var i9=($,Z)=>{for(var Y in Z)k8($,Y,{get:Z[Y],enumerable:!0,configurable:!0,set:(X)=>Z[Y]=()=>X})};var a0=($,Z)=>()=>($&&(Z=$($=0)),Z);var T0=import.meta.require;var h8=x((aQ)=>{class s9 extends Error{constructor($,Z,Y){super(Y);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=Z,this.exitCode=$,this.nestedError=void 0}}class q7 extends s9{constructor($){super(1,"commander.invalidArgument",$);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}aQ.CommanderError=s9;aQ.InvalidArgumentError=q7});var x6=x((Y3)=>{var{InvalidArgumentError:$3}=h8();class j7{constructor($,Z){switch(this.description=Z||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,$[0]){case"<":this.required=!0,this._name=$.slice(1,-1);break;case"[":this.required=!1,this._name=$.slice(1,-1);break;default:this.required=!0,this._name=$;break}if(this._name.length>3&&this._name.slice(-3)==="...")this.variadic=!0,this._name=this._name.slice(0,-3)}name(){return this._name}_concatValue($,Z){if(Z===this.defaultValue||!Array.isArray(Z))return[$];return Z.concat($)}default($,Z){return this.defaultValue=$,this.defaultValueDescription=Z,this}argParser($){return this.parseArg=$,this}choices($){return this.argChoices=$.slice(),this.parseArg=(Z,Y)=>{if(!this.argChoices.includes(Z))throw new $3(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue(Z,Y);return Z},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function Z3($){let Z=$.name()+($.variadic===!0?"...":"");return $.required?"<"+Z+">":"["+Z+"]"}Y3.Argument=j7;Y3.humanReadableArgName=Z3});var n9=x((G3)=>{var{humanReadableArgName:Q3}=x6();class K7{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands($){let Z=$.commands.filter((Y)=>!Y._hidden);if($._hasImplicitHelpCommand()){let[,Y,X]=$._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),z=$.createCommand(Y).helpOption(!1);if(z.description($._helpCommandDescription),X)z.arguments(X);Z.push(z)}if(this.sortSubcommands)Z.sort((Y,X)=>{return Y.name().localeCompare(X.name())});return Z}compareOptions($,Z){let Y=(X)=>{return X.short?X.short.replace(/^-/,""):X.long.replace(/^--/,"")};return Y($).localeCompare(Y(Z))}visibleOptions($){let Z=$.options.filter((z)=>!z.hidden),Y=$._hasHelpOption&&$._helpShortFlag&&!$._findOption($._helpShortFlag),X=$._hasHelpOption&&!$._findOption($._helpLongFlag);if(Y||X){let z;if(!Y)z=$.createOption($._helpLongFlag,$._helpDescription);else if(!X)z=$.createOption($._helpShortFlag,$._helpDescription);else z=$.createOption($._helpFlags,$._helpDescription);Z.push(z)}if(this.sortOptions)Z.sort(this.compareOptions);return Z}visibleGlobalOptions($){if(!this.showGlobalOptions)return[];let Z=[];for(let Y=$.parent;Y;Y=Y.parent){let X=Y.options.filter((z)=>!z.hidden);Z.push(...X)}if(this.sortOptions)Z.sort(this.compareOptions);return Z}visibleArguments($){if($._argsDescription)$.registeredArguments.forEach((Z)=>{Z.description=Z.description||$._argsDescription[Z.name()]||""});if($.registeredArguments.find((Z)=>Z.description))return $.registeredArguments;return[]}subcommandTerm($){let Z=$.registeredArguments.map((Y)=>Q3(Y)).join(" ");return $._name+($._aliases[0]?"|"+$._aliases[0]:"")+($.options.length?" [options]":"")+(Z?" "+Z:"")}optionTerm($){return $.flags}argumentTerm($){return $.name()}longestSubcommandTermLength($,Z){return Z.visibleCommands($).reduce((Y,X)=>{return Math.max(Y,Z.subcommandTerm(X).length)},0)}longestOptionTermLength($,Z){return Z.visibleOptions($).reduce((Y,X)=>{return Math.max(Y,Z.optionTerm(X).length)},0)}longestGlobalOptionTermLength($,Z){return Z.visibleGlobalOptions($).reduce((Y,X)=>{return Math.max(Y,Z.optionTerm(X).length)},0)}longestArgumentTermLength($,Z){return Z.visibleArguments($).reduce((Y,X)=>{return Math.max(Y,Z.argumentTerm(X).length)},0)}commandUsage($){let Z=$._name;if($._aliases[0])Z=Z+"|"+$._aliases[0];let Y="";for(let X=$.parent;X;X=X.parent)Y=X.name()+" "+Y;return Y+Z+" "+$.usage()}commandDescription($){return $.description()}subcommandDescription($){return $.summary()||$.description()}optionDescription($){let Z=[];if($.argChoices)Z.push(`choices: ${$.argChoices.map((Y)=>JSON.stringify(Y)).join(", ")}`);if($.defaultValue!==void 0){if($.required||$.optional||$.isBoolean()&&typeof $.defaultValue==="boolean")Z.push(`default: ${$.defaultValueDescription||JSON.stringify($.defaultValue)}`)}if($.presetArg!==void 0&&$.optional)Z.push(`preset: ${JSON.stringify($.presetArg)}`);if($.envVar!==void 0)Z.push(`env: ${$.envVar}`);if(Z.length>0)return`${$.description} (${Z.join(", ")})`;return $.description}argumentDescription($){let Z=[];if($.argChoices)Z.push(`choices: ${$.argChoices.map((Y)=>JSON.stringify(Y)).join(", ")}`);if($.defaultValue!==void 0)Z.push(`default: ${$.defaultValueDescription||JSON.stringify($.defaultValue)}`);if(Z.length>0){let Y=`(${Z.join(", ")})`;if($.description)return`${$.description} ${Y}`;return Y}return $.description}formatHelp($,Z){let Y=Z.padWidth($,Z),X=Z.helpWidth||80,z=2,Q=2;function G(H,O){if(O){let D=`${H.padEnd(Y+2)}${O}`;return Z.wrap(D,X-2,Y+2)}return H}function V(H){return H.join(`
|
|
4
|
+
`).replace(/^/gm," ".repeat(2))}let _=[`Usage: ${Z.commandUsage($)}`,""],B=Z.commandDescription($);if(B.length>0)_=_.concat([Z.wrap(B,X,0),""]);let q=Z.visibleArguments($).map((H)=>{return G(Z.argumentTerm(H),Z.argumentDescription(H))});if(q.length>0)_=_.concat(["Arguments:",V(q),""]);let F=Z.visibleOptions($).map((H)=>{return G(Z.optionTerm(H),Z.optionDescription(H))});if(F.length>0)_=_.concat(["Options:",V(F),""]);if(this.showGlobalOptions){let H=Z.visibleGlobalOptions($).map((O)=>{return G(Z.optionTerm(O),Z.optionDescription(O))});if(H.length>0)_=_.concat(["Global Options:",V(H),""])}let M=Z.visibleCommands($).map((H)=>{return G(Z.subcommandTerm(H),Z.subcommandDescription(H))});if(M.length>0)_=_.concat(["Commands:",V(M),""]);return _.join(`
|
|
5
|
+
`)}padWidth($,Z){return Math.max(Z.longestOptionTermLength($,Z),Z.longestGlobalOptionTermLength($,Z),Z.longestSubcommandTermLength($,Z),Z.longestArgumentTermLength($,Z))}wrap($,Z,Y,X=40){let Q=new RegExp(`[\\n][${" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF"}]+`);if($.match(Q))return $;let G=Z-Y;if(G<X)return $;let V=$.slice(0,Y),_=$.slice(Y).replace(`\r
|
|
6
6
|
`,`
|
|
7
|
-
`),
|
|
8
|
-
|.{1,${G-1}}([${F}]|$)|[^${F}]+?([${F}]|$)`,"g"),
|
|
9
|
-
`)return"";return(
|
|
10
|
-
`)}}
|
|
11
|
-
(Did you mean one of ${
|
|
12
|
-
(Did you mean ${
|
|
13
|
-
- specify the name in Command constructor or using .name()`);if(Z=Z||{},Z.isDefault)this._defaultCommandName=$._name;if(Z.noHelp||Z.hidden)$._hidden=!0;return this.commands.push($),$.parent=this,this}createArgument($,Z){return new
|
|
14
|
-
Expecting one of '${Y.join("', '")}'`);if(this._lifeCycleHooks[$])this._lifeCycleHooks[$].push(Z);else this._lifeCycleHooks[$]=[Z];return this}exitOverride($){if($)this._exitCallback=$;else this._exitCallback=(Z)=>{if(Z.code!=="commander.executeSubCommandAsync")throw Z};return this}_exit($,Z,Y){if(this._exitCallback)this._exitCallback(new
|
|
7
|
+
`),B=" ".repeat(Y),F=`\\s${"\u200B"}`,M=new RegExp(`
|
|
8
|
+
|.{1,${G-1}}([${F}]|$)|[^${F}]+?([${F}]|$)`,"g"),H=_.match(M)||[];return V+H.map((O,D)=>{if(O===`
|
|
9
|
+
`)return"";return(D>0?B:"")+O.trimEnd()}).join(`
|
|
10
|
+
`)}}G3.Help=K7});var o9=x((_3)=>{var{InvalidArgumentError:J3}=h8();class F7{constructor($,Z){this.flags=$,this.description=Z||"",this.required=$.includes("<"),this.optional=$.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test($),this.mandatory=!1;let Y=M7($);if(this.short=Y.shortFlag,this.long=Y.longFlag,this.negate=!1,this.long)this.negate=this.long.startsWith("--no-");this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default($,Z){return this.defaultValue=$,this.defaultValueDescription=Z,this}preset($){return this.presetArg=$,this}conflicts($){return this.conflictsWith=this.conflictsWith.concat($),this}implies($){let Z=$;if(typeof $==="string")Z={[$]:!0};return this.implied=Object.assign(this.implied||{},Z),this}env($){return this.envVar=$,this}argParser($){return this.parseArg=$,this}makeOptionMandatory($=!0){return this.mandatory=!!$,this}hideHelp($=!0){return this.hidden=!!$,this}_concatValue($,Z){if(Z===this.defaultValue||!Array.isArray(Z))return[$];return Z.concat($)}choices($){return this.argChoices=$.slice(),this.parseArg=(Z,Y)=>{if(!this.argChoices.includes(Z))throw new J3(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue(Z,Y);return Z},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){return V3(this.name().replace(/^no-/,""))}is($){return this.short===$||this.long===$}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class O7{constructor($){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,$.forEach((Z)=>{if(Z.negate)this.negativeOptions.set(Z.attributeName(),Z);else this.positiveOptions.set(Z.attributeName(),Z)}),this.negativeOptions.forEach((Z,Y)=>{if(this.positiveOptions.has(Y))this.dualOptions.add(Y)})}valueFromOption($,Z){let Y=Z.attributeName();if(!this.dualOptions.has(Y))return!0;let X=this.negativeOptions.get(Y).presetArg,z=X!==void 0?X:!1;return Z.negate===(z===$)}}function V3($){return $.split("-").reduce((Z,Y)=>{return Z+Y[0].toUpperCase()+Y.slice(1)})}function M7($){let Z,Y,X=$.split(/[ |,]+/);if(X.length>1&&!/^[[<]/.test(X[1]))Z=X.shift();if(Y=X.shift(),!Z&&/^-[^-]$/.test(Y))Z=Y,Y=void 0;return{shortFlag:Z,longFlag:Y}}_3.Option=F7;_3.splitOptionFlags=M7;_3.DualOptions=O7});var D7=x((F3)=>{function j3($,Z){if(Math.abs($.length-Z.length)>3)return Math.max($.length,Z.length);let Y=[];for(let X=0;X<=$.length;X++)Y[X]=[X];for(let X=0;X<=Z.length;X++)Y[0][X]=X;for(let X=1;X<=Z.length;X++)for(let z=1;z<=$.length;z++){let Q=1;if($[z-1]===Z[X-1])Q=0;else Q=1;if(Y[z][X]=Math.min(Y[z-1][X]+1,Y[z][X-1]+1,Y[z-1][X-1]+Q),z>1&&X>1&&$[z-1]===Z[X-2]&&$[z-2]===Z[X-1])Y[z][X]=Math.min(Y[z][X],Y[z-2][X-2]+1)}return Y[$.length][Z.length]}function K3($,Z){if(!Z||Z.length===0)return"";Z=Array.from(new Set(Z));let Y=$.startsWith("--");if(Y)$=$.slice(2),Z=Z.map((G)=>G.slice(2));let X=[],z=3,Q=0.4;if(Z.forEach((G)=>{if(G.length<=1)return;let V=j3($,G),_=Math.max($.length,G.length);if((_-V)/_>Q){if(V<z)z=V,X=[G];else if(V===z)X.push(G)}}),X.sort((G,V)=>G.localeCompare(V)),Y)X=X.map((G)=>`--${G}`);if(X.length>1)return`
|
|
11
|
+
(Did you mean one of ${X.join(", ")}?)`;if(X.length===1)return`
|
|
12
|
+
(Did you mean ${X[0]}?)`;return""}F3.suggestSimilar=K3});var A7=x((A3)=>{var M3=T0("events").EventEmitter,r9=T0("child_process"),P1=T0("path"),a9=T0("fs"),q0=T0("process"),{Argument:D3,humanReadableArgName:L3}=x6(),{CommanderError:t9}=h8(),{Help:I3}=n9(),{Option:L7,splitOptionFlags:S3,DualOptions:U3}=o9(),{suggestSimilar:I7}=D7();class e9 extends M3{constructor($){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=$||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:(Z)=>q0.stdout.write(Z),writeErr:(Z)=>q0.stderr.write(Z),getOutHelpWidth:()=>q0.stdout.isTTY?q0.stdout.columns:void 0,getErrHelpWidth:()=>q0.stderr.isTTY?q0.stderr.columns:void 0,outputError:(Z,Y)=>Y(Z)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings($){return this._outputConfiguration=$._outputConfiguration,this._hasHelpOption=$._hasHelpOption,this._helpFlags=$._helpFlags,this._helpDescription=$._helpDescription,this._helpShortFlag=$._helpShortFlag,this._helpLongFlag=$._helpLongFlag,this._helpCommandName=$._helpCommandName,this._helpCommandnameAndArgs=$._helpCommandnameAndArgs,this._helpCommandDescription=$._helpCommandDescription,this._helpConfiguration=$._helpConfiguration,this._exitCallback=$._exitCallback,this._storeOptionsAsProperties=$._storeOptionsAsProperties,this._combineFlagAndOptionalValue=$._combineFlagAndOptionalValue,this._allowExcessArguments=$._allowExcessArguments,this._enablePositionalOptions=$._enablePositionalOptions,this._showHelpAfterError=$._showHelpAfterError,this._showSuggestionAfterError=$._showSuggestionAfterError,this}_getCommandAndAncestors(){let $=[];for(let Z=this;Z;Z=Z.parent)$.push(Z);return $}command($,Z,Y){let X=Z,z=Y;if(typeof X==="object"&&X!==null)z=X,X=null;z=z||{};let[,Q,G]=$.match(/([^ ]+) *(.*)/),V=this.createCommand(Q);if(X)V.description(X),V._executableHandler=!0;if(z.isDefault)this._defaultCommandName=V._name;if(V._hidden=!!(z.noHelp||z.hidden),V._executableFile=z.executableFile||null,G)V.arguments(G);if(this.commands.push(V),V.parent=this,V.copyInheritedSettings(this),X)return this;return V}createCommand($){return new e9($)}createHelp(){return Object.assign(new I3,this.configureHelp())}configureHelp($){if($===void 0)return this._helpConfiguration;return this._helpConfiguration=$,this}configureOutput($){if($===void 0)return this._outputConfiguration;return Object.assign(this._outputConfiguration,$),this}showHelpAfterError($=!0){if(typeof $!=="string")$=!!$;return this._showHelpAfterError=$,this}showSuggestionAfterError($=!0){return this._showSuggestionAfterError=!!$,this}addCommand($,Z){if(!$._name)throw new Error(`Command passed to .addCommand() must have a name
|
|
13
|
+
- specify the name in Command constructor or using .name()`);if(Z=Z||{},Z.isDefault)this._defaultCommandName=$._name;if(Z.noHelp||Z.hidden)$._hidden=!0;return this.commands.push($),$.parent=this,this}createArgument($,Z){return new D3($,Z)}argument($,Z,Y,X){let z=this.createArgument($,Z);if(typeof Y==="function")z.default(X).argParser(Y);else z.default(Y);return this.addArgument(z),this}arguments($){return $.trim().split(/ +/).forEach((Z)=>{this.argument(Z)}),this}addArgument($){let Z=this.registeredArguments.slice(-1)[0];if(Z&&Z.variadic)throw new Error(`only the last argument can be variadic '${Z.name()}'`);if($.required&&$.defaultValue!==void 0&&$.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${$.name()}'`);return this.registeredArguments.push($),this}addHelpCommand($,Z){if($===!1)this._addImplicitHelpCommand=!1;else{if(this._addImplicitHelpCommand=!0,typeof $==="string")this._helpCommandName=$.split(" ")[0],this._helpCommandnameAndArgs=$;this._helpCommandDescription=Z||this._helpCommandDescription}return this}_hasImplicitHelpCommand(){if(this._addImplicitHelpCommand===void 0)return this.commands.length&&!this._actionHandler&&!this._findCommand("help");return this._addImplicitHelpCommand}hook($,Z){let Y=["preSubcommand","preAction","postAction"];if(!Y.includes($))throw new Error(`Unexpected value for event passed to hook : '${$}'.
|
|
14
|
+
Expecting one of '${Y.join("', '")}'`);if(this._lifeCycleHooks[$])this._lifeCycleHooks[$].push(Z);else this._lifeCycleHooks[$]=[Z];return this}exitOverride($){if($)this._exitCallback=$;else this._exitCallback=(Z)=>{if(Z.code!=="commander.executeSubCommandAsync")throw Z};return this}_exit($,Z,Y){if(this._exitCallback)this._exitCallback(new t9($,Z,Y));q0.exit($)}action($){let Z=(Y)=>{let X=this.registeredArguments.length,z=Y.slice(0,X);if(this._storeOptionsAsProperties)z[X]=this;else z[X]=this.opts();return z.push(this),$.apply(this,z)};return this._actionHandler=Z,this}createOption($,Z){return new L7($,Z)}_callParseArg($,Z,Y,X){try{return $.parseArg(Z,Y)}catch(z){if(z.code==="commander.invalidArgument"){let Q=`${X} ${z.message}`;this.error(Q,{exitCode:z.exitCode,code:z.code})}throw z}}addOption($){let Z=$.name(),Y=$.attributeName();if($.negate){let z=$.long.replace(/^--no-/,"--");if(!this._findOption(z))this.setOptionValueWithSource(Y,$.defaultValue===void 0?!0:$.defaultValue,"default")}else if($.defaultValue!==void 0)this.setOptionValueWithSource(Y,$.defaultValue,"default");this.options.push($);let X=(z,Q,G)=>{if(z==null&&$.presetArg!==void 0)z=$.presetArg;let V=this.getOptionValue(Y);if(z!==null&&$.parseArg)z=this._callParseArg($,z,V,Q);else if(z!==null&&$.variadic)z=$._concatValue(z,V);if(z==null)if($.negate)z=!1;else if($.isBoolean()||$.optional)z=!0;else z="";this.setOptionValueWithSource(Y,z,G)};if(this.on("option:"+Z,(z)=>{let Q=`error: option '${$.flags}' argument '${z}' is invalid.`;X(z,Q,"cli")}),$.envVar)this.on("optionEnv:"+Z,(z)=>{let Q=`error: option '${$.flags}' value '${z}' from env '${$.envVar}' is invalid.`;X(z,Q,"env")});return this}_optionEx($,Z,Y,X,z){if(typeof Z==="object"&&Z instanceof L7)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let Q=this.createOption(Z,Y);if(Q.makeOptionMandatory(!!$.mandatory),typeof X==="function")Q.default(z).argParser(X);else if(X instanceof RegExp){let G=X;X=(V,_)=>{let B=G.exec(V);return B?B[0]:_},Q.default(z).argParser(X)}else Q.default(X);return this.addOption(Q)}option($,Z,Y,X){return this._optionEx({},$,Z,Y,X)}requiredOption($,Z,Y,X){return this._optionEx({mandatory:!0},$,Z,Y,X)}combineFlagAndOptionalValue($=!0){return this._combineFlagAndOptionalValue=!!$,this}allowUnknownOption($=!0){return this._allowUnknownOption=!!$,this}allowExcessArguments($=!0){return this._allowExcessArguments=!!$,this}enablePositionalOptions($=!0){return this._enablePositionalOptions=!!$,this}passThroughOptions($=!0){if(this._passThroughOptions=!!$,!!this.parent&&$&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties($=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this._storeOptionsAsProperties=!!$,this}getOptionValue($){if(this._storeOptionsAsProperties)return this[$];return this._optionValues[$]}setOptionValue($,Z){return this.setOptionValueWithSource($,Z,void 0)}setOptionValueWithSource($,Z,Y){if(this._storeOptionsAsProperties)this[$]=Z;else this._optionValues[$]=Z;return this._optionValueSources[$]=Y,this}getOptionValueSource($){return this._optionValueSources[$]}getOptionValueSourceWithGlobals($){let Z;return this._getCommandAndAncestors().forEach((Y)=>{if(Y.getOptionValueSource($)!==void 0)Z=Y.getOptionValueSource($)}),Z}_prepareUserArgs($,Z){if($!==void 0&&!Array.isArray($))throw new Error("first parameter to parse must be array or undefined");if(Z=Z||{},$===void 0){if($=q0.argv,q0.versions&&q0.versions.electron)Z.from="electron"}this.rawArgs=$.slice();let Y;switch(Z.from){case void 0:case"node":this._scriptPath=$[1],Y=$.slice(2);break;case"electron":if(q0.defaultApp)this._scriptPath=$[1],Y=$.slice(2);else Y=$.slice(1);break;case"user":Y=$.slice(0);break;default:throw new Error(`unexpected parse option { from: '${Z.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);return this._name=this._name||"program",Y}parse($,Z){let Y=this._prepareUserArgs($,Z);return this._parseCommand([],Y),this}async parseAsync($,Z){let Y=this._prepareUserArgs($,Z);return await this._parseCommand([],Y),this}_executeSubCommand($,Z){Z=Z.slice();let Y=!1,X=[".js",".ts",".tsx",".mjs",".cjs"];function z(B,q){let F=P1.resolve(B,q);if(a9.existsSync(F))return F;if(X.includes(P1.extname(q)))return;let M=X.find((H)=>a9.existsSync(`${F}${H}`));if(M)return`${F}${M}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let Q=$._executableFile||`${this._name}-${$._name}`,G=this._executableDir||"";if(this._scriptPath){let B;try{B=a9.realpathSync(this._scriptPath)}catch(q){B=this._scriptPath}G=P1.resolve(P1.dirname(B),G)}if(G){let B=z(G,Q);if(!B&&!$._executableFile&&this._scriptPath){let q=P1.basename(this._scriptPath,P1.extname(this._scriptPath));if(q!==this._name)B=z(G,`${q}-${$._name}`)}Q=B||Q}Y=X.includes(P1.extname(Q));let V;if(q0.platform!=="win32")if(Y)Z.unshift(Q),Z=U7(q0.execArgv).concat(Z),V=r9.spawn(q0.argv[0],Z,{stdio:"inherit"});else V=r9.spawn(Q,Z,{stdio:"inherit"});else Z.unshift(Q),Z=U7(q0.execArgv).concat(Z),V=r9.spawn(q0.execPath,Z,{stdio:"inherit"});if(!V.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((q)=>{q0.on(q,()=>{if(V.killed===!1&&V.exitCode===null)V.kill(q)})});let _=this._exitCallback;if(!_)V.on("close",q0.exit.bind(q0));else V.on("close",()=>{_(new t9(q0.exitCode||0,"commander.executeSubCommandAsync","(close)"))});V.on("error",(B)=>{if(B.code==="ENOENT"){let q=G?`searched for local subcommand relative to directory '${G}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",F=`'${Q}' does not exist
|
|
15
15
|
- if '${$._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
16
16
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
17
|
-
- ${q}`;throw new Error(F)}else if(
|
|
17
|
+
- ${q}`;throw new Error(F)}else if(B.code==="EACCES")throw new Error(`'${Q}' not executable`);if(!_)q0.exit(1);else{let q=new t9(1,"commander.executeSubCommandAsync","(error)");q.nestedError=B,_(q)}}),this.runningCommand=V}_dispatchSubcommand($,Z,Y){let X=this._findCommand($);if(!X)this.help({error:!0});let z;return z=this._chainOrCallSubCommandHook(z,X,"preSubcommand"),z=this._chainOrCall(z,()=>{if(X._executableHandler)this._executeSubCommand(X,Z.concat(Y));else return X._parseCommand(Z,Y)}),z}_dispatchHelpCommand($){if(!$)this.help();let Z=this._findCommand($);if(Z&&!Z._executableHandler)Z.help();return this._dispatchSubcommand($,[],[this._helpLongFlag||this._helpShortFlag])}_checkNumberOfArguments(){if(this.registeredArguments.forEach(($,Z)=>{if($.required&&this.args[Z]==null)this.missingArgument($.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)return;if(this.args.length>this.registeredArguments.length)this._excessArguments(this.args)}_processArguments(){let $=(Y,X,z)=>{let Q=X;if(X!==null&&Y.parseArg){let G=`error: command-argument value '${X}' is invalid for argument '${Y.name()}'.`;Q=this._callParseArg(Y,X,z,G)}return Q};this._checkNumberOfArguments();let Z=[];this.registeredArguments.forEach((Y,X)=>{let z=Y.defaultValue;if(Y.variadic){if(X<this.args.length){if(z=this.args.slice(X),Y.parseArg)z=z.reduce((Q,G)=>{return $(Y,G,Q)},Y.defaultValue)}else if(z===void 0)z=[]}else if(X<this.args.length){if(z=this.args[X],Y.parseArg)z=$(Y,z,Y.defaultValue)}Z[X]=z}),this.processedArgs=Z}_chainOrCall($,Z){if($&&$.then&&typeof $.then==="function")return $.then(()=>Z());return Z()}_chainOrCallHooks($,Z){let Y=$,X=[];if(this._getCommandAndAncestors().reverse().filter((z)=>z._lifeCycleHooks[Z]!==void 0).forEach((z)=>{z._lifeCycleHooks[Z].forEach((Q)=>{X.push({hookedCommand:z,callback:Q})})}),Z==="postAction")X.reverse();return X.forEach((z)=>{Y=this._chainOrCall(Y,()=>{return z.callback(z.hookedCommand,this)})}),Y}_chainOrCallSubCommandHook($,Z,Y){let X=$;if(this._lifeCycleHooks[Y]!==void 0)this._lifeCycleHooks[Y].forEach((z)=>{X=this._chainOrCall(X,()=>{return z(this,Z)})});return X}_parseCommand($,Z){let Y=this.parseOptions(Z);if(this._parseOptionsEnv(),this._parseOptionsImplied(),$=$.concat(Y.operands),Z=Y.unknown,this.args=$.concat(Z),$&&this._findCommand($[0]))return this._dispatchSubcommand($[0],$.slice(1),Z);if(this._hasImplicitHelpCommand()&&$[0]===this._helpCommandName)return this._dispatchHelpCommand($[1]);if(this._defaultCommandName)return S7(this,Z),this._dispatchSubcommand(this._defaultCommandName,$,Z);if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName)this.help({error:!0});S7(this,Y.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let X=()=>{if(Y.unknown.length>0)this.unknownOption(Y.unknown[0])},z=`command:${this.name()}`;if(this._actionHandler){X(),this._processArguments();let Q;if(Q=this._chainOrCallHooks(Q,"preAction"),Q=this._chainOrCall(Q,()=>this._actionHandler(this.processedArgs)),this.parent)Q=this._chainOrCall(Q,()=>{this.parent.emit(z,$,Z)});return Q=this._chainOrCallHooks(Q,"postAction"),Q}if(this.parent&&this.parent.listenerCount(z))X(),this._processArguments(),this.parent.emit(z,$,Z);else if($.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",$,Z);if(this.listenerCount("command:*"))this.emit("command:*",$,Z);else if(this.commands.length)this.unknownCommand();else X(),this._processArguments()}else if(this.commands.length)X(),this.help({error:!0});else X(),this._processArguments()}_findCommand($){if(!$)return;return this.commands.find((Z)=>Z._name===$||Z._aliases.includes($))}_findOption($){return this.options.find((Z)=>Z.is($))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(($)=>{$.options.forEach((Z)=>{if(Z.mandatory&&$.getOptionValue(Z.attributeName())===void 0)$.missingMandatoryOptionValue(Z)})})}_checkForConflictingLocalOptions(){let $=this.options.filter((Y)=>{let X=Y.attributeName();if(this.getOptionValue(X)===void 0)return!1;return this.getOptionValueSource(X)!=="default"});$.filter((Y)=>Y.conflictsWith.length>0).forEach((Y)=>{let X=$.find((z)=>Y.conflictsWith.includes(z.attributeName()));if(X)this._conflictingOption(Y,X)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(($)=>{$._checkForConflictingLocalOptions()})}parseOptions($){let Z=[],Y=[],X=Z,z=$.slice();function Q(V){return V.length>1&&V[0]==="-"}let G=null;while(z.length){let V=z.shift();if(V==="--"){if(X===Y)X.push(V);X.push(...z);break}if(G&&!Q(V)){this.emit(`option:${G.name()}`,V);continue}if(G=null,Q(V)){let _=this._findOption(V);if(_){if(_.required){let B=z.shift();if(B===void 0)this.optionMissingArgument(_);this.emit(`option:${_.name()}`,B)}else if(_.optional){let B=null;if(z.length>0&&!Q(z[0]))B=z.shift();this.emit(`option:${_.name()}`,B)}else this.emit(`option:${_.name()}`);G=_.variadic?_:null;continue}}if(V.length>2&&V[0]==="-"&&V[1]!=="-"){let _=this._findOption(`-${V[1]}`);if(_){if(_.required||_.optional&&this._combineFlagAndOptionalValue)this.emit(`option:${_.name()}`,V.slice(2));else this.emit(`option:${_.name()}`),z.unshift(`-${V.slice(2)}`);continue}}if(/^--[^=]+=/.test(V)){let _=V.indexOf("="),B=this._findOption(V.slice(0,_));if(B&&(B.required||B.optional)){this.emit(`option:${B.name()}`,V.slice(_+1));continue}}if(Q(V))X=Y;if((this._enablePositionalOptions||this._passThroughOptions)&&Z.length===0&&Y.length===0){if(this._findCommand(V)){if(Z.push(V),z.length>0)Y.push(...z);break}else if(V===this._helpCommandName&&this._hasImplicitHelpCommand()){if(Z.push(V),z.length>0)Z.push(...z);break}else if(this._defaultCommandName){if(Y.push(V),z.length>0)Y.push(...z);break}}if(this._passThroughOptions){if(X.push(V),z.length>0)X.push(...z);break}X.push(V)}return{operands:Z,unknown:Y}}opts(){if(this._storeOptionsAsProperties){let $={},Z=this.options.length;for(let Y=0;Y<Z;Y++){let X=this.options[Y].attributeName();$[X]=X===this._versionOptionName?this._version:this[X]}return $}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(($,Z)=>Object.assign($,Z.opts()),{})}error($,Z){if(this._outputConfiguration.outputError(`${$}
|
|
18
18
|
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==="string")this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
19
19
|
`);else if(this._showHelpAfterError)this._outputConfiguration.writeErr(`
|
|
20
|
-
`),this.outputHelp({error:!0});let Y=Z||{},
|
|
21
|
-
`),this._exit(0,"commander.version",$)}),this}description($,Z){if($===void 0&&Z===void 0)return this._description;if(this._description=$,Z)this._argsDescription=Z;return this}summary($){if($===void 0)return this._summary;return this._summary=$,this}alias($){if($===void 0)return this._aliases[0];let Z=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)Z=this.commands[this.commands.length-1];if($===Z._name)throw new Error("Command alias can't be the same as its name");return Z._aliases.push($),this}aliases($){if($===void 0)return this._aliases;return $.forEach((Z)=>this.alias(Z)),this}usage($){if($===void 0){if(this._usage)return this._usage;let Z=this.registeredArguments.map((Y)=>{return
|
|
22
|
-
Expecting one of '${Y.join("', '")}'`);let
|
|
23
|
-
`)}),this}}function
|
|
24
|
-
`);let
|
|
25
|
-
`),Q=Q.replace(/\\r/g,"\r");Z[X]=Q}return Z}function R3($){$=$||{};let Z=R7($);$.path=Z;let Y=A0.configDotenv($);if(!Y.parsed){let G=new Error(`MISSING_DATA: Cannot parse ${Z} for an unknown reason`);throw G.code="MISSING_DATA",G}let z=T7($).split(","),X=z.length,Q;for(let G=0;G<X;G++)try{let J=z[G].trim(),_=E3(Y,J);Q=A0.decrypt(_.ciphertext,_.key);break}catch(J){if(G+1>=X)throw J}return A0.parse(Q)}function C3($){console.log(`[dotenv@${e9}][WARN] ${$}`)}function f8($){console.log(`[dotenv@${e9}][DEBUG] ${$}`)}function P7($){console.log(`[dotenv@${e9}] ${$}`)}function T7($){if($&&$.DOTENV_KEY&&$.DOTENV_KEY.length>0)return $.DOTENV_KEY;if(process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0)return process.env.DOTENV_KEY;return""}function E3($,Z){let Y;try{Y=new URL(Z)}catch(J){if(J.code==="ERR_INVALID_URL"){let _=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw _.code="INVALID_DOTENV_KEY",_}throw J}let z=Y.password;if(!z){let J=new Error("INVALID_DOTENV_KEY: Missing key part");throw J.code="INVALID_DOTENV_KEY",J}let X=Y.searchParams.get("environment");if(!X){let J=new Error("INVALID_DOTENV_KEY: Missing environment part");throw J.code="INVALID_DOTENV_KEY",J}let Q=`DOTENV_VAULT_${X.toUpperCase()}`,G=$.parsed[Q];if(!G){let J=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${Q} in your .env.vault file.`);throw J.code="NOT_FOUND_DOTENV_ENVIRONMENT",J}return{ciphertext:G,key:z}}function R7($){let Z=null;if($&&$.path&&$.path.length>0)if(Array.isArray($.path)){for(let Y of $.path)if(t9.existsSync(Y))Z=Y.endsWith(".vault")?Y:`${Y}.vault`}else Z=$.path.endsWith(".vault")?$.path:`${$.path}.vault`;else Z=b6.resolve(process.cwd(),".env.vault");if(t9.existsSync(Z))return Z;return null}function A7($){return $[0]==="~"?b6.join(I3.homedir(),$.slice(1)):$}function N3($){let Z=Boolean($&&$.debug),Y=$&&"quiet"in $?$.quiet:!0;if(Z||!Y)P7("Loading env from encrypted .env.vault");let z=A0._parseVault($),X=process.env;if($&&$.processEnv!=null)X=$.processEnv;return A0.populate(X,z,$),{parsed:z}}function w3($){let Z=b6.resolve(process.cwd(),".env"),Y="utf8",z=Boolean($&&$.debug),X=$&&"quiet"in $?$.quiet:!0;if($&&$.encoding)Y=$.encoding;else if(z)f8("No encoding is specified. UTF-8 is used by default");let Q=[Z];if($&&$.path)if(!Array.isArray($.path))Q=[A7($.path)];else{Q=[];for(let H of $.path)Q.push(A7(H))}let G,J={};for(let H of Q)try{let q=A0.parse(t9.readFileSync(H,{encoding:Y}));A0.populate(J,q,$)}catch(q){if(z)f8(`Failed to load ${H} ${q.message}`);G=q}let _=process.env;if($&&$.processEnv!=null)_=$.processEnv;if(A0.populate(_,J,$),z||!X){let H=Object.keys(J).length,q=[];for(let F of Q)try{let L=b6.relative(process.cwd(),F);q.push(L)}catch(L){if(z)f8(`Failed to load ${F} ${L.message}`);G=L}P7(`injecting env (${H}) from ${q.join(",")}`)}if(G)return{parsed:J,error:G};else return{parsed:J}}function b3($){if(T7($).length===0)return A0.configDotenv($);let Z=R7($);if(!Z)return C3(`You set DOTENV_KEY but you are missing a .env.vault file at ${Z}. Did you forget to build it?`),A0.configDotenv($);return A0._configVault($)}function x3($,Z){let Y=Buffer.from(Z.slice(-64),"hex"),z=Buffer.from($,"base64"),X=z.subarray(0,12),Q=z.subarray(-16);z=z.subarray(12,-16);try{let G=U3.createDecipheriv("aes-256-gcm",Y,X);return G.setAuthTag(Q),`${G.update(z)}${G.final()}`}catch(G){let J=G instanceof RangeError,_=G.message==="Invalid key length",H=G.message==="Unsupported state or unable to authenticate data";if(J||_){let q=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw q.code="INVALID_DOTENV_KEY",q}else if(H){let q=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw q.code="DECRYPTION_FAILED",q}else throw G}}function y3($,Z,Y={}){let z=Boolean(Y&&Y.debug),X=Boolean(Y&&Y.override);if(typeof Z!=="object"){let Q=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw Q.code="OBJECT_REQUIRED",Q}for(let Q of Object.keys(Z))if(Object.prototype.hasOwnProperty.call($,Q)){if(X===!0)$[Q]=Z[Q];if(z)if(X===!0)f8(`"${Q}" is already defined and WAS overwritten`);else f8(`"${Q}" is already defined and was NOT overwritten`)}else $[Q]=Z[Q]}var A0={configDotenv:w3,_configVault:N3,_parseVault:R3,config:b3,decrypt:x3,parse:T3,populate:y3};HB.configDotenv=A0.configDotenv;HB._configVault=A0._configVault;HB._parseVault=A0._parseVault;HB.config=A0.config;HB.decrypt=A0.decrypt;HB.parse=A0.parse;HB.populate=A0.populate;L1.exports=A0});var W8=N((qB,E7)=>{E7.exports=s1;s1.CAPTURING_PHASE=1;s1.AT_TARGET=2;s1.BUBBLING_PHASE=3;function s1($,Z){if(this.type="",this.target=null,this.currentTarget=null,this.eventPhase=s1.AT_TARGET,this.bubbles=!1,this.cancelable=!1,this.isTrusted=!1,this.defaultPrevented=!1,this.timeStamp=Date.now(),this._propagationStopped=!1,this._immediatePropagationStopped=!1,this._initialized=!0,this._dispatching=!1,$)this.type=$;if(Z)for(var Y in Z)this[Y]=Z[Y]}s1.prototype=Object.create(Object.prototype,{constructor:{value:s1},stopPropagation:{value:function $(){this._propagationStopped=!0}},stopImmediatePropagation:{value:function $(){this._propagationStopped=!0,this._immediatePropagationStopped=!0}},preventDefault:{value:function $(){if(this.cancelable)this.defaultPrevented=!0}},initEvent:{value:function $(Z,Y,z){if(this._initialized=!0,this._dispatching)return;this._propagationStopped=!1,this._immediatePropagationStopped=!1,this.defaultPrevented=!1,this.isTrusted=!1,this.target=null,this.type=Z,this.bubbles=Y,this.cancelable=z}}})});var Z$=N((jB,w7)=>{var N7=W8();w7.exports=$$;function $$(){N7.call(this),this.view=null,this.detail=0}$$.prototype=Object.create(N7.prototype,{constructor:{value:$$},initUIEvent:{value:function($,Z,Y,z,X){this.initEvent($,Z,Y),this.view=z,this.detail=X}}})});var z$=N((KB,x7)=>{var b7=Z$();x7.exports=Y$;function Y$(){b7.call(this),this.screenX=this.screenY=this.clientX=this.clientY=0,this.ctrlKey=this.altKey=this.shiftKey=this.metaKey=!1,this.button=0,this.buttons=1,this.relatedTarget=null}Y$.prototype=Object.create(b7.prototype,{constructor:{value:Y$},initMouseEvent:{value:function($,Z,Y,z,X,Q,G,J,_,H,q,F,L,B,D){switch(this.initEvent($,Z,Y,z,X),this.screenX=Q,this.screenY=G,this.clientX=J,this.clientY=_,this.ctrlKey=H,this.altKey=q,this.shiftKey=F,this.metaKey=L,this.button=B,B){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2;break;default:this.buttons=0;break}this.relatedTarget=D}},getModifierState:{value:function($){switch($){case"Alt":return this.altKey;case"Control":return this.ctrlKey;case"Shift":return this.shiftKey;case"Meta":return this.metaKey;default:return!1}}}})});var k6=N((FB,k7)=>{k7.exports=y6;var u3=1,d3=3,c3=4,l3=5,i3=7,s3=8,o3=9,n3=11,r3=12,a3=13,t3=14,e3=15,$G=17,ZG=18,YG=19,zG=20,XG=21,QG=22,GG=23,WG=24,VG=25,JG=[null,"INDEX_SIZE_ERR",null,"HIERARCHY_REQUEST_ERR","WRONG_DOCUMENT_ERR","INVALID_CHARACTER_ERR",null,"NO_MODIFICATION_ALLOWED_ERR","NOT_FOUND_ERR","NOT_SUPPORTED_ERR","INUSE_ATTRIBUTE_ERR","INVALID_STATE_ERR","SYNTAX_ERR","INVALID_MODIFICATION_ERR","NAMESPACE_ERR","INVALID_ACCESS_ERR",null,"TYPE_MISMATCH_ERR","SECURITY_ERR","NETWORK_ERR","ABORT_ERR","URL_MISMATCH_ERR","QUOTA_EXCEEDED_ERR","TIMEOUT_ERR","INVALID_NODE_TYPE_ERR","DATA_CLONE_ERR"],_G=[null,"INDEX_SIZE_ERR (1): the index is not in the allowed range",null,"HIERARCHY_REQUEST_ERR (3): the operation would yield an incorrect nodes model","WRONG_DOCUMENT_ERR (4): the object is in the wrong Document, a call to importNode is required","INVALID_CHARACTER_ERR (5): the string contains invalid characters",null,"NO_MODIFICATION_ALLOWED_ERR (7): the object can not be modified","NOT_FOUND_ERR (8): the object can not be found here","NOT_SUPPORTED_ERR (9): this operation is not supported","INUSE_ATTRIBUTE_ERR (10): setAttributeNode called on owned Attribute","INVALID_STATE_ERR (11): the object is in an invalid state","SYNTAX_ERR (12): the string did not match the expected pattern","INVALID_MODIFICATION_ERR (13): the object can not be modified in this way","NAMESPACE_ERR (14): the operation is not allowed by Namespaces in XML","INVALID_ACCESS_ERR (15): the object does not support the operation or argument",null,"TYPE_MISMATCH_ERR (17): the type of the object does not match the expected type","SECURITY_ERR (18): the operation is insecure","NETWORK_ERR (19): a network error occurred","ABORT_ERR (20): the user aborted an operation","URL_MISMATCH_ERR (21): the given URL does not match another URL","QUOTA_EXCEEDED_ERR (22): the quota has been exceeded","TIMEOUT_ERR (23): a timeout occurred","INVALID_NODE_TYPE_ERR (24): the supplied node is invalid or has an invalid ancestor for this operation","DATA_CLONE_ERR (25): the object can not be cloned."],y7={INDEX_SIZE_ERR:u3,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:d3,WRONG_DOCUMENT_ERR:c3,INVALID_CHARACTER_ERR:l3,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:i3,NOT_FOUND_ERR:s3,NOT_SUPPORTED_ERR:o3,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:n3,SYNTAX_ERR:r3,INVALID_MODIFICATION_ERR:a3,NAMESPACE_ERR:t3,INVALID_ACCESS_ERR:e3,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:$G,SECURITY_ERR:ZG,NETWORK_ERR:YG,ABORT_ERR:zG,URL_MISMATCH_ERR:XG,QUOTA_EXCEEDED_ERR:QG,TIMEOUT_ERR:GG,INVALID_NODE_TYPE_ERR:WG,DATA_CLONE_ERR:VG};function y6($){Error.call(this),Error.captureStackTrace(this,this.constructor),this.code=$,this.message=_G[$],this.name=JG[$]}y6.prototype.__proto__=Error.prototype;for(h8 in y7)x6={value:y7[h8]},Object.defineProperty(y6,h8,x6),Object.defineProperty(y6.prototype,h8,x6);var x6,h8});var f6=N((BG)=>{BG.isApiWritable=!globalThis.__domino_frozen__});var K0=N((jG)=>{var j0=k6(),S0=j0,qG=f6().isApiWritable;jG.NAMESPACE={HTML:"http://www.w3.org/1999/xhtml",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink"};jG.IndexSizeError=function(){throw new j0(S0.INDEX_SIZE_ERR)};jG.HierarchyRequestError=function(){throw new j0(S0.HIERARCHY_REQUEST_ERR)};jG.WrongDocumentError=function(){throw new j0(S0.WRONG_DOCUMENT_ERR)};jG.InvalidCharacterError=function(){throw new j0(S0.INVALID_CHARACTER_ERR)};jG.NoModificationAllowedError=function(){throw new j0(S0.NO_MODIFICATION_ALLOWED_ERR)};jG.NotFoundError=function(){throw new j0(S0.NOT_FOUND_ERR)};jG.NotSupportedError=function(){throw new j0(S0.NOT_SUPPORTED_ERR)};jG.InvalidStateError=function(){throw new j0(S0.INVALID_STATE_ERR)};jG.SyntaxError=function(){throw new j0(S0.SYNTAX_ERR)};jG.InvalidModificationError=function(){throw new j0(S0.INVALID_MODIFICATION_ERR)};jG.NamespaceError=function(){throw new j0(S0.NAMESPACE_ERR)};jG.InvalidAccessError=function(){throw new j0(S0.INVALID_ACCESS_ERR)};jG.TypeMismatchError=function(){throw new j0(S0.TYPE_MISMATCH_ERR)};jG.SecurityError=function(){throw new j0(S0.SECURITY_ERR)};jG.NetworkError=function(){throw new j0(S0.NETWORK_ERR)};jG.AbortError=function(){throw new j0(S0.ABORT_ERR)};jG.UrlMismatchError=function(){throw new j0(S0.URL_MISMATCH_ERR)};jG.QuotaExceededError=function(){throw new j0(S0.QUOTA_EXCEEDED_ERR)};jG.TimeoutError=function(){throw new j0(S0.TIMEOUT_ERR)};jG.InvalidNodeTypeError=function(){throw new j0(S0.INVALID_NODE_TYPE_ERR)};jG.DataCloneError=function(){throw new j0(S0.DATA_CLONE_ERR)};jG.nyi=function(){throw new Error("NotYetImplemented")};jG.shouldOverride=function(){throw new Error("Abstract function; should be overriding in subclass.")};jG.assert=function($,Z){if(!$)throw new Error("Assertion failed: "+(Z||"")+`
|
|
26
|
-
`+new Error().stack)};
|
|
20
|
+
`),this.outputHelp({error:!0});let Y=Z||{},X=Y.exitCode||1,z=Y.code||"commander.error";this._exit(X,z,$)}_parseOptionsEnv(){this.options.forEach(($)=>{if($.envVar&&$.envVar in q0.env){let Z=$.attributeName();if(this.getOptionValue(Z)===void 0||["default","config","env"].includes(this.getOptionValueSource(Z)))if($.required||$.optional)this.emit(`optionEnv:${$.name()}`,q0.env[$.envVar]);else this.emit(`optionEnv:${$.name()}`)}})}_parseOptionsImplied(){let $=new U3(this.options),Z=(Y)=>{return this.getOptionValue(Y)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(Y))};this.options.filter((Y)=>Y.implied!==void 0&&Z(Y.attributeName())&&$.valueFromOption(this.getOptionValue(Y.attributeName()),Y)).forEach((Y)=>{Object.keys(Y.implied).filter((X)=>!Z(X)).forEach((X)=>{this.setOptionValueWithSource(X,Y.implied[X],"implied")})})}missingArgument($){let Z=`error: missing required argument '${$}'`;this.error(Z,{code:"commander.missingArgument"})}optionMissingArgument($){let Z=`error: option '${$.flags}' argument missing`;this.error(Z,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue($){let Z=`error: required option '${$.flags}' not specified`;this.error(Z,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption($,Z){let Y=(Q)=>{let G=Q.attributeName(),V=this.getOptionValue(G),_=this.options.find((q)=>q.negate&&G===q.attributeName()),B=this.options.find((q)=>!q.negate&&G===q.attributeName());if(_&&(_.presetArg===void 0&&V===!1||_.presetArg!==void 0&&V===_.presetArg))return _;return B||Q},X=(Q)=>{let G=Y(Q),V=G.attributeName();if(this.getOptionValueSource(V)==="env")return`environment variable '${G.envVar}'`;return`option '${G.flags}'`},z=`error: ${X($)} cannot be used with ${X(Z)}`;this.error(z,{code:"commander.conflictingOption"})}unknownOption($){if(this._allowUnknownOption)return;let Z="";if($.startsWith("--")&&this._showSuggestionAfterError){let X=[],z=this;do{let Q=z.createHelp().visibleOptions(z).filter((G)=>G.long).map((G)=>G.long);X=X.concat(Q),z=z.parent}while(z&&!z._enablePositionalOptions);Z=I7($,X)}let Y=`error: unknown option '${$}'${Z}`;this.error(Y,{code:"commander.unknownOption"})}_excessArguments($){if(this._allowExcessArguments)return;let Z=this.registeredArguments.length,Y=Z===1?"":"s",z=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${Z} argument${Y} but got ${$.length}.`;this.error(z,{code:"commander.excessArguments"})}unknownCommand(){let $=this.args[0],Z="";if(this._showSuggestionAfterError){let X=[];this.createHelp().visibleCommands(this).forEach((z)=>{if(X.push(z.name()),z.alias())X.push(z.alias())}),Z=I7($,X)}let Y=`error: unknown command '${$}'${Z}`;this.error(Y,{code:"commander.unknownCommand"})}version($,Z,Y){if($===void 0)return this._version;this._version=$,Z=Z||"-V, --version",Y=Y||"output the version number";let X=this.createOption(Z,Y);return this._versionOptionName=X.attributeName(),this.options.push(X),this.on("option:"+X.name(),()=>{this._outputConfiguration.writeOut(`${$}
|
|
21
|
+
`),this._exit(0,"commander.version",$)}),this}description($,Z){if($===void 0&&Z===void 0)return this._description;if(this._description=$,Z)this._argsDescription=Z;return this}summary($){if($===void 0)return this._summary;return this._summary=$,this}alias($){if($===void 0)return this._aliases[0];let Z=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)Z=this.commands[this.commands.length-1];if($===Z._name)throw new Error("Command alias can't be the same as its name");return Z._aliases.push($),this}aliases($){if($===void 0)return this._aliases;return $.forEach((Z)=>this.alias(Z)),this}usage($){if($===void 0){if(this._usage)return this._usage;let Z=this.registeredArguments.map((Y)=>{return L3(Y)});return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?Z:[]).join(" ")}return this._usage=$,this}name($){if($===void 0)return this._name;return this._name=$,this}nameFromFilename($){return this._name=P1.basename($,P1.extname($)),this}executableDir($){if($===void 0)return this._executableDir;return this._executableDir=$,this}helpInformation($){let Z=this.createHelp();if(Z.helpWidth===void 0)Z.helpWidth=$&&$.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth();return Z.formatHelp(this,Z)}_getHelpContext($){$=$||{};let Z={error:!!$.error},Y;if(Z.error)Y=(X)=>this._outputConfiguration.writeErr(X);else Y=(X)=>this._outputConfiguration.writeOut(X);return Z.write=$.write||Y,Z.command=this,Z}outputHelp($){let Z;if(typeof $==="function")Z=$,$=void 0;let Y=this._getHelpContext($);this._getCommandAndAncestors().reverse().forEach((z)=>z.emit("beforeAllHelp",Y)),this.emit("beforeHelp",Y);let X=this.helpInformation(Y);if(Z){if(X=Z(X),typeof X!=="string"&&!Buffer.isBuffer(X))throw new Error("outputHelp callback must return a string or a Buffer")}if(Y.write(X),this._helpLongFlag)this.emit(this._helpLongFlag);this.emit("afterHelp",Y),this._getCommandAndAncestors().forEach((z)=>z.emit("afterAllHelp",Y))}helpOption($,Z){if(typeof $==="boolean")return this._hasHelpOption=$,this;this._helpFlags=$||this._helpFlags,this._helpDescription=Z||this._helpDescription;let Y=S3(this._helpFlags);return this._helpShortFlag=Y.shortFlag,this._helpLongFlag=Y.longFlag,this}help($){this.outputHelp($);let Z=q0.exitCode||0;if(Z===0&&$&&typeof $!=="function"&&$.error)Z=1;this._exit(Z,"commander.help","(outputHelp)")}addHelpText($,Z){let Y=["beforeAll","before","after","afterAll"];if(!Y.includes($))throw new Error(`Unexpected value for position to addHelpText.
|
|
22
|
+
Expecting one of '${Y.join("', '")}'`);let X=`${$}Help`;return this.on(X,(z)=>{let Q;if(typeof Z==="function")Q=Z({error:z.error,command:z.command});else Q=Z;if(Q)z.write(`${Q}
|
|
23
|
+
`)}),this}}function S7($,Z){if($._hasHelpOption&&Z.find((X)=>X===$._helpLongFlag||X===$._helpShortFlag))$.outputHelp(),$._exit(0,"commander.helpDisplayed","(outputHelp)")}function U7($){return $.map((Z)=>{if(!Z.startsWith("--inspect"))return Z;let Y,X="127.0.0.1",z="9229",Q;if((Q=Z.match(/^(--inspect(-brk)?)$/))!==null)Y=Q[1];else if((Q=Z.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(Y=Q[1],/^\d+$/.test(Q[3]))z=Q[3];else X=Q[3];else if((Q=Z.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)Y=Q[1],X=Q[3],z=Q[4];if(Y&&z!=="0")return`${Y}=${X}:${parseInt(z)+1}`;return Z})}A3.Command=e9});var E7=x((J1,C7)=>{var{Argument:T3}=x6(),{Command:P7}=A7(),{CommanderError:C3,InvalidArgumentError:T7}=h8(),{Help:E3}=n9(),{Option:R3}=o9();J1=C7.exports=new P7;J1.program=J1;J1.Command=P7;J1.Option=R3;J1.Argument=T3;J1.Help=E3;J1.CommanderError=C3;J1.InvalidArgumentError=T7;J1.InvalidOptionArgumentError=T7});var N7=x((y5,N3)=>{N3.exports={name:"dotenv",version:"16.6.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var f7=x((f5,T1)=>{var $$=T0("fs"),y6=T0("path"),w3=T0("os"),b3=T0("crypto"),x3=N7(),Z$=x3.version,y3=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function f3($){let Z={},Y=$.toString();Y=Y.replace(/\r\n?/mg,`
|
|
24
|
+
`);let X;while((X=y3.exec(Y))!=null){let z=X[1],Q=X[2]||"";Q=Q.trim();let G=Q[0];if(Q=Q.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),G==='"')Q=Q.replace(/\\n/g,`
|
|
25
|
+
`),Q=Q.replace(/\\r/g,"\r");Z[z]=Q}return Z}function k3($){$=$||{};let Z=y7($);$.path=Z;let Y=N0.configDotenv($);if(!Y.parsed){let G=new Error(`MISSING_DATA: Cannot parse ${Z} for an unknown reason`);throw G.code="MISSING_DATA",G}let X=x7($).split(","),z=X.length,Q;for(let G=0;G<z;G++)try{let V=X[G].trim(),_=g3(Y,V);Q=N0.decrypt(_.ciphertext,_.key);break}catch(V){if(G+1>=z)throw V}return N0.parse(Q)}function h3($){console.log(`[dotenv@${Z$}][WARN] ${$}`)}function v8($){console.log(`[dotenv@${Z$}][DEBUG] ${$}`)}function b7($){console.log(`[dotenv@${Z$}] ${$}`)}function x7($){if($&&$.DOTENV_KEY&&$.DOTENV_KEY.length>0)return $.DOTENV_KEY;if(process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0)return process.env.DOTENV_KEY;return""}function g3($,Z){let Y;try{Y=new URL(Z)}catch(V){if(V.code==="ERR_INVALID_URL"){let _=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw _.code="INVALID_DOTENV_KEY",_}throw V}let X=Y.password;if(!X){let V=new Error("INVALID_DOTENV_KEY: Missing key part");throw V.code="INVALID_DOTENV_KEY",V}let z=Y.searchParams.get("environment");if(!z){let V=new Error("INVALID_DOTENV_KEY: Missing environment part");throw V.code="INVALID_DOTENV_KEY",V}let Q=`DOTENV_VAULT_${z.toUpperCase()}`,G=$.parsed[Q];if(!G){let V=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${Q} in your .env.vault file.`);throw V.code="NOT_FOUND_DOTENV_ENVIRONMENT",V}return{ciphertext:G,key:X}}function y7($){let Z=null;if($&&$.path&&$.path.length>0)if(Array.isArray($.path)){for(let Y of $.path)if($$.existsSync(Y))Z=Y.endsWith(".vault")?Y:`${Y}.vault`}else Z=$.path.endsWith(".vault")?$.path:`${$.path}.vault`;else Z=y6.resolve(process.cwd(),".env.vault");if($$.existsSync(Z))return Z;return null}function w7($){return $[0]==="~"?y6.join(w3.homedir(),$.slice(1)):$}function v3($){let Z=Boolean($&&$.debug),Y=$&&"quiet"in $?$.quiet:!0;if(Z||!Y)b7("Loading env from encrypted .env.vault");let X=N0._parseVault($),z=process.env;if($&&$.processEnv!=null)z=$.processEnv;return N0.populate(z,X,$),{parsed:X}}function p3($){let Z=y6.resolve(process.cwd(),".env"),Y="utf8",X=Boolean($&&$.debug),z=$&&"quiet"in $?$.quiet:!0;if($&&$.encoding)Y=$.encoding;else if(X)v8("No encoding is specified. UTF-8 is used by default");let Q=[Z];if($&&$.path)if(!Array.isArray($.path))Q=[w7($.path)];else{Q=[];for(let B of $.path)Q.push(w7(B))}let G,V={};for(let B of Q)try{let q=N0.parse($$.readFileSync(B,{encoding:Y}));N0.populate(V,q,$)}catch(q){if(X)v8(`Failed to load ${B} ${q.message}`);G=q}let _=process.env;if($&&$.processEnv!=null)_=$.processEnv;if(N0.populate(_,V,$),X||!z){let B=Object.keys(V).length,q=[];for(let F of Q)try{let M=y6.relative(process.cwd(),F);q.push(M)}catch(M){if(X)v8(`Failed to load ${F} ${M.message}`);G=M}b7(`injecting env (${B}) from ${q.join(",")}`)}if(G)return{parsed:V,error:G};else return{parsed:V}}function m3($){if(x7($).length===0)return N0.configDotenv($);let Z=y7($);if(!Z)return h3(`You set DOTENV_KEY but you are missing a .env.vault file at ${Z}. Did you forget to build it?`),N0.configDotenv($);return N0._configVault($)}function u3($,Z){let Y=Buffer.from(Z.slice(-64),"hex"),X=Buffer.from($,"base64"),z=X.subarray(0,12),Q=X.subarray(-16);X=X.subarray(12,-16);try{let G=b3.createDecipheriv("aes-256-gcm",Y,z);return G.setAuthTag(Q),`${G.update(X)}${G.final()}`}catch(G){let V=G instanceof RangeError,_=G.message==="Invalid key length",B=G.message==="Unsupported state or unable to authenticate data";if(V||_){let q=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw q.code="INVALID_DOTENV_KEY",q}else if(B){let q=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw q.code="DECRYPTION_FAILED",q}else throw G}}function d3($,Z,Y={}){let X=Boolean(Y&&Y.debug),z=Boolean(Y&&Y.override);if(typeof Z!=="object"){let Q=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw Q.code="OBJECT_REQUIRED",Q}for(let Q of Object.keys(Z))if(Object.prototype.hasOwnProperty.call($,Q)){if(z===!0)$[Q]=Z[Q];if(X)if(z===!0)v8(`"${Q}" is already defined and WAS overwritten`);else v8(`"${Q}" is already defined and was NOT overwritten`)}else $[Q]=Z[Q]}var N0={configDotenv:p3,_configVault:v3,_parseVault:k3,config:m3,decrypt:u3,parse:f3,populate:d3};f5.configDotenv=N0.configDotenv;f5._configVault=N0._configVault;f5._parseVault=N0._parseVault;f5.config=N0.config;f5.decrypt=N0.decrypt;f5.parse=N0.parse;f5.populate=N0.populate;T1.exports=N0});var _8=x((k5,k7)=>{k7.exports=a1;a1.CAPTURING_PHASE=1;a1.AT_TARGET=2;a1.BUBBLING_PHASE=3;function a1($,Z){if(this.type="",this.target=null,this.currentTarget=null,this.eventPhase=a1.AT_TARGET,this.bubbles=!1,this.cancelable=!1,this.isTrusted=!1,this.defaultPrevented=!1,this.timeStamp=Date.now(),this._propagationStopped=!1,this._immediatePropagationStopped=!1,this._initialized=!0,this._dispatching=!1,$)this.type=$;if(Z)for(var Y in Z)this[Y]=Z[Y]}a1.prototype=Object.create(Object.prototype,{constructor:{value:a1},stopPropagation:{value:function $(){this._propagationStopped=!0}},stopImmediatePropagation:{value:function $(){this._propagationStopped=!0,this._immediatePropagationStopped=!0}},preventDefault:{value:function $(){if(this.cancelable)this.defaultPrevented=!0}},initEvent:{value:function $(Z,Y,X){if(this._initialized=!0,this._dispatching)return;this._propagationStopped=!1,this._immediatePropagationStopped=!1,this.defaultPrevented=!1,this.isTrusted=!1,this.target=null,this.type=Z,this.bubbles=Y,this.cancelable=X}}})});var X$=x((h5,g7)=>{var h7=_8();g7.exports=Y$;function Y$(){h7.call(this),this.view=null,this.detail=0}Y$.prototype=Object.create(h7.prototype,{constructor:{value:Y$},initUIEvent:{value:function($,Z,Y,X,z){this.initEvent($,Z,Y),this.view=X,this.detail=z}}})});var Q$=x((g5,p7)=>{var v7=X$();p7.exports=z$;function z$(){v7.call(this),this.screenX=this.screenY=this.clientX=this.clientY=0,this.ctrlKey=this.altKey=this.shiftKey=this.metaKey=!1,this.button=0,this.buttons=1,this.relatedTarget=null}z$.prototype=Object.create(v7.prototype,{constructor:{value:z$},initMouseEvent:{value:function($,Z,Y,X,z,Q,G,V,_,B,q,F,M,H,O){switch(this.initEvent($,Z,Y,X,z),this.screenX=Q,this.screenY=G,this.clientX=V,this.clientY=_,this.ctrlKey=B,this.altKey=q,this.shiftKey=F,this.metaKey=M,this.button=H,H){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2;break;default:this.buttons=0;break}this.relatedTarget=O}},getModifierState:{value:function($){switch($){case"Alt":return this.altKey;case"Control":return this.ctrlKey;case"Shift":return this.shiftKey;case"Meta":return this.metaKey;default:return!1}}}})});var h6=x((v5,u7)=>{u7.exports=k6;var a3=1,t3=3,e3=4,$G=5,ZG=7,YG=8,XG=9,zG=11,QG=12,GG=13,WG=14,JG=15,VG=17,_G=18,HG=19,BG=20,qG=21,jG=22,KG=23,FG=24,OG=25,MG=[null,"INDEX_SIZE_ERR",null,"HIERARCHY_REQUEST_ERR","WRONG_DOCUMENT_ERR","INVALID_CHARACTER_ERR",null,"NO_MODIFICATION_ALLOWED_ERR","NOT_FOUND_ERR","NOT_SUPPORTED_ERR","INUSE_ATTRIBUTE_ERR","INVALID_STATE_ERR","SYNTAX_ERR","INVALID_MODIFICATION_ERR","NAMESPACE_ERR","INVALID_ACCESS_ERR",null,"TYPE_MISMATCH_ERR","SECURITY_ERR","NETWORK_ERR","ABORT_ERR","URL_MISMATCH_ERR","QUOTA_EXCEEDED_ERR","TIMEOUT_ERR","INVALID_NODE_TYPE_ERR","DATA_CLONE_ERR"],DG=[null,"INDEX_SIZE_ERR (1): the index is not in the allowed range",null,"HIERARCHY_REQUEST_ERR (3): the operation would yield an incorrect nodes model","WRONG_DOCUMENT_ERR (4): the object is in the wrong Document, a call to importNode is required","INVALID_CHARACTER_ERR (5): the string contains invalid characters",null,"NO_MODIFICATION_ALLOWED_ERR (7): the object can not be modified","NOT_FOUND_ERR (8): the object can not be found here","NOT_SUPPORTED_ERR (9): this operation is not supported","INUSE_ATTRIBUTE_ERR (10): setAttributeNode called on owned Attribute","INVALID_STATE_ERR (11): the object is in an invalid state","SYNTAX_ERR (12): the string did not match the expected pattern","INVALID_MODIFICATION_ERR (13): the object can not be modified in this way","NAMESPACE_ERR (14): the operation is not allowed by Namespaces in XML","INVALID_ACCESS_ERR (15): the object does not support the operation or argument",null,"TYPE_MISMATCH_ERR (17): the type of the object does not match the expected type","SECURITY_ERR (18): the operation is insecure","NETWORK_ERR (19): a network error occurred","ABORT_ERR (20): the user aborted an operation","URL_MISMATCH_ERR (21): the given URL does not match another URL","QUOTA_EXCEEDED_ERR (22): the quota has been exceeded","TIMEOUT_ERR (23): a timeout occurred","INVALID_NODE_TYPE_ERR (24): the supplied node is invalid or has an invalid ancestor for this operation","DATA_CLONE_ERR (25): the object can not be cloned."],m7={INDEX_SIZE_ERR:a3,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:t3,WRONG_DOCUMENT_ERR:e3,INVALID_CHARACTER_ERR:$G,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:ZG,NOT_FOUND_ERR:YG,NOT_SUPPORTED_ERR:XG,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:zG,SYNTAX_ERR:QG,INVALID_MODIFICATION_ERR:GG,NAMESPACE_ERR:WG,INVALID_ACCESS_ERR:JG,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:VG,SECURITY_ERR:_G,NETWORK_ERR:HG,ABORT_ERR:BG,URL_MISMATCH_ERR:qG,QUOTA_EXCEEDED_ERR:jG,TIMEOUT_ERR:KG,INVALID_NODE_TYPE_ERR:FG,DATA_CLONE_ERR:OG};function k6($){Error.call(this),Error.captureStackTrace(this,this.constructor),this.code=$,this.message=DG[$],this.name=MG[$]}k6.prototype.__proto__=Error.prototype;for(p8 in m7)f6={value:m7[p8]},Object.defineProperty(k6,p8,f6),Object.defineProperty(k6.prototype,p8,f6);var f6,p8});var g6=x((LG)=>{LG.isApiWritable=!globalThis.__domino_frozen__});var L0=x((UG)=>{var D0=h6(),C0=D0,SG=g6().isApiWritable;UG.NAMESPACE={HTML:"http://www.w3.org/1999/xhtml",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink"};UG.IndexSizeError=function(){throw new D0(C0.INDEX_SIZE_ERR)};UG.HierarchyRequestError=function(){throw new D0(C0.HIERARCHY_REQUEST_ERR)};UG.WrongDocumentError=function(){throw new D0(C0.WRONG_DOCUMENT_ERR)};UG.InvalidCharacterError=function(){throw new D0(C0.INVALID_CHARACTER_ERR)};UG.NoModificationAllowedError=function(){throw new D0(C0.NO_MODIFICATION_ALLOWED_ERR)};UG.NotFoundError=function(){throw new D0(C0.NOT_FOUND_ERR)};UG.NotSupportedError=function(){throw new D0(C0.NOT_SUPPORTED_ERR)};UG.InvalidStateError=function(){throw new D0(C0.INVALID_STATE_ERR)};UG.SyntaxError=function(){throw new D0(C0.SYNTAX_ERR)};UG.InvalidModificationError=function(){throw new D0(C0.INVALID_MODIFICATION_ERR)};UG.NamespaceError=function(){throw new D0(C0.NAMESPACE_ERR)};UG.InvalidAccessError=function(){throw new D0(C0.INVALID_ACCESS_ERR)};UG.TypeMismatchError=function(){throw new D0(C0.TYPE_MISMATCH_ERR)};UG.SecurityError=function(){throw new D0(C0.SECURITY_ERR)};UG.NetworkError=function(){throw new D0(C0.NETWORK_ERR)};UG.AbortError=function(){throw new D0(C0.ABORT_ERR)};UG.UrlMismatchError=function(){throw new D0(C0.URL_MISMATCH_ERR)};UG.QuotaExceededError=function(){throw new D0(C0.QUOTA_EXCEEDED_ERR)};UG.TimeoutError=function(){throw new D0(C0.TIMEOUT_ERR)};UG.InvalidNodeTypeError=function(){throw new D0(C0.INVALID_NODE_TYPE_ERR)};UG.DataCloneError=function(){throw new D0(C0.DATA_CLONE_ERR)};UG.nyi=function(){throw new Error("NotYetImplemented")};UG.shouldOverride=function(){throw new Error("Abstract function; should be overriding in subclass.")};UG.assert=function($,Z){if(!$)throw new Error("Assertion failed: "+(Z||"")+`
|
|
26
|
+
`+new Error().stack)};UG.expose=function($,Z){for(var Y in $)Object.defineProperty(Z.prototype,Y,{value:$[Y],writable:SG})};UG.merge=function($,Z){for(var Y in Z)$[Y]=Z[Y]};UG.documentOrder=function($,Z){return 3-($.compareDocumentPosition(Z)&6)};UG.toASCIILowerCase=function($){return $.replace(/[A-Z]+/g,function(Z){return Z.toLowerCase()})};UG.toASCIIUpperCase=function($){return $.replace(/[a-z]+/g,function(Z){return Z.toUpperCase()})}});var G$=x((u5,c7)=>{var t1=_8(),$W=Q$(),ZW=L0();c7.exports=d7;function d7(){}d7.prototype={addEventListener:function $(Z,Y,X){if(!Y)return;if(X===void 0)X=!1;if(!this._listeners)this._listeners=Object.create(null);if(!this._listeners[Z])this._listeners[Z]=[];var z=this._listeners[Z];for(var Q=0,G=z.length;Q<G;Q++){var V=z[Q];if(V.listener===Y&&V.capture===X)return}var _={listener:Y,capture:X};if(typeof Y==="function")_.f=Y;z.push(_)},removeEventListener:function $(Z,Y,X){if(X===void 0)X=!1;if(this._listeners){var z=this._listeners[Z];if(z)for(var Q=0,G=z.length;Q<G;Q++){var V=z[Q];if(V.listener===Y&&V.capture===X){if(z.length===1)this._listeners[Z]=void 0;else z.splice(Q,1);return}}}},dispatchEvent:function $(Z){return this._dispatchEvent(Z,!1)},_dispatchEvent:function $(Z,Y){if(typeof Y!=="boolean")Y=!1;function X(B,q){var{type:F,eventPhase:M}=q;if(q.currentTarget=B,M!==t1.CAPTURING_PHASE&&B._handlers&&B._handlers[F]){var H=B._handlers[F],O;if(typeof H==="function")O=H.call(q.currentTarget,q);else{var D=H.handleEvent;if(typeof D!=="function")throw new TypeError("handleEvent property of event handler object isnot a function.");O=D.call(H,q)}switch(q.type){case"mouseover":if(O===!0)q.preventDefault();break;case"beforeunload":default:if(O===!1)q.preventDefault();break}}var T=B._listeners&&B._listeners[F];if(!T)return;T=T.slice();for(var g=0,C=T.length;g<C;g++){if(q._immediatePropagationStopped)return;var f=T[g];if(M===t1.CAPTURING_PHASE&&!f.capture||M===t1.BUBBLING_PHASE&&f.capture)continue;if(f.f)f.f.call(q.currentTarget,q);else{var s=f.listener.handleEvent;if(typeof s!=="function")throw new TypeError("handleEvent property of event listener object is not a function.");s.call(f.listener,q)}}}if(!Z._initialized||Z._dispatching)ZW.InvalidStateError();Z.isTrusted=Y,Z._dispatching=!0,Z.target=this;var z=[];for(var Q=this.parentNode;Q;Q=Q.parentNode)z.push(Q);Z.eventPhase=t1.CAPTURING_PHASE;for(var G=z.length-1;G>=0;G--)if(X(z[G],Z),Z._propagationStopped)break;if(!Z._propagationStopped)Z.eventPhase=t1.AT_TARGET,X(this,Z);if(Z.bubbles&&!Z._propagationStopped){Z.eventPhase=t1.BUBBLING_PHASE;for(var V=0,_=z.length;V<_;V++)if(X(z[V],Z),Z._propagationStopped)break}if(Z._dispatching=!1,Z.eventPhase=t1.AT_TARGET,Z.currentTarget=null,Y&&!Z.defaultPrevented&&Z instanceof $W)switch(Z.type){case"mousedown":this._armed={x:Z.clientX,y:Z.clientY,t:Z.timeStamp};break;case"mouseout":case"mouseover":this._armed=null;break;case"mouseup":if(this._isClick(Z))this._doClick(Z);this._armed=null;break}return!Z.defaultPrevented},_isClick:function($){return this._armed!==null&&$.type==="mouseup"&&$.isTrusted&&$.button===0&&$.timeStamp-this._armed.t<1000&&Math.abs($.clientX-this._armed.x)<10&&Math.abs($.clientY-this._armed.Y)<10},_doClick:function($){if(this._click_in_progress)return;this._click_in_progress=!0;var Z=this;while(Z&&!Z._post_click_activation_steps)Z=Z.parentNode;if(Z&&Z._pre_click_activation_steps)Z._pre_click_activation_steps();var Y=this.ownerDocument.createEvent("MouseEvent");Y.initMouseEvent("click",!0,!0,this.ownerDocument.defaultView,1,$.screenX,$.screenY,$.clientX,$.clientY,$.ctrlKey,$.altKey,$.shiftKey,$.metaKey,$.button,null);var X=this._dispatchEvent(Y,!0);if(Z){if(X){if(Z._post_click_activation_steps)Z._post_click_activation_steps(Y)}else if(Z._cancelled_activation_steps)Z._cancelled_activation_steps()}},_setEventHandler:function $(Z,Y){if(!this._handlers)this._handlers=Object.create(null);this._handlers[Z]=Y},_getEventHandler:function $(Z){return this._handlers&&this._handlers[Z]||null}}});var W$=x((d5,l7)=>{var C1=L0(),Q1=l7.exports={valid:function($){return C1.assert($,"list falsy"),C1.assert($._previousSibling,"previous falsy"),C1.assert($._nextSibling,"next falsy"),!0},insertBefore:function($,Z){C1.assert(Q1.valid($)&&Q1.valid(Z));var Y=$,X=$._previousSibling,z=Z,Q=Z._previousSibling;Y._previousSibling=Q,X._nextSibling=z,Q._nextSibling=Y,z._previousSibling=X,C1.assert(Q1.valid($)&&Q1.valid(Z))},replace:function($,Z){if(C1.assert(Q1.valid($)&&(Z===null||Q1.valid(Z))),Z!==null)Q1.insertBefore(Z,$);Q1.remove($),C1.assert(Q1.valid($)&&(Z===null||Q1.valid(Z)))},remove:function($){C1.assert(Q1.valid($));var Z=$._previousSibling;if(Z===$)return;var Y=$._nextSibling;Z._nextSibling=Y,Y._previousSibling=Z,$._previousSibling=$._nextSibling=$,C1.assert(Q1.valid($))}}});var J$=x((c5,e7)=>{e7.exports={serializeOne:JW,\u{275}escapeMatchingClosingTag:r7,\u{275}escapeClosingCommentTag:a7,\u{275}escapeProcessingInstructionContent:t7};var o7=L0(),e1=o7.NAMESPACE,i7={STYLE:!0,SCRIPT:!0,XMP:!0,IFRAME:!0,NOEMBED:!0,NOFRAMES:!0,PLAINTEXT:!0},YW={area:!0,base:!0,basefont:!0,bgsound:!0,br:!0,col:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},XW={},s7=/[&<>\u00A0]/g,n7=/[&"<>\u00A0]/g;function zW($){if(!s7.test($))return $;return $.replace(s7,(Z)=>{switch(Z){case"&":return"&";case"<":return"<";case">":return">";case"\xA0":return" "}})}function QW($){if(!n7.test($))return $;return $.replace(n7,(Z)=>{switch(Z){case"<":return"<";case">":return">";case"&":return"&";case'"':return""";case"\xA0":return" "}})}function GW($){var Z=$.namespaceURI;if(!Z)return $.localName;if(Z===e1.XML)return"xml:"+$.localName;if(Z===e1.XLINK)return"xlink:"+$.localName;if(Z===e1.XMLNS)if($.localName==="xmlns")return"xmlns";else return"xmlns:"+$.localName;return $.name}function r7($,Z){let Y="</"+Z;if(!$.toLowerCase().includes(Y))return $;let X=[...$],z=$.matchAll(new RegExp(Y,"ig"));for(let Q of z)X[Q.index]="<";return X.join("")}var WW=/--!?>/;function a7($){if(!WW.test($))return $;return $.replace(/(--\!?)>/g,"$1>")}function t7($){return $.includes(">")?$.replaceAll(">",">"):$}function JW($,Z){var Y="";switch($.nodeType){case 1:var X=$.namespaceURI,z=X===e1.HTML,Q=z||X===e1.SVG||X===e1.MATHML?$.localName:$.tagName;Y+="<"+Q;for(var G=0,V=$._numattrs;G<V;G++){var _=$._attr(G);if(Y+=" "+GW(_),_.value!==void 0)Y+='="'+QW(_.value)+'"'}if(Y+=">",!(z&&YW[Q])){var B=$.serialize();if(i7[Q.toUpperCase()])B=r7(B,Q);if(z&&XW[Q]&&B.charAt(0)===`
|
|
27
27
|
`)Y+=`
|
|
28
|
-
`;Y+=H,Y+="</"+Q+">"}break;case 3:case 4:var q;if(Z.nodeType===1&&Z.namespaceURI===n1.HTML)q=Z.tagName;else q="";if(v7[q]||q==="NOSCRIPT"&&Z.ownerDocument._scripting_enabled)Y+=$.data;else Y+=nG($.data);break;case 8:Y+="<!--"+c7($.data)+"-->";break;case 7:let F=l7($.data);Y+="<?"+$.target+" "+F+"?>";break;case 10:Y+="<!DOCTYPE "+$.name,Y+=">";break;default:u7.InvalidStateError()}return Y}});var N0=N((IB,t7)=>{t7.exports=_0;var a7=X$(),h6=Q$(),s7=G$(),X0=K0();function _0(){a7.call(this),this.parentNode=null,this._nextSibling=this._previousSibling=this,this._index=void 0}var d0=_0.ELEMENT_NODE=1,W$=_0.ATTRIBUTE_NODE=2,g6=_0.TEXT_NODE=3,$W=_0.CDATA_SECTION_NODE=4,ZW=_0.ENTITY_REFERENCE_NODE=5,V$=_0.ENTITY_NODE=6,o7=_0.PROCESSING_INSTRUCTION_NODE=7,n7=_0.COMMENT_NODE=8,g8=_0.DOCUMENT_NODE=9,Z1=_0.DOCUMENT_TYPE_NODE=10,f1=_0.DOCUMENT_FRAGMENT_NODE=11,J$=_0.NOTATION_NODE=12,_$=_0.DOCUMENT_POSITION_DISCONNECTED=1,B$=_0.DOCUMENT_POSITION_PRECEDING=2,H$=_0.DOCUMENT_POSITION_FOLLOWING=4,r7=_0.DOCUMENT_POSITION_CONTAINS=8,q$=_0.DOCUMENT_POSITION_CONTAINED_BY=16,j$=_0.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;_0.prototype=Object.create(a7.prototype,{baseURI:{get:X0.nyi},parentElement:{get:function(){return this.parentNode&&this.parentNode.nodeType===d0?this.parentNode:null}},hasChildNodes:{value:X0.shouldOverride},firstChild:{get:X0.shouldOverride},lastChild:{get:X0.shouldOverride},isConnected:{get:function(){let $=this;while($!=null){if($.nodeType===_0.DOCUMENT_NODE)return!0;if($=$.parentNode,$!=null&&$.nodeType===_0.DOCUMENT_FRAGMENT_NODE)$=$.host}return!1}},previousSibling:{get:function(){var $=this.parentNode;if(!$)return null;if(this===$.firstChild)return null;return this._previousSibling}},nextSibling:{get:function(){var $=this.parentNode,Z=this._nextSibling;if(!$)return null;if(Z===$.firstChild)return null;return Z}},textContent:{get:function(){return null},set:function($){}},innerText:{get:function(){return null},set:function($){}},_countChildrenOfType:{value:function($){var Z=0;for(var Y=this.firstChild;Y!==null;Y=Y.nextSibling)if(Y.nodeType===$)Z++;return Z}},_ensureInsertValid:{value:function $(Z,Y,z){var X=this,Q,G;if(!Z.nodeType)throw new TypeError("not a node");switch(X.nodeType){case g8:case f1:case d0:break;default:X0.HierarchyRequestError()}if(Z.isAncestor(X))X0.HierarchyRequestError();if(Y!==null||!z){if(Y.parentNode!==X)X0.NotFoundError()}switch(Z.nodeType){case f1:case Z1:case d0:case g6:case o7:case n7:break;default:X0.HierarchyRequestError()}if(X.nodeType===g8)switch(Z.nodeType){case g6:X0.HierarchyRequestError();break;case f1:if(Z._countChildrenOfType(g6)>0)X0.HierarchyRequestError();switch(Z._countChildrenOfType(d0)){case 0:break;case 1:if(Y!==null){if(z&&Y.nodeType===Z1)X0.HierarchyRequestError();for(G=Y.nextSibling;G!==null;G=G.nextSibling)if(G.nodeType===Z1)X0.HierarchyRequestError()}if(Q=X._countChildrenOfType(d0),z){if(Q>0)X0.HierarchyRequestError()}else if(Q>1||Q===1&&Y.nodeType!==d0)X0.HierarchyRequestError();break;default:X0.HierarchyRequestError()}break;case d0:if(Y!==null){if(z&&Y.nodeType===Z1)X0.HierarchyRequestError();for(G=Y.nextSibling;G!==null;G=G.nextSibling)if(G.nodeType===Z1)X0.HierarchyRequestError()}if(Q=X._countChildrenOfType(d0),z){if(Q>0)X0.HierarchyRequestError()}else if(Q>1||Q===1&&Y.nodeType!==d0)X0.HierarchyRequestError();break;case Z1:if(Y===null){if(X._countChildrenOfType(d0))X0.HierarchyRequestError()}else for(G=X.firstChild;G!==null;G=G.nextSibling){if(G===Y)break;if(G.nodeType===d0)X0.HierarchyRequestError()}if(Q=X._countChildrenOfType(Z1),z){if(Q>0)X0.HierarchyRequestError()}else if(Q>1||Q===1&&Y.nodeType!==Z1)X0.HierarchyRequestError();break}else if(Z.nodeType===Z1)X0.HierarchyRequestError()}},insertBefore:{value:function $(Z,Y){var z=this;z._ensureInsertValid(Z,Y,!0);var X=Y;if(X===Z)X=Z.nextSibling;return z.doc.adoptNode(Z),Z._insertOrReplace(z,X,!1),Z}},appendChild:{value:function($){return this.insertBefore($,null)}},_appendChild:{value:function($){$._insertOrReplace(this,null,!1)}},removeChild:{value:function $(Z){var Y=this;if(!Z.nodeType)throw new TypeError("not a node");if(Z.parentNode!==Y)X0.NotFoundError();return Z.remove(),Z}},replaceChild:{value:function $(Z,Y){var z=this;if(z._ensureInsertValid(Z,Y,!1),Z.doc!==z.doc)z.doc.adoptNode(Z);return Z._insertOrReplace(z,Y,!0),Y}},contains:{value:function $(Z){if(Z===null)return!1;if(this===Z)return!0;return(this.compareDocumentPosition(Z)&q$)!==0}},compareDocumentPosition:{value:function $(Z){if(this===Z)return 0;if(this.doc!==Z.doc||this.rooted!==Z.rooted)return _$+j$;var Y=[],z=[];for(var X=this;X!==null;X=X.parentNode)Y.push(X);for(X=Z;X!==null;X=X.parentNode)z.push(X);if(Y.reverse(),z.reverse(),Y[0]!==z[0])return _$+j$;X=Math.min(Y.length,z.length);for(var Q=1;Q<X;Q++)if(Y[Q]!==z[Q])if(Y[Q].index<z[Q].index)return H$;else return B$;if(Y.length<z.length)return H$+q$;else return B$+r7}},isSameNode:{value:function $(Z){return this===Z}},isEqualNode:{value:function $(Z){if(!Z)return!1;if(Z.nodeType!==this.nodeType)return!1;if(!this.isEqual(Z))return!1;for(var Y=this.firstChild,z=Z.firstChild;Y&&z;Y=Y.nextSibling,z=z.nextSibling)if(!Y.isEqualNode(z))return!1;return Y===null&&z===null}},cloneNode:{value:function($){var Z=this.clone();if($)for(var Y=this.firstChild;Y!==null;Y=Y.nextSibling)Z._appendChild(Y.cloneNode(!0));return Z}},lookupPrefix:{value:function $(Z){var Y;if(Z===""||Z===null||Z===void 0)return null;switch(this.nodeType){case d0:return this._lookupNamespacePrefix(Z,this);case g8:return Y=this.documentElement,Y?Y.lookupPrefix(Z):null;case V$:case J$:case f1:case Z1:return null;case W$:return Y=this.ownerElement,Y?Y.lookupPrefix(Z):null;default:return Y=this.parentElement,Y?Y.lookupPrefix(Z):null}}},lookupNamespaceURI:{value:function $(Z){if(Z===""||Z===void 0)Z=null;var Y;switch(this.nodeType){case d0:return X0.shouldOverride();case g8:return Y=this.documentElement,Y?Y.lookupNamespaceURI(Z):null;case V$:case J$:case Z1:case f1:return null;case W$:return Y=this.ownerElement,Y?Y.lookupNamespaceURI(Z):null;default:return Y=this.parentElement,Y?Y.lookupNamespaceURI(Z):null}}},isDefaultNamespace:{value:function $(Z){if(Z===""||Z===void 0)Z=null;var Y=this.lookupNamespaceURI(null);return Y===Z}},index:{get:function(){var $=this.parentNode;if(this===$.firstChild)return 0;var Z=$.childNodes;if(this._index===void 0||Z[this._index]!==this){for(var Y=0;Y<Z.length;Y++)Z[Y]._index=Y;X0.assert(Z[this._index]===this)}return this._index}},isAncestor:{value:function($){if(this.doc!==$.doc)return!1;if(this.rooted!==$.rooted)return!1;for(var Z=$;Z;Z=Z.parentNode)if(Z===this)return!0;return!1}},ensureSameDoc:{value:function($){if($.ownerDocument===null)$.ownerDocument=this.doc;else if($.ownerDocument!==this.doc)X0.WrongDocumentError()}},removeChildren:{value:X0.shouldOverride},_insertOrReplace:{value:function $(Z,Y,z){var X=this,Q,G;if(X.nodeType===f1&&X.rooted)X0.HierarchyRequestError();if(Z._childNodes){if(Q=Y===null?Z._childNodes.length:Y.index,X.parentNode===Z){var J=X.index;if(J<Q)Q--}}if(z){if(Y.rooted)Y.doc.mutateRemove(Y);Y.parentNode=null}var _=Y;if(_===null)_=Z.firstChild;var H=X.rooted&&Z.rooted;if(X.nodeType===f1){var q=[0,z?1:0],F;for(var L=X.firstChild;L!==null;L=F)F=L.nextSibling,q.push(L),L.parentNode=Z;var B=q.length;if(z)h6.replace(_,B>2?q[2]:null);else if(B>2&&_!==null)h6.insertBefore(q[2],_);if(Z._childNodes){q[0]=Y===null?Z._childNodes.length:Y._index,Z._childNodes.splice.apply(Z._childNodes,q);for(G=2;G<B;G++)q[G]._index=q[0]+(G-2)}else if(Z._firstChild===Y){if(B>2)Z._firstChild=q[2];else if(z)Z._firstChild=null}if(X._childNodes)X._childNodes.length=0;else X._firstChild=null;if(Z.rooted){Z.modify();for(G=2;G<B;G++)Z.doc.mutateInsert(q[G])}}else{if(Y===X)return;if(H)X._remove();else if(X.parentNode)X.remove();if(X.parentNode=Z,z){if(h6.replace(_,X),Z._childNodes)X._index=Q,Z._childNodes[Q]=X;else if(Z._firstChild===Y)Z._firstChild=X}else{if(_!==null)h6.insertBefore(X,_);if(Z._childNodes)X._index=Q,Z._childNodes.splice(Q,0,X);else if(Z._firstChild===Y)Z._firstChild=X}if(H)Z.modify(),Z.doc.mutateMove(X);else if(Z.rooted)Z.modify(),Z.doc.mutateInsert(X)}}},lastModTime:{get:function(){if(!this._lastModTime)this._lastModTime=this.doc.modclock;return this._lastModTime}},modify:{value:function(){if(this.doc.modclock){var $=++this.doc.modclock;for(var Z=this;Z;Z=Z.parentElement)if(Z._lastModTime)Z._lastModTime=$}}},doc:{get:function(){return this.ownerDocument||this}},rooted:{get:function(){return!!this._nid}},normalize:{value:function(){var $;for(var Z=this.firstChild;Z!==null;Z=$){if($=Z.nextSibling,Z.normalize)Z.normalize();if(Z.nodeType!==_0.TEXT_NODE)continue;if(Z.nodeValue===""){this.removeChild(Z);continue}var Y=Z.previousSibling;if(Y===null)continue;else if(Y.nodeType===_0.TEXT_NODE)Y.appendData(Z.nodeValue),this.removeChild(Z)}}},serialize:{value:function(){if(this._innerHTML)return this._innerHTML;var $="";for(var Z=this.firstChild;Z!==null;Z=Z.nextSibling)$+=s7.serializeOne(Z,this);return $}},outerHTML:{get:function(){return s7.serializeOne(this,{nodeType:0})},set:X0.nyi},ELEMENT_NODE:{value:d0},ATTRIBUTE_NODE:{value:W$},TEXT_NODE:{value:g6},CDATA_SECTION_NODE:{value:$W},ENTITY_REFERENCE_NODE:{value:ZW},ENTITY_NODE:{value:V$},PROCESSING_INSTRUCTION_NODE:{value:o7},COMMENT_NODE:{value:n7},DOCUMENT_NODE:{value:g8},DOCUMENT_TYPE_NODE:{value:Z1},DOCUMENT_FRAGMENT_NODE:{value:f1},NOTATION_NODE:{value:J$},DOCUMENT_POSITION_DISCONNECTED:{value:_$},DOCUMENT_POSITION_PRECEDING:{value:B$},DOCUMENT_POSITION_FOLLOWING:{value:H$},DOCUMENT_POSITION_CONTAINS:{value:r7},DOCUMENT_POSITION_CONTAINED_BY:{value:q$},DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:{value:j$}})});var $Y=N((UB,e7)=>{e7.exports=class $ extends Array{constructor(Z){super(Z&&Z.length||0);if(Z)for(var Y in Z)this[Y]=Z[Y]}item(Z){return this[Z]||null}}});var YY=N((AB,ZY)=>{function YW($){return this[$]||null}function zW($){if(!$)$=[];return $.item=YW,$}ZY.exports=zW});var r1=N((PB,zY)=>{var K$;try{K$=$Y()}catch($){K$=YY()}zY.exports=K$});var v6=N((TB,GY)=>{GY.exports=QY;var XY=N0(),XW=r1();function QY(){XY.call(this),this._firstChild=this._childNodes=null}QY.prototype=Object.create(XY.prototype,{hasChildNodes:{value:function(){if(this._childNodes)return this._childNodes.length>0;return this._firstChild!==null}},childNodes:{get:function(){return this._ensureChildNodes(),this._childNodes}},firstChild:{get:function(){if(this._childNodes)return this._childNodes.length===0?null:this._childNodes[0];return this._firstChild}},lastChild:{get:function(){var $=this._childNodes,Z;if($)return $.length===0?null:$[$.length-1];if(Z=this._firstChild,Z===null)return null;return Z._previousSibling}},_ensureChildNodes:{value:function(){if(this._childNodes)return;var $=this._firstChild,Z=$,Y=this._childNodes=new XW;if($)do Y.push(Z),Z=Z._nextSibling;while(Z!==$);this._firstChild=null}},removeChildren:{value:function $(){var Z=this.rooted?this.ownerDocument:null,Y=this.firstChild,z;while(Y!==null){if(z=Y,Y=z.nextSibling,Z)Z.mutateRemove(z);z.parentNode=null}if(this._childNodes)this._childNodes.length=0;else this._firstChild=null;this.modify()}}})});var p6=N((qW)=>{qW.isValidName=BW;qW.isValidQName=HW;var QW=/^[_:A-Za-z][-.:\w]+$/,GW=/^([_A-Za-z][-.\w]+|[_A-Za-z][-.\w]+:[_A-Za-z][-.\w]+)$/,v8="_A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",p8="-._A-Za-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0300-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",a1="["+v8+"]["+p8+"]*",F$=v8+":",D$=p8+":",WW=new RegExp("^["+F$+"]["+D$+"]*$"),VW=new RegExp("^("+a1+"|"+a1+":"+a1+")$"),WY=/[\uD800-\uDB7F\uDC00-\uDFFF]/,VY=/[\uD800-\uDB7F\uDC00-\uDFFF]/g,JY=/[\uD800-\uDB7F][\uDC00-\uDFFF]/g;v8+="\uD800-\uDB7F\uDC00-\uDFFF";p8+="\uD800-\uDB7F\uDC00-\uDFFF";a1="["+v8+"]["+p8+"]*";F$=v8+":";D$=p8+":";var JW=new RegExp("^["+F$+"]["+D$+"]*$"),_W=new RegExp("^("+a1+"|"+a1+":"+a1+")$");function BW($){if(QW.test($))return!0;if(WW.test($))return!0;if(!WY.test($))return!1;if(!JW.test($))return!1;var Z=$.match(VY),Y=$.match(JY);return Y!==null&&2*Y.length===Z.length}function HW($){if(GW.test($))return!0;if(VW.test($))return!0;if(!WY.test($))return!1;if(!_W.test($))return!1;var Z=$.match(VY),Y=$.match(JY);return Y!==null&&2*Y.length===Z.length}});var O$=N((DW)=>{var _Y=K0();DW.property=function($){if(Array.isArray($.type)){var Z=Object.create(null);$.type.forEach(function(X){Z[X.value||X]=X.alias||X});var Y=$.missing;if(Y===void 0)Y=null;var z=$.invalid;if(z===void 0)z=Y;return{get:function(){var X=this._getattr($.name);if(X===null)return Y;if(X=Z[X.toLowerCase()],X!==void 0)return X;if(z!==null)return z;return X},set:function(X){this._setattr($.name,X)}}}else if($.type===Boolean)return{get:function(){return this.hasAttribute($.name)},set:function(X){if(X)this._setattr($.name,"");else this.removeAttribute($.name)}};else if($.type===Number||$.type==="long"||$.type==="unsigned long"||$.type==="limited unsigned long with fallback")return FW($);else if(!$.type||$.type===String)return{get:function(){return this._getattr($.name)||""},set:function(X){if($.treatNullAsEmptyString&&X===null)X="";this._setattr($.name,X)}};else if(typeof $.type==="function")return $.type($.name,$);throw new Error("Invalid attribute definition")};function FW($){var Z;if(typeof $.default==="function")Z=$.default;else if(typeof $.default==="number")Z=function(){return $.default};else Z=function(){_Y.assert(!1,typeof $.default)};var Y=$.type==="unsigned long",z=$.type==="long",X=$.type==="limited unsigned long with fallback",Q=$.min,G=$.max,J=$.setmin;if(Q===void 0){if(Y)Q=0;if(z)Q=-2147483648;if(X)Q=1}if(G===void 0){if(Y||z||X)G=2147483647}return{get:function(){var _=this._getattr($.name),H=$.float?parseFloat(_):parseInt(_,10);if(_===null||!isFinite(H)||Q!==void 0&&H<Q||G!==void 0&&H>G)return Z.call(this);if(Y||z||X){if(!/^[ \t\n\f\r]*[-+]?[0-9]/.test(_))return Z.call(this);H=H|0}return H},set:function(_){if(!$.float)_=Math.floor(_);if(J!==void 0&&_<J)_Y.IndexSizeError($.name+" set to "+_);if(Y)_=_<0||_>2147483647?Z.call(this):_|0;else if(X)_=_<1||_>2147483647?Z.call(this):_|0;else if(z)_=_<-2147483648||_>2147483647?Z.call(this):_|0;this._setattr($.name,String(_))}}}DW.registerChangeHandler=function($,Z,Y){var z=$.prototype;if(!Object.prototype.hasOwnProperty.call(z,"_attributeChangeHandlers"))z._attributeChangeHandlers=Object.create(z._attributeChangeHandlers||null);z._attributeChangeHandlers[Z]=Y}});var qY=N((EB,HY)=>{HY.exports=BY;var SW=N0();function BY($,Z){this.root=$,this.filter=Z,this.lastModTime=$.lastModTime,this.done=!1,this.cache=[],this.traverse()}BY.prototype=Object.create(Object.prototype,{length:{get:function(){if(this.checkcache(),!this.done)this.traverse();return this.cache.length}},item:{value:function($){if(this.checkcache(),!this.done&&$>=this.cache.length)this.traverse();return this.cache[$]}},checkcache:{value:function(){if(this.lastModTime!==this.root.lastModTime){for(var $=this.cache.length-1;$>=0;$--)this[$]=void 0;this.cache.length=0,this.done=!1,this.lastModTime=this.root.lastModTime}}},traverse:{value:function($){if($!==void 0)$++;var Z;while((Z=this.next())!==null)if(this[this.cache.length]=Z,this.cache.push(Z),$&&this.cache.length===$)return;this.done=!0}},next:{value:function(){var $=this.cache.length===0?this.root:this.cache[this.cache.length-1],Z;if($.nodeType===SW.DOCUMENT_NODE)Z=$.documentElement;else Z=$.nextElement(this.root);while(Z){if(this.filter(Z))return Z;Z=Z.nextElement(this.root)}return null}}})});var S$=N((NB,FY)=>{var M$=K0();FY.exports=KY;function KY($,Z){this._getString=$,this._setString=Z,this._length=0,this._lastStringValue="",this._update()}Object.defineProperties(KY.prototype,{length:{get:function(){return this._length}},item:{value:function($){var Z=V8(this);if($<0||$>=Z.length)return null;return Z[$]}},contains:{value:function($){$=String($);var Z=V8(this);return Z.indexOf($)>-1}},add:{value:function(){var $=V8(this);for(var Z=0,Y=arguments.length;Z<Y;Z++){var z=m8(arguments[Z]);if($.indexOf(z)<0)$.push(z)}this._update($)}},remove:{value:function(){var $=V8(this);for(var Z=0,Y=arguments.length;Z<Y;Z++){var z=m8(arguments[Z]),X=$.indexOf(z);if(X>-1)$.splice(X,1)}this._update($)}},toggle:{value:function $(Z,Y){if(Z=m8(Z),this.contains(Z)){if(Y===void 0||Y===!1)return this.remove(Z),!1;return!0}else{if(Y===void 0||Y===!0)return this.add(Z),!0;return!1}}},replace:{value:function $(Z,Y){if(String(Y)==="")M$.SyntaxError();Z=m8(Z),Y=m8(Y);var z=V8(this),X=z.indexOf(Z);if(X<0)return!1;var Q=z.indexOf(Y);if(Q<0)z[X]=Y;else if(X<Q)z[X]=Y,z.splice(Q,1);else z.splice(X,1);return this._update(z),!0}},toString:{value:function(){return this._getString()}},value:{get:function(){return this._getString()},set:function($){this._setString($),this._update()}},_update:{value:function($){if($)jY(this,$),this._setString($.join(" ").trim());else jY(this,V8(this));this._lastStringValue=this._getString()}}});function jY($,Z){var Y=$._length,z;$._length=Z.length;for(z=0;z<Z.length;z++)$[z]=Z[z];for(;z<Y;z++)$[z]=void 0}function m8($){if($=String($),$==="")M$.SyntaxError();if(/[ \t\r\n\f]/.test($))M$.InvalidCharacterError();return $}function LW($){var Z=$._length,Y=Array(Z);for(var z=0;z<Z;z++)Y[z]=$[z];return Y}function V8($){var Z=$._getString();if(Z===$._lastStringValue)return LW($);var Y=Z.replace(/(^[ \t\r\n\f]+)|([ \t\r\n\f]+$)/g,"");if(Y==="")return[];else{var z=Object.create(null);return Y.split(/[ \t\r\n\f]+/g).filter(function(X){var Q="$"+X;if(z[Q])return!1;return z[Q]=!0,!0})}}});var c6=N((B8,IY)=>{var m6=Object.create(null,{location:{get:function(){throw new Error("window.location is not supported.")}}}),IW=function($,Z){return $.compareDocumentPosition(Z)},UW=function($,Z){return IW($,Z)&2?1:-1},d6=function($){while(($=$.nextSibling)&&$.nodeType!==1);return $},_8=function($){while(($=$.previousSibling)&&$.nodeType!==1);return $},AW=function($){if($=$.firstChild)while($.nodeType!==1&&($=$.nextSibling));return $},PW=function($){if($=$.lastChild)while($.nodeType!==1&&($=$.previousSibling));return $},J8=function($){if(!$.parentNode)return!1;var Z=$.parentNode.nodeType;return Z===1||Z===9},DY=function($){if(!$)return $;var Z=$[0];if(Z==='"'||Z==="'"){if($[$.length-1]===Z)$=$.slice(1,-1);else $=$.slice(1);return $.replace(v.str_escape,function(Y){var z=/^\\(?:([0-9A-Fa-f]+)|([\r\n\f]+))/.exec(Y);if(!z)return Y.slice(1);if(z[2])return"";var X=parseInt(z[1],16);return String.fromCodePoint?String.fromCodePoint(X):String.fromCharCode(X)})}else if(v.ident.test($))return h1($);else return $},h1=function($){return $.replace(v.escape,function(Z){var Y=/^\\([0-9A-Fa-f]+)/.exec(Z);if(!Y)return Z[1];var z=parseInt(Y[1],16);return String.fromCodePoint?String.fromCodePoint(z):String.fromCharCode(z)})},TW=function(){if(Array.prototype.indexOf)return Array.prototype.indexOf;return function($,Z){var Y=this.length;while(Y--)if(this[Y]===Z)return Y;return-1}}(),MY=function($,Z){var Y=v.inside.source.replace(/</g,$).replace(/>/g,Z);return new RegExp(Y)},c0=function($,Z,Y){return $=$.source,$=$.replace(Z,Y.source||Y),new RegExp($)},OY=function($,Z){return $.replace(/^(?:\w+:\/\/|\/+)/,"").replace(/(?:\/+|\/*#.*?)$/,"").split("/",Z).join("/")},RW=function($,Z){var Y=$.replace(/\s+/g,""),z;if(Y==="even")Y="2n+0";else if(Y==="odd")Y="2n+1";else if(Y.indexOf("n")===-1)Y="0n"+Y;return z=/^([+-])?(\d+)?n([+-])?(\d+)?$/.exec(Y),{group:z[1]==="-"?-(z[2]||1):+(z[2]||1),offset:z[4]?z[3]==="-"?-z[4]:+z[4]:0}},L$=function($,Z,Y){var z=RW($),X=z.group,Q=z.offset,G=!Y?AW:PW,J=!Y?d6:_8;return function(_){if(!J8(_))return;var H=G(_.parentNode),q=0;while(H){if(Z(H,_))q++;if(H===_)return q-=Q,X&&q?q%X===0&&q<0===X<0:!q;H=J(H)}}},T0={"*":function(){return function(){return!0}}(),type:function($){return $=$.toLowerCase(),function(Z){return Z.nodeName.toLowerCase()===$}},attr:function($,Z,Y,z){return Z=SY[Z],function(X){var Q;switch($){case"for":Q=X.htmlFor;break;case"class":if(Q=X.className,Q===""&&X.getAttribute("class")==null)Q=null;break;case"href":case"src":Q=X.getAttribute($,2);break;case"title":Q=X.getAttribute("title")||null;break;case"id":case"lang":case"dir":case"accessKey":case"hidden":case"tabIndex":case"style":if(X.getAttribute){Q=X.getAttribute($);break}default:if(X.hasAttribute&&!X.hasAttribute($))break;Q=X[$]!=null?X[$]:X.getAttribute&&X.getAttribute($);break}if(Q==null)return;if(Q=Q+"",z)Q=Q.toLowerCase(),Y=Y.toLowerCase();return Z(Q,Y)}},":first-child":function($){return!_8($)&&J8($)},":last-child":function($){return!d6($)&&J8($)},":only-child":function($){return!_8($)&&!d6($)&&J8($)},":nth-child":function($,Z){return L$($,function(){return!0},Z)},":nth-last-child":function($){return T0[":nth-child"]($,!0)},":root":function($){return $.ownerDocument.documentElement===$},":empty":function($){return!$.firstChild},":not":function($){var Z=U$($);return function(Y){return!Z(Y)}},":first-of-type":function($){if(!J8($))return;var Z=$.nodeName;while($=_8($))if($.nodeName===Z)return;return!0},":last-of-type":function($){if(!J8($))return;var Z=$.nodeName;while($=d6($))if($.nodeName===Z)return;return!0},":only-of-type":function($){return T0[":first-of-type"]($)&&T0[":last-of-type"]($)},":nth-of-type":function($,Z){return L$($,function(Y,z){return Y.nodeName===z.nodeName},Z)},":nth-last-of-type":function($){return T0[":nth-of-type"]($,!0)},":checked":function($){return!!($.checked||$.selected)},":indeterminate":function($){return!T0[":checked"]($)},":enabled":function($){return!$.disabled&&$.type!=="hidden"},":disabled":function($){return!!$.disabled},":target":function($){return $.id===m6.location.hash.substring(1)},":focus":function($){return $===$.ownerDocument.activeElement},":is":function($){return U$($)},":matches":function($){return T0[":is"]($)},":nth-match":function($,Z){var Y=$.split(/\s*,\s*/),z=Y.shift(),X=U$(Y.join(","));return L$(z,X,Z)},":nth-last-match":function($){return T0[":nth-match"]($,!0)},":links-here":function($){return $+""===m6.location+""},":lang":function($){return function(Z){while(Z){if(Z.lang)return Z.lang.indexOf($)===0;Z=Z.parentNode}}},":dir":function($){return function(Z){while(Z){if(Z.dir)return Z.dir===$;Z=Z.parentNode}}},":scope":function($,Z){var Y=Z||$.ownerDocument;if(Y.nodeType===9)return $===Y.documentElement;return $===Y},":any-link":function($){return typeof $.href==="string"},":local-link":function($){if($.nodeName)return $.href&&$.host===m6.location.host;var Z=+$+1;return function(Y){if(!Y.href)return;var z=m6.location+"",X=Y+"";return OY(z,Z)===OY(X,Z)}},":default":function($){return!!$.defaultSelected},":valid":function($){return $.willValidate||$.validity&&$.validity.valid},":invalid":function($){return!T0[":valid"]($)},":in-range":function($){return $.value>$.min&&$.value<=$.max},":out-of-range":function($){return!T0[":in-range"]($)},":required":function($){return!!$.required},":optional":function($){return!$.required},":read-only":function($){if($.readOnly)return!0;var Z=$.getAttribute("contenteditable"),Y=$.contentEditable,z=$.nodeName.toLowerCase();return z=z!=="input"&&z!=="textarea",(z||$.disabled)&&Z==null&&Y!=="true"},":read-write":function($){return!T0[":read-only"]($)},":hover":function(){throw new Error(":hover is not supported.")},":active":function(){throw new Error(":active is not supported.")},":link":function(){throw new Error(":link is not supported.")},":visited":function(){throw new Error(":visited is not supported.")},":column":function(){throw new Error(":column is not supported.")},":nth-column":function(){throw new Error(":nth-column is not supported.")},":nth-last-column":function(){throw new Error(":nth-last-column is not supported.")},":current":function(){throw new Error(":current is not supported.")},":past":function(){throw new Error(":past is not supported.")},":future":function(){throw new Error(":future is not supported.")},":contains":function($){return function(Z){var Y=Z.innerText||Z.textContent||Z.value||"";return Y.indexOf($)!==-1}},":has":function($){return function(Z){return LY($,Z).length>0}}},SY={"-":function(){return!0},"=":function($,Z){return $===Z},"*=":function($,Z){return $.indexOf(Z)!==-1},"~=":function($,Z){var Y,z,X,Q;for(z=0;;z=Y+1){if(Y=$.indexOf(Z,z),Y===-1)return!1;if(X=$[Y-1],Q=$[Y+Z.length],(!X||X===" ")&&(!Q||Q===" "))return!0}},"|=":function($,Z){var Y=$.indexOf(Z),z;if(Y!==0)return;return z=$[Y+Z.length],z==="-"||!z},"^=":function($,Z){return $.indexOf(Z)===0},"$=":function($,Z){var Y=$.lastIndexOf(Z);return Y!==-1&&Y+Z.length===$.length},"!=":function($,Z){return $!==Z}},u8={" ":function($){return function(Z){while(Z=Z.parentNode)if($(Z))return Z}},">":function($){return function(Z){if(Z=Z.parentNode)return $(Z)&&Z}},"+":function($){return function(Z){if(Z=_8(Z))return $(Z)&&Z}},"~":function($){return function(Z){while(Z=_8(Z))if($(Z))return Z}},noop:function($){return function(Z){return $(Z)&&Z}},ref:function($,Z){var Y;function z(X){var Q=X.ownerDocument,G=Q.getElementsByTagName("*"),J=G.length;while(J--)if(Y=G[J],z.test(X))return Y=null,!0;Y=null}return z.combinator=function(X){if(!Y||!Y.getAttribute)return;var Q=Y.getAttribute(Z)||"";if(Q[0]==="#")Q=Q.substring(1);if(Q===X.id&&$(Y))return Y},z}},v={escape:/\\(?:[^0-9A-Fa-f\r\n]|[0-9A-Fa-f]{1,6}[\r\n\t ]?)/g,str_escape:/(escape)|\\(\n|\r\n?|\f)/g,nonascii:/[\u00A0-\uFFFF]/,cssid:/(?:(?!-?[0-9])(?:escape|nonascii|[-_a-zA-Z0-9])+)/,qname:/^ *(cssid|\*)/,simple:/^(?:([.#]cssid)|pseudo|attr)/,ref:/^ *\/(cssid)\/ */,combinator:/^(?: +([^ \w*.#\\]) +|( )+|([^ \w*.#\\]))(?! *$)/,attr:/^\[(cssid)(?:([^\w]?=)(inside))?\]/,pseudo:/^(:cssid)(?:\((inside)\))?/,inside:/(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|<[^"'>]*>|\\["'>]|[^"'>])*/,ident:/^(cssid)$/};v.cssid=c0(v.cssid,"nonascii",v.nonascii);v.cssid=c0(v.cssid,"escape",v.escape);v.qname=c0(v.qname,"cssid",v.cssid);v.simple=c0(v.simple,"cssid",v.cssid);v.ref=c0(v.ref,"cssid",v.cssid);v.attr=c0(v.attr,"cssid",v.cssid);v.pseudo=c0(v.pseudo,"cssid",v.cssid);v.inside=c0(v.inside,`[^"'>]*`,v.inside);v.attr=c0(v.attr,"inside",MY("\\[","\\]"));v.pseudo=c0(v.pseudo,"inside",MY("\\(","\\)"));v.simple=c0(v.simple,"pseudo",v.pseudo);v.simple=c0(v.simple,"attr",v.attr);v.ident=c0(v.ident,"cssid",v.cssid);v.str_escape=c0(v.str_escape,"escape",v.escape);var d8=function($){var Z=$.replace(/^\s+|\s+$/g,""),Y,z=[],X=[],Q,G,J,_,H;while(Z){if(J=v.qname.exec(Z))Z=Z.substring(J[0].length),G=h1(J[1]),X.push(u6(G,!0));else if(J=v.simple.exec(Z))Z=Z.substring(J[0].length),G="*",X.push(u6(G,!0)),X.push(u6(J));else throw new SyntaxError("Invalid selector.");while(J=v.simple.exec(Z))Z=Z.substring(J[0].length),X.push(u6(J));if(Z[0]==="!")Z=Z.substring(1),Q=EW(),Q.qname=G,X.push(Q.simple);if(J=v.ref.exec(Z)){Z=Z.substring(J[0].length),H=u8.ref(I$(X),h1(J[1])),z.push(H.combinator),X=[];continue}if(J=v.combinator.exec(Z)){if(Z=Z.substring(J[0].length),_=J[1]||J[2]||J[3],_===","){z.push(u8.noop(I$(X)));break}}else _="noop";if(!u8[_])throw new SyntaxError("Bad combinator.");z.push(u8[_](I$(X))),X=[]}if(Y=CW(z),Y.qname=G,Y.sel=Z,Q)Q.lname=Y.qname,Q.test=Y,Q.qname=Q.qname,Q.sel=Y.sel,Y=Q;if(H)H.test=Y,H.qname=Y.qname,H.sel=Y.sel,Y=H;return Y},u6=function($,Z){if(Z)return $==="*"?T0["*"]:T0.type($);if($[1])return $[1][0]==="."?T0.attr("class","~=",h1($[1].substring(1)),!1):T0.attr("id","=",h1($[1].substring(1)),!1);if($[2])return $[3]?T0[h1($[2])](DY($[3])):T0[h1($[2])];if($[4]){var Y=$[6],z=/["'\s]\s*I$/i.test(Y);if(z)Y=Y.replace(/\s*I$/i,"");return T0.attr(h1($[4]),$[5]||"-",DY(Y),z)}throw new SyntaxError("Unknown Selector.")},I$=function($){var Z=$.length,Y;if(Z<2)return $[0];return function(z){if(!z)return;for(Y=0;Y<Z;Y++)if(!$[Y](z))return;return!0}},CW=function($){if($.length<2)return function(Z){return!!$[0](Z)};return function(Z){var Y=$.length;while(Y--)if(!(Z=$[Y](Z)))return;return!0}},EW=function(){var $;function Z(Y){var z=Y.ownerDocument,X=z.getElementsByTagName(Z.lname),Q=X.length;while(Q--)if(Z.test(X[Q])&&$===Y)return $=null,!0;$=null}return Z.simple=function(Y){return $=Y,!0},Z},U$=function($){var Z=d8($),Y=[Z];while(Z.sel)Z=d8(Z.sel),Y.push(Z);if(Y.length<2)return Z;return function(z){var X=Y.length,Q=0;for(;Q<X;Q++)if(Y[Q](z))return!0}},LY=function($,Z){var Y=[],z=d8($),X=Z.getElementsByTagName(z.qname),Q=0,G;while(G=X[Q++])if(z(G))Y.push(G);if(z.sel){while(z.sel){z=d8(z.sel),X=Z.getElementsByTagName(z.qname),Q=0;while(G=X[Q++])if(z(G)&&TW.call(Y,G)===-1)Y.push(G)}Y.sort(UW)}return Y};IY.exports=B8=function($,Z){var Y,z;if(Z.nodeType!==11&&$.indexOf(" ")===-1){if($[0]==="#"&&Z.rooted&&/^#[A-Z_][-A-Z0-9_]*$/i.test($)){if(Z.doc._hasMultipleElementsWithId){if(Y=$.substring(1),!Z.doc._hasMultipleElementsWithId(Y))return z=Z.doc.getElementById(Y),z?[z]:[]}}if($[0]==="."&&/^\.\w+$/.test($))return Z.getElementsByClassName($.substring(1));if(/^\w+$/.test($))return Z.getElementsByTagName($)}return LY($,Z)};B8.selectors=T0;B8.operators=SY;B8.combinators=u8;B8.matches=function($,Z){var Y={sel:Z};do if(Y=d8(Y.sel),Y($))return!0;while(Y.sel);return!1}});var l6=N((wB,UY)=>{var NW=N0(),wW=Q$(),A$=function($,Z){var Y=$.createDocumentFragment();for(var z=0;z<Z.length;z++){var X=Z[z],Q=X instanceof NW;Y.appendChild(Q?X:$.createTextNode(String(X)))}return Y},bW={after:{value:function $(){var Z=Array.prototype.slice.call(arguments),Y=this.parentNode,z=this.nextSibling;if(Y===null)return;while(z&&Z.some(function(Q){return Q===z}))z=z.nextSibling;var X=A$(this.doc,Z);Y.insertBefore(X,z)}},before:{value:function $(){var Z=Array.prototype.slice.call(arguments),Y=this.parentNode,z=this.previousSibling;if(Y===null)return;while(z&&Z.some(function(G){return G===z}))z=z.previousSibling;var X=A$(this.doc,Z),Q=z?z.nextSibling:Y.firstChild;Y.insertBefore(X,Q)}},remove:{value:function $(){if(this.parentNode===null)return;if(this.doc){if(this.doc._preremoveNodeIterators(this),this.rooted)this.doc.mutateRemove(this)}this._remove(),this.parentNode=null}},_remove:{value:function $(){var Z=this.parentNode;if(Z===null)return;if(Z._childNodes)Z._childNodes.splice(this.index,1);else if(Z._firstChild===this)if(this._nextSibling===this)Z._firstChild=null;else Z._firstChild=this._nextSibling;wW.remove(this),Z.modify()}},replaceWith:{value:function $(){var Z=Array.prototype.slice.call(arguments),Y=this.parentNode,z=this.nextSibling;if(Y===null)return;while(z&&Z.some(function(Q){return Q===z}))z=z.nextSibling;var X=A$(this.doc,Z);if(this.parentNode===Y)Y.replaceChild(X,this);else Y.insertBefore(X,z)}}};UY.exports=bW});var P$=N((bB,PY)=>{var AY=N0(),xW={nextElementSibling:{get:function(){if(this.parentNode){for(var $=this.nextSibling;$!==null;$=$.nextSibling)if($.nodeType===AY.ELEMENT_NODE)return $}return null}},previousElementSibling:{get:function(){if(this.parentNode){for(var $=this.previousSibling;$!==null;$=$.previousSibling)if($.nodeType===AY.ELEMENT_NODE)return $}return null}}};PY.exports=xW});var T$=N((xB,RY)=>{RY.exports=TY;var H8=K0();function TY($){this.element=$}Object.defineProperties(TY.prototype,{length:{get:H8.shouldOverride},item:{value:H8.shouldOverride},getNamedItem:{value:function $(Z){return this.element.getAttributeNode(Z)}},getNamedItemNS:{value:function $(Z,Y){return this.element.getAttributeNodeNS(Z,Y)}},setNamedItem:{value:H8.nyi},setNamedItemNS:{value:H8.nyi},removeNamedItem:{value:function $(Z){var Y=this.element.getAttributeNode(Z);if(Y)return this.element.removeAttribute(Z),Y;H8.NotFoundError()}},removeNamedItemNS:{value:function $(Z,Y){var z=this.element.getAttributeNodeNS(Z,Y);if(z)return this.element.removeAttributeNS(Z,Y),z;H8.NotFoundError()}}})});var j8=N((yB,bY)=>{bY.exports=g1;var R$=p6(),H0=K0(),j1=H0.NAMESPACE,s6=O$(),Q1=N0(),C$=r1(),yW=G$(),i6=qY(),q8=k6(),kW=S$(),E$=c6(),EY=v6(),fW=l6(),hW=P$(),NY=T$(),CY=Object.create(null);function g1($,Z,Y,z){EY.call(this),this.nodeType=Q1.ELEMENT_NODE,this.ownerDocument=$,this.localName=Z,this.namespaceURI=Y,this.prefix=z,this._tagName=void 0,this._attrsByQName=Object.create(null),this._attrsByLName=Object.create(null),this._attrKeys=[]}function N$($,Z){if($.nodeType===Q1.TEXT_NODE)Z.push($._data);else for(var Y=0,z=$.childNodes.length;Y<z;Y++)N$($.childNodes[Y],Z)}g1.prototype=Object.create(EY.prototype,{isHTML:{get:function $(){return this.namespaceURI===j1.HTML&&this.ownerDocument.isHTML}},tagName:{get:function $(){if(this._tagName===void 0){var Z;if(this.prefix===null)Z=this.localName;else Z=this.prefix+":"+this.localName;if(this.isHTML){var Y=CY[Z];if(!Y)CY[Z]=Y=H0.toASCIIUpperCase(Z);Z=Y}this._tagName=Z}return this._tagName}},nodeName:{get:function(){return this.tagName}},nodeValue:{get:function(){return null},set:function(){}},textContent:{get:function(){var $=[];return N$(this,$),$.join("")},set:function($){if(this.removeChildren(),$!==null&&$!==void 0&&$!=="")this._appendChild(this.ownerDocument.createTextNode($))}},innerText:{get:function(){var $=[];return N$(this,$),$.join("").replace(/[ \t\n\f\r]+/g," ").trim()},set:function($){if(this.removeChildren(),$!==null&&$!==void 0&&$!=="")this._appendChild(this.ownerDocument.createTextNode($))}},innerHTML:{get:function(){return this.serialize()},set:H0.nyi},outerHTML:{get:function(){return yW.serializeOne(this,{nodeType:0})},set:function($){var Z=this.ownerDocument,Y=this.parentNode;if(Y===null)return;if(Y.nodeType===Q1.DOCUMENT_NODE)H0.NoModificationAllowedError();if(Y.nodeType===Q1.DOCUMENT_FRAGMENT_NODE)Y=Y.ownerDocument.createElement("body");var z=Z.implementation.mozHTMLParser(Z._address,Y);z.parse($===null?"":String($),!0),this.replaceWith(z._asDocumentFragment())}},_insertAdjacent:{value:function $(Z,Y){var z=!1;switch(Z){case"beforebegin":z=!0;case"afterend":var X=this.parentNode;if(X===null)return null;return X.insertBefore(Y,z?this:this.nextSibling);case"afterbegin":z=!0;case"beforeend":return this.insertBefore(Y,z?this.firstChild:null);default:return H0.SyntaxError()}}},insertAdjacentElement:{value:function $(Z,Y){if(Y.nodeType!==Q1.ELEMENT_NODE)throw new TypeError("not an element");return Z=H0.toASCIILowerCase(String(Z)),this._insertAdjacent(Z,Y)}},insertAdjacentText:{value:function $(Z,Y){var z=this.ownerDocument.createTextNode(Y);Z=H0.toASCIILowerCase(String(Z)),this._insertAdjacent(Z,z)}},insertAdjacentHTML:{value:function $(Z,Y){Z=H0.toASCIILowerCase(String(Z)),Y=String(Y);var z;switch(Z){case"beforebegin":case"afterend":if(z=this.parentNode,z===null||z.nodeType===Q1.DOCUMENT_NODE)H0.NoModificationAllowedError();break;case"afterbegin":case"beforeend":z=this;break;default:H0.SyntaxError()}if(!(z instanceof g1)||z.ownerDocument.isHTML&&z.localName==="html"&&z.namespaceURI===j1.HTML)z=z.ownerDocument.createElementNS(j1.HTML,"body");var X=this.ownerDocument.implementation.mozHTMLParser(this.ownerDocument._address,z);X.parse(Y,!0),this._insertAdjacent(Z,X._asDocumentFragment())}},children:{get:function(){if(!this._children)this._children=new wY(this);return this._children}},attributes:{get:function(){if(!this._attributes)this._attributes=new b$(this);return this._attributes}},firstElementChild:{get:function(){for(var $=this.firstChild;$!==null;$=$.nextSibling)if($.nodeType===Q1.ELEMENT_NODE)return $;return null}},lastElementChild:{get:function(){for(var $=this.lastChild;$!==null;$=$.previousSibling)if($.nodeType===Q1.ELEMENT_NODE)return $;return null}},childElementCount:{get:function(){return this.children.length}},nextElement:{value:function($){if(!$)$=this.ownerDocument.documentElement;var Z=this.firstElementChild;if(!Z){if(this===$)return null;Z=this.nextElementSibling}if(Z)return Z;for(var Y=this.parentElement;Y&&Y!==$;Y=Y.parentElement)if(Z=Y.nextElementSibling,Z)return Z;return null}},getElementsByTagName:{value:function $(Z){var Y;if(!Z)return new C$;if(Z==="*")Y=function(){return!0};else if(this.isHTML)Y=gW(Z);else Y=w$(Z);return new i6(this,Y)}},getElementsByTagNameNS:{value:function $(Z,Y){var z;if(Z==="*"&&Y==="*")z=function(){return!0};else if(Z==="*")z=w$(Y);else if(Y==="*")z=vW(Z);else z=pW(Z,Y);return new i6(this,z)}},getElementsByClassName:{value:function $(Z){if(Z=String(Z).trim(),Z===""){var Y=new C$;return Y}return Z=Z.split(/[ \t\r\n\f]+/),new i6(this,mW(Z))}},getElementsByName:{value:function $(Z){return new i6(this,uW(String(Z)))}},clone:{value:function $(){var Z;if(this.namespaceURI!==j1.HTML||this.prefix||!this.ownerDocument.isHTML)Z=this.ownerDocument.createElementNS(this.namespaceURI,this.prefix!==null?this.prefix+":"+this.localName:this.localName);else Z=this.ownerDocument.createElement(this.localName);for(var Y=0,z=this._attrKeys.length;Y<z;Y++){var X=this._attrKeys[Y],Q=this._attrsByLName[X],G=Q.cloneNode();G._setOwnerElement(Z),Z._attrsByLName[X]=G,Z._addQName(G)}return Z._attrKeys=this._attrKeys.concat(),Z}},isEqual:{value:function $(Z){if(this.localName!==Z.localName||this.namespaceURI!==Z.namespaceURI||this.prefix!==Z.prefix||this._numattrs!==Z._numattrs)return!1;for(var Y=0,z=this._numattrs;Y<z;Y++){var X=this._attr(Y);if(!Z.hasAttributeNS(X.namespaceURI,X.localName))return!1;if(Z.getAttributeNS(X.namespaceURI,X.localName)!==X.value)return!1}return!0}},_lookupNamespacePrefix:{value:function $(Z,Y){if(this.namespaceURI&&this.namespaceURI===Z&&this.prefix!==null&&Y.lookupNamespaceURI(this.prefix)===Z)return this.prefix;for(var z=0,X=this._numattrs;z<X;z++){var Q=this._attr(z);if(Q.prefix==="xmlns"&&Q.value===Z&&Y.lookupNamespaceURI(Q.localName)===Z)return Q.localName}var G=this.parentElement;return G?G._lookupNamespacePrefix(Z,Y):null}},lookupNamespaceURI:{value:function $(Z){if(Z===""||Z===void 0)Z=null;if(this.namespaceURI!==null&&this.prefix===Z)return this.namespaceURI;for(var Y=0,z=this._numattrs;Y<z;Y++){var X=this._attr(Y);if(X.namespaceURI===j1.XMLNS){if(X.prefix==="xmlns"&&X.localName===Z||Z===null&&X.prefix===null&&X.localName==="xmlns")return X.value||null}}var Q=this.parentElement;return Q?Q.lookupNamespaceURI(Z):null}},getAttribute:{value:function $(Z){var Y=this.getAttributeNode(Z);return Y?Y.value:null}},getAttributeNS:{value:function $(Z,Y){var z=this.getAttributeNodeNS(Z,Y);return z?z.value:null}},getAttributeNode:{value:function $(Z){if(Z=String(Z),/[A-Z]/.test(Z)&&this.isHTML)Z=H0.toASCIILowerCase(Z);var Y=this._attrsByQName[Z];if(!Y)return null;if(Array.isArray(Y))Y=Y[0];return Y}},getAttributeNodeNS:{value:function $(Z,Y){Z=Z===void 0||Z===null?"":String(Z),Y=String(Y);var z=this._attrsByLName[Z+"|"+Y];return z?z:null}},hasAttribute:{value:function $(Z){if(Z=String(Z),/[A-Z]/.test(Z)&&this.isHTML)Z=H0.toASCIILowerCase(Z);return this._attrsByQName[Z]!==void 0}},hasAttributeNS:{value:function $(Z,Y){Z=Z===void 0||Z===null?"":String(Z),Y=String(Y);var z=Z+"|"+Y;return this._attrsByLName[z]!==void 0}},hasAttributes:{value:function $(){return this._numattrs>0}},toggleAttribute:{value:function $(Z,Y){if(Z=String(Z),!R$.isValidName(Z))H0.InvalidCharacterError();if(/[A-Z]/.test(Z)&&this.isHTML)Z=H0.toASCIILowerCase(Z);var z=this._attrsByQName[Z];if(z===void 0){if(Y===void 0||Y===!0)return this._setAttribute(Z,""),!0;return!1}else{if(Y===void 0||Y===!1)return this.removeAttribute(Z),!1;return!0}}},_setAttribute:{value:function $(Z,Y){var z=this._attrsByQName[Z],X;if(!z)z=this._newattr(Z),X=!0;else if(Array.isArray(z))z=z[0];if(z.value=Y,this._attributes)this._attributes[Z]=z;if(X&&this._newattrhook)this._newattrhook(Z,Y)}},setAttribute:{value:function $(Z,Y){if(Z=String(Z),!R$.isValidName(Z))H0.InvalidCharacterError();if(/[A-Z]/.test(Z)&&this.isHTML)Z=H0.toASCIILowerCase(Z);this._setAttribute(Z,String(Y))}},_setAttributeNS:{value:function $(Z,Y,z){var X=Y.indexOf(":"),Q,G;if(X<0)Q=null,G=Y;else Q=Y.substring(0,X),G=Y.substring(X+1);if(Z===""||Z===void 0)Z=null;var J=(Z===null?"":Z)+"|"+G,_=this._attrsByLName[J],H;if(!_){if(_=new c8(this,G,Q,Z),H=!0,this._attrsByLName[J]=_,this._attributes)this._attributes[this._attrKeys.length]=_;this._attrKeys.push(J),this._addQName(_)}if(_.value=z,H&&this._newattrhook)this._newattrhook(Y,z)}},setAttributeNS:{value:function $(Z,Y,z){if(Z=Z===null||Z===void 0||Z===""?null:String(Z),Y=String(Y),!R$.isValidQName(Y))H0.InvalidCharacterError();var X=Y.indexOf(":"),Q=X<0?null:Y.substring(0,X);if(Q!==null&&Z===null||Q==="xml"&&Z!==j1.XML||(Y==="xmlns"||Q==="xmlns")&&Z!==j1.XMLNS||Z===j1.XMLNS&&!(Y==="xmlns"||Q==="xmlns"))H0.NamespaceError();this._setAttributeNS(Z,Y,String(z))}},setAttributeNode:{value:function $(Z){if(Z.ownerElement!==null&&Z.ownerElement!==this)throw new q8(q8.INUSE_ATTRIBUTE_ERR);var Y=null,z=this._attrsByQName[Z.name];if(z){if(!Array.isArray(z))z=[z];if(z.some(function(X){return X===Z}))return Z;else if(Z.ownerElement!==null)throw new q8(q8.INUSE_ATTRIBUTE_ERR);z.forEach(function(X){this.removeAttributeNode(X)},this),Y=z[0]}return this.setAttributeNodeNS(Z),Y}},setAttributeNodeNS:{value:function $(Z){if(Z.ownerElement!==null)throw new q8(q8.INUSE_ATTRIBUTE_ERR);var Y=Z.namespaceURI,z=(Y===null?"":Y)+"|"+Z.localName,X=this._attrsByLName[z];if(X)this.removeAttributeNode(X);if(Z._setOwnerElement(this),this._attrsByLName[z]=Z,this._attributes)this._attributes[this._attrKeys.length]=Z;if(this._attrKeys.push(z),this._addQName(Z),this._newattrhook)this._newattrhook(Z.name,Z.value);return X||null}},removeAttribute:{value:function $(Z){if(Z=String(Z),/[A-Z]/.test(Z)&&this.isHTML)Z=H0.toASCIILowerCase(Z);var Y=this._attrsByQName[Z];if(!Y)return;if(Array.isArray(Y))if(Y.length>2)Y=Y.shift();else this._attrsByQName[Z]=Y[1],Y=Y[0];else this._attrsByQName[Z]=void 0;var z=Y.namespaceURI,X=(z===null?"":z)+"|"+Y.localName;this._attrsByLName[X]=void 0;var Q=this._attrKeys.indexOf(X);if(this._attributes)Array.prototype.splice.call(this._attributes,Q,1),this._attributes[Z]=void 0;this._attrKeys.splice(Q,1);var G=Y.onchange;if(Y._setOwnerElement(null),G)G.call(Y,this,Y.localName,Y.value,null);if(this.rooted)this.ownerDocument.mutateRemoveAttr(Y)}},removeAttributeNS:{value:function $(Z,Y){Z=Z===void 0||Z===null?"":String(Z),Y=String(Y);var z=Z+"|"+Y,X=this._attrsByLName[z];if(!X)return;this._attrsByLName[z]=void 0;var Q=this._attrKeys.indexOf(z);if(this._attributes)Array.prototype.splice.call(this._attributes,Q,1);this._attrKeys.splice(Q,1),this._removeQName(X);var G=X.onchange;if(X._setOwnerElement(null),G)G.call(X,this,X.localName,X.value,null);if(this.rooted)this.ownerDocument.mutateRemoveAttr(X)}},removeAttributeNode:{value:function $(Z){var Y=Z.namespaceURI,z=(Y===null?"":Y)+"|"+Z.localName;if(this._attrsByLName[z]!==Z)H0.NotFoundError();return this.removeAttributeNS(Y,Z.localName),Z}},getAttributeNames:{value:function $(){var Z=this;return this._attrKeys.map(function(Y){return Z._attrsByLName[Y].name})}},_getattr:{value:function $(Z){var Y=this._attrsByQName[Z];return Y?Y.value:null}},_setattr:{value:function $(Z,Y){var z=this._attrsByQName[Z],X;if(!z)z=this._newattr(Z),X=!0;if(z.value=String(Y),this._attributes)this._attributes[Z]=z;if(X&&this._newattrhook)this._newattrhook(Z,Y)}},_newattr:{value:function $(Z){var Y=new c8(this,Z,null,null),z="|"+Z;if(this._attrsByQName[Z]=Y,this._attrsByLName[z]=Y,this._attributes)this._attributes[this._attrKeys.length]=Y;return this._attrKeys.push(z),Y}},_addQName:{value:function($){var Z=$.name,Y=this._attrsByQName[Z];if(!Y)this._attrsByQName[Z]=$;else if(Array.isArray(Y))Y.push($);else this._attrsByQName[Z]=[Y,$];if(this._attributes)this._attributes[Z]=$}},_removeQName:{value:function($){var Z=$.name,Y=this._attrsByQName[Z];if(Array.isArray(Y)){var z=Y.indexOf($);if(H0.assert(z!==-1),Y.length===2){if(this._attrsByQName[Z]=Y[1-z],this._attributes)this._attributes[Z]=this._attrsByQName[Z]}else if(Y.splice(z,1),this._attributes&&this._attributes[Z]===$)this._attributes[Z]=Y[0]}else if(H0.assert(Y===$),this._attrsByQName[Z]=void 0,this._attributes)this._attributes[Z]=void 0}},_numattrs:{get:function(){return this._attrKeys.length}},_attr:{value:function($){return this._attrsByLName[this._attrKeys[$]]}},id:s6.property({name:"id"}),className:s6.property({name:"class"}),classList:{get:function(){var $=this;if(this._classList)return this._classList;var Z=new kW(function(){return $.className||""},function(Y){$.className=Y});return this._classList=Z,Z},set:function($){this.className=$}},matches:{value:function($){return E$.matches(this,$)}},closest:{value:function($){var Z=this;do{if(Z.matches&&Z.matches($))return Z;Z=Z.parentElement||Z.parentNode}while(Z!==null&&Z.nodeType===Q1.ELEMENT_NODE);return null}},querySelector:{value:function($){return E$($,this)[0]}},querySelectorAll:{value:function($){var Z=E$($,this);return Z.item?Z:new C$(Z)}}});Object.defineProperties(g1.prototype,fW);Object.defineProperties(g1.prototype,hW);s6.registerChangeHandler(g1,"id",function($,Z,Y,z){if($.rooted){if(Y)$.ownerDocument.delId(Y,$);if(z)$.ownerDocument.addId(z,$)}});s6.registerChangeHandler(g1,"class",function($,Z,Y,z){if($._classList)$._classList._update()});function c8($,Z,Y,z,X){this.localName=Z,this.prefix=Y===null||Y===""?null:""+Y,this.namespaceURI=z===null||z===""?null:""+z,this.data=X,this._setOwnerElement($)}c8.prototype=Object.create(Object.prototype,{ownerElement:{get:function(){return this._ownerElement}},_setOwnerElement:{value:function $(Z){if(this._ownerElement=Z,this.prefix===null&&this.namespaceURI===null&&Z)this.onchange=Z._attributeChangeHandlers[this.localName];else this.onchange=null}},name:{get:function(){return this.prefix?this.prefix+":"+this.localName:this.localName}},specified:{get:function(){return!0}},value:{get:function(){return this.data},set:function($){var Z=this.data;if($=$===void 0?"":$+"",$===Z)return;if(this.data=$,this.ownerElement){if(this.onchange)this.onchange(this.ownerElement,this.localName,Z,$);if(this.ownerElement.rooted)this.ownerElement.ownerDocument.mutateAttr(this,Z)}}},cloneNode:{value:function $(Z){return new c8(null,this.localName,this.prefix,this.namespaceURI,this.data)}},nodeType:{get:function(){return Q1.ATTRIBUTE_NODE}},nodeName:{get:function(){return this.name}},nodeValue:{get:function(){return this.value},set:function($){this.value=$}},textContent:{get:function(){return this.value},set:function($){if($===null||$===void 0)$="";this.value=$}},innerText:{get:function(){return this.value},set:function($){if($===null||$===void 0)$="";this.value=$}}});g1._Attr=c8;function b$($){NY.call(this,$);for(var Z in $._attrsByQName)this[Z]=$._attrsByQName[Z];for(var Y=0;Y<$._attrKeys.length;Y++)this[Y]=$._attrsByLName[$._attrKeys[Y]]}b$.prototype=Object.create(NY.prototype,{length:{get:function(){return this.element._attrKeys.length},set:function(){}},item:{value:function($){if($=$>>>0,$>=this.length)return null;return this.element._attrsByLName[this.element._attrKeys[$]]}}});if(globalThis.Symbol?.iterator)b$.prototype[globalThis.Symbol.iterator]=function(){var $=0,Z=this.length,Y=this;return{next:function(){if($<Z)return{value:Y.item($++)};return{done:!0}}}};function wY($){this.element=$,this.updateCache()}wY.prototype=Object.create(Object.prototype,{length:{get:function(){return this.updateCache(),this.childrenByNumber.length}},item:{value:function $(Z){return this.updateCache(),this.childrenByNumber[Z]||null}},namedItem:{value:function $(Z){return this.updateCache(),this.childrenByName[Z]||null}},namedItems:{get:function(){return this.updateCache(),this.childrenByName}},updateCache:{value:function $(){var Z=/^(a|applet|area|embed|form|frame|frameset|iframe|img|object)$/;if(this.lastModTime!==this.element.lastModTime){this.lastModTime=this.element.lastModTime;var Y=this.childrenByNumber&&this.childrenByNumber.length||0;for(var z=0;z<Y;z++)this[z]=void 0;this.childrenByNumber=[],this.childrenByName=Object.create(null);for(var X=this.element.firstChild;X!==null;X=X.nextSibling)if(X.nodeType===Q1.ELEMENT_NODE){this[this.childrenByNumber.length]=X,this.childrenByNumber.push(X);var Q=X.getAttribute("id");if(Q&&!this.childrenByName[Q])this.childrenByName[Q]=X;var G=X.getAttribute("name");if(G&&this.element.namespaceURI===j1.HTML&&Z.test(this.element.localName)&&!this.childrenByName[G])this.childrenByName[Q]=X}}}}});function w$($){return function(Z){return Z.localName===$}}function gW($){var Z=H0.toASCIILowerCase($);if(Z===$)return w$($);return function(Y){return Y.isHTML?Y.localName===Z:Y.localName===$}}function vW($){return function(Z){return Z.namespaceURI===$}}function pW($,Z){return function(Y){return Y.namespaceURI===$&&Y.localName===Z}}function mW($){return function(Z){return $.every(function(Y){return Z.classList.contains(Y)})}}function uW($){return function(Z){if(Z.namespaceURI!==j1.HTML)return!1;return Z.getAttribute("name")===$}}});var x$=N((kB,hY)=>{hY.exports=fY;var yY=N0(),dW=r1(),kY=K0(),xY=kY.HierarchyRequestError,cW=kY.NotFoundError;function fY(){yY.call(this)}fY.prototype=Object.create(yY.prototype,{hasChildNodes:{value:function(){return!1}},firstChild:{value:null},lastChild:{value:null},insertBefore:{value:function($,Z){if(!$.nodeType)throw new TypeError("not a node");xY()}},replaceChild:{value:function($,Z){if(!$.nodeType)throw new TypeError("not a node");xY()}},removeChild:{value:function($){if(!$.nodeType)throw new TypeError("not a node");cW()}},removeChildren:{value:function(){}},childNodes:{get:function(){if(!this._childNodes)this._childNodes=new dW;return this._childNodes}}})});var l8=N((fB,pY)=>{pY.exports=o6;var vY=x$(),gY=K0(),lW=l6(),iW=P$();function o6(){vY.call(this)}o6.prototype=Object.create(vY.prototype,{substringData:{value:function $(Z,Y){if(arguments.length<2)throw new TypeError("Not enough arguments");if(Z=Z>>>0,Y=Y>>>0,Z>this.data.length||Z<0||Y<0)gY.IndexSizeError();return this.data.substring(Z,Z+Y)}},appendData:{value:function $(Z){if(arguments.length<1)throw new TypeError("Not enough arguments");this.data+=String(Z)}},insertData:{value:function $(Z,Y){return this.replaceData(Z,0,Y)}},deleteData:{value:function $(Z,Y){return this.replaceData(Z,Y,"")}},replaceData:{value:function $(Z,Y,z){var X=this.data,Q=X.length;if(Z=Z>>>0,Y=Y>>>0,z=String(z),Z>Q||Z<0)gY.IndexSizeError();if(Z+Y>Q)Y=Q-Z;var G=X.substring(0,Z),J=X.substring(Z+Y);this.data=G+z+J}},isEqual:{value:function $(Z){return this._data===Z._data}},length:{get:function(){return this.data.length}}});Object.defineProperties(o6.prototype,lW);Object.defineProperties(o6.prototype,iW)});var k$=N((hB,cY)=>{cY.exports=y$;var mY=K0(),uY=N0(),dY=l8();function y$($,Z){dY.call(this),this.nodeType=uY.TEXT_NODE,this.ownerDocument=$,this._data=Z,this._index=void 0}var i8={get:function(){return this._data},set:function($){if($===null||$===void 0)$="";else $=String($);if($===this._data)return;if(this._data=$,this.rooted)this.ownerDocument.mutateValue(this);if(this.parentNode&&this.parentNode._textchangehook)this.parentNode._textchangehook(this)}};y$.prototype=Object.create(dY.prototype,{nodeName:{value:"#text"},nodeValue:i8,textContent:i8,innerText:i8,data:{get:i8.get,set:function($){i8.set.call(this,$===null?"":String($))}},splitText:{value:function $(Z){if(Z>this._data.length||Z<0)mY.IndexSizeError();var Y=this._data.substring(Z),z=this.ownerDocument.createTextNode(Y);this.data=this.data.substring(0,Z);var X=this.parentNode;if(X!==null)X.insertBefore(z,this.nextSibling);return z}},wholeText:{get:function $(){var Z=this.textContent;for(var Y=this.nextSibling;Y;Y=Y.nextSibling){if(Y.nodeType!==uY.TEXT_NODE)break;Z+=Y.textContent}return Z}},replaceWholeText:{value:mY.nyi},clone:{value:function $(){return new y$(this.ownerDocument,this._data)}}})});var h$=N((gB,iY)=>{iY.exports=f$;var sW=N0(),lY=l8();function f$($,Z){lY.call(this),this.nodeType=sW.COMMENT_NODE,this.ownerDocument=$,this._data=Z}var s8={get:function(){return this._data},set:function($){if($===null||$===void 0)$="";else $=String($);if(this._data=$,this.rooted)this.ownerDocument.mutateValue(this)}};f$.prototype=Object.create(lY.prototype,{nodeName:{value:"#comment"},nodeValue:s8,textContent:s8,innerText:s8,data:{get:s8.get,set:function($){s8.set.call(this,$===null?"":String($))}},clone:{value:function $(){return new f$(this.ownerDocument,this._data)}}})});var v$=N((vB,nY)=>{nY.exports=g$;var oW=N0(),nW=r1(),oY=v6(),n6=j8(),rW=c6(),sY=K0();function g$($){oY.call(this),this.nodeType=oW.DOCUMENT_FRAGMENT_NODE,this.ownerDocument=$}g$.prototype=Object.create(oY.prototype,{nodeName:{value:"#document-fragment"},nodeValue:{get:function(){return null},set:function(){}},textContent:Object.getOwnPropertyDescriptor(n6.prototype,"textContent"),innerText:Object.getOwnPropertyDescriptor(n6.prototype,"innerText"),querySelector:{value:function($){var Z=this.querySelectorAll($);return Z.length?Z[0]:null}},querySelectorAll:{value:function($){var Z=Object.create(this);Z.isHTML=!0,Z.getElementsByTagName=n6.prototype.getElementsByTagName,Z.nextElement=Object.getOwnPropertyDescriptor(n6.prototype,"firstElementChild").get;var Y=rW($,Z);return Y.item?Y:new nW(Y)}},clone:{value:function $(){return new g$(this.ownerDocument)}},isEqual:{value:function $(Z){return!0}},innerHTML:{get:function(){return this.serialize()},set:sY.nyi},outerHTML:{get:function(){return this.serialize()},set:sY.nyi}})});var m$=N((pB,aY)=>{aY.exports=p$;var aW=N0(),rY=l8();function p$($,Z,Y){rY.call(this),this.nodeType=aW.PROCESSING_INSTRUCTION_NODE,this.ownerDocument=$,this.target=Z,this._data=Y}var o8={get:function(){return this._data},set:function($){if($===null||$===void 0)$="";else $=String($);if(this._data=$,this.rooted)this.ownerDocument.mutateValue(this)}};p$.prototype=Object.create(rY.prototype,{nodeName:{get:function(){return this.target}},nodeValue:o8,textContent:o8,innerText:o8,data:{get:o8.get,set:function($){o8.set.call(this,$===null?"":String($))}},clone:{value:function $(){return new p$(this.ownerDocument,this.target,this._data)}},isEqual:{value:function $(Z){return this.target===Z.target&&this._data===Z._data}}})});var n8=N((mB,tY)=>{var u$={FILTER_ACCEPT:1,FILTER_REJECT:2,FILTER_SKIP:3,SHOW_ALL:4294967295,SHOW_ELEMENT:1,SHOW_ATTRIBUTE:2,SHOW_TEXT:4,SHOW_CDATA_SECTION:8,SHOW_ENTITY_REFERENCE:16,SHOW_ENTITY:32,SHOW_PROCESSING_INSTRUCTION:64,SHOW_COMMENT:128,SHOW_DOCUMENT:256,SHOW_DOCUMENT_TYPE:512,SHOW_DOCUMENT_FRAGMENT:1024,SHOW_NOTATION:2048};tY.exports=u$.constructor=u$.prototype=u$});var c$=N((dB,$z)=>{var uB=$z.exports={nextSkippingChildren:tW,nextAncestorSibling:d$,next:eW,previous:$V,deepLastChild:eY};function tW($,Z){if($===Z)return null;if($.nextSibling!==null)return $.nextSibling;return d$($,Z)}function d$($,Z){for($=$.parentNode;$!==null;$=$.parentNode){if($===Z)return null;if($.nextSibling!==null)return $.nextSibling}return null}function eW($,Z){var Y=$.firstChild;if(Y!==null)return Y;if($===Z)return null;if(Y=$.nextSibling,Y!==null)return Y;return d$($,Z)}function eY($){while($.lastChild)$=$.lastChild;return $}function $V($,Z){var Y=$.previousSibling;if(Y!==null)return eY(Y);if(Y=$.parentNode,Y===Z)return null;return Y}});var Wz=N((cB,Gz)=>{Gz.exports=Qz;var ZV=N0(),w0=n8(),Zz=c$(),Xz=K0(),l$={first:"firstChild",last:"lastChild",next:"firstChild",previous:"lastChild"},i$={first:"nextSibling",last:"previousSibling",next:"nextSibling",previous:"previousSibling"};function Yz($,Z){var Y,z,X,Q,G;z=$._currentNode[l$[Z]];while(z!==null){if(Q=$._internalFilter(z),Q===w0.FILTER_ACCEPT)return $._currentNode=z,z;if(Q===w0.FILTER_SKIP){if(Y=z[l$[Z]],Y!==null){z=Y;continue}}while(z!==null){if(G=z[i$[Z]],G!==null){z=G;break}if(X=z.parentNode,X===null||X===$.root||X===$._currentNode)return null;else z=X}}return null}function zz($,Z){var Y,z,X;if(Y=$._currentNode,Y===$.root)return null;while(!0){X=Y[i$[Z]];while(X!==null){if(Y=X,z=$._internalFilter(Y),z===w0.FILTER_ACCEPT)return $._currentNode=Y,Y;if(X=Y[l$[Z]],z===w0.FILTER_REJECT||X===null)X=Y[i$[Z]]}if(Y=Y.parentNode,Y===null||Y===$.root)return null;if($._internalFilter(Y)===w0.FILTER_ACCEPT)return null}}function Qz($,Z,Y){if(!$||!$.nodeType)Xz.NotSupportedError();this._root=$,this._whatToShow=Number(Z)||0,this._filter=Y||null,this._active=!1,this._currentNode=$}Object.defineProperties(Qz.prototype,{root:{get:function(){return this._root}},whatToShow:{get:function(){return this._whatToShow}},filter:{get:function(){return this._filter}},currentNode:{get:function $(){return this._currentNode},set:function $(Z){if(!(Z instanceof ZV))throw new TypeError("Not a Node");this._currentNode=Z}},_internalFilter:{value:function $(Z){var Y,z;if(this._active)Xz.InvalidStateError();if(!(1<<Z.nodeType-1&this._whatToShow))return w0.FILTER_SKIP;if(z=this._filter,z===null)Y=w0.FILTER_ACCEPT;else{this._active=!0;try{if(typeof z==="function")Y=z(Z);else Y=z.acceptNode(Z)}finally{this._active=!1}}return+Y}},parentNode:{value:function $(){var Z=this._currentNode;while(Z!==this.root){if(Z=Z.parentNode,Z===null)return null;if(this._internalFilter(Z)===w0.FILTER_ACCEPT)return this._currentNode=Z,Z}return null}},firstChild:{value:function $(){return Yz(this,"first")}},lastChild:{value:function $(){return Yz(this,"last")}},previousSibling:{value:function $(){return zz(this,"previous")}},nextSibling:{value:function $(){return zz(this,"next")}},previousNode:{value:function $(){var Z,Y,z,X;Z=this._currentNode;while(Z!==this._root){for(z=Z.previousSibling;z;z=Z.previousSibling){if(Z=z,Y=this._internalFilter(Z),Y===w0.FILTER_REJECT)continue;for(X=Z.lastChild;X;X=Z.lastChild)if(Z=X,Y=this._internalFilter(Z),Y===w0.FILTER_REJECT)break;if(Y===w0.FILTER_ACCEPT)return this._currentNode=Z,Z}if(Z===this.root||Z.parentNode===null)return null;if(Z=Z.parentNode,this._internalFilter(Z)===w0.FILTER_ACCEPT)return this._currentNode=Z,Z}return null}},nextNode:{value:function $(){var Z,Y,z,X;Z=this._currentNode,Y=w0.FILTER_ACCEPT;$:while(!0){for(z=Z.firstChild;z;z=Z.firstChild)if(Z=z,Y=this._internalFilter(Z),Y===w0.FILTER_ACCEPT)return this._currentNode=Z,Z;else if(Y===w0.FILTER_REJECT)break;for(X=Zz.nextSkippingChildren(Z,this.root);X;X=Zz.nextSkippingChildren(Z,this.root))if(Z=X,Y=this._internalFilter(Z),Y===w0.FILTER_ACCEPT)return this._currentNode=Z,Z;else if(Y===w0.FILTER_SKIP)continue $;return null}}},toString:{value:function $(){return"[object TreeWalker]"}}})});var qz=N((lB,Hz)=>{Hz.exports=Bz;var s$=n8(),o$=c$(),_z=K0();function YV($,Z,Y){if(Y)return o$.next($,Z);else{if($===Z)return null;return o$.previous($,null)}}function Vz($,Z){for(;Z;Z=Z.parentNode)if($===Z)return!0;return!1}function Jz($,Z){var Y,z;Y=$._referenceNode,z=$._pointerBeforeReferenceNode;while(!0){if(z===Z)z=!z;else if(Y=YV(Y,$._root,Z),Y===null)return null;var X=$._internalFilter(Y);if(X===s$.FILTER_ACCEPT)break}return $._referenceNode=Y,$._pointerBeforeReferenceNode=z,Y}function Bz($,Z,Y){if(!$||!$.nodeType)_z.NotSupportedError();this._root=$,this._referenceNode=$,this._pointerBeforeReferenceNode=!0,this._whatToShow=Number(Z)||0,this._filter=Y||null,this._active=!1,$.doc._attachNodeIterator(this)}Object.defineProperties(Bz.prototype,{root:{get:function $(){return this._root}},referenceNode:{get:function $(){return this._referenceNode}},pointerBeforeReferenceNode:{get:function $(){return this._pointerBeforeReferenceNode}},whatToShow:{get:function $(){return this._whatToShow}},filter:{get:function $(){return this._filter}},_internalFilter:{value:function $(Z){var Y,z;if(this._active)_z.InvalidStateError();if(!(1<<Z.nodeType-1&this._whatToShow))return s$.FILTER_SKIP;if(z=this._filter,z===null)Y=s$.FILTER_ACCEPT;else{this._active=!0;try{if(typeof z==="function")Y=z(Z);else Y=z.acceptNode(Z)}finally{this._active=!1}}return+Y}},_preremove:{value:function $(Z){if(Vz(Z,this._root))return;if(!Vz(Z,this._referenceNode))return;if(this._pointerBeforeReferenceNode){var Y=Z;while(Y.lastChild)Y=Y.lastChild;if(Y=o$.next(Y,this.root),Y){this._referenceNode=Y;return}this._pointerBeforeReferenceNode=!1}if(Z.previousSibling===null)this._referenceNode=Z.parentNode;else{this._referenceNode=Z.previousSibling;var z;for(z=this._referenceNode.lastChild;z;z=this._referenceNode.lastChild)this._referenceNode=z}}},nextNode:{value:function $(){return Jz(this,!0)}},previousNode:{value:function $(){return Jz(this,!1)}},detach:{value:function $(){}},toString:{value:function $(){return"[object NodeIterator]"}}})});var r6=N((iB,jz)=>{jz.exports=b0;function b0($){if(!$)return Object.create(b0.prototype);this.url=$.replace(/^[ \t\n\r\f]+|[ \t\n\r\f]+$/g,"");var Z=b0.pattern.exec(this.url);if(Z){if(Z[2])this.scheme=Z[2];if(Z[4]){var Y=Z[4].match(b0.userinfoPattern);if(Y)this.username=Y[1],this.password=Y[3],Z[4]=Z[4].substring(Y[0].length);if(Z[4].match(b0.portPattern)){var z=Z[4].lastIndexOf(":");this.host=Z[4].substring(0,z),this.port=Z[4].substring(z+1)}else this.host=Z[4]}if(Z[5])this.path=Z[5];if(Z[6])this.query=Z[7];if(Z[8])this.fragment=Z[9]}}b0.pattern=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/;b0.userinfoPattern=/^([^@:]*)(:([^@]*))?@/;b0.portPattern=/:\d+$/;b0.authorityPattern=/^[^:\/?#]+:\/\//;b0.hierarchyPattern=/^[^:\/?#]+:\//;b0.percentEncode=function $(Z){var Y=Z.charCodeAt(0);if(Y<256)return"%"+Y.toString(16);else throw Error("can't percent-encode codepoints > 255 yet")};b0.prototype={constructor:b0,isAbsolute:function(){return!!this.scheme},isAuthorityBased:function(){return b0.authorityPattern.test(this.url)},isHierarchical:function(){return b0.hierarchyPattern.test(this.url)},toString:function(){var $="";if(this.scheme!==void 0)$+=this.scheme+":";if(this.isAbsolute()){if($+="//",this.username||this.password){if($+=this.username||"",this.password)$+=":"+this.password;$+="@"}if(this.host)$+=this.host}if(this.port!==void 0)$+=":"+this.port;if(this.path!==void 0)$+=this.path;if(this.query!==void 0)$+="?"+this.query;if(this.fragment!==void 0)$+="#"+this.fragment;return $},resolve:function($){var Z=this,Y=new b0($),z=new b0;if(Y.scheme!==void 0)z.scheme=Y.scheme,z.username=Y.username,z.password=Y.password,z.host=Y.host,z.port=Y.port,z.path=Q(Y.path),z.query=Y.query;else if(z.scheme=Z.scheme,Y.host!==void 0)z.username=Y.username,z.password=Y.password,z.host=Y.host,z.port=Y.port,z.path=Q(Y.path),z.query=Y.query;else if(z.username=Z.username,z.password=Z.password,z.host=Z.host,z.port=Z.port,!Y.path)if(z.path=Z.path,Y.query!==void 0)z.query=Y.query;else z.query=Z.query;else{if(Y.path.charAt(0)==="/")z.path=Q(Y.path);else z.path=X(Z.path,Y.path),z.path=Q(z.path);z.query=Y.query}return z.fragment=Y.fragment,z.toString();function X(G,J){if(Z.host!==void 0&&!Z.path)return"/"+J;var _=G.lastIndexOf("/");if(_===-1)return J;else return G.substring(0,_+1)+J}function Q(G){if(!G)return G;var J="";while(G.length>0){if(G==="."||G===".."){G="";break}var _=G.substring(0,2),H=G.substring(0,3),q=G.substring(0,4);if(H==="../")G=G.substring(3);else if(_==="./")G=G.substring(2);else if(H==="/./")G="/"+G.substring(3);else if(_==="/."&&G.length===2)G="/";else if(q==="/../"||H==="/.."&&G.length===3)G="/"+G.substring(4),J=J.replace(/\/?[^\/]*$/,"");else{var F=G.match(/(\/?([^\/]*))/)[0];J+=F,G=G.substring(F.length)}}return J}}}});var Dz=N((sB,Fz)=>{Fz.exports=n$;var Kz=W8();function n$($,Z){Kz.call(this,$,Z)}n$.prototype=Object.create(Kz.prototype,{constructor:{value:n$}})});var r$=N((oB,Oz)=>{Oz.exports={Event:W8(),UIEvent:Z$(),MouseEvent:z$(),CustomEvent:Dz()}});var Iz=N((Sz)=>{Object.defineProperty(Sz,"__esModule",{value:!0});Sz.hyphenate=Sz.parse=void 0;function zV($){let Z=[],Y=0,z=0,X=0,Q=0,G=0,J=null;while(Y<$.length)switch($.charCodeAt(Y++)){case 40:z++;break;case 41:z--;break;case 39:if(X===0)X=39;else if(X===39&&$.charCodeAt(Y-1)!==92)X=0;break;case 34:if(X===0)X=34;else if(X===34&&$.charCodeAt(Y-1)!==92)X=0;break;case 58:if(!J&&z===0&&X===0)J=Mz($.substring(G,Y-1).trim()),Q=Y;break;case 59:if(J&&Q>0&&z===0&&X===0){let H=$.substring(Q,Y-1).trim();Z.push(J,H),G=Y,Q=0,J=null}break}if(J&&Q){let _=$.slice(Q).trim();Z.push(J,_)}return Z}Sz.parse=zV;function Mz($){return $.replace(/[a-z][A-Z]/g,(Z)=>{return Z.charAt(0)+"-"+Z.charAt(1)}).toLowerCase()}Sz.hyphenate=Mz});var a6=N((rB,Rz)=>{var{parse:QV}=Iz();Rz.exports=function($){let Z=new Tz($);return new Proxy(Z,{get:function(z,X){return X in z?z[X]:z.getPropertyValue(Uz(X))},has:function(z,X){return!0},set:function(z,X,Q){if(X in z)z[X]=Q;else z.setProperty(Uz(X),Q??void 0);return!0}})};function Uz($){return $.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Tz($){this._element=$}var Az="!important";function Pz($){let Z={property:{},priority:{}};if(!$)return Z;let Y=QV($);if(Y.length<2)return Z;for(let z=0;z<Y.length;z+=2){let X=Y[z],Q=Y[z+1];if(Q.endsWith(Az))Z.priority[X]="important",Q=Q.slice(0,-Az.length).trim();Z.property[X]=Q}return Z}var K8={};Tz.prototype=Object.create(Object.prototype,{_parsed:{get:function(){if(!this._parsedStyles||this.cssText!==this._lastParsedText){var $=this.cssText;this._parsedStyles=Pz($),this._lastParsedText=$,delete this._names}return this._parsedStyles}},_serialize:{value:function(){var $=this._parsed,Z="";for(var Y in $.property){if(Z)Z+=" ";if(Z+=Y+": "+$.property[Y],$.priority[Y])Z+=" !"+$.priority[Y];Z+=";"}this.cssText=Z,this._lastParsedText=Z,delete this._names}},cssText:{get:function(){return this._element.getAttribute("style")},set:function($){this._element.setAttribute("style",$)}},length:{get:function(){if(!this._names)this._names=Object.getOwnPropertyNames(this._parsed.property);return this._names.length}},item:{value:function($){if(!this._names)this._names=Object.getOwnPropertyNames(this._parsed.property);return this._names[$]}},getPropertyValue:{value:function($){return $=$.toLowerCase(),this._parsed.property[$]||""}},getPropertyPriority:{value:function($){return $=$.toLowerCase(),this._parsed.priority[$]||""}},setProperty:{value:function($,Z,Y){if($=$.toLowerCase(),Z===null||Z===void 0)Z="";if(Y===null||Y===void 0)Y="";if(Z!==K8)Z=""+Z;if(Z=Z.trim(),Z===""){this.removeProperty($);return}if(Y!==""&&Y!==K8&&!/^important$/i.test(Y))return;var z=this._parsed;if(Z===K8){if(!z.property[$])return;if(Y!=="")z.priority[$]="important";else delete z.priority[$]}else{if(Z.indexOf(";")!==-1)return;var X=Pz($+":"+Z);if(Object.getOwnPropertyNames(X.property).length===0)return;if(Object.getOwnPropertyNames(X.priority).length!==0)return;for(var Q in X.property)if(z.property[Q]=X.property[Q],Y===K8)continue;else if(Y!=="")z.priority[Q]="important";else if(z.priority[Q])delete z.priority[Q]}this._serialize()}},setPropertyValue:{value:function($,Z){return this.setProperty($,Z,K8)}},setPropertyPriority:{value:function($,Z){return this.setProperty($,K8,Z)}},removeProperty:{value:function($){$=$.toLowerCase();var Z=this._parsed;if($ in Z.property)delete Z.property[$],delete Z.priority[$],this._serialize()}}})});var a$=N((aB,Cz)=>{var R0=r6();Cz.exports=r8;function r8(){}r8.prototype=Object.create(Object.prototype,{_url:{get:function(){return new R0(this.href)}},protocol:{get:function(){var $=this._url;if($&&$.scheme)return $.scheme+":";else return":"},set:function($){var Z=this.href,Y=new R0(Z);if(Y.isAbsolute()){if($=$.replace(/:+$/,""),$=$.replace(/[^-+\.a-zA-Z0-9]/g,R0.percentEncode),$.length>0)Y.scheme=$,Z=Y.toString()}this.href=Z}},host:{get:function(){var $=this._url;if($.isAbsolute()&&$.isAuthorityBased())return $.host+($.port?":"+$.port:"");else return""},set:function($){var Z=this.href,Y=new R0(Z);if(Y.isAbsolute()&&Y.isAuthorityBased()){if($=$.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g,R0.percentEncode),$.length>0)Y.host=$,delete Y.port,Z=Y.toString()}this.href=Z}},hostname:{get:function(){var $=this._url;if($.isAbsolute()&&$.isAuthorityBased())return $.host;else return""},set:function($){var Z=this.href,Y=new R0(Z);if(Y.isAbsolute()&&Y.isAuthorityBased()){if($=$.replace(/^\/+/,""),$=$.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g,R0.percentEncode),$.length>0)Y.host=$,Z=Y.toString()}this.href=Z}},port:{get:function(){var $=this._url;if($.isAbsolute()&&$.isAuthorityBased()&&$.port!==void 0)return $.port;else return""},set:function($){var Z=this.href,Y=new R0(Z);if(Y.isAbsolute()&&Y.isAuthorityBased()){if($=""+$,$=$.replace(/[^0-9].*$/,""),$=$.replace(/^0+/,""),$.length===0)$="0";if(parseInt($,10)<=65535)Y.port=$,Z=Y.toString()}this.href=Z}},pathname:{get:function(){var $=this._url;if($.isAbsolute()&&$.isHierarchical())return $.path;else return""},set:function($){var Z=this.href,Y=new R0(Z);if(Y.isAbsolute()&&Y.isHierarchical()){if($.charAt(0)!=="/")$="/"+$;$=$.replace(/[^-+\._~!$&'()*,;:=@\/a-zA-Z0-9]/g,R0.percentEncode),Y.path=$,Z=Y.toString()}this.href=Z}},search:{get:function(){var $=this._url;if($.isAbsolute()&&$.isHierarchical()&&$.query!==void 0)return"?"+$.query;else return""},set:function($){var Z=this.href,Y=new R0(Z);if(Y.isAbsolute()&&Y.isHierarchical()){if($.charAt(0)==="?")$=$.substring(1);$=$.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g,R0.percentEncode),Y.query=$,Z=Y.toString()}this.href=Z}},hash:{get:function(){var $=this._url;if($==null||$.fragment==null||$.fragment==="")return"";else return"#"+$.fragment},set:function($){var Z=this.href,Y=new R0(Z);if($.charAt(0)==="#")$=$.substring(1);$=$.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g,R0.percentEncode),Y.fragment=$,Z=Y.toString(),this.href=Z}},username:{get:function(){var $=this._url;return $.username||""},set:function($){var Z=this.href,Y=new R0(Z);if(Y.isAbsolute())$=$.replace(/[\x00-\x1F\x7F-\uFFFF "#<>?`\/@\\:]/g,R0.percentEncode),Y.username=$,Z=Y.toString();this.href=Z}},password:{get:function(){var $=this._url;return $.password||""},set:function($){var Z=this.href,Y=new R0(Z);if(Y.isAbsolute()){if($==="")Y.password=null;else $=$.replace(/[\x00-\x1F\x7F-\uFFFF "#<>?`\/@\\]/g,R0.percentEncode),Y.password=$;Z=Y.toString()}this.href=Z}},origin:{get:function(){var $=this._url;if($==null)return"";var Z=function(Y){var z=[$.scheme,$.host,+$.port||Y];return z[0]+"://"+z[1]+(z[2]===Y?"":":"+z[2])};switch($.scheme){case"ftp":return Z(21);case"gopher":return Z(70);case"http":case"ws":return Z(80);case"https":case"wss":return Z(443);default:return $.scheme+"://"}}}});r8._inherit=function($){Object.getOwnPropertyNames(r8.prototype).forEach(function(Z){if(Z==="constructor"||Z==="href")return;var Y=Object.getOwnPropertyDescriptor(r8.prototype,Z);Object.defineProperty($,Z,Y)})}});var t$=N((tB,wz)=>{var Ez=O$(),GV=f6().isApiWritable;wz.exports=function($,Z,Y,z){var X=$.ctor;if(X){var Q=$.props||{};if($.attributes)for(var G in $.attributes){var J=$.attributes[G];if(typeof J!=="object"||Array.isArray(J))J={type:J};if(!J.name)J.name=G.toLowerCase();Q[G]=Ez.property(J)}if(Q.constructor={value:X,writable:GV},X.prototype=Object.create(($.superclass||Z).prototype,Q),$.events)VV(X,$.events);Y[$.name]=X}else X=Z;return($.tags||$.tag&&[$.tag]||[]).forEach(function(_){z[_]=X}),X};function Nz($,Z,Y,z){this.body=$,this.document=Z,this.form=Y,this.element=z}Nz.prototype.build=function(){return()=>{}};function WV($,Z,Y,z){var X=$.ownerDocument||Object.create(null),Q=$.form||Object.create(null);$[Z]=new Nz(z,X,Q,$).build()}function VV($,Z){var Y=$.prototype;Z.forEach(function(z){Object.defineProperty(Y,"on"+z,{get:function(){return this._getEventHandler(z)},set:function(X){this._setEventHandler(z,X)}}),Ez.registerChangeHandler($,"on"+z,WV)})}});var e6=N((qV)=>{var e$=N0(),bz=j8(),JV=a6(),i0=K0(),xz=a$(),_V=t$(),U1=qV.elements={},a8=Object.create(null);qV.createElement=function($,Z,Y){var z=a8[Z]||HV;return new z($,Z,Y)};function E($){return _V($,b,U1,a8)}function F0($){return{get:function(){var Z=this._getattr($);if(Z===null)return"";var Y=this.doc._resolve(Z);return Y===null?Z:Y},set:function(Z){this._setattr($,Z)}}}function t6($){return{get:function(){var Z=this._getattr($);if(Z===null)return null;if(Z.toLowerCase()==="use-credentials")return"use-credentials";return"anonymous"},set:function(Z){if(Z===null||Z===void 0)this.removeAttribute($);else this._setattr($,Z)}}}var F8={type:["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"],missing:""},BV={A:!0,LINK:!0,BUTTON:!0,INPUT:!0,SELECT:!0,TEXTAREA:!0,COMMAND:!0},G1=function($,Z,Y){b.call(this,$,Z,Y),this._form=null},b=qV.HTMLElement=E({superclass:bz,name:"HTMLElement",ctor:function $(Z,Y,z){bz.call(this,Z,Y,i0.NAMESPACE.HTML,z)},props:{dangerouslySetInnerHTML:{set:function($){this._innerHTML=$}},innerHTML:{get:function(){return this.serialize()},set:function($){var Z=this.ownerDocument.implementation.mozHTMLParser(this.ownerDocument._address,this);Z.parse($===null?"":String($),!0);var Y=this instanceof a8.template?this.content:this;while(Y.hasChildNodes())Y.removeChild(Y.firstChild);Y.appendChild(Z._asDocumentFragment())}},style:{get:function(){if(!this._style)this._style=new JV(this);return this._style},set:function($){if($===null||$===void 0)$="";this._setattr("style",String($))}},blur:{value:function(){}},focus:{value:function(){}},forceSpellCheck:{value:function(){}},click:{value:function(){if(this._click_in_progress)return;this._click_in_progress=!0;try{if(this._pre_click_activation_steps)this._pre_click_activation_steps();var $=this.ownerDocument.createEvent("MouseEvent");$.initMouseEvent("click",!0,!0,this.ownerDocument.defaultView,1,0,0,0,0,!1,!1,!1,!1,0,null);var Z=this.dispatchEvent($);if(Z){if(this._post_click_activation_steps)this._post_click_activation_steps($)}else if(this._cancelled_activation_steps)this._cancelled_activation_steps()}finally{this._click_in_progress=!1}}},submit:{value:i0.nyi}},attributes:{title:String,lang:String,dir:{type:["ltr","rtl","auto"],missing:""},draggable:{type:["true","false"],treatNullAsEmptyString:!0},spellcheck:{type:["true","false"],missing:""},enterKeyHint:{type:["enter","done","go","next","previous","search","send"],missing:""},autoCapitalize:{type:["off","on","none","sentences","words","characters"],missing:""},autoFocus:Boolean,accessKey:String,nonce:String,hidden:Boolean,translate:{type:["no","yes"],missing:""},tabIndex:{type:"long",default:function(){if(this.tagName in BV||this.contentEditable)return 0;else return-1}}},events:["abort","canplay","canplaythrough","change","click","contextmenu","cuechange","dblclick","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","ended","input","invalid","keydown","keypress","keyup","loadeddata","loadedmetadata","loadstart","mousedown","mousemove","mouseout","mouseover","mouseup","mousewheel","pause","play","playing","progress","ratechange","readystatechange","reset","seeked","seeking","select","show","stalled","submit","suspend","timeupdate","volumechange","waiting","blur","error","focus","load","scroll"]}),HV=E({name:"HTMLUnknownElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)}}),W1={form:{get:function(){return this._form}}};E({tag:"a",name:"HTMLAnchorElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},props:{_post_click_activation_steps:{value:function($){if(this.href)this.ownerDocument.defaultView.location=this.href}}},attributes:{href:F0,ping:String,download:String,target:String,rel:String,media:String,hreflang:String,type:String,referrerPolicy:F8,coords:String,charset:String,name:String,rev:String,shape:String}});xz._inherit(a8.a.prototype);E({tag:"area",name:"HTMLAreaElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{alt:String,target:String,download:String,rel:String,media:String,href:F0,hreflang:String,type:String,shape:String,coords:String,ping:String,referrerPolicy:F8,noHref:Boolean}});xz._inherit(a8.area.prototype);E({tag:"br",name:"HTMLBRElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{clear:String}});E({tag:"base",name:"HTMLBaseElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{target:String}});E({tag:"body",name:"HTMLBodyElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},events:["afterprint","beforeprint","beforeunload","blur","error","focus","hashchange","load","message","offline","online","pagehide","pageshow","popstate","resize","scroll","storage","unload"],attributes:{text:{type:String,treatNullAsEmptyString:!0},link:{type:String,treatNullAsEmptyString:!0},vLink:{type:String,treatNullAsEmptyString:!0},aLink:{type:String,treatNullAsEmptyString:!0},bgColor:{type:String,treatNullAsEmptyString:!0},background:String}});E({tag:"button",name:"HTMLButtonElement",ctor:function $(Z,Y,z){G1.call(this,Z,Y,z)},props:W1,attributes:{name:String,value:String,disabled:Boolean,autofocus:Boolean,type:{type:["submit","reset","button","menu"],missing:"submit"},formTarget:String,formAction:F0,formNoValidate:Boolean,formMethod:{type:["get","post","dialog"],invalid:"get",missing:""},formEnctype:{type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:""}}});E({tag:"dl",name:"HTMLDListElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{compact:Boolean}});E({tag:"data",name:"HTMLDataElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{value:String}});E({tag:"datalist",name:"HTMLDataListElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)}});E({tag:"details",name:"HTMLDetailsElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{open:Boolean}});E({tag:"div",name:"HTMLDivElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{align:String}});E({tag:"embed",name:"HTMLEmbedElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{src:F0,type:String,width:String,height:String,align:String,name:String}});E({tag:"fieldset",name:"HTMLFieldSetElement",ctor:function $(Z,Y,z){G1.call(this,Z,Y,z)},props:W1,attributes:{disabled:Boolean,name:String}});E({tag:"form",name:"HTMLFormElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{action:String,autocomplete:{type:["on","off"],missing:"on"},name:String,acceptCharset:{name:"accept-charset"},target:String,noValidate:Boolean,method:{type:["get","post","dialog"],invalid:"get",missing:"get"},enctype:{type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:"application/x-www-form-urlencoded"},encoding:{name:"enctype",type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:"application/x-www-form-urlencoded"}}});E({tag:"hr",name:"HTMLHRElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{align:String,color:String,noShade:Boolean,size:String,width:String}});E({tag:"head",name:"HTMLHeadElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)}});E({tags:["h1","h2","h3","h4","h5","h6"],name:"HTMLHeadingElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{align:String}});E({tag:"html",name:"HTMLHtmlElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{xmlns:F0,version:String}});E({tag:"iframe",name:"HTMLIFrameElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{src:F0,srcdoc:String,name:String,width:String,height:String,seamless:Boolean,allow:Boolean,allowFullscreen:Boolean,allowUserMedia:Boolean,allowPaymentRequest:Boolean,referrerPolicy:F8,loading:{type:["eager","lazy"],treatNullAsEmptyString:!0},align:String,scrolling:String,frameBorder:String,longDesc:F0,marginHeight:{type:String,treatNullAsEmptyString:!0},marginWidth:{type:String,treatNullAsEmptyString:!0}}});E({tag:"img",name:"HTMLImageElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{alt:String,src:F0,srcset:String,crossOrigin:t6,useMap:String,isMap:Boolean,sizes:String,height:{type:"unsigned long",default:0},width:{type:"unsigned long",default:0},referrerPolicy:F8,loading:{type:["eager","lazy"],missing:""},name:String,lowsrc:F0,align:String,hspace:{type:"unsigned long",default:0},vspace:{type:"unsigned long",default:0},longDesc:F0,border:{type:String,treatNullAsEmptyString:!0}}});E({tag:"input",name:"HTMLInputElement",ctor:function $(Z,Y,z){G1.call(this,Z,Y,z)},props:{form:W1.form,_post_click_activation_steps:{value:function($){if(this.type==="checkbox")this.checked=!this.checked;else if(this.type==="radio"){var Z=this.form.getElementsByName(this.name);for(var Y=Z.length-1;Y>=0;Y--){var z=Z[Y];z.checked=z===this}}}}},attributes:{name:String,disabled:Boolean,autofocus:Boolean,accept:String,alt:String,max:String,min:String,pattern:String,placeholder:String,step:String,dirName:String,defaultValue:{name:"value"},multiple:Boolean,required:Boolean,readOnly:Boolean,checked:Boolean,value:String,src:F0,defaultChecked:{name:"checked",type:Boolean},size:{type:"unsigned long",default:20,min:1,setmin:1},width:{type:"unsigned long",min:0,setmin:0,default:0},height:{type:"unsigned long",min:0,setmin:0,default:0},minLength:{type:"unsigned long",min:0,setmin:0,default:-1},maxLength:{type:"unsigned long",min:0,setmin:0,default:-1},autocomplete:String,type:{type:["text","hidden","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"],missing:"text"},formTarget:String,formNoValidate:Boolean,formMethod:{type:["get","post"],invalid:"get",missing:""},formEnctype:{type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:""},inputMode:{type:["verbatim","latin","latin-name","latin-prose","full-width-latin","kana","kana-name","katakana","numeric","tel","email","url"],missing:""},align:String,useMap:String}});E({tag:"keygen",name:"HTMLKeygenElement",ctor:function $(Z,Y,z){G1.call(this,Z,Y,z)},props:W1,attributes:{name:String,disabled:Boolean,autofocus:Boolean,challenge:String,keytype:{type:["rsa"],missing:""}}});E({tag:"li",name:"HTMLLIElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{value:{type:"long",default:0},type:String}});E({tag:"label",name:"HTMLLabelElement",ctor:function $(Z,Y,z){G1.call(this,Z,Y,z)},props:W1,attributes:{htmlFor:{name:"for",type:String}}});E({tag:"legend",name:"HTMLLegendElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{align:String}});E({tag:"link",name:"HTMLLinkElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{href:F0,rel:String,media:String,hreflang:String,type:String,crossOrigin:t6,nonce:String,integrity:String,referrerPolicy:F8,imageSizes:String,imageSrcset:String,charset:String,rev:String,target:String}});E({tag:"map",name:"HTMLMapElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{name:String}});E({tag:"menu",name:"HTMLMenuElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{type:{type:["context","popup","toolbar"],missing:"toolbar"},label:String,compact:Boolean}});E({tag:"meta",name:"HTMLMetaElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{name:String,content:String,httpEquiv:{name:"http-equiv",type:String},scheme:String}});E({tag:"meter",name:"HTMLMeterElement",ctor:function $(Z,Y,z){G1.call(this,Z,Y,z)},props:W1});E({tags:["ins","del"],name:"HTMLModElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{cite:F0,dateTime:String}});E({tag:"ol",name:"HTMLOListElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},props:{_numitems:{get:function(){var $=0;return this.childNodes.forEach(function(Z){if(Z.nodeType===e$.ELEMENT_NODE&&Z.tagName==="LI")$++}),$}}},attributes:{type:String,reversed:Boolean,start:{type:"long",default:function(){if(this.reversed)return this._numitems;else return 1}},compact:Boolean}});E({tag:"object",name:"HTMLObjectElement",ctor:function $(Z,Y,z){G1.call(this,Z,Y,z)},props:W1,attributes:{data:F0,type:String,name:String,useMap:String,typeMustMatch:Boolean,width:String,height:String,align:String,archive:String,code:String,declare:Boolean,hspace:{type:"unsigned long",default:0},standby:String,vspace:{type:"unsigned long",default:0},codeBase:F0,codeType:String,border:{type:String,treatNullAsEmptyString:!0}}});E({tag:"optgroup",name:"HTMLOptGroupElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{disabled:Boolean,label:String}});E({tag:"option",name:"HTMLOptionElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},props:{form:{get:function(){var $=this.parentNode;while($&&$.nodeType===e$.ELEMENT_NODE){if($.localName==="select")return $.form;$=$.parentNode}}},value:{get:function(){return this._getattr("value")||this.text},set:function($){this._setattr("value",$)}},text:{get:function(){return this.textContent.replace(/[ \t\n\f\r]+/g," ").trim()},set:function($){this.textContent=$}}},attributes:{disabled:Boolean,defaultSelected:{name:"selected",type:Boolean},label:String}});E({tag:"output",name:"HTMLOutputElement",ctor:function $(Z,Y,z){G1.call(this,Z,Y,z)},props:W1,attributes:{name:String}});E({tag:"p",name:"HTMLParagraphElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{align:String}});E({tag:"param",name:"HTMLParamElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{name:String,value:String,type:String,valueType:String}});E({tags:["pre","listing","xmp"],name:"HTMLPreElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{width:{type:"long",default:0}}});E({tag:"progress",name:"HTMLProgressElement",ctor:function $(Z,Y,z){G1.call(this,Z,Y,z)},props:W1,attributes:{max:{type:Number,float:!0,default:1,min:0}}});E({tags:["q","blockquote"],name:"HTMLQuoteElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{cite:F0}});E({tag:"script",name:"HTMLScriptElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},props:{text:{get:function(){var $="";for(var Z=0,Y=this.childNodes.length;Z<Y;Z++){var z=this.childNodes[Z];if(z.nodeType===e$.TEXT_NODE)$+=z._data}return $},set:function($){if(this.removeChildren(),$!==null&&$!=="")this.appendChild(this.ownerDocument.createTextNode($))}}},attributes:{src:F0,type:String,charset:String,referrerPolicy:F8,defer:Boolean,async:Boolean,nomodule:Boolean,crossOrigin:t6,nonce:String,integrity:String}});E({tag:"select",name:"HTMLSelectElement",ctor:function $(Z,Y,z){G1.call(this,Z,Y,z)},props:{form:W1.form,options:{get:function(){return this.getElementsByTagName("option")}}},attributes:{autocomplete:String,name:String,disabled:Boolean,autofocus:Boolean,multiple:Boolean,required:Boolean,size:{type:"unsigned long",default:0}}});E({tag:"span",name:"HTMLSpanElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)}});E({tag:"style",name:"HTMLStyleElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{media:String,type:String,scoped:Boolean}});E({tag:"caption",name:"HTMLTableCaptionElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{align:String}});E({name:"HTMLTableCellElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{colSpan:{type:"unsigned long",default:1},rowSpan:{type:"unsigned long",default:1},scope:{type:["row","col","rowgroup","colgroup"],missing:""},abbr:String,align:String,axis:String,height:String,width:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},noWrap:Boolean,vAlign:String,bgColor:{type:String,treatNullAsEmptyString:!0}}});E({tags:["col","colgroup"],name:"HTMLTableColElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{span:{type:"limited unsigned long with fallback",default:1,min:1},align:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},vAlign:String,width:String}});E({tag:"table",name:"HTMLTableElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},props:{rows:{get:function(){return this.getElementsByTagName("tr")}}},attributes:{align:String,border:String,frame:String,rules:String,summary:String,width:String,bgColor:{type:String,treatNullAsEmptyString:!0},cellPadding:{type:String,treatNullAsEmptyString:!0},cellSpacing:{type:String,treatNullAsEmptyString:!0}}});E({tag:"template",name:"HTMLTemplateElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z),this._contentFragment=Z._templateDoc.createDocumentFragment()},props:{content:{get:function(){return this._contentFragment}},serialize:{value:function(){return this.content.serialize()}}}});E({tag:"tr",name:"HTMLTableRowElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},props:{cells:{get:function(){return this.querySelectorAll("td,th")}}},attributes:{align:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},vAlign:String,bgColor:{type:String,treatNullAsEmptyString:!0}}});E({tags:["thead","tfoot","tbody"],name:"HTMLTableSectionElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},props:{rows:{get:function(){return this.getElementsByTagName("tr")}}},attributes:{align:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},vAlign:String}});E({tag:"textarea",name:"HTMLTextAreaElement",ctor:function $(Z,Y,z){G1.call(this,Z,Y,z)},props:{form:W1.form,type:{get:function(){return"textarea"}},defaultValue:{get:function(){return this.textContent},set:function($){this.textContent=$}},value:{get:function(){return this.defaultValue},set:function($){this.defaultValue=$}},textLength:{get:function(){return this.value.length}}},attributes:{autocomplete:String,name:String,disabled:Boolean,autofocus:Boolean,placeholder:String,wrap:String,dirName:String,required:Boolean,readOnly:Boolean,rows:{type:"limited unsigned long with fallback",default:2},cols:{type:"limited unsigned long with fallback",default:20},maxLength:{type:"unsigned long",min:0,setmin:0,default:-1},minLength:{type:"unsigned long",min:0,setmin:0,default:-1},inputMode:{type:["verbatim","latin","latin-name","latin-prose","full-width-latin","kana","kana-name","katakana","numeric","tel","email","url"],missing:""}}});E({tag:"time",name:"HTMLTimeElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{dateTime:String,pubDate:Boolean}});E({tag:"title",name:"HTMLTitleElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},props:{text:{get:function(){return this.textContent}}}});E({tag:"ul",name:"HTMLUListElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{type:String,compact:Boolean}});E({name:"HTMLMediaElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{src:F0,crossOrigin:t6,preload:{type:["metadata","none","auto",{value:"",alias:"auto"}],missing:"auto"},loop:Boolean,autoplay:Boolean,mediaGroup:String,controls:Boolean,defaultMuted:{name:"muted",type:Boolean}}});E({name:"HTMLAudioElement",tag:"audio",superclass:U1.HTMLMediaElement,ctor:function $(Z,Y,z){U1.HTMLMediaElement.call(this,Z,Y,z)}});E({name:"HTMLVideoElement",tag:"video",superclass:U1.HTMLMediaElement,ctor:function $(Z,Y,z){U1.HTMLMediaElement.call(this,Z,Y,z)},attributes:{poster:F0,width:{type:"unsigned long",min:0,default:0},height:{type:"unsigned long",min:0,default:0}}});E({tag:"td",name:"HTMLTableDataCellElement",superclass:U1.HTMLTableCellElement,ctor:function $(Z,Y,z){U1.HTMLTableCellElement.call(this,Z,Y,z)}});E({tag:"th",name:"HTMLTableHeaderCellElement",superclass:U1.HTMLTableCellElement,ctor:function $(Z,Y,z){U1.HTMLTableCellElement.call(this,Z,Y,z)}});E({tag:"frameset",name:"HTMLFrameSetElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)}});E({tag:"frame",name:"HTMLFrameElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)}});E({tag:"canvas",name:"HTMLCanvasElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},props:{getContext:{value:i0.nyi},probablySupportsContext:{value:i0.nyi},setContext:{value:i0.nyi},transferControlToProxy:{value:i0.nyi},toDataURL:{value:i0.nyi},toBlob:{value:i0.nyi}},attributes:{width:{type:"unsigned long",default:300},height:{type:"unsigned long",default:150}}});E({tag:"dialog",name:"HTMLDialogElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},props:{show:{value:i0.nyi},showModal:{value:i0.nyi},close:{value:i0.nyi}},attributes:{open:Boolean,returnValue:String}});E({tag:"menuitem",name:"HTMLMenuItemElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},props:{_label:{get:function(){var $=this._getattr("label");if($!==null&&$!=="")return $;return $=this.textContent,$.replace(/[ \t\n\f\r]+/g," ").trim()}},label:{get:function(){var $=this._getattr("label");if($!==null)return $;return this._label},set:function($){this._setattr("label",$)}}},attributes:{type:{type:["command","checkbox","radio"],missing:"command"},icon:F0,disabled:Boolean,checked:Boolean,radiogroup:String,default:Boolean}});E({tag:"source",name:"HTMLSourceElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{srcset:String,sizes:String,media:String,src:F0,type:String,width:String,height:String}});E({tag:"track",name:"HTMLTrackElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{src:F0,srclang:String,label:String,default:Boolean,kind:{type:["subtitles","captions","descriptions","chapters","metadata"],missing:"subtitles",invalid:"metadata"}},props:{NONE:{get:function(){return 0}},LOADING:{get:function(){return 1}},LOADED:{get:function(){return 2}},ERROR:{get:function(){return 3}},readyState:{get:i0.nyi},track:{get:i0.nyi}}});E({tag:"font",name:"HTMLFontElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{color:{type:String,treatNullAsEmptyString:!0},face:{type:String},size:{type:String}}});E({tag:"dir",name:"HTMLDirectoryElement",ctor:function $(Z,Y,z){b.call(this,Z,Y,z)},attributes:{compact:Boolean}});E({tags:["abbr","address","article","aside","b","bdi","bdo","cite","content","code","dd","dfn","dt","em","figcaption","figure","footer","header","hgroup","i","kbd","main","mark","nav","noscript","rb","rp","rt","rtc","ruby","s","samp","section","small","strong","sub","summary","sup","u","var","wbr","acronym","basefont","big","center","nobr","noembed","noframes","plaintext","strike","tt"]})});var YZ=N((MV)=>{var yz=j8(),KV=t$(),FV=K0(),DV=a6(),OV=MV.elements={},kz=Object.create(null);MV.createElement=function($,Z,Y){var z=kz[Z]||ZZ;return new z($,Z,Y)};function $Z($){return KV($,ZZ,OV,kz)}var ZZ=$Z({superclass:yz,name:"SVGElement",ctor:function $(Z,Y,z){yz.call(this,Z,Y,FV.NAMESPACE.SVG,z)},props:{style:{get:function(){if(!this._style)this._style=new DV(this);return this._style}}}});$Z({name:"SVGSVGElement",ctor:function $(Z,Y,z){ZZ.call(this,Z,Y,z)},tag:"svg",props:{createSVGRect:{value:function(){return MV.createElement(this.ownerDocument,"rect",null)}}}});$Z({tags:["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"]})});var gz=N((XH,hz)=>{hz.exports={VALUE:1,ATTR:2,REMOVE_ATTR:3,REMOVE:4,MOVE:5,INSERT:6}});var Z9=N((QH,oz)=>{oz.exports=e8;var y0=N0(),SV=r1(),cz=v6(),v1=j8(),LV=k$(),IV=h$(),t8=W8(),UV=v$(),AV=m$(),PV=$6(),TV=Wz(),RV=qz(),vz=n8(),pz=r6(),mz=c6(),CV=r$(),$9=p6(),zZ=e6(),EV=YZ(),Z0=K0(),D8=gz(),M8=Z0.NAMESPACE,XZ=f6().isApiWritable;function e8($,Z){cz.call(this),this.nodeType=y0.DOCUMENT_NODE,this.isHTML=$,this._address=Z||"about:blank",this.readyState="loading",this.implementation=new PV(this),this.ownerDocument=null,this._contentType=$?"text/html":"application/xml",this.doctype=null,this.documentElement=null,this._templateDocCache=null,this._nodeIterators=null,this._nid=1,this._nextnid=2,this._nodes=[null,this],this.byId=Object.create(null),this.modclock=0}var NV={event:"Event",customevent:"CustomEvent",uievent:"UIEvent",mouseevent:"MouseEvent"},wV={events:"event",htmlevents:"event",mouseevents:"mouseevent",mutationevents:"mutationevent",uievents:"uievent"},O8=function($,Z,Y){return{get:function(){var z=$.call(this);if(z)return z[Z];return Y},set:function(z){var X=$.call(this);if(X)X[Z]=z}}};function uz($,Z){var Y,z,X;if($==="")$=null;if(!$9.isValidQName(Z))Z0.InvalidCharacterError();if(Y=null,z=Z,X=Z.indexOf(":"),X>=0)Y=Z.substring(0,X),z=Z.substring(X+1);if(Y!==null&&$===null)Z0.NamespaceError();if(Y==="xml"&&$!==M8.XML)Z0.NamespaceError();if((Y==="xmlns"||Z==="xmlns")&&$!==M8.XMLNS)Z0.NamespaceError();if($===M8.XMLNS&&!(Y==="xmlns"||Z==="xmlns"))Z0.NamespaceError();return{namespace:$,prefix:Y,localName:z}}e8.prototype=Object.create(cz.prototype,{_setMutationHandler:{value:function($){this.mutationHandler=$}},_dispatchRendererEvent:{value:function($,Z,Y){var z=this._nodes[$];if(!z)return;z._dispatchEvent(new t8(Z,Y),!0)}},nodeName:{value:"#document"},nodeValue:{get:function(){return null},set:function(){}},documentURI:{get:function(){return this._address},set:Z0.nyi},compatMode:{get:function(){return this._quirks?"BackCompat":"CSS1Compat"}},createTextNode:{value:function($){return new LV(this,String($))}},createComment:{value:function($){return new IV(this,$)}},createDocumentFragment:{value:function(){return new UV(this)}},createProcessingInstruction:{value:function($,Z){if(!$9.isValidName($)||Z.indexOf("?>")!==-1)Z0.InvalidCharacterError();return new AV(this,$,Z)}},createAttribute:{value:function($){if($=String($),!$9.isValidName($))Z0.InvalidCharacterError();if(this.isHTML)$=Z0.toASCIILowerCase($);return new v1._Attr(null,$,null,null,"")}},createAttributeNS:{value:function($,Z){$=$===null||$===void 0||$===""?null:String($),Z=String(Z);var Y=uz($,Z);return new v1._Attr(null,Y.localName,Y.prefix,Y.namespace,"")}},createElement:{value:function($){if($=String($),!$9.isValidName($))Z0.InvalidCharacterError();if(this.isHTML){if(/[A-Z]/.test($))$=Z0.toASCIILowerCase($);return zZ.createElement(this,$,null)}else if(this.contentType==="application/xhtml+xml")return zZ.createElement(this,$,null);else return new v1(this,$,null,null)},writable:XZ},createElementNS:{value:function($,Z){$=$===null||$===void 0||$===""?null:String($),Z=String(Z);var Y=uz($,Z);return this._createElementNS(Y.localName,Y.namespace,Y.prefix)},writable:XZ},_createElementNS:{value:function($,Z,Y){if(Z===M8.HTML)return zZ.createElement(this,$,Y);else if(Z===M8.SVG)return EV.createElement(this,$,Y);return new v1(this,$,Z,Y)}},createEvent:{value:function $(Z){Z=Z.toLowerCase();var Y=wV[Z]||Z,z=CV[NV[Y]];if(z){var X=new z;return X._initialized=!1,X}else Z0.NotSupportedError()}},createTreeWalker:{value:function($,Z,Y){if(!$)throw new TypeError("root argument is required");if(!($ instanceof y0))throw new TypeError("root not a node");return Z=Z===void 0?vz.SHOW_ALL:+Z,Y=Y===void 0?null:Y,new TV($,Z,Y)}},createNodeIterator:{value:function($,Z,Y){if(!$)throw new TypeError("root argument is required");if(!($ instanceof y0))throw new TypeError("root not a node");return Z=Z===void 0?vz.SHOW_ALL:+Z,Y=Y===void 0?null:Y,new RV($,Z,Y)}},_attachNodeIterator:{value:function($){if(!this._nodeIterators)this._nodeIterators=[];this._nodeIterators.push($)}},_detachNodeIterator:{value:function($){var Z=this._nodeIterators.indexOf($);this._nodeIterators.splice(Z,1)}},_preremoveNodeIterators:{value:function($){if(this._nodeIterators)this._nodeIterators.forEach(function(Z){Z._preremove($)})}},_updateDocTypeElement:{value:function $(){this.doctype=this.documentElement=null;for(var Z=this.firstChild;Z!==null;Z=Z.nextSibling)if(Z.nodeType===y0.DOCUMENT_TYPE_NODE)this.doctype=Z;else if(Z.nodeType===y0.ELEMENT_NODE)this.documentElement=Z}},insertBefore:{value:function $(Z,Y){return y0.prototype.insertBefore.call(this,Z,Y),this._updateDocTypeElement(),Z}},replaceChild:{value:function $(Z,Y){return y0.prototype.replaceChild.call(this,Z,Y),this._updateDocTypeElement(),Y}},removeChild:{value:function $(Z){return y0.prototype.removeChild.call(this,Z),this._updateDocTypeElement(),Z}},getElementById:{value:function($){var Z=this.byId[$];if(!Z)return null;if(Z instanceof A1)return Z.getFirst();return Z}},_hasMultipleElementsWithId:{value:function($){return this.byId[$]instanceof A1}},getElementsByName:{value:v1.prototype.getElementsByName},getElementsByTagName:{value:v1.prototype.getElementsByTagName},getElementsByTagNameNS:{value:v1.prototype.getElementsByTagNameNS},getElementsByClassName:{value:v1.prototype.getElementsByClassName},adoptNode:{value:function $(Z){if(Z.nodeType===y0.DOCUMENT_NODE)Z0.NotSupportedError();if(Z.nodeType===y0.ATTRIBUTE_NODE)return Z;if(Z.parentNode)Z.parentNode.removeChild(Z);if(Z.ownerDocument!==this)sz(Z,this);return Z}},importNode:{value:function $(Z,Y){return this.adoptNode(Z.cloneNode(Y))},writable:XZ},origin:{get:function $(){return null}},characterSet:{get:function $(){return"UTF-8"}},contentType:{get:function $(){return this._contentType}},URL:{get:function $(){return this._address}},domain:{get:Z0.nyi,set:Z0.nyi},referrer:{get:Z0.nyi},cookie:{get:Z0.nyi,set:Z0.nyi},lastModified:{get:Z0.nyi},location:{get:function(){return this.defaultView?this.defaultView.location:null},set:Z0.nyi},_titleElement:{get:function(){return this.getElementsByTagName("title").item(0)||null}},title:{get:function(){var $=this._titleElement,Z=$?$.textContent:"";return Z.replace(/[ \t\n\r\f]+/g," ").replace(/(^ )|( $)/g,"")},set:function($){var Z=this._titleElement,Y=this.head;if(!Z&&!Y)return;if(!Z)Z=this.createElement("title"),Y.appendChild(Z);Z.textContent=$}},dir:O8(function(){var $=this.documentElement;if($&&$.tagName==="HTML")return $},"dir",""),fgColor:O8(function(){return this.body},"text",""),linkColor:O8(function(){return this.body},"link",""),vlinkColor:O8(function(){return this.body},"vLink",""),alinkColor:O8(function(){return this.body},"aLink",""),bgColor:O8(function(){return this.body},"bgColor",""),charset:{get:function(){return this.characterSet}},inputEncoding:{get:function(){return this.characterSet}},scrollingElement:{get:function(){return this._quirks?this.body:this.documentElement}},body:{get:function(){return dz(this.documentElement,"body")},set:Z0.nyi},head:{get:function(){return dz(this.documentElement,"head")}},images:{get:Z0.nyi},embeds:{get:Z0.nyi},plugins:{get:Z0.nyi},links:{get:Z0.nyi},forms:{get:Z0.nyi},scripts:{get:Z0.nyi},applets:{get:function(){return[]}},activeElement:{get:function(){return null}},innerHTML:{get:function(){return this.serialize()},set:Z0.nyi},outerHTML:{get:function(){return this.serialize()},set:Z0.nyi},write:{value:function($){if(!this.isHTML)Z0.InvalidStateError();if(!this._parser)return;if(!this._parser);var Z=arguments.join("");this._parser.parse(Z)}},writeln:{value:function $(Z){this.write(Array.prototype.join.call(arguments,"")+`
|
|
29
|
-
`)}},open:{value:function(){this.documentElement=null}},close:{value:function(){if(this.readyState="interactive",this._dispatchEvent(new t8("readystatechange"),!0),this._dispatchEvent(new t8("DOMContentLoaded"),!0),this.readyState="complete",this._dispatchEvent(new t8("readystatechange"),!0),this.defaultView)this.defaultView._dispatchEvent(new t8("load"),!0)}},clone:{value:function $(){var Z=new e8(this.isHTML,this._address);return Z._quirks=this._quirks,Z._contentType=this._contentType,Z}},cloneNode:{value:function $(Z){var Y=y0.prototype.cloneNode.call(this,!1);if(Z)for(var z=this.firstChild;z!==null;z=z.nextSibling)Y._appendChild(Y.importNode(z,!0));return Y._updateDocTypeElement(),Y}},isEqual:{value:function $(Z){return!0}},mutateValue:{value:function($){if(this.mutationHandler)this.mutationHandler({type:D8.VALUE,target:$,data:$.data})}},mutateAttr:{value:function($,Z){if(this.mutationHandler)this.mutationHandler({type:D8.ATTR,target:$.ownerElement,attr:$})}},mutateRemoveAttr:{value:function($){if(this.mutationHandler)this.mutationHandler({type:D8.REMOVE_ATTR,target:$.ownerElement,attr:$})}},mutateRemove:{value:function($){if(this.mutationHandler)this.mutationHandler({type:D8.REMOVE,target:$.parentNode,node:$});iz($)}},mutateInsert:{value:function($){if(lz($),this.mutationHandler)this.mutationHandler({type:D8.INSERT,target:$.parentNode,node:$})}},mutateMove:{value:function($){if(this.mutationHandler)this.mutationHandler({type:D8.MOVE,target:$})}},addId:{value:function $(Z,Y){var z=this.byId[Z];if(!z)this.byId[Z]=Y;else{if(!(z instanceof A1))z=new A1(z),this.byId[Z]=z;z.add(Y)}}},delId:{value:function $(Z,Y){var z=this.byId[Z];if(Z0.assert(z),z instanceof A1){if(z.del(Y),z.length===1)this.byId[Z]=z.downgrade()}else this.byId[Z]=void 0}},_resolve:{value:function($){return new pz(this._documentBaseURL).resolve($)}},_documentBaseURL:{get:function(){var $=this._address;if($==="about:blank")$="/";var Z=this.querySelector("base[href]");if(Z)return new pz($).resolve(Z.getAttribute("href"));return $}},_templateDoc:{get:function(){if(!this._templateDocCache){var $=new e8(this.isHTML,this._address);this._templateDocCache=$._templateDocCache=$}return this._templateDocCache}},querySelector:{value:function($){return mz($,this)[0]}},querySelectorAll:{value:function($){var Z=mz($,this);return Z.item?Z:new SV(Z)}}});var bV=["abort","canplay","canplaythrough","change","click","contextmenu","cuechange","dblclick","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","ended","input","invalid","keydown","keypress","keyup","loadeddata","loadedmetadata","loadstart","mousedown","mousemove","mouseout","mouseover","mouseup","mousewheel","pause","play","playing","progress","ratechange","readystatechange","reset","seeked","seeking","select","show","stalled","submit","suspend","timeupdate","volumechange","waiting","blur","error","focus","load","scroll"];bV.forEach(function($){Object.defineProperty(e8.prototype,"on"+$,{get:function(){return this._getEventHandler($)},set:function(Z){this._setEventHandler($,Z)}})});function dz($,Z){if($&&$.isHTML){for(var Y=$.firstChild;Y!==null;Y=Y.nextSibling)if(Y.nodeType===y0.ELEMENT_NODE&&Y.localName===Z&&Y.namespaceURI===M8.HTML)return Y}return null}function xV($){if($._nid=$.ownerDocument._nextnid++,$.ownerDocument._nodes[$._nid]=$,$.nodeType===y0.ELEMENT_NODE){var Z=$.getAttribute("id");if(Z)$.ownerDocument.addId(Z,$);if($._roothook)$._roothook()}}function yV($){if($.nodeType===y0.ELEMENT_NODE){var Z=$.getAttribute("id");if(Z)$.ownerDocument.delId(Z,$)}$.ownerDocument._nodes[$._nid]=void 0,$._nid=void 0}function lz($){if(xV($),$.nodeType===y0.ELEMENT_NODE)for(var Z=$.firstChild;Z!==null;Z=Z.nextSibling)lz(Z)}function iz($){yV($);for(var Z=$.firstChild;Z!==null;Z=Z.nextSibling)iz(Z)}function sz($,Z){if($.ownerDocument=Z,$._lastModTime=void 0,Object.prototype.hasOwnProperty.call($,"_tagName"))$._tagName=void 0;for(var Y=$.firstChild;Y!==null;Y=Y.nextSibling)sz(Y,Z)}function A1($){this.nodes=Object.create(null),this.nodes[$._nid]=$,this.length=1,this.firstNode=void 0}A1.prototype.add=function($){if(!this.nodes[$._nid])this.nodes[$._nid]=$,this.length++,this.firstNode=void 0};A1.prototype.del=function($){if(this.nodes[$._nid])delete this.nodes[$._nid],this.length--,this.firstNode=void 0};A1.prototype.getFirst=function(){if(!this.firstNode){var $;for($ in this.nodes)if(this.firstNode===void 0||this.firstNode.compareDocumentPosition(this.nodes[$])&y0.DOCUMENT_POSITION_PRECEDING)this.firstNode=this.nodes[$]}return this.firstNode};A1.prototype.downgrade=function(){if(this.length===1){var $;for($ in this.nodes)return this.nodes[$]}return this}});var z9=N((GH,rz)=>{rz.exports=Y9;var kV=N0(),nz=x$(),fV=l6();function Y9($,Z,Y,z){nz.call(this),this.nodeType=kV.DOCUMENT_TYPE_NODE,this.ownerDocument=$||null,this.name=Z,this.publicId=Y||"",this.systemId=z||""}Y9.prototype=Object.create(nz.prototype,{nodeName:{get:function(){return this.name}},nodeValue:{get:function(){return null},set:function(){}},clone:{value:function $(){return new Y9(this.ownerDocument,this.name,this.publicId,this.systemId)}},isEqual:{value:function $(Z){return this.name===Z.name&&this.publicId===Z.publicId&&this.systemId===Z.systemId}}});Object.defineProperties(Y9.prototype,fV)});var _9=N((WH,MX)=>{MX.exports=e;var hV=Z9(),gV=z9(),QZ=N0(),k=K0().NAMESPACE,BX=e6(),Q0=BX.elements,t1=Function.prototype.apply.bind(Array.prototype.push),X9=-1,S8=1,k0=2,a=3,K1=4,vV=5,pV=[],mV=/^HTML$|^-\/\/W3O\/\/DTD W3 HTML Strict 3\.0\/\/EN\/\/$|^-\/W3C\/DTD HTML 4\.0 Transitional\/EN$|^\+\/\/Silmaril\/\/dtd html Pro v0r11 19970101\/\/|^-\/\/AdvaSoft Ltd\/\/DTD HTML 3\.0 asWedit \+ extensions\/\/|^-\/\/AS\/\/DTD HTML 3\.0 asWedit \+ extensions\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Level 1\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Level 2\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Strict Level 1\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Strict Level 2\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Strict\/\/|^-\/\/IETF\/\/DTD HTML 2\.0\/\/|^-\/\/IETF\/\/DTD HTML 2\.1E\/\/|^-\/\/IETF\/\/DTD HTML 3\.0\/\/|^-\/\/IETF\/\/DTD HTML 3\.2 Final\/\/|^-\/\/IETF\/\/DTD HTML 3\.2\/\/|^-\/\/IETF\/\/DTD HTML 3\/\/|^-\/\/IETF\/\/DTD HTML Level 0\/\/|^-\/\/IETF\/\/DTD HTML Level 1\/\/|^-\/\/IETF\/\/DTD HTML Level 2\/\/|^-\/\/IETF\/\/DTD HTML Level 3\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 0\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 1\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 2\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 3\/\/|^-\/\/IETF\/\/DTD HTML Strict\/\/|^-\/\/IETF\/\/DTD HTML\/\/|^-\/\/Metrius\/\/DTD Metrius Presentational\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 2\.0 HTML Strict\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 2\.0 HTML\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 2\.0 Tables\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 3\.0 HTML Strict\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 3\.0 HTML\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 3\.0 Tables\/\/|^-\/\/Netscape Comm\. Corp\.\/\/DTD HTML\/\/|^-\/\/Netscape Comm\. Corp\.\/\/DTD Strict HTML\/\/|^-\/\/O'Reilly and Associates\/\/DTD HTML 2\.0\/\/|^-\/\/O'Reilly and Associates\/\/DTD HTML Extended 1\.0\/\/|^-\/\/O'Reilly and Associates\/\/DTD HTML Extended Relaxed 1\.0\/\/|^-\/\/SoftQuad Software\/\/DTD HoTMetaL PRO 6\.0::19990601::extensions to HTML 4\.0\/\/|^-\/\/SoftQuad\/\/DTD HoTMetaL PRO 4\.0::19971010::extensions to HTML 4\.0\/\/|^-\/\/Spyglass\/\/DTD HTML 2\.0 Extended\/\/|^-\/\/SQ\/\/DTD HTML 2\.0 HoTMetaL \+ extensions\/\/|^-\/\/Sun Microsystems Corp\.\/\/DTD HotJava HTML\/\/|^-\/\/Sun Microsystems Corp\.\/\/DTD HotJava Strict HTML\/\/|^-\/\/W3C\/\/DTD HTML 3 1995-03-24\/\/|^-\/\/W3C\/\/DTD HTML 3\.2 Draft\/\/|^-\/\/W3C\/\/DTD HTML 3\.2 Final\/\/|^-\/\/W3C\/\/DTD HTML 3\.2\/\/|^-\/\/W3C\/\/DTD HTML 3\.2S Draft\/\/|^-\/\/W3C\/\/DTD HTML 4\.0 Frameset\/\/|^-\/\/W3C\/\/DTD HTML 4\.0 Transitional\/\/|^-\/\/W3C\/\/DTD HTML Experimental 19960712\/\/|^-\/\/W3C\/\/DTD HTML Experimental 970421\/\/|^-\/\/W3C\/\/DTD W3 HTML\/\/|^-\/\/W3O\/\/DTD W3 HTML 3\.0\/\/|^-\/\/WebTechs\/\/DTD Mozilla HTML 2\.0\/\/|^-\/\/WebTechs\/\/DTD Mozilla HTML\/\//i,uV="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",az=/^-\/\/W3C\/\/DTD HTML 4\.01 Frameset\/\/|^-\/\/W3C\/\/DTD HTML 4\.01 Transitional\/\//i,dV=/^-\/\/W3C\/\/DTD XHTML 1\.0 Frameset\/\/|^-\/\/W3C\/\/DTD XHTML 1\.0 Transitional\/\//i,$8=Object.create(null);$8[k.HTML]={__proto__:null,address:!0,applet:!0,area:!0,article:!0,aside:!0,base:!0,basefont:!0,bgsound:!0,blockquote:!0,body:!0,br:!0,button:!0,caption:!0,center:!0,col:!0,colgroup:!0,dd:!0,details:!0,dir:!0,div:!0,dl:!0,dt:!0,embed:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,frame:!0,frameset:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,head:!0,header:!0,hgroup:!0,hr:!0,html:!0,iframe:!0,img:!0,input:!0,li:!0,link:!0,listing:!0,main:!0,marquee:!0,menu:!0,meta:!0,nav:!0,noembed:!0,noframes:!0,noscript:!0,object:!0,ol:!0,p:!0,param:!0,plaintext:!0,pre:!0,script:!0,section:!0,select:!0,source:!0,style:!0,summary:!0,table:!0,tbody:!0,td:!0,template:!0,textarea:!0,tfoot:!0,th:!0,thead:!0,title:!0,tr:!0,track:!0,ul:!0,wbr:!0,xmp:!0};$8[k.SVG]={__proto__:null,foreignObject:!0,desc:!0,title:!0};$8[k.MATHML]={__proto__:null,mi:!0,mo:!0,mn:!0,ms:!0,mtext:!0,"annotation-xml":!0};var VZ=Object.create(null);VZ[k.HTML]={__proto__:null,address:!0,div:!0,p:!0};var HX=Object.create(null);HX[k.HTML]={__proto__:null,dd:!0,dt:!0};var L8=Object.create(null);L8[k.HTML]={__proto__:null,table:!0,thead:!0,tbody:!0,tfoot:!0,tr:!0};var qX=Object.create(null);qX[k.HTML]={__proto__:null,dd:!0,dt:!0,li:!0,menuitem:!0,optgroup:!0,option:!0,p:!0,rb:!0,rp:!0,rt:!0,rtc:!0};var jX=Object.create(null);jX[k.HTML]={__proto__:null,caption:!0,colgroup:!0,dd:!0,dt:!0,li:!0,optgroup:!0,option:!0,p:!0,rb:!0,rp:!0,rt:!0,rtc:!0,tbody:!0,td:!0,tfoot:!0,th:!0,thead:!0,tr:!0};var W9=Object.create(null);W9[k.HTML]={__proto__:null,table:!0,template:!0,html:!0};var V9=Object.create(null);V9[k.HTML]={__proto__:null,tbody:!0,tfoot:!0,thead:!0,template:!0,html:!0};var JZ=Object.create(null);JZ[k.HTML]={__proto__:null,tr:!0,template:!0,html:!0};var KX=Object.create(null);KX[k.HTML]={__proto__:null,button:!0,fieldset:!0,input:!0,keygen:!0,object:!0,output:!0,select:!0,textarea:!0,img:!0};var F1=Object.create(null);F1[k.HTML]={__proto__:null,applet:!0,caption:!0,html:!0,table:!0,td:!0,th:!0,marquee:!0,object:!0,template:!0};F1[k.MATHML]={__proto__:null,mi:!0,mo:!0,mn:!0,ms:!0,mtext:!0,"annotation-xml":!0};F1[k.SVG]={__proto__:null,foreignObject:!0,desc:!0,title:!0};var J9=Object.create(F1);J9[k.HTML]=Object.create(F1[k.HTML]);J9[k.HTML].ol=!0;J9[k.HTML].ul=!0;var _Z=Object.create(F1);_Z[k.HTML]=Object.create(F1[k.HTML]);_Z[k.HTML].button=!0;var FX=Object.create(null);FX[k.HTML]={__proto__:null,html:!0,table:!0,template:!0};var cV=Object.create(null);cV[k.HTML]={__proto__:null,optgroup:!0,option:!0};var DX=Object.create(null);DX[k.MATHML]={__proto__:null,mi:!0,mo:!0,mn:!0,ms:!0,mtext:!0};var OX=Object.create(null);OX[k.SVG]={__proto__:null,foreignObject:!0,desc:!0,title:!0};var tz={__proto__:null,"xlink:actuate":k.XLINK,"xlink:arcrole":k.XLINK,"xlink:href":k.XLINK,"xlink:role":k.XLINK,"xlink:show":k.XLINK,"xlink:title":k.XLINK,"xlink:type":k.XLINK,"xml:base":k.XML,"xml:lang":k.XML,"xml:space":k.XML,xmlns:k.XMLNS,"xmlns:xlink":k.XMLNS},ez={__proto__:null,attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},$X={__proto__:null,altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},ZX={__proto__:null,0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},lV={__proto__:null,AElig:198,"AElig;":198,AMP:38,"AMP;":38,Aacute:193,"Aacute;":193,"Abreve;":258,Acirc:194,"Acirc;":194,"Acy;":1040,"Afr;":[55349,56580],Agrave:192,"Agrave;":192,"Alpha;":913,"Amacr;":256,"And;":10835,"Aogon;":260,"Aopf;":[55349,56632],"ApplyFunction;":8289,Aring:197,"Aring;":197,"Ascr;":[55349,56476],"Assign;":8788,Atilde:195,"Atilde;":195,Auml:196,"Auml;":196,"Backslash;":8726,"Barv;":10983,"Barwed;":8966,"Bcy;":1041,"Because;":8757,"Bernoullis;":8492,"Beta;":914,"Bfr;":[55349,56581],"Bopf;":[55349,56633],"Breve;":728,"Bscr;":8492,"Bumpeq;":8782,"CHcy;":1063,COPY:169,"COPY;":169,"Cacute;":262,"Cap;":8914,"CapitalDifferentialD;":8517,"Cayleys;":8493,"Ccaron;":268,Ccedil:199,"Ccedil;":199,"Ccirc;":264,"Cconint;":8752,"Cdot;":266,"Cedilla;":184,"CenterDot;":183,"Cfr;":8493,"Chi;":935,"CircleDot;":8857,"CircleMinus;":8854,"CirclePlus;":8853,"CircleTimes;":8855,"ClockwiseContourIntegral;":8754,"CloseCurlyDoubleQuote;":8221,"CloseCurlyQuote;":8217,"Colon;":8759,"Colone;":10868,"Congruent;":8801,"Conint;":8751,"ContourIntegral;":8750,"Copf;":8450,"Coproduct;":8720,"CounterClockwiseContourIntegral;":8755,"Cross;":10799,"Cscr;":[55349,56478],"Cup;":8915,"CupCap;":8781,"DD;":8517,"DDotrahd;":10513,"DJcy;":1026,"DScy;":1029,"DZcy;":1039,"Dagger;":8225,"Darr;":8609,"Dashv;":10980,"Dcaron;":270,"Dcy;":1044,"Del;":8711,"Delta;":916,"Dfr;":[55349,56583],"DiacriticalAcute;":180,"DiacriticalDot;":729,"DiacriticalDoubleAcute;":733,"DiacriticalGrave;":96,"DiacriticalTilde;":732,"Diamond;":8900,"DifferentialD;":8518,"Dopf;":[55349,56635],"Dot;":168,"DotDot;":8412,"DotEqual;":8784,"DoubleContourIntegral;":8751,"DoubleDot;":168,"DoubleDownArrow;":8659,"DoubleLeftArrow;":8656,"DoubleLeftRightArrow;":8660,"DoubleLeftTee;":10980,"DoubleLongLeftArrow;":10232,"DoubleLongLeftRightArrow;":10234,"DoubleLongRightArrow;":10233,"DoubleRightArrow;":8658,"DoubleRightTee;":8872,"DoubleUpArrow;":8657,"DoubleUpDownArrow;":8661,"DoubleVerticalBar;":8741,"DownArrow;":8595,"DownArrowBar;":10515,"DownArrowUpArrow;":8693,"DownBreve;":785,"DownLeftRightVector;":10576,"DownLeftTeeVector;":10590,"DownLeftVector;":8637,"DownLeftVectorBar;":10582,"DownRightTeeVector;":10591,"DownRightVector;":8641,"DownRightVectorBar;":10583,"DownTee;":8868,"DownTeeArrow;":8615,"Downarrow;":8659,"Dscr;":[55349,56479],"Dstrok;":272,"ENG;":330,ETH:208,"ETH;":208,Eacute:201,"Eacute;":201,"Ecaron;":282,Ecirc:202,"Ecirc;":202,"Ecy;":1069,"Edot;":278,"Efr;":[55349,56584],Egrave:200,"Egrave;":200,"Element;":8712,"Emacr;":274,"EmptySmallSquare;":9723,"EmptyVerySmallSquare;":9643,"Eogon;":280,"Eopf;":[55349,56636],"Epsilon;":917,"Equal;":10869,"EqualTilde;":8770,"Equilibrium;":8652,"Escr;":8496,"Esim;":10867,"Eta;":919,Euml:203,"Euml;":203,"Exists;":8707,"ExponentialE;":8519,"Fcy;":1060,"Ffr;":[55349,56585],"FilledSmallSquare;":9724,"FilledVerySmallSquare;":9642,"Fopf;":[55349,56637],"ForAll;":8704,"Fouriertrf;":8497,"Fscr;":8497,"GJcy;":1027,GT:62,"GT;":62,"Gamma;":915,"Gammad;":988,"Gbreve;":286,"Gcedil;":290,"Gcirc;":284,"Gcy;":1043,"Gdot;":288,"Gfr;":[55349,56586],"Gg;":8921,"Gopf;":[55349,56638],"GreaterEqual;":8805,"GreaterEqualLess;":8923,"GreaterFullEqual;":8807,"GreaterGreater;":10914,"GreaterLess;":8823,"GreaterSlantEqual;":10878,"GreaterTilde;":8819,"Gscr;":[55349,56482],"Gt;":8811,"HARDcy;":1066,"Hacek;":711,"Hat;":94,"Hcirc;":292,"Hfr;":8460,"HilbertSpace;":8459,"Hopf;":8461,"HorizontalLine;":9472,"Hscr;":8459,"Hstrok;":294,"HumpDownHump;":8782,"HumpEqual;":8783,"IEcy;":1045,"IJlig;":306,"IOcy;":1025,Iacute:205,"Iacute;":205,Icirc:206,"Icirc;":206,"Icy;":1048,"Idot;":304,"Ifr;":8465,Igrave:204,"Igrave;":204,"Im;":8465,"Imacr;":298,"ImaginaryI;":8520,"Implies;":8658,"Int;":8748,"Integral;":8747,"Intersection;":8898,"InvisibleComma;":8291,"InvisibleTimes;":8290,"Iogon;":302,"Iopf;":[55349,56640],"Iota;":921,"Iscr;":8464,"Itilde;":296,"Iukcy;":1030,Iuml:207,"Iuml;":207,"Jcirc;":308,"Jcy;":1049,"Jfr;":[55349,56589],"Jopf;":[55349,56641],"Jscr;":[55349,56485],"Jsercy;":1032,"Jukcy;":1028,"KHcy;":1061,"KJcy;":1036,"Kappa;":922,"Kcedil;":310,"Kcy;":1050,"Kfr;":[55349,56590],"Kopf;":[55349,56642],"Kscr;":[55349,56486],"LJcy;":1033,LT:60,"LT;":60,"Lacute;":313,"Lambda;":923,"Lang;":10218,"Laplacetrf;":8466,"Larr;":8606,"Lcaron;":317,"Lcedil;":315,"Lcy;":1051,"LeftAngleBracket;":10216,"LeftArrow;":8592,"LeftArrowBar;":8676,"LeftArrowRightArrow;":8646,"LeftCeiling;":8968,"LeftDoubleBracket;":10214,"LeftDownTeeVector;":10593,"LeftDownVector;":8643,"LeftDownVectorBar;":10585,"LeftFloor;":8970,"LeftRightArrow;":8596,"LeftRightVector;":10574,"LeftTee;":8867,"LeftTeeArrow;":8612,"LeftTeeVector;":10586,"LeftTriangle;":8882,"LeftTriangleBar;":10703,"LeftTriangleEqual;":8884,"LeftUpDownVector;":10577,"LeftUpTeeVector;":10592,"LeftUpVector;":8639,"LeftUpVectorBar;":10584,"LeftVector;":8636,"LeftVectorBar;":10578,"Leftarrow;":8656,"Leftrightarrow;":8660,"LessEqualGreater;":8922,"LessFullEqual;":8806,"LessGreater;":8822,"LessLess;":10913,"LessSlantEqual;":10877,"LessTilde;":8818,"Lfr;":[55349,56591],"Ll;":8920,"Lleftarrow;":8666,"Lmidot;":319,"LongLeftArrow;":10229,"LongLeftRightArrow;":10231,"LongRightArrow;":10230,"Longleftarrow;":10232,"Longleftrightarrow;":10234,"Longrightarrow;":10233,"Lopf;":[55349,56643],"LowerLeftArrow;":8601,"LowerRightArrow;":8600,"Lscr;":8466,"Lsh;":8624,"Lstrok;":321,"Lt;":8810,"Map;":10501,"Mcy;":1052,"MediumSpace;":8287,"Mellintrf;":8499,"Mfr;":[55349,56592],"MinusPlus;":8723,"Mopf;":[55349,56644],"Mscr;":8499,"Mu;":924,"NJcy;":1034,"Nacute;":323,"Ncaron;":327,"Ncedil;":325,"Ncy;":1053,"NegativeMediumSpace;":8203,"NegativeThickSpace;":8203,"NegativeThinSpace;":8203,"NegativeVeryThinSpace;":8203,"NestedGreaterGreater;":8811,"NestedLessLess;":8810,"NewLine;":10,"Nfr;":[55349,56593],"NoBreak;":8288,"NonBreakingSpace;":160,"Nopf;":8469,"Not;":10988,"NotCongruent;":8802,"NotCupCap;":8813,"NotDoubleVerticalBar;":8742,"NotElement;":8713,"NotEqual;":8800,"NotEqualTilde;":[8770,824],"NotExists;":8708,"NotGreater;":8815,"NotGreaterEqual;":8817,"NotGreaterFullEqual;":[8807,824],"NotGreaterGreater;":[8811,824],"NotGreaterLess;":8825,"NotGreaterSlantEqual;":[10878,824],"NotGreaterTilde;":8821,"NotHumpDownHump;":[8782,824],"NotHumpEqual;":[8783,824],"NotLeftTriangle;":8938,"NotLeftTriangleBar;":[10703,824],"NotLeftTriangleEqual;":8940,"NotLess;":8814,"NotLessEqual;":8816,"NotLessGreater;":8824,"NotLessLess;":[8810,824],"NotLessSlantEqual;":[10877,824],"NotLessTilde;":8820,"NotNestedGreaterGreater;":[10914,824],"NotNestedLessLess;":[10913,824],"NotPrecedes;":8832,"NotPrecedesEqual;":[10927,824],"NotPrecedesSlantEqual;":8928,"NotReverseElement;":8716,"NotRightTriangle;":8939,"NotRightTriangleBar;":[10704,824],"NotRightTriangleEqual;":8941,"NotSquareSubset;":[8847,824],"NotSquareSubsetEqual;":8930,"NotSquareSuperset;":[8848,824],"NotSquareSupersetEqual;":8931,"NotSubset;":[8834,8402],"NotSubsetEqual;":8840,"NotSucceeds;":8833,"NotSucceedsEqual;":[10928,824],"NotSucceedsSlantEqual;":8929,"NotSucceedsTilde;":[8831,824],"NotSuperset;":[8835,8402],"NotSupersetEqual;":8841,"NotTilde;":8769,"NotTildeEqual;":8772,"NotTildeFullEqual;":8775,"NotTildeTilde;":8777,"NotVerticalBar;":8740,"Nscr;":[55349,56489],Ntilde:209,"Ntilde;":209,"Nu;":925,"OElig;":338,Oacute:211,"Oacute;":211,Ocirc:212,"Ocirc;":212,"Ocy;":1054,"Odblac;":336,"Ofr;":[55349,56594],Ograve:210,"Ograve;":210,"Omacr;":332,"Omega;":937,"Omicron;":927,"Oopf;":[55349,56646],"OpenCurlyDoubleQuote;":8220,"OpenCurlyQuote;":8216,"Or;":10836,"Oscr;":[55349,56490],Oslash:216,"Oslash;":216,Otilde:213,"Otilde;":213,"Otimes;":10807,Ouml:214,"Ouml;":214,"OverBar;":8254,"OverBrace;":9182,"OverBracket;":9140,"OverParenthesis;":9180,"PartialD;":8706,"Pcy;":1055,"Pfr;":[55349,56595],"Phi;":934,"Pi;":928,"PlusMinus;":177,"Poincareplane;":8460,"Popf;":8473,"Pr;":10939,"Precedes;":8826,"PrecedesEqual;":10927,"PrecedesSlantEqual;":8828,"PrecedesTilde;":8830,"Prime;":8243,"Product;":8719,"Proportion;":8759,"Proportional;":8733,"Pscr;":[55349,56491],"Psi;":936,QUOT:34,"QUOT;":34,"Qfr;":[55349,56596],"Qopf;":8474,"Qscr;":[55349,56492],"RBarr;":10512,REG:174,"REG;":174,"Racute;":340,"Rang;":10219,"Rarr;":8608,"Rarrtl;":10518,"Rcaron;":344,"Rcedil;":342,"Rcy;":1056,"Re;":8476,"ReverseElement;":8715,"ReverseEquilibrium;":8651,"ReverseUpEquilibrium;":10607,"Rfr;":8476,"Rho;":929,"RightAngleBracket;":10217,"RightArrow;":8594,"RightArrowBar;":8677,"RightArrowLeftArrow;":8644,"RightCeiling;":8969,"RightDoubleBracket;":10215,"RightDownTeeVector;":10589,"RightDownVector;":8642,"RightDownVectorBar;":10581,"RightFloor;":8971,"RightTee;":8866,"RightTeeArrow;":8614,"RightTeeVector;":10587,"RightTriangle;":8883,"RightTriangleBar;":10704,"RightTriangleEqual;":8885,"RightUpDownVector;":10575,"RightUpTeeVector;":10588,"RightUpVector;":8638,"RightUpVectorBar;":10580,"RightVector;":8640,"RightVectorBar;":10579,"Rightarrow;":8658,"Ropf;":8477,"RoundImplies;":10608,"Rrightarrow;":8667,"Rscr;":8475,"Rsh;":8625,"RuleDelayed;":10740,"SHCHcy;":1065,"SHcy;":1064,"SOFTcy;":1068,"Sacute;":346,"Sc;":10940,"Scaron;":352,"Scedil;":350,"Scirc;":348,"Scy;":1057,"Sfr;":[55349,56598],"ShortDownArrow;":8595,"ShortLeftArrow;":8592,"ShortRightArrow;":8594,"ShortUpArrow;":8593,"Sigma;":931,"SmallCircle;":8728,"Sopf;":[55349,56650],"Sqrt;":8730,"Square;":9633,"SquareIntersection;":8851,"SquareSubset;":8847,"SquareSubsetEqual;":8849,"SquareSuperset;":8848,"SquareSupersetEqual;":8850,"SquareUnion;":8852,"Sscr;":[55349,56494],"Star;":8902,"Sub;":8912,"Subset;":8912,"SubsetEqual;":8838,"Succeeds;":8827,"SucceedsEqual;":10928,"SucceedsSlantEqual;":8829,"SucceedsTilde;":8831,"SuchThat;":8715,"Sum;":8721,"Sup;":8913,"Superset;":8835,"SupersetEqual;":8839,"Supset;":8913,THORN:222,"THORN;":222,"TRADE;":8482,"TSHcy;":1035,"TScy;":1062,"Tab;":9,"Tau;":932,"Tcaron;":356,"Tcedil;":354,"Tcy;":1058,"Tfr;":[55349,56599],"Therefore;":8756,"Theta;":920,"ThickSpace;":[8287,8202],"ThinSpace;":8201,"Tilde;":8764,"TildeEqual;":8771,"TildeFullEqual;":8773,"TildeTilde;":8776,"Topf;":[55349,56651],"TripleDot;":8411,"Tscr;":[55349,56495],"Tstrok;":358,Uacute:218,"Uacute;":218,"Uarr;":8607,"Uarrocir;":10569,"Ubrcy;":1038,"Ubreve;":364,Ucirc:219,"Ucirc;":219,"Ucy;":1059,"Udblac;":368,"Ufr;":[55349,56600],Ugrave:217,"Ugrave;":217,"Umacr;":362,"UnderBar;":95,"UnderBrace;":9183,"UnderBracket;":9141,"UnderParenthesis;":9181,"Union;":8899,"UnionPlus;":8846,"Uogon;":370,"Uopf;":[55349,56652],"UpArrow;":8593,"UpArrowBar;":10514,"UpArrowDownArrow;":8645,"UpDownArrow;":8597,"UpEquilibrium;":10606,"UpTee;":8869,"UpTeeArrow;":8613,"Uparrow;":8657,"Updownarrow;":8661,"UpperLeftArrow;":8598,"UpperRightArrow;":8599,"Upsi;":978,"Upsilon;":933,"Uring;":366,"Uscr;":[55349,56496],"Utilde;":360,Uuml:220,"Uuml;":220,"VDash;":8875,"Vbar;":10987,"Vcy;":1042,"Vdash;":8873,"Vdashl;":10982,"Vee;":8897,"Verbar;":8214,"Vert;":8214,"VerticalBar;":8739,"VerticalLine;":124,"VerticalSeparator;":10072,"VerticalTilde;":8768,"VeryThinSpace;":8202,"Vfr;":[55349,56601],"Vopf;":[55349,56653],"Vscr;":[55349,56497],"Vvdash;":8874,"Wcirc;":372,"Wedge;":8896,"Wfr;":[55349,56602],"Wopf;":[55349,56654],"Wscr;":[55349,56498],"Xfr;":[55349,56603],"Xi;":926,"Xopf;":[55349,56655],"Xscr;":[55349,56499],"YAcy;":1071,"YIcy;":1031,"YUcy;":1070,Yacute:221,"Yacute;":221,"Ycirc;":374,"Ycy;":1067,"Yfr;":[55349,56604],"Yopf;":[55349,56656],"Yscr;":[55349,56500],"Yuml;":376,"ZHcy;":1046,"Zacute;":377,"Zcaron;":381,"Zcy;":1047,"Zdot;":379,"ZeroWidthSpace;":8203,"Zeta;":918,"Zfr;":8488,"Zopf;":8484,"Zscr;":[55349,56501],aacute:225,"aacute;":225,"abreve;":259,"ac;":8766,"acE;":[8766,819],"acd;":8767,acirc:226,"acirc;":226,acute:180,"acute;":180,"acy;":1072,aelig:230,"aelig;":230,"af;":8289,"afr;":[55349,56606],agrave:224,"agrave;":224,"alefsym;":8501,"aleph;":8501,"alpha;":945,"amacr;":257,"amalg;":10815,amp:38,"amp;":38,"and;":8743,"andand;":10837,"andd;":10844,"andslope;":10840,"andv;":10842,"ang;":8736,"ange;":10660,"angle;":8736,"angmsd;":8737,"angmsdaa;":10664,"angmsdab;":10665,"angmsdac;":10666,"angmsdad;":10667,"angmsdae;":10668,"angmsdaf;":10669,"angmsdag;":10670,"angmsdah;":10671,"angrt;":8735,"angrtvb;":8894,"angrtvbd;":10653,"angsph;":8738,"angst;":197,"angzarr;":9084,"aogon;":261,"aopf;":[55349,56658],"ap;":8776,"apE;":10864,"apacir;":10863,"ape;":8778,"apid;":8779,"apos;":39,"approx;":8776,"approxeq;":8778,aring:229,"aring;":229,"ascr;":[55349,56502],"ast;":42,"asymp;":8776,"asympeq;":8781,atilde:227,"atilde;":227,auml:228,"auml;":228,"awconint;":8755,"awint;":10769,"bNot;":10989,"backcong;":8780,"backepsilon;":1014,"backprime;":8245,"backsim;":8765,"backsimeq;":8909,"barvee;":8893,"barwed;":8965,"barwedge;":8965,"bbrk;":9141,"bbrktbrk;":9142,"bcong;":8780,"bcy;":1073,"bdquo;":8222,"becaus;":8757,"because;":8757,"bemptyv;":10672,"bepsi;":1014,"bernou;":8492,"beta;":946,"beth;":8502,"between;":8812,"bfr;":[55349,56607],"bigcap;":8898,"bigcirc;":9711,"bigcup;":8899,"bigodot;":10752,"bigoplus;":10753,"bigotimes;":10754,"bigsqcup;":10758,"bigstar;":9733,"bigtriangledown;":9661,"bigtriangleup;":9651,"biguplus;":10756,"bigvee;":8897,"bigwedge;":8896,"bkarow;":10509,"blacklozenge;":10731,"blacksquare;":9642,"blacktriangle;":9652,"blacktriangledown;":9662,"blacktriangleleft;":9666,"blacktriangleright;":9656,"blank;":9251,"blk12;":9618,"blk14;":9617,"blk34;":9619,"block;":9608,"bne;":[61,8421],"bnequiv;":[8801,8421],"bnot;":8976,"bopf;":[55349,56659],"bot;":8869,"bottom;":8869,"bowtie;":8904,"boxDL;":9559,"boxDR;":9556,"boxDl;":9558,"boxDr;":9555,"boxH;":9552,"boxHD;":9574,"boxHU;":9577,"boxHd;":9572,"boxHu;":9575,"boxUL;":9565,"boxUR;":9562,"boxUl;":9564,"boxUr;":9561,"boxV;":9553,"boxVH;":9580,"boxVL;":9571,"boxVR;":9568,"boxVh;":9579,"boxVl;":9570,"boxVr;":9567,"boxbox;":10697,"boxdL;":9557,"boxdR;":9554,"boxdl;":9488,"boxdr;":9484,"boxh;":9472,"boxhD;":9573,"boxhU;":9576,"boxhd;":9516,"boxhu;":9524,"boxminus;":8863,"boxplus;":8862,"boxtimes;":8864,"boxuL;":9563,"boxuR;":9560,"boxul;":9496,"boxur;":9492,"boxv;":9474,"boxvH;":9578,"boxvL;":9569,"boxvR;":9566,"boxvh;":9532,"boxvl;":9508,"boxvr;":9500,"bprime;":8245,"breve;":728,brvbar:166,"brvbar;":166,"bscr;":[55349,56503],"bsemi;":8271,"bsim;":8765,"bsime;":8909,"bsol;":92,"bsolb;":10693,"bsolhsub;":10184,"bull;":8226,"bullet;":8226,"bump;":8782,"bumpE;":10926,"bumpe;":8783,"bumpeq;":8783,"cacute;":263,"cap;":8745,"capand;":10820,"capbrcup;":10825,"capcap;":10827,"capcup;":10823,"capdot;":10816,"caps;":[8745,65024],"caret;":8257,"caron;":711,"ccaps;":10829,"ccaron;":269,ccedil:231,"ccedil;":231,"ccirc;":265,"ccups;":10828,"ccupssm;":10832,"cdot;":267,cedil:184,"cedil;":184,"cemptyv;":10674,cent:162,"cent;":162,"centerdot;":183,"cfr;":[55349,56608],"chcy;":1095,"check;":10003,"checkmark;":10003,"chi;":967,"cir;":9675,"cirE;":10691,"circ;":710,"circeq;":8791,"circlearrowleft;":8634,"circlearrowright;":8635,"circledR;":174,"circledS;":9416,"circledast;":8859,"circledcirc;":8858,"circleddash;":8861,"cire;":8791,"cirfnint;":10768,"cirmid;":10991,"cirscir;":10690,"clubs;":9827,"clubsuit;":9827,"colon;":58,"colone;":8788,"coloneq;":8788,"comma;":44,"commat;":64,"comp;":8705,"compfn;":8728,"complement;":8705,"complexes;":8450,"cong;":8773,"congdot;":10861,"conint;":8750,"copf;":[55349,56660],"coprod;":8720,copy:169,"copy;":169,"copysr;":8471,"crarr;":8629,"cross;":10007,"cscr;":[55349,56504],"csub;":10959,"csube;":10961,"csup;":10960,"csupe;":10962,"ctdot;":8943,"cudarrl;":10552,"cudarrr;":10549,"cuepr;":8926,"cuesc;":8927,"cularr;":8630,"cularrp;":10557,"cup;":8746,"cupbrcap;":10824,"cupcap;":10822,"cupcup;":10826,"cupdot;":8845,"cupor;":10821,"cups;":[8746,65024],"curarr;":8631,"curarrm;":10556,"curlyeqprec;":8926,"curlyeqsucc;":8927,"curlyvee;":8910,"curlywedge;":8911,curren:164,"curren;":164,"curvearrowleft;":8630,"curvearrowright;":8631,"cuvee;":8910,"cuwed;":8911,"cwconint;":8754,"cwint;":8753,"cylcty;":9005,"dArr;":8659,"dHar;":10597,"dagger;":8224,"daleth;":8504,"darr;":8595,"dash;":8208,"dashv;":8867,"dbkarow;":10511,"dblac;":733,"dcaron;":271,"dcy;":1076,"dd;":8518,"ddagger;":8225,"ddarr;":8650,"ddotseq;":10871,deg:176,"deg;":176,"delta;":948,"demptyv;":10673,"dfisht;":10623,"dfr;":[55349,56609],"dharl;":8643,"dharr;":8642,"diam;":8900,"diamond;":8900,"diamondsuit;":9830,"diams;":9830,"die;":168,"digamma;":989,"disin;":8946,"div;":247,divide:247,"divide;":247,"divideontimes;":8903,"divonx;":8903,"djcy;":1106,"dlcorn;":8990,"dlcrop;":8973,"dollar;":36,"dopf;":[55349,56661],"dot;":729,"doteq;":8784,"doteqdot;":8785,"dotminus;":8760,"dotplus;":8724,"dotsquare;":8865,"doublebarwedge;":8966,"downarrow;":8595,"downdownarrows;":8650,"downharpoonleft;":8643,"downharpoonright;":8642,"drbkarow;":10512,"drcorn;":8991,"drcrop;":8972,"dscr;":[55349,56505],"dscy;":1109,"dsol;":10742,"dstrok;":273,"dtdot;":8945,"dtri;":9663,"dtrif;":9662,"duarr;":8693,"duhar;":10607,"dwangle;":10662,"dzcy;":1119,"dzigrarr;":10239,"eDDot;":10871,"eDot;":8785,eacute:233,"eacute;":233,"easter;":10862,"ecaron;":283,"ecir;":8790,ecirc:234,"ecirc;":234,"ecolon;":8789,"ecy;":1101,"edot;":279,"ee;":8519,"efDot;":8786,"efr;":[55349,56610],"eg;":10906,egrave:232,"egrave;":232,"egs;":10902,"egsdot;":10904,"el;":10905,"elinters;":9191,"ell;":8467,"els;":10901,"elsdot;":10903,"emacr;":275,"empty;":8709,"emptyset;":8709,"emptyv;":8709,"emsp13;":8196,"emsp14;":8197,"emsp;":8195,"eng;":331,"ensp;":8194,"eogon;":281,"eopf;":[55349,56662],"epar;":8917,"eparsl;":10723,"eplus;":10865,"epsi;":949,"epsilon;":949,"epsiv;":1013,"eqcirc;":8790,"eqcolon;":8789,"eqsim;":8770,"eqslantgtr;":10902,"eqslantless;":10901,"equals;":61,"equest;":8799,"equiv;":8801,"equivDD;":10872,"eqvparsl;":10725,"erDot;":8787,"erarr;":10609,"escr;":8495,"esdot;":8784,"esim;":8770,"eta;":951,eth:240,"eth;":240,euml:235,"euml;":235,"euro;":8364,"excl;":33,"exist;":8707,"expectation;":8496,"exponentiale;":8519,"fallingdotseq;":8786,"fcy;":1092,"female;":9792,"ffilig;":64259,"fflig;":64256,"ffllig;":64260,"ffr;":[55349,56611],"filig;":64257,"fjlig;":[102,106],"flat;":9837,"fllig;":64258,"fltns;":9649,"fnof;":402,"fopf;":[55349,56663],"forall;":8704,"fork;":8916,"forkv;":10969,"fpartint;":10765,frac12:189,"frac12;":189,"frac13;":8531,frac14:188,"frac14;":188,"frac15;":8533,"frac16;":8537,"frac18;":8539,"frac23;":8532,"frac25;":8534,frac34:190,"frac34;":190,"frac35;":8535,"frac38;":8540,"frac45;":8536,"frac56;":8538,"frac58;":8541,"frac78;":8542,"frasl;":8260,"frown;":8994,"fscr;":[55349,56507],"gE;":8807,"gEl;":10892,"gacute;":501,"gamma;":947,"gammad;":989,"gap;":10886,"gbreve;":287,"gcirc;":285,"gcy;":1075,"gdot;":289,"ge;":8805,"gel;":8923,"geq;":8805,"geqq;":8807,"geqslant;":10878,"ges;":10878,"gescc;":10921,"gesdot;":10880,"gesdoto;":10882,"gesdotol;":10884,"gesl;":[8923,65024],"gesles;":10900,"gfr;":[55349,56612],"gg;":8811,"ggg;":8921,"gimel;":8503,"gjcy;":1107,"gl;":8823,"glE;":10898,"gla;":10917,"glj;":10916,"gnE;":8809,"gnap;":10890,"gnapprox;":10890,"gne;":10888,"gneq;":10888,"gneqq;":8809,"gnsim;":8935,"gopf;":[55349,56664],"grave;":96,"gscr;":8458,"gsim;":8819,"gsime;":10894,"gsiml;":10896,gt:62,"gt;":62,"gtcc;":10919,"gtcir;":10874,"gtdot;":8919,"gtlPar;":10645,"gtquest;":10876,"gtrapprox;":10886,"gtrarr;":10616,"gtrdot;":8919,"gtreqless;":8923,"gtreqqless;":10892,"gtrless;":8823,"gtrsim;":8819,"gvertneqq;":[8809,65024],"gvnE;":[8809,65024],"hArr;":8660,"hairsp;":8202,"half;":189,"hamilt;":8459,"hardcy;":1098,"harr;":8596,"harrcir;":10568,"harrw;":8621,"hbar;":8463,"hcirc;":293,"hearts;":9829,"heartsuit;":9829,"hellip;":8230,"hercon;":8889,"hfr;":[55349,56613],"hksearow;":10533,"hkswarow;":10534,"hoarr;":8703,"homtht;":8763,"hookleftarrow;":8617,"hookrightarrow;":8618,"hopf;":[55349,56665],"horbar;":8213,"hscr;":[55349,56509],"hslash;":8463,"hstrok;":295,"hybull;":8259,"hyphen;":8208,iacute:237,"iacute;":237,"ic;":8291,icirc:238,"icirc;":238,"icy;":1080,"iecy;":1077,iexcl:161,"iexcl;":161,"iff;":8660,"ifr;":[55349,56614],igrave:236,"igrave;":236,"ii;":8520,"iiiint;":10764,"iiint;":8749,"iinfin;":10716,"iiota;":8489,"ijlig;":307,"imacr;":299,"image;":8465,"imagline;":8464,"imagpart;":8465,"imath;":305,"imof;":8887,"imped;":437,"in;":8712,"incare;":8453,"infin;":8734,"infintie;":10717,"inodot;":305,"int;":8747,"intcal;":8890,"integers;":8484,"intercal;":8890,"intlarhk;":10775,"intprod;":10812,"iocy;":1105,"iogon;":303,"iopf;":[55349,56666],"iota;":953,"iprod;":10812,iquest:191,"iquest;":191,"iscr;":[55349,56510],"isin;":8712,"isinE;":8953,"isindot;":8949,"isins;":8948,"isinsv;":8947,"isinv;":8712,"it;":8290,"itilde;":297,"iukcy;":1110,iuml:239,"iuml;":239,"jcirc;":309,"jcy;":1081,"jfr;":[55349,56615],"jmath;":567,"jopf;":[55349,56667],"jscr;":[55349,56511],"jsercy;":1112,"jukcy;":1108,"kappa;":954,"kappav;":1008,"kcedil;":311,"kcy;":1082,"kfr;":[55349,56616],"kgreen;":312,"khcy;":1093,"kjcy;":1116,"kopf;":[55349,56668],"kscr;":[55349,56512],"lAarr;":8666,"lArr;":8656,"lAtail;":10523,"lBarr;":10510,"lE;":8806,"lEg;":10891,"lHar;":10594,"lacute;":314,"laemptyv;":10676,"lagran;":8466,"lambda;":955,"lang;":10216,"langd;":10641,"langle;":10216,"lap;":10885,laquo:171,"laquo;":171,"larr;":8592,"larrb;":8676,"larrbfs;":10527,"larrfs;":10525,"larrhk;":8617,"larrlp;":8619,"larrpl;":10553,"larrsim;":10611,"larrtl;":8610,"lat;":10923,"latail;":10521,"late;":10925,"lates;":[10925,65024],"lbarr;":10508,"lbbrk;":10098,"lbrace;":123,"lbrack;":91,"lbrke;":10635,"lbrksld;":10639,"lbrkslu;":10637,"lcaron;":318,"lcedil;":316,"lceil;":8968,"lcub;":123,"lcy;":1083,"ldca;":10550,"ldquo;":8220,"ldquor;":8222,"ldrdhar;":10599,"ldrushar;":10571,"ldsh;":8626,"le;":8804,"leftarrow;":8592,"leftarrowtail;":8610,"leftharpoondown;":8637,"leftharpoonup;":8636,"leftleftarrows;":8647,"leftrightarrow;":8596,"leftrightarrows;":8646,"leftrightharpoons;":8651,"leftrightsquigarrow;":8621,"leftthreetimes;":8907,"leg;":8922,"leq;":8804,"leqq;":8806,"leqslant;":10877,"les;":10877,"lescc;":10920,"lesdot;":10879,"lesdoto;":10881,"lesdotor;":10883,"lesg;":[8922,65024],"lesges;":10899,"lessapprox;":10885,"lessdot;":8918,"lesseqgtr;":8922,"lesseqqgtr;":10891,"lessgtr;":8822,"lesssim;":8818,"lfisht;":10620,"lfloor;":8970,"lfr;":[55349,56617],"lg;":8822,"lgE;":10897,"lhard;":8637,"lharu;":8636,"lharul;":10602,"lhblk;":9604,"ljcy;":1113,"ll;":8810,"llarr;":8647,"llcorner;":8990,"llhard;":10603,"lltri;":9722,"lmidot;":320,"lmoust;":9136,"lmoustache;":9136,"lnE;":8808,"lnap;":10889,"lnapprox;":10889,"lne;":10887,"lneq;":10887,"lneqq;":8808,"lnsim;":8934,"loang;":10220,"loarr;":8701,"lobrk;":10214,"longleftarrow;":10229,"longleftrightarrow;":10231,"longmapsto;":10236,"longrightarrow;":10230,"looparrowleft;":8619,"looparrowright;":8620,"lopar;":10629,"lopf;":[55349,56669],"loplus;":10797,"lotimes;":10804,"lowast;":8727,"lowbar;":95,"loz;":9674,"lozenge;":9674,"lozf;":10731,"lpar;":40,"lparlt;":10643,"lrarr;":8646,"lrcorner;":8991,"lrhar;":8651,"lrhard;":10605,"lrm;":8206,"lrtri;":8895,"lsaquo;":8249,"lscr;":[55349,56513],"lsh;":8624,"lsim;":8818,"lsime;":10893,"lsimg;":10895,"lsqb;":91,"lsquo;":8216,"lsquor;":8218,"lstrok;":322,lt:60,"lt;":60,"ltcc;":10918,"ltcir;":10873,"ltdot;":8918,"lthree;":8907,"ltimes;":8905,"ltlarr;":10614,"ltquest;":10875,"ltrPar;":10646,"ltri;":9667,"ltrie;":8884,"ltrif;":9666,"lurdshar;":10570,"luruhar;":10598,"lvertneqq;":[8808,65024],"lvnE;":[8808,65024],"mDDot;":8762,macr:175,"macr;":175,"male;":9794,"malt;":10016,"maltese;":10016,"map;":8614,"mapsto;":8614,"mapstodown;":8615,"mapstoleft;":8612,"mapstoup;":8613,"marker;":9646,"mcomma;":10793,"mcy;":1084,"mdash;":8212,"measuredangle;":8737,"mfr;":[55349,56618],"mho;":8487,micro:181,"micro;":181,"mid;":8739,"midast;":42,"midcir;":10992,middot:183,"middot;":183,"minus;":8722,"minusb;":8863,"minusd;":8760,"minusdu;":10794,"mlcp;":10971,"mldr;":8230,"mnplus;":8723,"models;":8871,"mopf;":[55349,56670],"mp;":8723,"mscr;":[55349,56514],"mstpos;":8766,"mu;":956,"multimap;":8888,"mumap;":8888,"nGg;":[8921,824],"nGt;":[8811,8402],"nGtv;":[8811,824],"nLeftarrow;":8653,"nLeftrightarrow;":8654,"nLl;":[8920,824],"nLt;":[8810,8402],"nLtv;":[8810,824],"nRightarrow;":8655,"nVDash;":8879,"nVdash;":8878,"nabla;":8711,"nacute;":324,"nang;":[8736,8402],"nap;":8777,"napE;":[10864,824],"napid;":[8779,824],"napos;":329,"napprox;":8777,"natur;":9838,"natural;":9838,"naturals;":8469,nbsp:160,"nbsp;":160,"nbump;":[8782,824],"nbumpe;":[8783,824],"ncap;":10819,"ncaron;":328,"ncedil;":326,"ncong;":8775,"ncongdot;":[10861,824],"ncup;":10818,"ncy;":1085,"ndash;":8211,"ne;":8800,"neArr;":8663,"nearhk;":10532,"nearr;":8599,"nearrow;":8599,"nedot;":[8784,824],"nequiv;":8802,"nesear;":10536,"nesim;":[8770,824],"nexist;":8708,"nexists;":8708,"nfr;":[55349,56619],"ngE;":[8807,824],"nge;":8817,"ngeq;":8817,"ngeqq;":[8807,824],"ngeqslant;":[10878,824],"nges;":[10878,824],"ngsim;":8821,"ngt;":8815,"ngtr;":8815,"nhArr;":8654,"nharr;":8622,"nhpar;":10994,"ni;":8715,"nis;":8956,"nisd;":8954,"niv;":8715,"njcy;":1114,"nlArr;":8653,"nlE;":[8806,824],"nlarr;":8602,"nldr;":8229,"nle;":8816,"nleftarrow;":8602,"nleftrightarrow;":8622,"nleq;":8816,"nleqq;":[8806,824],"nleqslant;":[10877,824],"nles;":[10877,824],"nless;":8814,"nlsim;":8820,"nlt;":8814,"nltri;":8938,"nltrie;":8940,"nmid;":8740,"nopf;":[55349,56671],not:172,"not;":172,"notin;":8713,"notinE;":[8953,824],"notindot;":[8949,824],"notinva;":8713,"notinvb;":8951,"notinvc;":8950,"notni;":8716,"notniva;":8716,"notnivb;":8958,"notnivc;":8957,"npar;":8742,"nparallel;":8742,"nparsl;":[11005,8421],"npart;":[8706,824],"npolint;":10772,"npr;":8832,"nprcue;":8928,"npre;":[10927,824],"nprec;":8832,"npreceq;":[10927,824],"nrArr;":8655,"nrarr;":8603,"nrarrc;":[10547,824],"nrarrw;":[8605,824],"nrightarrow;":8603,"nrtri;":8939,"nrtrie;":8941,"nsc;":8833,"nsccue;":8929,"nsce;":[10928,824],"nscr;":[55349,56515],"nshortmid;":8740,"nshortparallel;":8742,"nsim;":8769,"nsime;":8772,"nsimeq;":8772,"nsmid;":8740,"nspar;":8742,"nsqsube;":8930,"nsqsupe;":8931,"nsub;":8836,"nsubE;":[10949,824],"nsube;":8840,"nsubset;":[8834,8402],"nsubseteq;":8840,"nsubseteqq;":[10949,824],"nsucc;":8833,"nsucceq;":[10928,824],"nsup;":8837,"nsupE;":[10950,824],"nsupe;":8841,"nsupset;":[8835,8402],"nsupseteq;":8841,"nsupseteqq;":[10950,824],"ntgl;":8825,ntilde:241,"ntilde;":241,"ntlg;":8824,"ntriangleleft;":8938,"ntrianglelefteq;":8940,"ntriangleright;":8939,"ntrianglerighteq;":8941,"nu;":957,"num;":35,"numero;":8470,"numsp;":8199,"nvDash;":8877,"nvHarr;":10500,"nvap;":[8781,8402],"nvdash;":8876,"nvge;":[8805,8402],"nvgt;":[62,8402],"nvinfin;":10718,"nvlArr;":10498,"nvle;":[8804,8402],"nvlt;":[60,8402],"nvltrie;":[8884,8402],"nvrArr;":10499,"nvrtrie;":[8885,8402],"nvsim;":[8764,8402],"nwArr;":8662,"nwarhk;":10531,"nwarr;":8598,"nwarrow;":8598,"nwnear;":10535,"oS;":9416,oacute:243,"oacute;":243,"oast;":8859,"ocir;":8858,ocirc:244,"ocirc;":244,"ocy;":1086,"odash;":8861,"odblac;":337,"odiv;":10808,"odot;":8857,"odsold;":10684,"oelig;":339,"ofcir;":10687,"ofr;":[55349,56620],"ogon;":731,ograve:242,"ograve;":242,"ogt;":10689,"ohbar;":10677,"ohm;":937,"oint;":8750,"olarr;":8634,"olcir;":10686,"olcross;":10683,"oline;":8254,"olt;":10688,"omacr;":333,"omega;":969,"omicron;":959,"omid;":10678,"ominus;":8854,"oopf;":[55349,56672],"opar;":10679,"operp;":10681,"oplus;":8853,"or;":8744,"orarr;":8635,"ord;":10845,"order;":8500,"orderof;":8500,ordf:170,"ordf;":170,ordm:186,"ordm;":186,"origof;":8886,"oror;":10838,"orslope;":10839,"orv;":10843,"oscr;":8500,oslash:248,"oslash;":248,"osol;":8856,otilde:245,"otilde;":245,"otimes;":8855,"otimesas;":10806,ouml:246,"ouml;":246,"ovbar;":9021,"par;":8741,para:182,"para;":182,"parallel;":8741,"parsim;":10995,"parsl;":11005,"part;":8706,"pcy;":1087,"percnt;":37,"period;":46,"permil;":8240,"perp;":8869,"pertenk;":8241,"pfr;":[55349,56621],"phi;":966,"phiv;":981,"phmmat;":8499,"phone;":9742,"pi;":960,"pitchfork;":8916,"piv;":982,"planck;":8463,"planckh;":8462,"plankv;":8463,"plus;":43,"plusacir;":10787,"plusb;":8862,"pluscir;":10786,"plusdo;":8724,"plusdu;":10789,"pluse;":10866,plusmn:177,"plusmn;":177,"plussim;":10790,"plustwo;":10791,"pm;":177,"pointint;":10773,"popf;":[55349,56673],pound:163,"pound;":163,"pr;":8826,"prE;":10931,"prap;":10935,"prcue;":8828,"pre;":10927,"prec;":8826,"precapprox;":10935,"preccurlyeq;":8828,"preceq;":10927,"precnapprox;":10937,"precneqq;":10933,"precnsim;":8936,"precsim;":8830,"prime;":8242,"primes;":8473,"prnE;":10933,"prnap;":10937,"prnsim;":8936,"prod;":8719,"profalar;":9006,"profline;":8978,"profsurf;":8979,"prop;":8733,"propto;":8733,"prsim;":8830,"prurel;":8880,"pscr;":[55349,56517],"psi;":968,"puncsp;":8200,"qfr;":[55349,56622],"qint;":10764,"qopf;":[55349,56674],"qprime;":8279,"qscr;":[55349,56518],"quaternions;":8461,"quatint;":10774,"quest;":63,"questeq;":8799,quot:34,"quot;":34,"rAarr;":8667,"rArr;":8658,"rAtail;":10524,"rBarr;":10511,"rHar;":10596,"race;":[8765,817],"racute;":341,"radic;":8730,"raemptyv;":10675,"rang;":10217,"rangd;":10642,"range;":10661,"rangle;":10217,raquo:187,"raquo;":187,"rarr;":8594,"rarrap;":10613,"rarrb;":8677,"rarrbfs;":10528,"rarrc;":10547,"rarrfs;":10526,"rarrhk;":8618,"rarrlp;":8620,"rarrpl;":10565,"rarrsim;":10612,"rarrtl;":8611,"rarrw;":8605,"ratail;":10522,"ratio;":8758,"rationals;":8474,"rbarr;":10509,"rbbrk;":10099,"rbrace;":125,"rbrack;":93,"rbrke;":10636,"rbrksld;":10638,"rbrkslu;":10640,"rcaron;":345,"rcedil;":343,"rceil;":8969,"rcub;":125,"rcy;":1088,"rdca;":10551,"rdldhar;":10601,"rdquo;":8221,"rdquor;":8221,"rdsh;":8627,"real;":8476,"realine;":8475,"realpart;":8476,"reals;":8477,"rect;":9645,reg:174,"reg;":174,"rfisht;":10621,"rfloor;":8971,"rfr;":[55349,56623],"rhard;":8641,"rharu;":8640,"rharul;":10604,"rho;":961,"rhov;":1009,"rightarrow;":8594,"rightarrowtail;":8611,"rightharpoondown;":8641,"rightharpoonup;":8640,"rightleftarrows;":8644,"rightleftharpoons;":8652,"rightrightarrows;":8649,"rightsquigarrow;":8605,"rightthreetimes;":8908,"ring;":730,"risingdotseq;":8787,"rlarr;":8644,"rlhar;":8652,"rlm;":8207,"rmoust;":9137,"rmoustache;":9137,"rnmid;":10990,"roang;":10221,"roarr;":8702,"robrk;":10215,"ropar;":10630,"ropf;":[55349,56675],"roplus;":10798,"rotimes;":10805,"rpar;":41,"rpargt;":10644,"rppolint;":10770,"rrarr;":8649,"rsaquo;":8250,"rscr;":[55349,56519],"rsh;":8625,"rsqb;":93,"rsquo;":8217,"rsquor;":8217,"rthree;":8908,"rtimes;":8906,"rtri;":9657,"rtrie;":8885,"rtrif;":9656,"rtriltri;":10702,"ruluhar;":10600,"rx;":8478,"sacute;":347,"sbquo;":8218,"sc;":8827,"scE;":10932,"scap;":10936,"scaron;":353,"sccue;":8829,"sce;":10928,"scedil;":351,"scirc;":349,"scnE;":10934,"scnap;":10938,"scnsim;":8937,"scpolint;":10771,"scsim;":8831,"scy;":1089,"sdot;":8901,"sdotb;":8865,"sdote;":10854,"seArr;":8664,"searhk;":10533,"searr;":8600,"searrow;":8600,sect:167,"sect;":167,"semi;":59,"seswar;":10537,"setminus;":8726,"setmn;":8726,"sext;":10038,"sfr;":[55349,56624],"sfrown;":8994,"sharp;":9839,"shchcy;":1097,"shcy;":1096,"shortmid;":8739,"shortparallel;":8741,shy:173,"shy;":173,"sigma;":963,"sigmaf;":962,"sigmav;":962,"sim;":8764,"simdot;":10858,"sime;":8771,"simeq;":8771,"simg;":10910,"simgE;":10912,"siml;":10909,"simlE;":10911,"simne;":8774,"simplus;":10788,"simrarr;":10610,"slarr;":8592,"smallsetminus;":8726,"smashp;":10803,"smeparsl;":10724,"smid;":8739,"smile;":8995,"smt;":10922,"smte;":10924,"smtes;":[10924,65024],"softcy;":1100,"sol;":47,"solb;":10692,"solbar;":9023,"sopf;":[55349,56676],"spades;":9824,"spadesuit;":9824,"spar;":8741,"sqcap;":8851,"sqcaps;":[8851,65024],"sqcup;":8852,"sqcups;":[8852,65024],"sqsub;":8847,"sqsube;":8849,"sqsubset;":8847,"sqsubseteq;":8849,"sqsup;":8848,"sqsupe;":8850,"sqsupset;":8848,"sqsupseteq;":8850,"squ;":9633,"square;":9633,"squarf;":9642,"squf;":9642,"srarr;":8594,"sscr;":[55349,56520],"ssetmn;":8726,"ssmile;":8995,"sstarf;":8902,"star;":9734,"starf;":9733,"straightepsilon;":1013,"straightphi;":981,"strns;":175,"sub;":8834,"subE;":10949,"subdot;":10941,"sube;":8838,"subedot;":10947,"submult;":10945,"subnE;":10955,"subne;":8842,"subplus;":10943,"subrarr;":10617,"subset;":8834,"subseteq;":8838,"subseteqq;":10949,"subsetneq;":8842,"subsetneqq;":10955,"subsim;":10951,"subsub;":10965,"subsup;":10963,"succ;":8827,"succapprox;":10936,"succcurlyeq;":8829,"succeq;":10928,"succnapprox;":10938,"succneqq;":10934,"succnsim;":8937,"succsim;":8831,"sum;":8721,"sung;":9834,sup1:185,"sup1;":185,sup2:178,"sup2;":178,sup3:179,"sup3;":179,"sup;":8835,"supE;":10950,"supdot;":10942,"supdsub;":10968,"supe;":8839,"supedot;":10948,"suphsol;":10185,"suphsub;":10967,"suplarr;":10619,"supmult;":10946,"supnE;":10956,"supne;":8843,"supplus;":10944,"supset;":8835,"supseteq;":8839,"supseteqq;":10950,"supsetneq;":8843,"supsetneqq;":10956,"supsim;":10952,"supsub;":10964,"supsup;":10966,"swArr;":8665,"swarhk;":10534,"swarr;":8601,"swarrow;":8601,"swnwar;":10538,szlig:223,"szlig;":223,"target;":8982,"tau;":964,"tbrk;":9140,"tcaron;":357,"tcedil;":355,"tcy;":1090,"tdot;":8411,"telrec;":8981,"tfr;":[55349,56625],"there4;":8756,"therefore;":8756,"theta;":952,"thetasym;":977,"thetav;":977,"thickapprox;":8776,"thicksim;":8764,"thinsp;":8201,"thkap;":8776,"thksim;":8764,thorn:254,"thorn;":254,"tilde;":732,times:215,"times;":215,"timesb;":8864,"timesbar;":10801,"timesd;":10800,"tint;":8749,"toea;":10536,"top;":8868,"topbot;":9014,"topcir;":10993,"topf;":[55349,56677],"topfork;":10970,"tosa;":10537,"tprime;":8244,"trade;":8482,"triangle;":9653,"triangledown;":9663,"triangleleft;":9667,"trianglelefteq;":8884,"triangleq;":8796,"triangleright;":9657,"trianglerighteq;":8885,"tridot;":9708,"trie;":8796,"triminus;":10810,"triplus;":10809,"trisb;":10701,"tritime;":10811,"trpezium;":9186,"tscr;":[55349,56521],"tscy;":1094,"tshcy;":1115,"tstrok;":359,"twixt;":8812,"twoheadleftarrow;":8606,"twoheadrightarrow;":8608,"uArr;":8657,"uHar;":10595,uacute:250,"uacute;":250,"uarr;":8593,"ubrcy;":1118,"ubreve;":365,ucirc:251,"ucirc;":251,"ucy;":1091,"udarr;":8645,"udblac;":369,"udhar;":10606,"ufisht;":10622,"ufr;":[55349,56626],ugrave:249,"ugrave;":249,"uharl;":8639,"uharr;":8638,"uhblk;":9600,"ulcorn;":8988,"ulcorner;":8988,"ulcrop;":8975,"ultri;":9720,"umacr;":363,uml:168,"uml;":168,"uogon;":371,"uopf;":[55349,56678],"uparrow;":8593,"updownarrow;":8597,"upharpoonleft;":8639,"upharpoonright;":8638,"uplus;":8846,"upsi;":965,"upsih;":978,"upsilon;":965,"upuparrows;":8648,"urcorn;":8989,"urcorner;":8989,"urcrop;":8974,"uring;":367,"urtri;":9721,"uscr;":[55349,56522],"utdot;":8944,"utilde;":361,"utri;":9653,"utrif;":9652,"uuarr;":8648,uuml:252,"uuml;":252,"uwangle;":10663,"vArr;":8661,"vBar;":10984,"vBarv;":10985,"vDash;":8872,"vangrt;":10652,"varepsilon;":1013,"varkappa;":1008,"varnothing;":8709,"varphi;":981,"varpi;":982,"varpropto;":8733,"varr;":8597,"varrho;":1009,"varsigma;":962,"varsubsetneq;":[8842,65024],"varsubsetneqq;":[10955,65024],"varsupsetneq;":[8843,65024],"varsupsetneqq;":[10956,65024],"vartheta;":977,"vartriangleleft;":8882,"vartriangleright;":8883,"vcy;":1074,"vdash;":8866,"vee;":8744,"veebar;":8891,"veeeq;":8794,"vellip;":8942,"verbar;":124,"vert;":124,"vfr;":[55349,56627],"vltri;":8882,"vnsub;":[8834,8402],"vnsup;":[8835,8402],"vopf;":[55349,56679],"vprop;":8733,"vrtri;":8883,"vscr;":[55349,56523],"vsubnE;":[10955,65024],"vsubne;":[8842,65024],"vsupnE;":[10956,65024],"vsupne;":[8843,65024],"vzigzag;":10650,"wcirc;":373,"wedbar;":10847,"wedge;":8743,"wedgeq;":8793,"weierp;":8472,"wfr;":[55349,56628],"wopf;":[55349,56680],"wp;":8472,"wr;":8768,"wreath;":8768,"wscr;":[55349,56524],"xcap;":8898,"xcirc;":9711,"xcup;":8899,"xdtri;":9661,"xfr;":[55349,56629],"xhArr;":10234,"xharr;":10231,"xi;":958,"xlArr;":10232,"xlarr;":10229,"xmap;":10236,"xnis;":8955,"xodot;":10752,"xopf;":[55349,56681],"xoplus;":10753,"xotime;":10754,"xrArr;":10233,"xrarr;":10230,"xscr;":[55349,56525],"xsqcup;":10758,"xuplus;":10756,"xutri;":9651,"xvee;":8897,"xwedge;":8896,yacute:253,"yacute;":253,"yacy;":1103,"ycirc;":375,"ycy;":1099,yen:165,"yen;":165,"yfr;":[55349,56630],"yicy;":1111,"yopf;":[55349,56682],"yscr;":[55349,56526],"yucy;":1102,yuml:255,"yuml;":255,"zacute;":378,"zcaron;":382,"zcy;":1079,"zdot;":380,"zeetrf;":8488,"zeta;":950,"zfr;":[55349,56631],"zhcy;":1078,"zigrarr;":8669,"zopf;":[55349,56683],"zscr;":[55349,56527],"zwj;":8205,"zwnj;":8204},YX=/(A(?:Elig;?|MP;?|acute;?|breve;|c(?:irc;?|y;)|fr;|grave;?|lpha;|macr;|nd;|o(?:gon;|pf;)|pplyFunction;|ring;?|s(?:cr;|sign;)|tilde;?|uml;?)|B(?:a(?:ckslash;|r(?:v;|wed;))|cy;|e(?:cause;|rnoullis;|ta;)|fr;|opf;|reve;|scr;|umpeq;)|C(?:Hcy;|OPY;?|a(?:cute;|p(?:;|italDifferentialD;)|yleys;)|c(?:aron;|edil;?|irc;|onint;)|dot;|e(?:dilla;|nterDot;)|fr;|hi;|ircle(?:Dot;|Minus;|Plus;|Times;)|lo(?:ckwiseContourIntegral;|seCurly(?:DoubleQuote;|Quote;))|o(?:lon(?:;|e;)|n(?:gruent;|int;|tourIntegral;)|p(?:f;|roduct;)|unterClockwiseContourIntegral;)|ross;|scr;|up(?:;|Cap;))|D(?:D(?:;|otrahd;)|Jcy;|Scy;|Zcy;|a(?:gger;|rr;|shv;)|c(?:aron;|y;)|el(?:;|ta;)|fr;|i(?:a(?:critical(?:Acute;|Do(?:t;|ubleAcute;)|Grave;|Tilde;)|mond;)|fferentialD;)|o(?:pf;|t(?:;|Dot;|Equal;)|uble(?:ContourIntegral;|Do(?:t;|wnArrow;)|L(?:eft(?:Arrow;|RightArrow;|Tee;)|ong(?:Left(?:Arrow;|RightArrow;)|RightArrow;))|Right(?:Arrow;|Tee;)|Up(?:Arrow;|DownArrow;)|VerticalBar;)|wn(?:Arrow(?:;|Bar;|UpArrow;)|Breve;|Left(?:RightVector;|TeeVector;|Vector(?:;|Bar;))|Right(?:TeeVector;|Vector(?:;|Bar;))|Tee(?:;|Arrow;)|arrow;))|s(?:cr;|trok;))|E(?:NG;|TH;?|acute;?|c(?:aron;|irc;?|y;)|dot;|fr;|grave;?|lement;|m(?:acr;|pty(?:SmallSquare;|VerySmallSquare;))|o(?:gon;|pf;)|psilon;|qu(?:al(?:;|Tilde;)|ilibrium;)|s(?:cr;|im;)|ta;|uml;?|x(?:ists;|ponentialE;))|F(?:cy;|fr;|illed(?:SmallSquare;|VerySmallSquare;)|o(?:pf;|rAll;|uriertrf;)|scr;)|G(?:Jcy;|T;?|amma(?:;|d;)|breve;|c(?:edil;|irc;|y;)|dot;|fr;|g;|opf;|reater(?:Equal(?:;|Less;)|FullEqual;|Greater;|Less;|SlantEqual;|Tilde;)|scr;|t;)|H(?:ARDcy;|a(?:cek;|t;)|circ;|fr;|ilbertSpace;|o(?:pf;|rizontalLine;)|s(?:cr;|trok;)|ump(?:DownHump;|Equal;))|I(?:Ecy;|Jlig;|Ocy;|acute;?|c(?:irc;?|y;)|dot;|fr;|grave;?|m(?:;|a(?:cr;|ginaryI;)|plies;)|n(?:t(?:;|e(?:gral;|rsection;))|visible(?:Comma;|Times;))|o(?:gon;|pf;|ta;)|scr;|tilde;|u(?:kcy;|ml;?))|J(?:c(?:irc;|y;)|fr;|opf;|s(?:cr;|ercy;)|ukcy;)|K(?:Hcy;|Jcy;|appa;|c(?:edil;|y;)|fr;|opf;|scr;)|L(?:Jcy;|T;?|a(?:cute;|mbda;|ng;|placetrf;|rr;)|c(?:aron;|edil;|y;)|e(?:ft(?:A(?:ngleBracket;|rrow(?:;|Bar;|RightArrow;))|Ceiling;|Do(?:ubleBracket;|wn(?:TeeVector;|Vector(?:;|Bar;)))|Floor;|Right(?:Arrow;|Vector;)|T(?:ee(?:;|Arrow;|Vector;)|riangle(?:;|Bar;|Equal;))|Up(?:DownVector;|TeeVector;|Vector(?:;|Bar;))|Vector(?:;|Bar;)|arrow;|rightarrow;)|ss(?:EqualGreater;|FullEqual;|Greater;|Less;|SlantEqual;|Tilde;))|fr;|l(?:;|eftarrow;)|midot;|o(?:ng(?:Left(?:Arrow;|RightArrow;)|RightArrow;|left(?:arrow;|rightarrow;)|rightarrow;)|pf;|wer(?:LeftArrow;|RightArrow;))|s(?:cr;|h;|trok;)|t;)|M(?:ap;|cy;|e(?:diumSpace;|llintrf;)|fr;|inusPlus;|opf;|scr;|u;)|N(?:Jcy;|acute;|c(?:aron;|edil;|y;)|e(?:gative(?:MediumSpace;|Thi(?:ckSpace;|nSpace;)|VeryThinSpace;)|sted(?:GreaterGreater;|LessLess;)|wLine;)|fr;|o(?:Break;|nBreakingSpace;|pf;|t(?:;|C(?:ongruent;|upCap;)|DoubleVerticalBar;|E(?:lement;|qual(?:;|Tilde;)|xists;)|Greater(?:;|Equal;|FullEqual;|Greater;|Less;|SlantEqual;|Tilde;)|Hump(?:DownHump;|Equal;)|Le(?:ftTriangle(?:;|Bar;|Equal;)|ss(?:;|Equal;|Greater;|Less;|SlantEqual;|Tilde;))|Nested(?:GreaterGreater;|LessLess;)|Precedes(?:;|Equal;|SlantEqual;)|R(?:everseElement;|ightTriangle(?:;|Bar;|Equal;))|S(?:quareSu(?:bset(?:;|Equal;)|perset(?:;|Equal;))|u(?:bset(?:;|Equal;)|cceeds(?:;|Equal;|SlantEqual;|Tilde;)|perset(?:;|Equal;)))|Tilde(?:;|Equal;|FullEqual;|Tilde;)|VerticalBar;))|scr;|tilde;?|u;)|O(?:Elig;|acute;?|c(?:irc;?|y;)|dblac;|fr;|grave;?|m(?:acr;|ega;|icron;)|opf;|penCurly(?:DoubleQuote;|Quote;)|r;|s(?:cr;|lash;?)|ti(?:lde;?|mes;)|uml;?|ver(?:B(?:ar;|rac(?:e;|ket;))|Parenthesis;))|P(?:artialD;|cy;|fr;|hi;|i;|lusMinus;|o(?:incareplane;|pf;)|r(?:;|ecedes(?:;|Equal;|SlantEqual;|Tilde;)|ime;|o(?:duct;|portion(?:;|al;)))|s(?:cr;|i;))|Q(?:UOT;?|fr;|opf;|scr;)|R(?:Barr;|EG;?|a(?:cute;|ng;|rr(?:;|tl;))|c(?:aron;|edil;|y;)|e(?:;|verse(?:E(?:lement;|quilibrium;)|UpEquilibrium;))|fr;|ho;|ight(?:A(?:ngleBracket;|rrow(?:;|Bar;|LeftArrow;))|Ceiling;|Do(?:ubleBracket;|wn(?:TeeVector;|Vector(?:;|Bar;)))|Floor;|T(?:ee(?:;|Arrow;|Vector;)|riangle(?:;|Bar;|Equal;))|Up(?:DownVector;|TeeVector;|Vector(?:;|Bar;))|Vector(?:;|Bar;)|arrow;)|o(?:pf;|undImplies;)|rightarrow;|s(?:cr;|h;)|uleDelayed;)|S(?:H(?:CHcy;|cy;)|OFTcy;|acute;|c(?:;|aron;|edil;|irc;|y;)|fr;|hort(?:DownArrow;|LeftArrow;|RightArrow;|UpArrow;)|igma;|mallCircle;|opf;|q(?:rt;|uare(?:;|Intersection;|Su(?:bset(?:;|Equal;)|perset(?:;|Equal;))|Union;))|scr;|tar;|u(?:b(?:;|set(?:;|Equal;))|c(?:ceeds(?:;|Equal;|SlantEqual;|Tilde;)|hThat;)|m;|p(?:;|erset(?:;|Equal;)|set;)))|T(?:HORN;?|RADE;|S(?:Hcy;|cy;)|a(?:b;|u;)|c(?:aron;|edil;|y;)|fr;|h(?:e(?:refore;|ta;)|i(?:ckSpace;|nSpace;))|ilde(?:;|Equal;|FullEqual;|Tilde;)|opf;|ripleDot;|s(?:cr;|trok;))|U(?:a(?:cute;?|rr(?:;|ocir;))|br(?:cy;|eve;)|c(?:irc;?|y;)|dblac;|fr;|grave;?|macr;|n(?:der(?:B(?:ar;|rac(?:e;|ket;))|Parenthesis;)|ion(?:;|Plus;))|o(?:gon;|pf;)|p(?:Arrow(?:;|Bar;|DownArrow;)|DownArrow;|Equilibrium;|Tee(?:;|Arrow;)|arrow;|downarrow;|per(?:LeftArrow;|RightArrow;)|si(?:;|lon;))|ring;|scr;|tilde;|uml;?)|V(?:Dash;|bar;|cy;|dash(?:;|l;)|e(?:e;|r(?:bar;|t(?:;|ical(?:Bar;|Line;|Separator;|Tilde;))|yThinSpace;))|fr;|opf;|scr;|vdash;)|W(?:circ;|edge;|fr;|opf;|scr;)|X(?:fr;|i;|opf;|scr;)|Y(?:Acy;|Icy;|Ucy;|acute;?|c(?:irc;|y;)|fr;|opf;|scr;|uml;)|Z(?:Hcy;|acute;|c(?:aron;|y;)|dot;|e(?:roWidthSpace;|ta;)|fr;|opf;|scr;)|a(?:acute;?|breve;|c(?:;|E;|d;|irc;?|ute;?|y;)|elig;?|f(?:;|r;)|grave;?|l(?:e(?:fsym;|ph;)|pha;)|m(?:a(?:cr;|lg;)|p;?)|n(?:d(?:;|and;|d;|slope;|v;)|g(?:;|e;|le;|msd(?:;|a(?:a;|b;|c;|d;|e;|f;|g;|h;))|rt(?:;|vb(?:;|d;))|s(?:ph;|t;)|zarr;))|o(?:gon;|pf;)|p(?:;|E;|acir;|e;|id;|os;|prox(?:;|eq;))|ring;?|s(?:cr;|t;|ymp(?:;|eq;))|tilde;?|uml;?|w(?:conint;|int;))|b(?:Not;|a(?:ck(?:cong;|epsilon;|prime;|sim(?:;|eq;))|r(?:vee;|wed(?:;|ge;)))|brk(?:;|tbrk;)|c(?:ong;|y;)|dquo;|e(?:caus(?:;|e;)|mptyv;|psi;|rnou;|t(?:a;|h;|ween;))|fr;|ig(?:c(?:ap;|irc;|up;)|o(?:dot;|plus;|times;)|s(?:qcup;|tar;)|triangle(?:down;|up;)|uplus;|vee;|wedge;)|karow;|l(?:a(?:ck(?:lozenge;|square;|triangle(?:;|down;|left;|right;))|nk;)|k(?:1(?:2;|4;)|34;)|ock;)|n(?:e(?:;|quiv;)|ot;)|o(?:pf;|t(?:;|tom;)|wtie;|x(?:D(?:L;|R;|l;|r;)|H(?:;|D;|U;|d;|u;)|U(?:L;|R;|l;|r;)|V(?:;|H;|L;|R;|h;|l;|r;)|box;|d(?:L;|R;|l;|r;)|h(?:;|D;|U;|d;|u;)|minus;|plus;|times;|u(?:L;|R;|l;|r;)|v(?:;|H;|L;|R;|h;|l;|r;)))|prime;|r(?:eve;|vbar;?)|s(?:cr;|emi;|im(?:;|e;)|ol(?:;|b;|hsub;))|u(?:ll(?:;|et;)|mp(?:;|E;|e(?:;|q;))))|c(?:a(?:cute;|p(?:;|and;|brcup;|c(?:ap;|up;)|dot;|s;)|r(?:et;|on;))|c(?:a(?:ps;|ron;)|edil;?|irc;|ups(?:;|sm;))|dot;|e(?:dil;?|mptyv;|nt(?:;|erdot;|))|fr;|h(?:cy;|eck(?:;|mark;)|i;)|ir(?:;|E;|c(?:;|eq;|le(?:arrow(?:left;|right;)|d(?:R;|S;|ast;|circ;|dash;)))|e;|fnint;|mid;|scir;)|lubs(?:;|uit;)|o(?:lon(?:;|e(?:;|q;))|m(?:ma(?:;|t;)|p(?:;|fn;|le(?:ment;|xes;)))|n(?:g(?:;|dot;)|int;)|p(?:f;|rod;|y(?:;|sr;|)))|r(?:arr;|oss;)|s(?:cr;|u(?:b(?:;|e;)|p(?:;|e;)))|tdot;|u(?:darr(?:l;|r;)|e(?:pr;|sc;)|larr(?:;|p;)|p(?:;|brcap;|c(?:ap;|up;)|dot;|or;|s;)|r(?:arr(?:;|m;)|ly(?:eq(?:prec;|succ;)|vee;|wedge;)|ren;?|vearrow(?:left;|right;))|vee;|wed;)|w(?:conint;|int;)|ylcty;)|d(?:Arr;|Har;|a(?:gger;|leth;|rr;|sh(?:;|v;))|b(?:karow;|lac;)|c(?:aron;|y;)|d(?:;|a(?:gger;|rr;)|otseq;)|e(?:g;?|lta;|mptyv;)|f(?:isht;|r;)|har(?:l;|r;)|i(?:am(?:;|ond(?:;|suit;)|s;)|e;|gamma;|sin;|v(?:;|ide(?:;|ontimes;|)|onx;))|jcy;|lc(?:orn;|rop;)|o(?:llar;|pf;|t(?:;|eq(?:;|dot;)|minus;|plus;|square;)|ublebarwedge;|wn(?:arrow;|downarrows;|harpoon(?:left;|right;)))|r(?:bkarow;|c(?:orn;|rop;))|s(?:c(?:r;|y;)|ol;|trok;)|t(?:dot;|ri(?:;|f;))|u(?:arr;|har;)|wangle;|z(?:cy;|igrarr;))|e(?:D(?:Dot;|ot;)|a(?:cute;?|ster;)|c(?:aron;|ir(?:;|c;?)|olon;|y;)|dot;|e;|f(?:Dot;|r;)|g(?:;|rave;?|s(?:;|dot;))|l(?:;|inters;|l;|s(?:;|dot;))|m(?:acr;|pty(?:;|set;|v;)|sp(?:1(?:3;|4;)|;))|n(?:g;|sp;)|o(?:gon;|pf;)|p(?:ar(?:;|sl;)|lus;|si(?:;|lon;|v;))|q(?:c(?:irc;|olon;)|s(?:im;|lant(?:gtr;|less;))|u(?:als;|est;|iv(?:;|DD;))|vparsl;)|r(?:Dot;|arr;)|s(?:cr;|dot;|im;)|t(?:a;|h;?)|u(?:ml;?|ro;)|x(?:cl;|ist;|p(?:ectation;|onentiale;)))|f(?:allingdotseq;|cy;|emale;|f(?:ilig;|l(?:ig;|lig;)|r;)|ilig;|jlig;|l(?:at;|lig;|tns;)|nof;|o(?:pf;|r(?:all;|k(?:;|v;)))|partint;|r(?:a(?:c(?:1(?:2;?|3;|4;?|5;|6;|8;)|2(?:3;|5;)|3(?:4;?|5;|8;)|45;|5(?:6;|8;)|78;)|sl;)|own;)|scr;)|g(?:E(?:;|l;)|a(?:cute;|mma(?:;|d;)|p;)|breve;|c(?:irc;|y;)|dot;|e(?:;|l;|q(?:;|q;|slant;)|s(?:;|cc;|dot(?:;|o(?:;|l;))|l(?:;|es;)))|fr;|g(?:;|g;)|imel;|jcy;|l(?:;|E;|a;|j;)|n(?:E;|ap(?:;|prox;)|e(?:;|q(?:;|q;))|sim;)|opf;|rave;|s(?:cr;|im(?:;|e;|l;))|t(?:;|c(?:c;|ir;)|dot;|lPar;|quest;|r(?:a(?:pprox;|rr;)|dot;|eq(?:less;|qless;)|less;|sim;)|)|v(?:ertneqq;|nE;))|h(?:Arr;|a(?:irsp;|lf;|milt;|r(?:dcy;|r(?:;|cir;|w;)))|bar;|circ;|e(?:arts(?:;|uit;)|llip;|rcon;)|fr;|ks(?:earow;|warow;)|o(?:arr;|mtht;|ok(?:leftarrow;|rightarrow;)|pf;|rbar;)|s(?:cr;|lash;|trok;)|y(?:bull;|phen;))|i(?:acute;?|c(?:;|irc;?|y;)|e(?:cy;|xcl;?)|f(?:f;|r;)|grave;?|i(?:;|i(?:int;|nt;)|nfin;|ota;)|jlig;|m(?:a(?:cr;|g(?:e;|line;|part;)|th;)|of;|ped;)|n(?:;|care;|fin(?:;|tie;)|odot;|t(?:;|cal;|e(?:gers;|rcal;)|larhk;|prod;))|o(?:cy;|gon;|pf;|ta;)|prod;|quest;?|s(?:cr;|in(?:;|E;|dot;|s(?:;|v;)|v;))|t(?:;|ilde;)|u(?:kcy;|ml;?))|j(?:c(?:irc;|y;)|fr;|math;|opf;|s(?:cr;|ercy;)|ukcy;)|k(?:appa(?:;|v;)|c(?:edil;|y;)|fr;|green;|hcy;|jcy;|opf;|scr;)|l(?:A(?:arr;|rr;|tail;)|Barr;|E(?:;|g;)|Har;|a(?:cute;|emptyv;|gran;|mbda;|ng(?:;|d;|le;)|p;|quo;?|rr(?:;|b(?:;|fs;)|fs;|hk;|lp;|pl;|sim;|tl;)|t(?:;|ail;|e(?:;|s;)))|b(?:arr;|brk;|r(?:ac(?:e;|k;)|k(?:e;|sl(?:d;|u;))))|c(?:aron;|e(?:dil;|il;)|ub;|y;)|d(?:ca;|quo(?:;|r;)|r(?:dhar;|ushar;)|sh;)|e(?:;|ft(?:arrow(?:;|tail;)|harpoon(?:down;|up;)|leftarrows;|right(?:arrow(?:;|s;)|harpoons;|squigarrow;)|threetimes;)|g;|q(?:;|q;|slant;)|s(?:;|cc;|dot(?:;|o(?:;|r;))|g(?:;|es;)|s(?:approx;|dot;|eq(?:gtr;|qgtr;)|gtr;|sim;)))|f(?:isht;|loor;|r;)|g(?:;|E;)|h(?:ar(?:d;|u(?:;|l;))|blk;)|jcy;|l(?:;|arr;|corner;|hard;|tri;)|m(?:idot;|oust(?:;|ache;))|n(?:E;|ap(?:;|prox;)|e(?:;|q(?:;|q;))|sim;)|o(?:a(?:ng;|rr;)|brk;|ng(?:left(?:arrow;|rightarrow;)|mapsto;|rightarrow;)|oparrow(?:left;|right;)|p(?:ar;|f;|lus;)|times;|w(?:ast;|bar;)|z(?:;|enge;|f;))|par(?:;|lt;)|r(?:arr;|corner;|har(?:;|d;)|m;|tri;)|s(?:aquo;|cr;|h;|im(?:;|e;|g;)|q(?:b;|uo(?:;|r;))|trok;)|t(?:;|c(?:c;|ir;)|dot;|hree;|imes;|larr;|quest;|r(?:Par;|i(?:;|e;|f;))|)|ur(?:dshar;|uhar;)|v(?:ertneqq;|nE;))|m(?:DDot;|a(?:cr;?|l(?:e;|t(?:;|ese;))|p(?:;|sto(?:;|down;|left;|up;))|rker;)|c(?:omma;|y;)|dash;|easuredangle;|fr;|ho;|i(?:cro;?|d(?:;|ast;|cir;|dot;?)|nus(?:;|b;|d(?:;|u;)))|l(?:cp;|dr;)|nplus;|o(?:dels;|pf;)|p;|s(?:cr;|tpos;)|u(?:;|ltimap;|map;))|n(?:G(?:g;|t(?:;|v;))|L(?:eft(?:arrow;|rightarrow;)|l;|t(?:;|v;))|Rightarrow;|V(?:Dash;|dash;)|a(?:bla;|cute;|ng;|p(?:;|E;|id;|os;|prox;)|tur(?:;|al(?:;|s;)))|b(?:sp;?|ump(?:;|e;))|c(?:a(?:p;|ron;)|edil;|ong(?:;|dot;)|up;|y;)|dash;|e(?:;|Arr;|ar(?:hk;|r(?:;|ow;))|dot;|quiv;|s(?:ear;|im;)|xist(?:;|s;))|fr;|g(?:E;|e(?:;|q(?:;|q;|slant;)|s;)|sim;|t(?:;|r;))|h(?:Arr;|arr;|par;)|i(?:;|s(?:;|d;)|v;)|jcy;|l(?:Arr;|E;|arr;|dr;|e(?:;|ft(?:arrow;|rightarrow;)|q(?:;|q;|slant;)|s(?:;|s;))|sim;|t(?:;|ri(?:;|e;)))|mid;|o(?:pf;|t(?:;|in(?:;|E;|dot;|v(?:a;|b;|c;))|ni(?:;|v(?:a;|b;|c;))|))|p(?:ar(?:;|allel;|sl;|t;)|olint;|r(?:;|cue;|e(?:;|c(?:;|eq;))))|r(?:Arr;|arr(?:;|c;|w;)|ightarrow;|tri(?:;|e;))|s(?:c(?:;|cue;|e;|r;)|hort(?:mid;|parallel;)|im(?:;|e(?:;|q;))|mid;|par;|qsu(?:be;|pe;)|u(?:b(?:;|E;|e;|set(?:;|eq(?:;|q;)))|cc(?:;|eq;)|p(?:;|E;|e;|set(?:;|eq(?:;|q;)))))|t(?:gl;|ilde;?|lg;|riangle(?:left(?:;|eq;)|right(?:;|eq;)))|u(?:;|m(?:;|ero;|sp;))|v(?:Dash;|Harr;|ap;|dash;|g(?:e;|t;)|infin;|l(?:Arr;|e;|t(?:;|rie;))|r(?:Arr;|trie;)|sim;)|w(?:Arr;|ar(?:hk;|r(?:;|ow;))|near;))|o(?:S;|a(?:cute;?|st;)|c(?:ir(?:;|c;?)|y;)|d(?:ash;|blac;|iv;|ot;|sold;)|elig;|f(?:cir;|r;)|g(?:on;|rave;?|t;)|h(?:bar;|m;)|int;|l(?:arr;|c(?:ir;|ross;)|ine;|t;)|m(?:acr;|ega;|i(?:cron;|d;|nus;))|opf;|p(?:ar;|erp;|lus;)|r(?:;|arr;|d(?:;|er(?:;|of;)|f;?|m;?)|igof;|or;|slope;|v;)|s(?:cr;|lash;?|ol;)|ti(?:lde;?|mes(?:;|as;))|uml;?|vbar;)|p(?:ar(?:;|a(?:;|llel;|)|s(?:im;|l;)|t;)|cy;|er(?:cnt;|iod;|mil;|p;|tenk;)|fr;|h(?:i(?:;|v;)|mmat;|one;)|i(?:;|tchfork;|v;)|l(?:an(?:ck(?:;|h;)|kv;)|us(?:;|acir;|b;|cir;|d(?:o;|u;)|e;|mn;?|sim;|two;))|m;|o(?:intint;|pf;|und;?)|r(?:;|E;|ap;|cue;|e(?:;|c(?:;|approx;|curlyeq;|eq;|n(?:approx;|eqq;|sim;)|sim;))|ime(?:;|s;)|n(?:E;|ap;|sim;)|o(?:d;|f(?:alar;|line;|surf;)|p(?:;|to;))|sim;|urel;)|s(?:cr;|i;)|uncsp;)|q(?:fr;|int;|opf;|prime;|scr;|u(?:at(?:ernions;|int;)|est(?:;|eq;)|ot;?))|r(?:A(?:arr;|rr;|tail;)|Barr;|Har;|a(?:c(?:e;|ute;)|dic;|emptyv;|ng(?:;|d;|e;|le;)|quo;?|rr(?:;|ap;|b(?:;|fs;)|c;|fs;|hk;|lp;|pl;|sim;|tl;|w;)|t(?:ail;|io(?:;|nals;)))|b(?:arr;|brk;|r(?:ac(?:e;|k;)|k(?:e;|sl(?:d;|u;))))|c(?:aron;|e(?:dil;|il;)|ub;|y;)|d(?:ca;|ldhar;|quo(?:;|r;)|sh;)|e(?:al(?:;|ine;|part;|s;)|ct;|g;?)|f(?:isht;|loor;|r;)|h(?:ar(?:d;|u(?:;|l;))|o(?:;|v;))|i(?:ght(?:arrow(?:;|tail;)|harpoon(?:down;|up;)|left(?:arrows;|harpoons;)|rightarrows;|squigarrow;|threetimes;)|ng;|singdotseq;)|l(?:arr;|har;|m;)|moust(?:;|ache;)|nmid;|o(?:a(?:ng;|rr;)|brk;|p(?:ar;|f;|lus;)|times;)|p(?:ar(?:;|gt;)|polint;)|rarr;|s(?:aquo;|cr;|h;|q(?:b;|uo(?:;|r;)))|t(?:hree;|imes;|ri(?:;|e;|f;|ltri;))|uluhar;|x;)|s(?:acute;|bquo;|c(?:;|E;|a(?:p;|ron;)|cue;|e(?:;|dil;)|irc;|n(?:E;|ap;|sim;)|polint;|sim;|y;)|dot(?:;|b;|e;)|e(?:Arr;|ar(?:hk;|r(?:;|ow;))|ct;?|mi;|swar;|tm(?:inus;|n;)|xt;)|fr(?:;|own;)|h(?:arp;|c(?:hcy;|y;)|ort(?:mid;|parallel;)|y;?)|i(?:gma(?:;|f;|v;)|m(?:;|dot;|e(?:;|q;)|g(?:;|E;)|l(?:;|E;)|ne;|plus;|rarr;))|larr;|m(?:a(?:llsetminus;|shp;)|eparsl;|i(?:d;|le;)|t(?:;|e(?:;|s;)))|o(?:ftcy;|l(?:;|b(?:;|ar;))|pf;)|pa(?:des(?:;|uit;)|r;)|q(?:c(?:ap(?:;|s;)|up(?:;|s;))|su(?:b(?:;|e;|set(?:;|eq;))|p(?:;|e;|set(?:;|eq;)))|u(?:;|ar(?:e;|f;)|f;))|rarr;|s(?:cr;|etmn;|mile;|tarf;)|t(?:ar(?:;|f;)|r(?:aight(?:epsilon;|phi;)|ns;))|u(?:b(?:;|E;|dot;|e(?:;|dot;)|mult;|n(?:E;|e;)|plus;|rarr;|s(?:et(?:;|eq(?:;|q;)|neq(?:;|q;))|im;|u(?:b;|p;)))|cc(?:;|approx;|curlyeq;|eq;|n(?:approx;|eqq;|sim;)|sim;)|m;|ng;|p(?:1;?|2;?|3;?|;|E;|d(?:ot;|sub;)|e(?:;|dot;)|hs(?:ol;|ub;)|larr;|mult;|n(?:E;|e;)|plus;|s(?:et(?:;|eq(?:;|q;)|neq(?:;|q;))|im;|u(?:b;|p;))))|w(?:Arr;|ar(?:hk;|r(?:;|ow;))|nwar;)|zlig;?)|t(?:a(?:rget;|u;)|brk;|c(?:aron;|edil;|y;)|dot;|elrec;|fr;|h(?:e(?:re(?:4;|fore;)|ta(?:;|sym;|v;))|i(?:ck(?:approx;|sim;)|nsp;)|k(?:ap;|sim;)|orn;?)|i(?:lde;|mes(?:;|b(?:;|ar;)|d;|)|nt;)|o(?:ea;|p(?:;|bot;|cir;|f(?:;|ork;))|sa;)|prime;|r(?:ade;|i(?:angle(?:;|down;|left(?:;|eq;)|q;|right(?:;|eq;))|dot;|e;|minus;|plus;|sb;|time;)|pezium;)|s(?:c(?:r;|y;)|hcy;|trok;)|w(?:ixt;|ohead(?:leftarrow;|rightarrow;)))|u(?:Arr;|Har;|a(?:cute;?|rr;)|br(?:cy;|eve;)|c(?:irc;?|y;)|d(?:arr;|blac;|har;)|f(?:isht;|r;)|grave;?|h(?:ar(?:l;|r;)|blk;)|l(?:c(?:orn(?:;|er;)|rop;)|tri;)|m(?:acr;|l;?)|o(?:gon;|pf;)|p(?:arrow;|downarrow;|harpoon(?:left;|right;)|lus;|si(?:;|h;|lon;)|uparrows;)|r(?:c(?:orn(?:;|er;)|rop;)|ing;|tri;)|scr;|t(?:dot;|ilde;|ri(?:;|f;))|u(?:arr;|ml;?)|wangle;)|v(?:Arr;|Bar(?:;|v;)|Dash;|a(?:ngrt;|r(?:epsilon;|kappa;|nothing;|p(?:hi;|i;|ropto;)|r(?:;|ho;)|s(?:igma;|u(?:bsetneq(?:;|q;)|psetneq(?:;|q;)))|t(?:heta;|riangle(?:left;|right;))))|cy;|dash;|e(?:e(?:;|bar;|eq;)|llip;|r(?:bar;|t;))|fr;|ltri;|nsu(?:b;|p;)|opf;|prop;|rtri;|s(?:cr;|u(?:bn(?:E;|e;)|pn(?:E;|e;)))|zigzag;)|w(?:circ;|e(?:d(?:bar;|ge(?:;|q;))|ierp;)|fr;|opf;|p;|r(?:;|eath;)|scr;)|x(?:c(?:ap;|irc;|up;)|dtri;|fr;|h(?:Arr;|arr;)|i;|l(?:Arr;|arr;)|map;|nis;|o(?:dot;|p(?:f;|lus;)|time;)|r(?:Arr;|arr;)|s(?:cr;|qcup;)|u(?:plus;|tri;)|vee;|wedge;)|y(?:ac(?:ute;?|y;)|c(?:irc;|y;)|en;?|fr;|icy;|opf;|scr;|u(?:cy;|ml;?))|z(?:acute;|c(?:aron;|y;)|dot;|e(?:etrf;|ta;)|fr;|hcy;|igrarr;|opf;|scr;|w(?:j;|nj;)))|[\s\S]/g,iV=32,sV=/[^\r"&\u0000]+/g,oV=/[^\r'&\u0000]+/g,nV=/[^\r\t\n\f &>\u0000]+/g,rV=/[^\r\t\n\f \/>A-Z\u0000]+/g,aV=/[^\r\t\n\f \/=>A-Z\u0000]+/g,tV=/[^\]\r\u0000\uffff]*/g,eV=/[^&<\r\u0000\uffff]*/g,zX=/[^<\r\u0000\uffff]*/g,$J=/[^\r\u0000\uffff]*/g,XX=/(?:(\/)?([a-z]+)>)|[\s\S]/g,QX=/(?:([-a-z]+)[ \t\n\f]*=[ \t\n\f]*('[^'&\r\u0000]*'|"[^"&\r\u0000]*"|[^\t\n\r\f "&'\u0000>][^&> \t\n\r\f\u0000]*[ \t\n\f]))|[\s\S]/g,Q9=/[^\x09\x0A\x0C\x0D\x20]/,GZ=/[^\x09\x0A\x0C\x0D\x20]/g,ZJ=/[^\x00\x09\x0A\x0C\x0D\x20]/,e1=/^[\x09\x0A\x0C\x0D\x20]+/,G9=/\x00/g;function f0($){var Z=16384;if($.length<Z)return String.fromCharCode.apply(String,$);var Y="";for(var z=0;z<$.length;z+=Z)Y+=String.fromCharCode.apply(String,$.slice(z,z+Z));return Y}function YJ($){var Z=[];for(var Y=0;Y<$.length;Y++)Z[Y]=$.charCodeAt(Y);return Z}function G0($,Z){if(typeof Z==="string")return $.namespaceURI===k.HTML&&$.localName===Z;var Y=Z[$.namespaceURI];return Y&&Y[$.localName]}function GX($){return G0($,DX)}function WX($){if(G0($,OX))return!0;if($.namespaceURI===k.MATHML&&$.localName==="annotation-xml"){var Z=$.getAttribute("encoding");if(Z)Z=Z.toLowerCase();if(Z==="text/html"||Z==="application/xhtml+xml")return!0}return!1}function zJ($){if($ in $X)return $X[$];else return $}function VX($){for(var Z=0,Y=$.length;Z<Y;Z++)if($[Z][0]in ez)$[Z][0]=ez[$[Z][0]]}function JX($){for(var Z=0,Y=$.length;Z<Y;Z++)if($[Z][0]==="definitionurl"){$[Z][0]="definitionURL";break}}function WZ($){for(var Z=0,Y=$.length;Z<Y;Z++)if($[Z][0]in tz)$[Z].push(tz[$[Z][0]])}function _X($,Z){for(var Y=0,z=$.length;Y<z;Y++){var X=$[Y][0],Q=$[Y][1];if(Z.hasAttribute(X))continue;Z._setAttribute(X,Q)}}e.ElementStack=function $(){this.elements=[],this.top=null};e.ElementStack.prototype.push=function($){this.elements.push($),this.top=$};e.ElementStack.prototype.pop=function($){this.elements.pop(),this.top=this.elements[this.elements.length-1]};e.ElementStack.prototype.popTag=function($){for(var Z=this.elements.length-1;Z>0;Z--){var Y=this.elements[Z];if(G0(Y,$))break}this.elements.length=Z,this.top=this.elements[Z-1]};e.ElementStack.prototype.popElementType=function($){for(var Z=this.elements.length-1;Z>0;Z--)if(this.elements[Z]instanceof $)break;this.elements.length=Z,this.top=this.elements[Z-1]};e.ElementStack.prototype.popElement=function($){for(var Z=this.elements.length-1;Z>0;Z--)if(this.elements[Z]===$)break;this.elements.length=Z,this.top=this.elements[Z-1]};e.ElementStack.prototype.removeElement=function($){if(this.top===$)this.pop();else{var Z=this.elements.lastIndexOf($);if(Z!==-1)this.elements.splice(Z,1)}};e.ElementStack.prototype.clearToContext=function($){for(var Z=this.elements.length-1;Z>0;Z--)if(G0(this.elements[Z],$))break;this.elements.length=Z+1,this.top=this.elements[Z]};e.ElementStack.prototype.contains=function($){return this.inSpecificScope($,Object.create(null))};e.ElementStack.prototype.inSpecificScope=function($,Z){for(var Y=this.elements.length-1;Y>=0;Y--){var z=this.elements[Y];if(G0(z,$))return!0;if(G0(z,Z))return!1}return!1};e.ElementStack.prototype.elementInSpecificScope=function($,Z){for(var Y=this.elements.length-1;Y>=0;Y--){var z=this.elements[Y];if(z===$)return!0;if(G0(z,Z))return!1}return!1};e.ElementStack.prototype.elementTypeInSpecificScope=function($,Z){for(var Y=this.elements.length-1;Y>=0;Y--){var z=this.elements[Y];if(z instanceof $)return!0;if(G0(z,Z))return!1}return!1};e.ElementStack.prototype.inScope=function($){return this.inSpecificScope($,F1)};e.ElementStack.prototype.elementInScope=function($){return this.elementInSpecificScope($,F1)};e.ElementStack.prototype.elementTypeInScope=function($){return this.elementTypeInSpecificScope($,F1)};e.ElementStack.prototype.inButtonScope=function($){return this.inSpecificScope($,_Z)};e.ElementStack.prototype.inListItemScope=function($){return this.inSpecificScope($,J9)};e.ElementStack.prototype.inTableScope=function($){return this.inSpecificScope($,FX)};e.ElementStack.prototype.inSelectScope=function($){for(var Z=this.elements.length-1;Z>=0;Z--){var Y=this.elements[Z];if(Y.namespaceURI!==k.HTML)return!1;var z=Y.localName;if(z===$)return!0;if(z!=="optgroup"&&z!=="option")return!1}return!1};e.ElementStack.prototype.generateImpliedEndTags=function($,Z){var Y=Z?jX:qX;for(var z=this.elements.length-1;z>=0;z--){var X=this.elements[z];if($&&G0(X,$))break;if(!G0(this.elements[z],Y))break}this.elements.length=z+1,this.top=this.elements[z]};e.ActiveFormattingElements=function $(){this.list=[],this.attrs=[]};e.ActiveFormattingElements.prototype.MARKER={localName:"|"};e.ActiveFormattingElements.prototype.insertMarker=function(){this.list.push(this.MARKER),this.attrs.push(this.MARKER)};e.ActiveFormattingElements.prototype.push=function($,Z){var Y=0;for(var z=this.list.length-1;z>=0;z--){if(this.list[z]===this.MARKER)break;if(G($,this.list[z],this.attrs[z])){if(Y++,Y===3){this.list.splice(z,1),this.attrs.splice(z,1);break}}}this.list.push($);var X=[];for(var Q=0;Q<Z.length;Q++)X[Q]=Z[Q];this.attrs.push(X);function G(J,_,H){if(J.localName!==_.localName)return!1;if(J._numattrs!==H.length)return!1;for(var q=0,F=H.length;q<F;q++){var L=H[q][0],B=H[q][1];if(!J.hasAttribute(L))return!1;if(J.getAttribute(L)!==B)return!1}return!0}};e.ActiveFormattingElements.prototype.clearToMarker=function(){for(var $=this.list.length-1;$>=0;$--)if(this.list[$]===this.MARKER)break;if($<0)$=0;this.list.length=$,this.attrs.length=$};e.ActiveFormattingElements.prototype.findElementByTag=function($){for(var Z=this.list.length-1;Z>=0;Z--){var Y=this.list[Z];if(Y===this.MARKER)break;if(Y.localName===$)return Y}return null};e.ActiveFormattingElements.prototype.indexOf=function($){return this.list.lastIndexOf($)};e.ActiveFormattingElements.prototype.remove=function($){var Z=this.list.lastIndexOf($);if(Z!==-1)this.list.splice(Z,1),this.attrs.splice(Z,1)};e.ActiveFormattingElements.prototype.replace=function($,Z,Y){var z=this.list.lastIndexOf($);if(z!==-1)this.list[z]=Z,this.attrs[z]=Y};e.ActiveFormattingElements.prototype.insertAfter=function($,Z){var Y=this.list.lastIndexOf($);if(Y!==-1)this.list.splice(Y,0,Z),this.attrs.splice(Y,0,Z)};function e($,Z,Y){var z=null,X=0,Q=0,G=!1,J=!1,_=0,H=[],q="",F=!0,L=0,B=n,D,S,A="",m="",R=[],w="",s="",y=[],W0=[],d=[],i=[],t=[],O0=!1,O=xQ,f=null,p=[],K=new e.ElementStack,P=new e.ActiveFormattingElements,o=Z!==void 0,L0=null,I0=null,U0=!0;if(Z)U0=Z.ownerDocument._scripting_enabled;if(Y&&Y.scripting_enabled===!1)U0=!1;var V0=!0,z8=!1,P0,Y1,T=[],J1=!1,m1=!1,H6={document:function(){return $0},_asDocumentFragment:function(){var W=$0.createDocumentFragment(),V=$0.firstChild;while(V.hasChildNodes())W.appendChild(V.firstChild);return W},pause:function(){L++},resume:function(){L--,this.parse("")},parse:function(W,V,j){var M;if(L>0)return q+=W,!0;if(_===0){if(q)W=q+W,q="";if(V)W+="\uFFFF",G=!0;if(z=W,X=W.length,Q=0,F){if(F=!1,z.charCodeAt(0)===65279)Q=1}_++,M=gZ(j),q=z.substring(Q,X),_--}else{if(_++,H.push(z,X,Q),z=W,X=W.length,Q=0,gZ(),M=!1,q=z.substring(Q,X),Q=H.pop(),X=H.pop(),z=H.pop(),q)z=q+z.substring(Q),X=z.length,Q=0,q="";_--}return M}},$0=new hV(!0,$);if($0._parser=H6,$0._scripting_enabled=U0,Z){if(Z.ownerDocument._quirks)$0._quirks=!0;if(Z.ownerDocument._limitedQuirks)$0._limitedQuirks=!0;if(Z.namespaceURI===k.HTML)switch(Z.localName){case"title":case"textarea":B=N1;break;case"style":case"xmp":case"iframe":case"noembed":case"noframes":case"script":case"plaintext":B=b9;break}var hZ=$0.createElement("html");if($0._appendChild(hZ),K.push(hZ),Z instanceof Q0.HTMLTemplateElement)p.push(u9);C8();for(var U8=Z;U8!==null;U8=U8.parentElement)if(U8 instanceof Q0.HTMLFormElement){I0=U8;break}}function gZ(W){var V,j,M,I;while(Q<X){if(L>0||W&&W())return!0;switch(typeof B.lookahead){case"undefined":if(V=z.charCodeAt(Q++),J){if(J=!1,V===10){Q++;continue}}switch(V){case 13:if(Q<X){if(z.charCodeAt(Q)===10)Q++}else J=!0;B(10);break;case 65535:if(G&&Q===X){B(X9);break}default:B(V);break}break;case"number":V=z.charCodeAt(Q);var C=B.lookahead,g=!0;if(C<0)g=!1,C=-C;if(C<X-Q)j=g?z.substring(Q,Q+C):null,I=!1;else if(G){if(j=g?z.substring(Q,X):null,I=!0,V===65535&&Q===X-1)V=X9}else return!0;B(V,j,I);break;case"string":V=z.charCodeAt(Q),M=B.lookahead;var r=z.indexOf(M,Q);if(r!==-1)j=z.substring(Q,r+M.length),I=!1;else{if(!G)return!0;if(j=z.substring(Q,X),V===65535&&Q===X-1)V=X9;I=!0}B(V,j,I);break}}return!1}function R1(W,V){for(var j=0;j<t.length;j++)if(t[j][0]===W)return;if(V!==void 0)t.push([W,V]);else t.push([W])}function h2(){QX.lastIndex=Q-1;var W=QX.exec(z);if(!W)throw new Error("should never happen");var V=W[1];if(!V)return!1;var j=W[2],M=j.length;switch(j[0]){case'"':case"'":j=j.substring(1,M-1),Q+=W[0].length-1,B=f9;break;default:B=q1,Q+=W[0].length-1,j=j.substring(0,M-1);break}for(var I=0;I<t.length;I++)if(t[I][0]===V)return!0;return t.push([V,j]),!0}function g2(){O0=!1,A="",t.length=0}function A8(){O0=!0,A="",t.length=0}function D1(){R.length=0}function C9(){w=""}function E9(){s=""}function vZ(){y.length=0}function X8(){W0.length=0,d=null,i=null}function q6(){d=[]}function C1(){i=[]}function Y0(){z8=!0}function v2(){return K.top&&K.top.namespaceURI!=="http://www.w3.org/1999/xhtml"}function r0(W){return m===W}function Q8(){if(T.length>0){var W=f0(T);if(T.length=0,m1){if(m1=!1,W[0]===`
|
|
30
|
-
`)W=W.substring(1);if(W.length===0)return}
|
|
31
|
-
`)W=W.substring(1);if(W.length===0)return}M0(S8,W)}function O1(){if(O0)M0(a,A);else{var W=A;A="",m=W,M0(k0,W,t)}}function m2(){if(Q===X)return!1;XX.lastIndex=Q;var W=XX.exec(z);if(!W)throw new Error("should never happen");var V=W[2];if(!V)return!1;var j=W[1];if(j)Q+=V.length+2,M0(a,V);else Q+=V.length+1,m=V,M0(k0,V,pV);return!0}function u2(){if(O0)M0(a,A,null,!0);else M0(k0,A,t,!0)}function z0(){M0(vV,f0(W0),d?f0(d):void 0,i?f0(i):void 0)}function c(){Q8(),O(X9),$0.modclock=1}var M0=H6.insertToken=function W(V,j,M,I){Q8();var C=K.top;if(!C||C.namespaceURI===k.HTML)O(V,j,M,I);else if(V!==k0&&V!==S8)Z7(V,j,M,I);else if(GX(C)&&(V===S8||V===k0&&j!=="mglyph"&&j!=="malignmark")||V===k0&&j==="svg"&&C.namespaceURI===k.MATHML&&C.localName==="annotation-xml"||WX(C))Y1=!0,O(V,j,M,I),Y1=!1;else Z7(V,j,M,I)};function _1(W){var V=K.top;if(E1&&G0(V,L8))K6(function(j){return j.createComment(W)});else{if(V instanceof Q0.HTMLTemplateElement)V=V.content;V._appendChild(V.ownerDocument.createComment(W))}}function B1(W){var V=K.top;if(E1&&G0(V,L8))K6(function(M){return M.createTextNode(W)});else{if(V instanceof Q0.HTMLTemplateElement)V=V.content;var j=V.lastChild;if(j&&j.nodeType===QZ.TEXT_NODE)j.appendData(W);else V._appendChild(V.ownerDocument.createTextNode(W))}}function R8(W,V,j){var M=BX.createElement(W,V,null);if(j)for(var I=0,C=j.length;I<C;I++)M._setAttribute(j[I][0],j[I][1]);return M}var E1=!1;function u(W,V){var j=j6(function(M){return R8(M,W,V)});if(G0(j,KX))j._form=I0;return j}function j6(W){var V;if(E1&&G0(K.top,L8))V=K6(W);else if(K.top instanceof Q0.HTMLTemplateElement)V=W(K.top.content.ownerDocument),K.top.content._appendChild(V);else V=W(K.top.ownerDocument),K.top._appendChild(V);return K.push(V),V}function N9(W,V,j){return j6(function(M){var I=M._createElementNS(W,j,null);if(V)for(var C=0,g=V.length;C<g;C++){var r=V[C];if(r.length===2)I._setAttribute(r[0],r[1]);else I._setAttributeNS(r[2],r[0],r[1])}return I})}function pZ(W){for(var V=K.elements.length-1;V>=0;V--)if(K.elements[V]instanceof W)return V;return-1}function K6(W){var V,j,M=-1,I=-1,C;if(M=pZ(Q0.HTMLTableElement),I=pZ(Q0.HTMLTemplateElement),I>=0&&(M<0||I>M))V=K.elements[I];else if(M>=0)if(V=K.elements[M].parentNode,V)j=K.elements[M];else V=K.elements[M-1];if(!V)V=K.elements[0];if(V instanceof Q0.HTMLTemplateElement)V=V.content;if(C=W(V.ownerDocument),C.nodeType===QZ.TEXT_NODE){var g;if(j)g=j.previousSibling;else g=V.lastChild;if(g&&g.nodeType===QZ.TEXT_NODE)return g.appendData(C.data),C}if(j)V.insertBefore(C,j);else V._appendChild(C);return C}function C8(){var W=!1;for(var V=K.elements.length-1;V>=0;V--){var j=K.elements[V];if(V===0){if(W=!0,o)j=Z}if(j.namespaceURI===k.HTML){var M=j.localName;switch(M){case"select":for(var I=V;I>0;){var C=K.elements[--I];if(C instanceof Q0.HTMLTemplateElement)break;else if(C instanceof Q0.HTMLTableElement){O=E6;return}}O=M1;return;case"tr":O=w8;return;case"tbody":case"tfoot":case"thead":O=l1;return;case"caption":O=m9;return;case"colgroup":O=C6;return;case"table":O=a0;return;case"template":O=p[p.length-1];return;case"body":O=h;return;case"frameset":O=d9;return;case"html":if(L0===null)O=T6;else O=p9;return;default:if(!W){if(M==="head"){O=q0;return}if(M==="td"||M==="th"){O=G8;return}}}}if(W){O=h;return}}}function F6(W,V){u(W,V),B=E8,f=O,O=R6}function d2(W,V){u(W,V),B=N1,f=O,O=R6}function w9(W,V){return{elt:R8(W,P.list[V].localName,P.attrs[V]),attrs:P.attrs[V]}}function m0(){if(P.list.length===0)return;var W=P.list[P.list.length-1];if(W===P.MARKER)return;if(K.elements.lastIndexOf(W)!==-1)return;for(var V=P.list.length-2;V>=0;V--){if(W=P.list[V],W===P.MARKER)break;if(K.elements.lastIndexOf(W)!==-1)break}for(V=V+1;V<P.list.length;V++){var j=j6(function(M){return w9(M,V).elt});P.list[V]=j}}var D6={localName:"BM"};function c2(W){if(G0(K.top,W)&&P.indexOf(K.top)===-1)return K.pop(),!0;var V=0;while(V<8){V++;var j=P.findElementByTag(W);if(!j)return!1;var M=K.elements.lastIndexOf(j);if(M===-1)return P.remove(j),!0;if(!K.elementInScope(j))return!0;var I=null,C;for(var g=M+1;g<K.elements.length;g++)if(G0(K.elements[g],$8)){I=K.elements[g],C=g;break}if(!I)return K.popElement(j),P.remove(j),!0;else{var r=K.elements[M-1];P.insertAfter(j,D6);var B0=I,E0=I,t0=C,z1,i1=0;while(!0){if(i1++,B0=K.elements[--t0],B0===j)break;if(z1=P.indexOf(B0),i1>3&&z1!==-1)P.remove(B0),z1=-1;if(z1===-1){K.removeElement(B0);continue}var k1=w9(r.ownerDocument,z1);if(P.replace(B0,k1.elt,k1.attrs),K.elements[t0]=k1.elt,B0=k1.elt,E0===I)P.remove(D6),P.insertAfter(k1.elt,D6);B0._appendChild(E0),E0=B0}if(E1&&G0(r,L8))K6(function(){return E0});else if(r instanceof Q0.HTMLTemplateElement)r.content._appendChild(E0);else r._appendChild(E0);var b8=w9(I.ownerDocument,P.indexOf(j));while(I.hasChildNodes())b8.elt._appendChild(I.firstChild);I._appendChild(b8.elt),P.remove(j),P.replace(D6,b8.elt,b8.attrs),K.removeElement(j);var gQ=K.elements.lastIndexOf(I);K.elements.splice(gQ+1,0,b8.elt)}}return!0}function l2(){K.pop(),O=f;return}function u1(){if(delete $0._parser,K.elements.length=0,$0.defaultView)$0.defaultView.dispatchEvent(new Q0.Event("load",{}))}function x(W,V){B=V,Q--}function n(W){switch(W){case 38:D=n,B=N8;break;case 60:if(m2())break;B=i2;break;case 0:T.push(W),J1=!0;break;case-1:c();break;default:T8(eV)||T.push(W);break}}function N1(W){switch(W){case 38:D=N1,B=N8;break;case 60:B=o2;break;case 0:T.push(65533),J1=!0;break;case-1:c();break;default:T.push(W);break}}function E8(W){switch(W){case 60:B=a2;break;case 0:T.push(65533);break;case-1:c();break;default:T8(zX)||T.push(W);break}}function w1(W){switch(W){case 60:B=$Q;break;case 0:T.push(65533);break;case-1:c();break;default:T8(zX)||T.push(W);break}}function b9(W){switch(W){case 0:T.push(65533);break;case-1:c();break;default:T8($J)||T.push(W);break}}function i2(W){switch(W){case 33:B=cZ;break;case 47:B=s2;break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:g2(),x(W,mZ);break;case 63:x(W,L6);break;default:T.push(60),x(W,n);break}}function s2(W){switch(W){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:A8(),x(W,mZ);break;case 62:B=n;break;case-1:T.push(60),T.push(47),c();break;default:x(W,L6);break}}function mZ(W){switch(W){case 9:case 10:case 12:case 32:B=q1;break;case 47:B=x1;break;case 62:B=n,O1();break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:A+=String.fromCharCode(W+32);break;case 0:A+=String.fromCharCode(65533);break;case-1:c();break;default:A+=P8(rV);break}}function o2(W){if(W===47)D1(),B=n2;else T.push(60),x(W,N1)}function n2(W){switch(W){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:A8(),x(W,r2);break;default:T.push(60),T.push(47),x(W,N1);break}}function r2(W){switch(W){case 9:case 10:case 12:case 32:if(r0(A)){B=q1;return}break;case 47:if(r0(A)){B=x1;return}break;case 62:if(r0(A)){B=n,O1();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:A+=String.fromCharCode(W+32),R.push(W);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:A+=String.fromCharCode(W),R.push(W);return;default:break}T.push(60),T.push(47),t1(T,R),x(W,N1)}function a2(W){if(W===47)D1(),B=t2;else T.push(60),x(W,E8)}function t2(W){switch(W){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:A8(),x(W,e2);break;default:T.push(60),T.push(47),x(W,E8);break}}function e2(W){switch(W){case 9:case 10:case 12:case 32:if(r0(A)){B=q1;return}break;case 47:if(r0(A)){B=x1;return}break;case 62:if(r0(A)){B=n,O1();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:A+=String.fromCharCode(W+32),R.push(W);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:A+=String.fromCharCode(W),R.push(W);return;default:break}T.push(60),T.push(47),t1(T,R),x(W,E8)}function $Q(W){switch(W){case 47:D1(),B=ZQ;break;case 33:B=zQ,T.push(60),T.push(33);break;default:T.push(60),x(W,w1);break}}function ZQ(W){switch(W){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:A8(),x(W,YQ);break;default:T.push(60),T.push(47),x(W,w1);break}}function YQ(W){switch(W){case 9:case 10:case 12:case 32:if(r0(A)){B=q1;return}break;case 47:if(r0(A)){B=x1;return}break;case 62:if(r0(A)){B=n,O1();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:A+=String.fromCharCode(W+32),R.push(W);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:A+=String.fromCharCode(W),R.push(W);return;default:break}T.push(60),T.push(47),t1(T,R),x(W,w1)}function zQ(W){if(W===45)B=XQ,T.push(45);else x(W,w1)}function XQ(W){if(W===45)B=uZ,T.push(45);else x(W,w1)}function H1(W){switch(W){case 45:B=QQ,T.push(45);break;case 60:B=x9;break;case 0:T.push(65533);break;case-1:c();break;default:T.push(W);break}}function QQ(W){switch(W){case 45:B=uZ,T.push(45);break;case 60:B=x9;break;case 0:B=H1,T.push(65533);break;case-1:c();break;default:B=H1,T.push(W);break}}function uZ(W){switch(W){case 45:T.push(45);break;case 60:B=x9;break;case 62:B=w1,T.push(62);break;case 0:B=H1,T.push(65533);break;case-1:c();break;default:B=H1,T.push(W);break}}function x9(W){switch(W){case 47:D1(),B=GQ;break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:D1(),T.push(60),x(W,VQ);break;default:T.push(60),x(W,H1);break}}function GQ(W){switch(W){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:A8(),x(W,WQ);break;default:T.push(60),T.push(47),x(W,H1);break}}function WQ(W){switch(W){case 9:case 10:case 12:case 32:if(r0(A)){B=q1;return}break;case 47:if(r0(A)){B=x1;return}break;case 62:if(r0(A)){B=n,O1();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:A+=String.fromCharCode(W+32),R.push(W);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:A+=String.fromCharCode(W),R.push(W);return;default:break}T.push(60),T.push(47),t1(T,R),x(W,H1)}function VQ(W){switch(W){case 9:case 10:case 12:case 32:case 47:case 62:if(f0(R)==="script")B=b1;else B=H1;T.push(W);break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:R.push(W+32),T.push(W);break;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:R.push(W),T.push(W);break;default:x(W,H1);break}}function b1(W){switch(W){case 45:B=JQ,T.push(45);break;case 60:B=y9,T.push(60);break;case 0:T.push(65533);break;case-1:c();break;default:T.push(W);break}}function JQ(W){switch(W){case 45:B=_Q,T.push(45);break;case 60:B=y9,T.push(60);break;case 0:B=b1,T.push(65533);break;case-1:c();break;default:B=b1,T.push(W);break}}function _Q(W){switch(W){case 45:T.push(45);break;case 60:B=y9,T.push(60);break;case 62:B=w1,T.push(62);break;case 0:B=b1,T.push(65533);break;case-1:c();break;default:B=b1,T.push(W);break}}function y9(W){if(W===47)D1(),B=BQ,T.push(47);else x(W,b1)}function BQ(W){switch(W){case 9:case 10:case 12:case 32:case 47:case 62:if(f0(R)==="script")B=H1;else B=b1;T.push(W);break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:R.push(W+32),T.push(W);break;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:R.push(W),T.push(W);break;default:x(W,b1);break}}function q1(W){switch(W){case 9:case 10:case 12:case 32:break;case 47:B=x1;break;case 62:B=n,O1();break;case-1:c();break;case 61:C9(),w+=String.fromCharCode(W),B=k9;break;default:if(h2())break;C9(),x(W,k9);break}}function k9(W){switch(W){case 9:case 10:case 12:case 32:case 47:case 62:case-1:x(W,HQ);break;case 61:B=dZ;break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:w+=String.fromCharCode(W+32);break;case 0:w+=String.fromCharCode(65533);break;case 34:case 39:case 60:default:w+=P8(aV);break}}function HQ(W){switch(W){case 9:case 10:case 12:case 32:break;case 47:R1(w),B=x1;break;case 61:B=dZ;break;case 62:B=n,R1(w),O1();break;case-1:R1(w),c();break;default:R1(w),C9(),x(W,k9);break}}function dZ(W){switch(W){case 9:case 10:case 12:case 32:break;case 34:E9(),B=O6;break;case 39:E9(),B=M6;break;case 62:default:E9(),x(W,S6);break}}function O6(W){switch(W){case 34:R1(w,s),B=f9;break;case 38:D=O6,B=N8;break;case 0:s+=String.fromCharCode(65533);break;case-1:c();break;case 10:s+=String.fromCharCode(W);break;default:s+=P8(sV);break}}function M6(W){switch(W){case 39:R1(w,s),B=f9;break;case 38:D=M6,B=N8;break;case 0:s+=String.fromCharCode(65533);break;case-1:c();break;case 10:s+=String.fromCharCode(W);break;default:s+=P8(oV);break}}function S6(W){switch(W){case 9:case 10:case 12:case 32:R1(w,s),B=q1;break;case 38:D=S6,B=N8;break;case 62:R1(w,s),B=n,O1();break;case 0:s+=String.fromCharCode(65533);break;case-1:Q--,B=n;break;case 34:case 39:case 60:case 61:case 96:default:s+=P8(nV);break}}function f9(W){switch(W){case 9:case 10:case 12:case 32:B=q1;break;case 47:B=x1;break;case 62:B=n,O1();break;case-1:c();break;default:x(W,q1);break}}function x1(W){switch(W){case 62:B=n,u2(!0);break;case-1:c();break;default:x(W,q1);break}}function L6(W,V,j){var M=V.length;if(j)Q+=M-1;else Q+=M;var I=V.substring(0,M-1);I=I.replace(/\u0000/g,"\uFFFD"),I=I.replace(/\u000D\u000A/g,`
|
|
32
|
-
`),
|
|
33
|
-
`),M0(K1,I),B=n}L6.lookahead=">";function cZ(W,V,j){if(V[0]==="-"&&V[1]==="-"){Q+=2,vZ(),B=qQ;return}if(V.toUpperCase()==="DOCTYPE")Q+=7,B=SQ;else if(V==="[CDATA["&&v2())Q+=7,B=v9;else B=L6}cZ.lookahead=7;function qQ(W){switch(vZ(),W){case 45:B=jQ;break;case 62:B=n,M0(K1,f0(y));break;default:x(W,d1);break}}function jQ(W){switch(W){case 45:B=I6;break;case 62:B=n,M0(K1,f0(y));break;case-1:M0(K1,f0(y)),c();break;default:y.push(45),x(W,d1);break}}function d1(W){switch(W){case 60:y.push(W),B=KQ;break;case 45:B=h9;break;case 0:y.push(65533);break;case-1:M0(K1,f0(y)),c();break;default:y.push(W);break}}function KQ(W){switch(W){case 33:y.push(W),B=FQ;break;case 60:y.push(W);break;default:x(W,d1);break}}function FQ(W){switch(W){case 45:B=DQ;break;default:x(W,d1);break}}function DQ(W){switch(W){case 45:B=OQ;break;default:x(W,h9);break}}function OQ(W){switch(W){case 62:case-1:x(W,I6);break;default:x(W,I6);break}}function h9(W){switch(W){case 45:B=I6;break;case-1:M0(K1,f0(y)),c();break;default:y.push(45),x(W,d1);break}}function I6(W){switch(W){case 62:B=n,M0(K1,f0(y));break;case 33:B=MQ;break;case 45:y.push(45);break;case-1:M0(K1,f0(y)),c();break;default:y.push(45),y.push(45),x(W,d1);break}}function MQ(W){switch(W){case 45:y.push(45),y.push(45),y.push(33),B=h9;break;case 62:B=n,M0(K1,f0(y));break;case-1:M0(K1,f0(y)),c();break;default:y.push(45),y.push(45),y.push(33),x(W,d1);break}}function SQ(W){switch(W){case 9:case 10:case 12:case 32:B=lZ;break;case-1:X8(),Y0(),z0(),c();break;default:x(W,lZ);break}}function lZ(W){switch(W){case 9:case 10:case 12:case 32:break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:X8(),W0.push(W+32),B=g9;break;case 0:X8(),W0.push(65533),B=g9;break;case 62:X8(),Y0(),B=n,z0();break;case-1:X8(),Y0(),z0(),c();break;default:X8(),W0.push(W),B=g9;break}}function g9(W){switch(W){case 9:case 10:case 12:case 32:B=iZ;break;case 62:B=n,z0();break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:W0.push(W+32);break;case 0:W0.push(65533);break;case-1:Y0(),z0(),c();break;default:W0.push(W);break}}function iZ(W,V,j){switch(W){case 9:case 10:case 12:case 32:Q+=1;break;case 62:B=n,Q+=1,z0();break;case-1:Y0(),z0(),c();break;default:if(V=V.toUpperCase(),V==="PUBLIC")Q+=6,B=LQ;else if(V==="SYSTEM")Q+=6,B=AQ;else Y0(),B=y1;break}}iZ.lookahead=6;function LQ(W){switch(W){case 9:case 10:case 12:case 32:B=IQ;break;case 34:q6(),B=sZ;break;case 39:q6(),B=oZ;break;case 62:Y0(),B=n,z0();break;case-1:Y0(),z0(),c();break;default:Y0(),B=y1;break}}function IQ(W){switch(W){case 9:case 10:case 12:case 32:break;case 34:q6(),B=sZ;break;case 39:q6(),B=oZ;break;case 62:Y0(),B=n,z0();break;case-1:Y0(),z0(),c();break;default:Y0(),B=y1;break}}function sZ(W){switch(W){case 34:B=nZ;break;case 0:d.push(65533);break;case 62:Y0(),B=n,z0();break;case-1:Y0(),z0(),c();break;default:d.push(W);break}}function oZ(W){switch(W){case 39:B=nZ;break;case 0:d.push(65533);break;case 62:Y0(),B=n,z0();break;case-1:Y0(),z0(),c();break;default:d.push(W);break}}function nZ(W){switch(W){case 9:case 10:case 12:case 32:B=UQ;break;case 62:B=n,z0();break;case 34:C1(),B=U6;break;case 39:C1(),B=A6;break;case-1:Y0(),z0(),c();break;default:Y0(),B=y1;break}}function UQ(W){switch(W){case 9:case 10:case 12:case 32:break;case 62:B=n,z0();break;case 34:C1(),B=U6;break;case 39:C1(),B=A6;break;case-1:Y0(),z0(),c();break;default:Y0(),B=y1;break}}function AQ(W){switch(W){case 9:case 10:case 12:case 32:B=PQ;break;case 34:C1(),B=U6;break;case 39:C1(),B=A6;break;case 62:Y0(),B=n,z0();break;case-1:Y0(),z0(),c();break;default:Y0(),B=y1;break}}function PQ(W){switch(W){case 9:case 10:case 12:case 32:break;case 34:C1(),B=U6;break;case 39:C1(),B=A6;break;case 62:Y0(),B=n,z0();break;case-1:Y0(),z0(),c();break;default:Y0(),B=y1;break}}function U6(W){switch(W){case 34:B=rZ;break;case 0:i.push(65533);break;case 62:Y0(),B=n,z0();break;case-1:Y0(),z0(),c();break;default:i.push(W);break}}function A6(W){switch(W){case 39:B=rZ;break;case 0:i.push(65533);break;case 62:Y0(),B=n,z0();break;case-1:Y0(),z0(),c();break;default:i.push(W);break}}function rZ(W){switch(W){case 9:case 10:case 12:case 32:break;case 62:B=n,z0();break;case-1:Y0(),z0(),c();break;default:B=y1;break}}function y1(W){switch(W){case 62:B=n,z0();break;case-1:z0(),c();break;default:break}}function v9(W){switch(W){case 93:B=TQ;break;case-1:c();break;case 0:J1=!0;default:T8(tV)||T.push(W);break}}function TQ(W){switch(W){case 93:B=RQ;break;default:T.push(93),x(W,v9);break}}function RQ(W){switch(W){case 93:T.push(93);break;case 62:Q8(),B=n;break;default:T.push(93),T.push(93),x(W,v9);break}}function N8(W){switch(D1(),R.push(38),W){case 9:case 10:case 12:case 32:case 60:case 38:case-1:x(W,c1);break;case 35:R.push(W),B=CQ;break;default:x(W,aZ);break}}function aZ(W){YX.lastIndex=Q;var V=YX.exec(z);if(!V)throw new Error("should never happen");var j=V[1];if(!j){B=c1;return}switch(Q+=j.length,t1(R,YJ(j)),D){case O6:case M6:case S6:if(j[j.length-1]!==";"){if(/[=A-Za-z0-9]/.test(z[Q])){B=c1;return}}break;default:break}D1();var M=lV[j];if(typeof M==="number")R.push(M);else t1(R,M);B=c1}aZ.lookahead=-iV;function CQ(W){switch(S=0,W){case 120:case 88:R.push(W),B=EQ;break;default:x(W,NQ);break}}function EQ(W){switch(W){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 65:case 66:case 67:case 68:case 69:case 70:case 97:case 98:case 99:case 100:case 101:case 102:x(W,wQ);break;default:x(W,c1);break}}function NQ(W){switch(W){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:x(W,bQ);break;default:x(W,c1);break}}function wQ(W){switch(W){case 65:case 66:case 67:case 68:case 69:case 70:S*=16,S+=W-55;break;case 97:case 98:case 99:case 100:case 101:case 102:S*=16,S+=W-87;break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:S*=16,S+=W-48;break;case 59:B=P6;break;default:x(W,P6);break}}function bQ(W){switch(W){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:S*=10,S+=W-48;break;case 59:B=P6;break;default:x(W,P6);break}}function P6(W){if(S in ZX)S=ZX[S];else if(S>1114111||S>=55296&&S<57344)S=65533;if(D1(),S<=65535)R.push(S);else S=S-65536,R.push(55296+(S>>10)),R.push(56320+(S&1023));x(W,c1)}function c1(W){switch(D){case O6:case M6:case S6:s+=f0(R);break;default:t1(T,R);break}x(W,D)}function xQ(W,V,j,M){switch(W){case 1:if(V=V.replace(e1,""),V.length===0)return;break;case 4:$0._appendChild($0.createComment(V));return;case 5:var I=V,C=j,g=M;if($0.appendChild(new gV($0,I,C,g)),z8||I.toLowerCase()!=="html"||mV.test(C)||g&&g.toLowerCase()===uV||g===void 0&&az.test(C))$0._quirks=!0;else if(dV.test(C)||g!==void 0&&az.test(C))$0._limitedQuirks=!0;O=tZ;return}$0._quirks=!0,O=tZ,O(W,V,j,M)}function tZ(W,V,j,M){var I;switch(W){case 1:if(V=V.replace(e1,""),V.length===0)return;break;case 5:return;case 4:$0._appendChild($0.createComment(V));return;case 2:if(V==="html"){I=R8($0,V,j),K.push(I),$0.appendChild(I),O=T6;return}break;case 3:switch(V){case"html":case"head":case"body":case"br":break;default:return}}I=R8($0,"html",null),K.push(I),$0.appendChild(I),O=T6,O(W,V,j,M)}function T6(W,V,j,M){switch(W){case 1:if(V=V.replace(e1,""),V.length===0)return;break;case 5:return;case 4:_1(V);return;case 2:switch(V){case"html":h(W,V,j,M);return;case"head":var I=u(V,j);L0=I,O=q0;return}break;case 3:switch(V){case"html":case"head":case"body":case"br":break;default:return}}T6(k0,"head",null),O(W,V,j,M)}function q0(W,V,j,M){switch(W){case 1:var I=V.match(e1);if(I)B1(I[0]),V=V.substring(I[0].length);if(V.length===0)return;break;case 4:_1(V);return;case 5:return;case 2:switch(V){case"html":h(W,V,j,M);return;case"meta":case"base":case"basefont":case"bgsound":case"link":u(V,j),K.pop();return;case"title":d2(V,j);return;case"noscript":if(!U0){u(V,j),O=eZ;return}case"noframes":case"style":F6(V,j);return;case"script":j6(function(C){var g=R8(C,V,j);if(g._parser_inserted=!0,g._force_async=!1,o)g._already_started=!0;return Q8(),g}),B=w1,f=O,O=R6;return;case"template":u(V,j),P.insertMarker(),V0=!1,O=u9,p.push(O);return;case"head":return}break;case 3:switch(V){case"head":K.pop(),O=p9;return;case"body":case"html":case"br":break;case"template":if(!K.contains("template"))return;K.generateImpliedEndTags(null,"thorough"),K.popTag("template"),P.clearToMarker(),p.pop(),C8();return;default:return}break}q0(a,"head",null),O(W,V,j,M)}function eZ(W,V,j,M){switch(W){case 5:return;case 4:q0(W,V);return;case 1:var I=V.match(e1);if(I)q0(W,I[0]),V=V.substring(I[0].length);if(V.length===0)return;break;case 2:switch(V){case"html":h(W,V,j,M);return;case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"style":q0(W,V,j);return;case"head":case"noscript":return}break;case 3:switch(V){case"noscript":K.pop(),O=q0;return;case"br":break;default:return}break}eZ(a,"noscript",null),O(W,V,j,M)}function p9(W,V,j,M){switch(W){case 1:var I=V.match(e1);if(I)B1(I[0]),V=V.substring(I[0].length);if(V.length===0)return;break;case 4:_1(V);return;case 5:return;case 2:switch(V){case"html":h(W,V,j,M);return;case"body":u(V,j),V0=!1,O=h;return;case"frameset":u(V,j),O=d9;return;case"base":case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"script":case"style":case"template":case"title":K.push(L0),q0(k0,V,j),K.removeElement(L0);return;case"head":return}break;case 3:switch(V){case"template":return q0(W,V,j,M);case"body":case"html":case"br":break;default:return}break}p9(k0,"body",null),V0=!0,O(W,V,j,M)}function h(W,V,j,M){var I,C,g,r;switch(W){case 1:if(J1){if(V=V.replace(G9,""),V.length===0)return}if(V0&&Q9.test(V))V0=!1;m0(),B1(V);return;case 5:return;case 4:_1(V);return;case-1:if(p.length)return u9(W);u1();return;case 2:switch(V){case"html":if(K.contains("template"))return;_X(j,K.elements[0]);return;case"base":case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"script":case"style":case"template":case"title":q0(k0,V,j);return;case"body":if(I=K.elements[1],!I||!(I instanceof Q0.HTMLBodyElement)||K.contains("template"))return;V0=!1,_X(j,I);return;case"frameset":if(!V0)return;if(I=K.elements[1],!I||!(I instanceof Q0.HTMLBodyElement))return;if(I.parentNode)I.parentNode.removeChild(I);while(!(K.top instanceof Q0.HTMLHtmlElement))K.pop();u(V,j),O=d9;return;case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"nav":case"ol":case"p":case"section":case"summary":case"ul":if(K.inButtonScope("p"))h(a,"p");u(V,j);return;case"menu":if(K.inButtonScope("p"))h(a,"p");if(G0(K.top,"menuitem"))K.pop();u(V,j);return;case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":if(K.inButtonScope("p"))h(a,"p");if(K.top instanceof Q0.HTMLHeadingElement)K.pop();u(V,j);return;case"pre":case"listing":if(K.inButtonScope("p"))h(a,"p");u(V,j),m1=!0,V0=!1;return;case"form":if(I0&&!K.contains("template"))return;if(K.inButtonScope("p"))h(a,"p");if(r=u(V,j),!K.contains("template"))I0=r;return;case"li":V0=!1;for(C=K.elements.length-1;C>=0;C--){if(g=K.elements[C],g instanceof Q0.HTMLLIElement){h(a,"li");break}if(G0(g,$8)&&!G0(g,VZ))break}if(K.inButtonScope("p"))h(a,"p");u(V,j);return;case"dd":case"dt":V0=!1;for(C=K.elements.length-1;C>=0;C--){if(g=K.elements[C],G0(g,HX)){h(a,g.localName);break}if(G0(g,$8)&&!G0(g,VZ))break}if(K.inButtonScope("p"))h(a,"p");u(V,j);return;case"plaintext":if(K.inButtonScope("p"))h(a,"p");u(V,j),B=b9;return;case"button":if(K.inScope("button"))h(a,"button"),O(W,V,j,M);else m0(),u(V,j),V0=!1;return;case"a":var B0=P.findElementByTag("a");if(B0)h(a,V),P.remove(B0),K.removeElement(B0);case"b":case"big":case"code":case"em":case"font":case"i":case"s":case"small":case"strike":case"strong":case"tt":case"u":m0(),P.push(u(V,j),j);return;case"nobr":if(m0(),K.inScope(V))h(a,V),m0();P.push(u(V,j),j);return;case"applet":case"marquee":case"object":m0(),u(V,j),P.insertMarker(),V0=!1;return;case"table":if(!$0._quirks&&K.inButtonScope("p"))h(a,"p");u(V,j),V0=!1,O=a0;return;case"area":case"br":case"embed":case"img":case"keygen":case"wbr":m0(),u(V,j),K.pop(),V0=!1;return;case"input":m0(),r=u(V,j),K.pop();var E0=r.getAttribute("type");if(!E0||E0.toLowerCase()!=="hidden")V0=!1;return;case"param":case"source":case"track":u(V,j),K.pop();return;case"hr":if(K.inButtonScope("p"))h(a,"p");if(G0(K.top,"menuitem"))K.pop();u(V,j),K.pop(),V0=!1;return;case"image":h(k0,"img",j,M);return;case"textarea":u(V,j),m1=!0,V0=!1,B=N1,f=O,O=R6;return;case"xmp":if(K.inButtonScope("p"))h(a,"p");m0(),V0=!1,F6(V,j);return;case"iframe":V0=!1,F6(V,j);return;case"noembed":F6(V,j);return;case"select":if(m0(),u(V,j),V0=!1,O===a0||O===m9||O===l1||O===w8||O===G8)O=E6;else O=M1;return;case"optgroup":case"option":if(K.top instanceof Q0.HTMLOptionElement)h(a,"option");m0(),u(V,j);return;case"menuitem":if(G0(K.top,"menuitem"))K.pop();m0(),u(V,j);return;case"rb":case"rtc":if(K.inScope("ruby"))K.generateImpliedEndTags();u(V,j);return;case"rp":case"rt":if(K.inScope("ruby"))K.generateImpliedEndTags("rtc");u(V,j);return;case"math":if(m0(),JX(j),WZ(j),N9(V,j,k.MATHML),M)K.pop();return;case"svg":if(m0(),VX(j),WZ(j),N9(V,j,k.SVG),M)K.pop();return;case"caption":case"col":case"colgroup":case"frame":case"head":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return}m0(),u(V,j);return;case 3:switch(V){case"template":q0(a,V,j);return;case"body":if(!K.inScope("body"))return;O=$7;return;case"html":if(!K.inScope("body"))return;O=$7,O(W,V,j);return;case"address":case"article":case"aside":case"blockquote":case"button":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"listing":case"main":case"menu":case"nav":case"ol":case"pre":case"section":case"summary":case"ul":if(!K.inScope(V))return;K.generateImpliedEndTags(),K.popTag(V);return;case"form":if(!K.contains("template")){var t0=I0;if(I0=null,!t0||!K.elementInScope(t0))return;K.generateImpliedEndTags(),K.removeElement(t0)}else{if(!K.inScope("form"))return;K.generateImpliedEndTags(),K.popTag("form")}return;case"p":if(!K.inButtonScope(V))h(k0,V,null),O(W,V,j,M);else K.generateImpliedEndTags(V),K.popTag(V);return;case"li":if(!K.inListItemScope(V))return;K.generateImpliedEndTags(V),K.popTag(V);return;case"dd":case"dt":if(!K.inScope(V))return;K.generateImpliedEndTags(V),K.popTag(V);return;case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":if(!K.elementTypeInScope(Q0.HTMLHeadingElement))return;K.generateImpliedEndTags(),K.popElementType(Q0.HTMLHeadingElement);return;case"sarcasm":break;case"a":case"b":case"big":case"code":case"em":case"font":case"i":case"nobr":case"s":case"small":case"strike":case"strong":case"tt":case"u":var z1=c2(V);if(z1)return;break;case"applet":case"marquee":case"object":if(!K.inScope(V))return;K.generateImpliedEndTags(),K.popTag(V),P.clearToMarker();return;case"br":h(k0,V,null);return}for(C=K.elements.length-1;C>=0;C--)if(g=K.elements[C],G0(g,V)){K.generateImpliedEndTags(V),K.popElement(g);break}else if(G0(g,$8))return;return}}function R6(W,V,j,M){switch(W){case 1:B1(V);return;case-1:if(K.top instanceof Q0.HTMLScriptElement)K.top._already_started=!0;K.pop(),O=f,O(W);return;case 3:if(V==="script")l2();else K.pop(),O=f;return;default:return}}function a0(W,V,j,M){function I(g){for(var r=0,B0=g.length;r<B0;r++)if(g[r][0]==="type")return g[r][1].toLowerCase();return null}switch(W){case 1:if(Y1){h(W,V,j,M);return}else if(G0(K.top,L8)){P0=[],f=O,O=yQ,O(W,V,j,M);return}break;case 4:_1(V);return;case 5:return;case 2:switch(V){case"caption":K.clearToContext(W9),P.insertMarker(),u(V,j),O=m9;return;case"colgroup":K.clearToContext(W9),u(V,j),O=C6;return;case"col":a0(k0,"colgroup",null),O(W,V,j,M);return;case"tbody":case"tfoot":case"thead":K.clearToContext(W9),u(V,j),O=l1;return;case"td":case"th":case"tr":a0(k0,"tbody",null),O(W,V,j,M);return;case"table":if(!K.inTableScope(V))return;a0(a,V),O(W,V,j,M);return;case"style":case"script":case"template":q0(W,V,j,M);return;case"input":var C=I(j);if(C!=="hidden")break;u(V,j),K.pop();return;case"form":if(I0||K.contains("template"))return;I0=u(V,j),K.popElement(I0);return}break;case 3:switch(V){case"table":if(!K.inTableScope(V))return;K.popTag(V),C8();return;case"body":case"caption":case"col":case"colgroup":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return;case"template":q0(W,V,j,M);return}break;case-1:h(W,V,j,M);return}E1=!0,h(W,V,j,M),E1=!1}function yQ(W,V,j,M){if(W===S8){if(J1){if(V=V.replace(G9,""),V.length===0)return}P0.push(V)}else{var I=P0.join("");if(P0.length=0,Q9.test(I))E1=!0,h(S8,I),E1=!1;else B1(I);O=f,O(W,V,j,M)}}function m9(W,V,j,M){function I(){if(!K.inTableScope("caption"))return!1;return K.generateImpliedEndTags(),K.popTag("caption"),P.clearToMarker(),O=a0,!0}switch(W){case 2:switch(V){case"caption":case"col":case"colgroup":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":if(I())O(W,V,j,M);return}break;case 3:switch(V){case"caption":I();return;case"table":if(I())O(W,V,j,M);return;case"body":case"col":case"colgroup":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return}break}h(W,V,j,M)}function C6(W,V,j,M){switch(W){case 1:var I=V.match(e1);if(I)B1(I[0]),V=V.substring(I[0].length);if(V.length===0)return;break;case 4:_1(V);return;case 5:return;case 2:switch(V){case"html":h(W,V,j,M);return;case"col":u(V,j),K.pop();return;case"template":q0(W,V,j,M);return}break;case 3:switch(V){case"colgroup":if(!G0(K.top,"colgroup"))return;K.pop(),O=a0;return;case"col":return;case"template":q0(W,V,j,M);return}break;case-1:h(W,V,j,M);return}if(!G0(K.top,"colgroup"))return;C6(a,"colgroup"),O(W,V,j,M)}function l1(W,V,j,M){function I(){if(!K.inTableScope("tbody")&&!K.inTableScope("thead")&&!K.inTableScope("tfoot"))return;K.clearToContext(V9),l1(a,K.top.localName,null),O(W,V,j,M)}switch(W){case 2:switch(V){case"tr":K.clearToContext(V9),u(V,j),O=w8;return;case"th":case"td":l1(k0,"tr",null),O(W,V,j,M);return;case"caption":case"col":case"colgroup":case"tbody":case"tfoot":case"thead":I();return}break;case 3:switch(V){case"table":I();return;case"tbody":case"tfoot":case"thead":if(K.inTableScope(V))K.clearToContext(V9),K.pop(),O=a0;return;case"body":case"caption":case"col":case"colgroup":case"html":case"td":case"th":case"tr":return}break}a0(W,V,j,M)}function w8(W,V,j,M){function I(){if(!K.inTableScope("tr"))return!1;return K.clearToContext(JZ),K.pop(),O=l1,!0}switch(W){case 2:switch(V){case"th":case"td":K.clearToContext(JZ),u(V,j),O=G8,P.insertMarker();return;case"caption":case"col":case"colgroup":case"tbody":case"tfoot":case"thead":case"tr":if(I())O(W,V,j,M);return}break;case 3:switch(V){case"tr":I();return;case"table":if(I())O(W,V,j,M);return;case"tbody":case"tfoot":case"thead":if(K.inTableScope(V)){if(I())O(W,V,j,M)}return;case"body":case"caption":case"col":case"colgroup":case"html":case"td":case"th":return}break}a0(W,V,j,M)}function G8(W,V,j,M){switch(W){case 2:switch(V){case"caption":case"col":case"colgroup":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":if(K.inTableScope("td"))G8(a,"td"),O(W,V,j,M);else if(K.inTableScope("th"))G8(a,"th"),O(W,V,j,M);return}break;case 3:switch(V){case"td":case"th":if(!K.inTableScope(V))return;K.generateImpliedEndTags(),K.popTag(V),P.clearToMarker(),O=w8;return;case"body":case"caption":case"col":case"colgroup":case"html":return;case"table":case"tbody":case"tfoot":case"thead":case"tr":if(!K.inTableScope(V))return;G8(a,K.inTableScope("td")?"td":"th"),O(W,V,j,M);return}break}h(W,V,j,M)}function M1(W,V,j,M){switch(W){case 1:if(J1){if(V=V.replace(G9,""),V.length===0)return}B1(V);return;case 4:_1(V);return;case 5:return;case-1:h(W,V,j,M);return;case 2:switch(V){case"html":h(W,V,j,M);return;case"option":if(K.top instanceof Q0.HTMLOptionElement)M1(a,V);u(V,j);return;case"optgroup":if(K.top instanceof Q0.HTMLOptionElement)M1(a,"option");if(K.top instanceof Q0.HTMLOptGroupElement)M1(a,V);u(V,j);return;case"select":M1(a,V);return;case"input":case"keygen":case"textarea":if(!K.inSelectScope("select"))return;M1(a,"select"),O(W,V,j,M);return;case"script":case"template":q0(W,V,j,M);return}break;case 3:switch(V){case"optgroup":if(K.top instanceof Q0.HTMLOptionElement&&K.elements[K.elements.length-2]instanceof Q0.HTMLOptGroupElement)M1(a,"option");if(K.top instanceof Q0.HTMLOptGroupElement)K.pop();return;case"option":if(K.top instanceof Q0.HTMLOptionElement)K.pop();return;case"select":if(!K.inSelectScope(V))return;K.popTag(V),C8();return;case"template":q0(W,V,j,M);return}break}}function E6(W,V,j,M){switch(V){case"caption":case"table":case"tbody":case"tfoot":case"thead":case"tr":case"td":case"th":switch(W){case 2:E6(a,"select"),O(W,V,j,M);return;case 3:if(K.inTableScope(V))E6(a,"select"),O(W,V,j,M);return}}M1(W,V,j,M)}function u9(W,V,j,M){function I(C){O=C,p[p.length-1]=O,O(W,V,j,M)}switch(W){case 1:case 4:case 5:h(W,V,j,M);return;case-1:if(!K.contains("template"))u1();else K.popTag("template"),P.clearToMarker(),p.pop(),C8(),O(W,V,j,M);return;case 2:switch(V){case"base":case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"script":case"style":case"template":case"title":q0(W,V,j,M);return;case"caption":case"colgroup":case"tbody":case"tfoot":case"thead":I(a0);return;case"col":I(C6);return;case"tr":I(l1);return;case"td":case"th":I(w8);return}I(h);return;case 3:switch(V){case"template":q0(W,V,j,M);return;default:return}}}function $7(W,V,j,M){switch(W){case 1:if(Q9.test(V))break;h(W,V);return;case 4:K.elements[0]._appendChild($0.createComment(V));return;case 5:return;case-1:u1();return;case 2:if(V==="html"){h(W,V,j,M);return}break;case 3:if(V==="html"){if(o)return;O=fQ;return}break}O=h,O(W,V,j,M)}function d9(W,V,j,M){switch(W){case 1:if(V=V.replace(GZ,""),V.length>0)B1(V);return;case 4:_1(V);return;case 5:return;case-1:u1();return;case 2:switch(V){case"html":h(W,V,j,M);return;case"frameset":u(V,j);return;case"frame":u(V,j),K.pop();return;case"noframes":q0(W,V,j,M);return}break;case 3:if(V==="frameset"){if(o&&K.top instanceof Q0.HTMLHtmlElement)return;if(K.pop(),!o&&!(K.top instanceof Q0.HTMLFrameSetElement))O=kQ;return}break}}function kQ(W,V,j,M){switch(W){case 1:if(V=V.replace(GZ,""),V.length>0)B1(V);return;case 4:_1(V);return;case 5:return;case-1:u1();return;case 2:switch(V){case"html":h(W,V,j,M);return;case"noframes":q0(W,V,j,M);return}break;case 3:if(V==="html"){O=hQ;return}break}}function fQ(W,V,j,M){switch(W){case 1:if(Q9.test(V))break;h(W,V,j,M);return;case 4:$0._appendChild($0.createComment(V));return;case 5:h(W,V,j,M);return;case-1:u1();return;case 2:if(V==="html"){h(W,V,j,M);return}break}O=h,O(W,V,j,M)}function hQ(W,V,j,M){switch(W){case 1:if(V=V.replace(GZ,""),V.length>0)h(W,V,j,M);return;case 4:$0._appendChild($0.createComment(V));return;case 5:h(W,V,j,M);return;case-1:u1();return;case 2:switch(V){case"html":h(W,V,j,M);return;case"noframes":q0(W,V,j,M);return}break}}function Z7(W,V,j,M){function I(B0){for(var E0=0,t0=B0.length;E0<t0;E0++)switch(B0[E0][0]){case"color":case"face":case"size":return!0}return!1}var C;switch(W){case 1:if(V0&&ZJ.test(V))V0=!1;if(J1)V=V.replace(G9,"\uFFFD");B1(V);return;case 4:_1(V);return;case 5:return;case 2:switch(V){case"font":if(!I(j))break;case"b":case"big":case"blockquote":case"body":case"br":case"center":case"code":case"dd":case"div":case"dl":case"dt":case"em":case"embed":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":case"head":case"hr":case"i":case"img":case"li":case"listing":case"menu":case"meta":case"nobr":case"ol":case"p":case"pre":case"ruby":case"s":case"small":case"span":case"strong":case"strike":case"sub":case"sup":case"table":case"tt":case"u":case"ul":case"var":if(o)break;do K.pop(),C=K.top;while(C.namespaceURI!==k.HTML&&!GX(C)&&!WX(C));M0(W,V,j,M);return}if(C=K.elements.length===1&&o?Z:K.top,C.namespaceURI===k.MATHML)JX(j);else if(C.namespaceURI===k.SVG)V=zJ(V),VX(j);if(WZ(j),N9(V,j,C.namespaceURI),M){if(V==="script"&&C.namespaceURI===k.SVG);K.pop()}return;case 3:if(C=K.top,V==="script"&&C.namespaceURI===k.SVG&&C.localName==="script")K.pop();else{var g=K.elements.length-1,r=K.elements[g];for(;;){if(r.localName.toLowerCase()===V){K.popElement(r);break}if(r=K.elements[--g],r.namespaceURI!==k.HTML)continue;O(W,V,j,M);break}}return}}return H6.testTokenizer=function(W,V,j,M){var I=[];switch(V){case"PCDATA state":B=n;break;case"RCDATA state":B=N1;break;case"RAWTEXT state":B=E8;break;case"PLAINTEXT state":B=b9;break}if(j)m=j;if(M0=function(g,r,B0,E0){switch(Q8(),g){case 1:if(I.length>0&&I[I.length-1][0]==="Character")I[I.length-1][1]+=r;else I.push(["Character",r]);break;case 4:I.push(["Comment",r]);break;case 5:I.push(["DOCTYPE",r,B0===void 0?null:B0,E0===void 0?null:E0,!z8]);break;case 2:var t0=Object.create(null);for(var z1=0;z1<B0.length;z1++){var i1=B0[z1];if(i1.length===1)t0[i1[0]]="";else t0[i1[0]]=i1[1]}var k1=["StartTag",r,t0];if(E0)k1.push(!0);I.push(k1);break;case 3:I.push(["EndTag",r]);break;case-1:break}},!M)this.parse(W,!0);else{for(var C=0;C<W.length;C++)this.parse(W[C]);this.parse("",!0)}return I},H6}});var $6=N((VH,UX)=>{UX.exports=IX;var SX=Z9(),LX=z9(),XJ=_9(),B9=K0(),QJ=p6();function IX($){this.contextObject=$}var GJ={xml:{"":!0,"1.0":!0,"2.0":!0},core:{"":!0,"2.0":!0},html:{"":!0,"1.0":!0,"2.0":!0},xhtml:{"":!0,"1.0":!0,"2.0":!0}};IX.prototype={hasFeature:function $(Z,Y){var z=GJ[(Z||"").toLowerCase()];return z&&z[Y||""]||!1},createDocumentType:function $(Z,Y,z){if(!QJ.isValidQName(Z))B9.InvalidCharacterError();return new LX(this.contextObject,Z,Y,z)},createDocument:function $(Z,Y,z){var X=new SX(!1,null),Q;if(Y)Q=X.createElementNS(Z,Y);else Q=null;if(z)X.appendChild(z);if(Q)X.appendChild(Q);if(Z===B9.NAMESPACE.HTML)X._contentType="application/xhtml+xml";else if(Z===B9.NAMESPACE.SVG)X._contentType="image/svg+xml";else X._contentType="application/xml";return X},createHTMLDocument:function $(Z){var Y=new SX(!0,null);Y.appendChild(new LX(Y,"html"));var z=Y.createElement("html");Y.appendChild(z);var X=Y.createElement("head");if(z.appendChild(X),Z!==void 0){var Q=Y.createElement("title");X.appendChild(Q),Q.appendChild(Y.createTextNode(Z))}return z.appendChild(Y.createElement("body")),Y.modclock=1,Y},mozSetOutputMutationHandler:function($,Z){$.mutationHandler=Z},mozGetInputMutationHandler:function($){B9.nyi()},mozHTMLParser:XJ}});var PX=N((JH,AX)=>{var WJ=r6(),VJ=a$();AX.exports=BZ;function BZ($,Z){this._window=$,this._href=Z}BZ.prototype=Object.create(VJ.prototype,{constructor:{value:BZ},href:{get:function(){return this._href},set:function($){this.assign($)}},assign:{value:function($){var Z=new WJ(this._href),Y=Z.resolve($);this._href=Y}},replace:{value:function($){this.assign($)}},reload:{value:function(){this.assign(this.href)}},toString:{value:function(){return this.href}}})});var RX=N((_H,TX)=>{var JJ=Object.create(null,{appCodeName:{value:"Mozilla"},appName:{value:"Netscape"},appVersion:{value:"4.0"},platform:{value:""},product:{value:"Gecko"},productSub:{value:"20100101"},userAgent:{value:""},vendor:{value:""},vendorSub:{value:""},taintEnabled:{value:function(){return!1}}});TX.exports=JJ});var EX=N((BH,CX)=>{var _J={setTimeout,clearTimeout,setInterval,clearInterval};CX.exports=_J});var qZ=N((Z6,NX)=>{var HZ=K0();Z6=NX.exports={CSSStyleDeclaration:a6(),CharacterData:l8(),Comment:h$(),DOMException:k6(),DOMImplementation:$6(),DOMTokenList:S$(),Document:Z9(),DocumentFragment:v$(),DocumentType:z9(),Element:j8(),HTMLParser:_9(),NamedNodeMap:T$(),Node:N0(),NodeList:r1(),NodeFilter:n8(),ProcessingInstruction:m$(),Text:k$(),Window:jZ()};HZ.merge(Z6,r$());HZ.merge(Z6,e6().elements);HZ.merge(Z6,YZ().elements)});var jZ=N((HH,wX)=>{var BJ=$6(),HJ=X$(),qJ=PX(),Y6=K0();wX.exports=H9;function H9($){this.document=$||new BJ(null).createHTMLDocument(""),this.document._scripting_enabled=!0,this.document.defaultView=this,this.location=new qJ(this,this.document._address||"about:blank")}H9.prototype=Object.create(HJ.prototype,{console:{value:console},history:{value:{back:Y6.nyi,forward:Y6.nyi,go:Y6.nyi}},navigator:{value:RX()},window:{get:function(){return this}},self:{get:function(){return this}},frames:{get:function(){return this}},parent:{get:function(){return this}},top:{get:function(){return this}},length:{value:0},frameElement:{value:null},opener:{value:null},onload:{get:function(){return this._getEventHandler("load")},set:function($){this._setEventHandler("load",$)}},getComputedStyle:{value:function $(Z){return Z.style}}});Y6.expose(EX(),H9);Y6.expose(qZ(),H9)});var fX=N((jJ)=>{var bX=$6(),xX=_9(),qH=jZ(),yX=qZ();jJ.createDOMImplementation=function(){return new bX(null)};jJ.createDocument=function($,Z){if($||Z){var Y=new xX;return Y.parse($||"",!0),Y.document()}return new bX(null).createHTMLDocument("")};jJ.createIncrementalHTMLParser=function(){var $=new xX;return{write:function(Z){if(Z.length>0)$.parse(Z,!1,function(){return!0})},end:function(Z){$.parse(Z||"",!0,function(){return!0})},process:function(Z){return $.parse("",!1,Z)},document:function(){return $.document()}}};jJ.createWindow=function($,Z){var Y=jJ.createDocument($);if(Z!==void 0)Y._address=Z;return new yX.Window(Y)};jJ.impl=yX});import{createSign as dJ}from"crypto";import{readFileSync as cJ}from"fs";class s0{appId;privateKey;baseUrl;cache={};appInfoCache;constructor($,Z="https://api.github.com"){this.appId=$.appId,this.privateKey=$.privateKey,this.baseUrl=Z}static fromEnvironment(){let $=process.env.GITHUB_APP_ID;if(!$)return null;let Z=s0.loadPrivateKey();if(!Z)return null;return new s0({appId:$,privateKey:Z})}static loadPrivateKey(){let $=process.env.GITHUB_APP_PRIVATE_KEY_PATH;if($)try{return cJ($,"utf8")}catch(Y){return console.error(`Failed to read GitHub App private key from ${$}: ${Y}`),null}let Z=process.env.GITHUB_APP_PRIVATE_KEY_BASE64;if(Z)try{return Buffer.from(Z,"base64").toString("utf8")}catch(Y){return console.error(`Failed to decode GitHub App private key from base64: ${Y}`),null}return null}generateJWT(){let $=Math.floor(Date.now()/1000),Z={alg:"RS256",typ:"JWT"},Y={iat:$-60,exp:$+600,iss:this.appId},z=this.base64url(JSON.stringify(Z)),X=this.base64url(JSON.stringify(Y)),Q=`${z}.${X}`,G=dJ("RSA-SHA256").update(Q).sign(this.privateKey,"base64url");return`${Q}.${G}`}base64url($){return Buffer.from($).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}async getInstallationId($,Z){let Y=`${$}/${Z}`;if(this.cache[Y]?.installationId)return this.cache[Y].installationId;let z=this.generateJWT(),X=`${this.baseUrl}/repos/${$}/${Z}/installation`,Q=await fetch(X,{method:"GET",headers:{Authorization:`Bearer ${z}`,Accept:"application/vnd.github.v3+json","User-Agent":"claude-intern"}});if(!Q.ok){if(Q.status===404)throw new Error(`GitHub App is not installed on repository ${$}/${Z}. Please install the App at: https://github.com/apps/YOUR_APP_NAME/installations/new`);let _=await Q.json().catch(()=>({message:"Unknown error"}));throw new Error(`Failed to get installation for ${$}/${Z}: ${_.message||Q.statusText}`)}let J=(await Q.json()).id;return this.cache[Y]={installationId:J},J}async getInstallationToken($){let Z=this.generateJWT(),Y=`${this.baseUrl}/app/installations/${$}/access_tokens`,z=await fetch(Y,{method:"POST",headers:{Authorization:`Bearer ${Z}`,Accept:"application/vnd.github.v3+json","User-Agent":"claude-intern"}});if(!z.ok){let Q=await z.json().catch(()=>({message:"Unknown error"}));throw new Error(`Failed to create installation access token: ${Q.message||z.statusText}`)}let X=await z.json();return{token:X.token,expiresAt:new Date(X.expires_at)}}async getAppInfo(){if(this.appInfoCache)return this.appInfoCache;let $=this.generateJWT(),Z=`${this.baseUrl}/app`,Y=await fetch(Z,{method:"GET",headers:{Authorization:`Bearer ${$}`,Accept:"application/vnd.github.v3+json","User-Agent":"claude-intern"}});if(!Y.ok){let X=await Y.json().catch(()=>({message:"Unknown error"}));throw new Error(`Failed to get GitHub App info: ${X.message||Y.statusText}`)}let z=await Y.json();return this.appInfoCache={id:z.id,slug:z.slug,name:z.name},this.appInfoCache}async getGitAuthor(){let $=await this.getAppInfo();return{name:`${$.slug}[bot]`,email:`${$.id}+${$.slug}[bot]@users.noreply.github.com`}}async getTokenForRepository($,Z){let Y=`${$}/${Z}`,z=this.cache[Y];if(z?.token){if(z.token.expiresAt.getTime()>Date.now()+300000)return z.token.token}let X=await this.getInstallationId($,Z),Q=await this.getInstallationToken(X);return this.cache[Y]={installationId:X,token:Q},Q.token}}var I8=()=>{};var X6={};c9(X6,{JiraExtractor:()=>g0});class g0{static extractLinkedResources($){let Z=[];try{let Y=$.fields||{};if(Object.keys(Y).forEach((z)=>{try{let X=Y[z],Q=$.names?.[z]||z;if(X&&typeof X==="string"){let G=/(https?:\/\/[^\s]+)/g,J=X.match(G);if(J)J.forEach((_)=>{Z.push({type:"custom_field_link",field:Q,url:_,description:g0.categorizeLink(_)})})}else if(X&&typeof X==="object"&&"content"in X){let G=X.content;if(G&&Array.isArray(G))try{let J=JSON.stringify(G),_=/(https?:\/\/[^\s"]+)/g,H=J.match(_);if(H)H.forEach((q)=>{Z.push({type:"rich_text_link",field:Q,url:q,description:g0.categorizeLink(q)})})}catch(J){console.warn(`Failed to process rich text content for field ${Q}: ${J}`)}}}catch(X){console.warn(`Failed to process field ${z}: ${X}`)}}),Y.issuelinks)Y.issuelinks.forEach((z)=>{try{if(z.outwardIssue)Z.push({type:"issue_link",linkType:z.type.outward,issueKey:z.outwardIssue.key,summary:z.outwardIssue.fields.summary,description:`${z.type.outward} issue`});if(z.inwardIssue)Z.push({type:"issue_link",linkType:z.type.inward,issueKey:z.inwardIssue.key,summary:z.inwardIssue.fields.summary,description:`${z.type.inward} issue`})}catch(X){console.warn(`Failed to process issue link: ${X}`)}});if(Y.description&&typeof Y.description==="object"&&"content"in Y.description)try{let z=Y.description.content;if(z&&Array.isArray(z)){let X=JSON.stringify(z),Q=/(https?:\/\/[^\s"]+)/g,G=X.match(Q);if(G)G.forEach((J)=>{Z.push({type:"description_link",url:J,description:g0.categorizeLink(J)})})}}catch(z){console.warn(`Failed to process description links: ${z}`)}}catch(Y){console.warn(`Failed to extract linked resources: ${Y}`)}return g0.deduplicateLinkedResources(Z)}static deduplicateLinkedResources($){let Z=new Map,Y={issue_link:4,custom_field_link:3,rich_text_link:2,description_link:1};$.forEach((X)=>{let Q;if(X.url)Q=X.url;else if(X.issueKey)Q=`issue:${X.issueKey}`;else Q=`${X.type}:${X.description}`;let G=Z.get(Q);if(!G)Z.set(Q,X);else{let J=Y[G.type]||0,_=Y[X.type]||0;if(_>J)Z.set(Q,X);else if(_===J){if(X.field&&!G.field)Z.set(Q,X)}}});let z=Array.from(Z.values());if($.length!==z.length)console.log(`\uD83D\uDD17 Deduplicated linked resources: ${$.length} \u2192 ${z.length}`);return z}static categorizeLink($){if($.includes("github.com"))return"GitHub Repository/Issue";if($.includes("confluence"))return"Confluence Documentation";if($.includes("figma.com"))return"Figma Design";if($.includes("docs.google.com"))return"Google Document";if($.includes("drive.google.com"))return"Google Drive File";if($.includes("notion.so"))return"Notion Page";if($.includes("miro.com"))return"Miro Board";return"External Link"}static async getRelatedWorkItems($,Z){let Y=[],z=$.fields||{};try{if(z.issuelinks&&z.issuelinks.length>0){console.log(`\uD83D\uDD17 Found ${z.issuelinks.length} linked issues, fetching details...`);for(let Q of z.issuelinks)try{if(Q.outwardIssue){let G=await Z(Q.outwardIssue.key),J=g0.formatRelatedIssue(G,Q.type.outward,"outward");Y.push(J)}if(Q.inwardIssue){let G=await Z(Q.inwardIssue.key),J=g0.formatRelatedIssue(G,Q.type.inward,"inward");Y.push(J)}}catch(G){console.warn(`Failed to fetch linked issue details: ${G}`)}}if(z.subtasks&&z.subtasks.length>0){console.log(`\uD83D\uDCCB Found ${z.subtasks.length} subtasks, fetching details...`);for(let Q of z.subtasks)try{let G=await Z(Q.key),J=g0.formatRelatedIssue(G,"Subtask","subtask");Y.push(J)}catch(G){console.warn(`Failed to fetch subtask details: ${G}`)}}if(z.parent){console.log("\uD83D\uDCCB Found parent task, fetching details...");try{let Q=await Z(z.parent.key),G=g0.formatRelatedIssue(Q,"Parent Task","parent");Y.push(G)}catch(Q){console.warn(`Failed to fetch parent task details: ${Q}`)}}if(z.epic&&z.epic.key){console.log("\uD83C\uDFAF Found epic, fetching details...");try{let Q=await Z(z.epic.key),G=g0.formatRelatedIssue(Q,"Epic","parent");Y.push(G)}catch(Q){console.warn(`Failed to fetch epic details: ${Q}`)}}let X=z.customfield_10014||z["Epic Link"];if(X&&typeof X==="string"){console.log("\uD83C\uDFAF Found epic link in custom field, fetching details...");try{let Q=await Z(X),G=g0.formatRelatedIssue(Q,"Epic","parent");Y.push(G)}catch(Q){console.warn(`Failed to fetch epic from custom field: ${Q}`)}}return console.log(`\u2705 Successfully fetched ${Y.length} related work items`),Y}catch(X){return console.warn(`Error fetching related work items: ${X}`),Y}}static formatRelatedIssue($,Z,Y){let z=$.fields||{};return{key:$.key||"Unknown",summary:z.summary||"No summary",description:z.description,renderedDescription:$.renderedFields?.description,issueType:z.issuetype?.name||"Unknown",status:z.status?.name||"Unknown",priority:z.priority?.name,assignee:z.assignee?.displayName,reporter:z.reporter?.displayName||"Unknown",created:z.created||"",updated:z.updated||"",labels:z.labels||[],components:z.components?.map((X)=>X?.name||"Unknown")||[],fixVersions:z.fixVersions?.map((X)=>X?.name||"Unknown")||[],linkType:Z,relationshipDirection:Y}}static formatIssueDetails($,Z,Y,z=[]){let X=$.fields||{};return{key:$.key||"Unknown",summary:X.summary||"No summary",description:X.description,renderedDescription:$.renderedFields?.description,issueType:X.issuetype?.name||"Unknown",status:X.status?.name||"Unknown",priority:X.priority?.name,assignee:X.assignee?.displayName,reporter:X.reporter?.displayName||"Unknown",created:X.created||"",updated:X.updated||"",labels:X.labels||[],components:X.components?.map((Q)=>Q?.name||"Unknown")||[],fixVersions:X.fixVersions?.map((Q)=>Q?.name||"Unknown")||[],linkedResources:Y,relatedIssues:z,comments:Z.map((Q)=>({id:Q.id||"unknown",author:Q.author?.displayName||"Unknown",body:Q.body||"",renderedBody:Q.renderedBody,created:Q.created||"",updated:Q.updated||""})),attachments:X.attachment?.map((Q)=>({filename:Q?.filename||"unknown",size:Q?.size||0,mimeType:Q?.mimeType||"unknown",created:Q?.created||"",author:Q?.author?.displayName||"Unknown",content:Q?.content||""}))||[]}}static extractTextFromADF($){if(!$)return"";if(typeof $==="string")return $;let Z=(Y,z=!1)=>{if(!Y)return"";return Y.map((X,Q)=>{if(X.type==="text")return X.text||"";if(X.type==="paragraph"){let G=X.content?Z(X.content):"";return z&&Q<Y.length-1?G+`
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
`).trim()
|
|
38
|
-
`),
|
|
39
|
-
\uD83D\uDDD1\uFE0F Removing worktree: ${$}`);if(!(await
|
|
40
|
-
\uD83D\uDCC2 Preparing review worktree for branch: ${$}`),console.log(` Worktree path: ${
|
|
41
|
-
${
|
|
42
|
-
|
|
28
|
+
`;Y+=B,Y+="</"+Q+">"}break;case 3:case 4:var q;if(Z.nodeType===1&&Z.namespaceURI===e1.HTML)q=Z.tagName;else q="";if(i7[q]||q==="NOSCRIPT"&&Z.ownerDocument._scripting_enabled)Y+=$.data;else Y+=zW($.data);break;case 8:Y+="<!--"+a7($.data)+"-->";break;case 7:let F=t7($.data);Y+="<?"+$.target+" "+F+"?>";break;case 10:Y+="<!DOCTYPE "+$.name,Y+=">";break;default:o7.InvalidStateError()}return Y}});var f0=x((l5,QY)=>{QY.exports=j0;var zY=G$(),v6=W$(),$Y=J$(),J0=L0();function j0(){zY.call(this),this.parentNode=null,this._nextSibling=this._previousSibling=this,this._index=void 0}var s0=j0.ELEMENT_NODE=1,V$=j0.ATTRIBUTE_NODE=2,p6=j0.TEXT_NODE=3,VW=j0.CDATA_SECTION_NODE=4,_W=j0.ENTITY_REFERENCE_NODE=5,_$=j0.ENTITY_NODE=6,ZY=j0.PROCESSING_INSTRUCTION_NODE=7,YY=j0.COMMENT_NODE=8,m8=j0.DOCUMENT_NODE=9,G1=j0.DOCUMENT_TYPE_NODE=10,p1=j0.DOCUMENT_FRAGMENT_NODE=11,H$=j0.NOTATION_NODE=12,B$=j0.DOCUMENT_POSITION_DISCONNECTED=1,q$=j0.DOCUMENT_POSITION_PRECEDING=2,j$=j0.DOCUMENT_POSITION_FOLLOWING=4,XY=j0.DOCUMENT_POSITION_CONTAINS=8,K$=j0.DOCUMENT_POSITION_CONTAINED_BY=16,F$=j0.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;j0.prototype=Object.create(zY.prototype,{baseURI:{get:J0.nyi},parentElement:{get:function(){return this.parentNode&&this.parentNode.nodeType===s0?this.parentNode:null}},hasChildNodes:{value:J0.shouldOverride},firstChild:{get:J0.shouldOverride},lastChild:{get:J0.shouldOverride},isConnected:{get:function(){let $=this;while($!=null){if($.nodeType===j0.DOCUMENT_NODE)return!0;if($=$.parentNode,$!=null&&$.nodeType===j0.DOCUMENT_FRAGMENT_NODE)$=$.host}return!1}},previousSibling:{get:function(){var $=this.parentNode;if(!$)return null;if(this===$.firstChild)return null;return this._previousSibling}},nextSibling:{get:function(){var $=this.parentNode,Z=this._nextSibling;if(!$)return null;if(Z===$.firstChild)return null;return Z}},textContent:{get:function(){return null},set:function($){}},innerText:{get:function(){return null},set:function($){}},_countChildrenOfType:{value:function($){var Z=0;for(var Y=this.firstChild;Y!==null;Y=Y.nextSibling)if(Y.nodeType===$)Z++;return Z}},_ensureInsertValid:{value:function $(Z,Y,X){var z=this,Q,G;if(!Z.nodeType)throw new TypeError("not a node");switch(z.nodeType){case m8:case p1:case s0:break;default:J0.HierarchyRequestError()}if(Z.isAncestor(z))J0.HierarchyRequestError();if(Y!==null||!X){if(Y.parentNode!==z)J0.NotFoundError()}switch(Z.nodeType){case p1:case G1:case s0:case p6:case ZY:case YY:break;default:J0.HierarchyRequestError()}if(z.nodeType===m8)switch(Z.nodeType){case p6:J0.HierarchyRequestError();break;case p1:if(Z._countChildrenOfType(p6)>0)J0.HierarchyRequestError();switch(Z._countChildrenOfType(s0)){case 0:break;case 1:if(Y!==null){if(X&&Y.nodeType===G1)J0.HierarchyRequestError();for(G=Y.nextSibling;G!==null;G=G.nextSibling)if(G.nodeType===G1)J0.HierarchyRequestError()}if(Q=z._countChildrenOfType(s0),X){if(Q>0)J0.HierarchyRequestError()}else if(Q>1||Q===1&&Y.nodeType!==s0)J0.HierarchyRequestError();break;default:J0.HierarchyRequestError()}break;case s0:if(Y!==null){if(X&&Y.nodeType===G1)J0.HierarchyRequestError();for(G=Y.nextSibling;G!==null;G=G.nextSibling)if(G.nodeType===G1)J0.HierarchyRequestError()}if(Q=z._countChildrenOfType(s0),X){if(Q>0)J0.HierarchyRequestError()}else if(Q>1||Q===1&&Y.nodeType!==s0)J0.HierarchyRequestError();break;case G1:if(Y===null){if(z._countChildrenOfType(s0))J0.HierarchyRequestError()}else for(G=z.firstChild;G!==null;G=G.nextSibling){if(G===Y)break;if(G.nodeType===s0)J0.HierarchyRequestError()}if(Q=z._countChildrenOfType(G1),X){if(Q>0)J0.HierarchyRequestError()}else if(Q>1||Q===1&&Y.nodeType!==G1)J0.HierarchyRequestError();break}else if(Z.nodeType===G1)J0.HierarchyRequestError()}},insertBefore:{value:function $(Z,Y){var X=this;X._ensureInsertValid(Z,Y,!0);var z=Y;if(z===Z)z=Z.nextSibling;return X.doc.adoptNode(Z),Z._insertOrReplace(X,z,!1),Z}},appendChild:{value:function($){return this.insertBefore($,null)}},_appendChild:{value:function($){$._insertOrReplace(this,null,!1)}},removeChild:{value:function $(Z){var Y=this;if(!Z.nodeType)throw new TypeError("not a node");if(Z.parentNode!==Y)J0.NotFoundError();return Z.remove(),Z}},replaceChild:{value:function $(Z,Y){var X=this;if(X._ensureInsertValid(Z,Y,!1),Z.doc!==X.doc)X.doc.adoptNode(Z);return Z._insertOrReplace(X,Y,!0),Y}},contains:{value:function $(Z){if(Z===null)return!1;if(this===Z)return!0;return(this.compareDocumentPosition(Z)&K$)!==0}},compareDocumentPosition:{value:function $(Z){if(this===Z)return 0;if(this.doc!==Z.doc||this.rooted!==Z.rooted)return B$+F$;var Y=[],X=[];for(var z=this;z!==null;z=z.parentNode)Y.push(z);for(z=Z;z!==null;z=z.parentNode)X.push(z);if(Y.reverse(),X.reverse(),Y[0]!==X[0])return B$+F$;z=Math.min(Y.length,X.length);for(var Q=1;Q<z;Q++)if(Y[Q]!==X[Q])if(Y[Q].index<X[Q].index)return j$;else return q$;if(Y.length<X.length)return j$+K$;else return q$+XY}},isSameNode:{value:function $(Z){return this===Z}},isEqualNode:{value:function $(Z){if(!Z)return!1;if(Z.nodeType!==this.nodeType)return!1;if(!this.isEqual(Z))return!1;for(var Y=this.firstChild,X=Z.firstChild;Y&&X;Y=Y.nextSibling,X=X.nextSibling)if(!Y.isEqualNode(X))return!1;return Y===null&&X===null}},cloneNode:{value:function($){var Z=this.clone();if($)for(var Y=this.firstChild;Y!==null;Y=Y.nextSibling)Z._appendChild(Y.cloneNode(!0));return Z}},lookupPrefix:{value:function $(Z){var Y;if(Z===""||Z===null||Z===void 0)return null;switch(this.nodeType){case s0:return this._lookupNamespacePrefix(Z,this);case m8:return Y=this.documentElement,Y?Y.lookupPrefix(Z):null;case _$:case H$:case p1:case G1:return null;case V$:return Y=this.ownerElement,Y?Y.lookupPrefix(Z):null;default:return Y=this.parentElement,Y?Y.lookupPrefix(Z):null}}},lookupNamespaceURI:{value:function $(Z){if(Z===""||Z===void 0)Z=null;var Y;switch(this.nodeType){case s0:return J0.shouldOverride();case m8:return Y=this.documentElement,Y?Y.lookupNamespaceURI(Z):null;case _$:case H$:case G1:case p1:return null;case V$:return Y=this.ownerElement,Y?Y.lookupNamespaceURI(Z):null;default:return Y=this.parentElement,Y?Y.lookupNamespaceURI(Z):null}}},isDefaultNamespace:{value:function $(Z){if(Z===""||Z===void 0)Z=null;var Y=this.lookupNamespaceURI(null);return Y===Z}},index:{get:function(){var $=this.parentNode;if(this===$.firstChild)return 0;var Z=$.childNodes;if(this._index===void 0||Z[this._index]!==this){for(var Y=0;Y<Z.length;Y++)Z[Y]._index=Y;J0.assert(Z[this._index]===this)}return this._index}},isAncestor:{value:function($){if(this.doc!==$.doc)return!1;if(this.rooted!==$.rooted)return!1;for(var Z=$;Z;Z=Z.parentNode)if(Z===this)return!0;return!1}},ensureSameDoc:{value:function($){if($.ownerDocument===null)$.ownerDocument=this.doc;else if($.ownerDocument!==this.doc)J0.WrongDocumentError()}},removeChildren:{value:J0.shouldOverride},_insertOrReplace:{value:function $(Z,Y,X){var z=this,Q,G;if(z.nodeType===p1&&z.rooted)J0.HierarchyRequestError();if(Z._childNodes){if(Q=Y===null?Z._childNodes.length:Y.index,z.parentNode===Z){var V=z.index;if(V<Q)Q--}}if(X){if(Y.rooted)Y.doc.mutateRemove(Y);Y.parentNode=null}var _=Y;if(_===null)_=Z.firstChild;var B=z.rooted&&Z.rooted;if(z.nodeType===p1){var q=[0,X?1:0],F;for(var M=z.firstChild;M!==null;M=F)F=M.nextSibling,q.push(M),M.parentNode=Z;var H=q.length;if(X)v6.replace(_,H>2?q[2]:null);else if(H>2&&_!==null)v6.insertBefore(q[2],_);if(Z._childNodes){q[0]=Y===null?Z._childNodes.length:Y._index,Z._childNodes.splice.apply(Z._childNodes,q);for(G=2;G<H;G++)q[G]._index=q[0]+(G-2)}else if(Z._firstChild===Y){if(H>2)Z._firstChild=q[2];else if(X)Z._firstChild=null}if(z._childNodes)z._childNodes.length=0;else z._firstChild=null;if(Z.rooted){Z.modify();for(G=2;G<H;G++)Z.doc.mutateInsert(q[G])}}else{if(Y===z)return;if(B)z._remove();else if(z.parentNode)z.remove();if(z.parentNode=Z,X){if(v6.replace(_,z),Z._childNodes)z._index=Q,Z._childNodes[Q]=z;else if(Z._firstChild===Y)Z._firstChild=z}else{if(_!==null)v6.insertBefore(z,_);if(Z._childNodes)z._index=Q,Z._childNodes.splice(Q,0,z);else if(Z._firstChild===Y)Z._firstChild=z}if(B)Z.modify(),Z.doc.mutateMove(z);else if(Z.rooted)Z.modify(),Z.doc.mutateInsert(z)}}},lastModTime:{get:function(){if(!this._lastModTime)this._lastModTime=this.doc.modclock;return this._lastModTime}},modify:{value:function(){if(this.doc.modclock){var $=++this.doc.modclock;for(var Z=this;Z;Z=Z.parentElement)if(Z._lastModTime)Z._lastModTime=$}}},doc:{get:function(){return this.ownerDocument||this}},rooted:{get:function(){return!!this._nid}},normalize:{value:function(){var $;for(var Z=this.firstChild;Z!==null;Z=$){if($=Z.nextSibling,Z.normalize)Z.normalize();if(Z.nodeType!==j0.TEXT_NODE)continue;if(Z.nodeValue===""){this.removeChild(Z);continue}var Y=Z.previousSibling;if(Y===null)continue;else if(Y.nodeType===j0.TEXT_NODE)Y.appendData(Z.nodeValue),this.removeChild(Z)}}},serialize:{value:function(){if(this._innerHTML)return this._innerHTML;var $="";for(var Z=this.firstChild;Z!==null;Z=Z.nextSibling)$+=$Y.serializeOne(Z,this);return $}},outerHTML:{get:function(){return $Y.serializeOne(this,{nodeType:0})},set:J0.nyi},ELEMENT_NODE:{value:s0},ATTRIBUTE_NODE:{value:V$},TEXT_NODE:{value:p6},CDATA_SECTION_NODE:{value:VW},ENTITY_REFERENCE_NODE:{value:_W},ENTITY_NODE:{value:_$},PROCESSING_INSTRUCTION_NODE:{value:ZY},COMMENT_NODE:{value:YY},DOCUMENT_NODE:{value:m8},DOCUMENT_TYPE_NODE:{value:G1},DOCUMENT_FRAGMENT_NODE:{value:p1},NOTATION_NODE:{value:H$},DOCUMENT_POSITION_DISCONNECTED:{value:B$},DOCUMENT_POSITION_PRECEDING:{value:q$},DOCUMENT_POSITION_FOLLOWING:{value:j$},DOCUMENT_POSITION_CONTAINS:{value:XY},DOCUMENT_POSITION_CONTAINED_BY:{value:K$},DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:{value:F$}})});var WY=x((i5,GY)=>{GY.exports=class $ extends Array{constructor(Z){super(Z&&Z.length||0);if(Z)for(var Y in Z)this[Y]=Z[Y]}item(Z){return this[Z]||null}}});var VY=x((s5,JY)=>{function HW($){return this[$]||null}function BW($){if(!$)$=[];return $.item=HW,$}JY.exports=BW});var $8=x((n5,_Y)=>{var O$;try{O$=WY()}catch($){O$=VY()}_Y.exports=O$});var m6=x((o5,qY)=>{qY.exports=BY;var HY=f0(),qW=$8();function BY(){HY.call(this),this._firstChild=this._childNodes=null}BY.prototype=Object.create(HY.prototype,{hasChildNodes:{value:function(){if(this._childNodes)return this._childNodes.length>0;return this._firstChild!==null}},childNodes:{get:function(){return this._ensureChildNodes(),this._childNodes}},firstChild:{get:function(){if(this._childNodes)return this._childNodes.length===0?null:this._childNodes[0];return this._firstChild}},lastChild:{get:function(){var $=this._childNodes,Z;if($)return $.length===0?null:$[$.length-1];if(Z=this._firstChild,Z===null)return null;return Z._previousSibling}},_ensureChildNodes:{value:function(){if(this._childNodes)return;var $=this._firstChild,Z=$,Y=this._childNodes=new qW;if($)do Y.push(Z),Z=Z._nextSibling;while(Z!==$);this._firstChild=null}},removeChildren:{value:function $(){var Z=this.rooted?this.ownerDocument:null,Y=this.firstChild,X;while(Y!==null){if(X=Y,Y=X.nextSibling,Z)Z.mutateRemove(X);X.parentNode=null}if(this._childNodes)this._childNodes.length=0;else this._firstChild=null;this.modify()}}})});var u6=x((SW)=>{SW.isValidName=LW;SW.isValidQName=IW;var jW=/^[_:A-Za-z][-.:\w]+$/,KW=/^([_A-Za-z][-.\w]+|[_A-Za-z][-.\w]+:[_A-Za-z][-.\w]+)$/,u8="_A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",d8="-._A-Za-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0300-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",Z8="["+u8+"]["+d8+"]*",M$=u8+":",D$=d8+":",FW=new RegExp("^["+M$+"]["+D$+"]*$"),OW=new RegExp("^("+Z8+"|"+Z8+":"+Z8+")$"),jY=/[\uD800-\uDB7F\uDC00-\uDFFF]/,KY=/[\uD800-\uDB7F\uDC00-\uDFFF]/g,FY=/[\uD800-\uDB7F][\uDC00-\uDFFF]/g;u8+="\uD800-\uDB7F\uDC00-\uDFFF";d8+="\uD800-\uDB7F\uDC00-\uDFFF";Z8="["+u8+"]["+d8+"]*";M$=u8+":";D$=d8+":";var MW=new RegExp("^["+M$+"]["+D$+"]*$"),DW=new RegExp("^("+Z8+"|"+Z8+":"+Z8+")$");function LW($){if(jW.test($))return!0;if(FW.test($))return!0;if(!jY.test($))return!1;if(!MW.test($))return!1;var Z=$.match(KY),Y=$.match(FY);return Y!==null&&2*Y.length===Z.length}function IW($){if(KW.test($))return!0;if(OW.test($))return!0;if(!jY.test($))return!1;if(!DW.test($))return!1;var Z=$.match(KY),Y=$.match(FY);return Y!==null&&2*Y.length===Z.length}});var L$=x((TW)=>{var OY=L0();TW.property=function($){if(Array.isArray($.type)){var Z=Object.create(null);$.type.forEach(function(z){Z[z.value||z]=z.alias||z});var Y=$.missing;if(Y===void 0)Y=null;var X=$.invalid;if(X===void 0)X=Y;return{get:function(){var z=this._getattr($.name);if(z===null)return Y;if(z=Z[z.toLowerCase()],z!==void 0)return z;if(X!==null)return X;return z},set:function(z){this._setattr($.name,z)}}}else if($.type===Boolean)return{get:function(){return this.hasAttribute($.name)},set:function(z){if(z)this._setattr($.name,"");else this.removeAttribute($.name)}};else if($.type===Number||$.type==="long"||$.type==="unsigned long"||$.type==="limited unsigned long with fallback")return PW($);else if(!$.type||$.type===String)return{get:function(){return this._getattr($.name)||""},set:function(z){if($.treatNullAsEmptyString&&z===null)z="";this._setattr($.name,z)}};else if(typeof $.type==="function")return $.type($.name,$);throw new Error("Invalid attribute definition")};function PW($){var Z;if(typeof $.default==="function")Z=$.default;else if(typeof $.default==="number")Z=function(){return $.default};else Z=function(){OY.assert(!1,typeof $.default)};var Y=$.type==="unsigned long",X=$.type==="long",z=$.type==="limited unsigned long with fallback",Q=$.min,G=$.max,V=$.setmin;if(Q===void 0){if(Y)Q=0;if(X)Q=-2147483648;if(z)Q=1}if(G===void 0){if(Y||X||z)G=2147483647}return{get:function(){var _=this._getattr($.name),B=$.float?parseFloat(_):parseInt(_,10);if(_===null||!isFinite(B)||Q!==void 0&&B<Q||G!==void 0&&B>G)return Z.call(this);if(Y||X||z){if(!/^[ \t\n\f\r]*[-+]?[0-9]/.test(_))return Z.call(this);B=B|0}return B},set:function(_){if(!$.float)_=Math.floor(_);if(V!==void 0&&_<V)OY.IndexSizeError($.name+" set to "+_);if(Y)_=_<0||_>2147483647?Z.call(this):_|0;else if(z)_=_<1||_>2147483647?Z.call(this):_|0;else if(X)_=_<-2147483648||_>2147483647?Z.call(this):_|0;this._setattr($.name,String(_))}}}TW.registerChangeHandler=function($,Z,Y){var X=$.prototype;if(!Object.prototype.hasOwnProperty.call(X,"_attributeChangeHandlers"))X._attributeChangeHandlers=Object.create(X._attributeChangeHandlers||null);X._attributeChangeHandlers[Z]=Y}});var LY=x((t5,DY)=>{DY.exports=MY;var RW=f0();function MY($,Z){this.root=$,this.filter=Z,this.lastModTime=$.lastModTime,this.done=!1,this.cache=[],this.traverse()}MY.prototype=Object.create(Object.prototype,{length:{get:function(){if(this.checkcache(),!this.done)this.traverse();return this.cache.length}},item:{value:function($){if(this.checkcache(),!this.done&&$>=this.cache.length)this.traverse();return this.cache[$]}},checkcache:{value:function(){if(this.lastModTime!==this.root.lastModTime){for(var $=this.cache.length-1;$>=0;$--)this[$]=void 0;this.cache.length=0,this.done=!1,this.lastModTime=this.root.lastModTime}}},traverse:{value:function($){if($!==void 0)$++;var Z;while((Z=this.next())!==null)if(this[this.cache.length]=Z,this.cache.push(Z),$&&this.cache.length===$)return;this.done=!0}},next:{value:function(){var $=this.cache.length===0?this.root:this.cache[this.cache.length-1],Z;if($.nodeType===RW.DOCUMENT_NODE)Z=$.documentElement;else Z=$.nextElement(this.root);while(Z){if(this.filter(Z))return Z;Z=Z.nextElement(this.root)}return null}}})});var S$=x((e5,UY)=>{var I$=L0();UY.exports=SY;function SY($,Z){this._getString=$,this._setString=Z,this._length=0,this._lastStringValue="",this._update()}Object.defineProperties(SY.prototype,{length:{get:function(){return this._length}},item:{value:function($){var Z=H8(this);if($<0||$>=Z.length)return null;return Z[$]}},contains:{value:function($){$=String($);var Z=H8(this);return Z.indexOf($)>-1}},add:{value:function(){var $=H8(this);for(var Z=0,Y=arguments.length;Z<Y;Z++){var X=c8(arguments[Z]);if($.indexOf(X)<0)$.push(X)}this._update($)}},remove:{value:function(){var $=H8(this);for(var Z=0,Y=arguments.length;Z<Y;Z++){var X=c8(arguments[Z]),z=$.indexOf(X);if(z>-1)$.splice(z,1)}this._update($)}},toggle:{value:function $(Z,Y){if(Z=c8(Z),this.contains(Z)){if(Y===void 0||Y===!1)return this.remove(Z),!1;return!0}else{if(Y===void 0||Y===!0)return this.add(Z),!0;return!1}}},replace:{value:function $(Z,Y){if(String(Y)==="")I$.SyntaxError();Z=c8(Z),Y=c8(Y);var X=H8(this),z=X.indexOf(Z);if(z<0)return!1;var Q=X.indexOf(Y);if(Q<0)X[z]=Y;else if(z<Q)X[z]=Y,X.splice(Q,1);else X.splice(z,1);return this._update(X),!0}},toString:{value:function(){return this._getString()}},value:{get:function(){return this._getString()},set:function($){this._setString($),this._update()}},_update:{value:function($){if($)IY(this,$),this._setString($.join(" ").trim());else IY(this,H8(this));this._lastStringValue=this._getString()}}});function IY($,Z){var Y=$._length,X;$._length=Z.length;for(X=0;X<Z.length;X++)$[X]=Z[X];for(;X<Y;X++)$[X]=void 0}function c8($){if($=String($),$==="")I$.SyntaxError();if(/[ \t\r\n\f]/.test($))I$.InvalidCharacterError();return $}function NW($){var Z=$._length,Y=Array(Z);for(var X=0;X<Z;X++)Y[X]=$[X];return Y}function H8($){var Z=$._getString();if(Z===$._lastStringValue)return NW($);var Y=Z.replace(/(^[ \t\r\n\f]+)|([ \t\r\n\f]+$)/g,"");if(Y==="")return[];else{var X=Object.create(null);return Y.split(/[ \t\r\n\f]+/g).filter(function(z){var Q="$"+z;if(X[Q])return!1;return X[Q]=!0,!0})}}});var i6=x((j8,RY)=>{var d6=Object.create(null,{location:{get:function(){throw new Error("window.location is not supported.")}}}),wW=function($,Z){return $.compareDocumentPosition(Z)},bW=function($,Z){return wW($,Z)&2?1:-1},l6=function($){while(($=$.nextSibling)&&$.nodeType!==1);return $},q8=function($){while(($=$.previousSibling)&&$.nodeType!==1);return $},xW=function($){if($=$.firstChild)while($.nodeType!==1&&($=$.nextSibling));return $},yW=function($){if($=$.lastChild)while($.nodeType!==1&&($=$.previousSibling));return $},B8=function($){if(!$.parentNode)return!1;var Z=$.parentNode.nodeType;return Z===1||Z===9},AY=function($){if(!$)return $;var Z=$[0];if(Z==='"'||Z==="'"){if($[$.length-1]===Z)$=$.slice(1,-1);else $=$.slice(1);return $.replace(c.str_escape,function(Y){var X=/^\\(?:([0-9A-Fa-f]+)|([\r\n\f]+))/.exec(Y);if(!X)return Y.slice(1);if(X[2])return"";var z=parseInt(X[1],16);return String.fromCodePoint?String.fromCodePoint(z):String.fromCharCode(z)})}else if(c.ident.test($))return m1($);else return $},m1=function($){return $.replace(c.escape,function(Z){var Y=/^\\([0-9A-Fa-f]+)/.exec(Z);if(!Y)return Z[1];var X=parseInt(Y[1],16);return String.fromCodePoint?String.fromCodePoint(X):String.fromCharCode(X)})},fW=function(){if(Array.prototype.indexOf)return Array.prototype.indexOf;return function($,Z){var Y=this.length;while(Y--)if(this[Y]===Z)return Y;return-1}}(),TY=function($,Z){var Y=c.inside.source.replace(/</g,$).replace(/>/g,Z);return new RegExp(Y)},n0=function($,Z,Y){return $=$.source,$=$.replace(Z,Y.source||Y),new RegExp($)},PY=function($,Z){return $.replace(/^(?:\w+:\/\/|\/+)/,"").replace(/(?:\/+|\/*#.*?)$/,"").split("/",Z).join("/")},kW=function($,Z){var Y=$.replace(/\s+/g,""),X;if(Y==="even")Y="2n+0";else if(Y==="odd")Y="2n+1";else if(Y.indexOf("n")===-1)Y="0n"+Y;return X=/^([+-])?(\d+)?n([+-])?(\d+)?$/.exec(Y),{group:X[1]==="-"?-(X[2]||1):+(X[2]||1),offset:X[4]?X[3]==="-"?-X[4]:+X[4]:0}},U$=function($,Z,Y){var X=kW($),z=X.group,Q=X.offset,G=!Y?xW:yW,V=!Y?l6:q8;return function(_){if(!B8(_))return;var B=G(_.parentNode),q=0;while(B){if(Z(B,_))q++;if(B===_)return q-=Q,z&&q?q%z===0&&q<0===z<0:!q;B=V(B)}}},w0={"*":function(){return function(){return!0}}(),type:function($){return $=$.toLowerCase(),function(Z){return Z.nodeName.toLowerCase()===$}},attr:function($,Z,Y,X){return Z=CY[Z],function(z){var Q;switch($){case"for":Q=z.htmlFor;break;case"class":if(Q=z.className,Q===""&&z.getAttribute("class")==null)Q=null;break;case"href":case"src":Q=z.getAttribute($,2);break;case"title":Q=z.getAttribute("title")||null;break;case"id":case"lang":case"dir":case"accessKey":case"hidden":case"tabIndex":case"style":if(z.getAttribute){Q=z.getAttribute($);break}default:if(z.hasAttribute&&!z.hasAttribute($))break;Q=z[$]!=null?z[$]:z.getAttribute&&z.getAttribute($);break}if(Q==null)return;if(Q=Q+"",X)Q=Q.toLowerCase(),Y=Y.toLowerCase();return Z(Q,Y)}},":first-child":function($){return!q8($)&&B8($)},":last-child":function($){return!l6($)&&B8($)},":only-child":function($){return!q8($)&&!l6($)&&B8($)},":nth-child":function($,Z){return U$($,function(){return!0},Z)},":nth-last-child":function($){return w0[":nth-child"]($,!0)},":root":function($){return $.ownerDocument.documentElement===$},":empty":function($){return!$.firstChild},":not":function($){var Z=P$($);return function(Y){return!Z(Y)}},":first-of-type":function($){if(!B8($))return;var Z=$.nodeName;while($=q8($))if($.nodeName===Z)return;return!0},":last-of-type":function($){if(!B8($))return;var Z=$.nodeName;while($=l6($))if($.nodeName===Z)return;return!0},":only-of-type":function($){return w0[":first-of-type"]($)&&w0[":last-of-type"]($)},":nth-of-type":function($,Z){return U$($,function(Y,X){return Y.nodeName===X.nodeName},Z)},":nth-last-of-type":function($){return w0[":nth-of-type"]($,!0)},":checked":function($){return!!($.checked||$.selected)},":indeterminate":function($){return!w0[":checked"]($)},":enabled":function($){return!$.disabled&&$.type!=="hidden"},":disabled":function($){return!!$.disabled},":target":function($){return $.id===d6.location.hash.substring(1)},":focus":function($){return $===$.ownerDocument.activeElement},":is":function($){return P$($)},":matches":function($){return w0[":is"]($)},":nth-match":function($,Z){var Y=$.split(/\s*,\s*/),X=Y.shift(),z=P$(Y.join(","));return U$(X,z,Z)},":nth-last-match":function($){return w0[":nth-match"]($,!0)},":links-here":function($){return $+""===d6.location+""},":lang":function($){return function(Z){while(Z){if(Z.lang)return Z.lang.indexOf($)===0;Z=Z.parentNode}}},":dir":function($){return function(Z){while(Z){if(Z.dir)return Z.dir===$;Z=Z.parentNode}}},":scope":function($,Z){var Y=Z||$.ownerDocument;if(Y.nodeType===9)return $===Y.documentElement;return $===Y},":any-link":function($){return typeof $.href==="string"},":local-link":function($){if($.nodeName)return $.href&&$.host===d6.location.host;var Z=+$+1;return function(Y){if(!Y.href)return;var X=d6.location+"",z=Y+"";return PY(X,Z)===PY(z,Z)}},":default":function($){return!!$.defaultSelected},":valid":function($){return $.willValidate||$.validity&&$.validity.valid},":invalid":function($){return!w0[":valid"]($)},":in-range":function($){return $.value>$.min&&$.value<=$.max},":out-of-range":function($){return!w0[":in-range"]($)},":required":function($){return!!$.required},":optional":function($){return!$.required},":read-only":function($){if($.readOnly)return!0;var Z=$.getAttribute("contenteditable"),Y=$.contentEditable,X=$.nodeName.toLowerCase();return X=X!=="input"&&X!=="textarea",(X||$.disabled)&&Z==null&&Y!=="true"},":read-write":function($){return!w0[":read-only"]($)},":hover":function(){throw new Error(":hover is not supported.")},":active":function(){throw new Error(":active is not supported.")},":link":function(){throw new Error(":link is not supported.")},":visited":function(){throw new Error(":visited is not supported.")},":column":function(){throw new Error(":column is not supported.")},":nth-column":function(){throw new Error(":nth-column is not supported.")},":nth-last-column":function(){throw new Error(":nth-last-column is not supported.")},":current":function(){throw new Error(":current is not supported.")},":past":function(){throw new Error(":past is not supported.")},":future":function(){throw new Error(":future is not supported.")},":contains":function($){return function(Z){var Y=Z.innerText||Z.textContent||Z.value||"";return Y.indexOf($)!==-1}},":has":function($){return function(Z){return EY($,Z).length>0}}},CY={"-":function(){return!0},"=":function($,Z){return $===Z},"*=":function($,Z){return $.indexOf(Z)!==-1},"~=":function($,Z){var Y,X,z,Q;for(X=0;;X=Y+1){if(Y=$.indexOf(Z,X),Y===-1)return!1;if(z=$[Y-1],Q=$[Y+Z.length],(!z||z===" ")&&(!Q||Q===" "))return!0}},"|=":function($,Z){var Y=$.indexOf(Z),X;if(Y!==0)return;return X=$[Y+Z.length],X==="-"||!X},"^=":function($,Z){return $.indexOf(Z)===0},"$=":function($,Z){var Y=$.lastIndexOf(Z);return Y!==-1&&Y+Z.length===$.length},"!=":function($,Z){return $!==Z}},l8={" ":function($){return function(Z){while(Z=Z.parentNode)if($(Z))return Z}},">":function($){return function(Z){if(Z=Z.parentNode)return $(Z)&&Z}},"+":function($){return function(Z){if(Z=q8(Z))return $(Z)&&Z}},"~":function($){return function(Z){while(Z=q8(Z))if($(Z))return Z}},noop:function($){return function(Z){return $(Z)&&Z}},ref:function($,Z){var Y;function X(z){var Q=z.ownerDocument,G=Q.getElementsByTagName("*"),V=G.length;while(V--)if(Y=G[V],X.test(z))return Y=null,!0;Y=null}return X.combinator=function(z){if(!Y||!Y.getAttribute)return;var Q=Y.getAttribute(Z)||"";if(Q[0]==="#")Q=Q.substring(1);if(Q===z.id&&$(Y))return Y},X}},c={escape:/\\(?:[^0-9A-Fa-f\r\n]|[0-9A-Fa-f]{1,6}[\r\n\t ]?)/g,str_escape:/(escape)|\\(\n|\r\n?|\f)/g,nonascii:/[\u00A0-\uFFFF]/,cssid:/(?:(?!-?[0-9])(?:escape|nonascii|[-_a-zA-Z0-9])+)/,qname:/^ *(cssid|\*)/,simple:/^(?:([.#]cssid)|pseudo|attr)/,ref:/^ *\/(cssid)\/ */,combinator:/^(?: +([^ \w*.#\\]) +|( )+|([^ \w*.#\\]))(?! *$)/,attr:/^\[(cssid)(?:([^\w]?=)(inside))?\]/,pseudo:/^(:cssid)(?:\((inside)\))?/,inside:/(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|<[^"'>]*>|\\["'>]|[^"'>])*/,ident:/^(cssid)$/};c.cssid=n0(c.cssid,"nonascii",c.nonascii);c.cssid=n0(c.cssid,"escape",c.escape);c.qname=n0(c.qname,"cssid",c.cssid);c.simple=n0(c.simple,"cssid",c.cssid);c.ref=n0(c.ref,"cssid",c.cssid);c.attr=n0(c.attr,"cssid",c.cssid);c.pseudo=n0(c.pseudo,"cssid",c.cssid);c.inside=n0(c.inside,`[^"'>]*`,c.inside);c.attr=n0(c.attr,"inside",TY("\\[","\\]"));c.pseudo=n0(c.pseudo,"inside",TY("\\(","\\)"));c.simple=n0(c.simple,"pseudo",c.pseudo);c.simple=n0(c.simple,"attr",c.attr);c.ident=n0(c.ident,"cssid",c.cssid);c.str_escape=n0(c.str_escape,"escape",c.escape);var i8=function($){var Z=$.replace(/^\s+|\s+$/g,""),Y,X=[],z=[],Q,G,V,_,B;while(Z){if(V=c.qname.exec(Z))Z=Z.substring(V[0].length),G=m1(V[1]),z.push(c6(G,!0));else if(V=c.simple.exec(Z))Z=Z.substring(V[0].length),G="*",z.push(c6(G,!0)),z.push(c6(V));else throw new SyntaxError("Invalid selector.");while(V=c.simple.exec(Z))Z=Z.substring(V[0].length),z.push(c6(V));if(Z[0]==="!")Z=Z.substring(1),Q=gW(),Q.qname=G,z.push(Q.simple);if(V=c.ref.exec(Z)){Z=Z.substring(V[0].length),B=l8.ref(A$(z),m1(V[1])),X.push(B.combinator),z=[];continue}if(V=c.combinator.exec(Z)){if(Z=Z.substring(V[0].length),_=V[1]||V[2]||V[3],_===","){X.push(l8.noop(A$(z)));break}}else _="noop";if(!l8[_])throw new SyntaxError("Bad combinator.");X.push(l8[_](A$(z))),z=[]}if(Y=hW(X),Y.qname=G,Y.sel=Z,Q)Q.lname=Y.qname,Q.test=Y,Q.qname=Q.qname,Q.sel=Y.sel,Y=Q;if(B)B.test=Y,B.qname=Y.qname,B.sel=Y.sel,Y=B;return Y},c6=function($,Z){if(Z)return $==="*"?w0["*"]:w0.type($);if($[1])return $[1][0]==="."?w0.attr("class","~=",m1($[1].substring(1)),!1):w0.attr("id","=",m1($[1].substring(1)),!1);if($[2])return $[3]?w0[m1($[2])](AY($[3])):w0[m1($[2])];if($[4]){var Y=$[6],X=/["'\s]\s*I$/i.test(Y);if(X)Y=Y.replace(/\s*I$/i,"");return w0.attr(m1($[4]),$[5]||"-",AY(Y),X)}throw new SyntaxError("Unknown Selector.")},A$=function($){var Z=$.length,Y;if(Z<2)return $[0];return function(X){if(!X)return;for(Y=0;Y<Z;Y++)if(!$[Y](X))return;return!0}},hW=function($){if($.length<2)return function(Z){return!!$[0](Z)};return function(Z){var Y=$.length;while(Y--)if(!(Z=$[Y](Z)))return;return!0}},gW=function(){var $;function Z(Y){var X=Y.ownerDocument,z=X.getElementsByTagName(Z.lname),Q=z.length;while(Q--)if(Z.test(z[Q])&&$===Y)return $=null,!0;$=null}return Z.simple=function(Y){return $=Y,!0},Z},P$=function($){var Z=i8($),Y=[Z];while(Z.sel)Z=i8(Z.sel),Y.push(Z);if(Y.length<2)return Z;return function(X){var z=Y.length,Q=0;for(;Q<z;Q++)if(Y[Q](X))return!0}},EY=function($,Z){var Y=[],X=i8($),z=Z.getElementsByTagName(X.qname),Q=0,G;while(G=z[Q++])if(X(G))Y.push(G);if(X.sel){while(X.sel){X=i8(X.sel),z=Z.getElementsByTagName(X.qname),Q=0;while(G=z[Q++])if(X(G)&&fW.call(Y,G)===-1)Y.push(G)}Y.sort(bW)}return Y};RY.exports=j8=function($,Z){var Y,X;if(Z.nodeType!==11&&$.indexOf(" ")===-1){if($[0]==="#"&&Z.rooted&&/^#[A-Z_][-A-Z0-9_]*$/i.test($)){if(Z.doc._hasMultipleElementsWithId){if(Y=$.substring(1),!Z.doc._hasMultipleElementsWithId(Y))return X=Z.doc.getElementById(Y),X?[X]:[]}}if($[0]==="."&&/^\.\w+$/.test($))return Z.getElementsByClassName($.substring(1));if(/^\w+$/.test($))return Z.getElementsByTagName($)}return EY($,Z)};j8.selectors=w0;j8.operators=CY;j8.combinators=l8;j8.matches=function($,Z){var Y={sel:Z};do if(Y=i8(Y.sel),Y($))return!0;while(Y.sel);return!1}});var s6=x(($H,NY)=>{var vW=f0(),pW=W$(),T$=function($,Z){var Y=$.createDocumentFragment();for(var X=0;X<Z.length;X++){var z=Z[X],Q=z instanceof vW;Y.appendChild(Q?z:$.createTextNode(String(z)))}return Y},mW={after:{value:function $(){var Z=Array.prototype.slice.call(arguments),Y=this.parentNode,X=this.nextSibling;if(Y===null)return;while(X&&Z.some(function(Q){return Q===X}))X=X.nextSibling;var z=T$(this.doc,Z);Y.insertBefore(z,X)}},before:{value:function $(){var Z=Array.prototype.slice.call(arguments),Y=this.parentNode,X=this.previousSibling;if(Y===null)return;while(X&&Z.some(function(G){return G===X}))X=X.previousSibling;var z=T$(this.doc,Z),Q=X?X.nextSibling:Y.firstChild;Y.insertBefore(z,Q)}},remove:{value:function $(){if(this.parentNode===null)return;if(this.doc){if(this.doc._preremoveNodeIterators(this),this.rooted)this.doc.mutateRemove(this)}this._remove(),this.parentNode=null}},_remove:{value:function $(){var Z=this.parentNode;if(Z===null)return;if(Z._childNodes)Z._childNodes.splice(this.index,1);else if(Z._firstChild===this)if(this._nextSibling===this)Z._firstChild=null;else Z._firstChild=this._nextSibling;pW.remove(this),Z.modify()}},replaceWith:{value:function $(){var Z=Array.prototype.slice.call(arguments),Y=this.parentNode,X=this.nextSibling;if(Y===null)return;while(X&&Z.some(function(Q){return Q===X}))X=X.nextSibling;var z=T$(this.doc,Z);if(this.parentNode===Y)Y.replaceChild(z,this);else Y.insertBefore(z,X)}}};NY.exports=mW});var C$=x((ZH,bY)=>{var wY=f0(),uW={nextElementSibling:{get:function(){if(this.parentNode){for(var $=this.nextSibling;$!==null;$=$.nextSibling)if($.nodeType===wY.ELEMENT_NODE)return $}return null}},previousElementSibling:{get:function(){if(this.parentNode){for(var $=this.previousSibling;$!==null;$=$.previousSibling)if($.nodeType===wY.ELEMENT_NODE)return $}return null}}};bY.exports=uW});var E$=x((YH,yY)=>{yY.exports=xY;var K8=L0();function xY($){this.element=$}Object.defineProperties(xY.prototype,{length:{get:K8.shouldOverride},item:{value:K8.shouldOverride},getNamedItem:{value:function $(Z){return this.element.getAttributeNode(Z)}},getNamedItemNS:{value:function $(Z,Y){return this.element.getAttributeNodeNS(Z,Y)}},setNamedItem:{value:K8.nyi},setNamedItemNS:{value:K8.nyi},removeNamedItem:{value:function $(Z){var Y=this.element.getAttributeNode(Z);if(Y)return this.element.removeAttribute(Z),Y;K8.NotFoundError()}},removeNamedItemNS:{value:function $(Z,Y){var X=this.element.getAttributeNodeNS(Z,Y);if(X)return this.element.removeAttributeNS(Z,Y),X;K8.NotFoundError()}}})});var O8=x((XH,vY)=>{vY.exports=u1;var R$=u6(),O0=L0(),D1=O0.NAMESPACE,o6=L$(),V1=f0(),N$=$8(),dW=J$(),n6=LY(),F8=h6(),cW=S$(),w$=i6(),kY=m6(),lW=s6(),iW=C$(),hY=E$(),fY=Object.create(null);function u1($,Z,Y,X){kY.call(this),this.nodeType=V1.ELEMENT_NODE,this.ownerDocument=$,this.localName=Z,this.namespaceURI=Y,this.prefix=X,this._tagName=void 0,this._attrsByQName=Object.create(null),this._attrsByLName=Object.create(null),this._attrKeys=[]}function b$($,Z){if($.nodeType===V1.TEXT_NODE)Z.push($._data);else for(var Y=0,X=$.childNodes.length;Y<X;Y++)b$($.childNodes[Y],Z)}u1.prototype=Object.create(kY.prototype,{isHTML:{get:function $(){return this.namespaceURI===D1.HTML&&this.ownerDocument.isHTML}},tagName:{get:function $(){if(this._tagName===void 0){var Z;if(this.prefix===null)Z=this.localName;else Z=this.prefix+":"+this.localName;if(this.isHTML){var Y=fY[Z];if(!Y)fY[Z]=Y=O0.toASCIIUpperCase(Z);Z=Y}this._tagName=Z}return this._tagName}},nodeName:{get:function(){return this.tagName}},nodeValue:{get:function(){return null},set:function(){}},textContent:{get:function(){var $=[];return b$(this,$),$.join("")},set:function($){if(this.removeChildren(),$!==null&&$!==void 0&&$!=="")this._appendChild(this.ownerDocument.createTextNode($))}},innerText:{get:function(){var $=[];return b$(this,$),$.join("").replace(/[ \t\n\f\r]+/g," ").trim()},set:function($){if(this.removeChildren(),$!==null&&$!==void 0&&$!=="")this._appendChild(this.ownerDocument.createTextNode($))}},innerHTML:{get:function(){return this.serialize()},set:O0.nyi},outerHTML:{get:function(){return dW.serializeOne(this,{nodeType:0})},set:function($){var Z=this.ownerDocument,Y=this.parentNode;if(Y===null)return;if(Y.nodeType===V1.DOCUMENT_NODE)O0.NoModificationAllowedError();if(Y.nodeType===V1.DOCUMENT_FRAGMENT_NODE)Y=Y.ownerDocument.createElement("body");var X=Z.implementation.mozHTMLParser(Z._address,Y);X.parse($===null?"":String($),!0),this.replaceWith(X._asDocumentFragment())}},_insertAdjacent:{value:function $(Z,Y){var X=!1;switch(Z){case"beforebegin":X=!0;case"afterend":var z=this.parentNode;if(z===null)return null;return z.insertBefore(Y,X?this:this.nextSibling);case"afterbegin":X=!0;case"beforeend":return this.insertBefore(Y,X?this.firstChild:null);default:return O0.SyntaxError()}}},insertAdjacentElement:{value:function $(Z,Y){if(Y.nodeType!==V1.ELEMENT_NODE)throw new TypeError("not an element");return Z=O0.toASCIILowerCase(String(Z)),this._insertAdjacent(Z,Y)}},insertAdjacentText:{value:function $(Z,Y){var X=this.ownerDocument.createTextNode(Y);Z=O0.toASCIILowerCase(String(Z)),this._insertAdjacent(Z,X)}},insertAdjacentHTML:{value:function $(Z,Y){Z=O0.toASCIILowerCase(String(Z)),Y=String(Y);var X;switch(Z){case"beforebegin":case"afterend":if(X=this.parentNode,X===null||X.nodeType===V1.DOCUMENT_NODE)O0.NoModificationAllowedError();break;case"afterbegin":case"beforeend":X=this;break;default:O0.SyntaxError()}if(!(X instanceof u1)||X.ownerDocument.isHTML&&X.localName==="html"&&X.namespaceURI===D1.HTML)X=X.ownerDocument.createElementNS(D1.HTML,"body");var z=this.ownerDocument.implementation.mozHTMLParser(this.ownerDocument._address,X);z.parse(Y,!0),this._insertAdjacent(Z,z._asDocumentFragment())}},children:{get:function(){if(!this._children)this._children=new gY(this);return this._children}},attributes:{get:function(){if(!this._attributes)this._attributes=new y$(this);return this._attributes}},firstElementChild:{get:function(){for(var $=this.firstChild;$!==null;$=$.nextSibling)if($.nodeType===V1.ELEMENT_NODE)return $;return null}},lastElementChild:{get:function(){for(var $=this.lastChild;$!==null;$=$.previousSibling)if($.nodeType===V1.ELEMENT_NODE)return $;return null}},childElementCount:{get:function(){return this.children.length}},nextElement:{value:function($){if(!$)$=this.ownerDocument.documentElement;var Z=this.firstElementChild;if(!Z){if(this===$)return null;Z=this.nextElementSibling}if(Z)return Z;for(var Y=this.parentElement;Y&&Y!==$;Y=Y.parentElement)if(Z=Y.nextElementSibling,Z)return Z;return null}},getElementsByTagName:{value:function $(Z){var Y;if(!Z)return new N$;if(Z==="*")Y=function(){return!0};else if(this.isHTML)Y=sW(Z);else Y=x$(Z);return new n6(this,Y)}},getElementsByTagNameNS:{value:function $(Z,Y){var X;if(Z==="*"&&Y==="*")X=function(){return!0};else if(Z==="*")X=x$(Y);else if(Y==="*")X=nW(Z);else X=oW(Z,Y);return new n6(this,X)}},getElementsByClassName:{value:function $(Z){if(Z=String(Z).trim(),Z===""){var Y=new N$;return Y}return Z=Z.split(/[ \t\r\n\f]+/),new n6(this,rW(Z))}},getElementsByName:{value:function $(Z){return new n6(this,aW(String(Z)))}},clone:{value:function $(){var Z;if(this.namespaceURI!==D1.HTML||this.prefix||!this.ownerDocument.isHTML)Z=this.ownerDocument.createElementNS(this.namespaceURI,this.prefix!==null?this.prefix+":"+this.localName:this.localName);else Z=this.ownerDocument.createElement(this.localName);for(var Y=0,X=this._attrKeys.length;Y<X;Y++){var z=this._attrKeys[Y],Q=this._attrsByLName[z],G=Q.cloneNode();G._setOwnerElement(Z),Z._attrsByLName[z]=G,Z._addQName(G)}return Z._attrKeys=this._attrKeys.concat(),Z}},isEqual:{value:function $(Z){if(this.localName!==Z.localName||this.namespaceURI!==Z.namespaceURI||this.prefix!==Z.prefix||this._numattrs!==Z._numattrs)return!1;for(var Y=0,X=this._numattrs;Y<X;Y++){var z=this._attr(Y);if(!Z.hasAttributeNS(z.namespaceURI,z.localName))return!1;if(Z.getAttributeNS(z.namespaceURI,z.localName)!==z.value)return!1}return!0}},_lookupNamespacePrefix:{value:function $(Z,Y){if(this.namespaceURI&&this.namespaceURI===Z&&this.prefix!==null&&Y.lookupNamespaceURI(this.prefix)===Z)return this.prefix;for(var X=0,z=this._numattrs;X<z;X++){var Q=this._attr(X);if(Q.prefix==="xmlns"&&Q.value===Z&&Y.lookupNamespaceURI(Q.localName)===Z)return Q.localName}var G=this.parentElement;return G?G._lookupNamespacePrefix(Z,Y):null}},lookupNamespaceURI:{value:function $(Z){if(Z===""||Z===void 0)Z=null;if(this.namespaceURI!==null&&this.prefix===Z)return this.namespaceURI;for(var Y=0,X=this._numattrs;Y<X;Y++){var z=this._attr(Y);if(z.namespaceURI===D1.XMLNS){if(z.prefix==="xmlns"&&z.localName===Z||Z===null&&z.prefix===null&&z.localName==="xmlns")return z.value||null}}var Q=this.parentElement;return Q?Q.lookupNamespaceURI(Z):null}},getAttribute:{value:function $(Z){var Y=this.getAttributeNode(Z);return Y?Y.value:null}},getAttributeNS:{value:function $(Z,Y){var X=this.getAttributeNodeNS(Z,Y);return X?X.value:null}},getAttributeNode:{value:function $(Z){if(Z=String(Z),/[A-Z]/.test(Z)&&this.isHTML)Z=O0.toASCIILowerCase(Z);var Y=this._attrsByQName[Z];if(!Y)return null;if(Array.isArray(Y))Y=Y[0];return Y}},getAttributeNodeNS:{value:function $(Z,Y){Z=Z===void 0||Z===null?"":String(Z),Y=String(Y);var X=this._attrsByLName[Z+"|"+Y];return X?X:null}},hasAttribute:{value:function $(Z){if(Z=String(Z),/[A-Z]/.test(Z)&&this.isHTML)Z=O0.toASCIILowerCase(Z);return this._attrsByQName[Z]!==void 0}},hasAttributeNS:{value:function $(Z,Y){Z=Z===void 0||Z===null?"":String(Z),Y=String(Y);var X=Z+"|"+Y;return this._attrsByLName[X]!==void 0}},hasAttributes:{value:function $(){return this._numattrs>0}},toggleAttribute:{value:function $(Z,Y){if(Z=String(Z),!R$.isValidName(Z))O0.InvalidCharacterError();if(/[A-Z]/.test(Z)&&this.isHTML)Z=O0.toASCIILowerCase(Z);var X=this._attrsByQName[Z];if(X===void 0){if(Y===void 0||Y===!0)return this._setAttribute(Z,""),!0;return!1}else{if(Y===void 0||Y===!1)return this.removeAttribute(Z),!1;return!0}}},_setAttribute:{value:function $(Z,Y){var X=this._attrsByQName[Z],z;if(!X)X=this._newattr(Z),z=!0;else if(Array.isArray(X))X=X[0];if(X.value=Y,this._attributes)this._attributes[Z]=X;if(z&&this._newattrhook)this._newattrhook(Z,Y)}},setAttribute:{value:function $(Z,Y){if(Z=String(Z),!R$.isValidName(Z))O0.InvalidCharacterError();if(/[A-Z]/.test(Z)&&this.isHTML)Z=O0.toASCIILowerCase(Z);this._setAttribute(Z,String(Y))}},_setAttributeNS:{value:function $(Z,Y,X){var z=Y.indexOf(":"),Q,G;if(z<0)Q=null,G=Y;else Q=Y.substring(0,z),G=Y.substring(z+1);if(Z===""||Z===void 0)Z=null;var V=(Z===null?"":Z)+"|"+G,_=this._attrsByLName[V],B;if(!_){if(_=new s8(this,G,Q,Z),B=!0,this._attrsByLName[V]=_,this._attributes)this._attributes[this._attrKeys.length]=_;this._attrKeys.push(V),this._addQName(_)}if(_.value=X,B&&this._newattrhook)this._newattrhook(Y,X)}},setAttributeNS:{value:function $(Z,Y,X){if(Z=Z===null||Z===void 0||Z===""?null:String(Z),Y=String(Y),!R$.isValidQName(Y))O0.InvalidCharacterError();var z=Y.indexOf(":"),Q=z<0?null:Y.substring(0,z);if(Q!==null&&Z===null||Q==="xml"&&Z!==D1.XML||(Y==="xmlns"||Q==="xmlns")&&Z!==D1.XMLNS||Z===D1.XMLNS&&!(Y==="xmlns"||Q==="xmlns"))O0.NamespaceError();this._setAttributeNS(Z,Y,String(X))}},setAttributeNode:{value:function $(Z){if(Z.ownerElement!==null&&Z.ownerElement!==this)throw new F8(F8.INUSE_ATTRIBUTE_ERR);var Y=null,X=this._attrsByQName[Z.name];if(X){if(!Array.isArray(X))X=[X];if(X.some(function(z){return z===Z}))return Z;else if(Z.ownerElement!==null)throw new F8(F8.INUSE_ATTRIBUTE_ERR);X.forEach(function(z){this.removeAttributeNode(z)},this),Y=X[0]}return this.setAttributeNodeNS(Z),Y}},setAttributeNodeNS:{value:function $(Z){if(Z.ownerElement!==null)throw new F8(F8.INUSE_ATTRIBUTE_ERR);var Y=Z.namespaceURI,X=(Y===null?"":Y)+"|"+Z.localName,z=this._attrsByLName[X];if(z)this.removeAttributeNode(z);if(Z._setOwnerElement(this),this._attrsByLName[X]=Z,this._attributes)this._attributes[this._attrKeys.length]=Z;if(this._attrKeys.push(X),this._addQName(Z),this._newattrhook)this._newattrhook(Z.name,Z.value);return z||null}},removeAttribute:{value:function $(Z){if(Z=String(Z),/[A-Z]/.test(Z)&&this.isHTML)Z=O0.toASCIILowerCase(Z);var Y=this._attrsByQName[Z];if(!Y)return;if(Array.isArray(Y))if(Y.length>2)Y=Y.shift();else this._attrsByQName[Z]=Y[1],Y=Y[0];else this._attrsByQName[Z]=void 0;var X=Y.namespaceURI,z=(X===null?"":X)+"|"+Y.localName;this._attrsByLName[z]=void 0;var Q=this._attrKeys.indexOf(z);if(this._attributes)Array.prototype.splice.call(this._attributes,Q,1),this._attributes[Z]=void 0;this._attrKeys.splice(Q,1);var G=Y.onchange;if(Y._setOwnerElement(null),G)G.call(Y,this,Y.localName,Y.value,null);if(this.rooted)this.ownerDocument.mutateRemoveAttr(Y)}},removeAttributeNS:{value:function $(Z,Y){Z=Z===void 0||Z===null?"":String(Z),Y=String(Y);var X=Z+"|"+Y,z=this._attrsByLName[X];if(!z)return;this._attrsByLName[X]=void 0;var Q=this._attrKeys.indexOf(X);if(this._attributes)Array.prototype.splice.call(this._attributes,Q,1);this._attrKeys.splice(Q,1),this._removeQName(z);var G=z.onchange;if(z._setOwnerElement(null),G)G.call(z,this,z.localName,z.value,null);if(this.rooted)this.ownerDocument.mutateRemoveAttr(z)}},removeAttributeNode:{value:function $(Z){var Y=Z.namespaceURI,X=(Y===null?"":Y)+"|"+Z.localName;if(this._attrsByLName[X]!==Z)O0.NotFoundError();return this.removeAttributeNS(Y,Z.localName),Z}},getAttributeNames:{value:function $(){var Z=this;return this._attrKeys.map(function(Y){return Z._attrsByLName[Y].name})}},_getattr:{value:function $(Z){var Y=this._attrsByQName[Z];return Y?Y.value:null}},_setattr:{value:function $(Z,Y){var X=this._attrsByQName[Z],z;if(!X)X=this._newattr(Z),z=!0;if(X.value=String(Y),this._attributes)this._attributes[Z]=X;if(z&&this._newattrhook)this._newattrhook(Z,Y)}},_newattr:{value:function $(Z){var Y=new s8(this,Z,null,null),X="|"+Z;if(this._attrsByQName[Z]=Y,this._attrsByLName[X]=Y,this._attributes)this._attributes[this._attrKeys.length]=Y;return this._attrKeys.push(X),Y}},_addQName:{value:function($){var Z=$.name,Y=this._attrsByQName[Z];if(!Y)this._attrsByQName[Z]=$;else if(Array.isArray(Y))Y.push($);else this._attrsByQName[Z]=[Y,$];if(this._attributes)this._attributes[Z]=$}},_removeQName:{value:function($){var Z=$.name,Y=this._attrsByQName[Z];if(Array.isArray(Y)){var X=Y.indexOf($);if(O0.assert(X!==-1),Y.length===2){if(this._attrsByQName[Z]=Y[1-X],this._attributes)this._attributes[Z]=this._attrsByQName[Z]}else if(Y.splice(X,1),this._attributes&&this._attributes[Z]===$)this._attributes[Z]=Y[0]}else if(O0.assert(Y===$),this._attrsByQName[Z]=void 0,this._attributes)this._attributes[Z]=void 0}},_numattrs:{get:function(){return this._attrKeys.length}},_attr:{value:function($){return this._attrsByLName[this._attrKeys[$]]}},id:o6.property({name:"id"}),className:o6.property({name:"class"}),classList:{get:function(){var $=this;if(this._classList)return this._classList;var Z=new cW(function(){return $.className||""},function(Y){$.className=Y});return this._classList=Z,Z},set:function($){this.className=$}},matches:{value:function($){return w$.matches(this,$)}},closest:{value:function($){var Z=this;do{if(Z.matches&&Z.matches($))return Z;Z=Z.parentElement||Z.parentNode}while(Z!==null&&Z.nodeType===V1.ELEMENT_NODE);return null}},querySelector:{value:function($){return w$($,this)[0]}},querySelectorAll:{value:function($){var Z=w$($,this);return Z.item?Z:new N$(Z)}}});Object.defineProperties(u1.prototype,lW);Object.defineProperties(u1.prototype,iW);o6.registerChangeHandler(u1,"id",function($,Z,Y,X){if($.rooted){if(Y)$.ownerDocument.delId(Y,$);if(X)$.ownerDocument.addId(X,$)}});o6.registerChangeHandler(u1,"class",function($,Z,Y,X){if($._classList)$._classList._update()});function s8($,Z,Y,X,z){this.localName=Z,this.prefix=Y===null||Y===""?null:""+Y,this.namespaceURI=X===null||X===""?null:""+X,this.data=z,this._setOwnerElement($)}s8.prototype=Object.create(Object.prototype,{ownerElement:{get:function(){return this._ownerElement}},_setOwnerElement:{value:function $(Z){if(this._ownerElement=Z,this.prefix===null&&this.namespaceURI===null&&Z)this.onchange=Z._attributeChangeHandlers[this.localName];else this.onchange=null}},name:{get:function(){return this.prefix?this.prefix+":"+this.localName:this.localName}},specified:{get:function(){return!0}},value:{get:function(){return this.data},set:function($){var Z=this.data;if($=$===void 0?"":$+"",$===Z)return;if(this.data=$,this.ownerElement){if(this.onchange)this.onchange(this.ownerElement,this.localName,Z,$);if(this.ownerElement.rooted)this.ownerElement.ownerDocument.mutateAttr(this,Z)}}},cloneNode:{value:function $(Z){return new s8(null,this.localName,this.prefix,this.namespaceURI,this.data)}},nodeType:{get:function(){return V1.ATTRIBUTE_NODE}},nodeName:{get:function(){return this.name}},nodeValue:{get:function(){return this.value},set:function($){this.value=$}},textContent:{get:function(){return this.value},set:function($){if($===null||$===void 0)$="";this.value=$}},innerText:{get:function(){return this.value},set:function($){if($===null||$===void 0)$="";this.value=$}}});u1._Attr=s8;function y$($){hY.call(this,$);for(var Z in $._attrsByQName)this[Z]=$._attrsByQName[Z];for(var Y=0;Y<$._attrKeys.length;Y++)this[Y]=$._attrsByLName[$._attrKeys[Y]]}y$.prototype=Object.create(hY.prototype,{length:{get:function(){return this.element._attrKeys.length},set:function(){}},item:{value:function($){if($=$>>>0,$>=this.length)return null;return this.element._attrsByLName[this.element._attrKeys[$]]}}});if(globalThis.Symbol?.iterator)y$.prototype[globalThis.Symbol.iterator]=function(){var $=0,Z=this.length,Y=this;return{next:function(){if($<Z)return{value:Y.item($++)};return{done:!0}}}};function gY($){this.element=$,this.updateCache()}gY.prototype=Object.create(Object.prototype,{length:{get:function(){return this.updateCache(),this.childrenByNumber.length}},item:{value:function $(Z){return this.updateCache(),this.childrenByNumber[Z]||null}},namedItem:{value:function $(Z){return this.updateCache(),this.childrenByName[Z]||null}},namedItems:{get:function(){return this.updateCache(),this.childrenByName}},updateCache:{value:function $(){var Z=/^(a|applet|area|embed|form|frame|frameset|iframe|img|object)$/;if(this.lastModTime!==this.element.lastModTime){this.lastModTime=this.element.lastModTime;var Y=this.childrenByNumber&&this.childrenByNumber.length||0;for(var X=0;X<Y;X++)this[X]=void 0;this.childrenByNumber=[],this.childrenByName=Object.create(null);for(var z=this.element.firstChild;z!==null;z=z.nextSibling)if(z.nodeType===V1.ELEMENT_NODE){this[this.childrenByNumber.length]=z,this.childrenByNumber.push(z);var Q=z.getAttribute("id");if(Q&&!this.childrenByName[Q])this.childrenByName[Q]=z;var G=z.getAttribute("name");if(G&&this.element.namespaceURI===D1.HTML&&Z.test(this.element.localName)&&!this.childrenByName[G])this.childrenByName[Q]=z}}}}});function x$($){return function(Z){return Z.localName===$}}function sW($){var Z=O0.toASCIILowerCase($);if(Z===$)return x$($);return function(Y){return Y.isHTML?Y.localName===Z:Y.localName===$}}function nW($){return function(Z){return Z.namespaceURI===$}}function oW($,Z){return function(Y){return Y.namespaceURI===$&&Y.localName===Z}}function rW($){return function(Z){return $.every(function(Y){return Z.classList.contains(Y)})}}function aW($){return function(Z){if(Z.namespaceURI!==D1.HTML)return!1;return Z.getAttribute("name")===$}}});var f$=x((zH,cY)=>{cY.exports=dY;var mY=f0(),tW=$8(),uY=L0(),pY=uY.HierarchyRequestError,eW=uY.NotFoundError;function dY(){mY.call(this)}dY.prototype=Object.create(mY.prototype,{hasChildNodes:{value:function(){return!1}},firstChild:{value:null},lastChild:{value:null},insertBefore:{value:function($,Z){if(!$.nodeType)throw new TypeError("not a node");pY()}},replaceChild:{value:function($,Z){if(!$.nodeType)throw new TypeError("not a node");pY()}},removeChild:{value:function($){if(!$.nodeType)throw new TypeError("not a node");eW()}},removeChildren:{value:function(){}},childNodes:{get:function(){if(!this._childNodes)this._childNodes=new tW;return this._childNodes}}})});var n8=x((QH,sY)=>{sY.exports=r6;var iY=f$(),lY=L0(),$J=s6(),ZJ=C$();function r6(){iY.call(this)}r6.prototype=Object.create(iY.prototype,{substringData:{value:function $(Z,Y){if(arguments.length<2)throw new TypeError("Not enough arguments");if(Z=Z>>>0,Y=Y>>>0,Z>this.data.length||Z<0||Y<0)lY.IndexSizeError();return this.data.substring(Z,Z+Y)}},appendData:{value:function $(Z){if(arguments.length<1)throw new TypeError("Not enough arguments");this.data+=String(Z)}},insertData:{value:function $(Z,Y){return this.replaceData(Z,0,Y)}},deleteData:{value:function $(Z,Y){return this.replaceData(Z,Y,"")}},replaceData:{value:function $(Z,Y,X){var z=this.data,Q=z.length;if(Z=Z>>>0,Y=Y>>>0,X=String(X),Z>Q||Z<0)lY.IndexSizeError();if(Z+Y>Q)Y=Q-Z;var G=z.substring(0,Z),V=z.substring(Z+Y);this.data=G+X+V}},isEqual:{value:function $(Z){return this._data===Z._data}},length:{get:function(){return this.data.length}}});Object.defineProperties(r6.prototype,$J);Object.defineProperties(r6.prototype,ZJ)});var h$=x((GH,aY)=>{aY.exports=k$;var nY=L0(),oY=f0(),rY=n8();function k$($,Z){rY.call(this),this.nodeType=oY.TEXT_NODE,this.ownerDocument=$,this._data=Z,this._index=void 0}var o8={get:function(){return this._data},set:function($){if($===null||$===void 0)$="";else $=String($);if($===this._data)return;if(this._data=$,this.rooted)this.ownerDocument.mutateValue(this);if(this.parentNode&&this.parentNode._textchangehook)this.parentNode._textchangehook(this)}};k$.prototype=Object.create(rY.prototype,{nodeName:{value:"#text"},nodeValue:o8,textContent:o8,innerText:o8,data:{get:o8.get,set:function($){o8.set.call(this,$===null?"":String($))}},splitText:{value:function $(Z){if(Z>this._data.length||Z<0)nY.IndexSizeError();var Y=this._data.substring(Z),X=this.ownerDocument.createTextNode(Y);this.data=this.data.substring(0,Z);var z=this.parentNode;if(z!==null)z.insertBefore(X,this.nextSibling);return X}},wholeText:{get:function $(){var Z=this.textContent;for(var Y=this.nextSibling;Y;Y=Y.nextSibling){if(Y.nodeType!==oY.TEXT_NODE)break;Z+=Y.textContent}return Z}},replaceWholeText:{value:nY.nyi},clone:{value:function $(){return new k$(this.ownerDocument,this._data)}}})});var v$=x((WH,eY)=>{eY.exports=g$;var YJ=f0(),tY=n8();function g$($,Z){tY.call(this),this.nodeType=YJ.COMMENT_NODE,this.ownerDocument=$,this._data=Z}var r8={get:function(){return this._data},set:function($){if($===null||$===void 0)$="";else $=String($);if(this._data=$,this.rooted)this.ownerDocument.mutateValue(this)}};g$.prototype=Object.create(tY.prototype,{nodeName:{value:"#comment"},nodeValue:r8,textContent:r8,innerText:r8,data:{get:r8.get,set:function($){r8.set.call(this,$===null?"":String($))}},clone:{value:function $(){return new g$(this.ownerDocument,this._data)}}})});var m$=x((JH,YX)=>{YX.exports=p$;var XJ=f0(),zJ=$8(),ZX=m6(),a6=O8(),QJ=i6(),$X=L0();function p$($){ZX.call(this),this.nodeType=XJ.DOCUMENT_FRAGMENT_NODE,this.ownerDocument=$}p$.prototype=Object.create(ZX.prototype,{nodeName:{value:"#document-fragment"},nodeValue:{get:function(){return null},set:function(){}},textContent:Object.getOwnPropertyDescriptor(a6.prototype,"textContent"),innerText:Object.getOwnPropertyDescriptor(a6.prototype,"innerText"),querySelector:{value:function($){var Z=this.querySelectorAll($);return Z.length?Z[0]:null}},querySelectorAll:{value:function($){var Z=Object.create(this);Z.isHTML=!0,Z.getElementsByTagName=a6.prototype.getElementsByTagName,Z.nextElement=Object.getOwnPropertyDescriptor(a6.prototype,"firstElementChild").get;var Y=QJ($,Z);return Y.item?Y:new zJ(Y)}},clone:{value:function $(){return new p$(this.ownerDocument)}},isEqual:{value:function $(Z){return!0}},innerHTML:{get:function(){return this.serialize()},set:$X.nyi},outerHTML:{get:function(){return this.serialize()},set:$X.nyi}})});var d$=x((VH,zX)=>{zX.exports=u$;var GJ=f0(),XX=n8();function u$($,Z,Y){XX.call(this),this.nodeType=GJ.PROCESSING_INSTRUCTION_NODE,this.ownerDocument=$,this.target=Z,this._data=Y}var a8={get:function(){return this._data},set:function($){if($===null||$===void 0)$="";else $=String($);if(this._data=$,this.rooted)this.ownerDocument.mutateValue(this)}};u$.prototype=Object.create(XX.prototype,{nodeName:{get:function(){return this.target}},nodeValue:a8,textContent:a8,innerText:a8,data:{get:a8.get,set:function($){a8.set.call(this,$===null?"":String($))}},clone:{value:function $(){return new u$(this.ownerDocument,this.target,this._data)}},isEqual:{value:function $(Z){return this.target===Z.target&&this._data===Z._data}}})});var t8=x((_H,QX)=>{var c$={FILTER_ACCEPT:1,FILTER_REJECT:2,FILTER_SKIP:3,SHOW_ALL:4294967295,SHOW_ELEMENT:1,SHOW_ATTRIBUTE:2,SHOW_TEXT:4,SHOW_CDATA_SECTION:8,SHOW_ENTITY_REFERENCE:16,SHOW_ENTITY:32,SHOW_PROCESSING_INSTRUCTION:64,SHOW_COMMENT:128,SHOW_DOCUMENT:256,SHOW_DOCUMENT_TYPE:512,SHOW_DOCUMENT_FRAGMENT:1024,SHOW_NOTATION:2048};QX.exports=c$.constructor=c$.prototype=c$});var i$=x((BH,WX)=>{var HH=WX.exports={nextSkippingChildren:WJ,nextAncestorSibling:l$,next:JJ,previous:VJ,deepLastChild:GX};function WJ($,Z){if($===Z)return null;if($.nextSibling!==null)return $.nextSibling;return l$($,Z)}function l$($,Z){for($=$.parentNode;$!==null;$=$.parentNode){if($===Z)return null;if($.nextSibling!==null)return $.nextSibling}return null}function JJ($,Z){var Y=$.firstChild;if(Y!==null)return Y;if($===Z)return null;if(Y=$.nextSibling,Y!==null)return Y;return l$($,Z)}function GX($){while($.lastChild)$=$.lastChild;return $}function VJ($,Z){var Y=$.previousSibling;if(Y!==null)return GX(Y);if(Y=$.parentNode,Y===Z)return null;return Y}});var jX=x((qH,qX)=>{qX.exports=BX;var _J=f0(),k0=t8(),JX=i$(),HX=L0(),s$={first:"firstChild",last:"lastChild",next:"firstChild",previous:"lastChild"},n$={first:"nextSibling",last:"previousSibling",next:"nextSibling",previous:"previousSibling"};function VX($,Z){var Y,X,z,Q,G;X=$._currentNode[s$[Z]];while(X!==null){if(Q=$._internalFilter(X),Q===k0.FILTER_ACCEPT)return $._currentNode=X,X;if(Q===k0.FILTER_SKIP){if(Y=X[s$[Z]],Y!==null){X=Y;continue}}while(X!==null){if(G=X[n$[Z]],G!==null){X=G;break}if(z=X.parentNode,z===null||z===$.root||z===$._currentNode)return null;else X=z}}return null}function _X($,Z){var Y,X,z;if(Y=$._currentNode,Y===$.root)return null;while(!0){z=Y[n$[Z]];while(z!==null){if(Y=z,X=$._internalFilter(Y),X===k0.FILTER_ACCEPT)return $._currentNode=Y,Y;if(z=Y[s$[Z]],X===k0.FILTER_REJECT||z===null)z=Y[n$[Z]]}if(Y=Y.parentNode,Y===null||Y===$.root)return null;if($._internalFilter(Y)===k0.FILTER_ACCEPT)return null}}function BX($,Z,Y){if(!$||!$.nodeType)HX.NotSupportedError();this._root=$,this._whatToShow=Number(Z)||0,this._filter=Y||null,this._active=!1,this._currentNode=$}Object.defineProperties(BX.prototype,{root:{get:function(){return this._root}},whatToShow:{get:function(){return this._whatToShow}},filter:{get:function(){return this._filter}},currentNode:{get:function $(){return this._currentNode},set:function $(Z){if(!(Z instanceof _J))throw new TypeError("Not a Node");this._currentNode=Z}},_internalFilter:{value:function $(Z){var Y,X;if(this._active)HX.InvalidStateError();if(!(1<<Z.nodeType-1&this._whatToShow))return k0.FILTER_SKIP;if(X=this._filter,X===null)Y=k0.FILTER_ACCEPT;else{this._active=!0;try{if(typeof X==="function")Y=X(Z);else Y=X.acceptNode(Z)}finally{this._active=!1}}return+Y}},parentNode:{value:function $(){var Z=this._currentNode;while(Z!==this.root){if(Z=Z.parentNode,Z===null)return null;if(this._internalFilter(Z)===k0.FILTER_ACCEPT)return this._currentNode=Z,Z}return null}},firstChild:{value:function $(){return VX(this,"first")}},lastChild:{value:function $(){return VX(this,"last")}},previousSibling:{value:function $(){return _X(this,"previous")}},nextSibling:{value:function $(){return _X(this,"next")}},previousNode:{value:function $(){var Z,Y,X,z;Z=this._currentNode;while(Z!==this._root){for(X=Z.previousSibling;X;X=Z.previousSibling){if(Z=X,Y=this._internalFilter(Z),Y===k0.FILTER_REJECT)continue;for(z=Z.lastChild;z;z=Z.lastChild)if(Z=z,Y=this._internalFilter(Z),Y===k0.FILTER_REJECT)break;if(Y===k0.FILTER_ACCEPT)return this._currentNode=Z,Z}if(Z===this.root||Z.parentNode===null)return null;if(Z=Z.parentNode,this._internalFilter(Z)===k0.FILTER_ACCEPT)return this._currentNode=Z,Z}return null}},nextNode:{value:function $(){var Z,Y,X,z;Z=this._currentNode,Y=k0.FILTER_ACCEPT;$:while(!0){for(X=Z.firstChild;X;X=Z.firstChild)if(Z=X,Y=this._internalFilter(Z),Y===k0.FILTER_ACCEPT)return this._currentNode=Z,Z;else if(Y===k0.FILTER_REJECT)break;for(z=JX.nextSkippingChildren(Z,this.root);z;z=JX.nextSkippingChildren(Z,this.root))if(Z=z,Y=this._internalFilter(Z),Y===k0.FILTER_ACCEPT)return this._currentNode=Z,Z;else if(Y===k0.FILTER_SKIP)continue $;return null}}},toString:{value:function $(){return"[object TreeWalker]"}}})});var LX=x((jH,DX)=>{DX.exports=MX;var o$=t8(),r$=i$(),OX=L0();function HJ($,Z,Y){if(Y)return r$.next($,Z);else{if($===Z)return null;return r$.previous($,null)}}function KX($,Z){for(;Z;Z=Z.parentNode)if($===Z)return!0;return!1}function FX($,Z){var Y,X;Y=$._referenceNode,X=$._pointerBeforeReferenceNode;while(!0){if(X===Z)X=!X;else if(Y=HJ(Y,$._root,Z),Y===null)return null;var z=$._internalFilter(Y);if(z===o$.FILTER_ACCEPT)break}return $._referenceNode=Y,$._pointerBeforeReferenceNode=X,Y}function MX($,Z,Y){if(!$||!$.nodeType)OX.NotSupportedError();this._root=$,this._referenceNode=$,this._pointerBeforeReferenceNode=!0,this._whatToShow=Number(Z)||0,this._filter=Y||null,this._active=!1,$.doc._attachNodeIterator(this)}Object.defineProperties(MX.prototype,{root:{get:function $(){return this._root}},referenceNode:{get:function $(){return this._referenceNode}},pointerBeforeReferenceNode:{get:function $(){return this._pointerBeforeReferenceNode}},whatToShow:{get:function $(){return this._whatToShow}},filter:{get:function $(){return this._filter}},_internalFilter:{value:function $(Z){var Y,X;if(this._active)OX.InvalidStateError();if(!(1<<Z.nodeType-1&this._whatToShow))return o$.FILTER_SKIP;if(X=this._filter,X===null)Y=o$.FILTER_ACCEPT;else{this._active=!0;try{if(typeof X==="function")Y=X(Z);else Y=X.acceptNode(Z)}finally{this._active=!1}}return+Y}},_preremove:{value:function $(Z){if(KX(Z,this._root))return;if(!KX(Z,this._referenceNode))return;if(this._pointerBeforeReferenceNode){var Y=Z;while(Y.lastChild)Y=Y.lastChild;if(Y=r$.next(Y,this.root),Y){this._referenceNode=Y;return}this._pointerBeforeReferenceNode=!1}if(Z.previousSibling===null)this._referenceNode=Z.parentNode;else{this._referenceNode=Z.previousSibling;var X;for(X=this._referenceNode.lastChild;X;X=this._referenceNode.lastChild)this._referenceNode=X}}},nextNode:{value:function $(){return FX(this,!0)}},previousNode:{value:function $(){return FX(this,!1)}},detach:{value:function $(){}},toString:{value:function $(){return"[object NodeIterator]"}}})});var t6=x((KH,IX)=>{IX.exports=h0;function h0($){if(!$)return Object.create(h0.prototype);this.url=$.replace(/^[ \t\n\r\f]+|[ \t\n\r\f]+$/g,"");var Z=h0.pattern.exec(this.url);if(Z){if(Z[2])this.scheme=Z[2];if(Z[4]){var Y=Z[4].match(h0.userinfoPattern);if(Y)this.username=Y[1],this.password=Y[3],Z[4]=Z[4].substring(Y[0].length);if(Z[4].match(h0.portPattern)){var X=Z[4].lastIndexOf(":");this.host=Z[4].substring(0,X),this.port=Z[4].substring(X+1)}else this.host=Z[4]}if(Z[5])this.path=Z[5];if(Z[6])this.query=Z[7];if(Z[8])this.fragment=Z[9]}}h0.pattern=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/;h0.userinfoPattern=/^([^@:]*)(:([^@]*))?@/;h0.portPattern=/:\d+$/;h0.authorityPattern=/^[^:\/?#]+:\/\//;h0.hierarchyPattern=/^[^:\/?#]+:\//;h0.percentEncode=function $(Z){var Y=Z.charCodeAt(0);if(Y<256)return"%"+Y.toString(16);else throw Error("can't percent-encode codepoints > 255 yet")};h0.prototype={constructor:h0,isAbsolute:function(){return!!this.scheme},isAuthorityBased:function(){return h0.authorityPattern.test(this.url)},isHierarchical:function(){return h0.hierarchyPattern.test(this.url)},toString:function(){var $="";if(this.scheme!==void 0)$+=this.scheme+":";if(this.isAbsolute()){if($+="//",this.username||this.password){if($+=this.username||"",this.password)$+=":"+this.password;$+="@"}if(this.host)$+=this.host}if(this.port!==void 0)$+=":"+this.port;if(this.path!==void 0)$+=this.path;if(this.query!==void 0)$+="?"+this.query;if(this.fragment!==void 0)$+="#"+this.fragment;return $},resolve:function($){var Z=this,Y=new h0($),X=new h0;if(Y.scheme!==void 0)X.scheme=Y.scheme,X.username=Y.username,X.password=Y.password,X.host=Y.host,X.port=Y.port,X.path=Q(Y.path),X.query=Y.query;else if(X.scheme=Z.scheme,Y.host!==void 0)X.username=Y.username,X.password=Y.password,X.host=Y.host,X.port=Y.port,X.path=Q(Y.path),X.query=Y.query;else if(X.username=Z.username,X.password=Z.password,X.host=Z.host,X.port=Z.port,!Y.path)if(X.path=Z.path,Y.query!==void 0)X.query=Y.query;else X.query=Z.query;else{if(Y.path.charAt(0)==="/")X.path=Q(Y.path);else X.path=z(Z.path,Y.path),X.path=Q(X.path);X.query=Y.query}return X.fragment=Y.fragment,X.toString();function z(G,V){if(Z.host!==void 0&&!Z.path)return"/"+V;var _=G.lastIndexOf("/");if(_===-1)return V;else return G.substring(0,_+1)+V}function Q(G){if(!G)return G;var V="";while(G.length>0){if(G==="."||G===".."){G="";break}var _=G.substring(0,2),B=G.substring(0,3),q=G.substring(0,4);if(B==="../")G=G.substring(3);else if(_==="./")G=G.substring(2);else if(B==="/./")G="/"+G.substring(3);else if(_==="/."&&G.length===2)G="/";else if(q==="/../"||B==="/.."&&G.length===3)G="/"+G.substring(4),V=V.replace(/\/?[^\/]*$/,"");else{var F=G.match(/(\/?([^\/]*))/)[0];V+=F,G=G.substring(F.length)}}return V}}}});var AX=x((FH,UX)=>{UX.exports=a$;var SX=_8();function a$($,Z){SX.call(this,$,Z)}a$.prototype=Object.create(SX.prototype,{constructor:{value:a$}})});var t$=x((OH,PX)=>{PX.exports={Event:_8(),UIEvent:X$(),MouseEvent:Q$(),CustomEvent:AX()}});var RX=x((CX)=>{Object.defineProperty(CX,"__esModule",{value:!0});CX.hyphenate=CX.parse=void 0;function BJ($){let Z=[],Y=0,X=0,z=0,Q=0,G=0,V=null;while(Y<$.length)switch($.charCodeAt(Y++)){case 40:X++;break;case 41:X--;break;case 39:if(z===0)z=39;else if(z===39&&$.charCodeAt(Y-1)!==92)z=0;break;case 34:if(z===0)z=34;else if(z===34&&$.charCodeAt(Y-1)!==92)z=0;break;case 58:if(!V&&X===0&&z===0)V=TX($.substring(G,Y-1).trim()),Q=Y;break;case 59:if(V&&Q>0&&X===0&&z===0){let B=$.substring(Q,Y-1).trim();Z.push(V,B),G=Y,Q=0,V=null}break}if(V&&Q){let _=$.slice(Q).trim();Z.push(V,_)}return Z}CX.parse=BJ;function TX($){return $.replace(/[a-z][A-Z]/g,(Z)=>{return Z.charAt(0)+"-"+Z.charAt(1)}).toLowerCase()}CX.hyphenate=TX});var e6=x((DH,yX)=>{var{parse:jJ}=RX();yX.exports=function($){let Z=new xX($);return new Proxy(Z,{get:function(X,z){return z in X?X[z]:X.getPropertyValue(NX(z))},has:function(X,z){return!0},set:function(X,z,Q){if(z in X)X[z]=Q;else X.setProperty(NX(z),Q??void 0);return!0}})};function NX($){return $.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function xX($){this._element=$}var wX="!important";function bX($){let Z={property:{},priority:{}};if(!$)return Z;let Y=jJ($);if(Y.length<2)return Z;for(let X=0;X<Y.length;X+=2){let z=Y[X],Q=Y[X+1];if(Q.endsWith(wX))Z.priority[z]="important",Q=Q.slice(0,-wX.length).trim();Z.property[z]=Q}return Z}var M8={};xX.prototype=Object.create(Object.prototype,{_parsed:{get:function(){if(!this._parsedStyles||this.cssText!==this._lastParsedText){var $=this.cssText;this._parsedStyles=bX($),this._lastParsedText=$,delete this._names}return this._parsedStyles}},_serialize:{value:function(){var $=this._parsed,Z="";for(var Y in $.property){if(Z)Z+=" ";if(Z+=Y+": "+$.property[Y],$.priority[Y])Z+=" !"+$.priority[Y];Z+=";"}this.cssText=Z,this._lastParsedText=Z,delete this._names}},cssText:{get:function(){return this._element.getAttribute("style")},set:function($){this._element.setAttribute("style",$)}},length:{get:function(){if(!this._names)this._names=Object.getOwnPropertyNames(this._parsed.property);return this._names.length}},item:{value:function($){if(!this._names)this._names=Object.getOwnPropertyNames(this._parsed.property);return this._names[$]}},getPropertyValue:{value:function($){return $=$.toLowerCase(),this._parsed.property[$]||""}},getPropertyPriority:{value:function($){return $=$.toLowerCase(),this._parsed.priority[$]||""}},setProperty:{value:function($,Z,Y){if($=$.toLowerCase(),Z===null||Z===void 0)Z="";if(Y===null||Y===void 0)Y="";if(Z!==M8)Z=""+Z;if(Z=Z.trim(),Z===""){this.removeProperty($);return}if(Y!==""&&Y!==M8&&!/^important$/i.test(Y))return;var X=this._parsed;if(Z===M8){if(!X.property[$])return;if(Y!=="")X.priority[$]="important";else delete X.priority[$]}else{if(Z.indexOf(";")!==-1)return;var z=bX($+":"+Z);if(Object.getOwnPropertyNames(z.property).length===0)return;if(Object.getOwnPropertyNames(z.priority).length!==0)return;for(var Q in z.property)if(X.property[Q]=z.property[Q],Y===M8)continue;else if(Y!=="")X.priority[Q]="important";else if(X.priority[Q])delete X.priority[Q]}this._serialize()}},setPropertyValue:{value:function($,Z){return this.setProperty($,Z,M8)}},setPropertyPriority:{value:function($,Z){return this.setProperty($,M8,Z)}},removeProperty:{value:function($){$=$.toLowerCase();var Z=this._parsed;if($ in Z.property)delete Z.property[$],delete Z.priority[$],this._serialize()}}})});var e$=x((LH,fX)=>{var b0=t6();fX.exports=e8;function e8(){}e8.prototype=Object.create(Object.prototype,{_url:{get:function(){return new b0(this.href)}},protocol:{get:function(){var $=this._url;if($&&$.scheme)return $.scheme+":";else return":"},set:function($){var Z=this.href,Y=new b0(Z);if(Y.isAbsolute()){if($=$.replace(/:+$/,""),$=$.replace(/[^-+\.a-zA-Z0-9]/g,b0.percentEncode),$.length>0)Y.scheme=$,Z=Y.toString()}this.href=Z}},host:{get:function(){var $=this._url;if($.isAbsolute()&&$.isAuthorityBased())return $.host+($.port?":"+$.port:"");else return""},set:function($){var Z=this.href,Y=new b0(Z);if(Y.isAbsolute()&&Y.isAuthorityBased()){if($=$.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g,b0.percentEncode),$.length>0)Y.host=$,delete Y.port,Z=Y.toString()}this.href=Z}},hostname:{get:function(){var $=this._url;if($.isAbsolute()&&$.isAuthorityBased())return $.host;else return""},set:function($){var Z=this.href,Y=new b0(Z);if(Y.isAbsolute()&&Y.isAuthorityBased()){if($=$.replace(/^\/+/,""),$=$.replace(/[^-+\._~!$&'()*,;:=a-zA-Z0-9]/g,b0.percentEncode),$.length>0)Y.host=$,Z=Y.toString()}this.href=Z}},port:{get:function(){var $=this._url;if($.isAbsolute()&&$.isAuthorityBased()&&$.port!==void 0)return $.port;else return""},set:function($){var Z=this.href,Y=new b0(Z);if(Y.isAbsolute()&&Y.isAuthorityBased()){if($=""+$,$=$.replace(/[^0-9].*$/,""),$=$.replace(/^0+/,""),$.length===0)$="0";if(parseInt($,10)<=65535)Y.port=$,Z=Y.toString()}this.href=Z}},pathname:{get:function(){var $=this._url;if($.isAbsolute()&&$.isHierarchical())return $.path;else return""},set:function($){var Z=this.href,Y=new b0(Z);if(Y.isAbsolute()&&Y.isHierarchical()){if($.charAt(0)!=="/")$="/"+$;$=$.replace(/[^-+\._~!$&'()*,;:=@\/a-zA-Z0-9]/g,b0.percentEncode),Y.path=$,Z=Y.toString()}this.href=Z}},search:{get:function(){var $=this._url;if($.isAbsolute()&&$.isHierarchical()&&$.query!==void 0)return"?"+$.query;else return""},set:function($){var Z=this.href,Y=new b0(Z);if(Y.isAbsolute()&&Y.isHierarchical()){if($.charAt(0)==="?")$=$.substring(1);$=$.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g,b0.percentEncode),Y.query=$,Z=Y.toString()}this.href=Z}},hash:{get:function(){var $=this._url;if($==null||$.fragment==null||$.fragment==="")return"";else return"#"+$.fragment},set:function($){var Z=this.href,Y=new b0(Z);if($.charAt(0)==="#")$=$.substring(1);$=$.replace(/[^-+\._~!$&'()*,;:=@\/?a-zA-Z0-9]/g,b0.percentEncode),Y.fragment=$,Z=Y.toString(),this.href=Z}},username:{get:function(){var $=this._url;return $.username||""},set:function($){var Z=this.href,Y=new b0(Z);if(Y.isAbsolute())$=$.replace(/[\x00-\x1F\x7F-\uFFFF "#<>?`\/@\\:]/g,b0.percentEncode),Y.username=$,Z=Y.toString();this.href=Z}},password:{get:function(){var $=this._url;return $.password||""},set:function($){var Z=this.href,Y=new b0(Z);if(Y.isAbsolute()){if($==="")Y.password=null;else $=$.replace(/[\x00-\x1F\x7F-\uFFFF "#<>?`\/@\\]/g,b0.percentEncode),Y.password=$;Z=Y.toString()}this.href=Z}},origin:{get:function(){var $=this._url;if($==null)return"";var Z=function(Y){var X=[$.scheme,$.host,+$.port||Y];return X[0]+"://"+X[1]+(X[2]===Y?"":":"+X[2])};switch($.scheme){case"ftp":return Z(21);case"gopher":return Z(70);case"http":case"ws":return Z(80);case"https":case"wss":return Z(443);default:return $.scheme+"://"}}}});e8._inherit=function($){Object.getOwnPropertyNames(e8.prototype).forEach(function(Z){if(Z==="constructor"||Z==="href")return;var Y=Object.getOwnPropertyDescriptor(e8.prototype,Z);Object.defineProperty($,Z,Y)})}});var $Z=x((IH,gX)=>{var kX=L$(),KJ=g6().isApiWritable;gX.exports=function($,Z,Y,X){var z=$.ctor;if(z){var Q=$.props||{};if($.attributes)for(var G in $.attributes){var V=$.attributes[G];if(typeof V!=="object"||Array.isArray(V))V={type:V};if(!V.name)V.name=G.toLowerCase();Q[G]=kX.property(V)}if(Q.constructor={value:z,writable:KJ},z.prototype=Object.create(($.superclass||Z).prototype,Q),$.events)OJ(z,$.events);Y[$.name]=z}else z=Z;return($.tags||$.tag&&[$.tag]||[]).forEach(function(_){X[_]=z}),z};function hX($,Z,Y,X){this.body=$,this.document=Z,this.form=Y,this.element=X}hX.prototype.build=function(){return()=>{}};function FJ($,Z,Y,X){var z=$.ownerDocument||Object.create(null),Q=$.form||Object.create(null);$[Z]=new hX(X,z,Q,$).build()}function OJ($,Z){var Y=$.prototype;Z.forEach(function(X){Object.defineProperty(Y,"on"+X,{get:function(){return this._getEventHandler(X)},set:function(z){this._setEventHandler(X,z)}}),kX.registerChangeHandler($,"on"+X,FJ)})}});var Z9=x((SJ)=>{var ZZ=f0(),vX=O8(),MJ=e6(),t0=L0(),pX=e$(),DJ=$Z(),E1=SJ.elements={},$6=Object.create(null);SJ.createElement=function($,Z,Y){var X=$6[Z]||IJ;return new X($,Z,Y)};function R($){return DJ($,k,E1,$6)}function I0($){return{get:function(){var Z=this._getattr($);if(Z===null)return"";var Y=this.doc._resolve(Z);return Y===null?Z:Y},set:function(Z){this._setattr($,Z)}}}function $9($){return{get:function(){var Z=this._getattr($);if(Z===null)return null;if(Z.toLowerCase()==="use-credentials")return"use-credentials";return"anonymous"},set:function(Z){if(Z===null||Z===void 0)this.removeAttribute($);else this._setattr($,Z)}}}var D8={type:["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"],missing:""},LJ={A:!0,LINK:!0,BUTTON:!0,INPUT:!0,SELECT:!0,TEXTAREA:!0,COMMAND:!0},_1=function($,Z,Y){k.call(this,$,Z,Y),this._form=null},k=SJ.HTMLElement=R({superclass:vX,name:"HTMLElement",ctor:function $(Z,Y,X){vX.call(this,Z,Y,t0.NAMESPACE.HTML,X)},props:{dangerouslySetInnerHTML:{set:function($){this._innerHTML=$}},innerHTML:{get:function(){return this.serialize()},set:function($){var Z=this.ownerDocument.implementation.mozHTMLParser(this.ownerDocument._address,this);Z.parse($===null?"":String($),!0);var Y=this instanceof $6.template?this.content:this;while(Y.hasChildNodes())Y.removeChild(Y.firstChild);Y.appendChild(Z._asDocumentFragment())}},style:{get:function(){if(!this._style)this._style=new MJ(this);return this._style},set:function($){if($===null||$===void 0)$="";this._setattr("style",String($))}},blur:{value:function(){}},focus:{value:function(){}},forceSpellCheck:{value:function(){}},click:{value:function(){if(this._click_in_progress)return;this._click_in_progress=!0;try{if(this._pre_click_activation_steps)this._pre_click_activation_steps();var $=this.ownerDocument.createEvent("MouseEvent");$.initMouseEvent("click",!0,!0,this.ownerDocument.defaultView,1,0,0,0,0,!1,!1,!1,!1,0,null);var Z=this.dispatchEvent($);if(Z){if(this._post_click_activation_steps)this._post_click_activation_steps($)}else if(this._cancelled_activation_steps)this._cancelled_activation_steps()}finally{this._click_in_progress=!1}}},submit:{value:t0.nyi}},attributes:{title:String,lang:String,dir:{type:["ltr","rtl","auto"],missing:""},draggable:{type:["true","false"],treatNullAsEmptyString:!0},spellcheck:{type:["true","false"],missing:""},enterKeyHint:{type:["enter","done","go","next","previous","search","send"],missing:""},autoCapitalize:{type:["off","on","none","sentences","words","characters"],missing:""},autoFocus:Boolean,accessKey:String,nonce:String,hidden:Boolean,translate:{type:["no","yes"],missing:""},tabIndex:{type:"long",default:function(){if(this.tagName in LJ||this.contentEditable)return 0;else return-1}}},events:["abort","canplay","canplaythrough","change","click","contextmenu","cuechange","dblclick","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","ended","input","invalid","keydown","keypress","keyup","loadeddata","loadedmetadata","loadstart","mousedown","mousemove","mouseout","mouseover","mouseup","mousewheel","pause","play","playing","progress","ratechange","readystatechange","reset","seeked","seeking","select","show","stalled","submit","suspend","timeupdate","volumechange","waiting","blur","error","focus","load","scroll"]}),IJ=R({name:"HTMLUnknownElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)}}),H1={form:{get:function(){return this._form}}};R({tag:"a",name:"HTMLAnchorElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},props:{_post_click_activation_steps:{value:function($){if(this.href)this.ownerDocument.defaultView.location=this.href}}},attributes:{href:I0,ping:String,download:String,target:String,rel:String,media:String,hreflang:String,type:String,referrerPolicy:D8,coords:String,charset:String,name:String,rev:String,shape:String}});pX._inherit($6.a.prototype);R({tag:"area",name:"HTMLAreaElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{alt:String,target:String,download:String,rel:String,media:String,href:I0,hreflang:String,type:String,shape:String,coords:String,ping:String,referrerPolicy:D8,noHref:Boolean}});pX._inherit($6.area.prototype);R({tag:"br",name:"HTMLBRElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{clear:String}});R({tag:"base",name:"HTMLBaseElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{target:String}});R({tag:"body",name:"HTMLBodyElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},events:["afterprint","beforeprint","beforeunload","blur","error","focus","hashchange","load","message","offline","online","pagehide","pageshow","popstate","resize","scroll","storage","unload"],attributes:{text:{type:String,treatNullAsEmptyString:!0},link:{type:String,treatNullAsEmptyString:!0},vLink:{type:String,treatNullAsEmptyString:!0},aLink:{type:String,treatNullAsEmptyString:!0},bgColor:{type:String,treatNullAsEmptyString:!0},background:String}});R({tag:"button",name:"HTMLButtonElement",ctor:function $(Z,Y,X){_1.call(this,Z,Y,X)},props:H1,attributes:{name:String,value:String,disabled:Boolean,autofocus:Boolean,type:{type:["submit","reset","button","menu"],missing:"submit"},formTarget:String,formAction:I0,formNoValidate:Boolean,formMethod:{type:["get","post","dialog"],invalid:"get",missing:""},formEnctype:{type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:""}}});R({tag:"dl",name:"HTMLDListElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{compact:Boolean}});R({tag:"data",name:"HTMLDataElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{value:String}});R({tag:"datalist",name:"HTMLDataListElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)}});R({tag:"details",name:"HTMLDetailsElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{open:Boolean}});R({tag:"div",name:"HTMLDivElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{align:String}});R({tag:"embed",name:"HTMLEmbedElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{src:I0,type:String,width:String,height:String,align:String,name:String}});R({tag:"fieldset",name:"HTMLFieldSetElement",ctor:function $(Z,Y,X){_1.call(this,Z,Y,X)},props:H1,attributes:{disabled:Boolean,name:String}});R({tag:"form",name:"HTMLFormElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{action:String,autocomplete:{type:["on","off"],missing:"on"},name:String,acceptCharset:{name:"accept-charset"},target:String,noValidate:Boolean,method:{type:["get","post","dialog"],invalid:"get",missing:"get"},enctype:{type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:"application/x-www-form-urlencoded"},encoding:{name:"enctype",type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:"application/x-www-form-urlencoded"}}});R({tag:"hr",name:"HTMLHRElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{align:String,color:String,noShade:Boolean,size:String,width:String}});R({tag:"head",name:"HTMLHeadElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)}});R({tags:["h1","h2","h3","h4","h5","h6"],name:"HTMLHeadingElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{align:String}});R({tag:"html",name:"HTMLHtmlElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{xmlns:I0,version:String}});R({tag:"iframe",name:"HTMLIFrameElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{src:I0,srcdoc:String,name:String,width:String,height:String,seamless:Boolean,allow:Boolean,allowFullscreen:Boolean,allowUserMedia:Boolean,allowPaymentRequest:Boolean,referrerPolicy:D8,loading:{type:["eager","lazy"],treatNullAsEmptyString:!0},align:String,scrolling:String,frameBorder:String,longDesc:I0,marginHeight:{type:String,treatNullAsEmptyString:!0},marginWidth:{type:String,treatNullAsEmptyString:!0}}});R({tag:"img",name:"HTMLImageElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{alt:String,src:I0,srcset:String,crossOrigin:$9,useMap:String,isMap:Boolean,sizes:String,height:{type:"unsigned long",default:0},width:{type:"unsigned long",default:0},referrerPolicy:D8,loading:{type:["eager","lazy"],missing:""},name:String,lowsrc:I0,align:String,hspace:{type:"unsigned long",default:0},vspace:{type:"unsigned long",default:0},longDesc:I0,border:{type:String,treatNullAsEmptyString:!0}}});R({tag:"input",name:"HTMLInputElement",ctor:function $(Z,Y,X){_1.call(this,Z,Y,X)},props:{form:H1.form,_post_click_activation_steps:{value:function($){if(this.type==="checkbox")this.checked=!this.checked;else if(this.type==="radio"){var Z=this.form.getElementsByName(this.name);for(var Y=Z.length-1;Y>=0;Y--){var X=Z[Y];X.checked=X===this}}}}},attributes:{name:String,disabled:Boolean,autofocus:Boolean,accept:String,alt:String,max:String,min:String,pattern:String,placeholder:String,step:String,dirName:String,defaultValue:{name:"value"},multiple:Boolean,required:Boolean,readOnly:Boolean,checked:Boolean,value:String,src:I0,defaultChecked:{name:"checked",type:Boolean},size:{type:"unsigned long",default:20,min:1,setmin:1},width:{type:"unsigned long",min:0,setmin:0,default:0},height:{type:"unsigned long",min:0,setmin:0,default:0},minLength:{type:"unsigned long",min:0,setmin:0,default:-1},maxLength:{type:"unsigned long",min:0,setmin:0,default:-1},autocomplete:String,type:{type:["text","hidden","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"],missing:"text"},formTarget:String,formNoValidate:Boolean,formMethod:{type:["get","post"],invalid:"get",missing:""},formEnctype:{type:["application/x-www-form-urlencoded","multipart/form-data","text/plain"],invalid:"application/x-www-form-urlencoded",missing:""},inputMode:{type:["verbatim","latin","latin-name","latin-prose","full-width-latin","kana","kana-name","katakana","numeric","tel","email","url"],missing:""},align:String,useMap:String}});R({tag:"keygen",name:"HTMLKeygenElement",ctor:function $(Z,Y,X){_1.call(this,Z,Y,X)},props:H1,attributes:{name:String,disabled:Boolean,autofocus:Boolean,challenge:String,keytype:{type:["rsa"],missing:""}}});R({tag:"li",name:"HTMLLIElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{value:{type:"long",default:0},type:String}});R({tag:"label",name:"HTMLLabelElement",ctor:function $(Z,Y,X){_1.call(this,Z,Y,X)},props:H1,attributes:{htmlFor:{name:"for",type:String}}});R({tag:"legend",name:"HTMLLegendElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{align:String}});R({tag:"link",name:"HTMLLinkElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{href:I0,rel:String,media:String,hreflang:String,type:String,crossOrigin:$9,nonce:String,integrity:String,referrerPolicy:D8,imageSizes:String,imageSrcset:String,charset:String,rev:String,target:String}});R({tag:"map",name:"HTMLMapElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{name:String}});R({tag:"menu",name:"HTMLMenuElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{type:{type:["context","popup","toolbar"],missing:"toolbar"},label:String,compact:Boolean}});R({tag:"meta",name:"HTMLMetaElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{name:String,content:String,httpEquiv:{name:"http-equiv",type:String},scheme:String}});R({tag:"meter",name:"HTMLMeterElement",ctor:function $(Z,Y,X){_1.call(this,Z,Y,X)},props:H1});R({tags:["ins","del"],name:"HTMLModElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{cite:I0,dateTime:String}});R({tag:"ol",name:"HTMLOListElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},props:{_numitems:{get:function(){var $=0;return this.childNodes.forEach(function(Z){if(Z.nodeType===ZZ.ELEMENT_NODE&&Z.tagName==="LI")$++}),$}}},attributes:{type:String,reversed:Boolean,start:{type:"long",default:function(){if(this.reversed)return this._numitems;else return 1}},compact:Boolean}});R({tag:"object",name:"HTMLObjectElement",ctor:function $(Z,Y,X){_1.call(this,Z,Y,X)},props:H1,attributes:{data:I0,type:String,name:String,useMap:String,typeMustMatch:Boolean,width:String,height:String,align:String,archive:String,code:String,declare:Boolean,hspace:{type:"unsigned long",default:0},standby:String,vspace:{type:"unsigned long",default:0},codeBase:I0,codeType:String,border:{type:String,treatNullAsEmptyString:!0}}});R({tag:"optgroup",name:"HTMLOptGroupElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{disabled:Boolean,label:String}});R({tag:"option",name:"HTMLOptionElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},props:{form:{get:function(){var $=this.parentNode;while($&&$.nodeType===ZZ.ELEMENT_NODE){if($.localName==="select")return $.form;$=$.parentNode}}},value:{get:function(){return this._getattr("value")||this.text},set:function($){this._setattr("value",$)}},text:{get:function(){return this.textContent.replace(/[ \t\n\f\r]+/g," ").trim()},set:function($){this.textContent=$}}},attributes:{disabled:Boolean,defaultSelected:{name:"selected",type:Boolean},label:String}});R({tag:"output",name:"HTMLOutputElement",ctor:function $(Z,Y,X){_1.call(this,Z,Y,X)},props:H1,attributes:{name:String}});R({tag:"p",name:"HTMLParagraphElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{align:String}});R({tag:"param",name:"HTMLParamElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{name:String,value:String,type:String,valueType:String}});R({tags:["pre","listing","xmp"],name:"HTMLPreElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{width:{type:"long",default:0}}});R({tag:"progress",name:"HTMLProgressElement",ctor:function $(Z,Y,X){_1.call(this,Z,Y,X)},props:H1,attributes:{max:{type:Number,float:!0,default:1,min:0}}});R({tags:["q","blockquote"],name:"HTMLQuoteElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{cite:I0}});R({tag:"script",name:"HTMLScriptElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},props:{text:{get:function(){var $="";for(var Z=0,Y=this.childNodes.length;Z<Y;Z++){var X=this.childNodes[Z];if(X.nodeType===ZZ.TEXT_NODE)$+=X._data}return $},set:function($){if(this.removeChildren(),$!==null&&$!=="")this.appendChild(this.ownerDocument.createTextNode($))}}},attributes:{src:I0,type:String,charset:String,referrerPolicy:D8,defer:Boolean,async:Boolean,nomodule:Boolean,crossOrigin:$9,nonce:String,integrity:String}});R({tag:"select",name:"HTMLSelectElement",ctor:function $(Z,Y,X){_1.call(this,Z,Y,X)},props:{form:H1.form,options:{get:function(){return this.getElementsByTagName("option")}}},attributes:{autocomplete:String,name:String,disabled:Boolean,autofocus:Boolean,multiple:Boolean,required:Boolean,size:{type:"unsigned long",default:0}}});R({tag:"span",name:"HTMLSpanElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)}});R({tag:"style",name:"HTMLStyleElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{media:String,type:String,scoped:Boolean}});R({tag:"caption",name:"HTMLTableCaptionElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{align:String}});R({name:"HTMLTableCellElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{colSpan:{type:"unsigned long",default:1},rowSpan:{type:"unsigned long",default:1},scope:{type:["row","col","rowgroup","colgroup"],missing:""},abbr:String,align:String,axis:String,height:String,width:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},noWrap:Boolean,vAlign:String,bgColor:{type:String,treatNullAsEmptyString:!0}}});R({tags:["col","colgroup"],name:"HTMLTableColElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{span:{type:"limited unsigned long with fallback",default:1,min:1},align:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},vAlign:String,width:String}});R({tag:"table",name:"HTMLTableElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},props:{rows:{get:function(){return this.getElementsByTagName("tr")}}},attributes:{align:String,border:String,frame:String,rules:String,summary:String,width:String,bgColor:{type:String,treatNullAsEmptyString:!0},cellPadding:{type:String,treatNullAsEmptyString:!0},cellSpacing:{type:String,treatNullAsEmptyString:!0}}});R({tag:"template",name:"HTMLTemplateElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X),this._contentFragment=Z._templateDoc.createDocumentFragment()},props:{content:{get:function(){return this._contentFragment}},serialize:{value:function(){return this.content.serialize()}}}});R({tag:"tr",name:"HTMLTableRowElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},props:{cells:{get:function(){return this.querySelectorAll("td,th")}}},attributes:{align:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},vAlign:String,bgColor:{type:String,treatNullAsEmptyString:!0}}});R({tags:["thead","tfoot","tbody"],name:"HTMLTableSectionElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},props:{rows:{get:function(){return this.getElementsByTagName("tr")}}},attributes:{align:String,ch:{name:"char",type:String},chOff:{name:"charoff",type:String},vAlign:String}});R({tag:"textarea",name:"HTMLTextAreaElement",ctor:function $(Z,Y,X){_1.call(this,Z,Y,X)},props:{form:H1.form,type:{get:function(){return"textarea"}},defaultValue:{get:function(){return this.textContent},set:function($){this.textContent=$}},value:{get:function(){return this.defaultValue},set:function($){this.defaultValue=$}},textLength:{get:function(){return this.value.length}}},attributes:{autocomplete:String,name:String,disabled:Boolean,autofocus:Boolean,placeholder:String,wrap:String,dirName:String,required:Boolean,readOnly:Boolean,rows:{type:"limited unsigned long with fallback",default:2},cols:{type:"limited unsigned long with fallback",default:20},maxLength:{type:"unsigned long",min:0,setmin:0,default:-1},minLength:{type:"unsigned long",min:0,setmin:0,default:-1},inputMode:{type:["verbatim","latin","latin-name","latin-prose","full-width-latin","kana","kana-name","katakana","numeric","tel","email","url"],missing:""}}});R({tag:"time",name:"HTMLTimeElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{dateTime:String,pubDate:Boolean}});R({tag:"title",name:"HTMLTitleElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},props:{text:{get:function(){return this.textContent}}}});R({tag:"ul",name:"HTMLUListElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{type:String,compact:Boolean}});R({name:"HTMLMediaElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{src:I0,crossOrigin:$9,preload:{type:["metadata","none","auto",{value:"",alias:"auto"}],missing:"auto"},loop:Boolean,autoplay:Boolean,mediaGroup:String,controls:Boolean,defaultMuted:{name:"muted",type:Boolean}}});R({name:"HTMLAudioElement",tag:"audio",superclass:E1.HTMLMediaElement,ctor:function $(Z,Y,X){E1.HTMLMediaElement.call(this,Z,Y,X)}});R({name:"HTMLVideoElement",tag:"video",superclass:E1.HTMLMediaElement,ctor:function $(Z,Y,X){E1.HTMLMediaElement.call(this,Z,Y,X)},attributes:{poster:I0,width:{type:"unsigned long",min:0,default:0},height:{type:"unsigned long",min:0,default:0}}});R({tag:"td",name:"HTMLTableDataCellElement",superclass:E1.HTMLTableCellElement,ctor:function $(Z,Y,X){E1.HTMLTableCellElement.call(this,Z,Y,X)}});R({tag:"th",name:"HTMLTableHeaderCellElement",superclass:E1.HTMLTableCellElement,ctor:function $(Z,Y,X){E1.HTMLTableCellElement.call(this,Z,Y,X)}});R({tag:"frameset",name:"HTMLFrameSetElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)}});R({tag:"frame",name:"HTMLFrameElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)}});R({tag:"canvas",name:"HTMLCanvasElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},props:{getContext:{value:t0.nyi},probablySupportsContext:{value:t0.nyi},setContext:{value:t0.nyi},transferControlToProxy:{value:t0.nyi},toDataURL:{value:t0.nyi},toBlob:{value:t0.nyi}},attributes:{width:{type:"unsigned long",default:300},height:{type:"unsigned long",default:150}}});R({tag:"dialog",name:"HTMLDialogElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},props:{show:{value:t0.nyi},showModal:{value:t0.nyi},close:{value:t0.nyi}},attributes:{open:Boolean,returnValue:String}});R({tag:"menuitem",name:"HTMLMenuItemElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},props:{_label:{get:function(){var $=this._getattr("label");if($!==null&&$!=="")return $;return $=this.textContent,$.replace(/[ \t\n\f\r]+/g," ").trim()}},label:{get:function(){var $=this._getattr("label");if($!==null)return $;return this._label},set:function($){this._setattr("label",$)}}},attributes:{type:{type:["command","checkbox","radio"],missing:"command"},icon:I0,disabled:Boolean,checked:Boolean,radiogroup:String,default:Boolean}});R({tag:"source",name:"HTMLSourceElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{srcset:String,sizes:String,media:String,src:I0,type:String,width:String,height:String}});R({tag:"track",name:"HTMLTrackElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{src:I0,srclang:String,label:String,default:Boolean,kind:{type:["subtitles","captions","descriptions","chapters","metadata"],missing:"subtitles",invalid:"metadata"}},props:{NONE:{get:function(){return 0}},LOADING:{get:function(){return 1}},LOADED:{get:function(){return 2}},ERROR:{get:function(){return 3}},readyState:{get:t0.nyi},track:{get:t0.nyi}}});R({tag:"font",name:"HTMLFontElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{color:{type:String,treatNullAsEmptyString:!0},face:{type:String},size:{type:String}}});R({tag:"dir",name:"HTMLDirectoryElement",ctor:function $(Z,Y,X){k.call(this,Z,Y,X)},attributes:{compact:Boolean}});R({tags:["abbr","address","article","aside","b","bdi","bdo","cite","content","code","dd","dfn","dt","em","figcaption","figure","footer","header","hgroup","i","kbd","main","mark","nav","noscript","rb","rp","rt","rtc","ruby","s","samp","section","small","strong","sub","summary","sup","u","var","wbr","acronym","basefont","big","center","nobr","noembed","noframes","plaintext","strike","tt"]})});var zZ=x((EJ)=>{var mX=O8(),AJ=$Z(),PJ=L0(),TJ=e6(),CJ=EJ.elements={},uX=Object.create(null);EJ.createElement=function($,Z,Y){var X=uX[Z]||XZ;return new X($,Z,Y)};function YZ($){return AJ($,XZ,CJ,uX)}var XZ=YZ({superclass:mX,name:"SVGElement",ctor:function $(Z,Y,X){mX.call(this,Z,Y,PJ.NAMESPACE.SVG,X)},props:{style:{get:function(){if(!this._style)this._style=new TJ(this);return this._style}}}});YZ({name:"SVGSVGElement",ctor:function $(Z,Y,X){XZ.call(this,Z,Y,X)},tag:"svg",props:{createSVGRect:{value:function(){return EJ.createElement(this.ownerDocument,"rect",null)}}}});YZ({tags:["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"]})});var lX=x((CH,cX)=>{cX.exports={VALUE:1,ATTR:2,REMOVE_ATTR:3,REMOVE:4,MOVE:5,INSERT:6}});var X9=x((EH,Zz)=>{Zz.exports=Y6;var g0=f0(),RJ=$8(),aX=m6(),d1=O8(),NJ=h$(),wJ=v$(),Z6=_8(),bJ=m$(),xJ=d$(),yJ=X6(),fJ=jX(),kJ=LX(),iX=t8(),sX=t6(),nX=i6(),hJ=t$(),Y9=u6(),QZ=Z9(),gJ=zZ(),Q0=L0(),L8=lX(),S8=Q0.NAMESPACE,GZ=g6().isApiWritable;function Y6($,Z){aX.call(this),this.nodeType=g0.DOCUMENT_NODE,this.isHTML=$,this._address=Z||"about:blank",this.readyState="loading",this.implementation=new yJ(this),this.ownerDocument=null,this._contentType=$?"text/html":"application/xml",this.doctype=null,this.documentElement=null,this._templateDocCache=null,this._nodeIterators=null,this._nid=1,this._nextnid=2,this._nodes=[null,this],this.byId=Object.create(null),this.modclock=0}var vJ={event:"Event",customevent:"CustomEvent",uievent:"UIEvent",mouseevent:"MouseEvent"},pJ={events:"event",htmlevents:"event",mouseevents:"mouseevent",mutationevents:"mutationevent",uievents:"uievent"},I8=function($,Z,Y){return{get:function(){var X=$.call(this);if(X)return X[Z];return Y},set:function(X){var z=$.call(this);if(z)z[Z]=X}}};function oX($,Z){var Y,X,z;if($==="")$=null;if(!Y9.isValidQName(Z))Q0.InvalidCharacterError();if(Y=null,X=Z,z=Z.indexOf(":"),z>=0)Y=Z.substring(0,z),X=Z.substring(z+1);if(Y!==null&&$===null)Q0.NamespaceError();if(Y==="xml"&&$!==S8.XML)Q0.NamespaceError();if((Y==="xmlns"||Z==="xmlns")&&$!==S8.XMLNS)Q0.NamespaceError();if($===S8.XMLNS&&!(Y==="xmlns"||Z==="xmlns"))Q0.NamespaceError();return{namespace:$,prefix:Y,localName:X}}Y6.prototype=Object.create(aX.prototype,{_setMutationHandler:{value:function($){this.mutationHandler=$}},_dispatchRendererEvent:{value:function($,Z,Y){var X=this._nodes[$];if(!X)return;X._dispatchEvent(new Z6(Z,Y),!0)}},nodeName:{value:"#document"},nodeValue:{get:function(){return null},set:function(){}},documentURI:{get:function(){return this._address},set:Q0.nyi},compatMode:{get:function(){return this._quirks?"BackCompat":"CSS1Compat"}},createTextNode:{value:function($){return new NJ(this,String($))}},createComment:{value:function($){return new wJ(this,$)}},createDocumentFragment:{value:function(){return new bJ(this)}},createProcessingInstruction:{value:function($,Z){if(!Y9.isValidName($)||Z.indexOf("?>")!==-1)Q0.InvalidCharacterError();return new xJ(this,$,Z)}},createAttribute:{value:function($){if($=String($),!Y9.isValidName($))Q0.InvalidCharacterError();if(this.isHTML)$=Q0.toASCIILowerCase($);return new d1._Attr(null,$,null,null,"")}},createAttributeNS:{value:function($,Z){$=$===null||$===void 0||$===""?null:String($),Z=String(Z);var Y=oX($,Z);return new d1._Attr(null,Y.localName,Y.prefix,Y.namespace,"")}},createElement:{value:function($){if($=String($),!Y9.isValidName($))Q0.InvalidCharacterError();if(this.isHTML){if(/[A-Z]/.test($))$=Q0.toASCIILowerCase($);return QZ.createElement(this,$,null)}else if(this.contentType==="application/xhtml+xml")return QZ.createElement(this,$,null);else return new d1(this,$,null,null)},writable:GZ},createElementNS:{value:function($,Z){$=$===null||$===void 0||$===""?null:String($),Z=String(Z);var Y=oX($,Z);return this._createElementNS(Y.localName,Y.namespace,Y.prefix)},writable:GZ},_createElementNS:{value:function($,Z,Y){if(Z===S8.HTML)return QZ.createElement(this,$,Y);else if(Z===S8.SVG)return gJ.createElement(this,$,Y);return new d1(this,$,Z,Y)}},createEvent:{value:function $(Z){Z=Z.toLowerCase();var Y=pJ[Z]||Z,X=hJ[vJ[Y]];if(X){var z=new X;return z._initialized=!1,z}else Q0.NotSupportedError()}},createTreeWalker:{value:function($,Z,Y){if(!$)throw new TypeError("root argument is required");if(!($ instanceof g0))throw new TypeError("root not a node");return Z=Z===void 0?iX.SHOW_ALL:+Z,Y=Y===void 0?null:Y,new fJ($,Z,Y)}},createNodeIterator:{value:function($,Z,Y){if(!$)throw new TypeError("root argument is required");if(!($ instanceof g0))throw new TypeError("root not a node");return Z=Z===void 0?iX.SHOW_ALL:+Z,Y=Y===void 0?null:Y,new kJ($,Z,Y)}},_attachNodeIterator:{value:function($){if(!this._nodeIterators)this._nodeIterators=[];this._nodeIterators.push($)}},_detachNodeIterator:{value:function($){var Z=this._nodeIterators.indexOf($);this._nodeIterators.splice(Z,1)}},_preremoveNodeIterators:{value:function($){if(this._nodeIterators)this._nodeIterators.forEach(function(Z){Z._preremove($)})}},_updateDocTypeElement:{value:function $(){this.doctype=this.documentElement=null;for(var Z=this.firstChild;Z!==null;Z=Z.nextSibling)if(Z.nodeType===g0.DOCUMENT_TYPE_NODE)this.doctype=Z;else if(Z.nodeType===g0.ELEMENT_NODE)this.documentElement=Z}},insertBefore:{value:function $(Z,Y){return g0.prototype.insertBefore.call(this,Z,Y),this._updateDocTypeElement(),Z}},replaceChild:{value:function $(Z,Y){return g0.prototype.replaceChild.call(this,Z,Y),this._updateDocTypeElement(),Y}},removeChild:{value:function $(Z){return g0.prototype.removeChild.call(this,Z),this._updateDocTypeElement(),Z}},getElementById:{value:function($){var Z=this.byId[$];if(!Z)return null;if(Z instanceof R1)return Z.getFirst();return Z}},_hasMultipleElementsWithId:{value:function($){return this.byId[$]instanceof R1}},getElementsByName:{value:d1.prototype.getElementsByName},getElementsByTagName:{value:d1.prototype.getElementsByTagName},getElementsByTagNameNS:{value:d1.prototype.getElementsByTagNameNS},getElementsByClassName:{value:d1.prototype.getElementsByClassName},adoptNode:{value:function $(Z){if(Z.nodeType===g0.DOCUMENT_NODE)Q0.NotSupportedError();if(Z.nodeType===g0.ATTRIBUTE_NODE)return Z;if(Z.parentNode)Z.parentNode.removeChild(Z);if(Z.ownerDocument!==this)$z(Z,this);return Z}},importNode:{value:function $(Z,Y){return this.adoptNode(Z.cloneNode(Y))},writable:GZ},origin:{get:function $(){return null}},characterSet:{get:function $(){return"UTF-8"}},contentType:{get:function $(){return this._contentType}},URL:{get:function $(){return this._address}},domain:{get:Q0.nyi,set:Q0.nyi},referrer:{get:Q0.nyi},cookie:{get:Q0.nyi,set:Q0.nyi},lastModified:{get:Q0.nyi},location:{get:function(){return this.defaultView?this.defaultView.location:null},set:Q0.nyi},_titleElement:{get:function(){return this.getElementsByTagName("title").item(0)||null}},title:{get:function(){var $=this._titleElement,Z=$?$.textContent:"";return Z.replace(/[ \t\n\r\f]+/g," ").replace(/(^ )|( $)/g,"")},set:function($){var Z=this._titleElement,Y=this.head;if(!Z&&!Y)return;if(!Z)Z=this.createElement("title"),Y.appendChild(Z);Z.textContent=$}},dir:I8(function(){var $=this.documentElement;if($&&$.tagName==="HTML")return $},"dir",""),fgColor:I8(function(){return this.body},"text",""),linkColor:I8(function(){return this.body},"link",""),vlinkColor:I8(function(){return this.body},"vLink",""),alinkColor:I8(function(){return this.body},"aLink",""),bgColor:I8(function(){return this.body},"bgColor",""),charset:{get:function(){return this.characterSet}},inputEncoding:{get:function(){return this.characterSet}},scrollingElement:{get:function(){return this._quirks?this.body:this.documentElement}},body:{get:function(){return rX(this.documentElement,"body")},set:Q0.nyi},head:{get:function(){return rX(this.documentElement,"head")}},images:{get:Q0.nyi},embeds:{get:Q0.nyi},plugins:{get:Q0.nyi},links:{get:Q0.nyi},forms:{get:Q0.nyi},scripts:{get:Q0.nyi},applets:{get:function(){return[]}},activeElement:{get:function(){return null}},innerHTML:{get:function(){return this.serialize()},set:Q0.nyi},outerHTML:{get:function(){return this.serialize()},set:Q0.nyi},write:{value:function($){if(!this.isHTML)Q0.InvalidStateError();if(!this._parser)return;if(!this._parser);var Z=arguments.join("");this._parser.parse(Z)}},writeln:{value:function $(Z){this.write(Array.prototype.join.call(arguments,"")+`
|
|
29
|
+
`)}},open:{value:function(){this.documentElement=null}},close:{value:function(){if(this.readyState="interactive",this._dispatchEvent(new Z6("readystatechange"),!0),this._dispatchEvent(new Z6("DOMContentLoaded"),!0),this.readyState="complete",this._dispatchEvent(new Z6("readystatechange"),!0),this.defaultView)this.defaultView._dispatchEvent(new Z6("load"),!0)}},clone:{value:function $(){var Z=new Y6(this.isHTML,this._address);return Z._quirks=this._quirks,Z._contentType=this._contentType,Z}},cloneNode:{value:function $(Z){var Y=g0.prototype.cloneNode.call(this,!1);if(Z)for(var X=this.firstChild;X!==null;X=X.nextSibling)Y._appendChild(Y.importNode(X,!0));return Y._updateDocTypeElement(),Y}},isEqual:{value:function $(Z){return!0}},mutateValue:{value:function($){if(this.mutationHandler)this.mutationHandler({type:L8.VALUE,target:$,data:$.data})}},mutateAttr:{value:function($,Z){if(this.mutationHandler)this.mutationHandler({type:L8.ATTR,target:$.ownerElement,attr:$})}},mutateRemoveAttr:{value:function($){if(this.mutationHandler)this.mutationHandler({type:L8.REMOVE_ATTR,target:$.ownerElement,attr:$})}},mutateRemove:{value:function($){if(this.mutationHandler)this.mutationHandler({type:L8.REMOVE,target:$.parentNode,node:$});eX($)}},mutateInsert:{value:function($){if(tX($),this.mutationHandler)this.mutationHandler({type:L8.INSERT,target:$.parentNode,node:$})}},mutateMove:{value:function($){if(this.mutationHandler)this.mutationHandler({type:L8.MOVE,target:$})}},addId:{value:function $(Z,Y){var X=this.byId[Z];if(!X)this.byId[Z]=Y;else{if(!(X instanceof R1))X=new R1(X),this.byId[Z]=X;X.add(Y)}}},delId:{value:function $(Z,Y){var X=this.byId[Z];if(Q0.assert(X),X instanceof R1){if(X.del(Y),X.length===1)this.byId[Z]=X.downgrade()}else this.byId[Z]=void 0}},_resolve:{value:function($){return new sX(this._documentBaseURL).resolve($)}},_documentBaseURL:{get:function(){var $=this._address;if($==="about:blank")$="/";var Z=this.querySelector("base[href]");if(Z)return new sX($).resolve(Z.getAttribute("href"));return $}},_templateDoc:{get:function(){if(!this._templateDocCache){var $=new Y6(this.isHTML,this._address);this._templateDocCache=$._templateDocCache=$}return this._templateDocCache}},querySelector:{value:function($){return nX($,this)[0]}},querySelectorAll:{value:function($){var Z=nX($,this);return Z.item?Z:new RJ(Z)}}});var mJ=["abort","canplay","canplaythrough","change","click","contextmenu","cuechange","dblclick","drag","dragend","dragenter","dragleave","dragover","dragstart","drop","durationchange","emptied","ended","input","invalid","keydown","keypress","keyup","loadeddata","loadedmetadata","loadstart","mousedown","mousemove","mouseout","mouseover","mouseup","mousewheel","pause","play","playing","progress","ratechange","readystatechange","reset","seeked","seeking","select","show","stalled","submit","suspend","timeupdate","volumechange","waiting","blur","error","focus","load","scroll"];mJ.forEach(function($){Object.defineProperty(Y6.prototype,"on"+$,{get:function(){return this._getEventHandler($)},set:function(Z){this._setEventHandler($,Z)}})});function rX($,Z){if($&&$.isHTML){for(var Y=$.firstChild;Y!==null;Y=Y.nextSibling)if(Y.nodeType===g0.ELEMENT_NODE&&Y.localName===Z&&Y.namespaceURI===S8.HTML)return Y}return null}function uJ($){if($._nid=$.ownerDocument._nextnid++,$.ownerDocument._nodes[$._nid]=$,$.nodeType===g0.ELEMENT_NODE){var Z=$.getAttribute("id");if(Z)$.ownerDocument.addId(Z,$);if($._roothook)$._roothook()}}function dJ($){if($.nodeType===g0.ELEMENT_NODE){var Z=$.getAttribute("id");if(Z)$.ownerDocument.delId(Z,$)}$.ownerDocument._nodes[$._nid]=void 0,$._nid=void 0}function tX($){if(uJ($),$.nodeType===g0.ELEMENT_NODE)for(var Z=$.firstChild;Z!==null;Z=Z.nextSibling)tX(Z)}function eX($){dJ($);for(var Z=$.firstChild;Z!==null;Z=Z.nextSibling)eX(Z)}function $z($,Z){if($.ownerDocument=Z,$._lastModTime=void 0,Object.prototype.hasOwnProperty.call($,"_tagName"))$._tagName=void 0;for(var Y=$.firstChild;Y!==null;Y=Y.nextSibling)$z(Y,Z)}function R1($){this.nodes=Object.create(null),this.nodes[$._nid]=$,this.length=1,this.firstNode=void 0}R1.prototype.add=function($){if(!this.nodes[$._nid])this.nodes[$._nid]=$,this.length++,this.firstNode=void 0};R1.prototype.del=function($){if(this.nodes[$._nid])delete this.nodes[$._nid],this.length--,this.firstNode=void 0};R1.prototype.getFirst=function(){if(!this.firstNode){var $;for($ in this.nodes)if(this.firstNode===void 0||this.firstNode.compareDocumentPosition(this.nodes[$])&g0.DOCUMENT_POSITION_PRECEDING)this.firstNode=this.nodes[$]}return this.firstNode};R1.prototype.downgrade=function(){if(this.length===1){var $;for($ in this.nodes)return this.nodes[$]}return this}});var Q9=x((RH,Xz)=>{Xz.exports=z9;var cJ=f0(),Yz=f$(),lJ=s6();function z9($,Z,Y,X){Yz.call(this),this.nodeType=cJ.DOCUMENT_TYPE_NODE,this.ownerDocument=$||null,this.name=Z,this.publicId=Y||"",this.systemId=X||""}z9.prototype=Object.create(Yz.prototype,{nodeName:{get:function(){return this.name}},nodeValue:{get:function(){return null},set:function(){}},clone:{value:function $(){return new z9(this.ownerDocument,this.name,this.publicId,this.systemId)}},isEqual:{value:function $(Z){return this.name===Z.name&&this.publicId===Z.publicId&&this.systemId===Z.systemId}}});Object.defineProperties(z9.prototype,lJ)});var B9=x((NH,Tz)=>{Tz.exports=Y0;var iJ=X9(),sJ=Q9(),WZ=f0(),p=L0().NAMESPACE,Mz=Z9(),V0=Mz.elements,Y8=Function.prototype.apply.bind(Array.prototype.push),G9=-1,U8=1,v0=2,e=3,L1=4,nJ=5,oJ=[],rJ=/^HTML$|^-\/\/W3O\/\/DTD W3 HTML Strict 3\.0\/\/EN\/\/$|^-\/W3C\/DTD HTML 4\.0 Transitional\/EN$|^\+\/\/Silmaril\/\/dtd html Pro v0r11 19970101\/\/|^-\/\/AdvaSoft Ltd\/\/DTD HTML 3\.0 asWedit \+ extensions\/\/|^-\/\/AS\/\/DTD HTML 3\.0 asWedit \+ extensions\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Level 1\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Level 2\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Strict Level 1\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Strict Level 2\/\/|^-\/\/IETF\/\/DTD HTML 2\.0 Strict\/\/|^-\/\/IETF\/\/DTD HTML 2\.0\/\/|^-\/\/IETF\/\/DTD HTML 2\.1E\/\/|^-\/\/IETF\/\/DTD HTML 3\.0\/\/|^-\/\/IETF\/\/DTD HTML 3\.2 Final\/\/|^-\/\/IETF\/\/DTD HTML 3\.2\/\/|^-\/\/IETF\/\/DTD HTML 3\/\/|^-\/\/IETF\/\/DTD HTML Level 0\/\/|^-\/\/IETF\/\/DTD HTML Level 1\/\/|^-\/\/IETF\/\/DTD HTML Level 2\/\/|^-\/\/IETF\/\/DTD HTML Level 3\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 0\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 1\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 2\/\/|^-\/\/IETF\/\/DTD HTML Strict Level 3\/\/|^-\/\/IETF\/\/DTD HTML Strict\/\/|^-\/\/IETF\/\/DTD HTML\/\/|^-\/\/Metrius\/\/DTD Metrius Presentational\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 2\.0 HTML Strict\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 2\.0 HTML\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 2\.0 Tables\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 3\.0 HTML Strict\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 3\.0 HTML\/\/|^-\/\/Microsoft\/\/DTD Internet Explorer 3\.0 Tables\/\/|^-\/\/Netscape Comm\. Corp\.\/\/DTD HTML\/\/|^-\/\/Netscape Comm\. Corp\.\/\/DTD Strict HTML\/\/|^-\/\/O'Reilly and Associates\/\/DTD HTML 2\.0\/\/|^-\/\/O'Reilly and Associates\/\/DTD HTML Extended 1\.0\/\/|^-\/\/O'Reilly and Associates\/\/DTD HTML Extended Relaxed 1\.0\/\/|^-\/\/SoftQuad Software\/\/DTD HoTMetaL PRO 6\.0::19990601::extensions to HTML 4\.0\/\/|^-\/\/SoftQuad\/\/DTD HoTMetaL PRO 4\.0::19971010::extensions to HTML 4\.0\/\/|^-\/\/Spyglass\/\/DTD HTML 2\.0 Extended\/\/|^-\/\/SQ\/\/DTD HTML 2\.0 HoTMetaL \+ extensions\/\/|^-\/\/Sun Microsystems Corp\.\/\/DTD HotJava HTML\/\/|^-\/\/Sun Microsystems Corp\.\/\/DTD HotJava Strict HTML\/\/|^-\/\/W3C\/\/DTD HTML 3 1995-03-24\/\/|^-\/\/W3C\/\/DTD HTML 3\.2 Draft\/\/|^-\/\/W3C\/\/DTD HTML 3\.2 Final\/\/|^-\/\/W3C\/\/DTD HTML 3\.2\/\/|^-\/\/W3C\/\/DTD HTML 3\.2S Draft\/\/|^-\/\/W3C\/\/DTD HTML 4\.0 Frameset\/\/|^-\/\/W3C\/\/DTD HTML 4\.0 Transitional\/\/|^-\/\/W3C\/\/DTD HTML Experimental 19960712\/\/|^-\/\/W3C\/\/DTD HTML Experimental 970421\/\/|^-\/\/W3C\/\/DTD W3 HTML\/\/|^-\/\/W3O\/\/DTD W3 HTML 3\.0\/\/|^-\/\/WebTechs\/\/DTD Mozilla HTML 2\.0\/\/|^-\/\/WebTechs\/\/DTD Mozilla HTML\/\//i,aJ="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",zz=/^-\/\/W3C\/\/DTD HTML 4\.01 Frameset\/\/|^-\/\/W3C\/\/DTD HTML 4\.01 Transitional\/\//i,tJ=/^-\/\/W3C\/\/DTD XHTML 1\.0 Frameset\/\/|^-\/\/W3C\/\/DTD XHTML 1\.0 Transitional\/\//i,z8=Object.create(null);z8[p.HTML]={__proto__:null,address:!0,applet:!0,area:!0,article:!0,aside:!0,base:!0,basefont:!0,bgsound:!0,blockquote:!0,body:!0,br:!0,button:!0,caption:!0,center:!0,col:!0,colgroup:!0,dd:!0,details:!0,dir:!0,div:!0,dl:!0,dt:!0,embed:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,frame:!0,frameset:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,head:!0,header:!0,hgroup:!0,hr:!0,html:!0,iframe:!0,img:!0,input:!0,li:!0,link:!0,listing:!0,main:!0,marquee:!0,menu:!0,meta:!0,nav:!0,noembed:!0,noframes:!0,noscript:!0,object:!0,ol:!0,p:!0,param:!0,plaintext:!0,pre:!0,script:!0,section:!0,select:!0,source:!0,style:!0,summary:!0,table:!0,tbody:!0,td:!0,template:!0,textarea:!0,tfoot:!0,th:!0,thead:!0,title:!0,tr:!0,track:!0,ul:!0,wbr:!0,xmp:!0};z8[p.SVG]={__proto__:null,foreignObject:!0,desc:!0,title:!0};z8[p.MATHML]={__proto__:null,mi:!0,mo:!0,mn:!0,ms:!0,mtext:!0,"annotation-xml":!0};var _Z=Object.create(null);_Z[p.HTML]={__proto__:null,address:!0,div:!0,p:!0};var Dz=Object.create(null);Dz[p.HTML]={__proto__:null,dd:!0,dt:!0};var A8=Object.create(null);A8[p.HTML]={__proto__:null,table:!0,thead:!0,tbody:!0,tfoot:!0,tr:!0};var Lz=Object.create(null);Lz[p.HTML]={__proto__:null,dd:!0,dt:!0,li:!0,menuitem:!0,optgroup:!0,option:!0,p:!0,rb:!0,rp:!0,rt:!0,rtc:!0};var Iz=Object.create(null);Iz[p.HTML]={__proto__:null,caption:!0,colgroup:!0,dd:!0,dt:!0,li:!0,optgroup:!0,option:!0,p:!0,rb:!0,rp:!0,rt:!0,rtc:!0,tbody:!0,td:!0,tfoot:!0,th:!0,thead:!0,tr:!0};var V9=Object.create(null);V9[p.HTML]={__proto__:null,table:!0,template:!0,html:!0};var _9=Object.create(null);_9[p.HTML]={__proto__:null,tbody:!0,tfoot:!0,thead:!0,template:!0,html:!0};var HZ=Object.create(null);HZ[p.HTML]={__proto__:null,tr:!0,template:!0,html:!0};var Sz=Object.create(null);Sz[p.HTML]={__proto__:null,button:!0,fieldset:!0,input:!0,keygen:!0,object:!0,output:!0,select:!0,textarea:!0,img:!0};var I1=Object.create(null);I1[p.HTML]={__proto__:null,applet:!0,caption:!0,html:!0,table:!0,td:!0,th:!0,marquee:!0,object:!0,template:!0};I1[p.MATHML]={__proto__:null,mi:!0,mo:!0,mn:!0,ms:!0,mtext:!0,"annotation-xml":!0};I1[p.SVG]={__proto__:null,foreignObject:!0,desc:!0,title:!0};var H9=Object.create(I1);H9[p.HTML]=Object.create(I1[p.HTML]);H9[p.HTML].ol=!0;H9[p.HTML].ul=!0;var BZ=Object.create(I1);BZ[p.HTML]=Object.create(I1[p.HTML]);BZ[p.HTML].button=!0;var Uz=Object.create(null);Uz[p.HTML]={__proto__:null,html:!0,table:!0,template:!0};var eJ=Object.create(null);eJ[p.HTML]={__proto__:null,optgroup:!0,option:!0};var Az=Object.create(null);Az[p.MATHML]={__proto__:null,mi:!0,mo:!0,mn:!0,ms:!0,mtext:!0};var Pz=Object.create(null);Pz[p.SVG]={__proto__:null,foreignObject:!0,desc:!0,title:!0};var Qz={__proto__:null,"xlink:actuate":p.XLINK,"xlink:arcrole":p.XLINK,"xlink:href":p.XLINK,"xlink:role":p.XLINK,"xlink:show":p.XLINK,"xlink:title":p.XLINK,"xlink:type":p.XLINK,"xml:base":p.XML,"xml:lang":p.XML,"xml:space":p.XML,xmlns:p.XMLNS,"xmlns:xlink":p.XMLNS},Gz={__proto__:null,attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},Wz={__proto__:null,altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},Jz={__proto__:null,0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},$V={__proto__:null,AElig:198,"AElig;":198,AMP:38,"AMP;":38,Aacute:193,"Aacute;":193,"Abreve;":258,Acirc:194,"Acirc;":194,"Acy;":1040,"Afr;":[55349,56580],Agrave:192,"Agrave;":192,"Alpha;":913,"Amacr;":256,"And;":10835,"Aogon;":260,"Aopf;":[55349,56632],"ApplyFunction;":8289,Aring:197,"Aring;":197,"Ascr;":[55349,56476],"Assign;":8788,Atilde:195,"Atilde;":195,Auml:196,"Auml;":196,"Backslash;":8726,"Barv;":10983,"Barwed;":8966,"Bcy;":1041,"Because;":8757,"Bernoullis;":8492,"Beta;":914,"Bfr;":[55349,56581],"Bopf;":[55349,56633],"Breve;":728,"Bscr;":8492,"Bumpeq;":8782,"CHcy;":1063,COPY:169,"COPY;":169,"Cacute;":262,"Cap;":8914,"CapitalDifferentialD;":8517,"Cayleys;":8493,"Ccaron;":268,Ccedil:199,"Ccedil;":199,"Ccirc;":264,"Cconint;":8752,"Cdot;":266,"Cedilla;":184,"CenterDot;":183,"Cfr;":8493,"Chi;":935,"CircleDot;":8857,"CircleMinus;":8854,"CirclePlus;":8853,"CircleTimes;":8855,"ClockwiseContourIntegral;":8754,"CloseCurlyDoubleQuote;":8221,"CloseCurlyQuote;":8217,"Colon;":8759,"Colone;":10868,"Congruent;":8801,"Conint;":8751,"ContourIntegral;":8750,"Copf;":8450,"Coproduct;":8720,"CounterClockwiseContourIntegral;":8755,"Cross;":10799,"Cscr;":[55349,56478],"Cup;":8915,"CupCap;":8781,"DD;":8517,"DDotrahd;":10513,"DJcy;":1026,"DScy;":1029,"DZcy;":1039,"Dagger;":8225,"Darr;":8609,"Dashv;":10980,"Dcaron;":270,"Dcy;":1044,"Del;":8711,"Delta;":916,"Dfr;":[55349,56583],"DiacriticalAcute;":180,"DiacriticalDot;":729,"DiacriticalDoubleAcute;":733,"DiacriticalGrave;":96,"DiacriticalTilde;":732,"Diamond;":8900,"DifferentialD;":8518,"Dopf;":[55349,56635],"Dot;":168,"DotDot;":8412,"DotEqual;":8784,"DoubleContourIntegral;":8751,"DoubleDot;":168,"DoubleDownArrow;":8659,"DoubleLeftArrow;":8656,"DoubleLeftRightArrow;":8660,"DoubleLeftTee;":10980,"DoubleLongLeftArrow;":10232,"DoubleLongLeftRightArrow;":10234,"DoubleLongRightArrow;":10233,"DoubleRightArrow;":8658,"DoubleRightTee;":8872,"DoubleUpArrow;":8657,"DoubleUpDownArrow;":8661,"DoubleVerticalBar;":8741,"DownArrow;":8595,"DownArrowBar;":10515,"DownArrowUpArrow;":8693,"DownBreve;":785,"DownLeftRightVector;":10576,"DownLeftTeeVector;":10590,"DownLeftVector;":8637,"DownLeftVectorBar;":10582,"DownRightTeeVector;":10591,"DownRightVector;":8641,"DownRightVectorBar;":10583,"DownTee;":8868,"DownTeeArrow;":8615,"Downarrow;":8659,"Dscr;":[55349,56479],"Dstrok;":272,"ENG;":330,ETH:208,"ETH;":208,Eacute:201,"Eacute;":201,"Ecaron;":282,Ecirc:202,"Ecirc;":202,"Ecy;":1069,"Edot;":278,"Efr;":[55349,56584],Egrave:200,"Egrave;":200,"Element;":8712,"Emacr;":274,"EmptySmallSquare;":9723,"EmptyVerySmallSquare;":9643,"Eogon;":280,"Eopf;":[55349,56636],"Epsilon;":917,"Equal;":10869,"EqualTilde;":8770,"Equilibrium;":8652,"Escr;":8496,"Esim;":10867,"Eta;":919,Euml:203,"Euml;":203,"Exists;":8707,"ExponentialE;":8519,"Fcy;":1060,"Ffr;":[55349,56585],"FilledSmallSquare;":9724,"FilledVerySmallSquare;":9642,"Fopf;":[55349,56637],"ForAll;":8704,"Fouriertrf;":8497,"Fscr;":8497,"GJcy;":1027,GT:62,"GT;":62,"Gamma;":915,"Gammad;":988,"Gbreve;":286,"Gcedil;":290,"Gcirc;":284,"Gcy;":1043,"Gdot;":288,"Gfr;":[55349,56586],"Gg;":8921,"Gopf;":[55349,56638],"GreaterEqual;":8805,"GreaterEqualLess;":8923,"GreaterFullEqual;":8807,"GreaterGreater;":10914,"GreaterLess;":8823,"GreaterSlantEqual;":10878,"GreaterTilde;":8819,"Gscr;":[55349,56482],"Gt;":8811,"HARDcy;":1066,"Hacek;":711,"Hat;":94,"Hcirc;":292,"Hfr;":8460,"HilbertSpace;":8459,"Hopf;":8461,"HorizontalLine;":9472,"Hscr;":8459,"Hstrok;":294,"HumpDownHump;":8782,"HumpEqual;":8783,"IEcy;":1045,"IJlig;":306,"IOcy;":1025,Iacute:205,"Iacute;":205,Icirc:206,"Icirc;":206,"Icy;":1048,"Idot;":304,"Ifr;":8465,Igrave:204,"Igrave;":204,"Im;":8465,"Imacr;":298,"ImaginaryI;":8520,"Implies;":8658,"Int;":8748,"Integral;":8747,"Intersection;":8898,"InvisibleComma;":8291,"InvisibleTimes;":8290,"Iogon;":302,"Iopf;":[55349,56640],"Iota;":921,"Iscr;":8464,"Itilde;":296,"Iukcy;":1030,Iuml:207,"Iuml;":207,"Jcirc;":308,"Jcy;":1049,"Jfr;":[55349,56589],"Jopf;":[55349,56641],"Jscr;":[55349,56485],"Jsercy;":1032,"Jukcy;":1028,"KHcy;":1061,"KJcy;":1036,"Kappa;":922,"Kcedil;":310,"Kcy;":1050,"Kfr;":[55349,56590],"Kopf;":[55349,56642],"Kscr;":[55349,56486],"LJcy;":1033,LT:60,"LT;":60,"Lacute;":313,"Lambda;":923,"Lang;":10218,"Laplacetrf;":8466,"Larr;":8606,"Lcaron;":317,"Lcedil;":315,"Lcy;":1051,"LeftAngleBracket;":10216,"LeftArrow;":8592,"LeftArrowBar;":8676,"LeftArrowRightArrow;":8646,"LeftCeiling;":8968,"LeftDoubleBracket;":10214,"LeftDownTeeVector;":10593,"LeftDownVector;":8643,"LeftDownVectorBar;":10585,"LeftFloor;":8970,"LeftRightArrow;":8596,"LeftRightVector;":10574,"LeftTee;":8867,"LeftTeeArrow;":8612,"LeftTeeVector;":10586,"LeftTriangle;":8882,"LeftTriangleBar;":10703,"LeftTriangleEqual;":8884,"LeftUpDownVector;":10577,"LeftUpTeeVector;":10592,"LeftUpVector;":8639,"LeftUpVectorBar;":10584,"LeftVector;":8636,"LeftVectorBar;":10578,"Leftarrow;":8656,"Leftrightarrow;":8660,"LessEqualGreater;":8922,"LessFullEqual;":8806,"LessGreater;":8822,"LessLess;":10913,"LessSlantEqual;":10877,"LessTilde;":8818,"Lfr;":[55349,56591],"Ll;":8920,"Lleftarrow;":8666,"Lmidot;":319,"LongLeftArrow;":10229,"LongLeftRightArrow;":10231,"LongRightArrow;":10230,"Longleftarrow;":10232,"Longleftrightarrow;":10234,"Longrightarrow;":10233,"Lopf;":[55349,56643],"LowerLeftArrow;":8601,"LowerRightArrow;":8600,"Lscr;":8466,"Lsh;":8624,"Lstrok;":321,"Lt;":8810,"Map;":10501,"Mcy;":1052,"MediumSpace;":8287,"Mellintrf;":8499,"Mfr;":[55349,56592],"MinusPlus;":8723,"Mopf;":[55349,56644],"Mscr;":8499,"Mu;":924,"NJcy;":1034,"Nacute;":323,"Ncaron;":327,"Ncedil;":325,"Ncy;":1053,"NegativeMediumSpace;":8203,"NegativeThickSpace;":8203,"NegativeThinSpace;":8203,"NegativeVeryThinSpace;":8203,"NestedGreaterGreater;":8811,"NestedLessLess;":8810,"NewLine;":10,"Nfr;":[55349,56593],"NoBreak;":8288,"NonBreakingSpace;":160,"Nopf;":8469,"Not;":10988,"NotCongruent;":8802,"NotCupCap;":8813,"NotDoubleVerticalBar;":8742,"NotElement;":8713,"NotEqual;":8800,"NotEqualTilde;":[8770,824],"NotExists;":8708,"NotGreater;":8815,"NotGreaterEqual;":8817,"NotGreaterFullEqual;":[8807,824],"NotGreaterGreater;":[8811,824],"NotGreaterLess;":8825,"NotGreaterSlantEqual;":[10878,824],"NotGreaterTilde;":8821,"NotHumpDownHump;":[8782,824],"NotHumpEqual;":[8783,824],"NotLeftTriangle;":8938,"NotLeftTriangleBar;":[10703,824],"NotLeftTriangleEqual;":8940,"NotLess;":8814,"NotLessEqual;":8816,"NotLessGreater;":8824,"NotLessLess;":[8810,824],"NotLessSlantEqual;":[10877,824],"NotLessTilde;":8820,"NotNestedGreaterGreater;":[10914,824],"NotNestedLessLess;":[10913,824],"NotPrecedes;":8832,"NotPrecedesEqual;":[10927,824],"NotPrecedesSlantEqual;":8928,"NotReverseElement;":8716,"NotRightTriangle;":8939,"NotRightTriangleBar;":[10704,824],"NotRightTriangleEqual;":8941,"NotSquareSubset;":[8847,824],"NotSquareSubsetEqual;":8930,"NotSquareSuperset;":[8848,824],"NotSquareSupersetEqual;":8931,"NotSubset;":[8834,8402],"NotSubsetEqual;":8840,"NotSucceeds;":8833,"NotSucceedsEqual;":[10928,824],"NotSucceedsSlantEqual;":8929,"NotSucceedsTilde;":[8831,824],"NotSuperset;":[8835,8402],"NotSupersetEqual;":8841,"NotTilde;":8769,"NotTildeEqual;":8772,"NotTildeFullEqual;":8775,"NotTildeTilde;":8777,"NotVerticalBar;":8740,"Nscr;":[55349,56489],Ntilde:209,"Ntilde;":209,"Nu;":925,"OElig;":338,Oacute:211,"Oacute;":211,Ocirc:212,"Ocirc;":212,"Ocy;":1054,"Odblac;":336,"Ofr;":[55349,56594],Ograve:210,"Ograve;":210,"Omacr;":332,"Omega;":937,"Omicron;":927,"Oopf;":[55349,56646],"OpenCurlyDoubleQuote;":8220,"OpenCurlyQuote;":8216,"Or;":10836,"Oscr;":[55349,56490],Oslash:216,"Oslash;":216,Otilde:213,"Otilde;":213,"Otimes;":10807,Ouml:214,"Ouml;":214,"OverBar;":8254,"OverBrace;":9182,"OverBracket;":9140,"OverParenthesis;":9180,"PartialD;":8706,"Pcy;":1055,"Pfr;":[55349,56595],"Phi;":934,"Pi;":928,"PlusMinus;":177,"Poincareplane;":8460,"Popf;":8473,"Pr;":10939,"Precedes;":8826,"PrecedesEqual;":10927,"PrecedesSlantEqual;":8828,"PrecedesTilde;":8830,"Prime;":8243,"Product;":8719,"Proportion;":8759,"Proportional;":8733,"Pscr;":[55349,56491],"Psi;":936,QUOT:34,"QUOT;":34,"Qfr;":[55349,56596],"Qopf;":8474,"Qscr;":[55349,56492],"RBarr;":10512,REG:174,"REG;":174,"Racute;":340,"Rang;":10219,"Rarr;":8608,"Rarrtl;":10518,"Rcaron;":344,"Rcedil;":342,"Rcy;":1056,"Re;":8476,"ReverseElement;":8715,"ReverseEquilibrium;":8651,"ReverseUpEquilibrium;":10607,"Rfr;":8476,"Rho;":929,"RightAngleBracket;":10217,"RightArrow;":8594,"RightArrowBar;":8677,"RightArrowLeftArrow;":8644,"RightCeiling;":8969,"RightDoubleBracket;":10215,"RightDownTeeVector;":10589,"RightDownVector;":8642,"RightDownVectorBar;":10581,"RightFloor;":8971,"RightTee;":8866,"RightTeeArrow;":8614,"RightTeeVector;":10587,"RightTriangle;":8883,"RightTriangleBar;":10704,"RightTriangleEqual;":8885,"RightUpDownVector;":10575,"RightUpTeeVector;":10588,"RightUpVector;":8638,"RightUpVectorBar;":10580,"RightVector;":8640,"RightVectorBar;":10579,"Rightarrow;":8658,"Ropf;":8477,"RoundImplies;":10608,"Rrightarrow;":8667,"Rscr;":8475,"Rsh;":8625,"RuleDelayed;":10740,"SHCHcy;":1065,"SHcy;":1064,"SOFTcy;":1068,"Sacute;":346,"Sc;":10940,"Scaron;":352,"Scedil;":350,"Scirc;":348,"Scy;":1057,"Sfr;":[55349,56598],"ShortDownArrow;":8595,"ShortLeftArrow;":8592,"ShortRightArrow;":8594,"ShortUpArrow;":8593,"Sigma;":931,"SmallCircle;":8728,"Sopf;":[55349,56650],"Sqrt;":8730,"Square;":9633,"SquareIntersection;":8851,"SquareSubset;":8847,"SquareSubsetEqual;":8849,"SquareSuperset;":8848,"SquareSupersetEqual;":8850,"SquareUnion;":8852,"Sscr;":[55349,56494],"Star;":8902,"Sub;":8912,"Subset;":8912,"SubsetEqual;":8838,"Succeeds;":8827,"SucceedsEqual;":10928,"SucceedsSlantEqual;":8829,"SucceedsTilde;":8831,"SuchThat;":8715,"Sum;":8721,"Sup;":8913,"Superset;":8835,"SupersetEqual;":8839,"Supset;":8913,THORN:222,"THORN;":222,"TRADE;":8482,"TSHcy;":1035,"TScy;":1062,"Tab;":9,"Tau;":932,"Tcaron;":356,"Tcedil;":354,"Tcy;":1058,"Tfr;":[55349,56599],"Therefore;":8756,"Theta;":920,"ThickSpace;":[8287,8202],"ThinSpace;":8201,"Tilde;":8764,"TildeEqual;":8771,"TildeFullEqual;":8773,"TildeTilde;":8776,"Topf;":[55349,56651],"TripleDot;":8411,"Tscr;":[55349,56495],"Tstrok;":358,Uacute:218,"Uacute;":218,"Uarr;":8607,"Uarrocir;":10569,"Ubrcy;":1038,"Ubreve;":364,Ucirc:219,"Ucirc;":219,"Ucy;":1059,"Udblac;":368,"Ufr;":[55349,56600],Ugrave:217,"Ugrave;":217,"Umacr;":362,"UnderBar;":95,"UnderBrace;":9183,"UnderBracket;":9141,"UnderParenthesis;":9181,"Union;":8899,"UnionPlus;":8846,"Uogon;":370,"Uopf;":[55349,56652],"UpArrow;":8593,"UpArrowBar;":10514,"UpArrowDownArrow;":8645,"UpDownArrow;":8597,"UpEquilibrium;":10606,"UpTee;":8869,"UpTeeArrow;":8613,"Uparrow;":8657,"Updownarrow;":8661,"UpperLeftArrow;":8598,"UpperRightArrow;":8599,"Upsi;":978,"Upsilon;":933,"Uring;":366,"Uscr;":[55349,56496],"Utilde;":360,Uuml:220,"Uuml;":220,"VDash;":8875,"Vbar;":10987,"Vcy;":1042,"Vdash;":8873,"Vdashl;":10982,"Vee;":8897,"Verbar;":8214,"Vert;":8214,"VerticalBar;":8739,"VerticalLine;":124,"VerticalSeparator;":10072,"VerticalTilde;":8768,"VeryThinSpace;":8202,"Vfr;":[55349,56601],"Vopf;":[55349,56653],"Vscr;":[55349,56497],"Vvdash;":8874,"Wcirc;":372,"Wedge;":8896,"Wfr;":[55349,56602],"Wopf;":[55349,56654],"Wscr;":[55349,56498],"Xfr;":[55349,56603],"Xi;":926,"Xopf;":[55349,56655],"Xscr;":[55349,56499],"YAcy;":1071,"YIcy;":1031,"YUcy;":1070,Yacute:221,"Yacute;":221,"Ycirc;":374,"Ycy;":1067,"Yfr;":[55349,56604],"Yopf;":[55349,56656],"Yscr;":[55349,56500],"Yuml;":376,"ZHcy;":1046,"Zacute;":377,"Zcaron;":381,"Zcy;":1047,"Zdot;":379,"ZeroWidthSpace;":8203,"Zeta;":918,"Zfr;":8488,"Zopf;":8484,"Zscr;":[55349,56501],aacute:225,"aacute;":225,"abreve;":259,"ac;":8766,"acE;":[8766,819],"acd;":8767,acirc:226,"acirc;":226,acute:180,"acute;":180,"acy;":1072,aelig:230,"aelig;":230,"af;":8289,"afr;":[55349,56606],agrave:224,"agrave;":224,"alefsym;":8501,"aleph;":8501,"alpha;":945,"amacr;":257,"amalg;":10815,amp:38,"amp;":38,"and;":8743,"andand;":10837,"andd;":10844,"andslope;":10840,"andv;":10842,"ang;":8736,"ange;":10660,"angle;":8736,"angmsd;":8737,"angmsdaa;":10664,"angmsdab;":10665,"angmsdac;":10666,"angmsdad;":10667,"angmsdae;":10668,"angmsdaf;":10669,"angmsdag;":10670,"angmsdah;":10671,"angrt;":8735,"angrtvb;":8894,"angrtvbd;":10653,"angsph;":8738,"angst;":197,"angzarr;":9084,"aogon;":261,"aopf;":[55349,56658],"ap;":8776,"apE;":10864,"apacir;":10863,"ape;":8778,"apid;":8779,"apos;":39,"approx;":8776,"approxeq;":8778,aring:229,"aring;":229,"ascr;":[55349,56502],"ast;":42,"asymp;":8776,"asympeq;":8781,atilde:227,"atilde;":227,auml:228,"auml;":228,"awconint;":8755,"awint;":10769,"bNot;":10989,"backcong;":8780,"backepsilon;":1014,"backprime;":8245,"backsim;":8765,"backsimeq;":8909,"barvee;":8893,"barwed;":8965,"barwedge;":8965,"bbrk;":9141,"bbrktbrk;":9142,"bcong;":8780,"bcy;":1073,"bdquo;":8222,"becaus;":8757,"because;":8757,"bemptyv;":10672,"bepsi;":1014,"bernou;":8492,"beta;":946,"beth;":8502,"between;":8812,"bfr;":[55349,56607],"bigcap;":8898,"bigcirc;":9711,"bigcup;":8899,"bigodot;":10752,"bigoplus;":10753,"bigotimes;":10754,"bigsqcup;":10758,"bigstar;":9733,"bigtriangledown;":9661,"bigtriangleup;":9651,"biguplus;":10756,"bigvee;":8897,"bigwedge;":8896,"bkarow;":10509,"blacklozenge;":10731,"blacksquare;":9642,"blacktriangle;":9652,"blacktriangledown;":9662,"blacktriangleleft;":9666,"blacktriangleright;":9656,"blank;":9251,"blk12;":9618,"blk14;":9617,"blk34;":9619,"block;":9608,"bne;":[61,8421],"bnequiv;":[8801,8421],"bnot;":8976,"bopf;":[55349,56659],"bot;":8869,"bottom;":8869,"bowtie;":8904,"boxDL;":9559,"boxDR;":9556,"boxDl;":9558,"boxDr;":9555,"boxH;":9552,"boxHD;":9574,"boxHU;":9577,"boxHd;":9572,"boxHu;":9575,"boxUL;":9565,"boxUR;":9562,"boxUl;":9564,"boxUr;":9561,"boxV;":9553,"boxVH;":9580,"boxVL;":9571,"boxVR;":9568,"boxVh;":9579,"boxVl;":9570,"boxVr;":9567,"boxbox;":10697,"boxdL;":9557,"boxdR;":9554,"boxdl;":9488,"boxdr;":9484,"boxh;":9472,"boxhD;":9573,"boxhU;":9576,"boxhd;":9516,"boxhu;":9524,"boxminus;":8863,"boxplus;":8862,"boxtimes;":8864,"boxuL;":9563,"boxuR;":9560,"boxul;":9496,"boxur;":9492,"boxv;":9474,"boxvH;":9578,"boxvL;":9569,"boxvR;":9566,"boxvh;":9532,"boxvl;":9508,"boxvr;":9500,"bprime;":8245,"breve;":728,brvbar:166,"brvbar;":166,"bscr;":[55349,56503],"bsemi;":8271,"bsim;":8765,"bsime;":8909,"bsol;":92,"bsolb;":10693,"bsolhsub;":10184,"bull;":8226,"bullet;":8226,"bump;":8782,"bumpE;":10926,"bumpe;":8783,"bumpeq;":8783,"cacute;":263,"cap;":8745,"capand;":10820,"capbrcup;":10825,"capcap;":10827,"capcup;":10823,"capdot;":10816,"caps;":[8745,65024],"caret;":8257,"caron;":711,"ccaps;":10829,"ccaron;":269,ccedil:231,"ccedil;":231,"ccirc;":265,"ccups;":10828,"ccupssm;":10832,"cdot;":267,cedil:184,"cedil;":184,"cemptyv;":10674,cent:162,"cent;":162,"centerdot;":183,"cfr;":[55349,56608],"chcy;":1095,"check;":10003,"checkmark;":10003,"chi;":967,"cir;":9675,"cirE;":10691,"circ;":710,"circeq;":8791,"circlearrowleft;":8634,"circlearrowright;":8635,"circledR;":174,"circledS;":9416,"circledast;":8859,"circledcirc;":8858,"circleddash;":8861,"cire;":8791,"cirfnint;":10768,"cirmid;":10991,"cirscir;":10690,"clubs;":9827,"clubsuit;":9827,"colon;":58,"colone;":8788,"coloneq;":8788,"comma;":44,"commat;":64,"comp;":8705,"compfn;":8728,"complement;":8705,"complexes;":8450,"cong;":8773,"congdot;":10861,"conint;":8750,"copf;":[55349,56660],"coprod;":8720,copy:169,"copy;":169,"copysr;":8471,"crarr;":8629,"cross;":10007,"cscr;":[55349,56504],"csub;":10959,"csube;":10961,"csup;":10960,"csupe;":10962,"ctdot;":8943,"cudarrl;":10552,"cudarrr;":10549,"cuepr;":8926,"cuesc;":8927,"cularr;":8630,"cularrp;":10557,"cup;":8746,"cupbrcap;":10824,"cupcap;":10822,"cupcup;":10826,"cupdot;":8845,"cupor;":10821,"cups;":[8746,65024],"curarr;":8631,"curarrm;":10556,"curlyeqprec;":8926,"curlyeqsucc;":8927,"curlyvee;":8910,"curlywedge;":8911,curren:164,"curren;":164,"curvearrowleft;":8630,"curvearrowright;":8631,"cuvee;":8910,"cuwed;":8911,"cwconint;":8754,"cwint;":8753,"cylcty;":9005,"dArr;":8659,"dHar;":10597,"dagger;":8224,"daleth;":8504,"darr;":8595,"dash;":8208,"dashv;":8867,"dbkarow;":10511,"dblac;":733,"dcaron;":271,"dcy;":1076,"dd;":8518,"ddagger;":8225,"ddarr;":8650,"ddotseq;":10871,deg:176,"deg;":176,"delta;":948,"demptyv;":10673,"dfisht;":10623,"dfr;":[55349,56609],"dharl;":8643,"dharr;":8642,"diam;":8900,"diamond;":8900,"diamondsuit;":9830,"diams;":9830,"die;":168,"digamma;":989,"disin;":8946,"div;":247,divide:247,"divide;":247,"divideontimes;":8903,"divonx;":8903,"djcy;":1106,"dlcorn;":8990,"dlcrop;":8973,"dollar;":36,"dopf;":[55349,56661],"dot;":729,"doteq;":8784,"doteqdot;":8785,"dotminus;":8760,"dotplus;":8724,"dotsquare;":8865,"doublebarwedge;":8966,"downarrow;":8595,"downdownarrows;":8650,"downharpoonleft;":8643,"downharpoonright;":8642,"drbkarow;":10512,"drcorn;":8991,"drcrop;":8972,"dscr;":[55349,56505],"dscy;":1109,"dsol;":10742,"dstrok;":273,"dtdot;":8945,"dtri;":9663,"dtrif;":9662,"duarr;":8693,"duhar;":10607,"dwangle;":10662,"dzcy;":1119,"dzigrarr;":10239,"eDDot;":10871,"eDot;":8785,eacute:233,"eacute;":233,"easter;":10862,"ecaron;":283,"ecir;":8790,ecirc:234,"ecirc;":234,"ecolon;":8789,"ecy;":1101,"edot;":279,"ee;":8519,"efDot;":8786,"efr;":[55349,56610],"eg;":10906,egrave:232,"egrave;":232,"egs;":10902,"egsdot;":10904,"el;":10905,"elinters;":9191,"ell;":8467,"els;":10901,"elsdot;":10903,"emacr;":275,"empty;":8709,"emptyset;":8709,"emptyv;":8709,"emsp13;":8196,"emsp14;":8197,"emsp;":8195,"eng;":331,"ensp;":8194,"eogon;":281,"eopf;":[55349,56662],"epar;":8917,"eparsl;":10723,"eplus;":10865,"epsi;":949,"epsilon;":949,"epsiv;":1013,"eqcirc;":8790,"eqcolon;":8789,"eqsim;":8770,"eqslantgtr;":10902,"eqslantless;":10901,"equals;":61,"equest;":8799,"equiv;":8801,"equivDD;":10872,"eqvparsl;":10725,"erDot;":8787,"erarr;":10609,"escr;":8495,"esdot;":8784,"esim;":8770,"eta;":951,eth:240,"eth;":240,euml:235,"euml;":235,"euro;":8364,"excl;":33,"exist;":8707,"expectation;":8496,"exponentiale;":8519,"fallingdotseq;":8786,"fcy;":1092,"female;":9792,"ffilig;":64259,"fflig;":64256,"ffllig;":64260,"ffr;":[55349,56611],"filig;":64257,"fjlig;":[102,106],"flat;":9837,"fllig;":64258,"fltns;":9649,"fnof;":402,"fopf;":[55349,56663],"forall;":8704,"fork;":8916,"forkv;":10969,"fpartint;":10765,frac12:189,"frac12;":189,"frac13;":8531,frac14:188,"frac14;":188,"frac15;":8533,"frac16;":8537,"frac18;":8539,"frac23;":8532,"frac25;":8534,frac34:190,"frac34;":190,"frac35;":8535,"frac38;":8540,"frac45;":8536,"frac56;":8538,"frac58;":8541,"frac78;":8542,"frasl;":8260,"frown;":8994,"fscr;":[55349,56507],"gE;":8807,"gEl;":10892,"gacute;":501,"gamma;":947,"gammad;":989,"gap;":10886,"gbreve;":287,"gcirc;":285,"gcy;":1075,"gdot;":289,"ge;":8805,"gel;":8923,"geq;":8805,"geqq;":8807,"geqslant;":10878,"ges;":10878,"gescc;":10921,"gesdot;":10880,"gesdoto;":10882,"gesdotol;":10884,"gesl;":[8923,65024],"gesles;":10900,"gfr;":[55349,56612],"gg;":8811,"ggg;":8921,"gimel;":8503,"gjcy;":1107,"gl;":8823,"glE;":10898,"gla;":10917,"glj;":10916,"gnE;":8809,"gnap;":10890,"gnapprox;":10890,"gne;":10888,"gneq;":10888,"gneqq;":8809,"gnsim;":8935,"gopf;":[55349,56664],"grave;":96,"gscr;":8458,"gsim;":8819,"gsime;":10894,"gsiml;":10896,gt:62,"gt;":62,"gtcc;":10919,"gtcir;":10874,"gtdot;":8919,"gtlPar;":10645,"gtquest;":10876,"gtrapprox;":10886,"gtrarr;":10616,"gtrdot;":8919,"gtreqless;":8923,"gtreqqless;":10892,"gtrless;":8823,"gtrsim;":8819,"gvertneqq;":[8809,65024],"gvnE;":[8809,65024],"hArr;":8660,"hairsp;":8202,"half;":189,"hamilt;":8459,"hardcy;":1098,"harr;":8596,"harrcir;":10568,"harrw;":8621,"hbar;":8463,"hcirc;":293,"hearts;":9829,"heartsuit;":9829,"hellip;":8230,"hercon;":8889,"hfr;":[55349,56613],"hksearow;":10533,"hkswarow;":10534,"hoarr;":8703,"homtht;":8763,"hookleftarrow;":8617,"hookrightarrow;":8618,"hopf;":[55349,56665],"horbar;":8213,"hscr;":[55349,56509],"hslash;":8463,"hstrok;":295,"hybull;":8259,"hyphen;":8208,iacute:237,"iacute;":237,"ic;":8291,icirc:238,"icirc;":238,"icy;":1080,"iecy;":1077,iexcl:161,"iexcl;":161,"iff;":8660,"ifr;":[55349,56614],igrave:236,"igrave;":236,"ii;":8520,"iiiint;":10764,"iiint;":8749,"iinfin;":10716,"iiota;":8489,"ijlig;":307,"imacr;":299,"image;":8465,"imagline;":8464,"imagpart;":8465,"imath;":305,"imof;":8887,"imped;":437,"in;":8712,"incare;":8453,"infin;":8734,"infintie;":10717,"inodot;":305,"int;":8747,"intcal;":8890,"integers;":8484,"intercal;":8890,"intlarhk;":10775,"intprod;":10812,"iocy;":1105,"iogon;":303,"iopf;":[55349,56666],"iota;":953,"iprod;":10812,iquest:191,"iquest;":191,"iscr;":[55349,56510],"isin;":8712,"isinE;":8953,"isindot;":8949,"isins;":8948,"isinsv;":8947,"isinv;":8712,"it;":8290,"itilde;":297,"iukcy;":1110,iuml:239,"iuml;":239,"jcirc;":309,"jcy;":1081,"jfr;":[55349,56615],"jmath;":567,"jopf;":[55349,56667],"jscr;":[55349,56511],"jsercy;":1112,"jukcy;":1108,"kappa;":954,"kappav;":1008,"kcedil;":311,"kcy;":1082,"kfr;":[55349,56616],"kgreen;":312,"khcy;":1093,"kjcy;":1116,"kopf;":[55349,56668],"kscr;":[55349,56512],"lAarr;":8666,"lArr;":8656,"lAtail;":10523,"lBarr;":10510,"lE;":8806,"lEg;":10891,"lHar;":10594,"lacute;":314,"laemptyv;":10676,"lagran;":8466,"lambda;":955,"lang;":10216,"langd;":10641,"langle;":10216,"lap;":10885,laquo:171,"laquo;":171,"larr;":8592,"larrb;":8676,"larrbfs;":10527,"larrfs;":10525,"larrhk;":8617,"larrlp;":8619,"larrpl;":10553,"larrsim;":10611,"larrtl;":8610,"lat;":10923,"latail;":10521,"late;":10925,"lates;":[10925,65024],"lbarr;":10508,"lbbrk;":10098,"lbrace;":123,"lbrack;":91,"lbrke;":10635,"lbrksld;":10639,"lbrkslu;":10637,"lcaron;":318,"lcedil;":316,"lceil;":8968,"lcub;":123,"lcy;":1083,"ldca;":10550,"ldquo;":8220,"ldquor;":8222,"ldrdhar;":10599,"ldrushar;":10571,"ldsh;":8626,"le;":8804,"leftarrow;":8592,"leftarrowtail;":8610,"leftharpoondown;":8637,"leftharpoonup;":8636,"leftleftarrows;":8647,"leftrightarrow;":8596,"leftrightarrows;":8646,"leftrightharpoons;":8651,"leftrightsquigarrow;":8621,"leftthreetimes;":8907,"leg;":8922,"leq;":8804,"leqq;":8806,"leqslant;":10877,"les;":10877,"lescc;":10920,"lesdot;":10879,"lesdoto;":10881,"lesdotor;":10883,"lesg;":[8922,65024],"lesges;":10899,"lessapprox;":10885,"lessdot;":8918,"lesseqgtr;":8922,"lesseqqgtr;":10891,"lessgtr;":8822,"lesssim;":8818,"lfisht;":10620,"lfloor;":8970,"lfr;":[55349,56617],"lg;":8822,"lgE;":10897,"lhard;":8637,"lharu;":8636,"lharul;":10602,"lhblk;":9604,"ljcy;":1113,"ll;":8810,"llarr;":8647,"llcorner;":8990,"llhard;":10603,"lltri;":9722,"lmidot;":320,"lmoust;":9136,"lmoustache;":9136,"lnE;":8808,"lnap;":10889,"lnapprox;":10889,"lne;":10887,"lneq;":10887,"lneqq;":8808,"lnsim;":8934,"loang;":10220,"loarr;":8701,"lobrk;":10214,"longleftarrow;":10229,"longleftrightarrow;":10231,"longmapsto;":10236,"longrightarrow;":10230,"looparrowleft;":8619,"looparrowright;":8620,"lopar;":10629,"lopf;":[55349,56669],"loplus;":10797,"lotimes;":10804,"lowast;":8727,"lowbar;":95,"loz;":9674,"lozenge;":9674,"lozf;":10731,"lpar;":40,"lparlt;":10643,"lrarr;":8646,"lrcorner;":8991,"lrhar;":8651,"lrhard;":10605,"lrm;":8206,"lrtri;":8895,"lsaquo;":8249,"lscr;":[55349,56513],"lsh;":8624,"lsim;":8818,"lsime;":10893,"lsimg;":10895,"lsqb;":91,"lsquo;":8216,"lsquor;":8218,"lstrok;":322,lt:60,"lt;":60,"ltcc;":10918,"ltcir;":10873,"ltdot;":8918,"lthree;":8907,"ltimes;":8905,"ltlarr;":10614,"ltquest;":10875,"ltrPar;":10646,"ltri;":9667,"ltrie;":8884,"ltrif;":9666,"lurdshar;":10570,"luruhar;":10598,"lvertneqq;":[8808,65024],"lvnE;":[8808,65024],"mDDot;":8762,macr:175,"macr;":175,"male;":9794,"malt;":10016,"maltese;":10016,"map;":8614,"mapsto;":8614,"mapstodown;":8615,"mapstoleft;":8612,"mapstoup;":8613,"marker;":9646,"mcomma;":10793,"mcy;":1084,"mdash;":8212,"measuredangle;":8737,"mfr;":[55349,56618],"mho;":8487,micro:181,"micro;":181,"mid;":8739,"midast;":42,"midcir;":10992,middot:183,"middot;":183,"minus;":8722,"minusb;":8863,"minusd;":8760,"minusdu;":10794,"mlcp;":10971,"mldr;":8230,"mnplus;":8723,"models;":8871,"mopf;":[55349,56670],"mp;":8723,"mscr;":[55349,56514],"mstpos;":8766,"mu;":956,"multimap;":8888,"mumap;":8888,"nGg;":[8921,824],"nGt;":[8811,8402],"nGtv;":[8811,824],"nLeftarrow;":8653,"nLeftrightarrow;":8654,"nLl;":[8920,824],"nLt;":[8810,8402],"nLtv;":[8810,824],"nRightarrow;":8655,"nVDash;":8879,"nVdash;":8878,"nabla;":8711,"nacute;":324,"nang;":[8736,8402],"nap;":8777,"napE;":[10864,824],"napid;":[8779,824],"napos;":329,"napprox;":8777,"natur;":9838,"natural;":9838,"naturals;":8469,nbsp:160,"nbsp;":160,"nbump;":[8782,824],"nbumpe;":[8783,824],"ncap;":10819,"ncaron;":328,"ncedil;":326,"ncong;":8775,"ncongdot;":[10861,824],"ncup;":10818,"ncy;":1085,"ndash;":8211,"ne;":8800,"neArr;":8663,"nearhk;":10532,"nearr;":8599,"nearrow;":8599,"nedot;":[8784,824],"nequiv;":8802,"nesear;":10536,"nesim;":[8770,824],"nexist;":8708,"nexists;":8708,"nfr;":[55349,56619],"ngE;":[8807,824],"nge;":8817,"ngeq;":8817,"ngeqq;":[8807,824],"ngeqslant;":[10878,824],"nges;":[10878,824],"ngsim;":8821,"ngt;":8815,"ngtr;":8815,"nhArr;":8654,"nharr;":8622,"nhpar;":10994,"ni;":8715,"nis;":8956,"nisd;":8954,"niv;":8715,"njcy;":1114,"nlArr;":8653,"nlE;":[8806,824],"nlarr;":8602,"nldr;":8229,"nle;":8816,"nleftarrow;":8602,"nleftrightarrow;":8622,"nleq;":8816,"nleqq;":[8806,824],"nleqslant;":[10877,824],"nles;":[10877,824],"nless;":8814,"nlsim;":8820,"nlt;":8814,"nltri;":8938,"nltrie;":8940,"nmid;":8740,"nopf;":[55349,56671],not:172,"not;":172,"notin;":8713,"notinE;":[8953,824],"notindot;":[8949,824],"notinva;":8713,"notinvb;":8951,"notinvc;":8950,"notni;":8716,"notniva;":8716,"notnivb;":8958,"notnivc;":8957,"npar;":8742,"nparallel;":8742,"nparsl;":[11005,8421],"npart;":[8706,824],"npolint;":10772,"npr;":8832,"nprcue;":8928,"npre;":[10927,824],"nprec;":8832,"npreceq;":[10927,824],"nrArr;":8655,"nrarr;":8603,"nrarrc;":[10547,824],"nrarrw;":[8605,824],"nrightarrow;":8603,"nrtri;":8939,"nrtrie;":8941,"nsc;":8833,"nsccue;":8929,"nsce;":[10928,824],"nscr;":[55349,56515],"nshortmid;":8740,"nshortparallel;":8742,"nsim;":8769,"nsime;":8772,"nsimeq;":8772,"nsmid;":8740,"nspar;":8742,"nsqsube;":8930,"nsqsupe;":8931,"nsub;":8836,"nsubE;":[10949,824],"nsube;":8840,"nsubset;":[8834,8402],"nsubseteq;":8840,"nsubseteqq;":[10949,824],"nsucc;":8833,"nsucceq;":[10928,824],"nsup;":8837,"nsupE;":[10950,824],"nsupe;":8841,"nsupset;":[8835,8402],"nsupseteq;":8841,"nsupseteqq;":[10950,824],"ntgl;":8825,ntilde:241,"ntilde;":241,"ntlg;":8824,"ntriangleleft;":8938,"ntrianglelefteq;":8940,"ntriangleright;":8939,"ntrianglerighteq;":8941,"nu;":957,"num;":35,"numero;":8470,"numsp;":8199,"nvDash;":8877,"nvHarr;":10500,"nvap;":[8781,8402],"nvdash;":8876,"nvge;":[8805,8402],"nvgt;":[62,8402],"nvinfin;":10718,"nvlArr;":10498,"nvle;":[8804,8402],"nvlt;":[60,8402],"nvltrie;":[8884,8402],"nvrArr;":10499,"nvrtrie;":[8885,8402],"nvsim;":[8764,8402],"nwArr;":8662,"nwarhk;":10531,"nwarr;":8598,"nwarrow;":8598,"nwnear;":10535,"oS;":9416,oacute:243,"oacute;":243,"oast;":8859,"ocir;":8858,ocirc:244,"ocirc;":244,"ocy;":1086,"odash;":8861,"odblac;":337,"odiv;":10808,"odot;":8857,"odsold;":10684,"oelig;":339,"ofcir;":10687,"ofr;":[55349,56620],"ogon;":731,ograve:242,"ograve;":242,"ogt;":10689,"ohbar;":10677,"ohm;":937,"oint;":8750,"olarr;":8634,"olcir;":10686,"olcross;":10683,"oline;":8254,"olt;":10688,"omacr;":333,"omega;":969,"omicron;":959,"omid;":10678,"ominus;":8854,"oopf;":[55349,56672],"opar;":10679,"operp;":10681,"oplus;":8853,"or;":8744,"orarr;":8635,"ord;":10845,"order;":8500,"orderof;":8500,ordf:170,"ordf;":170,ordm:186,"ordm;":186,"origof;":8886,"oror;":10838,"orslope;":10839,"orv;":10843,"oscr;":8500,oslash:248,"oslash;":248,"osol;":8856,otilde:245,"otilde;":245,"otimes;":8855,"otimesas;":10806,ouml:246,"ouml;":246,"ovbar;":9021,"par;":8741,para:182,"para;":182,"parallel;":8741,"parsim;":10995,"parsl;":11005,"part;":8706,"pcy;":1087,"percnt;":37,"period;":46,"permil;":8240,"perp;":8869,"pertenk;":8241,"pfr;":[55349,56621],"phi;":966,"phiv;":981,"phmmat;":8499,"phone;":9742,"pi;":960,"pitchfork;":8916,"piv;":982,"planck;":8463,"planckh;":8462,"plankv;":8463,"plus;":43,"plusacir;":10787,"plusb;":8862,"pluscir;":10786,"plusdo;":8724,"plusdu;":10789,"pluse;":10866,plusmn:177,"plusmn;":177,"plussim;":10790,"plustwo;":10791,"pm;":177,"pointint;":10773,"popf;":[55349,56673],pound:163,"pound;":163,"pr;":8826,"prE;":10931,"prap;":10935,"prcue;":8828,"pre;":10927,"prec;":8826,"precapprox;":10935,"preccurlyeq;":8828,"preceq;":10927,"precnapprox;":10937,"precneqq;":10933,"precnsim;":8936,"precsim;":8830,"prime;":8242,"primes;":8473,"prnE;":10933,"prnap;":10937,"prnsim;":8936,"prod;":8719,"profalar;":9006,"profline;":8978,"profsurf;":8979,"prop;":8733,"propto;":8733,"prsim;":8830,"prurel;":8880,"pscr;":[55349,56517],"psi;":968,"puncsp;":8200,"qfr;":[55349,56622],"qint;":10764,"qopf;":[55349,56674],"qprime;":8279,"qscr;":[55349,56518],"quaternions;":8461,"quatint;":10774,"quest;":63,"questeq;":8799,quot:34,"quot;":34,"rAarr;":8667,"rArr;":8658,"rAtail;":10524,"rBarr;":10511,"rHar;":10596,"race;":[8765,817],"racute;":341,"radic;":8730,"raemptyv;":10675,"rang;":10217,"rangd;":10642,"range;":10661,"rangle;":10217,raquo:187,"raquo;":187,"rarr;":8594,"rarrap;":10613,"rarrb;":8677,"rarrbfs;":10528,"rarrc;":10547,"rarrfs;":10526,"rarrhk;":8618,"rarrlp;":8620,"rarrpl;":10565,"rarrsim;":10612,"rarrtl;":8611,"rarrw;":8605,"ratail;":10522,"ratio;":8758,"rationals;":8474,"rbarr;":10509,"rbbrk;":10099,"rbrace;":125,"rbrack;":93,"rbrke;":10636,"rbrksld;":10638,"rbrkslu;":10640,"rcaron;":345,"rcedil;":343,"rceil;":8969,"rcub;":125,"rcy;":1088,"rdca;":10551,"rdldhar;":10601,"rdquo;":8221,"rdquor;":8221,"rdsh;":8627,"real;":8476,"realine;":8475,"realpart;":8476,"reals;":8477,"rect;":9645,reg:174,"reg;":174,"rfisht;":10621,"rfloor;":8971,"rfr;":[55349,56623],"rhard;":8641,"rharu;":8640,"rharul;":10604,"rho;":961,"rhov;":1009,"rightarrow;":8594,"rightarrowtail;":8611,"rightharpoondown;":8641,"rightharpoonup;":8640,"rightleftarrows;":8644,"rightleftharpoons;":8652,"rightrightarrows;":8649,"rightsquigarrow;":8605,"rightthreetimes;":8908,"ring;":730,"risingdotseq;":8787,"rlarr;":8644,"rlhar;":8652,"rlm;":8207,"rmoust;":9137,"rmoustache;":9137,"rnmid;":10990,"roang;":10221,"roarr;":8702,"robrk;":10215,"ropar;":10630,"ropf;":[55349,56675],"roplus;":10798,"rotimes;":10805,"rpar;":41,"rpargt;":10644,"rppolint;":10770,"rrarr;":8649,"rsaquo;":8250,"rscr;":[55349,56519],"rsh;":8625,"rsqb;":93,"rsquo;":8217,"rsquor;":8217,"rthree;":8908,"rtimes;":8906,"rtri;":9657,"rtrie;":8885,"rtrif;":9656,"rtriltri;":10702,"ruluhar;":10600,"rx;":8478,"sacute;":347,"sbquo;":8218,"sc;":8827,"scE;":10932,"scap;":10936,"scaron;":353,"sccue;":8829,"sce;":10928,"scedil;":351,"scirc;":349,"scnE;":10934,"scnap;":10938,"scnsim;":8937,"scpolint;":10771,"scsim;":8831,"scy;":1089,"sdot;":8901,"sdotb;":8865,"sdote;":10854,"seArr;":8664,"searhk;":10533,"searr;":8600,"searrow;":8600,sect:167,"sect;":167,"semi;":59,"seswar;":10537,"setminus;":8726,"setmn;":8726,"sext;":10038,"sfr;":[55349,56624],"sfrown;":8994,"sharp;":9839,"shchcy;":1097,"shcy;":1096,"shortmid;":8739,"shortparallel;":8741,shy:173,"shy;":173,"sigma;":963,"sigmaf;":962,"sigmav;":962,"sim;":8764,"simdot;":10858,"sime;":8771,"simeq;":8771,"simg;":10910,"simgE;":10912,"siml;":10909,"simlE;":10911,"simne;":8774,"simplus;":10788,"simrarr;":10610,"slarr;":8592,"smallsetminus;":8726,"smashp;":10803,"smeparsl;":10724,"smid;":8739,"smile;":8995,"smt;":10922,"smte;":10924,"smtes;":[10924,65024],"softcy;":1100,"sol;":47,"solb;":10692,"solbar;":9023,"sopf;":[55349,56676],"spades;":9824,"spadesuit;":9824,"spar;":8741,"sqcap;":8851,"sqcaps;":[8851,65024],"sqcup;":8852,"sqcups;":[8852,65024],"sqsub;":8847,"sqsube;":8849,"sqsubset;":8847,"sqsubseteq;":8849,"sqsup;":8848,"sqsupe;":8850,"sqsupset;":8848,"sqsupseteq;":8850,"squ;":9633,"square;":9633,"squarf;":9642,"squf;":9642,"srarr;":8594,"sscr;":[55349,56520],"ssetmn;":8726,"ssmile;":8995,"sstarf;":8902,"star;":9734,"starf;":9733,"straightepsilon;":1013,"straightphi;":981,"strns;":175,"sub;":8834,"subE;":10949,"subdot;":10941,"sube;":8838,"subedot;":10947,"submult;":10945,"subnE;":10955,"subne;":8842,"subplus;":10943,"subrarr;":10617,"subset;":8834,"subseteq;":8838,"subseteqq;":10949,"subsetneq;":8842,"subsetneqq;":10955,"subsim;":10951,"subsub;":10965,"subsup;":10963,"succ;":8827,"succapprox;":10936,"succcurlyeq;":8829,"succeq;":10928,"succnapprox;":10938,"succneqq;":10934,"succnsim;":8937,"succsim;":8831,"sum;":8721,"sung;":9834,sup1:185,"sup1;":185,sup2:178,"sup2;":178,sup3:179,"sup3;":179,"sup;":8835,"supE;":10950,"supdot;":10942,"supdsub;":10968,"supe;":8839,"supedot;":10948,"suphsol;":10185,"suphsub;":10967,"suplarr;":10619,"supmult;":10946,"supnE;":10956,"supne;":8843,"supplus;":10944,"supset;":8835,"supseteq;":8839,"supseteqq;":10950,"supsetneq;":8843,"supsetneqq;":10956,"supsim;":10952,"supsub;":10964,"supsup;":10966,"swArr;":8665,"swarhk;":10534,"swarr;":8601,"swarrow;":8601,"swnwar;":10538,szlig:223,"szlig;":223,"target;":8982,"tau;":964,"tbrk;":9140,"tcaron;":357,"tcedil;":355,"tcy;":1090,"tdot;":8411,"telrec;":8981,"tfr;":[55349,56625],"there4;":8756,"therefore;":8756,"theta;":952,"thetasym;":977,"thetav;":977,"thickapprox;":8776,"thicksim;":8764,"thinsp;":8201,"thkap;":8776,"thksim;":8764,thorn:254,"thorn;":254,"tilde;":732,times:215,"times;":215,"timesb;":8864,"timesbar;":10801,"timesd;":10800,"tint;":8749,"toea;":10536,"top;":8868,"topbot;":9014,"topcir;":10993,"topf;":[55349,56677],"topfork;":10970,"tosa;":10537,"tprime;":8244,"trade;":8482,"triangle;":9653,"triangledown;":9663,"triangleleft;":9667,"trianglelefteq;":8884,"triangleq;":8796,"triangleright;":9657,"trianglerighteq;":8885,"tridot;":9708,"trie;":8796,"triminus;":10810,"triplus;":10809,"trisb;":10701,"tritime;":10811,"trpezium;":9186,"tscr;":[55349,56521],"tscy;":1094,"tshcy;":1115,"tstrok;":359,"twixt;":8812,"twoheadleftarrow;":8606,"twoheadrightarrow;":8608,"uArr;":8657,"uHar;":10595,uacute:250,"uacute;":250,"uarr;":8593,"ubrcy;":1118,"ubreve;":365,ucirc:251,"ucirc;":251,"ucy;":1091,"udarr;":8645,"udblac;":369,"udhar;":10606,"ufisht;":10622,"ufr;":[55349,56626],ugrave:249,"ugrave;":249,"uharl;":8639,"uharr;":8638,"uhblk;":9600,"ulcorn;":8988,"ulcorner;":8988,"ulcrop;":8975,"ultri;":9720,"umacr;":363,uml:168,"uml;":168,"uogon;":371,"uopf;":[55349,56678],"uparrow;":8593,"updownarrow;":8597,"upharpoonleft;":8639,"upharpoonright;":8638,"uplus;":8846,"upsi;":965,"upsih;":978,"upsilon;":965,"upuparrows;":8648,"urcorn;":8989,"urcorner;":8989,"urcrop;":8974,"uring;":367,"urtri;":9721,"uscr;":[55349,56522],"utdot;":8944,"utilde;":361,"utri;":9653,"utrif;":9652,"uuarr;":8648,uuml:252,"uuml;":252,"uwangle;":10663,"vArr;":8661,"vBar;":10984,"vBarv;":10985,"vDash;":8872,"vangrt;":10652,"varepsilon;":1013,"varkappa;":1008,"varnothing;":8709,"varphi;":981,"varpi;":982,"varpropto;":8733,"varr;":8597,"varrho;":1009,"varsigma;":962,"varsubsetneq;":[8842,65024],"varsubsetneqq;":[10955,65024],"varsupsetneq;":[8843,65024],"varsupsetneqq;":[10956,65024],"vartheta;":977,"vartriangleleft;":8882,"vartriangleright;":8883,"vcy;":1074,"vdash;":8866,"vee;":8744,"veebar;":8891,"veeeq;":8794,"vellip;":8942,"verbar;":124,"vert;":124,"vfr;":[55349,56627],"vltri;":8882,"vnsub;":[8834,8402],"vnsup;":[8835,8402],"vopf;":[55349,56679],"vprop;":8733,"vrtri;":8883,"vscr;":[55349,56523],"vsubnE;":[10955,65024],"vsubne;":[8842,65024],"vsupnE;":[10956,65024],"vsupne;":[8843,65024],"vzigzag;":10650,"wcirc;":373,"wedbar;":10847,"wedge;":8743,"wedgeq;":8793,"weierp;":8472,"wfr;":[55349,56628],"wopf;":[55349,56680],"wp;":8472,"wr;":8768,"wreath;":8768,"wscr;":[55349,56524],"xcap;":8898,"xcirc;":9711,"xcup;":8899,"xdtri;":9661,"xfr;":[55349,56629],"xhArr;":10234,"xharr;":10231,"xi;":958,"xlArr;":10232,"xlarr;":10229,"xmap;":10236,"xnis;":8955,"xodot;":10752,"xopf;":[55349,56681],"xoplus;":10753,"xotime;":10754,"xrArr;":10233,"xrarr;":10230,"xscr;":[55349,56525],"xsqcup;":10758,"xuplus;":10756,"xutri;":9651,"xvee;":8897,"xwedge;":8896,yacute:253,"yacute;":253,"yacy;":1103,"ycirc;":375,"ycy;":1099,yen:165,"yen;":165,"yfr;":[55349,56630],"yicy;":1111,"yopf;":[55349,56682],"yscr;":[55349,56526],"yucy;":1102,yuml:255,"yuml;":255,"zacute;":378,"zcaron;":382,"zcy;":1079,"zdot;":380,"zeetrf;":8488,"zeta;":950,"zfr;":[55349,56631],"zhcy;":1078,"zigrarr;":8669,"zopf;":[55349,56683],"zscr;":[55349,56527],"zwj;":8205,"zwnj;":8204},Vz=/(A(?:Elig;?|MP;?|acute;?|breve;|c(?:irc;?|y;)|fr;|grave;?|lpha;|macr;|nd;|o(?:gon;|pf;)|pplyFunction;|ring;?|s(?:cr;|sign;)|tilde;?|uml;?)|B(?:a(?:ckslash;|r(?:v;|wed;))|cy;|e(?:cause;|rnoullis;|ta;)|fr;|opf;|reve;|scr;|umpeq;)|C(?:Hcy;|OPY;?|a(?:cute;|p(?:;|italDifferentialD;)|yleys;)|c(?:aron;|edil;?|irc;|onint;)|dot;|e(?:dilla;|nterDot;)|fr;|hi;|ircle(?:Dot;|Minus;|Plus;|Times;)|lo(?:ckwiseContourIntegral;|seCurly(?:DoubleQuote;|Quote;))|o(?:lon(?:;|e;)|n(?:gruent;|int;|tourIntegral;)|p(?:f;|roduct;)|unterClockwiseContourIntegral;)|ross;|scr;|up(?:;|Cap;))|D(?:D(?:;|otrahd;)|Jcy;|Scy;|Zcy;|a(?:gger;|rr;|shv;)|c(?:aron;|y;)|el(?:;|ta;)|fr;|i(?:a(?:critical(?:Acute;|Do(?:t;|ubleAcute;)|Grave;|Tilde;)|mond;)|fferentialD;)|o(?:pf;|t(?:;|Dot;|Equal;)|uble(?:ContourIntegral;|Do(?:t;|wnArrow;)|L(?:eft(?:Arrow;|RightArrow;|Tee;)|ong(?:Left(?:Arrow;|RightArrow;)|RightArrow;))|Right(?:Arrow;|Tee;)|Up(?:Arrow;|DownArrow;)|VerticalBar;)|wn(?:Arrow(?:;|Bar;|UpArrow;)|Breve;|Left(?:RightVector;|TeeVector;|Vector(?:;|Bar;))|Right(?:TeeVector;|Vector(?:;|Bar;))|Tee(?:;|Arrow;)|arrow;))|s(?:cr;|trok;))|E(?:NG;|TH;?|acute;?|c(?:aron;|irc;?|y;)|dot;|fr;|grave;?|lement;|m(?:acr;|pty(?:SmallSquare;|VerySmallSquare;))|o(?:gon;|pf;)|psilon;|qu(?:al(?:;|Tilde;)|ilibrium;)|s(?:cr;|im;)|ta;|uml;?|x(?:ists;|ponentialE;))|F(?:cy;|fr;|illed(?:SmallSquare;|VerySmallSquare;)|o(?:pf;|rAll;|uriertrf;)|scr;)|G(?:Jcy;|T;?|amma(?:;|d;)|breve;|c(?:edil;|irc;|y;)|dot;|fr;|g;|opf;|reater(?:Equal(?:;|Less;)|FullEqual;|Greater;|Less;|SlantEqual;|Tilde;)|scr;|t;)|H(?:ARDcy;|a(?:cek;|t;)|circ;|fr;|ilbertSpace;|o(?:pf;|rizontalLine;)|s(?:cr;|trok;)|ump(?:DownHump;|Equal;))|I(?:Ecy;|Jlig;|Ocy;|acute;?|c(?:irc;?|y;)|dot;|fr;|grave;?|m(?:;|a(?:cr;|ginaryI;)|plies;)|n(?:t(?:;|e(?:gral;|rsection;))|visible(?:Comma;|Times;))|o(?:gon;|pf;|ta;)|scr;|tilde;|u(?:kcy;|ml;?))|J(?:c(?:irc;|y;)|fr;|opf;|s(?:cr;|ercy;)|ukcy;)|K(?:Hcy;|Jcy;|appa;|c(?:edil;|y;)|fr;|opf;|scr;)|L(?:Jcy;|T;?|a(?:cute;|mbda;|ng;|placetrf;|rr;)|c(?:aron;|edil;|y;)|e(?:ft(?:A(?:ngleBracket;|rrow(?:;|Bar;|RightArrow;))|Ceiling;|Do(?:ubleBracket;|wn(?:TeeVector;|Vector(?:;|Bar;)))|Floor;|Right(?:Arrow;|Vector;)|T(?:ee(?:;|Arrow;|Vector;)|riangle(?:;|Bar;|Equal;))|Up(?:DownVector;|TeeVector;|Vector(?:;|Bar;))|Vector(?:;|Bar;)|arrow;|rightarrow;)|ss(?:EqualGreater;|FullEqual;|Greater;|Less;|SlantEqual;|Tilde;))|fr;|l(?:;|eftarrow;)|midot;|o(?:ng(?:Left(?:Arrow;|RightArrow;)|RightArrow;|left(?:arrow;|rightarrow;)|rightarrow;)|pf;|wer(?:LeftArrow;|RightArrow;))|s(?:cr;|h;|trok;)|t;)|M(?:ap;|cy;|e(?:diumSpace;|llintrf;)|fr;|inusPlus;|opf;|scr;|u;)|N(?:Jcy;|acute;|c(?:aron;|edil;|y;)|e(?:gative(?:MediumSpace;|Thi(?:ckSpace;|nSpace;)|VeryThinSpace;)|sted(?:GreaterGreater;|LessLess;)|wLine;)|fr;|o(?:Break;|nBreakingSpace;|pf;|t(?:;|C(?:ongruent;|upCap;)|DoubleVerticalBar;|E(?:lement;|qual(?:;|Tilde;)|xists;)|Greater(?:;|Equal;|FullEqual;|Greater;|Less;|SlantEqual;|Tilde;)|Hump(?:DownHump;|Equal;)|Le(?:ftTriangle(?:;|Bar;|Equal;)|ss(?:;|Equal;|Greater;|Less;|SlantEqual;|Tilde;))|Nested(?:GreaterGreater;|LessLess;)|Precedes(?:;|Equal;|SlantEqual;)|R(?:everseElement;|ightTriangle(?:;|Bar;|Equal;))|S(?:quareSu(?:bset(?:;|Equal;)|perset(?:;|Equal;))|u(?:bset(?:;|Equal;)|cceeds(?:;|Equal;|SlantEqual;|Tilde;)|perset(?:;|Equal;)))|Tilde(?:;|Equal;|FullEqual;|Tilde;)|VerticalBar;))|scr;|tilde;?|u;)|O(?:Elig;|acute;?|c(?:irc;?|y;)|dblac;|fr;|grave;?|m(?:acr;|ega;|icron;)|opf;|penCurly(?:DoubleQuote;|Quote;)|r;|s(?:cr;|lash;?)|ti(?:lde;?|mes;)|uml;?|ver(?:B(?:ar;|rac(?:e;|ket;))|Parenthesis;))|P(?:artialD;|cy;|fr;|hi;|i;|lusMinus;|o(?:incareplane;|pf;)|r(?:;|ecedes(?:;|Equal;|SlantEqual;|Tilde;)|ime;|o(?:duct;|portion(?:;|al;)))|s(?:cr;|i;))|Q(?:UOT;?|fr;|opf;|scr;)|R(?:Barr;|EG;?|a(?:cute;|ng;|rr(?:;|tl;))|c(?:aron;|edil;|y;)|e(?:;|verse(?:E(?:lement;|quilibrium;)|UpEquilibrium;))|fr;|ho;|ight(?:A(?:ngleBracket;|rrow(?:;|Bar;|LeftArrow;))|Ceiling;|Do(?:ubleBracket;|wn(?:TeeVector;|Vector(?:;|Bar;)))|Floor;|T(?:ee(?:;|Arrow;|Vector;)|riangle(?:;|Bar;|Equal;))|Up(?:DownVector;|TeeVector;|Vector(?:;|Bar;))|Vector(?:;|Bar;)|arrow;)|o(?:pf;|undImplies;)|rightarrow;|s(?:cr;|h;)|uleDelayed;)|S(?:H(?:CHcy;|cy;)|OFTcy;|acute;|c(?:;|aron;|edil;|irc;|y;)|fr;|hort(?:DownArrow;|LeftArrow;|RightArrow;|UpArrow;)|igma;|mallCircle;|opf;|q(?:rt;|uare(?:;|Intersection;|Su(?:bset(?:;|Equal;)|perset(?:;|Equal;))|Union;))|scr;|tar;|u(?:b(?:;|set(?:;|Equal;))|c(?:ceeds(?:;|Equal;|SlantEqual;|Tilde;)|hThat;)|m;|p(?:;|erset(?:;|Equal;)|set;)))|T(?:HORN;?|RADE;|S(?:Hcy;|cy;)|a(?:b;|u;)|c(?:aron;|edil;|y;)|fr;|h(?:e(?:refore;|ta;)|i(?:ckSpace;|nSpace;))|ilde(?:;|Equal;|FullEqual;|Tilde;)|opf;|ripleDot;|s(?:cr;|trok;))|U(?:a(?:cute;?|rr(?:;|ocir;))|br(?:cy;|eve;)|c(?:irc;?|y;)|dblac;|fr;|grave;?|macr;|n(?:der(?:B(?:ar;|rac(?:e;|ket;))|Parenthesis;)|ion(?:;|Plus;))|o(?:gon;|pf;)|p(?:Arrow(?:;|Bar;|DownArrow;)|DownArrow;|Equilibrium;|Tee(?:;|Arrow;)|arrow;|downarrow;|per(?:LeftArrow;|RightArrow;)|si(?:;|lon;))|ring;|scr;|tilde;|uml;?)|V(?:Dash;|bar;|cy;|dash(?:;|l;)|e(?:e;|r(?:bar;|t(?:;|ical(?:Bar;|Line;|Separator;|Tilde;))|yThinSpace;))|fr;|opf;|scr;|vdash;)|W(?:circ;|edge;|fr;|opf;|scr;)|X(?:fr;|i;|opf;|scr;)|Y(?:Acy;|Icy;|Ucy;|acute;?|c(?:irc;|y;)|fr;|opf;|scr;|uml;)|Z(?:Hcy;|acute;|c(?:aron;|y;)|dot;|e(?:roWidthSpace;|ta;)|fr;|opf;|scr;)|a(?:acute;?|breve;|c(?:;|E;|d;|irc;?|ute;?|y;)|elig;?|f(?:;|r;)|grave;?|l(?:e(?:fsym;|ph;)|pha;)|m(?:a(?:cr;|lg;)|p;?)|n(?:d(?:;|and;|d;|slope;|v;)|g(?:;|e;|le;|msd(?:;|a(?:a;|b;|c;|d;|e;|f;|g;|h;))|rt(?:;|vb(?:;|d;))|s(?:ph;|t;)|zarr;))|o(?:gon;|pf;)|p(?:;|E;|acir;|e;|id;|os;|prox(?:;|eq;))|ring;?|s(?:cr;|t;|ymp(?:;|eq;))|tilde;?|uml;?|w(?:conint;|int;))|b(?:Not;|a(?:ck(?:cong;|epsilon;|prime;|sim(?:;|eq;))|r(?:vee;|wed(?:;|ge;)))|brk(?:;|tbrk;)|c(?:ong;|y;)|dquo;|e(?:caus(?:;|e;)|mptyv;|psi;|rnou;|t(?:a;|h;|ween;))|fr;|ig(?:c(?:ap;|irc;|up;)|o(?:dot;|plus;|times;)|s(?:qcup;|tar;)|triangle(?:down;|up;)|uplus;|vee;|wedge;)|karow;|l(?:a(?:ck(?:lozenge;|square;|triangle(?:;|down;|left;|right;))|nk;)|k(?:1(?:2;|4;)|34;)|ock;)|n(?:e(?:;|quiv;)|ot;)|o(?:pf;|t(?:;|tom;)|wtie;|x(?:D(?:L;|R;|l;|r;)|H(?:;|D;|U;|d;|u;)|U(?:L;|R;|l;|r;)|V(?:;|H;|L;|R;|h;|l;|r;)|box;|d(?:L;|R;|l;|r;)|h(?:;|D;|U;|d;|u;)|minus;|plus;|times;|u(?:L;|R;|l;|r;)|v(?:;|H;|L;|R;|h;|l;|r;)))|prime;|r(?:eve;|vbar;?)|s(?:cr;|emi;|im(?:;|e;)|ol(?:;|b;|hsub;))|u(?:ll(?:;|et;)|mp(?:;|E;|e(?:;|q;))))|c(?:a(?:cute;|p(?:;|and;|brcup;|c(?:ap;|up;)|dot;|s;)|r(?:et;|on;))|c(?:a(?:ps;|ron;)|edil;?|irc;|ups(?:;|sm;))|dot;|e(?:dil;?|mptyv;|nt(?:;|erdot;|))|fr;|h(?:cy;|eck(?:;|mark;)|i;)|ir(?:;|E;|c(?:;|eq;|le(?:arrow(?:left;|right;)|d(?:R;|S;|ast;|circ;|dash;)))|e;|fnint;|mid;|scir;)|lubs(?:;|uit;)|o(?:lon(?:;|e(?:;|q;))|m(?:ma(?:;|t;)|p(?:;|fn;|le(?:ment;|xes;)))|n(?:g(?:;|dot;)|int;)|p(?:f;|rod;|y(?:;|sr;|)))|r(?:arr;|oss;)|s(?:cr;|u(?:b(?:;|e;)|p(?:;|e;)))|tdot;|u(?:darr(?:l;|r;)|e(?:pr;|sc;)|larr(?:;|p;)|p(?:;|brcap;|c(?:ap;|up;)|dot;|or;|s;)|r(?:arr(?:;|m;)|ly(?:eq(?:prec;|succ;)|vee;|wedge;)|ren;?|vearrow(?:left;|right;))|vee;|wed;)|w(?:conint;|int;)|ylcty;)|d(?:Arr;|Har;|a(?:gger;|leth;|rr;|sh(?:;|v;))|b(?:karow;|lac;)|c(?:aron;|y;)|d(?:;|a(?:gger;|rr;)|otseq;)|e(?:g;?|lta;|mptyv;)|f(?:isht;|r;)|har(?:l;|r;)|i(?:am(?:;|ond(?:;|suit;)|s;)|e;|gamma;|sin;|v(?:;|ide(?:;|ontimes;|)|onx;))|jcy;|lc(?:orn;|rop;)|o(?:llar;|pf;|t(?:;|eq(?:;|dot;)|minus;|plus;|square;)|ublebarwedge;|wn(?:arrow;|downarrows;|harpoon(?:left;|right;)))|r(?:bkarow;|c(?:orn;|rop;))|s(?:c(?:r;|y;)|ol;|trok;)|t(?:dot;|ri(?:;|f;))|u(?:arr;|har;)|wangle;|z(?:cy;|igrarr;))|e(?:D(?:Dot;|ot;)|a(?:cute;?|ster;)|c(?:aron;|ir(?:;|c;?)|olon;|y;)|dot;|e;|f(?:Dot;|r;)|g(?:;|rave;?|s(?:;|dot;))|l(?:;|inters;|l;|s(?:;|dot;))|m(?:acr;|pty(?:;|set;|v;)|sp(?:1(?:3;|4;)|;))|n(?:g;|sp;)|o(?:gon;|pf;)|p(?:ar(?:;|sl;)|lus;|si(?:;|lon;|v;))|q(?:c(?:irc;|olon;)|s(?:im;|lant(?:gtr;|less;))|u(?:als;|est;|iv(?:;|DD;))|vparsl;)|r(?:Dot;|arr;)|s(?:cr;|dot;|im;)|t(?:a;|h;?)|u(?:ml;?|ro;)|x(?:cl;|ist;|p(?:ectation;|onentiale;)))|f(?:allingdotseq;|cy;|emale;|f(?:ilig;|l(?:ig;|lig;)|r;)|ilig;|jlig;|l(?:at;|lig;|tns;)|nof;|o(?:pf;|r(?:all;|k(?:;|v;)))|partint;|r(?:a(?:c(?:1(?:2;?|3;|4;?|5;|6;|8;)|2(?:3;|5;)|3(?:4;?|5;|8;)|45;|5(?:6;|8;)|78;)|sl;)|own;)|scr;)|g(?:E(?:;|l;)|a(?:cute;|mma(?:;|d;)|p;)|breve;|c(?:irc;|y;)|dot;|e(?:;|l;|q(?:;|q;|slant;)|s(?:;|cc;|dot(?:;|o(?:;|l;))|l(?:;|es;)))|fr;|g(?:;|g;)|imel;|jcy;|l(?:;|E;|a;|j;)|n(?:E;|ap(?:;|prox;)|e(?:;|q(?:;|q;))|sim;)|opf;|rave;|s(?:cr;|im(?:;|e;|l;))|t(?:;|c(?:c;|ir;)|dot;|lPar;|quest;|r(?:a(?:pprox;|rr;)|dot;|eq(?:less;|qless;)|less;|sim;)|)|v(?:ertneqq;|nE;))|h(?:Arr;|a(?:irsp;|lf;|milt;|r(?:dcy;|r(?:;|cir;|w;)))|bar;|circ;|e(?:arts(?:;|uit;)|llip;|rcon;)|fr;|ks(?:earow;|warow;)|o(?:arr;|mtht;|ok(?:leftarrow;|rightarrow;)|pf;|rbar;)|s(?:cr;|lash;|trok;)|y(?:bull;|phen;))|i(?:acute;?|c(?:;|irc;?|y;)|e(?:cy;|xcl;?)|f(?:f;|r;)|grave;?|i(?:;|i(?:int;|nt;)|nfin;|ota;)|jlig;|m(?:a(?:cr;|g(?:e;|line;|part;)|th;)|of;|ped;)|n(?:;|care;|fin(?:;|tie;)|odot;|t(?:;|cal;|e(?:gers;|rcal;)|larhk;|prod;))|o(?:cy;|gon;|pf;|ta;)|prod;|quest;?|s(?:cr;|in(?:;|E;|dot;|s(?:;|v;)|v;))|t(?:;|ilde;)|u(?:kcy;|ml;?))|j(?:c(?:irc;|y;)|fr;|math;|opf;|s(?:cr;|ercy;)|ukcy;)|k(?:appa(?:;|v;)|c(?:edil;|y;)|fr;|green;|hcy;|jcy;|opf;|scr;)|l(?:A(?:arr;|rr;|tail;)|Barr;|E(?:;|g;)|Har;|a(?:cute;|emptyv;|gran;|mbda;|ng(?:;|d;|le;)|p;|quo;?|rr(?:;|b(?:;|fs;)|fs;|hk;|lp;|pl;|sim;|tl;)|t(?:;|ail;|e(?:;|s;)))|b(?:arr;|brk;|r(?:ac(?:e;|k;)|k(?:e;|sl(?:d;|u;))))|c(?:aron;|e(?:dil;|il;)|ub;|y;)|d(?:ca;|quo(?:;|r;)|r(?:dhar;|ushar;)|sh;)|e(?:;|ft(?:arrow(?:;|tail;)|harpoon(?:down;|up;)|leftarrows;|right(?:arrow(?:;|s;)|harpoons;|squigarrow;)|threetimes;)|g;|q(?:;|q;|slant;)|s(?:;|cc;|dot(?:;|o(?:;|r;))|g(?:;|es;)|s(?:approx;|dot;|eq(?:gtr;|qgtr;)|gtr;|sim;)))|f(?:isht;|loor;|r;)|g(?:;|E;)|h(?:ar(?:d;|u(?:;|l;))|blk;)|jcy;|l(?:;|arr;|corner;|hard;|tri;)|m(?:idot;|oust(?:;|ache;))|n(?:E;|ap(?:;|prox;)|e(?:;|q(?:;|q;))|sim;)|o(?:a(?:ng;|rr;)|brk;|ng(?:left(?:arrow;|rightarrow;)|mapsto;|rightarrow;)|oparrow(?:left;|right;)|p(?:ar;|f;|lus;)|times;|w(?:ast;|bar;)|z(?:;|enge;|f;))|par(?:;|lt;)|r(?:arr;|corner;|har(?:;|d;)|m;|tri;)|s(?:aquo;|cr;|h;|im(?:;|e;|g;)|q(?:b;|uo(?:;|r;))|trok;)|t(?:;|c(?:c;|ir;)|dot;|hree;|imes;|larr;|quest;|r(?:Par;|i(?:;|e;|f;))|)|ur(?:dshar;|uhar;)|v(?:ertneqq;|nE;))|m(?:DDot;|a(?:cr;?|l(?:e;|t(?:;|ese;))|p(?:;|sto(?:;|down;|left;|up;))|rker;)|c(?:omma;|y;)|dash;|easuredangle;|fr;|ho;|i(?:cro;?|d(?:;|ast;|cir;|dot;?)|nus(?:;|b;|d(?:;|u;)))|l(?:cp;|dr;)|nplus;|o(?:dels;|pf;)|p;|s(?:cr;|tpos;)|u(?:;|ltimap;|map;))|n(?:G(?:g;|t(?:;|v;))|L(?:eft(?:arrow;|rightarrow;)|l;|t(?:;|v;))|Rightarrow;|V(?:Dash;|dash;)|a(?:bla;|cute;|ng;|p(?:;|E;|id;|os;|prox;)|tur(?:;|al(?:;|s;)))|b(?:sp;?|ump(?:;|e;))|c(?:a(?:p;|ron;)|edil;|ong(?:;|dot;)|up;|y;)|dash;|e(?:;|Arr;|ar(?:hk;|r(?:;|ow;))|dot;|quiv;|s(?:ear;|im;)|xist(?:;|s;))|fr;|g(?:E;|e(?:;|q(?:;|q;|slant;)|s;)|sim;|t(?:;|r;))|h(?:Arr;|arr;|par;)|i(?:;|s(?:;|d;)|v;)|jcy;|l(?:Arr;|E;|arr;|dr;|e(?:;|ft(?:arrow;|rightarrow;)|q(?:;|q;|slant;)|s(?:;|s;))|sim;|t(?:;|ri(?:;|e;)))|mid;|o(?:pf;|t(?:;|in(?:;|E;|dot;|v(?:a;|b;|c;))|ni(?:;|v(?:a;|b;|c;))|))|p(?:ar(?:;|allel;|sl;|t;)|olint;|r(?:;|cue;|e(?:;|c(?:;|eq;))))|r(?:Arr;|arr(?:;|c;|w;)|ightarrow;|tri(?:;|e;))|s(?:c(?:;|cue;|e;|r;)|hort(?:mid;|parallel;)|im(?:;|e(?:;|q;))|mid;|par;|qsu(?:be;|pe;)|u(?:b(?:;|E;|e;|set(?:;|eq(?:;|q;)))|cc(?:;|eq;)|p(?:;|E;|e;|set(?:;|eq(?:;|q;)))))|t(?:gl;|ilde;?|lg;|riangle(?:left(?:;|eq;)|right(?:;|eq;)))|u(?:;|m(?:;|ero;|sp;))|v(?:Dash;|Harr;|ap;|dash;|g(?:e;|t;)|infin;|l(?:Arr;|e;|t(?:;|rie;))|r(?:Arr;|trie;)|sim;)|w(?:Arr;|ar(?:hk;|r(?:;|ow;))|near;))|o(?:S;|a(?:cute;?|st;)|c(?:ir(?:;|c;?)|y;)|d(?:ash;|blac;|iv;|ot;|sold;)|elig;|f(?:cir;|r;)|g(?:on;|rave;?|t;)|h(?:bar;|m;)|int;|l(?:arr;|c(?:ir;|ross;)|ine;|t;)|m(?:acr;|ega;|i(?:cron;|d;|nus;))|opf;|p(?:ar;|erp;|lus;)|r(?:;|arr;|d(?:;|er(?:;|of;)|f;?|m;?)|igof;|or;|slope;|v;)|s(?:cr;|lash;?|ol;)|ti(?:lde;?|mes(?:;|as;))|uml;?|vbar;)|p(?:ar(?:;|a(?:;|llel;|)|s(?:im;|l;)|t;)|cy;|er(?:cnt;|iod;|mil;|p;|tenk;)|fr;|h(?:i(?:;|v;)|mmat;|one;)|i(?:;|tchfork;|v;)|l(?:an(?:ck(?:;|h;)|kv;)|us(?:;|acir;|b;|cir;|d(?:o;|u;)|e;|mn;?|sim;|two;))|m;|o(?:intint;|pf;|und;?)|r(?:;|E;|ap;|cue;|e(?:;|c(?:;|approx;|curlyeq;|eq;|n(?:approx;|eqq;|sim;)|sim;))|ime(?:;|s;)|n(?:E;|ap;|sim;)|o(?:d;|f(?:alar;|line;|surf;)|p(?:;|to;))|sim;|urel;)|s(?:cr;|i;)|uncsp;)|q(?:fr;|int;|opf;|prime;|scr;|u(?:at(?:ernions;|int;)|est(?:;|eq;)|ot;?))|r(?:A(?:arr;|rr;|tail;)|Barr;|Har;|a(?:c(?:e;|ute;)|dic;|emptyv;|ng(?:;|d;|e;|le;)|quo;?|rr(?:;|ap;|b(?:;|fs;)|c;|fs;|hk;|lp;|pl;|sim;|tl;|w;)|t(?:ail;|io(?:;|nals;)))|b(?:arr;|brk;|r(?:ac(?:e;|k;)|k(?:e;|sl(?:d;|u;))))|c(?:aron;|e(?:dil;|il;)|ub;|y;)|d(?:ca;|ldhar;|quo(?:;|r;)|sh;)|e(?:al(?:;|ine;|part;|s;)|ct;|g;?)|f(?:isht;|loor;|r;)|h(?:ar(?:d;|u(?:;|l;))|o(?:;|v;))|i(?:ght(?:arrow(?:;|tail;)|harpoon(?:down;|up;)|left(?:arrows;|harpoons;)|rightarrows;|squigarrow;|threetimes;)|ng;|singdotseq;)|l(?:arr;|har;|m;)|moust(?:;|ache;)|nmid;|o(?:a(?:ng;|rr;)|brk;|p(?:ar;|f;|lus;)|times;)|p(?:ar(?:;|gt;)|polint;)|rarr;|s(?:aquo;|cr;|h;|q(?:b;|uo(?:;|r;)))|t(?:hree;|imes;|ri(?:;|e;|f;|ltri;))|uluhar;|x;)|s(?:acute;|bquo;|c(?:;|E;|a(?:p;|ron;)|cue;|e(?:;|dil;)|irc;|n(?:E;|ap;|sim;)|polint;|sim;|y;)|dot(?:;|b;|e;)|e(?:Arr;|ar(?:hk;|r(?:;|ow;))|ct;?|mi;|swar;|tm(?:inus;|n;)|xt;)|fr(?:;|own;)|h(?:arp;|c(?:hcy;|y;)|ort(?:mid;|parallel;)|y;?)|i(?:gma(?:;|f;|v;)|m(?:;|dot;|e(?:;|q;)|g(?:;|E;)|l(?:;|E;)|ne;|plus;|rarr;))|larr;|m(?:a(?:llsetminus;|shp;)|eparsl;|i(?:d;|le;)|t(?:;|e(?:;|s;)))|o(?:ftcy;|l(?:;|b(?:;|ar;))|pf;)|pa(?:des(?:;|uit;)|r;)|q(?:c(?:ap(?:;|s;)|up(?:;|s;))|su(?:b(?:;|e;|set(?:;|eq;))|p(?:;|e;|set(?:;|eq;)))|u(?:;|ar(?:e;|f;)|f;))|rarr;|s(?:cr;|etmn;|mile;|tarf;)|t(?:ar(?:;|f;)|r(?:aight(?:epsilon;|phi;)|ns;))|u(?:b(?:;|E;|dot;|e(?:;|dot;)|mult;|n(?:E;|e;)|plus;|rarr;|s(?:et(?:;|eq(?:;|q;)|neq(?:;|q;))|im;|u(?:b;|p;)))|cc(?:;|approx;|curlyeq;|eq;|n(?:approx;|eqq;|sim;)|sim;)|m;|ng;|p(?:1;?|2;?|3;?|;|E;|d(?:ot;|sub;)|e(?:;|dot;)|hs(?:ol;|ub;)|larr;|mult;|n(?:E;|e;)|plus;|s(?:et(?:;|eq(?:;|q;)|neq(?:;|q;))|im;|u(?:b;|p;))))|w(?:Arr;|ar(?:hk;|r(?:;|ow;))|nwar;)|zlig;?)|t(?:a(?:rget;|u;)|brk;|c(?:aron;|edil;|y;)|dot;|elrec;|fr;|h(?:e(?:re(?:4;|fore;)|ta(?:;|sym;|v;))|i(?:ck(?:approx;|sim;)|nsp;)|k(?:ap;|sim;)|orn;?)|i(?:lde;|mes(?:;|b(?:;|ar;)|d;|)|nt;)|o(?:ea;|p(?:;|bot;|cir;|f(?:;|ork;))|sa;)|prime;|r(?:ade;|i(?:angle(?:;|down;|left(?:;|eq;)|q;|right(?:;|eq;))|dot;|e;|minus;|plus;|sb;|time;)|pezium;)|s(?:c(?:r;|y;)|hcy;|trok;)|w(?:ixt;|ohead(?:leftarrow;|rightarrow;)))|u(?:Arr;|Har;|a(?:cute;?|rr;)|br(?:cy;|eve;)|c(?:irc;?|y;)|d(?:arr;|blac;|har;)|f(?:isht;|r;)|grave;?|h(?:ar(?:l;|r;)|blk;)|l(?:c(?:orn(?:;|er;)|rop;)|tri;)|m(?:acr;|l;?)|o(?:gon;|pf;)|p(?:arrow;|downarrow;|harpoon(?:left;|right;)|lus;|si(?:;|h;|lon;)|uparrows;)|r(?:c(?:orn(?:;|er;)|rop;)|ing;|tri;)|scr;|t(?:dot;|ilde;|ri(?:;|f;))|u(?:arr;|ml;?)|wangle;)|v(?:Arr;|Bar(?:;|v;)|Dash;|a(?:ngrt;|r(?:epsilon;|kappa;|nothing;|p(?:hi;|i;|ropto;)|r(?:;|ho;)|s(?:igma;|u(?:bsetneq(?:;|q;)|psetneq(?:;|q;)))|t(?:heta;|riangle(?:left;|right;))))|cy;|dash;|e(?:e(?:;|bar;|eq;)|llip;|r(?:bar;|t;))|fr;|ltri;|nsu(?:b;|p;)|opf;|prop;|rtri;|s(?:cr;|u(?:bn(?:E;|e;)|pn(?:E;|e;)))|zigzag;)|w(?:circ;|e(?:d(?:bar;|ge(?:;|q;))|ierp;)|fr;|opf;|p;|r(?:;|eath;)|scr;)|x(?:c(?:ap;|irc;|up;)|dtri;|fr;|h(?:Arr;|arr;)|i;|l(?:Arr;|arr;)|map;|nis;|o(?:dot;|p(?:f;|lus;)|time;)|r(?:Arr;|arr;)|s(?:cr;|qcup;)|u(?:plus;|tri;)|vee;|wedge;)|y(?:ac(?:ute;?|y;)|c(?:irc;|y;)|en;?|fr;|icy;|opf;|scr;|u(?:cy;|ml;?))|z(?:acute;|c(?:aron;|y;)|dot;|e(?:etrf;|ta;)|fr;|hcy;|igrarr;|opf;|scr;|w(?:j;|nj;)))|[\s\S]/g,ZV=32,YV=/[^\r"&\u0000]+/g,XV=/[^\r'&\u0000]+/g,zV=/[^\r\t\n\f &>\u0000]+/g,QV=/[^\r\t\n\f \/>A-Z\u0000]+/g,GV=/[^\r\t\n\f \/=>A-Z\u0000]+/g,WV=/[^\]\r\u0000\uffff]*/g,JV=/[^&<\r\u0000\uffff]*/g,_z=/[^<\r\u0000\uffff]*/g,VV=/[^\r\u0000\uffff]*/g,Hz=/(?:(\/)?([a-z]+)>)|[\s\S]/g,Bz=/(?:([-a-z]+)[ \t\n\f]*=[ \t\n\f]*('[^'&\r\u0000]*'|"[^"&\r\u0000]*"|[^\t\n\r\f "&'\u0000>][^&> \t\n\r\f\u0000]*[ \t\n\f]))|[\s\S]/g,W9=/[^\x09\x0A\x0C\x0D\x20]/,JZ=/[^\x09\x0A\x0C\x0D\x20]/g,_V=/[^\x00\x09\x0A\x0C\x0D\x20]/,X8=/^[\x09\x0A\x0C\x0D\x20]+/,J9=/\x00/g;function p0($){var Z=16384;if($.length<Z)return String.fromCharCode.apply(String,$);var Y="";for(var X=0;X<$.length;X+=Z)Y+=String.fromCharCode.apply(String,$.slice(X,X+Z));return Y}function HV($){var Z=[];for(var Y=0;Y<$.length;Y++)Z[Y]=$.charCodeAt(Y);return Z}function _0($,Z){if(typeof Z==="string")return $.namespaceURI===p.HTML&&$.localName===Z;var Y=Z[$.namespaceURI];return Y&&Y[$.localName]}function qz($){return _0($,Az)}function jz($){if(_0($,Pz))return!0;if($.namespaceURI===p.MATHML&&$.localName==="annotation-xml"){var Z=$.getAttribute("encoding");if(Z)Z=Z.toLowerCase();if(Z==="text/html"||Z==="application/xhtml+xml")return!0}return!1}function BV($){if($ in Wz)return Wz[$];else return $}function Kz($){for(var Z=0,Y=$.length;Z<Y;Z++)if($[Z][0]in Gz)$[Z][0]=Gz[$[Z][0]]}function Fz($){for(var Z=0,Y=$.length;Z<Y;Z++)if($[Z][0]==="definitionurl"){$[Z][0]="definitionURL";break}}function VZ($){for(var Z=0,Y=$.length;Z<Y;Z++)if($[Z][0]in Qz)$[Z].push(Qz[$[Z][0]])}function Oz($,Z){for(var Y=0,X=$.length;Y<X;Y++){var z=$[Y][0],Q=$[Y][1];if(Z.hasAttribute(z))continue;Z._setAttribute(z,Q)}}Y0.ElementStack=function $(){this.elements=[],this.top=null};Y0.ElementStack.prototype.push=function($){this.elements.push($),this.top=$};Y0.ElementStack.prototype.pop=function($){this.elements.pop(),this.top=this.elements[this.elements.length-1]};Y0.ElementStack.prototype.popTag=function($){for(var Z=this.elements.length-1;Z>0;Z--){var Y=this.elements[Z];if(_0(Y,$))break}this.elements.length=Z,this.top=this.elements[Z-1]};Y0.ElementStack.prototype.popElementType=function($){for(var Z=this.elements.length-1;Z>0;Z--)if(this.elements[Z]instanceof $)break;this.elements.length=Z,this.top=this.elements[Z-1]};Y0.ElementStack.prototype.popElement=function($){for(var Z=this.elements.length-1;Z>0;Z--)if(this.elements[Z]===$)break;this.elements.length=Z,this.top=this.elements[Z-1]};Y0.ElementStack.prototype.removeElement=function($){if(this.top===$)this.pop();else{var Z=this.elements.lastIndexOf($);if(Z!==-1)this.elements.splice(Z,1)}};Y0.ElementStack.prototype.clearToContext=function($){for(var Z=this.elements.length-1;Z>0;Z--)if(_0(this.elements[Z],$))break;this.elements.length=Z+1,this.top=this.elements[Z]};Y0.ElementStack.prototype.contains=function($){return this.inSpecificScope($,Object.create(null))};Y0.ElementStack.prototype.inSpecificScope=function($,Z){for(var Y=this.elements.length-1;Y>=0;Y--){var X=this.elements[Y];if(_0(X,$))return!0;if(_0(X,Z))return!1}return!1};Y0.ElementStack.prototype.elementInSpecificScope=function($,Z){for(var Y=this.elements.length-1;Y>=0;Y--){var X=this.elements[Y];if(X===$)return!0;if(_0(X,Z))return!1}return!1};Y0.ElementStack.prototype.elementTypeInSpecificScope=function($,Z){for(var Y=this.elements.length-1;Y>=0;Y--){var X=this.elements[Y];if(X instanceof $)return!0;if(_0(X,Z))return!1}return!1};Y0.ElementStack.prototype.inScope=function($){return this.inSpecificScope($,I1)};Y0.ElementStack.prototype.elementInScope=function($){return this.elementInSpecificScope($,I1)};Y0.ElementStack.prototype.elementTypeInScope=function($){return this.elementTypeInSpecificScope($,I1)};Y0.ElementStack.prototype.inButtonScope=function($){return this.inSpecificScope($,BZ)};Y0.ElementStack.prototype.inListItemScope=function($){return this.inSpecificScope($,H9)};Y0.ElementStack.prototype.inTableScope=function($){return this.inSpecificScope($,Uz)};Y0.ElementStack.prototype.inSelectScope=function($){for(var Z=this.elements.length-1;Z>=0;Z--){var Y=this.elements[Z];if(Y.namespaceURI!==p.HTML)return!1;var X=Y.localName;if(X===$)return!0;if(X!=="optgroup"&&X!=="option")return!1}return!1};Y0.ElementStack.prototype.generateImpliedEndTags=function($,Z){var Y=Z?Iz:Lz;for(var X=this.elements.length-1;X>=0;X--){var z=this.elements[X];if($&&_0(z,$))break;if(!_0(this.elements[X],Y))break}this.elements.length=X+1,this.top=this.elements[X]};Y0.ActiveFormattingElements=function $(){this.list=[],this.attrs=[]};Y0.ActiveFormattingElements.prototype.MARKER={localName:"|"};Y0.ActiveFormattingElements.prototype.insertMarker=function(){this.list.push(this.MARKER),this.attrs.push(this.MARKER)};Y0.ActiveFormattingElements.prototype.push=function($,Z){var Y=0;for(var X=this.list.length-1;X>=0;X--){if(this.list[X]===this.MARKER)break;if(G($,this.list[X],this.attrs[X])){if(Y++,Y===3){this.list.splice(X,1),this.attrs.splice(X,1);break}}}this.list.push($);var z=[];for(var Q=0;Q<Z.length;Q++)z[Q]=Z[Q];this.attrs.push(z);function G(V,_,B){if(V.localName!==_.localName)return!1;if(V._numattrs!==B.length)return!1;for(var q=0,F=B.length;q<F;q++){var M=B[q][0],H=B[q][1];if(!V.hasAttribute(M))return!1;if(V.getAttribute(M)!==H)return!1}return!0}};Y0.ActiveFormattingElements.prototype.clearToMarker=function(){for(var $=this.list.length-1;$>=0;$--)if(this.list[$]===this.MARKER)break;if($<0)$=0;this.list.length=$,this.attrs.length=$};Y0.ActiveFormattingElements.prototype.findElementByTag=function($){for(var Z=this.list.length-1;Z>=0;Z--){var Y=this.list[Z];if(Y===this.MARKER)break;if(Y.localName===$)return Y}return null};Y0.ActiveFormattingElements.prototype.indexOf=function($){return this.list.lastIndexOf($)};Y0.ActiveFormattingElements.prototype.remove=function($){var Z=this.list.lastIndexOf($);if(Z!==-1)this.list.splice(Z,1),this.attrs.splice(Z,1)};Y0.ActiveFormattingElements.prototype.replace=function($,Z,Y){var X=this.list.lastIndexOf($);if(X!==-1)this.list[X]=Z,this.attrs[X]=Y};Y0.ActiveFormattingElements.prototype.insertAfter=function($,Z){var Y=this.list.lastIndexOf($);if(Y!==-1)this.list.splice(Y,0,Z),this.attrs.splice(Y,0,Z)};function Y0($,Z,Y){var X=null,z=0,Q=0,G=!1,V=!1,_=0,B=[],q="",F=!0,M=0,H=a,O,D,T="",g="",C=[],f="",s="",N=[],w=[],y=[],v=[],$0=[],x0=!1,S=uQ,E0=null,A0=[],K=new Y0.ElementStack,P=new Y0.ActiveFormattingElements,b=Z!==void 0,r=null,H0=null,X0=!0;if(Z)X0=Z.ownerDocument._scripting_enabled;if(Y&&Y.scripting_enabled===!1)X0=!1;var d=!0,B0=!1,K0,o,A=[],Z0=!1,R0=!1,l1={document:function(){return z0},_asDocumentFragment:function(){var W=z0.createDocumentFragment(),J=z0.firstChild;while(J.hasChildNodes())W.appendChild(J.firstChild);return W},pause:function(){M++},resume:function(){M--,this.parse("")},parse:function(W,J,j){var L;if(M>0)return q+=W,!0;if(_===0){if(q)W=q+W,q="";if(J)W+="\uFFFF",G=!0;if(X=W,z=W.length,Q=0,F){if(F=!1,X.charCodeAt(0)===65279)Q=1}_++,L=lZ(j),q=X.substring(Q,z),_--}else{if(_++,B.push(X,z,Q),X=W,z=W.length,Q=0,lZ(),L=!1,q=X.substring(Q,z),Q=B.pop(),z=B.pop(),X=B.pop(),q)X=q+X.substring(Q),z=X.length,Q=0,q="";_--}return L}},z0=new iJ(!0,$);if(z0._parser=l1,z0._scripting_enabled=X0,Z){if(Z.ownerDocument._quirks)z0._quirks=!0;if(Z.ownerDocument._limitedQuirks)z0._limitedQuirks=!0;if(Z.namespaceURI===p.HTML)switch(Z.localName){case"title":case"textarea":H=y1;break;case"style":case"xmp":case"iframe":case"noembed":case"noframes":case"script":case"plaintext":H=y9;break}var cZ=z0.createElement("html");if(z0._appendChild(cZ),K.push(cZ),Z instanceof V0.HTMLTemplateElement)A0.push(c9);w8();for(var T8=Z;T8!==null;T8=T8.parentElement)if(T8 instanceof V0.HTMLFormElement){H0=T8;break}}function lZ(W){var J,j,L,U;while(Q<z){if(M>0||W&&W())return!0;switch(typeof H.lookahead){case"undefined":if(J=X.charCodeAt(Q++),V){if(V=!1,J===10){Q++;continue}}switch(J){case 13:if(Q<z){if(X.charCodeAt(Q)===10)Q++}else V=!0;H(10);break;case 65535:if(G&&Q===z){H(G9);break}default:H(J);break}break;case"number":J=X.charCodeAt(Q);var E=H.lookahead,u=!0;if(E<0)u=!1,E=-E;if(E<z-Q)j=u?X.substring(Q,Q+E):null,U=!1;else if(G){if(j=u?X.substring(Q,z):null,U=!0,J===65535&&Q===z-1)J=G9}else return!0;H(J,j,U);break;case"string":J=X.charCodeAt(Q),L=H.lookahead;var t=X.indexOf(L,Q);if(t!==-1)j=X.substring(Q,t+L.length),U=!1;else{if(!G)return!0;if(j=X.substring(Q,z),J===65535&&Q===z-1)J=G9;U=!0}H(J,j,U);break}}return!1}function w1(W,J){for(var j=0;j<$0.length;j++)if($0[j][0]===W)return;if(J!==void 0)$0.push([W,J]);else $0.push([W])}function i2(){Bz.lastIndex=Q-1;var W=Bz.exec(X);if(!W)throw new Error("should never happen");var J=W[1];if(!J)return!1;var j=W[2],L=j.length;switch(j[0]){case'"':case"'":j=j.substring(1,L-1),Q+=W[0].length-1,H=g9;break;default:H=M1,Q+=W[0].length-1,j=j.substring(0,L-1);break}for(var U=0;U<$0.length;U++)if($0[U][0]===J)return!0;return $0.push([J,j]),!0}function s2(){x0=!1,T="",$0.length=0}function C8(){x0=!0,T="",$0.length=0}function S1(){C.length=0}function N9(){f=""}function w9(){s=""}function iZ(){N.length=0}function W8(){w.length=0,y=null,v=null}function K6(){y=[]}function b1(){v=[]}function G0(){B0=!0}function n2(){return K.top&&K.top.namespaceURI!=="http://www.w3.org/1999/xhtml"}function Y1(W){return g===W}function J8(){if(A.length>0){var W=p0(A);if(A.length=0,R0){if(R0=!1,W[0]===`
|
|
30
|
+
`)W=W.substring(1);if(W.length===0)return}P0(U8,W),Z0=!1}R0=!1}function E8(W){W.lastIndex=Q-1;var J=W.exec(X);if(J&&J.index===Q-1){if(J=J[0],Q+=J.length-1,G&&Q===z)J=J.slice(0,-1),Q--;return J}else throw new Error("should never happen")}function R8(W){W.lastIndex=Q-1;var J=W.exec(X)[0];if(!J)return!1;return o2(J),Q+=J.length-1,!0}function o2(W){if(A.length>0)J8();if(R0){if(R0=!1,W[0]===`
|
|
31
|
+
`)W=W.substring(1);if(W.length===0)return}P0(U8,W)}function U1(){if(x0)P0(e,T);else{var W=T;T="",g=W,P0(v0,W,$0)}}function r2(){if(Q===z)return!1;Hz.lastIndex=Q;var W=Hz.exec(X);if(!W)throw new Error("should never happen");var J=W[2];if(!J)return!1;var j=W[1];if(j)Q+=J.length+2,P0(e,J);else Q+=J.length+1,g=J,P0(v0,J,oJ);return!0}function a2(){if(x0)P0(e,T,null,!0);else P0(v0,T,$0,!0)}function W0(){P0(nJ,p0(w),y?p0(y):void 0,v?p0(v):void 0)}function n(){J8(),S(G9),z0.modclock=1}var P0=l1.insertToken=function W(J,j,L,U){J8();var E=K.top;if(!E||E.namespaceURI===p.HTML)S(J,j,L,U);else if(J!==v0&&J!==U8)J7(J,j,L,U);else if(qz(E)&&(J===U8||J===v0&&j!=="mglyph"&&j!=="malignmark")||J===v0&&j==="svg"&&E.namespaceURI===p.MATHML&&E.localName==="annotation-xml"||jz(E))o=!0,S(J,j,L,U),o=!1;else J7(J,j,L,U)};function K1(W){var J=K.top;if(x1&&_0(J,A8))O6(function(j){return j.createComment(W)});else{if(J instanceof V0.HTMLTemplateElement)J=J.content;J._appendChild(J.ownerDocument.createComment(W))}}function F1(W){var J=K.top;if(x1&&_0(J,A8))O6(function(L){return L.createTextNode(W)});else{if(J instanceof V0.HTMLTemplateElement)J=J.content;var j=J.lastChild;if(j&&j.nodeType===WZ.TEXT_NODE)j.appendData(W);else J._appendChild(J.ownerDocument.createTextNode(W))}}function N8(W,J,j){var L=Mz.createElement(W,J,null);if(j)for(var U=0,E=j.length;U<E;U++)L._setAttribute(j[U][0],j[U][1]);return L}var x1=!1;function l(W,J){var j=F6(function(L){return N8(L,W,J)});if(_0(j,Sz))j._form=H0;return j}function F6(W){var J;if(x1&&_0(K.top,A8))J=O6(W);else if(K.top instanceof V0.HTMLTemplateElement)J=W(K.top.content.ownerDocument),K.top.content._appendChild(J);else J=W(K.top.ownerDocument),K.top._appendChild(J);return K.push(J),J}function b9(W,J,j){return F6(function(L){var U=L._createElementNS(W,j,null);if(J)for(var E=0,u=J.length;E<u;E++){var t=J[E];if(t.length===2)U._setAttribute(t[0],t[1]);else U._setAttributeNS(t[2],t[0],t[1])}return U})}function sZ(W){for(var J=K.elements.length-1;J>=0;J--)if(K.elements[J]instanceof W)return J;return-1}function O6(W){var J,j,L=-1,U=-1,E;if(L=sZ(V0.HTMLTableElement),U=sZ(V0.HTMLTemplateElement),U>=0&&(L<0||U>L))J=K.elements[U];else if(L>=0)if(J=K.elements[L].parentNode,J)j=K.elements[L];else J=K.elements[L-1];if(!J)J=K.elements[0];if(J instanceof V0.HTMLTemplateElement)J=J.content;if(E=W(J.ownerDocument),E.nodeType===WZ.TEXT_NODE){var u;if(j)u=j.previousSibling;else u=J.lastChild;if(u&&u.nodeType===WZ.TEXT_NODE)return u.appendData(E.data),E}if(j)J.insertBefore(E,j);else J._appendChild(E);return E}function w8(){var W=!1;for(var J=K.elements.length-1;J>=0;J--){var j=K.elements[J];if(J===0){if(W=!0,b)j=Z}if(j.namespaceURI===p.HTML){var L=j.localName;switch(L){case"select":for(var U=J;U>0;){var E=K.elements[--U];if(E instanceof V0.HTMLTemplateElement)break;else if(E instanceof V0.HTMLTableElement){S=w6;return}}S=A1;return;case"tr":S=y8;return;case"tbody":case"tfoot":case"thead":S=o1;return;case"caption":S=d9;return;case"colgroup":S=N6;return;case"table":S=X1;return;case"template":S=A0[A0.length-1];return;case"body":S=m;return;case"frameset":S=l9;return;case"html":if(r===null)S=E6;else S=u9;return;default:if(!W){if(L==="head"){S=M0;return}if(L==="td"||L==="th"){S=V8;return}}}}if(W){S=m;return}}}function M6(W,J){l(W,J),H=b8,E0=S,S=R6}function t2(W,J){l(W,J),H=y1,E0=S,S=R6}function x9(W,J){return{elt:N8(W,P.list[J].localName,P.attrs[J]),attrs:P.attrs[J]}}function l0(){if(P.list.length===0)return;var W=P.list[P.list.length-1];if(W===P.MARKER)return;if(K.elements.lastIndexOf(W)!==-1)return;for(var J=P.list.length-2;J>=0;J--){if(W=P.list[J],W===P.MARKER)break;if(K.elements.lastIndexOf(W)!==-1)break}for(J=J+1;J<P.list.length;J++){var j=F6(function(L){return x9(L,J).elt});P.list[J]=j}}var D6={localName:"BM"};function e2(W){if(_0(K.top,W)&&P.indexOf(K.top)===-1)return K.pop(),!0;var J=0;while(J<8){J++;var j=P.findElementByTag(W);if(!j)return!1;var L=K.elements.lastIndexOf(j);if(L===-1)return P.remove(j),!0;if(!K.elementInScope(j))return!0;var U=null,E;for(var u=L+1;u<K.elements.length;u++)if(_0(K.elements[u],z8)){U=K.elements[u],E=u;break}if(!U)return K.popElement(j),P.remove(j),!0;else{var t=K.elements[L-1];P.insertAfter(j,D6);var F0=U,y0=U,z1=E,W1,r1=0;while(!0){if(r1++,F0=K.elements[--z1],F0===j)break;if(W1=P.indexOf(F0),r1>3&&W1!==-1)P.remove(F0),W1=-1;if(W1===-1){K.removeElement(F0);continue}var v1=x9(t.ownerDocument,W1);if(P.replace(F0,v1.elt,v1.attrs),K.elements[z1]=v1.elt,F0=v1.elt,y0===U)P.remove(D6),P.insertAfter(v1.elt,D6);F0._appendChild(y0),y0=F0}if(x1&&_0(t,A8))O6(function(){return y0});else if(t instanceof V0.HTMLTemplateElement)t.content._appendChild(y0);else t._appendChild(y0);var f8=x9(U.ownerDocument,P.indexOf(j));while(U.hasChildNodes())f8.elt._appendChild(U.firstChild);U._appendChild(f8.elt),P.remove(j),P.replace(D6,f8.elt,f8.attrs),K.removeElement(j);var sQ=K.elements.lastIndexOf(U);K.elements.splice(sQ+1,0,f8.elt)}}return!0}function $Q(){K.pop(),S=E0;return}function i1(){if(delete z0._parser,K.elements.length=0,z0.defaultView)z0.defaultView.dispatchEvent(new V0.Event("load",{}))}function h(W,J){H=J,Q--}function a(W){switch(W){case 38:O=a,H=x8;break;case 60:if(r2())break;H=ZQ;break;case 0:A.push(W),Z0=!0;break;case-1:n();break;default:R8(JV)||A.push(W);break}}function y1(W){switch(W){case 38:O=y1,H=x8;break;case 60:H=XQ;break;case 0:A.push(65533),Z0=!0;break;case-1:n();break;default:A.push(W);break}}function b8(W){switch(W){case 60:H=GQ;break;case 0:A.push(65533);break;case-1:n();break;default:R8(_z)||A.push(W);break}}function f1(W){switch(W){case 60:H=VQ;break;case 0:A.push(65533);break;case-1:n();break;default:R8(_z)||A.push(W);break}}function y9(W){switch(W){case 0:A.push(65533);break;case-1:n();break;default:R8(VV)||A.push(W);break}}function ZQ(W){switch(W){case 33:H=aZ;break;case 47:H=YQ;break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:s2(),h(W,nZ);break;case 63:h(W,U6);break;default:A.push(60),h(W,a);break}}function YQ(W){switch(W){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:C8(),h(W,nZ);break;case 62:H=a;break;case-1:A.push(60),A.push(47),n();break;default:h(W,U6);break}}function nZ(W){switch(W){case 9:case 10:case 12:case 32:H=M1;break;case 47:H=h1;break;case 62:H=a,U1();break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:T+=String.fromCharCode(W+32);break;case 0:T+=String.fromCharCode(65533);break;case-1:n();break;default:T+=E8(QV);break}}function XQ(W){if(W===47)S1(),H=zQ;else A.push(60),h(W,y1)}function zQ(W){switch(W){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:C8(),h(W,QQ);break;default:A.push(60),A.push(47),h(W,y1);break}}function QQ(W){switch(W){case 9:case 10:case 12:case 32:if(Y1(T)){H=M1;return}break;case 47:if(Y1(T)){H=h1;return}break;case 62:if(Y1(T)){H=a,U1();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:T+=String.fromCharCode(W+32),C.push(W);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:T+=String.fromCharCode(W),C.push(W);return;default:break}A.push(60),A.push(47),Y8(A,C),h(W,y1)}function GQ(W){if(W===47)S1(),H=WQ;else A.push(60),h(W,b8)}function WQ(W){switch(W){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:C8(),h(W,JQ);break;default:A.push(60),A.push(47),h(W,b8);break}}function JQ(W){switch(W){case 9:case 10:case 12:case 32:if(Y1(T)){H=M1;return}break;case 47:if(Y1(T)){H=h1;return}break;case 62:if(Y1(T)){H=a,U1();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:T+=String.fromCharCode(W+32),C.push(W);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:T+=String.fromCharCode(W),C.push(W);return;default:break}A.push(60),A.push(47),Y8(A,C),h(W,b8)}function VQ(W){switch(W){case 47:S1(),H=_Q;break;case 33:H=BQ,A.push(60),A.push(33);break;default:A.push(60),h(W,f1);break}}function _Q(W){switch(W){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:C8(),h(W,HQ);break;default:A.push(60),A.push(47),h(W,f1);break}}function HQ(W){switch(W){case 9:case 10:case 12:case 32:if(Y1(T)){H=M1;return}break;case 47:if(Y1(T)){H=h1;return}break;case 62:if(Y1(T)){H=a,U1();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:T+=String.fromCharCode(W+32),C.push(W);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:T+=String.fromCharCode(W),C.push(W);return;default:break}A.push(60),A.push(47),Y8(A,C),h(W,f1)}function BQ(W){if(W===45)H=qQ,A.push(45);else h(W,f1)}function qQ(W){if(W===45)H=oZ,A.push(45);else h(W,f1)}function O1(W){switch(W){case 45:H=jQ,A.push(45);break;case 60:H=f9;break;case 0:A.push(65533);break;case-1:n();break;default:A.push(W);break}}function jQ(W){switch(W){case 45:H=oZ,A.push(45);break;case 60:H=f9;break;case 0:H=O1,A.push(65533);break;case-1:n();break;default:H=O1,A.push(W);break}}function oZ(W){switch(W){case 45:A.push(45);break;case 60:H=f9;break;case 62:H=f1,A.push(62);break;case 0:H=O1,A.push(65533);break;case-1:n();break;default:H=O1,A.push(W);break}}function f9(W){switch(W){case 47:S1(),H=KQ;break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:S1(),A.push(60),h(W,OQ);break;default:A.push(60),h(W,O1);break}}function KQ(W){switch(W){case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:C8(),h(W,FQ);break;default:A.push(60),A.push(47),h(W,O1);break}}function FQ(W){switch(W){case 9:case 10:case 12:case 32:if(Y1(T)){H=M1;return}break;case 47:if(Y1(T)){H=h1;return}break;case 62:if(Y1(T)){H=a,U1();return}break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:T+=String.fromCharCode(W+32),C.push(W);return;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:T+=String.fromCharCode(W),C.push(W);return;default:break}A.push(60),A.push(47),Y8(A,C),h(W,O1)}function OQ(W){switch(W){case 9:case 10:case 12:case 32:case 47:case 62:if(p0(C)==="script")H=k1;else H=O1;A.push(W);break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:C.push(W+32),A.push(W);break;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:C.push(W),A.push(W);break;default:h(W,O1);break}}function k1(W){switch(W){case 45:H=MQ,A.push(45);break;case 60:H=k9,A.push(60);break;case 0:A.push(65533);break;case-1:n();break;default:A.push(W);break}}function MQ(W){switch(W){case 45:H=DQ,A.push(45);break;case 60:H=k9,A.push(60);break;case 0:H=k1,A.push(65533);break;case-1:n();break;default:H=k1,A.push(W);break}}function DQ(W){switch(W){case 45:A.push(45);break;case 60:H=k9,A.push(60);break;case 62:H=f1,A.push(62);break;case 0:H=k1,A.push(65533);break;case-1:n();break;default:H=k1,A.push(W);break}}function k9(W){if(W===47)S1(),H=LQ,A.push(47);else h(W,k1)}function LQ(W){switch(W){case 9:case 10:case 12:case 32:case 47:case 62:if(p0(C)==="script")H=O1;else H=k1;A.push(W);break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:C.push(W+32),A.push(W);break;case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:C.push(W),A.push(W);break;default:h(W,k1);break}}function M1(W){switch(W){case 9:case 10:case 12:case 32:break;case 47:H=h1;break;case 62:H=a,U1();break;case-1:n();break;case 61:N9(),f+=String.fromCharCode(W),H=h9;break;default:if(i2())break;N9(),h(W,h9);break}}function h9(W){switch(W){case 9:case 10:case 12:case 32:case 47:case 62:case-1:h(W,IQ);break;case 61:H=rZ;break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:f+=String.fromCharCode(W+32);break;case 0:f+=String.fromCharCode(65533);break;case 34:case 39:case 60:default:f+=E8(GV);break}}function IQ(W){switch(W){case 9:case 10:case 12:case 32:break;case 47:w1(f),H=h1;break;case 61:H=rZ;break;case 62:H=a,w1(f),U1();break;case-1:w1(f),n();break;default:w1(f),N9(),h(W,h9);break}}function rZ(W){switch(W){case 9:case 10:case 12:case 32:break;case 34:w9(),H=L6;break;case 39:w9(),H=I6;break;case 62:default:w9(),h(W,S6);break}}function L6(W){switch(W){case 34:w1(f,s),H=g9;break;case 38:O=L6,H=x8;break;case 0:s+=String.fromCharCode(65533);break;case-1:n();break;case 10:s+=String.fromCharCode(W);break;default:s+=E8(YV);break}}function I6(W){switch(W){case 39:w1(f,s),H=g9;break;case 38:O=I6,H=x8;break;case 0:s+=String.fromCharCode(65533);break;case-1:n();break;case 10:s+=String.fromCharCode(W);break;default:s+=E8(XV);break}}function S6(W){switch(W){case 9:case 10:case 12:case 32:w1(f,s),H=M1;break;case 38:O=S6,H=x8;break;case 62:w1(f,s),H=a,U1();break;case 0:s+=String.fromCharCode(65533);break;case-1:Q--,H=a;break;case 34:case 39:case 60:case 61:case 96:default:s+=E8(zV);break}}function g9(W){switch(W){case 9:case 10:case 12:case 32:H=M1;break;case 47:H=h1;break;case 62:H=a,U1();break;case-1:n();break;default:h(W,M1);break}}function h1(W){switch(W){case 62:H=a,a2(!0);break;case-1:n();break;default:h(W,M1);break}}function U6(W,J,j){var L=J.length;if(j)Q+=L-1;else Q+=L;var U=J.substring(0,L-1);U=U.replace(/\u0000/g,"\uFFFD"),U=U.replace(/\u000D\u000A/g,`
|
|
32
|
+
`),U=U.replace(/\u000D/g,`
|
|
33
|
+
`),P0(L1,U),H=a}U6.lookahead=">";function aZ(W,J,j){if(J[0]==="-"&&J[1]==="-"){Q+=2,iZ(),H=SQ;return}if(J.toUpperCase()==="DOCTYPE")Q+=7,H=RQ;else if(J==="[CDATA["&&n2())Q+=7,H=m9;else H=U6}aZ.lookahead=7;function SQ(W){switch(iZ(),W){case 45:H=UQ;break;case 62:H=a,P0(L1,p0(N));break;default:h(W,s1);break}}function UQ(W){switch(W){case 45:H=A6;break;case 62:H=a,P0(L1,p0(N));break;case-1:P0(L1,p0(N)),n();break;default:N.push(45),h(W,s1);break}}function s1(W){switch(W){case 60:N.push(W),H=AQ;break;case 45:H=v9;break;case 0:N.push(65533);break;case-1:P0(L1,p0(N)),n();break;default:N.push(W);break}}function AQ(W){switch(W){case 33:N.push(W),H=PQ;break;case 60:N.push(W);break;default:h(W,s1);break}}function PQ(W){switch(W){case 45:H=TQ;break;default:h(W,s1);break}}function TQ(W){switch(W){case 45:H=CQ;break;default:h(W,v9);break}}function CQ(W){switch(W){case 62:case-1:h(W,A6);break;default:h(W,A6);break}}function v9(W){switch(W){case 45:H=A6;break;case-1:P0(L1,p0(N)),n();break;default:N.push(45),h(W,s1);break}}function A6(W){switch(W){case 62:H=a,P0(L1,p0(N));break;case 33:H=EQ;break;case 45:N.push(45);break;case-1:P0(L1,p0(N)),n();break;default:N.push(45),N.push(45),h(W,s1);break}}function EQ(W){switch(W){case 45:N.push(45),N.push(45),N.push(33),H=v9;break;case 62:H=a,P0(L1,p0(N));break;case-1:P0(L1,p0(N)),n();break;default:N.push(45),N.push(45),N.push(33),h(W,s1);break}}function RQ(W){switch(W){case 9:case 10:case 12:case 32:H=tZ;break;case-1:W8(),G0(),W0(),n();break;default:h(W,tZ);break}}function tZ(W){switch(W){case 9:case 10:case 12:case 32:break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:W8(),w.push(W+32),H=p9;break;case 0:W8(),w.push(65533),H=p9;break;case 62:W8(),G0(),H=a,W0();break;case-1:W8(),G0(),W0(),n();break;default:W8(),w.push(W),H=p9;break}}function p9(W){switch(W){case 9:case 10:case 12:case 32:H=eZ;break;case 62:H=a,W0();break;case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:w.push(W+32);break;case 0:w.push(65533);break;case-1:G0(),W0(),n();break;default:w.push(W);break}}function eZ(W,J,j){switch(W){case 9:case 10:case 12:case 32:Q+=1;break;case 62:H=a,Q+=1,W0();break;case-1:G0(),W0(),n();break;default:if(J=J.toUpperCase(),J==="PUBLIC")Q+=6,H=NQ;else if(J==="SYSTEM")Q+=6,H=xQ;else G0(),H=g1;break}}eZ.lookahead=6;function NQ(W){switch(W){case 9:case 10:case 12:case 32:H=wQ;break;case 34:K6(),H=$7;break;case 39:K6(),H=Z7;break;case 62:G0(),H=a,W0();break;case-1:G0(),W0(),n();break;default:G0(),H=g1;break}}function wQ(W){switch(W){case 9:case 10:case 12:case 32:break;case 34:K6(),H=$7;break;case 39:K6(),H=Z7;break;case 62:G0(),H=a,W0();break;case-1:G0(),W0(),n();break;default:G0(),H=g1;break}}function $7(W){switch(W){case 34:H=Y7;break;case 0:y.push(65533);break;case 62:G0(),H=a,W0();break;case-1:G0(),W0(),n();break;default:y.push(W);break}}function Z7(W){switch(W){case 39:H=Y7;break;case 0:y.push(65533);break;case 62:G0(),H=a,W0();break;case-1:G0(),W0(),n();break;default:y.push(W);break}}function Y7(W){switch(W){case 9:case 10:case 12:case 32:H=bQ;break;case 62:H=a,W0();break;case 34:b1(),H=P6;break;case 39:b1(),H=T6;break;case-1:G0(),W0(),n();break;default:G0(),H=g1;break}}function bQ(W){switch(W){case 9:case 10:case 12:case 32:break;case 62:H=a,W0();break;case 34:b1(),H=P6;break;case 39:b1(),H=T6;break;case-1:G0(),W0(),n();break;default:G0(),H=g1;break}}function xQ(W){switch(W){case 9:case 10:case 12:case 32:H=yQ;break;case 34:b1(),H=P6;break;case 39:b1(),H=T6;break;case 62:G0(),H=a,W0();break;case-1:G0(),W0(),n();break;default:G0(),H=g1;break}}function yQ(W){switch(W){case 9:case 10:case 12:case 32:break;case 34:b1(),H=P6;break;case 39:b1(),H=T6;break;case 62:G0(),H=a,W0();break;case-1:G0(),W0(),n();break;default:G0(),H=g1;break}}function P6(W){switch(W){case 34:H=X7;break;case 0:v.push(65533);break;case 62:G0(),H=a,W0();break;case-1:G0(),W0(),n();break;default:v.push(W);break}}function T6(W){switch(W){case 39:H=X7;break;case 0:v.push(65533);break;case 62:G0(),H=a,W0();break;case-1:G0(),W0(),n();break;default:v.push(W);break}}function X7(W){switch(W){case 9:case 10:case 12:case 32:break;case 62:H=a,W0();break;case-1:G0(),W0(),n();break;default:H=g1;break}}function g1(W){switch(W){case 62:H=a,W0();break;case-1:W0(),n();break;default:break}}function m9(W){switch(W){case 93:H=fQ;break;case-1:n();break;case 0:Z0=!0;default:R8(WV)||A.push(W);break}}function fQ(W){switch(W){case 93:H=kQ;break;default:A.push(93),h(W,m9);break}}function kQ(W){switch(W){case 93:A.push(93);break;case 62:J8(),H=a;break;default:A.push(93),A.push(93),h(W,m9);break}}function x8(W){switch(S1(),C.push(38),W){case 9:case 10:case 12:case 32:case 60:case 38:case-1:h(W,n1);break;case 35:C.push(W),H=hQ;break;default:h(W,z7);break}}function z7(W){Vz.lastIndex=Q;var J=Vz.exec(X);if(!J)throw new Error("should never happen");var j=J[1];if(!j){H=n1;return}switch(Q+=j.length,Y8(C,HV(j)),O){case L6:case I6:case S6:if(j[j.length-1]!==";"){if(/[=A-Za-z0-9]/.test(X[Q])){H=n1;return}}break;default:break}S1();var L=$V[j];if(typeof L==="number")C.push(L);else Y8(C,L);H=n1}z7.lookahead=-ZV;function hQ(W){switch(D=0,W){case 120:case 88:C.push(W),H=gQ;break;default:h(W,vQ);break}}function gQ(W){switch(W){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 65:case 66:case 67:case 68:case 69:case 70:case 97:case 98:case 99:case 100:case 101:case 102:h(W,pQ);break;default:h(W,n1);break}}function vQ(W){switch(W){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:h(W,mQ);break;default:h(W,n1);break}}function pQ(W){switch(W){case 65:case 66:case 67:case 68:case 69:case 70:D*=16,D+=W-55;break;case 97:case 98:case 99:case 100:case 101:case 102:D*=16,D+=W-87;break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:D*=16,D+=W-48;break;case 59:H=C6;break;default:h(W,C6);break}}function mQ(W){switch(W){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:D*=10,D+=W-48;break;case 59:H=C6;break;default:h(W,C6);break}}function C6(W){if(D in Jz)D=Jz[D];else if(D>1114111||D>=55296&&D<57344)D=65533;if(S1(),D<=65535)C.push(D);else D=D-65536,C.push(55296+(D>>10)),C.push(56320+(D&1023));h(W,n1)}function n1(W){switch(O){case L6:case I6:case S6:s+=p0(C);break;default:Y8(A,C);break}h(W,O)}function uQ(W,J,j,L){switch(W){case 1:if(J=J.replace(X8,""),J.length===0)return;break;case 4:z0._appendChild(z0.createComment(J));return;case 5:var U=J,E=j,u=L;if(z0.appendChild(new sJ(z0,U,E,u)),B0||U.toLowerCase()!=="html"||rJ.test(E)||u&&u.toLowerCase()===aJ||u===void 0&&zz.test(E))z0._quirks=!0;else if(tJ.test(E)||u!==void 0&&zz.test(E))z0._limitedQuirks=!0;S=Q7;return}z0._quirks=!0,S=Q7,S(W,J,j,L)}function Q7(W,J,j,L){var U;switch(W){case 1:if(J=J.replace(X8,""),J.length===0)return;break;case 5:return;case 4:z0._appendChild(z0.createComment(J));return;case 2:if(J==="html"){U=N8(z0,J,j),K.push(U),z0.appendChild(U),S=E6;return}break;case 3:switch(J){case"html":case"head":case"body":case"br":break;default:return}}U=N8(z0,"html",null),K.push(U),z0.appendChild(U),S=E6,S(W,J,j,L)}function E6(W,J,j,L){switch(W){case 1:if(J=J.replace(X8,""),J.length===0)return;break;case 5:return;case 4:K1(J);return;case 2:switch(J){case"html":m(W,J,j,L);return;case"head":var U=l(J,j);r=U,S=M0;return}break;case 3:switch(J){case"html":case"head":case"body":case"br":break;default:return}}E6(v0,"head",null),S(W,J,j,L)}function M0(W,J,j,L){switch(W){case 1:var U=J.match(X8);if(U)F1(U[0]),J=J.substring(U[0].length);if(J.length===0)return;break;case 4:K1(J);return;case 5:return;case 2:switch(J){case"html":m(W,J,j,L);return;case"meta":case"base":case"basefont":case"bgsound":case"link":l(J,j),K.pop();return;case"title":t2(J,j);return;case"noscript":if(!X0){l(J,j),S=G7;return}case"noframes":case"style":M6(J,j);return;case"script":F6(function(E){var u=N8(E,J,j);if(u._parser_inserted=!0,u._force_async=!1,b)u._already_started=!0;return J8(),u}),H=f1,E0=S,S=R6;return;case"template":l(J,j),P.insertMarker(),d=!1,S=c9,A0.push(S);return;case"head":return}break;case 3:switch(J){case"head":K.pop(),S=u9;return;case"body":case"html":case"br":break;case"template":if(!K.contains("template"))return;K.generateImpliedEndTags(null,"thorough"),K.popTag("template"),P.clearToMarker(),A0.pop(),w8();return;default:return}break}M0(e,"head",null),S(W,J,j,L)}function G7(W,J,j,L){switch(W){case 5:return;case 4:M0(W,J);return;case 1:var U=J.match(X8);if(U)M0(W,U[0]),J=J.substring(U[0].length);if(J.length===0)return;break;case 2:switch(J){case"html":m(W,J,j,L);return;case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"style":M0(W,J,j);return;case"head":case"noscript":return}break;case 3:switch(J){case"noscript":K.pop(),S=M0;return;case"br":break;default:return}break}G7(e,"noscript",null),S(W,J,j,L)}function u9(W,J,j,L){switch(W){case 1:var U=J.match(X8);if(U)F1(U[0]),J=J.substring(U[0].length);if(J.length===0)return;break;case 4:K1(J);return;case 5:return;case 2:switch(J){case"html":m(W,J,j,L);return;case"body":l(J,j),d=!1,S=m;return;case"frameset":l(J,j),S=l9;return;case"base":case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"script":case"style":case"template":case"title":K.push(r),M0(v0,J,j),K.removeElement(r);return;case"head":return}break;case 3:switch(J){case"template":return M0(W,J,j,L);case"body":case"html":case"br":break;default:return}break}u9(v0,"body",null),d=!0,S(W,J,j,L)}function m(W,J,j,L){var U,E,u,t;switch(W){case 1:if(Z0){if(J=J.replace(J9,""),J.length===0)return}if(d&&W9.test(J))d=!1;l0(),F1(J);return;case 5:return;case 4:K1(J);return;case-1:if(A0.length)return c9(W);i1();return;case 2:switch(J){case"html":if(K.contains("template"))return;Oz(j,K.elements[0]);return;case"base":case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"script":case"style":case"template":case"title":M0(v0,J,j);return;case"body":if(U=K.elements[1],!U||!(U instanceof V0.HTMLBodyElement)||K.contains("template"))return;d=!1,Oz(j,U);return;case"frameset":if(!d)return;if(U=K.elements[1],!U||!(U instanceof V0.HTMLBodyElement))return;if(U.parentNode)U.parentNode.removeChild(U);while(!(K.top instanceof V0.HTMLHtmlElement))K.pop();l(J,j),S=l9;return;case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"nav":case"ol":case"p":case"section":case"summary":case"ul":if(K.inButtonScope("p"))m(e,"p");l(J,j);return;case"menu":if(K.inButtonScope("p"))m(e,"p");if(_0(K.top,"menuitem"))K.pop();l(J,j);return;case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":if(K.inButtonScope("p"))m(e,"p");if(K.top instanceof V0.HTMLHeadingElement)K.pop();l(J,j);return;case"pre":case"listing":if(K.inButtonScope("p"))m(e,"p");l(J,j),R0=!0,d=!1;return;case"form":if(H0&&!K.contains("template"))return;if(K.inButtonScope("p"))m(e,"p");if(t=l(J,j),!K.contains("template"))H0=t;return;case"li":d=!1;for(E=K.elements.length-1;E>=0;E--){if(u=K.elements[E],u instanceof V0.HTMLLIElement){m(e,"li");break}if(_0(u,z8)&&!_0(u,_Z))break}if(K.inButtonScope("p"))m(e,"p");l(J,j);return;case"dd":case"dt":d=!1;for(E=K.elements.length-1;E>=0;E--){if(u=K.elements[E],_0(u,Dz)){m(e,u.localName);break}if(_0(u,z8)&&!_0(u,_Z))break}if(K.inButtonScope("p"))m(e,"p");l(J,j);return;case"plaintext":if(K.inButtonScope("p"))m(e,"p");l(J,j),H=y9;return;case"button":if(K.inScope("button"))m(e,"button"),S(W,J,j,L);else l0(),l(J,j),d=!1;return;case"a":var F0=P.findElementByTag("a");if(F0)m(e,J),P.remove(F0),K.removeElement(F0);case"b":case"big":case"code":case"em":case"font":case"i":case"s":case"small":case"strike":case"strong":case"tt":case"u":l0(),P.push(l(J,j),j);return;case"nobr":if(l0(),K.inScope(J))m(e,J),l0();P.push(l(J,j),j);return;case"applet":case"marquee":case"object":l0(),l(J,j),P.insertMarker(),d=!1;return;case"table":if(!z0._quirks&&K.inButtonScope("p"))m(e,"p");l(J,j),d=!1,S=X1;return;case"area":case"br":case"embed":case"img":case"keygen":case"wbr":l0(),l(J,j),K.pop(),d=!1;return;case"input":l0(),t=l(J,j),K.pop();var y0=t.getAttribute("type");if(!y0||y0.toLowerCase()!=="hidden")d=!1;return;case"param":case"source":case"track":l(J,j),K.pop();return;case"hr":if(K.inButtonScope("p"))m(e,"p");if(_0(K.top,"menuitem"))K.pop();l(J,j),K.pop(),d=!1;return;case"image":m(v0,"img",j,L);return;case"textarea":l(J,j),R0=!0,d=!1,H=y1,E0=S,S=R6;return;case"xmp":if(K.inButtonScope("p"))m(e,"p");l0(),d=!1,M6(J,j);return;case"iframe":d=!1,M6(J,j);return;case"noembed":M6(J,j);return;case"select":if(l0(),l(J,j),d=!1,S===X1||S===d9||S===o1||S===y8||S===V8)S=w6;else S=A1;return;case"optgroup":case"option":if(K.top instanceof V0.HTMLOptionElement)m(e,"option");l0(),l(J,j);return;case"menuitem":if(_0(K.top,"menuitem"))K.pop();l0(),l(J,j);return;case"rb":case"rtc":if(K.inScope("ruby"))K.generateImpliedEndTags();l(J,j);return;case"rp":case"rt":if(K.inScope("ruby"))K.generateImpliedEndTags("rtc");l(J,j);return;case"math":if(l0(),Fz(j),VZ(j),b9(J,j,p.MATHML),L)K.pop();return;case"svg":if(l0(),Kz(j),VZ(j),b9(J,j,p.SVG),L)K.pop();return;case"caption":case"col":case"colgroup":case"frame":case"head":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return}l0(),l(J,j);return;case 3:switch(J){case"template":M0(e,J,j);return;case"body":if(!K.inScope("body"))return;S=W7;return;case"html":if(!K.inScope("body"))return;S=W7,S(W,J,j);return;case"address":case"article":case"aside":case"blockquote":case"button":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"listing":case"main":case"menu":case"nav":case"ol":case"pre":case"section":case"summary":case"ul":if(!K.inScope(J))return;K.generateImpliedEndTags(),K.popTag(J);return;case"form":if(!K.contains("template")){var z1=H0;if(H0=null,!z1||!K.elementInScope(z1))return;K.generateImpliedEndTags(),K.removeElement(z1)}else{if(!K.inScope("form"))return;K.generateImpliedEndTags(),K.popTag("form")}return;case"p":if(!K.inButtonScope(J))m(v0,J,null),S(W,J,j,L);else K.generateImpliedEndTags(J),K.popTag(J);return;case"li":if(!K.inListItemScope(J))return;K.generateImpliedEndTags(J),K.popTag(J);return;case"dd":case"dt":if(!K.inScope(J))return;K.generateImpliedEndTags(J),K.popTag(J);return;case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":if(!K.elementTypeInScope(V0.HTMLHeadingElement))return;K.generateImpliedEndTags(),K.popElementType(V0.HTMLHeadingElement);return;case"sarcasm":break;case"a":case"b":case"big":case"code":case"em":case"font":case"i":case"nobr":case"s":case"small":case"strike":case"strong":case"tt":case"u":var W1=e2(J);if(W1)return;break;case"applet":case"marquee":case"object":if(!K.inScope(J))return;K.generateImpliedEndTags(),K.popTag(J),P.clearToMarker();return;case"br":m(v0,J,null);return}for(E=K.elements.length-1;E>=0;E--)if(u=K.elements[E],_0(u,J)){K.generateImpliedEndTags(J),K.popElement(u);break}else if(_0(u,z8))return;return}}function R6(W,J,j,L){switch(W){case 1:F1(J);return;case-1:if(K.top instanceof V0.HTMLScriptElement)K.top._already_started=!0;K.pop(),S=E0,S(W);return;case 3:if(J==="script")$Q();else K.pop(),S=E0;return;default:return}}function X1(W,J,j,L){function U(u){for(var t=0,F0=u.length;t<F0;t++)if(u[t][0]==="type")return u[t][1].toLowerCase();return null}switch(W){case 1:if(o){m(W,J,j,L);return}else if(_0(K.top,A8)){K0=[],E0=S,S=dQ,S(W,J,j,L);return}break;case 4:K1(J);return;case 5:return;case 2:switch(J){case"caption":K.clearToContext(V9),P.insertMarker(),l(J,j),S=d9;return;case"colgroup":K.clearToContext(V9),l(J,j),S=N6;return;case"col":X1(v0,"colgroup",null),S(W,J,j,L);return;case"tbody":case"tfoot":case"thead":K.clearToContext(V9),l(J,j),S=o1;return;case"td":case"th":case"tr":X1(v0,"tbody",null),S(W,J,j,L);return;case"table":if(!K.inTableScope(J))return;X1(e,J),S(W,J,j,L);return;case"style":case"script":case"template":M0(W,J,j,L);return;case"input":var E=U(j);if(E!=="hidden")break;l(J,j),K.pop();return;case"form":if(H0||K.contains("template"))return;H0=l(J,j),K.popElement(H0);return}break;case 3:switch(J){case"table":if(!K.inTableScope(J))return;K.popTag(J),w8();return;case"body":case"caption":case"col":case"colgroup":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return;case"template":M0(W,J,j,L);return}break;case-1:m(W,J,j,L);return}x1=!0,m(W,J,j,L),x1=!1}function dQ(W,J,j,L){if(W===U8){if(Z0){if(J=J.replace(J9,""),J.length===0)return}K0.push(J)}else{var U=K0.join("");if(K0.length=0,W9.test(U))x1=!0,m(U8,U),x1=!1;else F1(U);S=E0,S(W,J,j,L)}}function d9(W,J,j,L){function U(){if(!K.inTableScope("caption"))return!1;return K.generateImpliedEndTags(),K.popTag("caption"),P.clearToMarker(),S=X1,!0}switch(W){case 2:switch(J){case"caption":case"col":case"colgroup":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":if(U())S(W,J,j,L);return}break;case 3:switch(J){case"caption":U();return;case"table":if(U())S(W,J,j,L);return;case"body":case"col":case"colgroup":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return}break}m(W,J,j,L)}function N6(W,J,j,L){switch(W){case 1:var U=J.match(X8);if(U)F1(U[0]),J=J.substring(U[0].length);if(J.length===0)return;break;case 4:K1(J);return;case 5:return;case 2:switch(J){case"html":m(W,J,j,L);return;case"col":l(J,j),K.pop();return;case"template":M0(W,J,j,L);return}break;case 3:switch(J){case"colgroup":if(!_0(K.top,"colgroup"))return;K.pop(),S=X1;return;case"col":return;case"template":M0(W,J,j,L);return}break;case-1:m(W,J,j,L);return}if(!_0(K.top,"colgroup"))return;N6(e,"colgroup"),S(W,J,j,L)}function o1(W,J,j,L){function U(){if(!K.inTableScope("tbody")&&!K.inTableScope("thead")&&!K.inTableScope("tfoot"))return;K.clearToContext(_9),o1(e,K.top.localName,null),S(W,J,j,L)}switch(W){case 2:switch(J){case"tr":K.clearToContext(_9),l(J,j),S=y8;return;case"th":case"td":o1(v0,"tr",null),S(W,J,j,L);return;case"caption":case"col":case"colgroup":case"tbody":case"tfoot":case"thead":U();return}break;case 3:switch(J){case"table":U();return;case"tbody":case"tfoot":case"thead":if(K.inTableScope(J))K.clearToContext(_9),K.pop(),S=X1;return;case"body":case"caption":case"col":case"colgroup":case"html":case"td":case"th":case"tr":return}break}X1(W,J,j,L)}function y8(W,J,j,L){function U(){if(!K.inTableScope("tr"))return!1;return K.clearToContext(HZ),K.pop(),S=o1,!0}switch(W){case 2:switch(J){case"th":case"td":K.clearToContext(HZ),l(J,j),S=V8,P.insertMarker();return;case"caption":case"col":case"colgroup":case"tbody":case"tfoot":case"thead":case"tr":if(U())S(W,J,j,L);return}break;case 3:switch(J){case"tr":U();return;case"table":if(U())S(W,J,j,L);return;case"tbody":case"tfoot":case"thead":if(K.inTableScope(J)){if(U())S(W,J,j,L)}return;case"body":case"caption":case"col":case"colgroup":case"html":case"td":case"th":return}break}X1(W,J,j,L)}function V8(W,J,j,L){switch(W){case 2:switch(J){case"caption":case"col":case"colgroup":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":if(K.inTableScope("td"))V8(e,"td"),S(W,J,j,L);else if(K.inTableScope("th"))V8(e,"th"),S(W,J,j,L);return}break;case 3:switch(J){case"td":case"th":if(!K.inTableScope(J))return;K.generateImpliedEndTags(),K.popTag(J),P.clearToMarker(),S=y8;return;case"body":case"caption":case"col":case"colgroup":case"html":return;case"table":case"tbody":case"tfoot":case"thead":case"tr":if(!K.inTableScope(J))return;V8(e,K.inTableScope("td")?"td":"th"),S(W,J,j,L);return}break}m(W,J,j,L)}function A1(W,J,j,L){switch(W){case 1:if(Z0){if(J=J.replace(J9,""),J.length===0)return}F1(J);return;case 4:K1(J);return;case 5:return;case-1:m(W,J,j,L);return;case 2:switch(J){case"html":m(W,J,j,L);return;case"option":if(K.top instanceof V0.HTMLOptionElement)A1(e,J);l(J,j);return;case"optgroup":if(K.top instanceof V0.HTMLOptionElement)A1(e,"option");if(K.top instanceof V0.HTMLOptGroupElement)A1(e,J);l(J,j);return;case"select":A1(e,J);return;case"input":case"keygen":case"textarea":if(!K.inSelectScope("select"))return;A1(e,"select"),S(W,J,j,L);return;case"script":case"template":M0(W,J,j,L);return}break;case 3:switch(J){case"optgroup":if(K.top instanceof V0.HTMLOptionElement&&K.elements[K.elements.length-2]instanceof V0.HTMLOptGroupElement)A1(e,"option");if(K.top instanceof V0.HTMLOptGroupElement)K.pop();return;case"option":if(K.top instanceof V0.HTMLOptionElement)K.pop();return;case"select":if(!K.inSelectScope(J))return;K.popTag(J),w8();return;case"template":M0(W,J,j,L);return}break}}function w6(W,J,j,L){switch(J){case"caption":case"table":case"tbody":case"tfoot":case"thead":case"tr":case"td":case"th":switch(W){case 2:w6(e,"select"),S(W,J,j,L);return;case 3:if(K.inTableScope(J))w6(e,"select"),S(W,J,j,L);return}}A1(W,J,j,L)}function c9(W,J,j,L){function U(E){S=E,A0[A0.length-1]=S,S(W,J,j,L)}switch(W){case 1:case 4:case 5:m(W,J,j,L);return;case-1:if(!K.contains("template"))i1();else K.popTag("template"),P.clearToMarker(),A0.pop(),w8(),S(W,J,j,L);return;case 2:switch(J){case"base":case"basefont":case"bgsound":case"link":case"meta":case"noframes":case"script":case"style":case"template":case"title":M0(W,J,j,L);return;case"caption":case"colgroup":case"tbody":case"tfoot":case"thead":U(X1);return;case"col":U(N6);return;case"tr":U(o1);return;case"td":case"th":U(y8);return}U(m);return;case 3:switch(J){case"template":M0(W,J,j,L);return;default:return}}}function W7(W,J,j,L){switch(W){case 1:if(W9.test(J))break;m(W,J);return;case 4:K.elements[0]._appendChild(z0.createComment(J));return;case 5:return;case-1:i1();return;case 2:if(J==="html"){m(W,J,j,L);return}break;case 3:if(J==="html"){if(b)return;S=lQ;return}break}S=m,S(W,J,j,L)}function l9(W,J,j,L){switch(W){case 1:if(J=J.replace(JZ,""),J.length>0)F1(J);return;case 4:K1(J);return;case 5:return;case-1:i1();return;case 2:switch(J){case"html":m(W,J,j,L);return;case"frameset":l(J,j);return;case"frame":l(J,j),K.pop();return;case"noframes":M0(W,J,j,L);return}break;case 3:if(J==="frameset"){if(b&&K.top instanceof V0.HTMLHtmlElement)return;if(K.pop(),!b&&!(K.top instanceof V0.HTMLFrameSetElement))S=cQ;return}break}}function cQ(W,J,j,L){switch(W){case 1:if(J=J.replace(JZ,""),J.length>0)F1(J);return;case 4:K1(J);return;case 5:return;case-1:i1();return;case 2:switch(J){case"html":m(W,J,j,L);return;case"noframes":M0(W,J,j,L);return}break;case 3:if(J==="html"){S=iQ;return}break}}function lQ(W,J,j,L){switch(W){case 1:if(W9.test(J))break;m(W,J,j,L);return;case 4:z0._appendChild(z0.createComment(J));return;case 5:m(W,J,j,L);return;case-1:i1();return;case 2:if(J==="html"){m(W,J,j,L);return}break}S=m,S(W,J,j,L)}function iQ(W,J,j,L){switch(W){case 1:if(J=J.replace(JZ,""),J.length>0)m(W,J,j,L);return;case 4:z0._appendChild(z0.createComment(J));return;case 5:m(W,J,j,L);return;case-1:i1();return;case 2:switch(J){case"html":m(W,J,j,L);return;case"noframes":M0(W,J,j,L);return}break}}function J7(W,J,j,L){function U(F0){for(var y0=0,z1=F0.length;y0<z1;y0++)switch(F0[y0][0]){case"color":case"face":case"size":return!0}return!1}var E;switch(W){case 1:if(d&&_V.test(J))d=!1;if(Z0)J=J.replace(J9,"\uFFFD");F1(J);return;case 4:K1(J);return;case 5:return;case 2:switch(J){case"font":if(!U(j))break;case"b":case"big":case"blockquote":case"body":case"br":case"center":case"code":case"dd":case"div":case"dl":case"dt":case"em":case"embed":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":case"head":case"hr":case"i":case"img":case"li":case"listing":case"menu":case"meta":case"nobr":case"ol":case"p":case"pre":case"ruby":case"s":case"small":case"span":case"strong":case"strike":case"sub":case"sup":case"table":case"tt":case"u":case"ul":case"var":if(b)break;do K.pop(),E=K.top;while(E.namespaceURI!==p.HTML&&!qz(E)&&!jz(E));P0(W,J,j,L);return}if(E=K.elements.length===1&&b?Z:K.top,E.namespaceURI===p.MATHML)Fz(j);else if(E.namespaceURI===p.SVG)J=BV(J),Kz(j);if(VZ(j),b9(J,j,E.namespaceURI),L){if(J==="script"&&E.namespaceURI===p.SVG);K.pop()}return;case 3:if(E=K.top,J==="script"&&E.namespaceURI===p.SVG&&E.localName==="script")K.pop();else{var u=K.elements.length-1,t=K.elements[u];for(;;){if(t.localName.toLowerCase()===J){K.popElement(t);break}if(t=K.elements[--u],t.namespaceURI!==p.HTML)continue;S(W,J,j,L);break}}return}}return l1.testTokenizer=function(W,J,j,L){var U=[];switch(J){case"PCDATA state":H=a;break;case"RCDATA state":H=y1;break;case"RAWTEXT state":H=b8;break;case"PLAINTEXT state":H=y9;break}if(j)g=j;if(P0=function(u,t,F0,y0){switch(J8(),u){case 1:if(U.length>0&&U[U.length-1][0]==="Character")U[U.length-1][1]+=t;else U.push(["Character",t]);break;case 4:U.push(["Comment",t]);break;case 5:U.push(["DOCTYPE",t,F0===void 0?null:F0,y0===void 0?null:y0,!B0]);break;case 2:var z1=Object.create(null);for(var W1=0;W1<F0.length;W1++){var r1=F0[W1];if(r1.length===1)z1[r1[0]]="";else z1[r1[0]]=r1[1]}var v1=["StartTag",t,z1];if(y0)v1.push(!0);U.push(v1);break;case 3:U.push(["EndTag",t]);break;case-1:break}},!L)this.parse(W,!0);else{for(var E=0;E<W.length;E++)this.parse(W[E]);this.parse("",!0)}return U},l1}});var X6=x((wH,Nz)=>{Nz.exports=Rz;var Cz=X9(),Ez=Q9(),qV=B9(),q9=L0(),jV=u6();function Rz($){this.contextObject=$}var KV={xml:{"":!0,"1.0":!0,"2.0":!0},core:{"":!0,"2.0":!0},html:{"":!0,"1.0":!0,"2.0":!0},xhtml:{"":!0,"1.0":!0,"2.0":!0}};Rz.prototype={hasFeature:function $(Z,Y){var X=KV[(Z||"").toLowerCase()];return X&&X[Y||""]||!1},createDocumentType:function $(Z,Y,X){if(!jV.isValidQName(Z))q9.InvalidCharacterError();return new Ez(this.contextObject,Z,Y,X)},createDocument:function $(Z,Y,X){var z=new Cz(!1,null),Q;if(Y)Q=z.createElementNS(Z,Y);else Q=null;if(X)z.appendChild(X);if(Q)z.appendChild(Q);if(Z===q9.NAMESPACE.HTML)z._contentType="application/xhtml+xml";else if(Z===q9.NAMESPACE.SVG)z._contentType="image/svg+xml";else z._contentType="application/xml";return z},createHTMLDocument:function $(Z){var Y=new Cz(!0,null);Y.appendChild(new Ez(Y,"html"));var X=Y.createElement("html");Y.appendChild(X);var z=Y.createElement("head");if(X.appendChild(z),Z!==void 0){var Q=Y.createElement("title");z.appendChild(Q),Q.appendChild(Y.createTextNode(Z))}return X.appendChild(Y.createElement("body")),Y.modclock=1,Y},mozSetOutputMutationHandler:function($,Z){$.mutationHandler=Z},mozGetInputMutationHandler:function($){q9.nyi()},mozHTMLParser:qV}});var bz=x((bH,wz)=>{var FV=t6(),OV=e$();wz.exports=qZ;function qZ($,Z){this._window=$,this._href=Z}qZ.prototype=Object.create(OV.prototype,{constructor:{value:qZ},href:{get:function(){return this._href},set:function($){this.assign($)}},assign:{value:function($){var Z=new FV(this._href),Y=Z.resolve($);this._href=Y}},replace:{value:function($){this.assign($)}},reload:{value:function(){this.assign(this.href)}},toString:{value:function(){return this.href}}})});var yz=x((xH,xz)=>{var MV=Object.create(null,{appCodeName:{value:"Mozilla"},appName:{value:"Netscape"},appVersion:{value:"4.0"},platform:{value:""},product:{value:"Gecko"},productSub:{value:"20100101"},userAgent:{value:""},vendor:{value:""},vendorSub:{value:""},taintEnabled:{value:function(){return!1}}});xz.exports=MV});var kz=x((yH,fz)=>{var DV={setTimeout,clearTimeout,setInterval,clearInterval};fz.exports=DV});var KZ=x((z6,hz)=>{var jZ=L0();z6=hz.exports={CSSStyleDeclaration:e6(),CharacterData:n8(),Comment:v$(),DOMException:h6(),DOMImplementation:X6(),DOMTokenList:S$(),Document:X9(),DocumentFragment:m$(),DocumentType:Q9(),Element:O8(),HTMLParser:B9(),NamedNodeMap:E$(),Node:f0(),NodeList:$8(),NodeFilter:t8(),ProcessingInstruction:d$(),Text:h$(),Window:FZ()};jZ.merge(z6,t$());jZ.merge(z6,Z9().elements);jZ.merge(z6,zZ().elements)});var FZ=x((fH,gz)=>{var LV=X6(),IV=G$(),SV=bz(),Q6=L0();gz.exports=j9;function j9($){this.document=$||new LV(null).createHTMLDocument(""),this.document._scripting_enabled=!0,this.document.defaultView=this,this.location=new SV(this,this.document._address||"about:blank")}j9.prototype=Object.create(IV.prototype,{console:{value:console},history:{value:{back:Q6.nyi,forward:Q6.nyi,go:Q6.nyi}},navigator:{value:yz()},window:{get:function(){return this}},self:{get:function(){return this}},frames:{get:function(){return this}},parent:{get:function(){return this}},top:{get:function(){return this}},length:{value:0},frameElement:{value:null},opener:{value:null},onload:{get:function(){return this._getEventHandler("load")},set:function($){this._setEventHandler("load",$)}},getComputedStyle:{value:function $(Z){return Z.style}}});Q6.expose(kz(),j9);Q6.expose(KZ(),j9)});var dz=x((UV)=>{var vz=X6(),pz=B9(),kH=FZ(),mz=KZ();UV.createDOMImplementation=function(){return new vz(null)};UV.createDocument=function($,Z){if($||Z){var Y=new pz;return Y.parse($||"",!0),Y.document()}return new vz(null).createHTMLDocument("")};UV.createIncrementalHTMLParser=function(){var $=new pz;return{write:function(Z){if(Z.length>0)$.parse(Z,!1,function(){return!0})},end:function(Z){$.parse(Z||"",!0,function(){return!0})},process:function(Z){return $.parse("",!1,Z)},document:function(){return $.document()}}};UV.createWindow=function($,Z){var Y=UV.createDocument($);if(Z!==void 0)Y._address=Z;return new mz.Window(Y)};UV.impl=mz});import{spawn as Y2}from"child_process";import{existsSync as Q8,mkdirSync as tV,rmSync as D9}from"fs";import{join as L9}from"path";var I;var N1=a0(()=>{I=class I{static ensureDirectoryExists($){if(!Q8($))tV($,{recursive:!0})}static formatDate($){try{return new Date($).toLocaleString()}catch(Z){return $}}static sanitizeFilename($){return $.replace(/[<>:"/\\|?*]/g,"_").replace(/\s+/g,"_")}static extractDomain($){try{return new URL($).hostname}catch(Z){return $}}static truncateText($,Z=100){if(!$||$.length<=Z)return $;return $.substring(0,Z-3)+"..."}static isValidUrl($){try{return new URL($),!0}catch(Z){return!1}}static formatBytes($,Z=2){if($===0)return"0 Bytes";let Y=1024,X=Z<0?0:Z,z=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],Q=Math.floor(Math.log($)/Math.log(Y));return Number.parseFloat(($/Y**Q).toFixed(X))+" "+z[Q]}static sleep($){return new Promise((Z)=>setTimeout(Z,$))}static async retry($,Z=3,Y=1000){let X;for(let z=1;z<=Z;z++)try{return await $()}catch(Q){if(X=Q,z===Z)throw X;let G=Y*2**(z-1);console.warn(`Attempt ${z} failed, retrying in ${G}ms...`),await I.sleep(G)}throw X}static RETRYABLE_STATUS_CODES=new Set([408,429,500,502,503,504]);static isRetryableNetworkError($){let Z=$.message.toLowerCase();return Z.includes("econnreset")||Z.includes("etimedout")||Z.includes("econnrefused")||Z.includes("enotfound")||Z.includes("unable to connect")||Z.includes("network")||Z.includes("socket hang up")||Z.includes("epipe")}static async fetchWithRetry($,Z,Y){let X=Y?.maxRetries??3,z=Y?.baseDelay??1000,Q=Y?.maxDelay??30000,G=Y?.jitter??!0,V=null;for(let _=1;_<=X+1;_++)try{let B=await fetch($,Z);if(I.RETRYABLE_STATUS_CODES.has(B.status)){if(_>X)return B;let q=B.headers.get("Retry-After"),F;if(q){let M=Number.parseInt(q,10);if(!Number.isNaN(M))F=M*1000;else{let H=new Date(q);F=Math.max(0,H.getTime()-Date.now())}}else if(F=Math.min(z*2**(_-1),Q),G)F=F+Math.random()*F*0.5;console.warn(`\u26A0\uFE0F HTTP ${B.status} from ${$}, retrying in ${Math.round(F)}ms (attempt ${_}/${X+1})...`),await I.sleep(F);continue}return B}catch(B){if(V=B,!I.isRetryableNetworkError(V))throw V;if(_>X)throw V;let q=Math.min(z*2**(_-1),Q);if(G)q=q+Math.random()*q*0.5;console.warn(`\u26A0\uFE0F Network error (${V.message}), retrying in ${Math.round(q)}ms (attempt ${_}/${X+1})...`),await I.sleep(q)}throw V||new Error("Unexpected retry loop exit")}static parseTaskKey($){let Z=$.match(/^([A-Z]+)-(\d+)$/);if(!Z)throw new Error(`Invalid JIRA task key format: ${$}`);return{project:Z[1],number:Number.parseInt(Z[2],10),key:$}}static extractTargetBranch($){if(!$)return null;let Z=[/#{0,6}\s*[*_]{0,3}target\s+branch[*_]{0,3}\s*:\s*\|?\s*[*_]{0,3}([a-zA-Z0-9][a-zA-Z0-9._/-]*)(?=\s|[*_,]|\n|$)/i,/#{0,6}\s*[*_]{0,3}base\s+branch[*_]{0,3}\s*:\s*\|?\s*[*_]{0,3}([a-zA-Z0-9][a-zA-Z0-9._/-]*)(?=\s|[*_,]|\n|$)/i,/#{0,6}\s*[*_]{0,3}pr\s+target[*_]{0,3}\s*:\s*\|?\s*[*_]{0,3}([a-zA-Z0-9][a-zA-Z0-9._/-]*)(?=\s|[*_,]|\n|$)/i];for(let Y of Z){let X=$.match(Y);if(X&&X[1]){let z=X[1].trim();if(z=z.replace(/^[*_]+/,"").replace(/[*_]+$/,""),z&&z.length>0&&!z.includes(" "))return z}}return null}static generateTaskFilename($,Z="md"){let Y=new Date().toISOString().replace(/[:.]/g,"-");return`task-${I.sanitizeFilename($)}-${Y}.${Z}`}static async executeGitCommand($,Z){let Y=Z?.verbose??!1,X=Z?.cwd;if(Y)console.log(`\uD83D\uDD27 Executing: git ${$.join(" ")}${X?` (in ${X})`:""}`);return new Promise((z)=>{let Q=Y2("git",$,{stdio:["pipe","pipe","pipe"],cwd:X||process.cwd()}),G="",V="";Q.stdout.on("data",(_)=>{let B=_.toString();if(G+=B,Y)process.stdout.write(B)}),Q.stderr.on("data",(_)=>{let B=_.toString();if(V+=B,Y)process.stderr.write(B)}),Q.on("close",(_)=>{let B={success:_===0,output:G.trim(),error:V.trim()};if(Y)if(!B.success){if(console.error(`\u274C Git command failed (exit code ${_})`),B.error)console.error(` Error: ${B.error}`);if(B.output)console.error(` Output: ${B.output}`)}else console.log("\u2705 Git command succeeded");z(B)})})}static async isGitRepository(){return(await I.executeGitCommand(["rev-parse","--git-dir"])).success}static async getCurrentBranch($){let Z=await I.executeGitCommand(["branch","--show-current"],{cwd:$});return Z.success?Z.output:null}static async hasUncommittedChanges($){let Z=await I.executeGitCommand(["status","--porcelain"],{cwd:$});return Z.success&&Z.output.length>0}static async commitChanges($,Z,Y){let X=Y?.verbose??!1,z=Y?.author,Q=Y?.cwd;try{if(!await I.isGitRepository())return{success:!1,message:"Not in a git repository"};let G=await I.getCurrentBranch();if(G&&await I.isProtectedBranch(G))return{success:!1,message:`Cannot commit directly to protected branch '${G}'. Please create a feature branch first.`};if(!await I.hasUncommittedChanges(Q))return{success:!1,message:"No changes to commit"};let V=await I.executeGitCommand(["add","."],{verbose:X,cwd:Q});if(!V.success)return{success:!1,message:`Failed to stage changes: ${V.error}`};let _=`feat: implement ${$} - ${Z}`,B=[];if(z)B.push("-c",`user.name=${z.name}`),B.push("-c",`user.email=${z.email}`);B.push("commit","-m",_);let q=await I.executeGitCommand(B,{verbose:X,cwd:Q});if(q.success)return{success:!0,message:`Successfully committed changes for ${$}`};let F=[q.error,q.output].filter(Boolean).join(`
|
|
34
|
+
`).trim();return{success:!1,message:`Failed to commit changes: ${q.error}`,hookError:F||q.error}}catch(G){return{success:!1,message:`Git commit failed: ${G.message}`}}}static async pullLatestChanges($,Z){let Y=Z?.verbose??!1;try{if(!await I.isGitRepository())return{success:!1,message:"Not in a git repository"};if(await I.hasUncommittedChanges())return{success:!1,message:"There are uncommitted changes. Please commit or stash them before pulling."};if(await I.getCurrentBranch()!==$){if(Y)console.log(`\uD83D\uDCE5 Switching to branch '${$}'...`);let Q=await I.executeGitCommand(["checkout",$],{verbose:Y});if(!Q.success)return{success:!1,message:`Failed to switch to branch '${$}': ${Q.error}`}}if(Y)console.log(`\uD83D\uDCE5 Pulling latest changes for branch '${$}'...`);let z=await I.executeGitCommand(["pull","origin",$],{verbose:Y});if(z.success)return{success:!0,message:`Successfully pulled latest changes for '${$}'`};return{success:!1,message:`Failed to pull changes: ${z.error}`}}catch(X){return{success:!1,message:`Git pull failed: ${X.message}`}}}static async getMainBranchName(){let $=await I.executeGitCommand(["symbolic-ref","refs/remotes/origin/HEAD"]);if($.success){let X=$.output.replace("refs/remotes/origin/","");if(X)return X}if((await I.executeGitCommand(["show-ref","--verify","--quiet","refs/heads/main"])).success)return"main";if((await I.executeGitCommand(["show-ref","--verify","--quiet","refs/heads/master"])).success)return"master";return"main"}static async pushCurrentBranch($){let Z=$?.verbose??!1,Y=$?.cwd;try{let X=await I.getCurrentBranch(Y);if(!X)return{success:!1,message:"Could not determine current branch"};if(await I.isProtectedBranch(X))return{success:!1,message:`Cannot push protected branch '${X}'. This should not happen - please create a feature branch.`};if(Z)console.log(`\uD83D\uDCE4 Pushing branch '${X}' to remote...`);let z=await I.executeGitCommand(["ls-remote","--heads","origin",X],{verbose:Z,cwd:Y}),Q;if(z.success&&z.output.trim()){if(Q=await I.executeGitCommand(["push","origin",X],{verbose:Z,cwd:Y}),Q.success)return{success:!0,message:`Successfully pushed '${X}' to remote`}}else if(Q=await I.executeGitCommand(["push","-u","origin",X],{verbose:Z,cwd:Y}),Q.success)return{success:!0,message:`Successfully pushed '${X}' to remote and set upstream`};let G=[Q.error,Q.output].filter(Boolean).join(`
|
|
35
|
+
`).trim(),V=G.includes("[rejected]")&&G.includes("non-fast-forward"),_=G.includes("fetch first")||G.includes("Updates were rejected");if(V||_)return{success:!1,message:`Push rejected - branch diverged from remote. Run 'git pull --rebase' or 'git push --force' (dangerous): ${Q.error}`};return{success:!1,message:`Failed to push branch: ${Q.error}`,hookError:G||Q.error}}catch(X){return{success:!1,message:`Git push failed: ${X.message}`}}}static async runPrePushHookLocally($){let Z=$?.verbose??!1,Y=$?.cwd??process.cwd();try{let X=await I.getCurrentBranch(Y);if(!X)return{success:!1,message:"Could not determine current branch"};let z=await I.executeGitCommand(["config","--get","core.hooksPath"],{verbose:!1,cwd:Y}),Q;if(z.success&&z.output?.trim()){if(Q=z.output.trim(),!Q.startsWith("/")){let C=await I.executeGitCommand(["rev-parse","--show-toplevel"],{verbose:!1,cwd:Y});if(C.success&&C.output?.trim()){let{join:f}=T0("path");Q=f(C.output.trim(),Q)}}}else{let C=await I.executeGitCommand(["rev-parse","--git-common-dir"],{verbose:!1,cwd:Y});if(!C.success||!C.output?.trim())return{success:!1,message:"Could not determine .git directory"};let{join:f}=T0("path"),s=C.output.trim();Q=s.startsWith("/")?f(s,"hooks"):f(Y,s,"hooks")}let{join:G}=T0("path"),V=G(Q,"pre-push"),{existsSync:_,statSync:B}=T0("fs");if(!_(V)){if(Z)console.log(" No pre-push hook found, skipping local validation");return{success:!0,message:"No pre-push hook found (nothing to validate)"}}try{if((B(V).mode&73)===0){if(Z)console.log(" Pre-push hook exists but is not executable, skipping");return{success:!0,message:"Pre-push hook is not executable (skipping)"}}}catch{}let q=await I.executeGitCommand(["remote","get-url","origin"],{verbose:!1,cwd:Y});if(!q.success||!q.output?.trim())return{success:!1,message:"Could not get remote URL for origin"};let F=q.output.trim(),M=await I.executeGitCommand(["rev-parse","HEAD"],{verbose:!1,cwd:Y});if(!M.success||!M.output?.trim())return{success:!1,message:"Could not get local HEAD SHA"};let H=M.output.trim(),O=await I.executeGitCommand(["rev-parse",`origin/${X}`],{verbose:!1,cwd:Y}),D=O.success&&O.output?.trim()?O.output.trim():"0000000000000000000000000000000000000000",T=`refs/heads/${X} ${H} refs/heads/${X} ${D}
|
|
36
|
+
`;if(Z)console.log(` Running pre-push hook: ${V}`),console.log(` Remote: origin (${F})`),console.log(` Branch: ${X}`),console.log(` Local SHA: ${H.substring(0,8)}`),console.log(` Remote SHA: ${D.substring(0,8)}`);let{spawn:g}=T0("child_process");return new Promise((C)=>{let f=g(V,["origin",F],{cwd:Y,stdio:["pipe","pipe","pipe"],env:{...process.env,GIT_DIR:void 0}}),s="",N="";f.stdout.on("data",(w)=>{let y=w.toString();if(s+=y,Z)process.stdout.write(y)}),f.stderr.on("data",(w)=>{let y=w.toString();if(N+=y,Z)process.stderr.write(y)}),f.on("error",(w)=>{C({success:!1,message:`Failed to run pre-push hook: ${w.message}`,hookError:w.message})}),f.on("close",(w)=>{let y=[s,N].filter(Boolean).join(`
|
|
37
|
+
`).trim();if(w===0)C({success:!0,message:"Pre-push hook passed"});else C({success:!1,message:`Pre-push hook failed with exit code ${w}`,hookError:y||`Hook exited with code ${w}`})}),f.stdin.write(T),f.stdin.end()})}catch(X){return{success:!1,message:`Failed to run pre-push hook: ${X.message}`,hookError:X.message}}}static async isProtectedBranch($){try{let Z=$||await I.getCurrentBranch();if(!Z)return!1;return["main","master","develop","development","staging","production"].includes(Z.toLowerCase())}catch(Z){return!1}}static async createFeatureBranch($,Z){let Y=`feature/${$.toLowerCase()}`,X=Y,z=1;try{if(!await I.isGitRepository())return{success:!1,branchName:X,message:"Not in a git repository"};console.log("\uD83E\uDDF9 Cleaning up working directory before creating feature branch...");let Q=await I.executeGitCommand(["reset","--hard","HEAD"]);if(!Q.success)console.warn(`\u26A0\uFE0F Failed to reset changes: ${Q.error}`);let G=await I.executeGitCommand(["clean","-fd"]);if(!G.success)console.warn(`\u26A0\uFE0F Failed to clean untracked files: ${G.error}`);console.log("\u2705 Working directory cleaned");let V=Z||await I.getMainBranchName(),_=await I.getCurrentBranch(),B=!1;if(_!==V){let H=await I.executeGitCommand(["checkout",V]);if(!H.success&&!Z){let O=V==="main"?"master":"main";if((await I.executeGitCommand(["show-ref","--verify","--quiet",`refs/heads/${O}`])).success)console.log(`\u26A0\uFE0F Branch '${V}' not found, trying '${O}'...`),V=O,H=await I.executeGitCommand(["checkout",O])}if(!H.success&&H.error?.includes("already used by worktree"))console.log(`\u26A0\uFE0F Target branch '${V}' is locked by a worktree, will create branch from remote...`),B=!0;else if(!H.success)return{success:!1,branchName:X,message:`Failed to switch to ${V} branch: ${H.error}`}}if(B){console.log(`\uD83D\uDCE5 Fetching latest '${V}' from remote...`);let H=await I.executeGitCommand(["fetch","origin",`${V}:refs/remotes/origin/${V}`]);if(!H.success)console.log(`\u26A0\uFE0F Failed to fetch '${V}': ${H.error}`),console.log(" Will try to create branch from local reference...")}else{console.log(`\uD83D\uDCE5 Pulling latest changes for target branch '${V}'...`);let H=await I.executeGitCommand(["pull","origin",V]);if(!H.success)console.log(`\u26A0\uFE0F Failed to pull latest changes for '${V}': ${H.error}`),console.log(" Continuing with local version of the branch...")}while(!0){if(!(await I.executeGitCommand(["show-ref","--verify","--quiet",`refs/heads/${X}`])).success)break;z++,X=`${Y}-attempt-${z}`}let q=await I.executeGitCommand(["worktree","list","--porcelain"]);if(q.success&&q.output.includes(`branch refs/heads/${X}`)){console.log(`\u26A0\uFE0F Branch '${X}' is checked out in a worktree, cleaning up...`);let H=q.output.split(`
|
|
38
|
+
`),O=null;for(let D=0;D<H.length;D++)if(H[D].startsWith("worktree ")){let T=H[D].substring(9);for(let g=D+1;g<H.length&&!H[g].startsWith("worktree ");g++)if(H[g]===`branch refs/heads/${X}`){O=T;break}if(O)break}if(O){if(!(await I.executeGitCommand(["worktree","remove",O,"--force"])).success){try{D9(O,{recursive:!0,force:!0})}catch(T){}await I.executeGitCommand(["worktree","prune"])}console.log(`\u2705 Cleaned up worktree at ${O}`)}await I.executeGitCommand(["branch","-D",X])}let F=B?`origin/${V}`:void 0,M=await I.executeGitCommand(F?["checkout","-b",X,F]:["checkout","-b",X]);if(!M.success&&B)console.log(`\u26A0\uFE0F Failed to create from origin/${V}, trying local ref...`),M=await I.executeGitCommand(["checkout","-b",X,V]);if(!M.success&&M.error?.includes("already used by worktree")){console.log(`\u26A0\uFE0F Branch '${X}' is still locked by a worktree, forcing cleanup...`);let H=M.error.match(/already used by worktree at '([^']+)'/);if(H){let O=H[1];await I.executeGitCommand(["worktree","remove",O,"--force"]);try{D9(O,{recursive:!0,force:!0})}catch(D){}await I.executeGitCommand(["worktree","prune"]),await I.executeGitCommand(["branch","-D",X]),console.log(`\u2705 Force cleaned up worktree at ${O}`),M=await I.executeGitCommand(F?["checkout","-b",X,F]:["checkout","-b",X])}}if(M.success){let H=z===1?`Created and switched to new branch '${X}' from ${V}`:`Created and switched to new branch '${X}' from ${V} (previous attempts existed)`;return{success:!0,branchName:X,message:H}}return{success:!1,branchName:X,message:`Failed to create branch: ${M.error}`}}catch(Q){return{success:!1,branchName:X,message:`Git operation failed: ${Q.message}`}}}static async removeReviewWorktree($,Z){let Y=Z?.verbose??!1;try{if(!Q8($)){if(Y)console.log(`\u23ED\uFE0F Worktree does not exist: ${$}`);return{success:!0}}if(Y)console.log(`
|
|
39
|
+
\uD83D\uDDD1\uFE0F Removing worktree: ${$}`);if(!(await I.executeGitCommand(["worktree","remove",$,"--force"],{verbose:Y})).success){if(Y)console.log(" Git worktree remove failed, deleting directory...");D9($,{recursive:!0,force:!0})}if(Y)console.log("\u2705 Worktree removed successfully");return{success:!0}}catch(X){return{success:!1,error:`Worktree removal failed: ${X.message}`}}}static async prepareReviewWorktree($,Z){let Y=Z?.verbose??!1;try{let X=I.getReviewWorktreePath();if(Y)console.log(`
|
|
40
|
+
\uD83D\uDCC2 Preparing review worktree for branch: ${$}`),console.log(` Worktree path: ${X}`);if(Y)console.log(` Fetching branch ${$} from origin (shallow)...`);let z=await I.executeGitCommand(["fetch","origin",$,"--depth=1"],{verbose:Y});if(Y)console.log(` \u2713 Fetch completed (success: ${z.success})`);if(!z.success)console.warn(`\u26A0\uFE0F Fetch failed: ${z.error||z.output}`),console.warn(" Continuing anyway - worktree may have cached version...");let Q=Q8(X);if(Y)console.log(` Worktree directory exists: ${Q}`);if(Q){if(Q8(L9(X,".git"))){if((await I.executeGitCommand(["status","--porcelain"],{verbose:!1,cwd:X})).success){if(Y)console.log(` Switching to branch ${$}...`);let O=(await I.executeGitCommand(["remote","get-url","origin"],{verbose:!1,cwd:X})).success,D;if(O)D=await I.executeGitCommand(["checkout","-B",$,"--track",`origin/${$}`],{verbose:Y,cwd:X});else D=await I.executeGitCommand(["checkout",$],{verbose:Y,cwd:X});if(D.success){if(O){if(Y)console.log(" Pulling latest changes...");await I.executeGitCommand(["pull","origin",$,"--ff-only"],{verbose:Y,cwd:X})}if(Y)console.log(`\u2705 Switched to branch ${$}`);if(Y)console.log("\uD83D\uDCE6 Installing dependencies...");let T=await I.installDependencies(X,{verbose:Y});if(!T.success)console.warn(`\u26A0\uFE0F Failed to install dependencies: ${T.error}`),console.warn(" Claude may not be able to run tests or build commands");return{success:!0,path:X}}}}if(Y)console.log(" Worktree is invalid/corrupted, cleaning up...");await I.executeGitCommand(["worktree","remove",X,"--force"],{verbose:!1});try{D9(X,{recursive:!0,force:!0})}catch(M){}await I.executeGitCommand(["worktree","prune"],{verbose:!1})}if(Y)console.log(` Creating worktree at ${X}...`);let G=await I.executeGitCommand(["show-ref","--verify",`refs/heads/${$}`],{verbose:!1}),_=(await I.executeGitCommand(["remote","get-url","origin"],{verbose:!1})).success,B;if(_){if(G.success)await I.executeGitCommand(["branch","-D",$],{verbose:!1});B=await I.executeGitCommand(["worktree","add","--track","-b",$,X,`origin/${$}`],{verbose:Y})}else B=await I.executeGitCommand(["worktree","add",X,$],{verbose:Y});if(!B.success){let F=(B.error||"")+(B.output||"");if(F.includes("already registered")||F.includes("missing but")){if(Y)console.log(" Cleaning up stale worktree registrations...");if(await I.executeGitCommand(["worktree","prune"],{verbose:!1}),await I.executeGitCommand(["branch","-D",$],{verbose:!1}),_)B=await I.executeGitCommand(["worktree","add","--track","-b",$,X,`origin/${$}`],{verbose:Y});else B=await I.executeGitCommand(["worktree","add",X,$],{verbose:Y})}if(!B.success)return{success:!1,error:`Failed to create worktree: ${B.error||B.output}`}}if(Y)console.log(`\u2705 Worktree ready at ${X}`);if(Y)console.log("\uD83D\uDCE6 Installing dependencies...");let q=await I.installDependencies(X,{verbose:Y});if(Y)console.log(` \u2713 Dependency installation completed (success: ${q.success})`);if(!q.success)console.warn(`\u26A0\uFE0F Failed to install dependencies: ${q.error}`),console.warn(" Claude may not be able to run tests or build commands");if(Y)console.log("\u2705 Worktree preparation complete!");return{success:!0,path:X}}catch(X){return{success:!1,error:`Worktree preparation failed: ${X.message}`}}}static getReviewWorktreePath(){return"/tmp/claude-intern-review-worktree"}static async installDependencies($,Z){let Y=Z?.verbose??!1,X=[{name:"bun",manifestFile:"package.json",lockFile:"bun.lockb",command:"bun",args:["install"]},{name:"pnpm",manifestFile:"package.json",lockFile:"pnpm-lock.yaml",command:"pnpm",args:["install","--frozen-lockfile"]},{name:"yarn",manifestFile:"package.json",lockFile:"yarn.lock",command:"yarn",args:["install","--frozen-lockfile"]},{name:"npm",manifestFile:"package.json",lockFile:"package-lock.json",command:"npm",args:["ci"]},{name:"uv",manifestFile:"pyproject.toml",lockFile:"uv.lock",command:"uv",args:["sync"]},{name:"poetry",manifestFile:"pyproject.toml",lockFile:"poetry.lock",command:"poetry",args:["install","--no-root"]},{name:"pip",manifestFile:"requirements.txt",lockFile:null,command:"pip",args:["install","-r","requirements.txt"]},{name:"pipenv",manifestFile:"Pipfile",lockFile:"Pipfile.lock",command:"pipenv",args:["install","--deploy"]},{name:"bundle",manifestFile:"Gemfile",lockFile:"Gemfile.lock",command:"bundle",args:["install"]},{name:"go",manifestFile:"go.mod",lockFile:"go.sum",command:"go",args:["mod","download"]},{name:"cargo",manifestFile:"Cargo.toml",lockFile:"Cargo.lock",command:"cargo",args:["fetch"]},{name:"composer",manifestFile:"composer.json",lockFile:"composer.lock",command:"composer",args:["install","--no-interaction"]},{name:"maven",manifestFile:"pom.xml",lockFile:null,command:"mvn",args:["dependency:resolve"]},{name:"gradle",manifestFile:"build.gradle",lockFile:null,command:"gradle",args:["dependencies","--quiet"]},{name:"gradle",manifestFile:"build.gradle.kts",lockFile:null,command:"gradle",args:["dependencies","--quiet"]}],z=X.filter((q)=>{if(!Q8(L9($,q.manifestFile)))return!1;if(q.lockFile)return Q8(L9($,q.lockFile));return!1}),Q=X.filter((q)=>{if(!Q8(L9($,q.manifestFile)))return!1;return q.lockFile===null}),G=z.length>0?z:Q;if(G.length===0)return{success:!0};let V=[];for(let q of G){if(Y)console.log(` Installing ${q.name} dependencies...`);let F=await new Promise((M)=>{let H=Y2(q.command,q.args,{cwd:$,stdio:Y?"inherit":"pipe"}),O="";if(!Y){if(H.stdout)H.stdout.on("data",()=>{});if(H.stderr)H.stderr.on("data",(D)=>{O+=D.toString()})}H.on("error",(D)=>{M({success:!1,packageManager:q.name,error:`Failed to run ${q.name}: ${D.message}`})}),H.on("close",(D)=>{if(D===0){if(Y)console.log(` \u2705 ${q.name} dependencies installed`);M({success:!0,packageManager:q.name})}else M({success:!1,packageManager:q.name,error:`${q.name} exited with code ${D}${O?`
|
|
41
|
+
${O}`:""}`})})});V.push(F)}let _=V.some((q)=>q.success),B=V.filter((q)=>!q.success).map((q)=>q.error).join("; ");if(_)return{success:!0,packageManager:V.filter((q)=>q.success).map((q)=>q.packageManager).join(", ")};else return{success:!1,packageManager:V.map((q)=>q.packageManager).join(", "),error:B}}}});import{createSign as eV}from"crypto";import{readFileSync as $_}from"fs";class e0{appId;privateKey;baseUrl;cache={};appInfoCache;constructor($,Z="https://api.github.com"){this.appId=$.appId,this.privateKey=$.privateKey,this.baseUrl=Z}static fromEnvironment(){let $=process.env.GITHUB_APP_ID;if(!$)return null;let Z=e0.loadPrivateKey();if(!Z)return null;return new e0({appId:$,privateKey:Z})}static loadPrivateKey(){let $=process.env.GITHUB_APP_PRIVATE_KEY_PATH;if($)try{return $_($,"utf8")}catch(Y){return console.error(`Failed to read GitHub App private key from ${$}: ${Y}`),null}let Z=process.env.GITHUB_APP_PRIVATE_KEY_BASE64;if(Z)try{return Buffer.from(Z,"base64").toString("utf8")}catch(Y){return console.error(`Failed to decode GitHub App private key from base64: ${Y}`),null}return null}generateJWT(){let $=Math.floor(Date.now()/1000),Z={alg:"RS256",typ:"JWT"},Y={iat:$-60,exp:$+600,iss:this.appId},X=this.base64url(JSON.stringify(Z)),z=this.base64url(JSON.stringify(Y)),Q=`${X}.${z}`,G=eV("RSA-SHA256").update(Q).sign(this.privateKey,"base64url");return`${Q}.${G}`}base64url($){return Buffer.from($).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}async getInstallationId($,Z){let Y=`${$}/${Z}`;if(this.cache[Y]?.installationId)return this.cache[Y].installationId;let X=this.generateJWT(),z=`${this.baseUrl}/repos/${$}/${Z}/installation`,Q=await I.fetchWithRetry(z,{method:"GET",headers:{Authorization:`Bearer ${X}`,Accept:"application/vnd.github.v3+json","User-Agent":"claude-intern"}});if(!Q.ok){if(Q.status===404)throw new Error(`GitHub App is not installed on repository ${$}/${Z}. Please install the App at: https://github.com/apps/YOUR_APP_NAME/installations/new`);let _=await Q.json().catch(()=>({message:"Unknown error"}));throw new Error(`Failed to get installation for ${$}/${Z}: ${_.message||Q.statusText}`)}let V=(await Q.json()).id;return this.cache[Y]={installationId:V},V}async getInstallationToken($){let Z=this.generateJWT(),Y=`${this.baseUrl}/app/installations/${$}/access_tokens`,X=await I.fetchWithRetry(Y,{method:"POST",headers:{Authorization:`Bearer ${Z}`,Accept:"application/vnd.github.v3+json","User-Agent":"claude-intern"}});if(!X.ok){let Q=await X.json().catch(()=>({message:"Unknown error"}));throw new Error(`Failed to create installation access token: ${Q.message||X.statusText}`)}let z=await X.json();return{token:z.token,expiresAt:new Date(z.expires_at)}}async getAppInfo(){if(this.appInfoCache)return this.appInfoCache;let $=this.generateJWT(),Z=`${this.baseUrl}/app`,Y=await I.fetchWithRetry(Z,{method:"GET",headers:{Authorization:`Bearer ${$}`,Accept:"application/vnd.github.v3+json","User-Agent":"claude-intern"}});if(!Y.ok){let z=await Y.json().catch(()=>({message:"Unknown error"}));throw new Error(`Failed to get GitHub App info: ${z.message||Y.statusText}`)}let X=await Y.json();return this.appInfoCache={id:X.id,slug:X.slug,name:X.name},this.appInfoCache}async getGitAuthor(){let $=await this.getAppInfo();return{name:`${$.slug}[bot]`,email:`${$.id}+${$.slug}[bot]@users.noreply.github.com`}}async getTokenForRepository($,Z){let Y=`${$}/${Z}`,X=this.cache[Y];if(X?.token){if(X.token.expiresAt.getTime()>Date.now()+300000)return X.token.token}let z=await this.getInstallationId($,Z),Q=await this.getInstallationToken(z);return this.cache[Y]={installationId:z,token:Q},Q.token}}var P8=a0(()=>{N1()});var W6={};i9(W6,{JiraExtractor:()=>u0});class u0{static extractLinkedResources($){let Z=[];try{let Y=$.fields||{};if(Object.keys(Y).forEach((X)=>{try{let z=Y[X],Q=$.names?.[X]||X;if(z&&typeof z==="string"){let G=/(https?:\/\/[^\s]+)/g,V=z.match(G);if(V)V.forEach((_)=>{Z.push({type:"custom_field_link",field:Q,url:_,description:u0.categorizeLink(_)})})}else if(z&&typeof z==="object"&&"content"in z){let G=z.content;if(G&&Array.isArray(G))try{let V=JSON.stringify(G),_=/(https?:\/\/[^\s"]+)/g,B=V.match(_);if(B)B.forEach((q)=>{Z.push({type:"rich_text_link",field:Q,url:q,description:u0.categorizeLink(q)})})}catch(V){console.warn(`Failed to process rich text content for field ${Q}: ${V}`)}}}catch(z){console.warn(`Failed to process field ${X}: ${z}`)}}),Y.issuelinks)Y.issuelinks.forEach((X)=>{try{if(X.outwardIssue)Z.push({type:"issue_link",linkType:X.type.outward,issueKey:X.outwardIssue.key,summary:X.outwardIssue.fields.summary,description:`${X.type.outward} issue`});if(X.inwardIssue)Z.push({type:"issue_link",linkType:X.type.inward,issueKey:X.inwardIssue.key,summary:X.inwardIssue.fields.summary,description:`${X.type.inward} issue`})}catch(z){console.warn(`Failed to process issue link: ${z}`)}});if(Y.description&&typeof Y.description==="object"&&"content"in Y.description)try{let X=Y.description.content;if(X&&Array.isArray(X)){let z=JSON.stringify(X),Q=/(https?:\/\/[^\s"]+)/g,G=z.match(Q);if(G)G.forEach((V)=>{Z.push({type:"description_link",url:V,description:u0.categorizeLink(V)})})}}catch(X){console.warn(`Failed to process description links: ${X}`)}}catch(Y){console.warn(`Failed to extract linked resources: ${Y}`)}return u0.deduplicateLinkedResources(Z)}static deduplicateLinkedResources($){let Z=new Map,Y={issue_link:4,custom_field_link:3,rich_text_link:2,description_link:1};$.forEach((z)=>{let Q;if(z.url)Q=z.url;else if(z.issueKey)Q=`issue:${z.issueKey}`;else Q=`${z.type}:${z.description}`;let G=Z.get(Q);if(!G)Z.set(Q,z);else{let V=Y[G.type]||0,_=Y[z.type]||0;if(_>V)Z.set(Q,z);else if(_===V){if(z.field&&!G.field)Z.set(Q,z)}}});let X=Array.from(Z.values());if($.length!==X.length)console.log(`\uD83D\uDD17 Deduplicated linked resources: ${$.length} \u2192 ${X.length}`);return X}static categorizeLink($){if($.includes("github.com"))return"GitHub Repository/Issue";if($.includes("confluence"))return"Confluence Documentation";if($.includes("figma.com"))return"Figma Design";if($.includes("docs.google.com"))return"Google Document";if($.includes("drive.google.com"))return"Google Drive File";if($.includes("notion.so"))return"Notion Page";if($.includes("miro.com"))return"Miro Board";return"External Link"}static async getRelatedWorkItems($,Z){let Y=[],X=$.fields||{};try{if(X.issuelinks&&X.issuelinks.length>0){console.log(`\uD83D\uDD17 Found ${X.issuelinks.length} linked issues, fetching details...`);for(let Q of X.issuelinks)try{if(Q.outwardIssue){let G=await Z(Q.outwardIssue.key),V=u0.formatRelatedIssue(G,Q.type.outward,"outward");Y.push(V)}if(Q.inwardIssue){let G=await Z(Q.inwardIssue.key),V=u0.formatRelatedIssue(G,Q.type.inward,"inward");Y.push(V)}}catch(G){console.warn(`Failed to fetch linked issue details: ${G}`)}}if(X.subtasks&&X.subtasks.length>0){console.log(`\uD83D\uDCCB Found ${X.subtasks.length} subtasks, fetching details...`);for(let Q of X.subtasks)try{let G=await Z(Q.key),V=u0.formatRelatedIssue(G,"Subtask","subtask");Y.push(V)}catch(G){console.warn(`Failed to fetch subtask details: ${G}`)}}if(X.parent){console.log("\uD83D\uDCCB Found parent task, fetching details...");try{let Q=await Z(X.parent.key),G=u0.formatRelatedIssue(Q,"Parent Task","parent");Y.push(G)}catch(Q){console.warn(`Failed to fetch parent task details: ${Q}`)}}if(X.epic&&X.epic.key){console.log("\uD83C\uDFAF Found epic, fetching details...");try{let Q=await Z(X.epic.key),G=u0.formatRelatedIssue(Q,"Epic","parent");Y.push(G)}catch(Q){console.warn(`Failed to fetch epic details: ${Q}`)}}let z=X.customfield_10014||X["Epic Link"];if(z&&typeof z==="string"){console.log("\uD83C\uDFAF Found epic link in custom field, fetching details...");try{let Q=await Z(z),G=u0.formatRelatedIssue(Q,"Epic","parent");Y.push(G)}catch(Q){console.warn(`Failed to fetch epic from custom field: ${Q}`)}}return console.log(`\u2705 Successfully fetched ${Y.length} related work items`),Y}catch(z){return console.warn(`Error fetching related work items: ${z}`),Y}}static formatRelatedIssue($,Z,Y){let X=$.fields||{};return{key:$.key||"Unknown",summary:X.summary||"No summary",description:X.description,renderedDescription:$.renderedFields?.description,issueType:X.issuetype?.name||"Unknown",status:X.status?.name||"Unknown",priority:X.priority?.name,assignee:X.assignee?.displayName,reporter:X.reporter?.displayName||"Unknown",created:X.created||"",updated:X.updated||"",labels:X.labels||[],components:X.components?.map((z)=>z?.name||"Unknown")||[],fixVersions:X.fixVersions?.map((z)=>z?.name||"Unknown")||[],linkType:Z,relationshipDirection:Y}}static formatIssueDetails($,Z,Y,X=[]){let z=$.fields||{};return{key:$.key||"Unknown",summary:z.summary||"No summary",description:z.description,renderedDescription:$.renderedFields?.description,issueType:z.issuetype?.name||"Unknown",status:z.status?.name||"Unknown",priority:z.priority?.name,assignee:z.assignee?.displayName,reporter:z.reporter?.displayName||"Unknown",created:z.created||"",updated:z.updated||"",labels:z.labels||[],components:z.components?.map((Q)=>Q?.name||"Unknown")||[],fixVersions:z.fixVersions?.map((Q)=>Q?.name||"Unknown")||[],linkedResources:Y,relatedIssues:X,comments:Z.map((Q)=>({id:Q.id||"unknown",author:Q.author?.displayName||"Unknown",body:Q.body||"",renderedBody:Q.renderedBody,created:Q.created||"",updated:Q.updated||""})),attachments:z.attachment?.map((Q)=>({filename:Q?.filename||"unknown",size:Q?.size||0,mimeType:Q?.mimeType||"unknown",created:Q?.created||"",author:Q?.author?.displayName||"Unknown",content:Q?.content||""}))||[]}}static extractTextFromADF($){if(!$)return"";if(typeof $==="string")return $;let Z=(Y,X=!1)=>{if(!Y)return"";return Y.map((z,Q)=>{if(z.type==="text")return z.text||"";if(z.type==="paragraph"){let G=z.content?Z(z.content):"";return X&&Q<Y.length-1?G+`
|
|
42
|
+
`:G}if(z.type==="heading"){let G=z.content?Z(z.content):"";return X?G+`
|
|
43
|
+
`:G}if(z.content)return Z(z.content);return""}).join("")};return Z($.content||[],!0)}}import{spawn as G_}from"child_process";async function B1($,Z,Y,X){return new Promise((z)=>{console.log(`
|
|
44
|
+
\uD83D\uDD27 Attempting to fix git hook errors with Claude...`);let Q=$==="commit"?"git commit":"git push origin HEAD",V=`${process.env.CLAUDE_INTERN_OUTPUT_DIR||"/tmp/claude-intern-tasks"}/*/git-hook-errors.log`,_=`# Git Hook Error - Fix Required
|
|
43
45
|
|
|
44
46
|
The git ${$} operation has failed, likely due to pre-${$} hooks checking code quality.
|
|
45
47
|
|
|
@@ -47,7 +49,7 @@ The git ${$} operation has failed, likely due to pre-${$} hooks checking code qu
|
|
|
47
49
|
|
|
48
50
|
1. **Review recent hook errors** (optional but helpful):
|
|
49
51
|
\`\`\`bash
|
|
50
|
-
tail -n 100 ${
|
|
52
|
+
tail -n 100 ${V}
|
|
51
53
|
\`\`\`
|
|
52
54
|
This shows the last 100 lines of previous hook errors to understand patterns.
|
|
53
55
|
|
|
@@ -76,9 +78,99 @@ The git ${$} operation has failed, likely due to pre-${$} hooks checking code qu
|
|
|
76
78
|
- Ensure all tests pass if the hook runs tests
|
|
77
79
|
- Follow the project's coding standards and conventions
|
|
78
80
|
${$==="push"?"- Make sure to amend the commit (git commit --amend --no-edit) so the fixes are included in the push":""}
|
|
79
|
-
`,
|
|
80
|
-
\uD83D\uDD0D Claude completed - verifying the fix actually worked...`);try{let
|
|
81
|
-
\u274C Claude exited with code ${L} while fixing git hook errors`),X(!1)}),F.stdin)F.stdin.write(_),F.stdin.end()})}var M9=e0(()=>{W6()});var $2=N((mH,RZ)=>{var tJ=Object.prototype.hasOwnProperty,u0="~";function V6(){}if(Object.create){if(V6.prototype=Object.create(null),!new V6().__proto__)u0=!1}function eJ($,Z,Y){this.fn=$,this.context=Z,this.once=Y||!1}function eX($,Z,Y,z,X){if(typeof Y!=="function")throw new TypeError("The listener must be a function");var Q=new eJ(Y,z||$,X),G=u0?u0+Z:Z;if(!$._events[G])$._events[G]=Q,$._eventsCount++;else if(!$._events[G].fn)$._events[G].push(Q);else $._events[G]=[$._events[G],Q];return $}function S9($,Z){if(--$._eventsCount===0)$._events=new V6;else delete $._events[Z]}function v0(){this._events=new V6,this._eventsCount=0}v0.prototype.eventNames=function $(){var Z=[],Y,z;if(this._eventsCount===0)return Z;for(z in Y=this._events)if(tJ.call(Y,z))Z.push(u0?z.slice(1):z);if(Object.getOwnPropertySymbols)return Z.concat(Object.getOwnPropertySymbols(Y));return Z};v0.prototype.listeners=function $(Z){var Y=u0?u0+Z:Z,z=this._events[Y];if(!z)return[];if(z.fn)return[z.fn];for(var X=0,Q=z.length,G=new Array(Q);X<Q;X++)G[X]=z[X].fn;return G};v0.prototype.listenerCount=function $(Z){var Y=u0?u0+Z:Z,z=this._events[Y];if(!z)return 0;if(z.fn)return 1;return z.length};v0.prototype.emit=function $(Z,Y,z,X,Q,G){var J=u0?u0+Z:Z;if(!this._events[J])return!1;var _=this._events[J],H=arguments.length,q,F;if(_.fn){if(_.once)this.removeListener(Z,_.fn,void 0,!0);switch(H){case 1:return _.fn.call(_.context),!0;case 2:return _.fn.call(_.context,Y),!0;case 3:return _.fn.call(_.context,Y,z),!0;case 4:return _.fn.call(_.context,Y,z,X),!0;case 5:return _.fn.call(_.context,Y,z,X,Q),!0;case 6:return _.fn.call(_.context,Y,z,X,Q,G),!0}for(F=1,q=new Array(H-1);F<H;F++)q[F-1]=arguments[F];_.fn.apply(_.context,q)}else{var L=_.length,B;for(F=0;F<L;F++){if(_[F].once)this.removeListener(Z,_[F].fn,void 0,!0);switch(H){case 1:_[F].fn.call(_[F].context);break;case 2:_[F].fn.call(_[F].context,Y);break;case 3:_[F].fn.call(_[F].context,Y,z);break;case 4:_[F].fn.call(_[F].context,Y,z,X);break;default:if(!q)for(B=1,q=new Array(H-1);B<H;B++)q[B-1]=arguments[B];_[F].fn.apply(_[F].context,q)}}}return!0};v0.prototype.on=function $(Z,Y,z){return eX(this,Z,Y,z,!1)};v0.prototype.once=function $(Z,Y,z){return eX(this,Z,Y,z,!0)};v0.prototype.removeListener=function $(Z,Y,z,X){var Q=u0?u0+Z:Z;if(!this._events[Q])return this;if(!Y)return S9(this,Q),this;var G=this._events[Q];if(G.fn){if(G.fn===Y&&(!X||G.once)&&(!z||G.context===z))S9(this,Q)}else{for(var J=0,_=[],H=G.length;J<H;J++)if(G[J].fn!==Y||X&&!G[J].once||z&&G[J].context!==z)_.push(G[J]);if(_.length)this._events[Q]=_.length===1?_[0]:_;else S9(this,Q)}return this};v0.prototype.removeAllListeners=function $(Z){var Y;if(Z){if(Y=u0?u0+Z:Z,this._events[Y])S9(this,Y)}else this._events=new V6,this._eventsCount=0;return this};v0.prototype.off=v0.prototype.removeListener;v0.prototype.addListener=v0.prototype.on;v0.prefixed=u0;v0.EventEmitter=v0;if(typeof RZ!=="undefined")RZ.exports=v0});var CZ;var Z2=e0(()=>{CZ=N6($2(),1)});function NZ($,Z){let{milliseconds:Y,fallback:z,message:X,customTimers:Q={setTimeout,clearTimeout},signal:G}=Z,J,_,q=new Promise((F,L)=>{if(typeof Y!=="number"||Math.sign(Y)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${Y}\``);if(G?.aborted){L(Y2(G));return}if(G)_=()=>{L(Y2(G))},G.addEventListener("abort",_,{once:!0});if($.then(F,L),Y===Number.POSITIVE_INFINITY)return;let B=new EZ;J=Q.setTimeout.call(void 0,()=>{if(z){try{F(z())}catch(D){L(D)}return}if(typeof $.cancel==="function")$.cancel();if(X===!1)F();else if(X instanceof Error)L(X);else B.message=X??`Promise timed out after ${Y} milliseconds`,L(B)},Y)}).finally(()=>{if(q.clear(),_&&G)G.removeEventListener("abort",_)});return q.clear=()=>{Q.clearTimeout.call(void 0,J),J=void 0},q}var EZ,Y2=($)=>$.reason??new DOMException("This operation was aborted.","AbortError");var z2=e0(()=>{EZ=class EZ extends Error{name="TimeoutError";constructor($,Z){super($,Z);Error.captureStackTrace?.(this,EZ)}}});function wZ($,Z,Y){let z=0,X=$.length;while(X>0){let Q=Math.trunc(X/2),G=z+Q;if(Y($[G],Z)<=0)z=++G,X-=Q+1;else X=Q}return z}class L9{#Z=[];enqueue($,Z){let{priority:Y=0,id:z}=Z??{},X={priority:Y,id:z,run:$};if(this.size===0||this.#Z[this.size-1].priority>=Y){this.#Z.push(X);return}let Q=wZ(this.#Z,X,(G,J)=>J.priority-G.priority);this.#Z.splice(Q,0,X)}setPriority($,Z){let Y=this.#Z.findIndex((X)=>X.id===$);if(Y===-1)throw new ReferenceError(`No promise function with the id "${$}" exists in the queue.`);let[z]=this.#Z.splice(Y,1);this.enqueue(z.run,{priority:Z,id:$})}dequeue(){return this.#Z.shift()?.run}filter($){return this.#Z.filter((Z)=>Z.priority===$.priority).map((Z)=>Z.run)}get size(){return this.#Z.length}}var X2=()=>{};var I9;var Q2=e0(()=>{Z2();z2();X2();I9=class I9 extends CZ.default{#Z;#z;#X=0;#q;#j=!1;#K=!1;#J;#M=0;#F=0;#Q;#G;#$;#S;#Y=0;#_;#W;#T=1n;#B=new Map;timeout;constructor($){super();if($={carryoverIntervalCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:L9,...$},!(typeof $.intervalCap==="number"&&$.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${$.intervalCap?.toString()??""}\` (${typeof $.intervalCap})`);if($.interval===void 0||!(Number.isFinite($.interval)&&$.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${$.interval?.toString()??""}\` (${typeof $.interval})`);if(this.#Z=$.carryoverIntervalCount??$.carryoverConcurrencyCount??!1,this.#z=$.intervalCap===Number.POSITIVE_INFINITY||$.interval===0,this.#q=$.intervalCap,this.#J=$.interval,this.#$=new $.queueClass,this.#S=$.queueClass,this.concurrency=$.concurrency,$.timeout!==void 0&&!(Number.isFinite($.timeout)&&$.timeout>0))throw new TypeError(`Expected \`timeout\` to be a positive finite number, got \`${$.timeout}\` (${typeof $.timeout})`);this.timeout=$.timeout,this.#W=$.autoStart===!1,this.#x()}get#R(){return this.#z||this.#X<this.#q}get#C(){return this.#Y<this.#_}#E(){if(this.#Y--,this.#Y===0)this.emit("pendingZero");this.#D(),this.emit("next")}#N(){this.#A(),this.#U(),this.#G=void 0}get#w(){let $=Date.now();if(this.#Q===void 0){let Z=this.#M-$;if(Z<0){if(this.#F>0){let Y=$-this.#F;if(Y<this.#J)return this.#L(this.#J-Y),!0}this.#X=this.#Z?this.#Y:0}else return this.#L(Z),!0}return!1}#L($){if(this.#G!==void 0)return;this.#G=setTimeout(()=>{this.#N()},$)}#I(){if(this.#Q)clearInterval(this.#Q),this.#Q=void 0}#b(){if(this.#G)clearTimeout(this.#G),this.#G=void 0}#D(){if(this.#$.size===0){if(this.#I(),this.emit("empty"),this.#Y===0)this.#b(),this.emit("idle");return!1}let $=!1;if(!this.#W){let Z=!this.#w;if(this.#R&&this.#C){let Y=this.#$.dequeue();if(!this.#z)this.#X++,this.#H();if(this.emit("active"),this.#F=Date.now(),Y(),Z)this.#U();$=!0}}return $}#U(){if(this.#z||this.#Q!==void 0)return;this.#Q=setInterval(()=>{this.#A()},this.#J),this.#M=Date.now()+this.#J}#A(){if(this.#X===0&&this.#Y===0&&this.#Q)this.#I();this.#X=this.#Z?this.#Y:0,this.#O(),this.#H()}#O(){while(this.#D());}get concurrency(){return this.#_}set concurrency($){if(!(typeof $==="number"&&$>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${$}\` (${typeof $})`);this.#_=$,this.#O()}setPriority($,Z){if(typeof Z!=="number"||!Number.isFinite(Z))throw new TypeError(`Expected \`priority\` to be a finite number, got \`${Z}\` (${typeof Z})`);this.#$.setPriority($,Z)}async add($,Z={}){return Z.id??=(this.#T++).toString(),Z={timeout:this.timeout,...Z},new Promise((Y,z)=>{let X=Symbol(`task-${Z.id}`);this.#$.enqueue(async()=>{this.#Y++,this.#B.set(X,{id:Z.id,priority:Z.priority??0,startTime:Date.now(),timeout:Z.timeout});let Q;try{try{Z.signal?.throwIfAborted()}catch(_){if(!this.#z)this.#X--;throw this.#B.delete(X),_}let G=$({signal:Z.signal});if(Z.timeout)G=NZ(Promise.resolve(G),{milliseconds:Z.timeout,message:`Task timed out after ${Z.timeout}ms (queue has ${this.#Y} running, ${this.#$.size} waiting)`});if(Z.signal){let{signal:_}=Z;G=Promise.race([G,new Promise((H,q)=>{Q=()=>{q(_.reason)},_.addEventListener("abort",Q,{once:!0})})])}let J=await G;Y(J),this.emit("completed",J)}catch(G){z(G),this.emit("error",G)}finally{if(Q)Z.signal?.removeEventListener("abort",Q);this.#B.delete(X),queueMicrotask(()=>{this.#E()})}},Z),this.emit("add"),this.#D()})}async addAll($,Z){return Promise.all($.map(async(Y)=>this.add(Y,Z)))}start(){if(!this.#W)return this;return this.#W=!1,this.#O(),this}pause(){this.#W=!0}clear(){this.#$=new this.#S,this.#P()}async onEmpty(){if(this.#$.size===0)return;await this.#V("empty")}async onSizeLessThan($){if(this.#$.size<$)return;await this.#V("next",()=>this.#$.size<$)}async onIdle(){if(this.#Y===0&&this.#$.size===0)return;await this.#V("idle")}async onPendingZero(){if(this.#Y===0)return;await this.#V("pendingZero")}async onRateLimit(){if(this.isRateLimited)return;await this.#V("rateLimit")}async onRateLimitCleared(){if(!this.isRateLimited)return;await this.#V("rateLimitCleared")}async onError(){return new Promise(($,Z)=>{let Y=(z)=>{this.off("error",Y),Z(z)};this.on("error",Y)})}async#V($,Z){return new Promise((Y)=>{let z=()=>{if(Z&&!Z())return;this.off($,z),Y()};this.on($,z)})}get size(){return this.#$.size}sizeBy($){return this.#$.filter($).length}get pending(){return this.#Y}get isPaused(){return this.#W}#x(){if(this.#z)return;this.on("add",()=>{if(this.#$.size>0)this.#H()}),this.on("next",()=>{this.#H()})}#H(){if(this.#z||this.#K)return;this.#K=!0,queueMicrotask(()=>{this.#K=!1,this.#P()})}#P(){let $=this.#j,Z=!this.#z&&this.#X>=this.#q&&this.#$.size>0;if(Z!==$)this.#j=Z,this.emit(Z?"rateLimit":"rateLimitCleared")}get isRateLimited(){return this.#j}get isSaturated(){return this.#Y===this.#_&&this.#$.size>0||this.isRateLimited&&this.#$.size>0}get runningTasks(){return[...this.#B.values()].map(($)=>({...$}))}}});class Y8{baseUrl="https://api.github.com";token;appAuth;constructor($={}){if(this.token=$.token||process.env.GITHUB_TOKEN,this.appAuth=$.appAuth,!this.token&&!this.appAuth)this.appAuth=s0.fromEnvironment()??void 0}async getToken($,Z){if(this.token)return this.token;if(this.appAuth)return await this.appAuth.getTokenForRepository($,Z);throw new Error("No GitHub authentication configured. Set GITHUB_TOKEN or configure GitHub App.")}async getBotUsername($,Z){try{if(this.appAuth)return`${(await this.appAuth.getAppInfo()).slug}[bot]`;if(this.token){let Y=await fetch(`${this.baseUrl}/user`,{method:"GET",headers:{Authorization:`Bearer ${this.token}`,Accept:"application/vnd.github.v3+json","User-Agent":"claude-intern"}});if(!Y.ok)return null;let z=await Y.json();if(z.type==="Bot")return z.login}return null}catch(Y){return null}}async apiRequest($,Z,Y,z,X){let Q=await this.getToken(Y,z),G=`${this.baseUrl}${Z}`,J=await fetch(G,{method:$,headers:{Authorization:`Bearer ${Q}`,Accept:"application/vnd.github.v3+json","Content-Type":"application/json","User-Agent":"claude-intern"},body:X?JSON.stringify(X):void 0});if(!J.ok){let _=await J.json().catch(()=>({message:"Unknown error"}));throw new Error(`GitHub API error (${J.status}): ${_.message||J.statusText}`)}return await J.json()}async getPullRequest($,Z,Y){return this.apiRequest("GET",`/repos/${$}/${Z}/pulls/${Y}`,$,Z)}async getPullRequestReviewComments($,Z,Y){let z=[],X=1,Q=100;while(!0){let G=await this.apiRequest("GET",`/repos/${$}/${Z}/pulls/${Y}/comments?per_page=${Q}&page=${X}`,$,Z);if(z.push(...G),G.length<Q)break;X++}return z}async getReviews($,Z,Y){return this.apiRequest("GET",`/repos/${$}/${Z}/pulls/${Y}/reviews`,$,Z)}async getReviewComments($,Z,Y,z){return(await this.getPullRequestReviewComments($,Z,Y)).filter((Q)=>Q.pull_request_review_id===z)}async replyToComment($,Z,Y,z,X){return this.apiRequest("POST",`/repos/${$}/${Z}/pulls/${Y}/comments/${z}/replies`,$,Z,{body:X})}async createReviewComment($,Z,Y,z,X,Q,G,J="RIGHT"){return this.apiRequest("POST",`/repos/${$}/${Z}/pulls/${Y}/comments`,$,Z,{body:z,commit_id:X,path:Q,line:G,side:J})}async postPullRequestComment($,Z,Y,z){await this.apiRequest("POST",`/repos/${$}/${Z}/issues/${Y}/comments`,$,Z,{body:z})}async getIssueComments($,Z,Y){return this.apiRequest("GET",`/repos/${$}/${Z}/issues/${Y}/comments`,$,Z)}async addReactionToComment($,Z,Y,z){await this.apiRequest("POST",`/repos/${$}/${Z}/pulls/comments/${Y}/reactions`,$,Z,{content:z})}async getCommentReactions($,Z,Y){return this.apiRequest("GET",`/repos/${$}/${Z}/pulls/comments/${Y}/reactions`,$,Z)}async addReactionToIssueComment($,Z,Y,z){await this.apiRequest("POST",`/repos/${$}/${Z}/issues/comments/${Y}/reactions`,$,Z,{content:z})}async getIssueCommentReactions($,Z,Y){return this.apiRequest("GET",`/repos/${$}/${Z}/issues/comments/${Y}/reactions`,$,Z)}async requestReReview($,Z,Y,z){await this.apiRequest("POST",`/repos/${$}/${Z}/pulls/${Y}/requested_reviewers`,$,Z,{reviewers:z})}async getPullRequestDiff($,Z,Y){let z=await this.getToken($,Z),X=`${this.baseUrl}/repos/${$}/${Z}/pulls/${Y}`,Q=await fetch(X,{method:"GET",headers:{Authorization:`Bearer ${z}`,Accept:"application/vnd.github.v3.diff","User-Agent":"claude-intern"}});if(!Q.ok)throw new Error(`Failed to get PR diff: ${Q.statusText}`);return Q.text()}async getFileContent($,Z,Y,z){try{let X=await this.apiRequest("GET",`/repos/${$}/${Z}/contents/${Y}?ref=${z}`,$,Z),Q=X.encoding==="base64"?Buffer.from(X.content,"base64").toString("utf-8"):X.content;return{path:X.path,content:Q,sha:X.sha}}catch(X){return null}}processComments($){return $.map((Z)=>({id:Z.id,path:Z.path,line:Z.line??Z.original_line,side:Z.side,diffHunk:Z.diff_hunk,body:Z.body,reviewer:Z.user.login,isReply:Z.in_reply_to_id!==void 0}))}async getUnaddressedComments($,Z,Y,z){let X=await this.getPullRequestReviewComments($,Z,Y),Q=new Set;for(let J of X)if(J.user.login===z&&J.in_reply_to_id!==void 0)Q.add(J.in_reply_to_id);let G=X.filter((J)=>J.user.login!==z&&!Q.has(J.id)&&!J.in_reply_to_id);return this.processComments(G)}}var bZ=e0(()=>{I8()});import{Database as $_}from"bun:sqlite";import{existsSync as Z_,mkdirSync as Y_}from"fs";import{dirname as z_}from"path";class xZ{db;maxRetries;verbose;constructor($={}){let Z=$.dbPath||X_;this.maxRetries=$.maxRetries??Q_,this.verbose=$.verbose??!1;let Y=z_(Z);if(!Z_(Y))Y_(Y,{recursive:!0});this.db=new $_(Z),this.initializeSchema()}initializeSchema(){if(this.db.run(`
|
|
81
|
+
`,B="",q="",F=G_(Z,["-p","--dangerously-skip-permissions","--max-turns",Y.toString()],{stdio:["pipe","pipe","pipe"],cwd:X||process.cwd()});if(F.stdout)F.stdout.on("data",(M)=>{let H=M.toString();B+=H,process.stdout.write(H)});if(F.stderr)F.stderr.on("data",(M)=>{let H=M.toString();q+=H,process.stderr.write(H)});if(F.on("error",(M)=>{console.error(`\u274C Failed to run Claude for git hook fix: ${M.message}`),z(!1)}),F.on("close",async(M)=>{if(M===0){console.log(`
|
|
82
|
+
\uD83D\uDD0D Claude completed - verifying the fix actually worked...`);try{let H=await I.executeGitCommand(["status","--porcelain"],{cwd:X});if($==="commit")if(H.success&&H.output.trim()==="")console.log("\u2705 Verification successful - commit completed successfully!"),z(!0);else{console.log("\u26A0\uFE0F Claude fixed the code but didn't commit - committing manually..."),console.log(` Changes: ${H.output}`);let O=await I.executeGitCommand(["add","."],{cwd:X});if(!O.success){console.log("\u274C Failed to stage changes:"),console.log(` ${O.error}`),z(!1);return}let D=await I.executeGitCommand(["commit","--no-verify"],{cwd:X});if(D.success)console.log("\u2705 Successfully committed changes manually!"),z(!0);else console.log("\u274C Failed to commit changes:"),console.log(` ${D.error}`),z(!1)}else{let O=await I.executeGitCommand(["push","origin","HEAD","--dry-run"],{cwd:X});if(O.success)console.log("\u2705 Verification successful - changes are committed and ready to push!"),z(!0);else{console.log("\u26A0\uFE0F Claude fixed the code but didn't amend - amending manually...");let D=await I.executeGitCommand(["status","--porcelain"],{cwd:X});if(D.success&&D.output.trim()!==""){let T=await I.executeGitCommand(["add","."],{cwd:X});if(!T.success){console.log("\u274C Failed to stage changes:"),console.log(` ${T.error}`),z(!1);return}let g=await I.executeGitCommand(["commit","--amend","--no-edit","--no-verify"],{cwd:X});if(g.success){console.log("\u2705 Successfully amended commit manually!");let C=await I.executeGitCommand(["push","origin","HEAD","--dry-run"],{cwd:X});if(C.success)console.log("\u2705 Verification successful - ready to push!"),z(!0);else console.log("\u274C Push would still fail after amend:"),console.log(` ${C.error||C.output}`),z(!1)}else console.log("\u274C Failed to amend commit:"),console.log(` ${g.error}`),z(!1)}else console.log("\u274C Push dry-run failed but no uncommitted changes to amend:"),console.log(` ${O.error||O.output}`),z(!1)}}}catch(H){console.log(`\u274C Could not verify fix: ${H}`),z(!1)}}else console.log(`
|
|
83
|
+
\u274C Claude exited with code ${M} while fixing git hook errors`),z(!1)}),F.stdin)F.stdin.write(_),F.stdin.end()})}var I9=a0(()=>{N1()});import{execSync as o0,spawn as W_}from"child_process";import{writeFileSync as G2,existsSync as J_,mkdirSync as V_}from"fs";import{join as RZ}from"path";function __($,Z,Y,X){return`You are reviewing a pull request. Your task is to analyze the code changes and provide structured feedback in JSON format.
|
|
84
|
+
|
|
85
|
+
## PR Information
|
|
86
|
+
- **Repository**: ${$}
|
|
87
|
+
- **PR Number**: #${Z}
|
|
88
|
+
- **Review Iteration**: ${X}
|
|
89
|
+
|
|
90
|
+
## Review Criteria
|
|
91
|
+
Analyze the following aspects:
|
|
92
|
+
1. **Code Quality & Best Practices**: Adherence to coding standards, maintainability, readability
|
|
93
|
+
2. **Potential Bugs**: Logic errors, edge cases, error handling
|
|
94
|
+
3. **Performance**: Inefficient algorithms, unnecessary operations, resource usage
|
|
95
|
+
4. **Security**: Vulnerabilities, input validation, authentication/authorization
|
|
96
|
+
5. **Test Coverage**: Missing tests, inadequate test cases
|
|
97
|
+
6. **Documentation**: Missing/unclear comments, outdated documentation
|
|
98
|
+
|
|
99
|
+
## PR Diff
|
|
100
|
+
\`\`\`diff
|
|
101
|
+
${Y}
|
|
102
|
+
\`\`\`
|
|
103
|
+
|
|
104
|
+
## Instructions
|
|
105
|
+
1. Review the code changes thoroughly
|
|
106
|
+
2. Identify issues across all criteria listed above
|
|
107
|
+
3. Assign priority to each issue:
|
|
108
|
+
- **critical**: Security vulnerabilities, data loss risks, breaking changes
|
|
109
|
+
- **high**: Bugs that will likely cause failures, major performance issues
|
|
110
|
+
- **medium**: Code quality issues, minor bugs, missing tests
|
|
111
|
+
- **low**: Style inconsistencies, minor optimizations
|
|
112
|
+
- **info**: Suggestions, alternatives, educational feedback
|
|
113
|
+
|
|
114
|
+
4. Provide your feedback as JSON in the following format:
|
|
115
|
+
|
|
116
|
+
\`\`\`json
|
|
117
|
+
{
|
|
118
|
+
"summary": "Brief overall assessment of the PR (2-3 sentences)",
|
|
119
|
+
"items": [
|
|
120
|
+
{
|
|
121
|
+
"priority": "critical|high|medium|low|info",
|
|
122
|
+
"category": "code-quality|bug|performance|security|testing|documentation|style",
|
|
123
|
+
"file": "path/to/file.ts",
|
|
124
|
+
"line": "42" or "42-45",
|
|
125
|
+
"issue": "Clear description of the issue",
|
|
126
|
+
"suggestion": "Specific actionable fix or improvement"
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"approved": false
|
|
130
|
+
}
|
|
131
|
+
\`\`\`
|
|
132
|
+
|
|
133
|
+
5. Set "approved": true ONLY if all issues are low priority or informational
|
|
134
|
+
6. Be constructive and specific in your feedback
|
|
135
|
+
7. Focus on actionable improvements
|
|
136
|
+
|
|
137
|
+
**IMPORTANT**: Your response must be valid JSON only. Do not include any explanatory text outside the JSON block.
|
|
138
|
+
`}function H_($,Z){let Y=$.map((X,z)=>`${z+1}. **[${X.priority.toUpperCase()}] ${X.category}** ${X.file?`in \`${X.file}\``:""}${X.line?` (line ${X.line})`:""}
|
|
139
|
+
- Issue: ${X.issue}
|
|
140
|
+
- Suggestion: ${X.suggestion}`).join(`
|
|
141
|
+
|
|
142
|
+
`);return`You received the following feedback on your pull request implementation. Please address each item systematically.
|
|
143
|
+
|
|
144
|
+
## Review Iteration ${Z}
|
|
145
|
+
|
|
146
|
+
## Feedback to Address
|
|
147
|
+
${Y}
|
|
148
|
+
|
|
149
|
+
## Instructions
|
|
150
|
+
1. Address each feedback item in order of priority (critical \u2192 high \u2192 medium)
|
|
151
|
+
2. Make minimal, focused changes to fix the issues
|
|
152
|
+
3. Ensure you don't introduce new bugs while fixing existing ones
|
|
153
|
+
4. After making changes, commit them with a descriptive message:
|
|
154
|
+
- Format: "fix: address PR review feedback (iteration ${Z})"
|
|
155
|
+
- Include which issues were fixed in the commit body
|
|
156
|
+
|
|
157
|
+
**IMPORTANT**:
|
|
158
|
+
- Focus on the specific issues mentioned
|
|
159
|
+
- Don't make unrelated changes
|
|
160
|
+
- Test your changes if possible
|
|
161
|
+
- Commit your work when done (DO NOT push - this will be done automatically)
|
|
162
|
+
`}function B_($,Z){let Y=$.replace(/^origin\//,""),X=`origin/${Y}`;console.log(`\uD83D\uDCE5 Fetching ${X} from origin...`);try{o0(`git fetch origin ${Y}:refs/remotes/origin/${Y}`,{cwd:Z,encoding:"utf-8",stdio:"pipe"})}catch(z){console.log("\u26A0\uFE0F Specific branch fetch failed, trying full fetch...");try{o0("git fetch origin",{cwd:Z,encoding:"utf-8",stdio:"pipe"})}catch{console.log("\u26A0\uFE0F Full fetch also failed, continuing with existing refs...")}}try{if(o0("git rev-parse --is-shallow-repository",{cwd:Z,encoding:"utf-8",stdio:"pipe"}).trim()==="true"){console.log("\uD83D\uDCE5 Shallow repository detected, fetching full history...");try{o0("git fetch --unshallow origin",{cwd:Z,encoding:"utf-8",stdio:"pipe"})}catch{console.log("\u26A0\uFE0F Failed to unshallow, trying to deepen history..."),o0("git fetch --deepen=1000 origin",{cwd:Z,encoding:"utf-8",stdio:"pipe"})}}}catch{}try{o0(`git rev-parse --verify ${X}`,{cwd:Z,encoding:"utf-8",stdio:"pipe"})}catch{throw new Error(`Remote branch ${X} not found. Make sure it exists on the remote.`)}console.log(`\uD83D\uDD0D Getting diff between ${X} and HEAD...`);try{return o0(`git diff ${X}...HEAD`,{cwd:Z,encoding:"utf-8",maxBuffer:10485760})}catch(z){console.log(`\u26A0\uFE0F Three-dot diff failed: ${z}`)}try{let z=o0(`git merge-base HEAD ${X}`,{cwd:Z,encoding:"utf-8",stdio:"pipe"}).trim();return o0(`git diff ${z}..HEAD`,{cwd:Z,encoding:"utf-8",maxBuffer:10485760})}catch(z){console.log(`\u26A0\uFE0F Merge-base diff failed: ${z}`)}console.log("\u26A0\uFE0F Falling back to two-dot diff (may include extra changes)...");try{return o0(`git diff ${X}..HEAD`,{cwd:Z,encoding:"utf-8",maxBuffer:10485760})}catch(z){throw new Error(`Failed to get PR diff with all approaches: ${z}`)}}function q_($){let Z=$.match(/```json\s*([\s\S]*?)\s*```/)||$.match(/\{[\s\S]*\}/);if(!Z)throw new Error("No JSON found in Claude output");let Y=Z[1]||Z[0];try{let X=JSON.parse(Y);if(!X.summary||!Array.isArray(X.items)||typeof X.approved!=="boolean")throw new Error("Invalid feedback structure");return X}catch(X){throw new Error(`Failed to parse review feedback JSON: ${X}`)}}async function J2($,Z,Y){return new Promise((X,z)=>{let Q=W_(Y,["-p","--dangerously-skip-permissions","--max-turns","500"],{cwd:Z,stdio:["pipe","pipe","pipe"]}),G="",V="";Q.stdout.on("data",(_)=>{G+=_.toString()}),Q.stderr.on("data",(_)=>{V+=_.toString()}),Q.on("close",(_)=>{if(_!==0)z(new Error(`Claude exited with code ${_}: ${V}`));else X(G)}),Q.on("error",(_)=>{z(new Error(`Failed to spawn Claude: ${_}`))}),Q.stdin.write($),Q.stdin.end()})}function V2($,Z){let Y=W2[Z];return $.filter((X)=>W2[X.priority]>=Y)}function j_($,Z){try{if(o0("git add -A",{cwd:Z,maxBuffer:10485760}),o0("git status --porcelain",{cwd:Z,encoding:"utf-8",maxBuffer:10485760}).trim()===""){console.log("No changes to commit");return}o0(`git commit -m "${$}"`,{cwd:Z,maxBuffer:10485760,encoding:"utf-8"}),console.log(`Committed: ${$}`)}catch(Y){throw new Error(`Failed to commit changes: ${Y}`)}}function K_($,Z){try{o0(`git push origin ${$}`,{cwd:Z,maxBuffer:10485760,encoding:"utf-8"}),console.log(`Pushed changes to ${$}`)}catch(Y){throw new Error(`Failed to push changes: ${Y}`)}}function F_($,Z,Y,X){let z=RZ($,`iteration-${Z}`);if(!J_(z))V_(z,{recursive:!0});G2(RZ(z,"feedback.json"),JSON.stringify(Y,null,2)),G2(RZ(z,"review-prompt.txt"),X)}async function _6($){let{repository:Z,prNumber:Y,prBranch:X,baseBranch:z,claudePath:Q,maxIterations:G=5,minPriority:V="medium",workingDir:_,outputDir:B,skipPush:q=!1}=$;if(console.log(`
|
|
163
|
+
\uD83D\uDD04 Starting automatic PR review loop for #${Y}`),console.log(` Base branch: ${z}`),console.log(` Max iterations: ${G}`),console.log(` Addressing: ${V}+ priority issues`),q)console.log(" Push mode: deferred (will not push during iterations)");console.log("");let F=[],M=null;for(let O=1;O<=G;O++){if(console.log(`
|
|
164
|
+
--- Iteration ${O}/${G} ---
|
|
165
|
+
`),O===1)console.log("\uD83D\uDCE5 Fetching PR diff (initial implementation)...");else console.log(`\uD83D\uDCE5 Fetching updated PR diff (after iteration ${O-1} fixes)...`);let D=B_(z,_);if(O===1)console.log("\uD83D\uDD0D Requesting initial PR review...");else console.log(`\uD83D\uDD0D Re-reviewing PR to check if iteration ${O-1} fixes resolved issues...`);let T=__(Z,Y,D,O),g=await J2(T,_,Q);console.log("\uD83D\uDCCB Parsing review feedback..."),M=q_(g),F_(B,O,M,T),console.log(`
|
|
166
|
+
\uD83D\uDCCA Review Summary: ${M.summary}`),console.log(` Total issues: ${M.items.length}`);let C=M.items.reduce((N,w)=>{return N[w.priority]=(N[w.priority]||0)+1,N},{});if(console.log(" Breakdown:",C),M.items.length>0){console.log(" Issues:");for(let N of M.items){let w=N.file?` (${N.file}${N.line?`:${N.line}`:""})`:"";console.log(` [${N.priority}]${w}: ${N.issue}`)}}if(O>1&&F.length>0){let w=F[F.length-1].feedback.items.length,v=M.items.length-w;if(v<0)console.log(` \u2705 ${Math.abs(v)} fewer issue(s) than iteration ${O-1}`);else if(v>0)console.log(` \u26A0\uFE0F ${v} more issue(s) than iteration ${O-1} (fixes may have introduced new issues)`);else console.log(` \u2139\uFE0F Same number of issues as iteration ${O-1}`)}let f=V2(M.items,V);if(f.length===0){console.log(`
|
|
167
|
+
\u2705 No important issues to address. Review loop complete!`),F.push({iteration:O,feedback:M,addressed:[]});break}console.log(`
|
|
168
|
+
\uD83D\uDD27 Addressing ${f.length} ${V}+ priority issue(s)...
|
|
169
|
+
`);let s=H_(f,O);console.log("\uD83E\uDD16 Running Claude to address feedback...");try{await J2(s,_,Q)}catch(N){console.error(`\u26A0\uFE0F Error running Claude for fixes: ${N}`)}try{j_(`fix: address PR review feedback (iteration ${O})`,_)}catch(N){console.log(`\u26A0\uFE0F No changes committed: ${N}`)}if(!q)console.log("\uD83D\uDCE4 Pushing changes..."),K_(X,_);else console.log("\u23F8\uFE0F Skipping push (deferred mode)");if(F.push({iteration:O,feedback:M,addressed:f}),M.approved){console.log(`
|
|
170
|
+
\u2705 PR approved! Review loop complete.`);break}if(!q&&O<G)console.log(`
|
|
171
|
+
\u23F3 Waiting for GitHub to process changes...`),await new Promise((N)=>setTimeout(N,2000))}let H=Boolean(M?.approved||M?.items&&V2(M.items,V).length===0);return console.log(`
|
|
172
|
+
${"=".repeat(60)}`),console.log(`\uD83C\uDFC1 Auto-review loop finished after ${F.length} iteration(s)`),console.log(` Status: ${H?"\u2705 Success":"\u26A0\uFE0F Incomplete"}`),console.log(`${"=".repeat(60)}
|
|
173
|
+
`),{iterations:F.length,success:H,finalFeedback:M,history:F}}var W2;var NZ=a0(()=>{W2={critical:5,high:4,medium:3,low:2,info:1}});var H2=x((MB,wZ)=>{var O_=Object.prototype.hasOwnProperty,i0="~";function H6(){}if(Object.create){if(H6.prototype=Object.create(null),!new H6().__proto__)i0=!1}function M_($,Z,Y){this.fn=$,this.context=Z,this.once=Y||!1}function _2($,Z,Y,X,z){if(typeof Y!=="function")throw new TypeError("The listener must be a function");var Q=new M_(Y,X||$,z),G=i0?i0+Z:Z;if(!$._events[G])$._events[G]=Q,$._eventsCount++;else if(!$._events[G].fn)$._events[G].push(Q);else $._events[G]=[$._events[G],Q];return $}function S9($,Z){if(--$._eventsCount===0)$._events=new H6;else delete $._events[Z]}function d0(){this._events=new H6,this._eventsCount=0}d0.prototype.eventNames=function $(){var Z=[],Y,X;if(this._eventsCount===0)return Z;for(X in Y=this._events)if(O_.call(Y,X))Z.push(i0?X.slice(1):X);if(Object.getOwnPropertySymbols)return Z.concat(Object.getOwnPropertySymbols(Y));return Z};d0.prototype.listeners=function $(Z){var Y=i0?i0+Z:Z,X=this._events[Y];if(!X)return[];if(X.fn)return[X.fn];for(var z=0,Q=X.length,G=new Array(Q);z<Q;z++)G[z]=X[z].fn;return G};d0.prototype.listenerCount=function $(Z){var Y=i0?i0+Z:Z,X=this._events[Y];if(!X)return 0;if(X.fn)return 1;return X.length};d0.prototype.emit=function $(Z,Y,X,z,Q,G){var V=i0?i0+Z:Z;if(!this._events[V])return!1;var _=this._events[V],B=arguments.length,q,F;if(_.fn){if(_.once)this.removeListener(Z,_.fn,void 0,!0);switch(B){case 1:return _.fn.call(_.context),!0;case 2:return _.fn.call(_.context,Y),!0;case 3:return _.fn.call(_.context,Y,X),!0;case 4:return _.fn.call(_.context,Y,X,z),!0;case 5:return _.fn.call(_.context,Y,X,z,Q),!0;case 6:return _.fn.call(_.context,Y,X,z,Q,G),!0}for(F=1,q=new Array(B-1);F<B;F++)q[F-1]=arguments[F];_.fn.apply(_.context,q)}else{var M=_.length,H;for(F=0;F<M;F++){if(_[F].once)this.removeListener(Z,_[F].fn,void 0,!0);switch(B){case 1:_[F].fn.call(_[F].context);break;case 2:_[F].fn.call(_[F].context,Y);break;case 3:_[F].fn.call(_[F].context,Y,X);break;case 4:_[F].fn.call(_[F].context,Y,X,z);break;default:if(!q)for(H=1,q=new Array(B-1);H<B;H++)q[H-1]=arguments[H];_[F].fn.apply(_[F].context,q)}}}return!0};d0.prototype.on=function $(Z,Y,X){return _2(this,Z,Y,X,!1)};d0.prototype.once=function $(Z,Y,X){return _2(this,Z,Y,X,!0)};d0.prototype.removeListener=function $(Z,Y,X,z){var Q=i0?i0+Z:Z;if(!this._events[Q])return this;if(!Y)return S9(this,Q),this;var G=this._events[Q];if(G.fn){if(G.fn===Y&&(!z||G.once)&&(!X||G.context===X))S9(this,Q)}else{for(var V=0,_=[],B=G.length;V<B;V++)if(G[V].fn!==Y||z&&!G[V].once||X&&G[V].context!==X)_.push(G[V]);if(_.length)this._events[Q]=_.length===1?_[0]:_;else S9(this,Q)}return this};d0.prototype.removeAllListeners=function $(Z){var Y;if(Z){if(Y=i0?i0+Z:Z,this._events[Y])S9(this,Y)}else this._events=new H6,this._eventsCount=0;return this};d0.prototype.off=d0.prototype.removeListener;d0.prototype.addListener=d0.prototype.on;d0.prefixed=i0;d0.EventEmitter=d0;if(typeof wZ!=="undefined")wZ.exports=d0});var bZ;var B2=a0(()=>{bZ=b6(H2(),1)});function yZ($,Z){let{milliseconds:Y,fallback:X,message:z,customTimers:Q={setTimeout,clearTimeout},signal:G}=Z,V,_,q=new Promise((F,M)=>{if(typeof Y!=="number"||Math.sign(Y)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${Y}\``);if(G?.aborted){M(q2(G));return}if(G)_=()=>{M(q2(G))},G.addEventListener("abort",_,{once:!0});if($.then(F,M),Y===Number.POSITIVE_INFINITY)return;let H=new xZ;V=Q.setTimeout.call(void 0,()=>{if(X){try{F(X())}catch(O){M(O)}return}if(typeof $.cancel==="function")$.cancel();if(z===!1)F();else if(z instanceof Error)M(z);else H.message=z??`Promise timed out after ${Y} milliseconds`,M(H)},Y)}).finally(()=>{if(q.clear(),_&&G)G.removeEventListener("abort",_)});return q.clear=()=>{Q.clearTimeout.call(void 0,V),V=void 0},q}var xZ,q2=($)=>$.reason??new DOMException("This operation was aborted.","AbortError");var j2=a0(()=>{xZ=class xZ extends Error{name="TimeoutError";constructor($,Z){super($,Z);Error.captureStackTrace?.(this,xZ)}}});function fZ($,Z,Y){let X=0,z=$.length;while(z>0){let Q=Math.trunc(z/2),G=X+Q;if(Y($[G],Z)<=0)X=++G,z-=Q+1;else z=Q}return X}class U9{#Z=[];enqueue($,Z){let{priority:Y=0,id:X}=Z??{},z={priority:Y,id:X,run:$};if(this.size===0||this.#Z[this.size-1].priority>=Y){this.#Z.push(z);return}let Q=fZ(this.#Z,z,(G,V)=>V.priority-G.priority);this.#Z.splice(Q,0,z)}setPriority($,Z){let Y=this.#Z.findIndex((z)=>z.id===$);if(Y===-1)throw new ReferenceError(`No promise function with the id "${$}" exists in the queue.`);let[X]=this.#Z.splice(Y,1);this.enqueue(X.run,{priority:Z,id:$})}dequeue(){return this.#Z.shift()?.run}filter($){return this.#Z.filter((Z)=>Z.priority===$.priority).map((Z)=>Z.run)}get size(){return this.#Z.length}}var K2=()=>{};var A9;var F2=a0(()=>{B2();j2();K2();A9=class A9 extends bZ.default{#Z;#X;#z=0;#q;#j=!1;#K=!1;#V;#D=0;#F=0;#Q;#G;#$;#L;#Y=0;#_;#W;#T=1n;#H=new Map;timeout;constructor($){super();if($={carryoverIntervalCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:U9,...$},!(typeof $.intervalCap==="number"&&$.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${$.intervalCap?.toString()??""}\` (${typeof $.intervalCap})`);if($.interval===void 0||!(Number.isFinite($.interval)&&$.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${$.interval?.toString()??""}\` (${typeof $.interval})`);if(this.#Z=$.carryoverIntervalCount??$.carryoverConcurrencyCount??!1,this.#X=$.intervalCap===Number.POSITIVE_INFINITY||$.interval===0,this.#q=$.intervalCap,this.#V=$.interval,this.#$=new $.queueClass,this.#L=$.queueClass,this.concurrency=$.concurrency,$.timeout!==void 0&&!(Number.isFinite($.timeout)&&$.timeout>0))throw new TypeError(`Expected \`timeout\` to be a positive finite number, got \`${$.timeout}\` (${typeof $.timeout})`);this.timeout=$.timeout,this.#W=$.autoStart===!1,this.#x()}get#C(){return this.#X||this.#z<this.#q}get#E(){return this.#Y<this.#_}#R(){if(this.#Y--,this.#Y===0)this.emit("pendingZero");this.#O(),this.emit("next")}#N(){this.#A(),this.#U(),this.#G=void 0}get#w(){let $=Date.now();if(this.#Q===void 0){let Z=this.#D-$;if(Z<0){if(this.#F>0){let Y=$-this.#F;if(Y<this.#V)return this.#I(this.#V-Y),!0}this.#z=this.#Z?this.#Y:0}else return this.#I(Z),!0}return!1}#I($){if(this.#G!==void 0)return;this.#G=setTimeout(()=>{this.#N()},$)}#S(){if(this.#Q)clearInterval(this.#Q),this.#Q=void 0}#b(){if(this.#G)clearTimeout(this.#G),this.#G=void 0}#O(){if(this.#$.size===0){if(this.#S(),this.emit("empty"),this.#Y===0)this.#b(),this.emit("idle");return!1}let $=!1;if(!this.#W){let Z=!this.#w;if(this.#C&&this.#E){let Y=this.#$.dequeue();if(!this.#X)this.#z++,this.#B();if(this.emit("active"),this.#F=Date.now(),Y(),Z)this.#U();$=!0}}return $}#U(){if(this.#X||this.#Q!==void 0)return;this.#Q=setInterval(()=>{this.#A()},this.#V),this.#D=Date.now()+this.#V}#A(){if(this.#z===0&&this.#Y===0&&this.#Q)this.#S();this.#z=this.#Z?this.#Y:0,this.#M(),this.#B()}#M(){while(this.#O());}get concurrency(){return this.#_}set concurrency($){if(!(typeof $==="number"&&$>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${$}\` (${typeof $})`);this.#_=$,this.#M()}setPriority($,Z){if(typeof Z!=="number"||!Number.isFinite(Z))throw new TypeError(`Expected \`priority\` to be a finite number, got \`${Z}\` (${typeof Z})`);this.#$.setPriority($,Z)}async add($,Z={}){return Z.id??=(this.#T++).toString(),Z={timeout:this.timeout,...Z},new Promise((Y,X)=>{let z=Symbol(`task-${Z.id}`);this.#$.enqueue(async()=>{this.#Y++,this.#H.set(z,{id:Z.id,priority:Z.priority??0,startTime:Date.now(),timeout:Z.timeout});let Q;try{try{Z.signal?.throwIfAborted()}catch(_){if(!this.#X)this.#z--;throw this.#H.delete(z),_}let G=$({signal:Z.signal});if(Z.timeout)G=yZ(Promise.resolve(G),{milliseconds:Z.timeout,message:`Task timed out after ${Z.timeout}ms (queue has ${this.#Y} running, ${this.#$.size} waiting)`});if(Z.signal){let{signal:_}=Z;G=Promise.race([G,new Promise((B,q)=>{Q=()=>{q(_.reason)},_.addEventListener("abort",Q,{once:!0})})])}let V=await G;Y(V),this.emit("completed",V)}catch(G){X(G),this.emit("error",G)}finally{if(Q)Z.signal?.removeEventListener("abort",Q);this.#H.delete(z),queueMicrotask(()=>{this.#R()})}},Z),this.emit("add"),this.#O()})}async addAll($,Z){return Promise.all($.map(async(Y)=>this.add(Y,Z)))}start(){if(!this.#W)return this;return this.#W=!1,this.#M(),this}pause(){this.#W=!0}clear(){this.#$=new this.#L,this.#P()}async onEmpty(){if(this.#$.size===0)return;await this.#J("empty")}async onSizeLessThan($){if(this.#$.size<$)return;await this.#J("next",()=>this.#$.size<$)}async onIdle(){if(this.#Y===0&&this.#$.size===0)return;await this.#J("idle")}async onPendingZero(){if(this.#Y===0)return;await this.#J("pendingZero")}async onRateLimit(){if(this.isRateLimited)return;await this.#J("rateLimit")}async onRateLimitCleared(){if(!this.isRateLimited)return;await this.#J("rateLimitCleared")}async onError(){return new Promise(($,Z)=>{let Y=(X)=>{this.off("error",Y),Z(X)};this.on("error",Y)})}async#J($,Z){return new Promise((Y)=>{let X=()=>{if(Z&&!Z())return;this.off($,X),Y()};this.on($,X)})}get size(){return this.#$.size}sizeBy($){return this.#$.filter($).length}get pending(){return this.#Y}get isPaused(){return this.#W}#x(){if(this.#X)return;this.on("add",()=>{if(this.#$.size>0)this.#B()}),this.on("next",()=>{this.#B()})}#B(){if(this.#X||this.#K)return;this.#K=!0,queueMicrotask(()=>{this.#K=!1,this.#P()})}#P(){let $=this.#j,Z=!this.#X&&this.#z>=this.#q&&this.#$.size>0;if(Z!==$)this.#j=Z,this.emit(Z?"rateLimit":"rateLimitCleared")}get isRateLimited(){return this.#j}get isSaturated(){return this.#Y===this.#_&&this.#$.size>0||this.isRateLimited&&this.#$.size>0}get runningTasks(){return[...this.#H.values()].map(($)=>({...$}))}}});class G8{baseUrl="https://api.github.com";token;appAuth;constructor($={}){if(this.token=$.token||process.env.GITHUB_TOKEN,this.appAuth=$.appAuth,!this.token&&!this.appAuth)this.appAuth=e0.fromEnvironment()??void 0}async getToken($,Z){if(this.token)return this.token;if(this.appAuth)return await this.appAuth.getTokenForRepository($,Z);throw new Error("No GitHub authentication configured. Set GITHUB_TOKEN or configure GitHub App.")}async getBotUsername($,Z){try{if(this.appAuth)return`${(await this.appAuth.getAppInfo()).slug}[bot]`;if(this.token){let Y=await I.fetchWithRetry(`${this.baseUrl}/user`,{method:"GET",headers:{Authorization:`Bearer ${this.token}`,Accept:"application/vnd.github.v3+json","User-Agent":"claude-intern"}});if(!Y.ok)return null;let X=await Y.json();if(X.type==="Bot")return X.login}return null}catch(Y){return null}}async apiRequest($,Z,Y,X,z){let Q=await this.getToken(Y,X),G=`${this.baseUrl}${Z}`,V=await I.fetchWithRetry(G,{method:$,headers:{Authorization:`Bearer ${Q}`,Accept:"application/vnd.github.v3+json","Content-Type":"application/json","User-Agent":"claude-intern"},body:z?JSON.stringify(z):void 0});if(!V.ok){let _=await V.json().catch(()=>({message:"Unknown error"}));throw new Error(`GitHub API error (${V.status}): ${_.message||V.statusText}`)}return await V.json()}async getPullRequest($,Z,Y){return this.apiRequest("GET",`/repos/${$}/${Z}/pulls/${Y}`,$,Z)}async getPullRequestReviewComments($,Z,Y){let X=[],z=1,Q=100;while(!0){let G=await this.apiRequest("GET",`/repos/${$}/${Z}/pulls/${Y}/comments?per_page=${Q}&page=${z}`,$,Z);if(X.push(...G),G.length<Q)break;z++}return X}async getReviews($,Z,Y){return this.apiRequest("GET",`/repos/${$}/${Z}/pulls/${Y}/reviews`,$,Z)}async getReviewComments($,Z,Y,X){return(await this.getPullRequestReviewComments($,Z,Y)).filter((Q)=>Q.pull_request_review_id===X)}async replyToComment($,Z,Y,X,z){return this.apiRequest("POST",`/repos/${$}/${Z}/pulls/${Y}/comments/${X}/replies`,$,Z,{body:z})}async createReviewComment($,Z,Y,X,z,Q,G,V="RIGHT"){return this.apiRequest("POST",`/repos/${$}/${Z}/pulls/${Y}/comments`,$,Z,{body:X,commit_id:z,path:Q,line:G,side:V})}async postPullRequestComment($,Z,Y,X){await this.apiRequest("POST",`/repos/${$}/${Z}/issues/${Y}/comments`,$,Z,{body:X})}async getIssueComments($,Z,Y){return this.apiRequest("GET",`/repos/${$}/${Z}/issues/${Y}/comments`,$,Z)}async addReactionToComment($,Z,Y,X){await this.apiRequest("POST",`/repos/${$}/${Z}/pulls/comments/${Y}/reactions`,$,Z,{content:X})}async getCommentReactions($,Z,Y){return this.apiRequest("GET",`/repos/${$}/${Z}/pulls/comments/${Y}/reactions`,$,Z)}async addReactionToIssueComment($,Z,Y,X){await this.apiRequest("POST",`/repos/${$}/${Z}/issues/comments/${Y}/reactions`,$,Z,{content:X})}async getIssueCommentReactions($,Z,Y){return this.apiRequest("GET",`/repos/${$}/${Z}/issues/comments/${Y}/reactions`,$,Z)}async requestReReview($,Z,Y,X){await this.apiRequest("POST",`/repos/${$}/${Z}/pulls/${Y}/requested_reviewers`,$,Z,{reviewers:X})}async getPullRequestDiff($,Z,Y){let X=await this.getToken($,Z),z=`${this.baseUrl}/repos/${$}/${Z}/pulls/${Y}`,Q=await I.fetchWithRetry(z,{method:"GET",headers:{Authorization:`Bearer ${X}`,Accept:"application/vnd.github.v3.diff","User-Agent":"claude-intern"}});if(!Q.ok)throw new Error(`Failed to get PR diff: ${Q.statusText}`);return Q.text()}async getFileContent($,Z,Y,X){try{let z=await this.apiRequest("GET",`/repos/${$}/${Z}/contents/${Y}?ref=${X}`,$,Z),Q=z.encoding==="base64"?Buffer.from(z.content,"base64").toString("utf-8"):z.content;return{path:z.path,content:Q,sha:z.sha}}catch(z){return null}}processComments($){return $.map((Z)=>({id:Z.id,path:Z.path,line:Z.line??Z.original_line,side:Z.side,diffHunk:Z.diff_hunk,body:Z.body,reviewer:Z.user.login,isReply:Z.in_reply_to_id!==void 0}))}async getUnaddressedComments($,Z,Y,X){let z=await this.getPullRequestReviewComments($,Z,Y),Q=new Set;for(let V of z)if(V.user.login===X&&V.in_reply_to_id!==void 0)Q.add(V.in_reply_to_id);let G=z.filter((V)=>V.user.login!==X&&!Q.has(V.id)&&!V.in_reply_to_id);return this.processComments(G)}}var kZ=a0(()=>{P8();N1()});import{Database as D_}from"bun:sqlite";import{existsSync as L_,mkdirSync as I_}from"fs";import{dirname as S_}from"path";class hZ{db;maxRetries;verbose;constructor($={}){let Z=$.dbPath||U_;this.maxRetries=$.maxRetries??A_,this.verbose=$.verbose??!1;let Y=S_(Z);if(!L_(Y))I_(Y,{recursive:!0});this.db=new D_(Z),this.initializeSchema()}initializeSchema(){if(this.db.run(`
|
|
82
174
|
CREATE TABLE IF NOT EXISTS webhook_events (
|
|
83
175
|
id TEXT PRIMARY KEY,
|
|
84
176
|
event_type TEXT NOT NULL,
|
|
@@ -92,14 +184,14 @@ ${$==="push"?"- Make sure to amend the commit (git commit --amend --no-edit) so
|
|
|
92
184
|
`),this.db.run(`
|
|
93
185
|
CREATE INDEX IF NOT EXISTS idx_webhook_events_status
|
|
94
186
|
ON webhook_events(status)
|
|
95
|
-
`),this.verbose)console.log("[WebhookQueue] Database initialized")}generateId(){return`${Date.now()}-${Math.random().toString(36).substring(2,11)}`}enqueue($,Z){let Y=this.generateId(),
|
|
96
|
-
VALUES (?, ?, ?, 'pending', ?, ?, 0)`,[Y,$,X,
|
|
187
|
+
`),this.verbose)console.log("[WebhookQueue] Database initialized")}generateId(){return`${Date.now()}-${Math.random().toString(36).substring(2,11)}`}enqueue($,Z){let Y=this.generateId(),X=Date.now(),z=JSON.stringify(Z);if(this.db.run(`INSERT INTO webhook_events (id, event_type, payload, status, created_at, updated_at, attempts)
|
|
188
|
+
VALUES (?, ?, ?, 'pending', ?, ?, 0)`,[Y,$,z,X,X]),this.verbose)console.log(`[WebhookQueue] Enqueued event ${Y} (${$})`);return Y}markProcessing($){let Z=Date.now();if(this.db.run(`UPDATE webhook_events
|
|
97
189
|
SET status = 'processing', updated_at = ?, attempts = attempts + 1
|
|
98
|
-
WHERE id = ?`,[Z,$]),this.verbose)console.log(`[WebhookQueue] Event ${$} marked as processing`)}markCompleted($){if(this.db.run("DELETE FROM webhook_events WHERE id = ?",[$]),this.verbose)console.log(`[WebhookQueue] Event ${$} completed and removed`)}markFailed($,Z){let Y=Date.now(),
|
|
190
|
+
WHERE id = ?`,[Z,$]),this.verbose)console.log(`[WebhookQueue] Event ${$} marked as processing`)}markCompleted($){if(this.db.run("DELETE FROM webhook_events WHERE id = ?",[$]),this.verbose)console.log(`[WebhookQueue] Event ${$} completed and removed`)}markFailed($,Z){let Y=Date.now(),X=this.getEvent($);if(!X)return;if(X.attempts>=this.maxRetries){if(this.db.run(`UPDATE webhook_events
|
|
99
191
|
SET status = 'failed', updated_at = ?, last_error = ?
|
|
100
|
-
WHERE id = ?`,[Y,Z,$]),this.verbose)console.log(`[WebhookQueue] Event ${$} permanently failed after ${
|
|
192
|
+
WHERE id = ?`,[Y,Z,$]),this.verbose)console.log(`[WebhookQueue] Event ${$} permanently failed after ${X.attempts} attempts`)}else if(this.db.run(`UPDATE webhook_events
|
|
101
193
|
SET status = 'pending', updated_at = ?, last_error = ?
|
|
102
|
-
WHERE id = ?`,[Y,Z,$]),this.verbose)console.log(`[WebhookQueue] Event ${$} marked for retry (attempt ${
|
|
194
|
+
WHERE id = ?`,[Y,Z,$]),this.verbose)console.log(`[WebhookQueue] Event ${$} marked for retry (attempt ${X.attempts}/${this.maxRetries})`)}getEvent($){let Z=this.db.query(`SELECT id, event_type, payload, status, created_at, updated_at, attempts, last_error
|
|
103
195
|
FROM webhook_events WHERE id = ?`).get($);if(!Z)return null;return this.rowToEvent(Z)}getPendingEvents(){return this.db.query(`SELECT id, event_type, payload, status, created_at, updated_at, attempts, last_error
|
|
104
196
|
FROM webhook_events
|
|
105
197
|
WHERE status IN ('pending', 'processing')
|
|
@@ -112,182 +204,192 @@ ${$==="push"?"- Make sure to amend the commit (git commit --amend --no-edit) so
|
|
|
112
204
|
SELECT status, COUNT(*) as count
|
|
113
205
|
FROM webhook_events
|
|
114
206
|
GROUP BY status
|
|
115
|
-
`).all(),Z={pending:0,processing:0,failed:0};for(let Y of $){if(Y.status==="pending")Z.pending=Y.count;if(Y.status==="processing")Z.processing=Y.count;if(Y.status==="failed")Z.failed=Y.count}return Z}cleanup($=604800000){let Z=Date.now()-$,Y=this.db.run("DELETE FROM webhook_events WHERE status = 'failed' AND updated_at < ?",[Z]);if(this.verbose&&Y.changes>0)console.log(`[WebhookQueue] Cleaned up ${Y.changes} old failed events`);return Y.changes}rowToEvent($){return{id:$.id,eventType:$.event_type,payload:$.payload,status:$.status,createdAt:$.created_at,updatedAt:$.updated_at,attempts:$.attempts,lastError:$.last_error}}close(){this.db.close()}}var
|
|
207
|
+
`).all(),Z={pending:0,processing:0,failed:0};for(let Y of $){if(Y.status==="pending")Z.pending=Y.count;if(Y.status==="processing")Z.processing=Y.count;if(Y.status==="failed")Z.failed=Y.count}return Z}cleanup($=604800000){let Z=Date.now()-$,Y=this.db.run("DELETE FROM webhook_events WHERE status = 'failed' AND updated_at < ?",[Z]);if(this.verbose&&Y.changes>0)console.log(`[WebhookQueue] Cleaned up ${Y.changes} old failed events`);return Y.changes}rowToEvent($){return{id:$.id,eventType:$.event_type,payload:$.payload,status:$.status,createdAt:$.created_at,updatedAt:$.updated_at,attempts:$.attempts,lastError:$.last_error}}close(){this.db.close()}}var U_="/tmp/claude-intern-webhooks/queue.db",A_=3;var O2=()=>{};function P9($){let Z=[];if(Z.push("# PR Review Feedback - Address Required Changes"),Z.push(""),Z.push("## PR Information"),Z.push(""),Z.push(`- **Repository:** ${$.repository}`),Z.push(`- **PR #${$.prNumber}:** ${$.prTitle}`),Z.push(`- **Branch:** \`${$.branch}\``),Z.push(`- **Reviewer:** @${$.reviewer}`),Z.push(`- **Review Status:** ${P_($.reviewState)}`),Z.push(""),$.reviewBody&&$.reviewBody.trim())Z.push("## Overall Review Comment"),Z.push(""),Z.push($.reviewBody),Z.push("");if($.comments.length>0){Z.push("## File-Specific Feedback"),Z.push("");let Y=T_($.comments);for(let[X,z]of Object.entries(Y)){Z.push(`### \`${X}\``),Z.push("");for(let Q of z)Z.push(C_(Q)),Z.push("")}}if($.conversationComments&&$.conversationComments.length>0){Z.push("## General Conversation Feedback"),Z.push(""),Z.push("The reviewer also provided these general comments in the conversation:"),Z.push("");for(let Y of $.conversationComments)Z.push(`> ${Y.body.split(`
|
|
116
208
|
`).join(`
|
|
117
209
|
> `)}`),Z.push("")}return Z.push("## Instructions"),Z.push(""),Z.push("Please address each piece of feedback above by making the necessary code changes."),Z.push(""),Z.push("**Guidelines:**"),Z.push("1. Address each comment systematically, starting from the first file"),Z.push("2. Make minimal, focused changes that directly address the feedback"),Z.push("3. If a suggestion is unclear or you disagree, explain your reasoning"),Z.push("4. Ensure your changes don't break existing functionality"),Z.push("5. Run any relevant tests to verify your changes"),Z.push(""),Z.push("**IMPORTANT:**"),Z.push("- After making your changes, commit them with a descriptive message"),Z.push("- Your commit message should summarize what changes you made to address the feedback"),Z.push("- Do NOT push to the remote - that will be done automatically"),Z.join(`
|
|
118
|
-
`)}function
|
|
210
|
+
`)}function P_($){switch($){case"approved":return"\u2705 Approved";case"changes_requested":return"\uD83D\uDD04 Changes Requested";case"commented":return"\uD83D\uDCAC Commented";case"dismissed":return"\u274C Dismissed";case"pending":return"\u23F3 Pending";default:return $}}function T_($){let Z={};for(let Y of $){if(!Z[Y.path])Z[Y.path]=[];Z[Y.path].push(Y)}for(let Y of Object.keys(Z))Z[Y].sort((X,z)=>(X.line??0)-(z.line??0));return Z}function C_($){let Z=[],Y=$.line?`Line ${$.line}`:"General";if(Z.push(`**${Y}** (by @${$.reviewer}):`),Z.push(""),$.diffHunk){let X=E_($.path);Z.push("```"+X),Z.push($.diffHunk),Z.push("```"),Z.push("")}return Z.push(`> ${$.body.split(`
|
|
119
211
|
`).join(`
|
|
120
212
|
> `)}`),Z.join(`
|
|
121
|
-
`)}function
|
|
122
|
-
`)}function
|
|
123
|
-
${Q[1].trim()}`;return
|
|
124
|
-
\uD83D\uDD14 Received changes_requested review for PR #${
|
|
125
|
-
\uD83D\uDCCB Processing review for ${Y}/${
|
|
126
|
-
\uD83D\
|
|
127
|
-
\
|
|
213
|
+
`)}function E_($){let Z=$.split(".").pop()?.toLowerCase();return{ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",kt:"kotlin",swift:"swift",c:"c",cpp:"cpp",h:"c",hpp:"cpp",cs:"csharp",php:"php",sh:"bash",bash:"bash",zsh:"bash",yaml:"yaml",yml:"yaml",json:"json",md:"markdown",sql:"sql",html:"html",css:"css",scss:"scss",less:"less",vue:"vue",svelte:"svelte"}[Z||""]||"diff"}function T9($,Z,Y){let X=[];if(X.push("## \uD83E\uDD16 Claude Intern - Review Feedback Addressed"),X.push(""),$===Z)X.push(`\u2705 All ${Z} comment(s) have been addressed in the latest commit.`);else if(X.push(`\uD83D\uDCDD Addressed ${$} of ${Z} comment(s).`),$<Z)X.push(""),X.push("Some comments may require manual attention or clarification.");if(Y)X.push(""),X.push(Y);return X.push(""),X.push("---"),X.push("*This response was automatically generated by [Claude Intern](https://github.com/danii1/claude-intern)*"),X.join(`
|
|
214
|
+
`)}function C9($){let Y=$.replace(/\x1b\[[0-9;]*m/g,""),X=(V)=>{return V.length>500?V.substring(0,500)+"...":V},z=Y.match(/##\s*Summary\s*\n+([\s\S]*?)(?=\n##|\n---|\z)/i);if(z&&z[1].trim())return X(z[1].trim());let Q=Y.match(/###\s*Changes Made:?\s*\n+([\s\S]*?)(?=\n###|\n##|\n---|\z)/i);if(Q&&Q[1].trim()){let V=`**Changes Made:**
|
|
215
|
+
${Q[1].trim()}`;return X(V)}let G=Y.match(/(?:Perfect!|I've successfully[^\n]*)\s*\n+([\s\S]*?)(?=\n##|\n###|\z)/);if(G&&G[1].trim())return X(G[1].trim());return"Addressed review feedback by implementing the requested changes."}import{createHmac as R_,timingSafeEqual as N_}from"crypto";function L2($,Z,Y){if(!Z)return{valid:!1,error:"Missing X-Hub-Signature-256 header"};if(!Z.startsWith("sha256="))return{valid:!1,error:"Invalid signature format (expected sha256=...)"};let X="sha256="+R_("sha256",Y).update($).digest("hex");try{let z=Buffer.from(Z),Q=Buffer.from(X);if(z.length!==Q.length)return{valid:!1,error:"Signature length mismatch"};return{valid:N_(z,Q)}}catch(z){return{valid:!1,error:`Signature verification failed: ${z.message}`}}}function I2($){if(!$)return null;if(["pull_request_review","pull_request_review_comment","ping"].includes($))return $;return null}function M2($,Z){if(!$)return!1;if(!Z)return!1;let Y=Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(new RegExp(`@${Y}\\b`,"i").test($))return!0;if(Z.endsWith("[bot]")){let Q=Z.slice(0,-5).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`@${Q}\\b`,"i").test($)}return!1}function w_($,Z=[],Y){if(!Y)return!1;if(M2($.review.body,Y))return!0;for(let X of Z)if(M2(X.body,Y))return!0;return!1}function S2($,Z={}){if($.review.state!=="changes_requested")return!1;if($.review.user.type==="Bot")return!1;if($.pull_request.state!=="open")return!1;if(Z.requireBotMention){if(!w_($,Z.comments||[],Z.botName))return!1}return!0}function U2($,Z=[]){return{prNumber:$.pull_request.number,prTitle:$.pull_request.title,repository:$.repository.full_name,branch:$.pull_request.head.ref,reviewer:$.review.user.login,reviewState:$.review.state,reviewBody:$.review.body,comments:Z,installationId:$.installation?.id}}function gZ($){return{id:$.id,path:$.path,line:$.line??$.original_line,side:$.side,diffHunk:$.diff_hunk,body:$.body,reviewer:$.user.login,isReply:$.in_reply_to_id!==void 0}}function A2($){return console.log(`\uD83C\uDFD3 Received ping from GitHub: "${$.zen}"`),console.log(` Hook ID: ${$.hook_id}`),console.log(` Events: ${$.hook.events.join(", ")}`),{success:!0,message:`Webhook configured successfully. Zen: ${$.zen}`}}class vZ{requests=new Map;windowMs;maxRequests;constructor($=60000,Z=30){this.windowMs=$,this.maxRequests=Z}isAllowed($){let Z=Date.now(),Y=Z-this.windowMs,X=this.requests.get($)||[];if(X=X.filter((z)=>z>Y),X.length>=this.maxRequests)return!1;return X.push(Z),this.requests.set($,X),!0}getRemaining($){let Y=Date.now()-this.windowMs,X=(this.requests.get($)||[]).filter((z)=>z>Y);return Math.max(0,this.maxRequests-X.length)}cleanup(){let Z=Date.now()-this.windowMs;for(let[Y,X]of this.requests.entries()){let z=X.filter((Q)=>Q>Z);if(z.length===0)this.requests.delete(Y);else this.requests.set(Y,z)}}}function P2($){let Z=$.replace(/^::ffff:/,"");for(let Y of b_)if(x_(Z,Y))return!0;return!1}function x_($,Z){let[Y,X]=Z.split("/"),z=-1<<32-parseInt(X,10),Q=D2($),G=D2(Y);if(Q===null||G===null)return!1;return(Q&z)===(G&z)}function D2($){let Z=$.split(".");if(Z.length!==4)return null;let Y=0;for(let X of Z){let z=parseInt(X,10);if(isNaN(z)||z<0||z>255)return null;Y=(Y<<8)+z}return Y>>>0}var b_;var T2=a0(()=>{b_=["140.82.112.0/20","143.55.64.0/20","185.199.108.0/22","192.30.252.0/22"]});var w2={};i9(w2,{startWebhookServer:()=>o_,DEFAULT_CONFIG:()=>C2});import{spawn as y_}from"child_process";import{unlinkSync as f_,writeFileSync as k_}from"fs";import{createServer as h_}from"http";function c1($,Z){if($.debug)console.log(`[DEBUG] ${Z}`)}function v_($,Z){if(!$)return!1;let Y=$.toLowerCase().trim();if(Z){let X=Z.toLowerCase().replace(/\[bot\]$/,"");Y=Y.replace(new RegExp(`@${X}\\[bot\\]`,"g"),"").replace(new RegExp(`@${X}`,"g"),"").trim()}return g_.some((X)=>Y===X||Y===X+".")}function r0($,Z=200){return new Response(JSON.stringify($),{status:Z,headers:{"Content-Type":"application/json"}})}async function p_($,Z){let Y=Date.now(),X=$.headers.get("x-forwarded-for")?.split(",")[0]?.trim()||$.headers.get("x-real-ip")||"unknown";if(c1(Z,`Incoming request from ${X}`),!E2.isAllowed(X))return console.log(`\u26A0\uFE0F Rate limit exceeded for ${X}`),r0({error:"Rate limit exceeded"},429);if(Z.validateIp&&X!=="unknown"&&!P2(X))return console.log(`\u26A0\uFE0F Request from non-GitHub IP: ${X}`),r0({error:"Request not from GitHub"},403);let z=await $.text(),Q=$.headers.get("x-hub-signature-256"),G=L2(z,Q,Z.webhookSecret);if(!G.valid)return console.log(`\u274C Signature verification failed: ${G.error}`),r0({error:"Invalid signature",details:G.error},401);c1(Z,"Signature verified successfully");let V=I2($.headers.get("x-github-event"));if(!V)return r0({error:"Unsupported event type"},400);c1(Z,`Event type: ${V}`);let _;try{_=JSON.parse(z)}catch(B){return r0({error:"Invalid JSON payload"},400)}if(V==="ping"){let B=A2(_);return r0({success:!0,message:B.message})}if(V==="pull_request_review"){let B=_,q=new G8,[F,M]=B.repository.full_name.split("/"),H=await q.getBotUsername(F,M);c1(Z,`Bot username: ${H||"unknown"}`);let D=(await q.getPullRequestReviewComments(F,M,B.pull_request.number)).map(gZ);if(!S2(B,{requireBotMention:!0,botName:H||void 0,comments:D})){let C=`state=${B.review.state}, pr_state=${B.pull_request.state}`;if(H&&B.review.state==="changes_requested"&&B.pull_request.state==="open")C=`No @${H} mention found in review`;return console.log(`\u23ED\uFE0F Skipping review: ${C}`),r0({success:!0,message:"Review does not require processing",reason:C})}if(console.log(`
|
|
216
|
+
\uD83D\uDD14 Received changes_requested review for PR #${B.pull_request.number}`),console.log(` Repository: ${B.repository.full_name}`),console.log(` Reviewer: ${B.review.user.login}`),H)console.log(` Bot mention: @${H} detected`);let T;if(Z1)T=Z1.enqueue("pull_request_review",B),c1(Z,`Persisted event ${T} to queue`);R2.add(()=>N2(T,B,Z)).catch((C)=>{console.error("\u274C Error processing review:",C)});let g=Date.now()-Y;return r0({success:!0,message:"Review processing started",eventId:T,prNumber:B.pull_request.number,repository:B.repository.full_name,processingTime:`${g}ms`})}if(V==="pull_request_review_comment")return r0({success:!0,message:"Individual comment events not processed (use full review events)"});return r0({error:"Unhandled event type"},400)}async function N2($,Z,Y){if($&&Z1)Z1.markProcessing($);try{if(await u_(Z,Y),$&&Z1)Z1.markCompleted($)}catch(X){if($&&Z1)Z1.markFailed($,X.message);throw X}}async function m_($,Z,Y,X,z=!1){if(X.length===0)return;let Q=X.filter((B)=>!B.isReply),G=X.length-Q.length;if(G>0)console.log(` Skipping ${G} reply comment(s) (only marking top-level)`);if(Q.length===0){console.log(" No top-level comments to mark");return}console.log(`\uD83C\uDF89 Marking ${Q.length} comment(s) as addressed...`);let V=0,_=0;for(let B of Q)try{await $.addReactionToComment(Z,Y,B.id,"hooray"),V++}catch(q){_++,console.warn(` \u26A0\uFE0F Failed to add reaction to comment ${B.id}: ${q.message}`)}if(V>0)console.log(`\u2705 Marked ${V} comment(s) as addressed with \uD83C\uDF89 reaction`);if(_>0)console.warn(`\u26A0\uFE0F Failed to mark ${_} comment(s)`)}async function u_($,Z){let[Y,X]=$.repository.full_name.split("/"),z=$.pull_request.number,Q=$.pull_request.head.ref;console.log(`
|
|
217
|
+
\uD83D\uDCCB Processing review for ${Y}/${X}#${z}`);try{let G=new G8,V;if(!process.env.GITHUB_TOKEN){let K=e0.fromEnvironment();if(K)try{V=await K.getGitAuthor(),c1(Z,`Commits will be authored by: ${V.name}`)}catch(P){c1(Z,`Could not get GitHub App author info: ${P.message}`)}}console.log("\uD83D\uDCE5 Fetching review comments...");let _=await G.getPullRequestReviewComments(Y,X,z);console.log(` Found ${_.length} total comment(s)`);let B=new Set;for(let K of _)try{if((await G.getCommentReactions(Y,X,K.id)).some((r)=>r.content==="hooray"))B.add(K.id)}catch(P){c1(Z,`Failed to fetch reactions for comment ${K.id}`)}let q=_.filter((K)=>!B.has(K.id)),F=_.length-q.length;if(F>0)console.log(` ${F} already addressed (skipping)`);console.log(` ${q.length} remaining to address`);let M=q.map(gZ),H=U2($,M);console.log(`\uD83C\uDF3F Preparing worktree for branch: ${Q}`);let O=await d_(Q,Z.debug);if(!O){console.error("\u274C Failed to prepare repository");return}if(V)await I.executeGitCommand(["config","user.name",V.name],{verbose:Z.debug,cwd:O}),await I.executeGitCommand(["config","user.email",V.email],{verbose:Z.debug,cwd:O}),console.log(`\uD83E\uDD16 Git author set to: ${V.name}`);let D=await G.getBotUsername(Y,X),T=$.review.body;if(v_(T,D||void 0)&&Z.autoReview){console.log(`
|
|
218
|
+
\uD83D\uDD04 Auto-review trigger detected: "${T?.trim()}"`),console.log(" Skipping normal review flow, running auto-review loop directly...");let K=`/tmp/claude-intern-auto-review-${z}`,P=$.pull_request.base.ref;try{let b=await _6({repository:`${Y}/${X}`,prNumber:z,prBranch:Q,baseBranch:P,claudePath:process.env.CLAUDE_CLI_PATH||"claude",maxIterations:Z.autoReviewMaxIterations,minPriority:"medium",workingDir:O,outputDir:K});if(b.success)console.log(`\u2705 Auto-review completed successfully after ${b.iterations} iteration(s)`);else console.warn(`\u26A0\uFE0F Auto-review completed but some issues remain after ${b.iterations} iteration(s)`);if(Z.autoReply){console.log("\uD83D\uDCAC Posting auto-review summary reply...");let r=`\uD83E\uDD16 Auto-review completed after ${b.iterations} iteration(s). ${b.success?"All medium+ priority issues addressed.":"Some issues may remain."}`;await i_(G,Y,X,z,r)}console.log(`
|
|
219
|
+
\u2705 Successfully completed auto-review for PR #${z}`);return}catch(b){console.error(`\u274C Auto-review loop failed: ${b.message}`);return}}let C=P9(H),f=`/tmp/claude-intern-review-prompt-${z}.md`;k_(f,C,"utf8"),console.log(`\uD83D\uDCBE Saved review prompt to: ${f}`),console.log("\uD83E\uDD16 Running Claude to address review feedback...");let s=await c_(f,O);try{f_(f)}catch{}let N=s.output?.includes("Reached max turns");if(!s.success){console.error(`\u274C Claude failed: ${s.message}`);return}if(N)console.warn("\u26A0\uFE0F Claude hit max turns limit");let w=parseInt(process.env.HOOK_RETRIES||"10",10),y=process.env.CLAUDE_CLI_PATH||"claude",v=parseInt(process.env.CLAUDE_MAX_TURNS||"500",10),$0=await I.hasUncommittedChanges(O),x0=await I.executeGitCommand(["rev-list","--count",`origin/${Q}..HEAD`],{verbose:!1,cwd:O}),S=parseInt(x0.output?.trim()||"0",10);if(!$0&&S===0)console.warn("\u26A0\uFE0F No changes were made by Claude");else if($0){console.log(`
|
|
220
|
+
\uD83D\uDCDD Claude left changes uncommitted, committing now...`);let K=0,P=!1;while(K<=w&&!P){K++;let b=await I.commitChanges(`PR-${z}`,"Address review feedback",{verbose:Z.debug,author:V,cwd:O});if(b.success){console.log("\u2705 Changes committed successfully"),P=!0;break}if(b.hookError&&K<=w)if(console.log(`
|
|
221
|
+
\u26A0\uFE0F Git pre-commit hook failed (attempt ${K}/${w+1})`),await B1("commit",y,v,O)){console.log(`
|
|
128
222
|
\uD83D\uDD04 Retrying commit after Claude fixed the issues...`);continue}else{console.log(`
|
|
129
|
-
\u274C Could not fix git hook errors automatically`);break}else{if(
|
|
223
|
+
\u274C Could not fix git hook errors automatically`);break}else{if(K>w)console.log(`
|
|
130
224
|
\u274C Max retries (${w}) exceeded for git hook fixes`);console.error(`
|
|
131
|
-
\u274C Failed to commit changes: ${
|
|
132
|
-
\
|
|
133
|
-
\
|
|
225
|
+
\u274C Failed to commit changes: ${b.message}`);return}}if(!P){console.error("\u274C Failed to commit changes after retries");return}}let E0=await I.executeGitCommand(["rev-list","--count",`origin/${Q}..HEAD`],{verbose:!1,cwd:O}),A0=parseInt(E0.output?.trim()||"0",10);if(A0===0)console.warn("\u26A0\uFE0F No new commits to push - Claude may not have made any changes");else{let K=async(X0)=>{let d=0;while(d<=w){d++;let B0=await I.runPrePushHookLocally({verbose:Z.debug,cwd:O});if(B0.success){if(d===1)console.log(`\u2705 ${B0.message}`);else console.log(`\u2705 Pre-push hook passed after ${d} attempt(s)`);return!0}if(B0.hookError&&d<=w)if(console.log(`
|
|
226
|
+
\u26A0\uFE0F Pre-push hook failed during ${X0} (attempt ${d}/${w+1})`),await B1("push",y,v,O)){console.log(`
|
|
227
|
+
\uD83D\uDD04 Retrying local hook validation after Claude fixed the issues...`);continue}else return console.log(`
|
|
228
|
+
\u274C Could not fix pre-push hook errors automatically`),!1;else{if(d>w)console.log(`
|
|
229
|
+
\u274C Max retries (${w}) exceeded for pre-push hook fixes`);return console.error(`
|
|
230
|
+
\u274C Pre-push hook validation failed: ${B0.message}`),!1}}return!1};if(console.log(`
|
|
231
|
+
\uD83D\uDD0D Validating pre-push hook locally (before pushing)...`),!await K("initial validation")){console.error("\u274C Cannot proceed without passing pre-push hook validation");return}let b=!1;if(Z.autoReview){console.log(`
|
|
232
|
+
\uD83D\uDD04 Running auto-review loop (without pushing)...`);let X0=`/tmp/claude-intern-auto-review-${z}`,d=$.pull_request.base.ref;try{let B0=await _6({repository:`${Y}/${X}`,prNumber:z,prBranch:Q,baseBranch:d,claudePath:process.env.CLAUDE_CLI_PATH||"claude",maxIterations:Z.autoReviewMaxIterations,minPriority:"medium",workingDir:O,outputDir:X0,skipPush:!0});if(B0.success)console.log(`\u2705 Auto-review completed successfully after ${B0.iterations} iteration(s)`);else console.warn(`\u26A0\uFE0F Auto-review completed but some issues remain after ${B0.iterations} iteration(s)`);if(b=!0,console.log(`
|
|
233
|
+
\uD83D\uDD0D Re-validating pre-push hook after auto-review improvements...`),!await K("post auto-review validation")){console.error("\u274C Cannot proceed - auto-review changes failed pre-push hook validation");return}}catch(B0){console.error(`\u274C Auto-review loop failed: ${B0.message}`)}}console.log(`
|
|
234
|
+
\uD83D\uDCE4 Pushing ${A0}${b?"+ auto-review":""} commit(s)...`);let r=0,H0=!1;while(r<=w&&!H0){r++;let X0=await I.pushCurrentBranch({verbose:Z.debug,cwd:O});if(X0.success){console.log("\u2705 Changes pushed successfully"),H0=!0;break}if(X0.hookError&&r<=w)if(console.log(`
|
|
235
|
+
\u26A0\uFE0F Git pre-push hook failed during actual push (attempt ${r}/${w+1})`),await B1("push",y,v,O)){console.log(`
|
|
134
236
|
\uD83D\uDD04 Retrying push after Claude fixed and amended the commit...`);continue}else{console.log(`
|
|
135
|
-
\u274C Could not fix git pre-push hook errors automatically`);break}else{if(
|
|
237
|
+
\u274C Could not fix git pre-push hook errors automatically`);break}else{if(r>w)console.log(`
|
|
136
238
|
\u274C Max retries (${w}) exceeded for git hook fixes`);console.error(`
|
|
137
|
-
\u274C Failed to push changes: ${
|
|
138
|
-
\u2705 Successfully addressed review for PR #${
|
|
139
|
-
\uD83D\uDD04 Recovering ${
|
|
140
|
-
Expected format: https://github.com/owner/repo/pull/123`);return{owner:Z[1],repo:Z[2],prNumber:parseInt(Z[3],10)}}async function
|
|
141
|
-
\uD83D\uDCCB Fetching PR details...`);let q=await
|
|
142
|
-
\uD83D\uDD0E Looking for changes_requested review...`);let F=await
|
|
143
|
-
\uD83D\uDCE5 Fetching review comments...`);let
|
|
144
|
-
\uD83D\uDCAC Fetching conversation comments...`);let
|
|
145
|
-
\u2705 All review and conversation comments have been addressed already.`),console.log(` View PR: ${$}`);return}let
|
|
146
|
-
\uD83C\uDF3F Preparing review worktree for branch: ${q.head.ref}`),!await
|
|
147
|
-
\uD83E\uDD16 Running Claude to address review feedback...`);let P=await
|
|
239
|
+
\u274C Failed to push changes: ${X0.message}`);return}}if(!H0){console.error("\u274C Failed to push changes after retries");return}}if(await m_(G,Y,X,M,Z.debug),Z.autoReply){console.log("\uD83D\uDCAC Posting review summary reply...");let K=s.output?C9(s.output):void 0;await l_(G,Y,X,z,H,K)}console.log(`
|
|
240
|
+
\u2705 Successfully addressed review for PR #${z}`)}catch(G){if(console.error(`\u274C Error processing review: ${G.message}`),Z.debug)console.error(G.stack)}}async function d_($,Z=!1){if(!await I.isGitRepository())return console.error("\u274C Not in a git repository"),null;console.log(` Preparing worktree for ${$}...`);let X=await I.prepareReviewWorktree($,{verbose:Z});if(!X.success)return console.error(`\u274C Failed to prepare worktree: ${X.error}`),null;return console.log(` Worktree ready at: ${X.path}`),X.path||null}async function c_($,Z){return new Promise((Y)=>{let X=process.env.CLAUDE_CLI_PATH||"claude",z=parseInt(process.env.CLAUDE_MAX_TURNS||"500",10);console.log(` Command: ${X} -p --dangerously-skip-permissions --max-turns ${z}`);let Q="",G="",V=y_(X,["-p","--dangerously-skip-permissions","--max-turns",z.toString()],{cwd:Z,stdio:["pipe","pipe","pipe"]});if(V.stdout)V.stdout.on("data",(_)=>{let B=_.toString();Q+=B,process.stdout.write(B)});if(V.stderr)V.stderr.on("data",(_)=>{let B=_.toString();G+=B,process.stderr.write(B)});if(V.on("error",(_)=>{Y({success:!1,message:`Failed to run Claude: ${_.message}`})}),V.on("close",(_)=>{if(_===0)Y({success:!0,message:"Claude completed successfully",output:Q});else Y({success:!1,message:`Claude exited with code ${_}`,output:Q})}),V.stdin){let _=T0("fs").readFileSync($,"utf8");V.stdin.write(_),V.stdin.end()}})}async function l_($,Z,Y,X,z,Q){try{let G=T9(z.comments.length,z.comments.length,Q),V=process.env.GITHUB_TOKEN;if(!V){console.warn("\u26A0\uFE0F No GITHUB_TOKEN for posting reply");return}let _=await I.fetchWithRetry(`https://api.github.com/repos/${Z}/${Y}/issues/${X}/comments`,{method:"POST",headers:{Authorization:`Bearer ${V}`,Accept:"application/vnd.github.v3+json","Content-Type":"application/json","User-Agent":"claude-intern"},body:JSON.stringify({body:G})});if(_.ok)console.log("\u2705 Posted review summary reply");else console.warn(`\u26A0\uFE0F Failed to post reply: ${_.statusText}`)}catch(G){console.warn(`\u26A0\uFE0F Failed to post review reply: ${G.message}`)}}async function i_($,Z,Y,X,z){try{await $.postPullRequestComment(Z,Y,X,z),console.log("\u2705 Posted auto-review reply")}catch(Q){console.warn(`\u26A0\uFE0F Failed to post auto-review reply: ${Q.message}`)}}function s_(){let $=Z1?.getStats()||{pending:0,processing:0,failed:0};return r0({status:"ok",timestamp:new Date().toISOString(),version:"1.0.0",queue:$})}function n_($){return new Promise((Z,Y)=>{let X=[];$.on("data",(z)=>X.push(z)),$.on("end",()=>Z(Buffer.concat(X).toString("utf8"))),$.on("error",Y)})}async function B6($,Z){let Y=await Z.text();$.writeHead(Z.status,{"Content-Type":Z.headers.get("Content-Type")||"application/json"}),$.end(Y)}async function o_($={}){let Z={...C2,...$};if(!Z.webhookSecret)console.error("\u274C WEBHOOK_SECRET environment variable is required"),console.error(" Generate one with: openssl rand -hex 32"),process.exit(1);let Y=process.env.WEBHOOK_QUEUE_DB||"/tmp/claude-intern-webhooks/queue.db";Z1=new hZ({dbPath:Y,maxRetries:parseInt(process.env.WEBHOOK_MAX_RETRIES||"3",10),verbose:Z.debug}),console.log("\uD83D\uDE80 Starting Claude Intern Webhook Server"),console.log(` Port: ${Z.port}`),console.log(` Host: ${Z.host}`),console.log(` Auto-reply: ${Z.autoReply}`),console.log(` Auto-review: ${Z.autoReview}${Z.autoReview?` (max ${Z.autoReviewMaxIterations} iterations)`:""}`),console.log(` IP validation: ${Z.validateIp}`),console.log(` Debug mode: ${Z.debug}`);try{let V=await new G8().getBotUsername("_","_");if(V)console.log(` Bot username: @${V}`);else console.log(" Bot username: (unknown - using GITHUB_TOKEN or no auth)")}catch(G){console.log(" Bot username: (failed to determine)")}let X=Z1.getStats();if(console.log(` Queue DB: ${Y}`),X.pending>0||X.processing>0||X.failed>0)console.log(` Queue stats: ${X.pending} pending, ${X.processing} processing, ${X.failed} failed`);let z=Z1.getPendingEvents();if(z.length>0){console.log(`
|
|
241
|
+
\uD83D\uDD04 Recovering ${z.length} pending event(s) from previous run...`);for(let G of z)try{let V=JSON.parse(G.payload);console.log(` Requeueing: PR #${V.pull_request.number} (${V.repository.full_name})`),R2.add(()=>N2(G.id,V,Z)).catch((_)=>{console.error(`\u274C Error processing recovered event ${G.id}:`,_)})}catch(V){console.error(` \u26A0\uFE0F Failed to parse event ${G.id}: ${V.message}`),Z1.markFailed(G.id,`Failed to parse: ${V.message}`)}}console.log(""),h_(async(G,V)=>{try{let _=new URL(G.url||"/",`http://${G.headers.host||"localhost"}`),B=_.pathname,q=G.method||"GET";if(B==="/health"&&q==="GET"){let F=s_();B6(V,F);return}if(B==="/webhooks/github"&&q==="POST"){let F=await n_(G),M=new Headers;for(let[D,T]of Object.entries(G.headers))if(T)M.set(D,Array.isArray(T)?T[0]:T);let H=new Request(_.toString(),{method:"POST",headers:M,body:F}),O=await p_(H,Z);B6(V,O);return}if(B==="/"&&q==="GET"){let F=r0({service:"Claude Intern Webhook Server",endpoints:{webhook:"POST /webhooks/github",health:"GET /health"}});B6(V,F);return}B6(V,r0({error:"Not found"},404))}catch(_){console.error("Server error:",_),B6(V,r0({error:"Internal server error"},500))}}).listen(Z.port,Z.host),console.log(`\u2705 Server listening on http://${Z.host}:${Z.port}`),console.log(""),console.log("\uD83D\uDCDD Configure your GitHub App webhook URL to:"),console.log(" https://your-domain/webhooks/github"),console.log(""),console.log("Press Ctrl+C to stop the server")}var C2,E2,R2,Z1=null,g_;var b2=a0(()=>{F2();P8();kZ();O2();N1();I9();NZ();T2();C2={port:parseInt(process.env.WEBHOOK_PORT||"3000",10),host:process.env.WEBHOOK_HOST||"0.0.0.0",webhookSecret:process.env.WEBHOOK_SECRET||"",autoReply:process.env.WEBHOOK_AUTO_REPLY==="true",autoReview:process.env.WEBHOOK_AUTO_REVIEW==="true",autoReviewMaxIterations:parseInt(process.env.WEBHOOK_AUTO_REVIEW_MAX_ITERATIONS||"5",10),validateIp:process.env.WEBHOOK_VALIDATE_IP==="true",debug:process.env.WEBHOOK_DEBUG==="true"},E2=new vZ(60000,30),R2=new A9({concurrency:1});setInterval(()=>E2.cleanup(),60000);g_=["enhance","improve","improve pr","improve this","improve this pr","make it better","polish","refine","clean up","cleanup","self-review","self review","auto-review","auto review","review yourself","review it"]});var x2={};i9(x2,{addressReview:()=>Z5});import{spawn as r_}from"child_process";function a_($){let Z=$.match(/github\.com\/([^/]+)\/([^/]+)\/pull\/(\d+)/);if(!Z)throw new Error(`Invalid GitHub PR URL: ${$}
|
|
242
|
+
Expected format: https://github.com/owner/repo/pull/123`);return{owner:Z[1],repo:Z[2],prNumber:parseInt(Z[3],10)}}async function t_($,Z,Y,X){let Q=(await $.getReviews(Z,Y,X)).filter((V)=>V.state==="CHANGES_REQUESTED").sort((V,_)=>new Date(_.submitted_at).getTime()-new Date(V.submitted_at).getTime());if(Q.length===0)return null;let G=Q[0];return{reviewId:G.id,reviewer:G.user.login,body:G.body,submittedAt:G.submitted_at}}async function e_($,Z,Y){return new Promise((X)=>{let z=process.env.CLAUDE_CLI_PATH||"claude",Q=parseInt(process.env.CLAUDE_MAX_TURNS||"500",10);if(Y)console.log(` Command: ${z} -p --dangerously-skip-permissions --max-turns ${Q}`);let G="",V=r_(z,["-p","--dangerously-skip-permissions","--max-turns",Q.toString()],{cwd:Z,stdio:["pipe","pipe","pipe"]});if(V.stdout)V.stdout.on("data",(_)=>{let B=_.toString();G+=B,process.stdout.write(B)});if(V.stderr)V.stderr.on("data",(_)=>{let B=_.toString();G+=B,process.stderr.write(B)});if(V.on("error",(_)=>{X({success:!1,output:`Failed to run Claude: ${_.message}`})}),V.on("close",(_)=>{let B=G.includes("Reached max turns");X({success:_===0&&!B,output:G,maxTurnsReached:B})}),V.stdin)V.stdin.write($),V.stdin.end()})}async function $5($,Z,Y,X,z,Q,G){if(z.length===0&&Q.length===0)return;let V=0;if(z.length>0){console.log(` Marking ${z.length} review comment(s) as addressed...`);for(let q of z){if(q.isReply)continue;try{await $.addReactionToComment(Z,Y,q.id,"hooray"),V++}catch(F){console.warn(` \u26A0\uFE0F Failed to add reaction to review comment ${q.id}: ${F.message}`)}}}if(Q.length>0){console.log(` Marking ${Q.length} conversation comment(s) as addressed...`);for(let q of Q)try{await $.addReactionToIssueComment(Z,Y,q.id,"hooray"),V++}catch(F){console.warn(` \u26A0\uFE0F Failed to add reaction to conversation comment ${q.id}: ${F.message}`)}}if(V>0)console.log(`\u2705 Marked ${V} comment(s) as addressed with \uD83C\uDF89 reaction`);let _=z.length+Q.length,B=T9(V,_,G);try{await $.postPullRequestComment(Z,Y,X,B),console.log("\u2705 Posted review summary comment")}catch(q){console.warn(`\u26A0\uFE0F Failed to post summary: ${q.message}`)}}async function Z5($,Z={}){let{noPush:Y=!1,noReply:X=!1,verbose:z=!1}=Z;console.log("\uD83D\uDD0D Parsing PR URL...");let{owner:Q,repo:G,prNumber:V}=a_($);console.log(` Repository: ${Q}/${G}`),console.log(` PR #${V}`);let _;if(!process.env.GITHUB_TOKEN){let P=e0.fromEnvironment();if(P)try{if(_=await P.getGitAuthor(),z)console.log(`\uD83E\uDD16 Commits will be authored by: ${_.name}`)}catch(b){if(z)console.warn(`\u26A0\uFE0F Could not get GitHub App author info: ${b.message}`),console.log(" Commits will use local git config instead.")}}let B=new G8;console.log(`
|
|
243
|
+
\uD83D\uDCCB Fetching PR details...`);let q=await B.getPullRequest(Q,G,V);if(console.log(` Title: ${q.title}`),console.log(` Branch: ${q.head.ref}`),console.log(` State: ${q.state}`),q.state!=="open")throw new Error(`PR is ${q.state}, not open. Cannot address review.`);console.log(`
|
|
244
|
+
\uD83D\uDD0E Looking for changes_requested review...`);let F=await t_(B,Q,G,V);if(!F){console.log("\u2705 No pending changes_requested reviews found.");return}console.log(` Found review from @${F.reviewer}`),console.log(`
|
|
245
|
+
\uD83D\uDCE5 Fetching review comments...`);let M=await B.getPullRequestReviewComments(Q,G,V),H=new Set;for(let P of M)try{if((await B.getCommentReactions(Q,G,P.id)).some((H0)=>H0.content==="hooray"))H.add(P.id)}catch(b){if(z)console.warn(` \u26A0\uFE0F Failed to fetch reactions for comment ${P.id}`)}let O=M.filter((P)=>!H.has(P.id)).map((P)=>({id:P.id,path:P.path,line:P.line??P.original_line,side:P.side,diffHunk:P.diff_hunk,body:P.body,reviewer:P.user.login,isReply:P.in_reply_to_id!==void 0})),D=M.length,T=D-O.length;if(console.log(` Found ${D} comment(s)`),T>0)console.log(` ${T} already addressed (skipping)`);console.log(` ${O.length} remaining to address`),console.log(`
|
|
246
|
+
\uD83D\uDCAC Fetching conversation comments...`);let g=await B.getIssueComments(Q,G,V),C=new Date(F.submittedAt),f=g.filter((P)=>P.user.login===F.reviewer&&new Date(P.created_at)>=C),s=new Set;for(let P of f)try{if((await B.getIssueCommentReactions(Q,G,P.id)).some((H0)=>H0.content==="hooray"))s.add(P.id)}catch(b){if(z)console.warn(` \u26A0\uFE0F Failed to fetch reactions for issue comment ${P.id}`)}let N=f.filter((P)=>!s.has(P.id)).map((P)=>({id:P.id,body:P.body,author:P.user.login,createdAt:P.created_at})),w=f.length,y=w-N.length;if(console.log(` Found ${w} conversation comment(s) from reviewer`),y>0)console.log(` ${y} already addressed (skipping)`);if(console.log(` ${N.length} remaining to address`),O.length===0&&N.length===0){console.log(`
|
|
247
|
+
\u2705 All review and conversation comments have been addressed already.`),console.log(` View PR: ${$}`);return}let v={prNumber:V,prTitle:q.title,repository:`${Q}/${G}`,branch:q.head.ref,reviewer:F.reviewer,reviewState:"changes_requested",reviewBody:F.body,comments:O,conversationComments:N.length>0?N:void 0};if(console.log(`
|
|
248
|
+
\uD83C\uDF3F Preparing review worktree for branch: ${q.head.ref}`),!await I.isGitRepository())throw new Error("Not in a git repository. Please run this command from within the repository.");let x0=await I.prepareReviewWorktree(q.head.ref,{verbose:z});if(!x0.success)throw new Error(`Failed to prepare worktree: ${x0.error}`);let S=x0.path;console.log(`\u2705 Worktree ready at: ${S}`);let E0=P9(v),A0=null,K=null;if(_){let P=await I.executeGitCommand(["config","user.name"],{verbose:!1,cwd:S});if(P.success&&P.output.trim())A0=P.output.trim();let b=await I.executeGitCommand(["config","user.email"],{verbose:!1,cwd:S});if(b.success&&b.output.trim())K=b.output.trim();if(await I.executeGitCommand(["config","user.name",_.name],{verbose:z,cwd:S}),await I.executeGitCommand(["config","user.email",_.email],{verbose:z,cwd:S}),z)console.log(` Set git config to bot author: ${_.name} <${_.email}>`)}try{console.log(`
|
|
249
|
+
\uD83E\uDD16 Running Claude to address review feedback...`);let P=await e_(E0,S,z);if(P.maxTurnsReached)throw console.error(`
|
|
148
250
|
\u274C Claude reached max turns limit without completing the task`),new Error("Claude reached max turns limit. Increase CLAUDE_MAX_TURNS environment variable.");if(!P.success)throw console.error(`
|
|
149
251
|
\u274C Claude failed to complete successfully`),new Error("Claude failed to complete successfully");console.log(`
|
|
150
|
-
\u2705 Claude completed successfully`);let
|
|
151
|
-
\u26A0\uFE0F No changes were made by Claude`),console.log(` View PR: ${$}`);return}let
|
|
152
|
-
\u2705 Changes committed by Claude`);else if(
|
|
153
|
-
\uD83D\uDCDD Claude left changes uncommitted, committing now...`);let
|
|
154
|
-
\u26A0\uFE0F Git hook failed (attempt ${
|
|
252
|
+
\u2705 Claude completed successfully`);let b=await I.executeGitCommand(["log",`origin/${q.head.ref}..HEAD`,"--oneline"],{verbose:z,cwd:S}),r=b.success&&b.output.trim().length>0,H0=await I.hasUncommittedChanges(S);if(!H0&&!r){console.log(`
|
|
253
|
+
\u26A0\uFE0F No changes were made by Claude`),console.log(` View PR: ${$}`);return}let X0=parseInt(process.env.HOOK_RETRIES||"10",10),d=process.env.CLAUDE_CLI_PATH||"claude",B0=parseInt(process.env.CLAUDE_MAX_TURNS||"500",10);if(r)console.log(`
|
|
254
|
+
\u2705 Changes committed by Claude`);else if(H0){console.log(`
|
|
255
|
+
\uD83D\uDCDD Claude left changes uncommitted, committing now...`);let K0=0,o=!1;while(K0<=X0&&!o){K0++;let A=await I.commitChanges(`PR-${V}`,`Address review feedback from ${v.reviewer}`,{verbose:z,author:_,cwd:S});if(A.success){console.log("\u2705 Changes committed successfully"),o=!0;break}if(A.hookError&&K0<=X0)if(console.log(`
|
|
256
|
+
\u26A0\uFE0F Git hook failed (attempt ${K0}/${X0+1})`),await B1("commit",d,B0,S)){console.log(`
|
|
155
257
|
\uD83D\uDD04 Retrying commit after Claude fixed the issues...`);continue}else{console.log(`
|
|
156
|
-
\u274C Could not fix git hook errors automatically`);break}else{if(
|
|
157
|
-
\u274C Max retries (${
|
|
158
|
-
\u274C Failed to commit changes: ${
|
|
159
|
-
\uD83D\uDCE4 Pushing changes...`);let
|
|
160
|
-
\u26A0\uFE0F Git pre-push hook failed (attempt ${
|
|
258
|
+
\u274C Could not fix git hook errors automatically`);break}else{if(K0>X0)console.log(`
|
|
259
|
+
\u274C Max retries (${X0}) exceeded for git hook fixes`);throw console.error(`
|
|
260
|
+
\u274C Failed to commit changes: ${A.message}`),new Error(`Commit failed: ${A.message}`)}}if(!o)throw new Error("Failed to commit changes after retries")}if(!Y){console.log(`
|
|
261
|
+
\uD83D\uDCE4 Pushing changes...`);let K0=0,o=!1;while(K0<=X0&&!o){K0++;let A=await I.pushCurrentBranch({verbose:z,cwd:S});if(A.success){console.log("\u2705 Changes pushed successfully"),o=!0;break}if(A.hookError&&K0<=X0)if(console.log(`
|
|
262
|
+
\u26A0\uFE0F Git pre-push hook failed (attempt ${K0}/${X0+1})`),await B1("push",d,B0,S)){console.log(`
|
|
161
263
|
\uD83D\uDD04 Retrying push after Claude fixed and amended the commit...`);continue}else{console.log(`
|
|
162
|
-
\u274C Could not fix git pre-push hook errors automatically`);break}else{if(
|
|
163
|
-
\u274C Max retries (${
|
|
164
|
-
\u274C Failed to push changes: ${
|
|
165
|
-
\u23ED\uFE0F Skipping push (--no-push flag)`);if(!
|
|
166
|
-
\uD83D\uDCAC Marking comments as addressed...`);let
|
|
264
|
+
\u274C Could not fix git pre-push hook errors automatically`);break}else{if(K0>X0)console.log(`
|
|
265
|
+
\u274C Max retries (${X0}) exceeded for git hook fixes`);throw console.error(`
|
|
266
|
+
\u274C Failed to push changes: ${A.message}`),new Error(`Push failed: ${A.message}`)}}if(!o)throw new Error("Failed to push changes after retries")}else console.log(`
|
|
267
|
+
\u23ED\uFE0F Skipping push (--no-push flag)`);if(!X&&!Y){console.log(`
|
|
268
|
+
\uD83D\uDCAC Marking comments as addressed...`);let K0=C9(P.output);await $5(B,Q,G,V,O,N,K0)}else if(X)console.log(`
|
|
167
269
|
\u23ED\uFE0F Skipping marking comments (--no-reply flag)`);console.log(`
|
|
168
|
-
\u2705 Successfully addressed review for PR #${
|
|
169
|
-
`).filter((
|
|
170
|
-
\uD83E\uDDF9 Cleaning up untracked files...`),
|
|
171
|
-
`)Z--;return $.substring(0,Z)}var
|
|
270
|
+
\u2705 Successfully addressed review for PR #${V}`),console.log(` View PR: ${$}`)}finally{let P=await I.executeGitCommand(["status","--porcelain"],{verbose:!1,cwd:S});if(P.success&&P.output.trim()){let b=P.output.split(`
|
|
271
|
+
`).filter((r)=>r.startsWith("??"));if(b.length>0){if(z)console.log(`
|
|
272
|
+
\uD83E\uDDF9 Cleaning up untracked files...`),b.forEach((r)=>{let H0=r.substring(3).trim();console.log(` Removing: ${H0}`)});await I.executeGitCommand(["clean","-fd"],{verbose:!1,cwd:S})}}if(_){if(A0)await I.executeGitCommand(["config","user.name",A0],{verbose:!1,cwd:S});else await I.executeGitCommand(["config","--unset","user.name"],{verbose:!1,cwd:S});if(K)await I.executeGitCommand(["config","user.email",K],{verbose:!1,cwd:S});else await I.executeGitCommand(["config","--unset","user.email"],{verbose:!1,cwd:S});if(z)console.log(" Restored original git config")}}}var y2=a0(()=>{kZ();P8();N1();I9()});import{execSync as Y5,spawn as uZ}from"child_process";var R7=b6(E7(),1),{program:g8,createCommand:U5,createArgument:A5,createOption:P5,CommanderError:T5,InvalidArgumentError:C5,InvalidOptionArgumentError:E5,Command:R5,Argument:N5,Option:w5,Help:b5}=R7.default;var E9=b6(f7(),1);import{existsSync as j1,mkdirSync as p2,readFileSync as j6,writeFileSync as q1}from"fs";import{dirname as m2,join as S0,resolve as c0}from"path";import{fileURLToPath as X5}from"url";import{writeFileSync as Z2}from"fs";function EV($){for(var Z=1;Z<arguments.length;Z++){var Y=arguments[Z];for(var X in Y)if(Y.hasOwnProperty(X))$[X]=Y[X]}return $}function LZ($,Z){return Array(Z+1).join($)}function RV($){return $.replace(/^\n*/,"")}function NV($){var Z=$.length;while(Z>0&&$[Z-1]===`
|
|
273
|
+
`)Z--;return $.substring(0,Z)}var wV=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function IZ($){return SZ($,wV)}var iz=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function sz($){return SZ($,iz)}function bV($){return oz($,iz)}var nz=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function xV($){return SZ($,nz)}function yV($){return oz($,nz)}function SZ($,Z){return Z.indexOf($.nodeName)>=0}function oz($,Z){return $.getElementsByTagName&&Z.some(function(Y){return $.getElementsByTagName(Y).length})}var m0={};m0.paragraph={filter:"p",replacement:function($){return`
|
|
172
274
|
|
|
173
275
|
`+$+`
|
|
174
276
|
|
|
175
|
-
`}};
|
|
176
|
-
`}};
|
|
277
|
+
`}};m0.lineBreak={filter:"br",replacement:function($,Z,Y){return Y.br+`
|
|
278
|
+
`}};m0.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function($,Z,Y){var X=Number(Z.nodeName.charAt(1));if(Y.headingStyle==="setext"&&X<3){var z=LZ(X===1?"=":"-",$.length);return`
|
|
177
279
|
|
|
178
280
|
`+$+`
|
|
179
|
-
`+
|
|
281
|
+
`+z+`
|
|
180
282
|
|
|
181
283
|
`}else return`
|
|
182
284
|
|
|
183
|
-
`+
|
|
285
|
+
`+LZ("#",X)+" "+$+`
|
|
184
286
|
|
|
185
|
-
`}};
|
|
287
|
+
`}};m0.blockquote={filter:"blockquote",replacement:function($){return $=$.replace(/^\n+|\n+$/g,""),$=$.replace(/^/gm,"> "),`
|
|
186
288
|
|
|
187
289
|
`+$+`
|
|
188
290
|
|
|
189
|
-
`}};
|
|
291
|
+
`}};m0.list={filter:["ul","ol"],replacement:function($,Z){var Y=Z.parentNode;if(Y.nodeName==="LI"&&Y.lastElementChild===Z)return`
|
|
190
292
|
`+$;else return`
|
|
191
293
|
|
|
192
294
|
`+$+`
|
|
193
295
|
|
|
194
|
-
`}};
|
|
296
|
+
`}};m0.listItem={filter:"li",replacement:function($,Z,Y){$=$.replace(/^\n+/,"").replace(/\n+$/,`
|
|
195
297
|
`).replace(/\n/gm,`
|
|
196
|
-
`);var
|
|
197
|
-
`:"")}};
|
|
298
|
+
`);var X=Y.bulletListMarker+" ",z=Z.parentNode;if(z.nodeName==="OL"){var Q=z.getAttribute("start"),G=Array.prototype.indexOf.call(z.children,Z);X=(Q?Number(Q)+G:G+1)+". "}return X+$+(Z.nextSibling&&!/\n$/.test($)?`
|
|
299
|
+
`:"")}};m0.indentedCodeBlock={filter:function($,Z){return Z.codeBlockStyle==="indented"&&$.nodeName==="PRE"&&$.firstChild&&$.firstChild.nodeName==="CODE"},replacement:function($,Z,Y){return`
|
|
198
300
|
|
|
199
301
|
`+Z.firstChild.textContent.replace(/\n/g,`
|
|
200
302
|
`)+`
|
|
201
303
|
|
|
202
|
-
`}};
|
|
304
|
+
`}};m0.fencedCodeBlock={filter:function($,Z){return Z.codeBlockStyle==="fenced"&&$.nodeName==="PRE"&&$.firstChild&&$.firstChild.nodeName==="CODE"},replacement:function($,Z,Y){var X=Z.firstChild.getAttribute("class")||"",z=(X.match(/language-(\S+)/)||[null,""])[1],Q=Z.firstChild.textContent,G=Y.fence.charAt(0),V=3,_=new RegExp("^"+G+"{3,}","gm"),B;while(B=_.exec(Q))if(B[0].length>=V)V=B[0].length+1;var q=LZ(G,V);return`
|
|
203
305
|
|
|
204
|
-
`+q+
|
|
306
|
+
`+q+z+`
|
|
205
307
|
`+Q.replace(/\n$/,"")+`
|
|
206
308
|
`+q+`
|
|
207
309
|
|
|
208
|
-
`}};
|
|
310
|
+
`}};m0.horizontalRule={filter:"hr",replacement:function($,Z,Y){return`
|
|
209
311
|
|
|
210
312
|
`+Y.hr+`
|
|
211
313
|
|
|
212
|
-
`}};
|
|
314
|
+
`}};m0.inlineLink={filter:function($,Z){return Z.linkStyle==="inlined"&&$.nodeName==="A"&&$.getAttribute("href")},replacement:function($,Z){var Y=Z.getAttribute("href");if(Y)Y=Y.replace(/([()])/g,"\\$1");var X=K9(Z.getAttribute("title"));if(X)X=' "'+X.replace(/"/g,"\\\"")+'"';return"["+$+"]("+Y+X+")"}};m0.referenceLink={filter:function($,Z){return Z.linkStyle==="referenced"&&$.nodeName==="A"&&$.getAttribute("href")},replacement:function($,Z,Y){var X=Z.getAttribute("href"),z=K9(Z.getAttribute("title"));if(z)z=' "'+z+'"';var Q,G;switch(Y.linkReferenceStyle){case"collapsed":Q="["+$+"][]",G="["+$+"]: "+X+z;break;case"shortcut":Q="["+$+"]",G="["+$+"]: "+X+z;break;default:var V=this.references.length+1;Q="["+$+"]["+V+"]",G="["+V+"]: "+X+z}return this.references.push(G),Q},references:[],append:function($){var Z="";if(this.references.length)Z=`
|
|
213
315
|
|
|
214
316
|
`+this.references.join(`
|
|
215
317
|
`)+`
|
|
216
318
|
|
|
217
|
-
`,this.references=[];return Z}};
|
|
218
|
-
`):""}function
|
|
319
|
+
`,this.references=[];return Z}};m0.emphasis={filter:["em","i"],replacement:function($,Z,Y){if(!$.trim())return"";return Y.emDelimiter+$+Y.emDelimiter}};m0.strong={filter:["strong","b"],replacement:function($,Z,Y){if(!$.trim())return"";return Y.strongDelimiter+$+Y.strongDelimiter}};m0.code={filter:function($){var Z=$.previousSibling||$.nextSibling,Y=$.parentNode.nodeName==="PRE"&&!Z;return $.nodeName==="CODE"&&!Y},replacement:function($){if(!$)return"";$=$.replace(/\r?\n|\r/g," ");var Z=/^`|^ .*?[^ ].* $|`$/.test($)?" ":"",Y="`",X=$.match(/`+/gm)||[];while(X.indexOf(Y)!==-1)Y=Y+"`";return Y+Z+$+Z+Y}};m0.image={filter:"img",replacement:function($,Z){var Y=K9(Z.getAttribute("alt")),X=Z.getAttribute("src")||"",z=K9(Z.getAttribute("title")),Q=z?' "'+z+'"':"";return X?"":""}};function K9($){return $?$.replace(/(\n+\s*)+/g,`
|
|
320
|
+
`):""}function rz($){this.options=$,this._keep=[],this._remove=[],this.blankRule={replacement:$.blankReplacement},this.keepReplacement=$.keepReplacement,this.defaultRule={replacement:$.defaultReplacement},this.array=[];for(var Z in $.rules)this.array.push($.rules[Z])}rz.prototype={add:function($,Z){this.array.unshift(Z)},keep:function($){this._keep.unshift({filter:$,replacement:this.keepReplacement})},remove:function($){this._remove.unshift({filter:$,replacement:function(){return""}})},forNode:function($){if($.isBlank)return this.blankRule;var Z;if(Z=OZ(this.array,$,this.options))return Z;if(Z=OZ(this._keep,$,this.options))return Z;if(Z=OZ(this._remove,$,this.options))return Z;return this.defaultRule},forEach:function($){for(var Z=0;Z<this.array.length;Z++)$(this.array[Z],Z)}};function OZ($,Z,Y){for(var X=0;X<$.length;X++){var z=$[X];if(fV(z,Z,Y))return z}return}function fV($,Z,Y){var X=$.filter;if(typeof X==="string"){if(X===Z.nodeName.toLowerCase())return!0}else if(Array.isArray(X)){if(X.indexOf(Z.nodeName.toLowerCase())>-1)return!0}else if(typeof X==="function"){if(X.call($,Z,Y))return!0}else throw new TypeError("`filter` needs to be a string, array, or function")}function kV($){var{element:Z,isBlock:Y,isVoid:X}=$,z=$.isPre||function(F){return F.nodeName==="PRE"};if(!Z.firstChild||z(Z))return;var Q=null,G=!1,V=null,_=cz(V,Z,z);while(_!==Z){if(_.nodeType===3||_.nodeType===4){var B=_.data.replace(/[ \r\n\t]+/g," ");if((!Q||/ $/.test(Q.data))&&!G&&B[0]===" ")B=B.substr(1);if(!B){_=MZ(_);continue}_.data=B,Q=_}else if(_.nodeType===1){if(Y(_)||_.nodeName==="BR"){if(Q)Q.data=Q.data.replace(/ $/,"");Q=null,G=!1}else if(X(_)||z(_))Q=null,G=!0;else if(Q)G=!1}else{_=MZ(_);continue}var q=cz(V,_,z);V=_,_=q}if(Q){if(Q.data=Q.data.replace(/ $/,""),!Q.data)MZ(Q)}}function MZ($){var Z=$.nextSibling||$.parentNode;return $.parentNode.removeChild($),Z}function cz($,Z,Y){if($&&$.parentNode===Z||Y(Z))return Z.nextSibling||Z.parentNode;return Z.firstChild||Z.nextSibling||Z.parentNode}var az=typeof window!=="undefined"?window:{};function hV(){var $=az.DOMParser,Z=!1;try{if(new $().parseFromString("","text/html"))Z=!0}catch(Y){}return Z}function gV(){var $=function(){};{var Z=dz();$.prototype.parseFromString=function(Y){return Z.createDocument(Y)}}return $}var vV=hV()?az.DOMParser:gV();function pV($,Z){var Y;if(typeof $==="string"){var X=mV().parseFromString('<x-turndown id="turndown-root">'+$+"</x-turndown>","text/html");Y=X.getElementById("turndown-root")}else Y=$.cloneNode(!0);return kV({element:Y,isBlock:IZ,isVoid:sz,isPre:Z.preformattedCode?uV:null}),Y}var DZ;function mV(){return DZ=DZ||new vV,DZ}function uV($){return $.nodeName==="PRE"||$.nodeName==="CODE"}function dV($,Z){return $.isBlock=IZ($),$.isCode=$.nodeName==="CODE"||$.parentNode.isCode,$.isBlank=cV($),$.flankingWhitespace=lV($,Z),$}function cV($){return!sz($)&&!xV($)&&/^\s*$/i.test($.textContent)&&!bV($)&&!yV($)}function lV($,Z){if($.isBlock||Z.preformattedCode&&$.isCode)return{leading:"",trailing:""};var Y=iV($.textContent);if(Y.leadingAscii&&lz("left",$,Z))Y.leading=Y.leadingNonAscii;if(Y.trailingAscii&&lz("right",$,Z))Y.trailing=Y.trailingNonAscii;return{leading:Y.leading,trailing:Y.trailing}}function iV($){var Z=$.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:Z[1],leadingAscii:Z[2],leadingNonAscii:Z[3],trailing:Z[4],trailingNonAscii:Z[5],trailingAscii:Z[6]}}function lz($,Z,Y){var X,z,Q;if($==="left")X=Z.previousSibling,z=/ $/;else X=Z.nextSibling,z=/^ /;if(X){if(X.nodeType===3)Q=z.test(X.nodeValue);else if(Y.preformattedCode&&X.nodeName==="CODE")Q=!1;else if(X.nodeType===1&&!IZ(X))Q=z.test(X.textContent)}return Q}var sV=Array.prototype.reduce,nV=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function F9($){if(!(this instanceof F9))return new F9($);var Z={rules:m0,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(Y,X){return X.isBlock?`
|
|
219
321
|
|
|
220
|
-
`:""},keepReplacement:function(Y,
|
|
322
|
+
`:""},keepReplacement:function(Y,X){return X.isBlock?`
|
|
221
323
|
|
|
222
|
-
`+
|
|
324
|
+
`+X.outerHTML+`
|
|
223
325
|
|
|
224
|
-
`:
|
|
326
|
+
`:X.outerHTML},defaultReplacement:function(Y,X){return X.isBlock?`
|
|
225
327
|
|
|
226
328
|
`+Y+`
|
|
227
329
|
|
|
228
|
-
`:Y}};this.options=
|
|
330
|
+
`:Y}};this.options=EV({},Z,$),this.rules=new rz(this.options)}F9.prototype={turndown:function($){if(!aV($))throw new TypeError($+" is not a string, or an element/document/fragment node.");if($==="")return"";var Z=tz.call(this,new pV($,this.options));return oV.call(this,Z)},use:function($){if(Array.isArray($))for(var Z=0;Z<$.length;Z++)this.use($[Z]);else if(typeof $==="function")$(this);else throw new TypeError("plugin must be a Function or an Array of Functions");return this},addRule:function($,Z){return this.rules.add($,Z),this},keep:function($){return this.rules.keep($),this},remove:function($){return this.rules.remove($),this},escape:function($){return nV.reduce(function(Z,Y){return Z.replace(Y[0],Y[1])},$)}};function tz($){var Z=this;return sV.call($.childNodes,function(Y,X){X=new dV(X,Z.options);var z="";if(X.nodeType===3)z=X.isCode?X.nodeValue:Z.escape(X.nodeValue);else if(X.nodeType===1)z=rV.call(Z,X);return ez(Y,z)},"")}function oV($){var Z=this;return this.rules.forEach(function(Y){if(typeof Y.append==="function")$=ez($,Y.append(Z.options))}),$.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function rV($){var Z=this.rules.forNode($),Y=tz.call(this,$),X=$.flankingWhitespace;if(X.leading||X.trailing)Y=Y.trim();return X.leading+Z.replacement(Y,$,this.options)+X.trailing}function ez($,Z){var Y=NV($),X=RV(Z),z=Math.max($.length-Y.length,Z.length-X.length),Q=`
|
|
229
331
|
|
|
230
|
-
`.substring(0,
|
|
332
|
+
`.substring(0,z);return Y+Q+X}function aV($){return $!=null&&(typeof $==="string"||$.nodeType&&($.nodeType===1||$.nodeType===9||$.nodeType===11))}var $2=F9;import O9 from"path";class M9{static turndownService=new $2({headingStyle:"atx",bulletListMarker:"-",codeBlockStyle:"fenced",fence:"```",emDelimiter:"*",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full"});static{this.turndownService.addRule("jiraIssueLinks",{filter:function($){return $.nodeName==="SPAN"&&$.classList.contains("jira-issue-macro")},replacement:function($,Z){let Y=Z.getAttribute("data-jira-key")||"",X=Z.querySelector("a.jira-issue-macro-key"),z=X?X.getAttribute("href"):"";if(Y&&z)return`[${Y}](${z})`;return Y||$}}),this.turndownService.addRule("jiraStatusLozenge",{filter:function($){return $.nodeName==="SPAN"&&$.classList.contains("aui-lozenge")},replacement:function($){return`*${$}*`}}),this.turndownService.addRule("teletype",{filter:["tt"],replacement:function($){return"`"+$+"`"}}),this.turndownService.addRule("cleanJiraAttributes",{filter:function($){return $.hasAttribute&&($.hasAttribute("data-jira-key")||$.classList.contains("jira-issue-macro-key")||$.classList.contains("issue-link"))},replacement:function($){return $}})}static formatTaskForClaude($,Z,Y,X){let{key:z,summary:Q,renderedDescription:G,description:V,labels:_,components:B,linkedResources:q,relatedIssues:F,comments:M,attachments:H}=$,O=`# JIRA Task Implementation Request
|
|
231
333
|
|
|
232
334
|
## Task Overview
|
|
233
|
-
- **Key**: ${
|
|
335
|
+
- **Key**: ${z}
|
|
234
336
|
- **Summary**: ${Q}
|
|
235
|
-
`;if(_.length>0)
|
|
236
|
-
`;if(
|
|
237
|
-
`;if(
|
|
337
|
+
`;if(_.length>0)O+=`- **Labels**: ${_.join(", ")}
|
|
338
|
+
`;if(B.length>0)O+=`- **Components**: ${B.join(", ")}
|
|
339
|
+
`;if(O+=`
|
|
238
340
|
## Task Description
|
|
239
|
-
`,G)
|
|
341
|
+
`,G)O+=this.convertHtmlToMarkdown(G,Z,Y,X)+`
|
|
240
342
|
|
|
241
|
-
`;else if(
|
|
343
|
+
`;else if(V)O+=this.convertAtlassianDocumentToText(V)+`
|
|
242
344
|
|
|
243
|
-
`;if(q.length>0)
|
|
345
|
+
`;if(q.length>0)O+=`## Linked Resources
|
|
244
346
|
|
|
245
|
-
`,q.forEach((
|
|
246
|
-
`,
|
|
247
|
-
`;break;case"issue_link":
|
|
248
|
-
`;break}}),
|
|
249
|
-
`;if(F&&F.length>0){
|
|
347
|
+
`,q.forEach((D)=>{switch(D.type){case"custom_field_link":case"description_link":case"rich_text_link":if(O+=`- **${D.description}**: ${D.url}
|
|
348
|
+
`,D.field&&D.type==="custom_field_link")O+=` (from field: ${D.field})
|
|
349
|
+
`;break;case"issue_link":O+=`- **${D.linkType}**: ${D.issueKey} - ${D.summary}
|
|
350
|
+
`;break}}),O+=`
|
|
351
|
+
`;if(F&&F.length>0){O+=`## Related Work Items
|
|
250
352
|
|
|
251
|
-
`,
|
|
353
|
+
`,O+=`The following related issues provide important context for this task:
|
|
252
354
|
|
|
253
|
-
`;let
|
|
355
|
+
`;let D=this.groupRelatedIssues(F);Object.entries(D).forEach(([T,g])=>{if(g.length>0)O+=`### ${T}
|
|
254
356
|
|
|
255
|
-
`,
|
|
256
|
-
`,
|
|
257
|
-
`,
|
|
258
|
-
`,
|
|
259
|
-
`;if(
|
|
260
|
-
`;if(
|
|
261
|
-
`;if(
|
|
262
|
-
`;if(
|
|
357
|
+
`,g.forEach((C)=>{if(O+=`#### ${C.key}: ${C.summary}
|
|
358
|
+
`,O+=`- **Type**: ${C.issueType}
|
|
359
|
+
`,O+=`- **Status**: ${C.status}
|
|
360
|
+
`,C.priority)O+=`- **Priority**: ${C.priority}
|
|
361
|
+
`;if(C.assignee)O+=`- **Assignee**: ${C.assignee}
|
|
362
|
+
`;if(C.labels.length>0)O+=`- **Labels**: ${C.labels.join(", ")}
|
|
363
|
+
`;if(C.components.length>0)O+=`- **Components**: ${C.components.join(", ")}
|
|
364
|
+
`;if(C.renderedDescription)O+=`
|
|
263
365
|
**Description:**
|
|
264
|
-
`,
|
|
265
|
-
`;else if(
|
|
366
|
+
`,O+=this.convertHtmlToMarkdown(C.renderedDescription,Z,Y,X)+`
|
|
367
|
+
`;else if(C.description)O+=`
|
|
266
368
|
**Description:**
|
|
267
|
-
`,
|
|
268
|
-
`;
|
|
369
|
+
`,O+=this.convertAtlassianDocumentToText(C.description)+`
|
|
370
|
+
`;O+=`
|
|
269
371
|
---
|
|
270
372
|
|
|
271
|
-
`})})}if(
|
|
373
|
+
`})})}if(H.length>0)O+=`## Attachments
|
|
272
374
|
|
|
273
|
-
`,
|
|
274
|
-

|
|
377
|
+
(${D.mimeType}, ${this.formatFileSize(D.size)}) - uploaded by ${D.author}
|
|
276
378
|
|
|
277
|
-
`;else
|
|
278
|
-
`}),
|
|
279
|
-
`;if(
|
|
379
|
+
`;else O+=`- **[${D.filename}](${T})** (${D.mimeType}, ${this.formatFileSize(D.size)}) - uploaded by ${D.author}
|
|
380
|
+
`}),O+=`
|
|
381
|
+
`;if(M.length>0)O+=`## Comments and Discussion
|
|
280
382
|
|
|
281
|
-
`,
|
|
282
|
-
`,
|
|
383
|
+
`,M.forEach((D,T)=>{if(O+=`### Comment ${T+1} by ${D.author}
|
|
384
|
+
`,O+=`*Posted: ${new Date(D.created).toLocaleString()}*
|
|
283
385
|
|
|
284
|
-
`,
|
|
386
|
+
`,D.renderedBody)O+=this.convertHtmlToMarkdown(D.renderedBody,Z,Y,X)+`
|
|
285
387
|
|
|
286
|
-
`;else if(
|
|
388
|
+
`;else if(D.body)O+=this.convertAtlassianDocumentToText(D.body)+`
|
|
287
389
|
|
|
288
|
-
`;
|
|
390
|
+
`;O+=`---
|
|
289
391
|
|
|
290
|
-
`});return
|
|
392
|
+
`});return O+=`## Implementation Instructions
|
|
291
393
|
|
|
292
394
|
Please analyze the above JIRA task and implement the requested functionality. Consider:
|
|
293
395
|
|
|
@@ -299,52 +401,52 @@ Please analyze the above JIRA task and implement the requested functionality. Co
|
|
|
299
401
|
|
|
300
402
|
If you need clarification on any requirements or if the task description is unclear, please ask specific questions.
|
|
301
403
|
|
|
302
|
-
**Task Key for Reference**: ${
|
|
303
|
-
`,
|
|
404
|
+
**Task Key for Reference**: ${z}
|
|
405
|
+
`,O}static convertAtlassianDocumentToText($){if(typeof $==="string")return $;if(!$||!$.content)return"";let Z="",Y=(X)=>{X.forEach((z)=>{switch(z.type){case"paragraph":if(z.content)Z+=this.processInlineContent(z.content)+`
|
|
304
406
|
|
|
305
|
-
`;break;case"heading":let Q=
|
|
407
|
+
`;break;case"heading":let Q=z.attrs?.level||1,G=z.content?this.processInlineContent(z.content):"";Z+="#".repeat(Q)+" "+G+`
|
|
306
408
|
|
|
307
|
-
`;break;case"bulletList":case"orderedList":if(
|
|
409
|
+
`;break;case"bulletList":case"orderedList":if(z.content)z.content.forEach((B,q)=>{let F=z.type==="bulletList"?"- ":`${q+1}. `,M=B.content?this.processInlineContent(B.content):"";Z+=F+M+`
|
|
308
410
|
`}),Z+=`
|
|
309
|
-
`;break;case"codeBlock":let
|
|
310
|
-
`+_+"\n```\n\n";break;case"blockquote":if(
|
|
411
|
+
`;break;case"codeBlock":let V=z.attrs?.language||"",_=z.content?this.processInlineContent(z.content):"";Z+="```"+V+`
|
|
412
|
+
`+_+"\n```\n\n";break;case"blockquote":if(z.content){let B=this.processInlineContent(z.content);Z+="> "+B+`
|
|
311
413
|
|
|
312
|
-
`}break;default:if(
|
|
313
|
-
`;break;case"mention":let
|
|
414
|
+
`}break;default:if(z.content)Y(z.content)}})};return Y($.content),Z.trim()}static processInlineContent($){let Z="";return $.forEach((Y)=>{switch(Y.type){case"text":let X=Y.text||"";if(Y.marks)Y.marks.forEach((Q)=>{switch(Q.type){case"strong":X=`**${X}**`;break;case"em":X=`*${X}*`;break;case"code":X=`\`${X}\``;break;case"link":let G=Q.attrs?.href||"";X=`[${X}](${G})`;break}});Z+=X;break;case"hardBreak":Z+=`
|
|
415
|
+
`;break;case"mention":let z=Y.attrs?.text||Y.attrs?.displayName||"Unknown User";Z+=`@${z}`;break;default:if(Y.content)Z+=this.processInlineContent(Y.content)}}),Z}static convertHtmlToMarkdown($,Z,Y,X){if(!$)return"";try{let z=this.turndownService.turndown($);if(Z||Y)z=z.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,(Q,G,V)=>{let _=[V];if(!V.startsWith("http")&&Z)_.push(`${Z}${V}`);if(V.startsWith("http"))_.push(V);if(_.forEach((q)=>{let F=q.replace(/([^:]\/)\/+/g,"$1");if(F!==q)_.push(F)}),Y){for(let q of _)if(Y.has(q)){let F=Y.get(q);if(X){let M=O9.dirname(X),H=O9.relative(M,F);return`})`}else return``}}let B=_.find((q)=>q.startsWith("http"))||V;return``});return z.replace(/\n{3,}/g,`
|
|
314
416
|
|
|
315
|
-
`).replace(/^\s+|\s+$/g,"").replace(/\\\[/g,"[").replace(/\\\]/g,"]")}catch(
|
|
417
|
+
`).replace(/^\s+|\s+$/g,"").replace(/\\\[/g,"[").replace(/\\\]/g,"]")}catch(z){return console.warn("Failed to convert HTML to markdown:",z),$.replace(/<[^>]*>/g,"").replace(/ /g," ").replace(/&/g,"&")}}static formatFileSize($){if($===0)return"0 Bytes";let Z=1024,Y=["Bytes","KB","MB","GB"],X=Math.floor(Math.log($)/Math.log(Z));return parseFloat(($/Math.pow(Z,X)).toFixed(2))+" "+Y[X]}static saveFormattedTask($,Z,Y,X){let z=this.formatTaskForClaude($,Y,X,Z);return Z2(Z,z,"utf8"),Z}static groupRelatedIssues($){let Z={"Parent Tasks & Epics":[],Subtasks:[],"Blocking Issues":[],"Blocked Issues":[],"Related Issues":[],"Other Links":[]};return $.forEach((Y)=>{switch(Y.relationshipDirection){case"parent":Z["Parent Tasks & Epics"].push(Y);break;case"subtask":Z.Subtasks.push(Y);break;default:let X=Y.linkType.toLowerCase();if(X.includes("block")&&(X.includes("is blocked")||Y.relationshipDirection==="inward"))Z["Blocking Issues"].push(Y);else if(X.includes("block"))Z["Blocked Issues"].push(Y);else if(X.includes("relate")||X.includes("duplicate")||X.includes("clone"))Z["Related Issues"].push(Y);else Z["Other Links"].push(Y);break}}),Object.keys(Z).forEach((Y)=>{if(Z[Y].length===0)delete Z[Y]}),Z}static formatClarityAssessment($,Z,Y,X){let{key:z,summary:Q,renderedDescription:G,description:V,labels:_,components:B,linkedResources:q,relatedIssues:F,comments:M,attachments:H}=$,O=`# Task Clarity Assessment
|
|
316
418
|
|
|
317
419
|
## Your Role
|
|
318
420
|
You are a senior software engineer reviewing a JIRA task before implementation. Your job is to assess whether the task description provides sufficient clarity for implementation.
|
|
319
421
|
|
|
320
422
|
## Task to Review
|
|
321
|
-
- **Key**: ${
|
|
423
|
+
- **Key**: ${z}
|
|
322
424
|
- **Summary**: ${Q}
|
|
323
|
-
`;if(_.length>0)
|
|
324
|
-
`;if(
|
|
325
|
-
`;if(
|
|
425
|
+
`;if(_.length>0)O+=`- **Labels**: ${_.join(", ")}
|
|
426
|
+
`;if(B.length>0)O+=`- **Components**: ${B.join(", ")}
|
|
427
|
+
`;if(O+=`
|
|
326
428
|
## Task Description
|
|
327
|
-
`,G)
|
|
429
|
+
`,G)O+=this.convertHtmlToMarkdown(G,Z,Y,X)+`
|
|
328
430
|
|
|
329
|
-
`;else if(
|
|
431
|
+
`;else if(V)O+=this.convertAtlassianDocumentToText(V)+`
|
|
330
432
|
|
|
331
|
-
`;else
|
|
433
|
+
`;else O+=`*No description provided*
|
|
332
434
|
|
|
333
|
-
`;if(q.length>0)
|
|
435
|
+
`;if(q.length>0)O+=`## Linked Resources
|
|
334
436
|
|
|
335
|
-
`,q.forEach((
|
|
336
|
-
`,
|
|
337
|
-
`;break;case"issue_link":
|
|
338
|
-
`;break}}),
|
|
339
|
-
`;if(F&&F.length>0)
|
|
437
|
+
`,q.forEach((D)=>{switch(D.type){case"custom_field_link":case"description_link":case"rich_text_link":if(O+=`- **${D.description}**: ${D.url}
|
|
438
|
+
`,D.field&&D.type==="custom_field_link")O+=` (from field: ${D.field})
|
|
439
|
+
`;break;case"issue_link":O+=`- **${D.linkType}**: ${D.issueKey} - ${D.summary}
|
|
440
|
+
`;break}}),O+=`
|
|
441
|
+
`;if(F&&F.length>0)O+=`## Related Work Items
|
|
340
442
|
|
|
341
|
-
`,F.forEach((
|
|
342
|
-
`}),
|
|
343
|
-
`;if(
|
|
443
|
+
`,F.forEach((D)=>{O+=`- **${D.linkType}**: ${D.key} - ${D.summary} (${D.status})
|
|
444
|
+
`}),O+=`
|
|
445
|
+
`;if(M.length>0)O+=`## Recent Comments
|
|
344
446
|
|
|
345
|
-
`,
|
|
447
|
+
`,M.slice(-3).forEach((T,g)=>{if(O+=`**${T.author}**: `,T.renderedBody)O+=this.convertHtmlToMarkdown(T.renderedBody,Z,Y,X);else if(T.body)O+=this.convertAtlassianDocumentToText(T.body);O+=`
|
|
346
448
|
|
|
347
|
-
`});return
|
|
449
|
+
`});return O+=`## Assessment Instructions
|
|
348
450
|
|
|
349
451
|
Please assess this task for basic implementation feasibility. Respond with a JSON object containing:
|
|
350
452
|
|
|
@@ -392,8 +494,8 @@ Please assess this task for basic implementation feasibility. Respond with a JSO
|
|
|
392
494
|
|
|
393
495
|
**Philosophy**: Trust that experienced developers can infer technical details from existing code. Focus only on whether there's enough business context to begin meaningful work.
|
|
394
496
|
|
|
395
|
-
**Task Key for Reference**: ${
|
|
396
|
-
`,
|
|
497
|
+
**Task Key for Reference**: ${z}
|
|
498
|
+
`,O}static saveClarityAssessment($,Z,Y,X){let z=this.formatClarityAssessment($,Y,X,Z);return Z2(Z,z,"utf8"),Z}}P8();class $1{static formatClaudeOutputForJira($){let Z=$.replace(/\x1b\[[0-9;]*m/g,"");Z=Z.replace(/\r\n/g,`
|
|
397
499
|
`).replace(/\r/g,`
|
|
398
500
|
`),Z=Z.replace(/\n{3,}/g,`
|
|
399
501
|
|
|
@@ -403,13 +505,13 @@ Please assess this task for basic implementation feasibility. Respond with a JSO
|
|
|
403
505
|
`).replace(/\r/g,`
|
|
404
506
|
`),Z=Z.trim(),Z.length<50)return[{type:"paragraph",content:[{type:"text",text:"Claude completed the implementation successfully. Please check the committed changes for details."}]}];let Y=8000;if(Z.length>Y)Z=Z.substring(0,Y)+`
|
|
405
507
|
|
|
406
|
-
[Output truncated due to length]`;let
|
|
407
|
-
`),Q=[],G=!1,
|
|
408
|
-
`)}]}),J=[],_=""};for(let F=0;F<X.length;F++){let L=X[F],B=L.trim();if(B.startsWith("```")){if(G)q(),G=!1;else H(),G=!0,_=B.substring(3).trim();continue}if(G){J.push(L);continue}if(B.startsWith("#")){H();let D=Math.min(6,(B.match(/^#+/)||[""])[0].length),S=B.replace(/^#+\s*/,"");z.push({type:"heading",attrs:{level:D},content:[{type:"text",text:S}]});continue}if(B.match(/^[-*+]\s/)){H();let D=[],S=F;while(S<X.length&&X[S].trim().match(/^[-*+]\s/)){let A=X[S].trim().replace(/^[-*+]\s/,"");D.push({type:"listItem",content:[{type:"paragraph",content:o0.parseTextWithFormatting(A)}]}),S++}z.push({type:"bulletList",content:D}),F=S-1;continue}if(B.match(/^\d+\.\s/)){H();let D=[],S=F;while(S<X.length&&X[S].trim().match(/^\d+\.\s/)){let A=X[S].trim().replace(/^\d+\.\s/,"");D.push({type:"listItem",content:[{type:"paragraph",content:o0.parseTextWithFormatting(A)}]}),S++}z.push({type:"orderedList",content:D}),F=S-1;continue}if(B.includes("|")){H();let D=[],S=F;while(S<X.length&&X[S].trim().includes("|")){let A=X[S].trim();if(!A.match(/^\|[\s\-:|]+\|$/))D.push(A);S++}if(D.length>0){let A=o0.parseMarkdownTable(D);if(A)z.push(A)}F=S-1;continue}if(B===""){H();continue}Q.push(L)}return H(),q(),z.length>0?z:[{type:"paragraph",content:[{type:"text",text:"Implementation completed."}]}]}static parseTextWithFormatting($){let Z=[],Y="",z=0,X=()=>{if(Y)Z.push({type:"text",text:Y}),Y=""};while(z<$.length){if($[z]==="`"&&$[z+1]!=="`"){X();let Q=z+1,G=$.indexOf("`",Q);if(G===-1)G=$.length;Z.push({type:"text",text:$.substring(Q,G),marks:[{type:"code"}]}),z=G+1;continue}if($.substring(z,z+2)==="**"){X();let Q=z+2,G=$.indexOf("**",Q);if(G!==-1){Z.push({type:"text",text:$.substring(Q,G),marks:[{type:"strong"}]}),z=G+2;continue}}if($[z]==="*"&&$[z+1]!=="*"){X();let Q=z+1,G=$.indexOf("*",Q);if(G!==-1){Z.push({type:"text",text:$.substring(Q,G),marks:[{type:"em"}]}),z=G+1;continue}}Y+=$[z],z++}return X(),Z.length>0?Z:[{type:"text",text:$}]}static parseMarkdownTable($){if($.length===0)return null;let Z=(G)=>{return G.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map((_)=>_.trim())},Y=Z($[0]),z=Y.length,X={type:"tableRow",content:Y.map((G)=>({type:"tableHeader",attrs:{},content:[{type:"paragraph",content:o0.parseTextWithFormatting(G)}]}))},Q=$.slice(1).map((G)=>{let J=Z(G);while(J.length<z)J.push("");return{type:"tableRow",content:J.slice(0,z).map((_)=>({type:"tableCell",attrs:{},content:[{type:"paragraph",content:o0.parseTextWithFormatting(_)}]}))}});return{type:"table",attrs:{isNumberColumnEnabled:!1,layout:"default"},content:[X,...Q]}}static createImplementationCommentADF($,Z){let Y=[{type:"heading",attrs:{level:3},content:[{type:"emoji",attrs:{shortName:":robot:",id:"1f916",text:"\uD83E\uDD16"}},{type:"text",text:" Implementation Completed by Claude"}]}];if(Z)Y.push({type:"paragraph",content:[{type:"text",text:"Task: ",marks:[{type:"strong"}]},{type:"text",text:Z}]});Y.push({type:"paragraph",content:[{type:"text",text:"Implementation Summary:",marks:[{type:"strong"}]}]});let z=o0.formatClaudeOutputToADF($);return Y.push(...z),Y.push({type:"panel",attrs:{panelType:"info"},content:[{type:"paragraph",content:[{type:"text",text:"This implementation was generated automatically using Claude AI. Please review the changes before merging.",marks:[{type:"em"}]}]}]}),Y}static createClarityAssessmentADF($){let Z=[{type:"heading",attrs:{level:3},content:[{type:"emoji",attrs:{shortName:":robot:",id:"1f916",text:"\uD83E\uDD16"}},{type:"text",text:" Automated Task Feasibility Assessment"}]},{type:"paragraph",content:[{type:"text",text:"Clarity Score: ",marks:[{type:"strong"}]},{type:"text",text:`${$.clarityScore}/10`}]},{type:"paragraph",content:[{type:"text",text:"Status: ",marks:[{type:"strong"}]},...$.isImplementable?[{type:"emoji",attrs:{shortName:":white_check_mark:",id:"2705",text:"\u2705"}},{type:"text",text:" Ready for implementation"}]:[{type:"emoji",attrs:{shortName:":x:",id:"274c",text:"\u274C"}},{type:"text",text:" Needs fundamental clarification"}]]},{type:"paragraph",content:[{type:"text",text:"Summary: ",marks:[{type:"strong"}]},{type:"text",text:$.summary}]}];if($.issues&&$.issues.length>0){Z.push({type:"paragraph",content:[{type:"text",text:"Critical Issues Identified:",marks:[{type:"strong"}]}]});let Y=[];$.issues.forEach((z)=>{let X=z.severity==="critical"?"\uD83D\uDD34":z.severity==="major"?"\uD83D\uDFE1":"\uD83D\uDD35";Y.push({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:`${X} `},{type:"text",text:z.category,marks:[{type:"strong"}]},{type:"text",text:`: ${z.description}`}]}]})}),Z.push({type:"bulletList",content:Y})}if($.recommendations&&$.recommendations.length>0){Z.push({type:"paragraph",content:[{type:"text",text:"Recommendations:",marks:[{type:"strong"}]}]});let Y=[];$.recommendations.forEach((z)=>{Y.push({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:z}]}]})}),Z.push({type:"orderedList",content:Y})}if($.isImplementable&&$.clarityScore>=7)Z.push({type:"panel",attrs:{panelType:"success"},content:[{type:"paragraph",content:[{type:"text",text:"\uD83C\uDFAF Excellent! This task description provides clear requirements and context for implementation.",marks:[{type:"strong"}]}]}]});else if($.isImplementable)Z.push({type:"panel",attrs:{panelType:"info"},content:[{type:"paragraph",content:[{type:"text",text:"\uD83D\uDCA1 This task is implementable, but could benefit from additional details for even clearer requirements.",marks:[{type:"em"}]}]}]});return Z.push({type:"panel",attrs:{panelType:"note"},content:[{type:"paragraph",content:[{type:"text",text:"This assessment focuses on basic implementability. Technical details, UI/UX patterns, and implementation specifics are expected to be inferred from existing codebase.",marks:[{type:"em"}]}]}]}),Z}static createIncompleteImplementationCommentADF($,Z){let Y=[{type:"heading",attrs:{level:3},content:[{type:"emoji",attrs:{shortName:":warning:",id:"26a0-fe0f",text:"\u26A0\uFE0F"}},{type:"text",text:" Implementation Incomplete"}]}];if(Z)Y.push({type:"paragraph",content:[{type:"text",text:"Task: ",marks:[{type:"strong"}]},{type:"text",text:Z}]});Y.push({type:"paragraph",content:[{type:"text",text:"Claude was unable to complete the implementation. This may indicate:"}]}),Y.push({type:"bulletList",content:[{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:"The task requirements need more clarity or detail"}]}]},{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:"Missing context or related information"}]}]},{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:"The task scope is too large and should be broken down"}]}]},{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:"Technical blockers or errors during execution"}]}]}]}),Y.push({type:"paragraph",content:[{type:"text",text:"Implementation Attempt Details:",marks:[{type:"strong"}]}]});let z=o0.formatClaudeOutputToADF($);return Y.push(...z),Y.push({type:"panel",attrs:{panelType:"warning"},content:[{type:"paragraph",content:[{type:"text",text:"Action Required: ",marks:[{type:"strong"}]},{type:"text",text:"Please review the output above, update the task description with more details if needed, and retry the implementation."}]}]}),Y}}import{writeFileSync as nX,mkdirSync as rX}from"fs";import Q6 from"path";class G6{baseUrl;email;apiToken;constructor($,Z,Y){if(this.baseUrl=$.replace(/\/$/,""),this.email=Z,this.apiToken=Y,!this.apiToken||this.apiToken.length===0)throw new Error("API token is required")}async jiraApiCall($,Z,Y){let z=`${this.baseUrl}${Z}`;console.log(`\uD83C\uDF10 JIRA API Call: ${$} ${z}`);let X=this.getAuthHeader();console.log(`\uD83D\uDD10 Auth header: Basic ${X.replace("Basic ","").substring(0,10)}...`);let Q=await fetch(z,{method:$,body:Y?Buffer.from(JSON.stringify(Y),"utf-8"):void 0,headers:{"Content-Type":"application/json; charset=utf-8",Authorization:X}});if(!Q.ok){let G=await Q.text();throw console.log(`\u274C JIRA API Error: ${Q.status} ${Q.statusText}`),console.log(` Error details: ${G}`),new Error(`JIRA API Error: ${Q.status} ${Q.statusText} - ${G}`)}if(Q.status===204)return console.log(`\uD83D\uDCC4 Received 204 No Content response for ${Z}`),null;try{let G=await Q.json();return console.log(`\uD83D\uDCC4 Successfully parsed JSON response for ${Z}`),G}catch(G){throw console.error(`\u274C Failed to parse JSON response for ${Z}: ${G}`),new Error(`Failed to parse JSON response: ${G}`)}}async searchIssues($,Z=0,Y=50){let z=`/rest/api/3/search/jql?jql=${encodeURIComponent($)}&startAt=${Z}&maxResults=${Y}&expand=names,schema`;try{let X=await this.jiraApiCall("GET",z);return console.log(`\uD83D\uDD0D Found ${X.issues?.length||0} issues (${X.total} total)`),{issues:X.issues||[],total:X.total||0}}catch(X){throw console.error("Failed to search issues:",X),new Error(`Failed to search issues with JQL: ${$}`)}}async getIssue($){console.log(`\uD83D\uDD0D Attempting to fetch issue: ${$}`),console.log(`\uD83D\uDCE1 JIRA Base URL: ${this.baseUrl}`),console.log(`\uD83D\uDC64 JIRA Email: ${this.email}`),console.log(`\uD83D\uDD10 API Token: ${this.apiToken?this.apiToken.substring(0,4)+"..."+this.apiToken.slice(-4):"NOT SET"}`),console.log("\uD83D\uDD10 Testing authentication...");try{let Z=await this.jiraApiCall("GET","/rest/api/3/myself");console.log(`\u2705 Authentication successful - logged in as: ${Z.displayName} (${Z.emailAddress})`)}catch(Z){throw console.log(`\u274C Authentication test failed: ${Z}`),Z}try{console.log("\u23F3 Making request to JIRA API...");let Z=await this.jiraApiCall("GET",`/rest/api/3/issue/${$}?expand=renderedFields`);if(console.log(`\u2705 Successfully fetched issue ${$}`),console.log(`\uD83D\uDCDD Issue summary: ${Z.fields?.summary||"No summary"}`),console.log(`\uD83D\uDD0D Response keys: ${Object.keys(Z)}`),console.log(`\uD83D\uDD0D Has fields: ${!!Z.fields}`),Z.fields)console.log(`\uD83D\uDD0D Fields keys: ${Object.keys(Z.fields)}`);else console.log("\u26A0\uFE0F No fields found in response, this might indicate an API issue or permissions problem"),console.log("\uD83D\uDD0D Full response structure:",JSON.stringify(Z,null,2));if(!Z.fields){console.log("\uD83D\uDD04 Retrying without expand parameter...");let Y=await this.jiraApiCall("GET",`/rest/api/3/issue/${$}`);if(console.log(`\uD83D\uDD0D Fallback response has fields: ${!!Y.fields}`),Y.fields)return Y.renderedFields=Z.renderedFields||{},Y}return Z}catch(Z){throw console.error(`\u274C Error fetching issue ${$}:`,Z),Z}}isClaudeInternComment($){let Z="";if($.renderedBody)Z=$.renderedBody;else if(typeof $.body==="string"&&$.body.length>0)Z=$.body;else if($.body&&typeof $.body==="object"&&"content"in $.body)Z=JSON.stringify($.body);return["Implementation Completed by Claude","Automated Task Feasibility Assessment","Implementation Incomplete"].some((z)=>Z.includes(z))}async getIssueComments($){try{let Z=await this.jiraApiCall("GET",`/rest/api/3/issue/${$}/comment?expand=renderedBody`);if(!Z)return console.log(`No comments found for ${$} (empty response)`),[];if(typeof Z!=="object")return console.warn(`Unexpected response type when fetching comments for ${$}: ${typeof Z}`),[];let Y=Z.comments||[],z=Y.filter((Q)=>!this.isClaudeInternComment(Q)),X=Y.length-z.length;if(X>0)console.log(`\uD83D\uDD0D Filtered out ${X} Claude Intern comment(s) from ${$}`);return z}catch(Z){return console.warn(`Failed to fetch comments for ${$}: ${Z}`),[]}}async getIssueAttachments($){try{return(await this.getIssue($)).fields.attachment||[]}catch(Z){return console.warn(`Failed to fetch attachments for ${$}: ${Z}`),[]}}async downloadAttachment($,Z){try{console.log(`\uD83D\uDCCE Downloading attachment: ${$.filename}...`),rX(Z,{recursive:!0});let Y=$.filename.replace(/[^a-zA-Z0-9._-]/g,"_"),z=Q6.join(Z,Y),X=await fetch($.content,{headers:{Authorization:this.getAuthHeader()}});if(!X.ok)throw new Error(`Failed to download attachment: ${X.status} ${X.statusText}`);let Q=await X.arrayBuffer();return nX(z,Buffer.from(Q)),console.log(`\u2705 Downloaded attachment to: ${z}`),z}catch(Y){throw console.warn(`Failed to download attachment ${$.filename}: ${Y}`),Y}}async downloadIssueAttachments($,Z){let Y=new Map;try{let z=await this.getIssueAttachments($);if(z.length===0)return console.log(`\uD83D\uDCCE No attachments found for ${$}`),Y;console.log(`\uD83D\uDCCE Found ${z.length} attachments for ${$}`);for(let X of z)try{let Q=await this.downloadAttachment(X,Z);Y.set(X.content,Q)}catch(Q){console.warn(`Skipping attachment ${X.filename}: ${Q}`)}console.log(`\u2705 Downloaded ${Y.size}/${z.length} attachments for ${$}`)}catch(z){console.warn(`Failed to download attachments for ${$}: ${z}`)}return Y}async downloadAttachmentsFromContent($,Z,Y){let z=Y||new Map,X=/(?:https?:\/\/[^\/\s]+)?\/rest\/api\/[23]\/attachment\/content\/(\d+)/g,Q=new Set,G;while((G=X.exec($))!==null){let J=G[0].startsWith("http")?G[0]:`${this.baseUrl}${G[0]}`;Q.add(J)}if(Q.size===0)return z;console.log(`\uD83D\uDCCE Found ${Q.size} attachment URLs in content`);for(let J of Q){if(z.has(J))continue;try{let _=J.match(/\/attachment\/content\/(\d+)/);if(!_)continue;let H=_[1],q=J.replace("/content/","/"),F=await fetch(q,{headers:{Authorization:this.getAuthHeader()}});if(!F.ok){console.warn(`Failed to fetch attachment metadata for ${H}`);continue}let L=await F.json(),B={id:H,filename:L.filename||`attachment-${H}`,content:J,size:L.size||0,mimeType:L.mimeType||"application/octet-stream",created:L.created||new Date().toISOString(),author:L.author||{displayName:"Unknown"}},D=await this.downloadAttachment(B,Z);z.set(J,D),console.log(`\u2705 Downloaded embedded attachment: ${L.filename}`)}catch(_){console.warn(`Failed to download attachment from ${J}: ${_}`)}}return z}getAuthHeader(){if(this.apiToken.includes(":"))return`Basic ${Buffer.from(this.apiToken).toString("base64")}`;else return`Basic ${Buffer.from(`${this.email}:${this.apiToken}`).toString("base64")}`}extractLinkedResources($){return g0.extractLinkedResources($)}async getRelatedWorkItems($){return g0.getRelatedWorkItems($,this.getIssue.bind(this))}async postComment($,Z){try{console.log(`\uD83D\uDCAC Posting comment to issue ${$}...`);let Y={body:{type:"doc",version:1,content:[{type:"paragraph",content:[{type:"text",text:Z}]}]}};await this.jiraApiCall("POST",`/rest/api/3/issue/${$}/comment`,Y),console.log(`\u2705 Successfully posted comment to ${$}`)}catch(Y){throw console.warn(`Failed to post comment to ${$}: ${Y}`),Y}}async postImplementationComment($,Z,Y){try{console.log(`\uD83D\uDCAC Posting implementation comment to issue ${$}...`);let X={body:{type:"doc",version:1,content:o0.createImplementationCommentADF(Z,Y)}};await this.jiraApiCall("POST",`/rest/api/3/issue/${$}/comment`,X),console.log(`\u2705 Successfully posted implementation comment to ${$}`)}catch(z){throw console.warn(`Failed to post implementation comment to ${$}: ${z}`),z}}async postClarityComment($,Z){try{console.log(`\uD83D\uDCAC Posting clarity assessment to issue ${$}...`);let z={body:{type:"doc",version:1,content:o0.createClarityAssessmentADF(Z)}};await this.jiraApiCall("POST",`/rest/api/3/issue/${$}/comment`,z),console.log(`\u2705 Successfully posted clarity assessment to ${$}`)}catch(Y){throw console.warn(`Failed to post clarity assessment to ${$}: ${Y}`),Y}}async transitionIssue($,Z){try{console.log(`\uD83D\uDD04 Transitioning ${$} to "${Z}"...`);let z=(await this.jiraApiCall("GET",`/rest/api/3/issue/${$}/transitions`)).transitions,X=z.find((G)=>G.to.name.toLowerCase()===Z.toLowerCase());if(!X){let G=z.map((J)=>J.to.name).join(", ");throw new Error(`Status "${Z}" not available for ${$}. Available: ${G}`)}let Q={transition:{id:X.id}};await this.jiraApiCall("POST",`/rest/api/3/issue/${$}/transitions`,Q),console.log(`\u2705 Successfully transitioned ${$} to "${Z}"`)}catch(Y){throw console.warn(`Failed to transition ${$} to "${Z}": ${Y}`),Y}}async postIncompleteImplementationComment($,Z,Y,z){try{console.log(`\uD83D\uDCAC Posting incomplete implementation comment to issue ${$}...`);let Q={body:{type:"doc",version:1,content:o0.createIncompleteImplementationCommentADF(Z,Y)}};if(await this.jiraApiCall("POST",`/rest/api/3/issue/${$}/comment`,Q),console.log(`\u2705 Successfully posted incomplete implementation comment to ${$}`),z)try{let G=process.env.CLAUDE_INTERN_OUTPUT_DIR||"/tmp/claude-intern-tasks",J=Q6.join(G,$.toLowerCase()),_=Q6.join(J,"incomplete-task-description.txt");rX(J,{recursive:!0}),nX(_,z,"utf8")}catch(G){console.warn(`\u26A0\uFE0F Failed to save task description for duplicate detection: ${G}`)}}catch(X){throw console.warn(`Failed to post incomplete implementation comment to ${$}: ${X}`),X}}async hasIncompleteImplementationComment($,Z){try{let Y=process.env.CLAUDE_INTERN_OUTPUT_DIR||"/tmp/claude-intern-tasks",z=Q6.join(Y,$.toLowerCase()),X=Q6.join(z,"incomplete-task-description.txt"),{existsSync:Q,readFileSync:G}=x0("fs");if(!Q(X))return!1;if(G(X,"utf8")===Z)return(await this.getIssueComments($)).some((q)=>{let F="";if(typeof q.body==="string")F=q.body;else if(q.renderedBody)F=q.renderedBody;return F.includes("\u26A0\uFE0F Implementation Incomplete")||F.includes("Implementation was incomplete")});return!1}catch(Y){return console.warn(`Failed to check for duplicate comments: ${Y}`),!1}}formatIssueDetails($,Z,Y,z=[]){return g0.formatIssueDetails($,Z,Y,z)}}import{existsSync as LZ,mkdirSync as lJ,readFileSync as iJ,writeFileSync as sJ,unlinkSync as IZ}from"fs";import{resolve as oJ,join as nJ}from"path";class UZ{lockFilePath;lockAcquired=!1;constructor($=process.cwd()){let Z=oJ($,".claude-intern");if(!LZ(Z))lJ(Z,{recursive:!0});this.lockFilePath=nJ(Z,".pid.lock")}acquire(){try{if(LZ(this.lockFilePath))try{let Z=iJ(this.lockFilePath,"utf8"),Y=JSON.parse(Z),z=Y.pid,X=Y.timestamp;if(this.isProcessRunning(z))return{success:!1,message:`Another instance of claude-intern is already running in this directory (PID: ${z})`,pid:z};console.log(`\u26A0\uFE0F Found stale lock file from previous instance (PID: ${z}, started: ${new Date(X).toLocaleString()})`),console.log(" Removing stale lock and continuing..."),IZ(this.lockFilePath)}catch(Z){console.log("\u26A0\uFE0F Found corrupted lock file, removing and continuing..."),IZ(this.lockFilePath)}let $={pid:process.pid,timestamp:new Date().toISOString(),workingDir:process.cwd()};return sJ(this.lockFilePath,JSON.stringify($,null,2),"utf8"),this.lockAcquired=!0,{success:!0,message:"Lock acquired successfully"}}catch($){return{success:!1,message:`Failed to acquire lock: ${$.message}`}}}release(){if(!this.lockAcquired)return;try{if(LZ(this.lockFilePath))IZ(this.lockFilePath);this.lockAcquired=!1}catch($){console.warn(`\u26A0\uFE0F Failed to release lock: ${$.message}`)}}isProcessRunning($){try{return process.kill($,0),!0}catch(Z){if(Z.code==="EPERM")return!0;return!1}}getLockFilePath(){return this.lockFilePath}}I8();class PZ{token;baseUrl;constructor($,Z){this.token=$,this.baseUrl=Z}createPRTitle($,Z){return`[${$}] ${Z}`}convertAtlassianDocumentToString($){if(typeof $==="string")return $;let Z=(Y)=>{if(!Y)return"";return Y.map((z)=>{if(z.type==="text")return z.text||"";if(z.content)return Z(z.content);return""}).join("")};return Z($.content)}createPRBody($,Z){let Y=[`## JIRA Task: ${$.key}`,"",`**Summary:** ${$.fields.summary}`,""];if(Z)Y.push("## Implementation Details"),Y.push(""),Y.push(Z),Y.push("");return Y.push("---"),Y.push("*This PR was automatically created by Claude Intern*"),Y.join(`
|
|
409
|
-
`)}}class
|
|
410
|
-
`)}}
|
|
411
|
-
\u26A0\uFE0F Configuration folder already exists: ${$}`),
|
|
412
|
-
\uD83D\uDCA1 To reconfigure, either:`),console.log(` 1. Delete the folder: rm -rf ${$}`),console.log(" 2. Or edit the files directly");return}try{
|
|
508
|
+
[Output truncated due to length]`;let X=[],z=Z.split(`
|
|
509
|
+
`),Q=[],G=!1,V=[],_="",B=()=>{if(Q.length>0){let F=Q.join(" ").trim();if(F)X.push({type:"paragraph",content:$1.parseTextWithFormatting(F)});Q=[]}},q=()=>{if(V.length>0)X.push({type:"codeBlock",attrs:{language:_||"text"},content:[{type:"text",text:V.join(`
|
|
510
|
+
`)}]}),V=[],_=""};for(let F=0;F<z.length;F++){let M=z[F],H=M.trim();if(H.startsWith("```")){if(G)q(),G=!1;else B(),G=!0,_=H.substring(3).trim();continue}if(G){V.push(M);continue}if(H.startsWith("#")){B();let O=Math.min(6,(H.match(/^#+/)||[""])[0].length),D=H.replace(/^#+\s*/,"");X.push({type:"heading",attrs:{level:O},content:[{type:"text",text:D}]});continue}if(H.match(/^[-*+]\s/)){B();let O=[],D=F;while(D<z.length&&z[D].trim().match(/^[-*+]\s/)){let T=z[D].trim().replace(/^[-*+]\s/,"");O.push({type:"listItem",content:[{type:"paragraph",content:$1.parseTextWithFormatting(T)}]}),D++}X.push({type:"bulletList",content:O}),F=D-1;continue}if(H.match(/^\d+\.\s/)){B();let O=[],D=F;while(D<z.length&&z[D].trim().match(/^\d+\.\s/)){let T=z[D].trim().replace(/^\d+\.\s/,"");O.push({type:"listItem",content:[{type:"paragraph",content:$1.parseTextWithFormatting(T)}]}),D++}X.push({type:"orderedList",content:O}),F=D-1;continue}if(H.includes("|")){B();let O=[],D=F;while(D<z.length&&z[D].trim().includes("|")){let T=z[D].trim();if(!T.match(/^\|[\s\-:|]+\|$/))O.push(T);D++}if(O.length>0){let T=$1.parseMarkdownTable(O);if(T)X.push(T)}F=D-1;continue}if(H===""){B();continue}Q.push(M)}return B(),q(),X.length>0?X:[{type:"paragraph",content:[{type:"text",text:"Implementation completed."}]}]}static parseTextWithFormatting($){let Z=[],Y="",X=0,z=()=>{if(Y)Z.push({type:"text",text:Y}),Y=""};while(X<$.length){if($[X]==="`"&&$[X+1]!=="`"){z();let Q=X+1,G=$.indexOf("`",Q);if(G===-1)G=$.length;Z.push({type:"text",text:$.substring(Q,G),marks:[{type:"code"}]}),X=G+1;continue}if($.substring(X,X+2)==="**"){z();let Q=X+2,G=$.indexOf("**",Q);if(G!==-1){Z.push({type:"text",text:$.substring(Q,G),marks:[{type:"strong"}]}),X=G+2;continue}}if($[X]==="*"&&$[X+1]!=="*"){z();let Q=X+1,G=$.indexOf("*",Q);if(G!==-1){Z.push({type:"text",text:$.substring(Q,G),marks:[{type:"em"}]}),X=G+1;continue}}Y+=$[X],X++}return z(),Z.length>0?Z:[{type:"text",text:$}]}static parseMarkdownTable($){if($.length===0)return null;let Z=(G)=>{return G.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map((_)=>_.trim())},Y=Z($[0]),X=Y.length,z={type:"tableRow",content:Y.map((G)=>({type:"tableHeader",attrs:{},content:[{type:"paragraph",content:$1.parseTextWithFormatting(G)}]}))},Q=$.slice(1).map((G)=>{let V=Z(G);while(V.length<X)V.push("");return{type:"tableRow",content:V.slice(0,X).map((_)=>({type:"tableCell",attrs:{},content:[{type:"paragraph",content:$1.parseTextWithFormatting(_)}]}))}});return{type:"table",attrs:{isNumberColumnEnabled:!1,layout:"default"},content:[z,...Q]}}static createImplementationCommentADF($,Z){let Y=[{type:"heading",attrs:{level:3},content:[{type:"emoji",attrs:{shortName:":robot:",id:"1f916",text:"\uD83E\uDD16"}},{type:"text",text:" Implementation Completed by Claude"}]}];if(Z)Y.push({type:"paragraph",content:[{type:"text",text:"Task: ",marks:[{type:"strong"}]},{type:"text",text:Z}]});Y.push({type:"paragraph",content:[{type:"text",text:"Implementation Summary:",marks:[{type:"strong"}]}]});let X=$1.formatClaudeOutputToADF($);return Y.push(...X),Y.push({type:"panel",attrs:{panelType:"info"},content:[{type:"paragraph",content:[{type:"text",text:"This implementation was generated automatically using Claude AI. Please review the changes before merging.",marks:[{type:"em"}]}]}]}),Y}static createClarityAssessmentADF($){let Z=[{type:"heading",attrs:{level:3},content:[{type:"emoji",attrs:{shortName:":robot:",id:"1f916",text:"\uD83E\uDD16"}},{type:"text",text:" Automated Task Feasibility Assessment"}]},{type:"paragraph",content:[{type:"text",text:"Clarity Score: ",marks:[{type:"strong"}]},{type:"text",text:`${$.clarityScore}/10`}]},{type:"paragraph",content:[{type:"text",text:"Status: ",marks:[{type:"strong"}]},...$.isImplementable?[{type:"emoji",attrs:{shortName:":white_check_mark:",id:"2705",text:"\u2705"}},{type:"text",text:" Ready for implementation"}]:[{type:"emoji",attrs:{shortName:":x:",id:"274c",text:"\u274C"}},{type:"text",text:" Needs fundamental clarification"}]]},{type:"paragraph",content:[{type:"text",text:"Summary: ",marks:[{type:"strong"}]},{type:"text",text:$.summary}]}];if($.issues&&$.issues.length>0){Z.push({type:"paragraph",content:[{type:"text",text:"Critical Issues Identified:",marks:[{type:"strong"}]}]});let Y=[];$.issues.forEach((X)=>{let z=X.severity==="critical"?"\uD83D\uDD34":X.severity==="major"?"\uD83D\uDFE1":"\uD83D\uDD35";Y.push({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:`${z} `},{type:"text",text:X.category,marks:[{type:"strong"}]},{type:"text",text:`: ${X.description}`}]}]})}),Z.push({type:"bulletList",content:Y})}if($.recommendations&&$.recommendations.length>0){Z.push({type:"paragraph",content:[{type:"text",text:"Recommendations:",marks:[{type:"strong"}]}]});let Y=[];$.recommendations.forEach((X)=>{Y.push({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:X}]}]})}),Z.push({type:"orderedList",content:Y})}if($.isImplementable&&$.clarityScore>=7)Z.push({type:"panel",attrs:{panelType:"success"},content:[{type:"paragraph",content:[{type:"text",text:"\uD83C\uDFAF Excellent! This task description provides clear requirements and context for implementation.",marks:[{type:"strong"}]}]}]});else if($.isImplementable)Z.push({type:"panel",attrs:{panelType:"info"},content:[{type:"paragraph",content:[{type:"text",text:"\uD83D\uDCA1 This task is implementable, but could benefit from additional details for even clearer requirements.",marks:[{type:"em"}]}]}]});return Z.push({type:"panel",attrs:{panelType:"note"},content:[{type:"paragraph",content:[{type:"text",text:"This assessment focuses on basic implementability. Technical details, UI/UX patterns, and implementation specifics are expected to be inferred from existing codebase.",marks:[{type:"em"}]}]}]}),Z}static createIncompleteImplementationCommentADF($,Z){let Y=[{type:"heading",attrs:{level:3},content:[{type:"emoji",attrs:{shortName:":warning:",id:"26a0-fe0f",text:"\u26A0\uFE0F"}},{type:"text",text:" Implementation Incomplete"}]}];if(Z)Y.push({type:"paragraph",content:[{type:"text",text:"Task: ",marks:[{type:"strong"}]},{type:"text",text:Z}]});Y.push({type:"paragraph",content:[{type:"text",text:"Claude was unable to complete the implementation. This may indicate:"}]}),Y.push({type:"bulletList",content:[{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:"The task requirements need more clarity or detail"}]}]},{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:"Missing context or related information"}]}]},{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:"The task scope is too large and should be broken down"}]}]},{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:"Technical blockers or errors during execution"}]}]}]}),Y.push({type:"paragraph",content:[{type:"text",text:"Implementation Attempt Details:",marks:[{type:"strong"}]}]});let X=$1.formatClaudeOutputToADF($);return Y.push(...X),Y.push({type:"panel",attrs:{panelType:"warning"},content:[{type:"paragraph",content:[{type:"text",text:"Action Required: ",marks:[{type:"strong"}]},{type:"text",text:"Please review the output above, update the task description with more details if needed, and retry the implementation."}]}]}),Y}}N1();import{writeFileSync as X2,mkdirSync as z2}from"fs";import J6 from"path";class V6{baseUrl;email;apiToken;constructor($,Z,Y){if(this.baseUrl=$.replace(/\/$/,""),this.email=Z,this.apiToken=Y,!this.apiToken||this.apiToken.length===0)throw new Error("API token is required")}async jiraApiCall($,Z,Y){let X=`${this.baseUrl}${Z}`;console.log(`\uD83C\uDF10 JIRA API Call: ${$} ${X}`);let z=this.getAuthHeader();console.log(`\uD83D\uDD10 Auth header: Basic ${z.replace("Basic ","").substring(0,10)}...`);let Q=await I.fetchWithRetry(X,{method:$,body:Y?Buffer.from(JSON.stringify(Y),"utf-8"):void 0,headers:{"Content-Type":"application/json; charset=utf-8",Authorization:z}});if(!Q.ok){let G=await Q.text();throw console.log(`\u274C JIRA API Error: ${Q.status} ${Q.statusText}`),console.log(` Error details: ${G}`),new Error(`JIRA API Error: ${Q.status} ${Q.statusText} - ${G}`)}if(Q.status===204)return console.log(`\uD83D\uDCC4 Received 204 No Content response for ${Z}`),null;try{let G=await Q.json();return console.log(`\uD83D\uDCC4 Successfully parsed JSON response for ${Z}`),G}catch(G){throw console.error(`\u274C Failed to parse JSON response for ${Z}: ${G}`),new Error(`Failed to parse JSON response: ${G}`)}}async searchIssues($,Z=0,Y=50){let X=`/rest/api/3/search/jql?jql=${encodeURIComponent($)}&startAt=${Z}&maxResults=${Y}&expand=names,schema`;try{let z=await this.jiraApiCall("GET",X);return console.log(`\uD83D\uDD0D Found ${z.issues?.length||0} issues (${z.total} total)`),{issues:z.issues||[],total:z.total||0}}catch(z){throw console.error("Failed to search issues:",z),new Error(`Failed to search issues with JQL: ${$}`)}}async getIssue($){console.log(`\uD83D\uDD0D Attempting to fetch issue: ${$}`),console.log(`\uD83D\uDCE1 JIRA Base URL: ${this.baseUrl}`),console.log(`\uD83D\uDC64 JIRA Email: ${this.email}`),console.log(`\uD83D\uDD10 API Token: ${this.apiToken?this.apiToken.substring(0,4)+"..."+this.apiToken.slice(-4):"NOT SET"}`),console.log("\uD83D\uDD10 Testing authentication...");try{let Z=await this.jiraApiCall("GET","/rest/api/3/myself");console.log(`\u2705 Authentication successful - logged in as: ${Z.displayName} (${Z.emailAddress})`)}catch(Z){throw console.log(`\u274C Authentication test failed: ${Z}`),Z}try{console.log("\u23F3 Making request to JIRA API...");let Z=await this.jiraApiCall("GET",`/rest/api/3/issue/${$}?expand=renderedFields`);if(console.log(`\u2705 Successfully fetched issue ${$}`),console.log(`\uD83D\uDCDD Issue summary: ${Z.fields?.summary||"No summary"}`),console.log(`\uD83D\uDD0D Response keys: ${Object.keys(Z)}`),console.log(`\uD83D\uDD0D Has fields: ${!!Z.fields}`),Z.fields)console.log(`\uD83D\uDD0D Fields keys: ${Object.keys(Z.fields)}`);else console.log("\u26A0\uFE0F No fields found in response, this might indicate an API issue or permissions problem"),console.log("\uD83D\uDD0D Full response structure:",JSON.stringify(Z,null,2));if(!Z.fields){console.log("\uD83D\uDD04 Retrying without expand parameter...");let Y=await this.jiraApiCall("GET",`/rest/api/3/issue/${$}`);if(console.log(`\uD83D\uDD0D Fallback response has fields: ${!!Y.fields}`),Y.fields)return Y.renderedFields=Z.renderedFields||{},Y}return Z}catch(Z){throw console.error(`\u274C Error fetching issue ${$}:`,Z),Z}}isClaudeInternComment($){let Z="";if($.renderedBody)Z=$.renderedBody;else if(typeof $.body==="string"&&$.body.length>0)Z=$.body;else if($.body&&typeof $.body==="object"&&"content"in $.body)Z=JSON.stringify($.body);return["Implementation Completed by Claude","Automated Task Feasibility Assessment","Implementation Incomplete"].some((X)=>Z.includes(X))}async getIssueComments($){try{let Z=await this.jiraApiCall("GET",`/rest/api/3/issue/${$}/comment?expand=renderedBody`);if(!Z)return console.log(`No comments found for ${$} (empty response)`),[];if(typeof Z!=="object")return console.warn(`Unexpected response type when fetching comments for ${$}: ${typeof Z}`),[];let Y=Z.comments||[],X=Y.filter((Q)=>!this.isClaudeInternComment(Q)),z=Y.length-X.length;if(z>0)console.log(`\uD83D\uDD0D Filtered out ${z} Claude Intern comment(s) from ${$}`);return X}catch(Z){return console.warn(`Failed to fetch comments for ${$}: ${Z}`),[]}}async getIssueAttachments($){try{return(await this.getIssue($)).fields.attachment||[]}catch(Z){return console.warn(`Failed to fetch attachments for ${$}: ${Z}`),[]}}async downloadAttachment($,Z){try{console.log(`\uD83D\uDCCE Downloading attachment: ${$.filename}...`),z2(Z,{recursive:!0});let Y=$.filename.replace(/[^a-zA-Z0-9._-]/g,"_"),X=J6.join(Z,Y),z=await I.fetchWithRetry($.content,{headers:{Authorization:this.getAuthHeader()}});if(!z.ok)throw new Error(`Failed to download attachment: ${z.status} ${z.statusText}`);let Q=await z.arrayBuffer();return X2(X,Buffer.from(Q)),console.log(`\u2705 Downloaded attachment to: ${X}`),X}catch(Y){throw console.warn(`Failed to download attachment ${$.filename}: ${Y}`),Y}}async downloadIssueAttachments($,Z){let Y=new Map;try{let X=await this.getIssueAttachments($);if(X.length===0)return console.log(`\uD83D\uDCCE No attachments found for ${$}`),Y;console.log(`\uD83D\uDCCE Found ${X.length} attachments for ${$}`);for(let z of X)try{let Q=await this.downloadAttachment(z,Z);Y.set(z.content,Q)}catch(Q){console.warn(`Skipping attachment ${z.filename}: ${Q}`)}console.log(`\u2705 Downloaded ${Y.size}/${X.length} attachments for ${$}`)}catch(X){console.warn(`Failed to download attachments for ${$}: ${X}`)}return Y}async downloadAttachmentsFromContent($,Z,Y){let X=Y||new Map,z=/(?:https?:\/\/[^\/\s]+)?\/rest\/api\/[23]\/attachment\/content\/(\d+)/g,Q=new Set,G;while((G=z.exec($))!==null){let V=G[0].startsWith("http")?G[0]:`${this.baseUrl}${G[0]}`;Q.add(V)}if(Q.size===0)return X;console.log(`\uD83D\uDCCE Found ${Q.size} attachment URLs in content`);for(let V of Q){if(X.has(V))continue;try{let _=V.match(/\/attachment\/content\/(\d+)/);if(!_)continue;let B=_[1],q=V.replace("/content/","/"),F=await I.fetchWithRetry(q,{headers:{Authorization:this.getAuthHeader()}});if(!F.ok){console.warn(`Failed to fetch attachment metadata for ${B}`);continue}let M=await F.json(),H={id:B,filename:M.filename||`attachment-${B}`,content:V,size:M.size||0,mimeType:M.mimeType||"application/octet-stream",created:M.created||new Date().toISOString(),author:M.author||{displayName:"Unknown"}},O=await this.downloadAttachment(H,Z);X.set(V,O),console.log(`\u2705 Downloaded embedded attachment: ${M.filename}`)}catch(_){console.warn(`Failed to download attachment from ${V}: ${_}`)}}return X}getAuthHeader(){if(this.apiToken.includes(":"))return`Basic ${Buffer.from(this.apiToken).toString("base64")}`;else return`Basic ${Buffer.from(`${this.email}:${this.apiToken}`).toString("base64")}`}extractLinkedResources($){return u0.extractLinkedResources($)}async getRelatedWorkItems($){return u0.getRelatedWorkItems($,this.getIssue.bind(this))}async postComment($,Z){try{console.log(`\uD83D\uDCAC Posting comment to issue ${$}...`);let Y={body:{type:"doc",version:1,content:[{type:"paragraph",content:[{type:"text",text:Z}]}]}};await this.jiraApiCall("POST",`/rest/api/3/issue/${$}/comment`,Y),console.log(`\u2705 Successfully posted comment to ${$}`)}catch(Y){throw console.warn(`Failed to post comment to ${$}: ${Y}`),Y}}async postImplementationComment($,Z,Y){try{console.log(`\uD83D\uDCAC Posting implementation comment to issue ${$}...`);let z={body:{type:"doc",version:1,content:$1.createImplementationCommentADF(Z,Y)}};await this.jiraApiCall("POST",`/rest/api/3/issue/${$}/comment`,z),console.log(`\u2705 Successfully posted implementation comment to ${$}`)}catch(X){throw console.warn(`Failed to post implementation comment to ${$}: ${X}`),X}}async postClarityComment($,Z){try{console.log(`\uD83D\uDCAC Posting clarity assessment to issue ${$}...`);let X={body:{type:"doc",version:1,content:$1.createClarityAssessmentADF(Z)}};await this.jiraApiCall("POST",`/rest/api/3/issue/${$}/comment`,X),console.log(`\u2705 Successfully posted clarity assessment to ${$}`)}catch(Y){throw console.warn(`Failed to post clarity assessment to ${$}: ${Y}`),Y}}async transitionIssue($,Z){try{console.log(`\uD83D\uDD04 Transitioning ${$} to "${Z}"...`);let X=(await this.jiraApiCall("GET",`/rest/api/3/issue/${$}/transitions`)).transitions,z=X.find((G)=>G.to.name.toLowerCase()===Z.toLowerCase());if(!z){let G=X.map((V)=>V.to.name).join(", ");throw new Error(`Status "${Z}" not available for ${$}. Available: ${G}`)}let Q={transition:{id:z.id}};await this.jiraApiCall("POST",`/rest/api/3/issue/${$}/transitions`,Q),console.log(`\u2705 Successfully transitioned ${$} to "${Z}"`)}catch(Y){throw console.warn(`Failed to transition ${$} to "${Z}": ${Y}`),Y}}async postIncompleteImplementationComment($,Z,Y,X){try{console.log(`\uD83D\uDCAC Posting incomplete implementation comment to issue ${$}...`);let Q={body:{type:"doc",version:1,content:$1.createIncompleteImplementationCommentADF(Z,Y)}};if(await this.jiraApiCall("POST",`/rest/api/3/issue/${$}/comment`,Q),console.log(`\u2705 Successfully posted incomplete implementation comment to ${$}`),X)try{let G=process.env.CLAUDE_INTERN_OUTPUT_DIR||"/tmp/claude-intern-tasks",V=J6.join(G,$.toLowerCase()),_=J6.join(V,"incomplete-task-description.txt");z2(V,{recursive:!0}),X2(_,X,"utf8")}catch(G){console.warn(`\u26A0\uFE0F Failed to save task description for duplicate detection: ${G}`)}}catch(z){throw console.warn(`Failed to post incomplete implementation comment to ${$}: ${z}`),z}}async hasIncompleteImplementationComment($,Z){try{let Y=process.env.CLAUDE_INTERN_OUTPUT_DIR||"/tmp/claude-intern-tasks",X=J6.join(Y,$.toLowerCase()),z=J6.join(X,"incomplete-task-description.txt"),{existsSync:Q,readFileSync:G}=T0("fs");if(!Q(z))return!1;if(G(z,"utf8")===Z)return(await this.getIssueComments($)).some((q)=>{let F="";if(typeof q.body==="string")F=q.body;else if(q.renderedBody)F=q.renderedBody;return F.includes("\u26A0\uFE0F Implementation Incomplete")||F.includes("Implementation was incomplete")});return!1}catch(Y){return console.warn(`Failed to check for duplicate comments: ${Y}`),!1}}formatIssueDetails($,Z,Y,X=[]){return u0.formatIssueDetails($,Z,Y,X)}}import{existsSync as UZ,mkdirSync as Z_,readFileSync as Y_,writeFileSync as X_,unlinkSync as AZ}from"fs";import{resolve as z_,join as Q_}from"path";class PZ{lockFilePath;lockAcquired=!1;constructor($=process.cwd()){let Z=z_($,".claude-intern");if(!UZ(Z))Z_(Z,{recursive:!0});this.lockFilePath=Q_(Z,".pid.lock")}acquire(){try{if(UZ(this.lockFilePath))try{let Z=Y_(this.lockFilePath,"utf8"),Y=JSON.parse(Z),X=Y.pid,z=Y.timestamp;if(this.isProcessRunning(X))return{success:!1,message:`Another instance of claude-intern is already running in this directory (PID: ${X})`,pid:X};console.log(`\u26A0\uFE0F Found stale lock file from previous instance (PID: ${X}, started: ${new Date(z).toLocaleString()})`),console.log(" Removing stale lock and continuing..."),AZ(this.lockFilePath)}catch(Z){console.log("\u26A0\uFE0F Found corrupted lock file, removing and continuing..."),AZ(this.lockFilePath)}let $={pid:process.pid,timestamp:new Date().toISOString(),workingDir:process.cwd()};return X_(this.lockFilePath,JSON.stringify($,null,2),"utf8"),this.lockAcquired=!0,{success:!0,message:"Lock acquired successfully"}}catch($){return{success:!1,message:`Failed to acquire lock: ${$.message}`}}}release(){if(!this.lockAcquired)return;try{if(UZ(this.lockFilePath))AZ(this.lockFilePath);this.lockAcquired=!1}catch($){console.warn(`\u26A0\uFE0F Failed to release lock: ${$.message}`)}}isProcessRunning($){try{return process.kill($,0),!0}catch(Z){if(Z.code==="EPERM")return!0;return!1}}getLockFilePath(){return this.lockFilePath}}P8();N1();class CZ{token;baseUrl;constructor($,Z){this.token=$,this.baseUrl=Z}createPRTitle($,Z){return`[${$}] ${Z}`}convertAtlassianDocumentToString($){if(typeof $==="string")return $;let Z=(Y)=>{if(!Y)return"";return Y.map((X)=>{if(X.type==="text")return X.text||"";if(X.content)return Z(X.content);return""}).join("")};return Z($.content)}createPRBody($,Z){let Y=[`## JIRA Task: ${$.key}`,"",`**Summary:** ${$.fields.summary}`,""];if(Z)Y.push("## Implementation Details"),Y.push(""),Y.push(Z),Y.push("");return Y.push("---"),Y.push("*This PR was automatically created by Claude Intern*"),Y.join(`
|
|
511
|
+
`)}}class TZ extends CZ{constructor($,Z="https://api.github.com"){super($,Z)}async createPullRequest($){try{let[Z,Y]=$.repository.split("/"),X=`${this.baseUrl}/repos/${Z}/${Y}/pulls`,z=await I.fetchWithRetry(X,{method:"POST",headers:{Authorization:`Bearer ${this.token}`,Accept:"application/vnd.github.v3+json","Content-Type":"application/json","User-Agent":"claude-intern"},body:JSON.stringify({title:$.title,body:$.body,head:$.sourceBranch,base:$.targetBranch,draft:!1})});if(!z.ok)return{success:!1,message:`GitHub PR creation failed: ${(await z.json().catch(()=>({message:"Unknown error"}))).message||z.statusText}`};let Q=await z.json();return{success:!0,url:Q.html_url,message:`Pull request created successfully: ${Q.html_url}`}}catch(Z){return{success:!1,message:`GitHub PR creation failed: ${Z.message}`}}}}class Q2 extends CZ{workspace;constructor($,Z,Y="https://api.bitbucket.org/2.0"){super($,Y);this.workspace=Z}async createPullRequest($){try{let Z=`${this.baseUrl}/repositories/${this.workspace}/${$.repository}/pullrequests`,Y=await I.fetchWithRetry(Z,{method:"POST",headers:{Authorization:`Bearer ${this.token}`,Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({title:$.title,description:$.body,source:{branch:{name:$.sourceBranch}},destination:{branch:{name:$.targetBranch}},close_source_branch:!1})});if(!Y.ok)return{success:!1,message:`Bitbucket PR creation failed: ${(await Y.json().catch(()=>({error:{message:"Unknown error"}}))).error?.message||Y.statusText}`};let X=await Y.json();return{success:!0,url:X.links.html.href,message:`Pull request created successfully: ${X.links.html.href}`}}catch(Z){return{success:!1,message:`Bitbucket PR creation failed: ${Z.message}`}}}}class EZ{githubClient;githubAppAuth;constructor(){let $=process.env.GITHUB_TOKEN;if($)this.githubClient=new TZ($);else{let Z=e0.fromEnvironment();if(Z)this.githubAppAuth=Z,console.log("\uD83D\uDD11 Using GitHub App authentication for PR creation")}}convertAtlassianDocumentToString($){if(typeof $==="string")return $;let Z=(Y)=>{if(!Y)return"";return Y.map((X)=>{if(X.type==="text")return X.text||"";if(X.content)return Z(X.content);return""}).join("")};return Z($.content)}async detectRepository(){try{let{spawn:$}=await import("child_process"),Z=$("git",["remote","get-url","origin"]),Y="";return Z.stdout.on("data",(X)=>{Y+=X.toString()}),new Promise((X)=>{Z.on("close",()=>{let z=Y.trim();if(z.includes("github.com")){let Q=z.match(/github\.com[:/]([^/]+)\/([^/.]+)/);if(Q)return X({platform:"github",repository:`${Q[1]}/${Q[2]}`})}else if(z.includes("bitbucket.org")){let Q=z.match(/bitbucket\.org[:/]([^/]+)\/([^/.]+)/);if(Q)return X({platform:"bitbucket",repository:Q[2],workspace:Q[1]})}X({platform:"unknown",repository:""})})})}catch($){return{platform:"unknown",repository:""}}}async createPullRequest($,Z,Y="main",X){let z=await this.detectRepository();if(z.platform==="unknown")return{success:!1,message:"Could not detect repository platform (GitHub or Bitbucket)"};let Q={title:this.createPRTitle($.key,$.fields.summary),body:this.createPRBody($,X),sourceBranch:Z,targetBranch:Y,repository:z.repository};if(z.platform==="github"){if(this.githubClient)return await this.githubClient.createPullRequest(Q);if(this.githubAppAuth)try{let[G,V]=z.repository.split("/"),_=await this.githubAppAuth.getTokenForRepository(G,V);return await new TZ(_).createPullRequest(Q)}catch(G){return{success:!1,message:`GitHub App authentication failed: ${G.message}`}}return{success:!1,message:"GitHub client not configured. Please set GITHUB_TOKEN or configure GitHub App (GITHUB_APP_ID + GITHUB_APP_PRIVATE_KEY_PATH)."}}if(z.platform==="bitbucket"){let G=process.env.BITBUCKET_TOKEN;if(!G)return{success:!1,message:"Bitbucket client not configured. Please set BITBUCKET_TOKEN environment variable."};if(!z.workspace)return{success:!1,message:"Could not detect Bitbucket workspace from git remote URL."};return await new Q2(G,z.workspace).createPullRequest(Q)}return{success:!1,message:"Unsupported repository platform."}}createPRTitle($,Z){return`[${$}] ${Z}`}createPRBody($,Z){let Y=[`## JIRA Task: ${$.key}`,"",`**Summary:** ${$.fields.summary}`,""];if(Z)Y.push("## Implementation Details"),Y.push(""),Y.push(Z),Y.push("");return Y.push("---"),Y.push("*This PR was automatically created by Claude Intern*"),Y.join(`
|
|
512
|
+
`)}}N1();I9();NZ();var z5="2.1.0",Q5=X5(import.meta.url),u2=m2(Q5);async function G5(){let $=c0(process.cwd(),".claude-intern"),Z=S0($,".env"),Y=S0($,".env.sample");if(console.log("\uD83D\uDE80 Initializing Claude Intern for this project..."),j1($)){if(console.log(`
|
|
513
|
+
\u26A0\uFE0F Configuration folder already exists: ${$}`),j1(Z))console.log("\u2705 .env file found");else console.log("\u26A0\uFE0F .env file not found");console.log(`
|
|
514
|
+
\uD83D\uDCA1 To reconfigure, either:`),console.log(` 1. Delete the folder: rm -rf ${$}`),console.log(" 2. Or edit the files directly");return}try{p2($,{recursive:!0}),console.log(`\u2705 Created configuration folder: ${$}`)}catch(B){console.error(`\u274C Failed to create configuration folder: ${B}`),process.exit(1)}let X=`# Claude Intern Environment Configuration
|
|
413
515
|
# Copy this file to .env and update with your actual values
|
|
414
516
|
|
|
415
517
|
# JIRA Configuration
|
|
@@ -473,120 +575,150 @@ CLAUDE_CLI_PATH=claude
|
|
|
473
575
|
# BITBUCKET_TOKEN=your-bitbucket-app-password-here
|
|
474
576
|
|
|
475
577
|
# Note: Bitbucket workspace is automatically detected from your git remote URL
|
|
476
|
-
`;try{
|
|
477
|
-
`);if(
|
|
478
|
-
`))
|
|
479
|
-
`;
|
|
480
|
-
`,"utf8"),console.log(`\u2705 Updated .gitignore to exclude ${F.join(", ")}`)}else if(q)console.log("\u2705 .gitignore already excludes .claude-intern/.env")}catch(
|
|
578
|
+
`;try{q1(Y,X,"utf8"),console.log(`\u2705 Created template file: ${Y}`)}catch(B){console.error(`\u274C Failed to create .env.sample: ${B}`),process.exit(1)}try{q1(Z,X,"utf8"),console.log(`\u2705 Created configuration file: ${Z}`)}catch(B){console.error(`\u274C Failed to create .env file: ${B}`),process.exit(1)}let z=S0($,"settings.json"),G=JSON.stringify({projects:{"PROJECT-KEY":{inProgressStatus:"In Progress",todoStatus:"To Do",prStatus:"In Review"}}},null,2);try{q1(z,G,"utf8"),console.log(`\u2705 Created settings file: ${z}`)}catch(B){console.error(`\u274C Failed to create settings.json: ${B}`),process.exit(1)}let V=S0(process.cwd(),".gitignore"),_=[".claude-intern/.env",".claude-intern/.env.local",".claude-intern/.pid.lock"];try{let B="",q=!1;if(j1(V))B=j6(V,"utf8"),q=!0;let F=_.filter((M)=>!B.includes(M));if(F.length>0){let M=["","# Claude Intern - Keep credentials secure",...F].join(`
|
|
579
|
+
`);if(B&&!B.endsWith(`
|
|
580
|
+
`))B+=`
|
|
581
|
+
`;q1(V,B+M+`
|
|
582
|
+
`,"utf8"),console.log(`\u2705 Updated .gitignore to exclude ${F.join(", ")}`)}else if(q)console.log("\u2705 .gitignore already excludes .claude-intern/.env")}catch(B){console.warn(`\u26A0\uFE0F Could not update .gitignore automatically: ${B}`),console.log(" Please manually add '.claude-intern/.env' to your .gitignore")}console.log(`
|
|
481
583
|
\uD83C\uDF89 Project initialized successfully!`),console.log(`
|
|
482
|
-
\uD83D\uDCDD Next steps:`),console.log(` 1. Edit ${Z}`),console.log(" - Add your JIRA credentials"),console.log(` 2. Edit ${
|
|
483
|
-
`)[0]}catch{return null}}function
|
|
484
|
-
Please ensure you have a .env file in one of these locations:`),console.error(` - Project-specific: ${
|
|
584
|
+
\uD83D\uDCDD Next steps:`),console.log(` 1. Edit ${Z}`),console.log(" - Add your JIRA credentials"),console.log(` 2. Edit ${z} (optional)`),console.log(" - Configure per-project PR status transitions"),console.log(" 3. Run 'claude-intern <TASK-KEY>' to start working on tasks")}function d2(){let $=c0(process.cwd(),".claude-intern","settings.json");if(!j1($))return null;try{let Z=j6($,"utf8");return JSON.parse(Z)}catch(Z){return console.warn(`\u26A0\uFE0F Failed to parse settings.json: ${Z}`),null}}function W5($,Z){return Z?.projects?.[$]?.prStatus}function J5($,Z){return Z?.projects?.[$]?.inProgressStatus}function f2($,Z){return Z?.projects?.[$]?.todoStatus}function R9($){if($){let X=c0($);if(j1(X)){E9.config({path:X}),console.log(`\uD83D\uDCC1 Loaded environment from custom file: ${X}`);return}console.error(`\u274C Specified .env file not found: ${X}`),process.exit(1)}let Z=[c0(process.cwd(),".claude-intern",".env"),c0(process.cwd(),".env"),c0(process.env.HOME||"~",".env"),c0(u2,"..",".env")],Y=!1;for(let X of Z)if(j1(X)){E9.config({path:X}),Y=!0;break}if(!Y){let X=c0(process.cwd(),".env");if(j1(X))E9.config({path:X})}}if(process.argv[2]==="init")(async()=>{await G5(),process.exit(0)})();else if(process.argv[2]==="serve")(async()=>{R9();let $=process.argv.slice(3),Z=parseInt(process.env.WEBHOOK_PORT||"3000",10),Y=process.env.WEBHOOK_HOST||"0.0.0.0";for(let z=0;z<$.length;z++)if($[z]==="--port"&&$[z+1])Z=parseInt($[z+1],10),z++;else if($[z]==="--host"&&$[z+1])Y=$[z+1],z++;else if($[z]==="--help"||$[z]==="-h")console.log("Usage: claude-intern serve [options]"),console.log(""),console.log("Start the webhook server to automatically address PR review feedback"),console.log(""),console.log("Options:"),console.log(" --port <port> Port to listen on (default: 3000, or WEBHOOK_PORT env var)"),console.log(" --host <host> Host to bind to (default: 0.0.0.0, or WEBHOOK_HOST env var)"),console.log(" -h, --help Display this help message"),console.log(""),console.log("Environment variables:"),console.log(" WEBHOOK_SECRET (required) Secret for verifying GitHub webhook signatures"),console.log(" WEBHOOK_PORT Port to listen on (default: 3000)"),console.log(" WEBHOOK_HOST Host to bind to (default: 0.0.0.0)"),console.log(" WEBHOOK_AUTO_REPLY Set to 'true' to automatically reply to review comments"),console.log(" WEBHOOK_VALIDATE_IP Set to 'true' to only accept requests from GitHub IPs"),console.log(" WEBHOOK_DEBUG Set to 'true' for verbose logging"),console.log(""),console.log("See docs/WEBHOOK-DEPLOYMENT.md for deployment instructions."),process.exit(0);let{startWebhookServer:X}=await Promise.resolve().then(() => (b2(),w2));X({port:Z,host:Y})})();else if(process.argv[2]==="address-review")(async()=>{R9();let $=process.argv.slice(3),Z,Y=!1,X=!1,z=!1;for(let G=0;G<$.length;G++)if($[G]==="--no-push")Y=!0;else if($[G]==="--no-reply")X=!0;else if($[G]==="-v"||$[G]==="--verbose")z=!0;else if($[G]==="--help"||$[G]==="-h")console.log("Usage: claude-intern address-review <pr-url> [options]"),console.log(""),console.log("Manually address PR review feedback using Claude"),console.log(""),console.log("Arguments:"),console.log(" pr-url GitHub PR URL (e.g., https://github.com/owner/repo/pull/123)"),console.log(""),console.log("Options:"),console.log(" --no-push Don't push changes after fixing"),console.log(" --no-reply Don't post a reply comment on the PR"),console.log(" -v, --verbose Enable verbose logging"),console.log(" -h, --help Display this help message"),console.log(""),console.log("Examples:"),console.log(" claude-intern address-review https://github.com/owner/repo/pull/123"),console.log(" claude-intern address-review https://github.com/owner/repo/pull/123 --no-push"),process.exit(0);else if(!$[G].startsWith("-"))Z=$[G];if(!Z)console.error("\u274C Error: PR URL is required"),console.error(""),console.error("Usage: claude-intern address-review <pr-url>"),console.error("Run 'claude-intern address-review --help' for more information."),process.exit(1);let{addressReview:Q}=await Promise.resolve().then(() => (y2(),x2));try{await Q(Z,{noPush:Y,noReply:X,verbose:z})}catch(G){console.error(`\u274C Error: ${G.message}`),process.exit(1)}})();else R9();function k2($){try{let Y=process.platform==="win32"?"where":"which";return Y5(`${Y} ${$}`,{encoding:"utf8",stdio:"pipe"}).trim().split(`
|
|
585
|
+
`)[0]}catch{return null}}function c2($){let Z=$;if(!Z)Z=process.env.CLAUDE_CLI_PATH||"claude";if($&&$!=="claude"&&!$.includes("/")){let X=k2($);if(X)return X;return $}if(Z.startsWith("/")||Z.includes(":"))return Z;if(Z.includes("/")){let X=c0(process.cwd(),Z);if(j1(X))return X}let Y=k2(Z);if(Y)return Y;return Z}g8.name("claude-intern").description("Your AI intern for automatically implementing JIRA tasks using Claude. Supports single tasks, multiple tasks, or JQL queries for batch processing.").version(z5).argument("[task-keys...]","JIRA task key(s) (e.g., PROJ-123) or use --jql for query-based selection").option("--jql <query>",`JQL query to fetch multiple issues (e.g., "project = PROJ AND status = 'To Do'")`).option("--no-claude","Skip running Claude, just fetch and format the task").option("--claude-path <path>","Path to Claude CLI executable",c2()).option("--env-file <path>","Path to .env file").option("--no-git","Skip git branch creation").option("-v, --verbose","Verbose output").option("--max-turns <number>","Maximum number of turns for Claude","25").option("--no-auto-commit","Skip automatic git commit after Claude completes").option("--skip-clarity-check","Skip running Claude for clarity assessment").option("--create-pr","Create pull request after implementation").option("--pr-target-branch <branch>","Target branch for pull request","main").option("--auto-review","Run automatic PR review loop after creating PR (requires --create-pr)").option("--auto-review-iterations <number>","Maximum iterations for auto-review loop","5").option("--skip-jira-comments","Skip posting comments to JIRA (for testing)").option("--hook-retries <number>","Number of retry attempts for git hook failures","10");var dZ=["init","serve","address-review"].includes(process.argv[2]);if(!dZ)g8.parse();var i=dZ?{}:g8.opts(),h2=dZ?[]:g8.args;if(i.envFile)R9(i.envFile);else if(i.verbose)console.log("\u26A0\uFE0F No .env file found in standard locations"),console.log(" Checked:"),[c0(process.cwd(),".claude-intern",".env"),c0(process.cwd(),".env"),c0(process.env.HOME||"~",".env"),c0(u2,"..",".env")].forEach((Z)=>console.log(` - ${Z}`));var q6=c2(i.claudePath);if(i.verbose)console.log(`\uD83E\uDD16 Claude CLI path resolved to: ${q6}`);function l2(){let Z=["JIRA_BASE_URL","JIRA_EMAIL","JIRA_API_TOKEN"].filter((Y)=>!process.env[Y]);if(Z.length>0)console.error("\u274C Missing required environment variables:"),Z.forEach((Y)=>console.error(` - ${Y}`)),console.error(`
|
|
586
|
+
Please ensure you have a .env file in one of these locations:`),console.error(` - Project-specific: ${c0(process.cwd(),".claude-intern",".env")}`),console.error(` - Current directory: ${c0(process.cwd(),".env")}`),console.error(` - Home directory: ${c0(process.env.HOME||"~",".env")}`),console.error(`
|
|
485
587
|
Or specify a custom .env file with --env-file <path>`),console.error("Or set these environment variables in your shell."),console.error(`
|
|
486
|
-
\uD83D\uDCA1 Quick start: Run 'claude-intern init' to create project-specific configuration`),process.exit(1)}async function
|
|
487
|
-
\u23ED\uFE0F Skipping ${$} - incomplete implementation comment already exists`),console.log(" Task description hasn't changed since last incomplete attempt"),console.log(" Please update the task description with more details before retrying"),console.log(),Y>1)return;if(
|
|
488
|
-
\uD83D\uDCCB Task Summary:`),console.log(` Key: ${F.key}`),console.log(` Summary: ${F.summary}`),console.log(` Type: ${F.issueType}`),console.log(` Status: ${F.status}`),console.log(` Priority: ${F.priority||"Not specified"}`),console.log(` Assignee: ${F.assignee||"Unassigned"}`),
|
|
489
|
-
`)||[]).find((
|
|
490
|
-
\uD83D\uDCCE Downloading ${F.attachments.length} direct attachments...`),
|
|
491
|
-
\uD83D\uDD0D Scanning content for embedded attachments...`);let
|
|
492
|
-
\uD83D\uDCBE Saving formatted task details to: ${
|
|
493
|
-
\uD83C\uDF3F Creating feature branch...`);let
|
|
494
|
-
\u274C Failed to create feature branch: ${
|
|
588
|
+
\uD83D\uDCA1 Quick start: Run 'claude-intern init' to create project-specific configuration`),process.exit(1)}async function V5($,Z=0,Y=1){try{let X=Y>1?`[${Z+1}/${Y}] `:"";console.log(`${X}\uD83D\uDD0D Fetching JIRA task: ${$}`),l2();let z=new V6(process.env.JIRA_BASE_URL,process.env.JIRA_EMAIL,process.env.JIRA_API_TOKEN);if(i.verbose)console.log("\uD83D\uDCE5 Fetching issue details...");let Q=await z.getIssue($),G=d2(),V=$.split("-")[0];if(i.claude&&!i.skipJiraComments){console.log("\uD83D\uDD0D Checking for previous incomplete implementation attempts...");let{JiraExtractor:y}=await Promise.resolve().then(() => W6),v=y.extractTextFromADF(Q.fields?.description);if(await z.hasIncompleteImplementationComment($,v)){if(console.log(`
|
|
589
|
+
\u23ED\uFE0F Skipping ${$} - incomplete implementation comment already exists`),console.log(" Task description hasn't changed since last incomplete attempt"),console.log(" Please update the task description with more details before retrying"),console.log(),Y>1)return;if(U0)U0.release();process.exit(0)}}if(i.verbose)console.log("\uD83D\uDCAC Fetching comments...");console.log("\uD83D\uDCAC Fetching comments...");let _=await z.getIssueComments($);if(console.log(`\u2705 Successfully fetched ${_.length} comments`),i.verbose)console.log("\uD83D\uDD17 Extracting linked resources...");console.log("\uD83D\uDD17 Extracting linked resources...");let B=z.extractLinkedResources(Q);console.log(`\u2705 Successfully extracted ${B.length} linked resources`),console.log("\uD83D\uDD17 Fetching related work items...");let q=await z.getRelatedWorkItems(Q);console.log(`\u2705 Successfully fetched ${q.length} related work items`),console.log("\uD83D\uDCDD Formatting task details..."),console.log("\uD83D\uDD0D Issue structure:",JSON.stringify({key:Q.key,hasFields:!!Q.fields,fieldKeys:Q.fields?Object.keys(Q.fields):[],summary:Q.fields?.summary,issueType:Q.fields?.issuetype},null,2));let F;try{F=z.formatIssueDetails(Q,_,B,q),console.log("\u2705 Successfully formatted task details")}catch(y){throw console.error("\u274C Error formatting task details:",y),y}if(console.log(`
|
|
590
|
+
\uD83D\uDCCB Task Summary:`),console.log(` Key: ${F.key}`),console.log(` Summary: ${F.summary}`),console.log(` Type: ${F.issueType}`),console.log(` Status: ${F.status}`),console.log(` Priority: ${F.priority||"Not specified"}`),console.log(` Assignee: ${F.assignee||"Unassigned"}`),B.length>0){if(console.log(` Linked Resources: ${B.length} found`),i.verbose)B.forEach((y)=>{if(y.url)console.log(` - ${y.description}: ${y.url}`);else if(y.issueKey)console.log(` - ${y.linkType}: ${y.issueKey}`)})}if(q.length>0){if(console.log(` Related Work Items: ${q.length} found`),i.verbose)q.forEach((y)=>{console.log(` - ${y.linkType}: ${y.key} - ${y.summary} (${y.status})`)})}if(_.length>0)console.log(` Comments: ${_.length} found`);let M=i.prTargetBranch,{JiraExtractor:H}=await Promise.resolve().then(() => W6),O=H.extractTextFromADF(Q.fields?.description),D=I.extractTargetBranch(O);if(D){if(console.log(` \uD83C\uDFAF Detected target branch from description: ${D}`),i.verbose){let v=(O?.split(`
|
|
591
|
+
`)||[]).find(($0)=>$0.toLowerCase().includes("target branch")||$0.toLowerCase().includes("base branch"));if(v)console.log(` Context: "${v.substring(0,100)}${v.length>100?"...":""}"`)}M=D}else console.log(` \uD83C\uDFAF Using target branch: ${M} (from CLI option)`);let T=process.env.CLAUDE_INTERN_OUTPUT_DIR||"/tmp/claude-intern-tasks",g=S0(T,$.toLowerCase()),C="task-details.md";p2(g,{recursive:!0});let f=S0(g,C),s=S0(g,"attachments"),N;if(F.attachments.length>0)console.log(`
|
|
592
|
+
\uD83D\uDCCE Downloading ${F.attachments.length} direct attachments...`),N=await z.downloadIssueAttachments($,s);else N=new Map;console.log(`
|
|
593
|
+
\uD83D\uDD0D Scanning content for embedded attachments...`);let w="";if(F.renderedDescription)w+=F.renderedDescription;if(F.comments.forEach((y)=>{if(y.renderedBody)w+=y.renderedBody}),q.forEach((y)=>{if(y.renderedDescription)w+=y.renderedDescription}),w)N=await z.downloadAttachmentsFromContent(w,s,N);if(N.size>0)console.log(`\u2705 Downloaded ${N.size} total attachments to: ${s}`);if(console.log(`
|
|
594
|
+
\uD83D\uDCBE Saving formatted task details to: ${f}`),M9.saveFormattedTask(F,f,process.env.JIRA_BASE_URL,N),i.claude){if(i.git){console.log(`
|
|
595
|
+
\uD83C\uDF3F Creating feature branch...`);let v=await I.createFeatureBranch($,M);if(v.success)console.log(`\u2705 ${v.message}`);else{if(console.error(`
|
|
596
|
+
\u274C Failed to create feature branch: ${v.message}`),v.message.includes("uncommitted changes"))console.error("Please commit or stash your changes before running claude-intern."),console.error('You can use: git add . && git commit -m "your commit message"');else console.error("Cannot proceed without a feature branch to prevent accidental commits to main/master."),console.error(`
|
|
495
597
|
Please create a feature branch manually:`),console.error(` git checkout -b feature/${$.toLowerCase()}`),console.error(`
|
|
496
|
-
Then run claude-intern again with --no-git flag:`),console.error(` claude-intern ${$} --no-git`);if(
|
|
497
|
-
\uD83D\uDD0D Running basic feasibility assessment...`),console.log(" (Checking for fundamental requirements only - technical details will be inferred from code)");let{tmpdir:
|
|
498
|
-
\u26A0\uFE0F Task ${$} failed clarity assessment but continuing with batch processing...`);else{if(
|
|
499
|
-
\uD83D\uDD04 Transitioning ${$} to '${
|
|
500
|
-
\uD83E\uDD16 Running Claude with task details...`),await
|
|
501
|
-
\u2705 Task details saved. You can now:`),console.log(" 1. Create a feature branch manually:"),console.log(` git checkout -b feature/${$.toLowerCase()}`),console.log(" 2. Run clarity check:"),console.log(` ${
|
|
502
|
-
Or run this script again with the same task key to automatically create the branch, run clarity check, invoke Claude, and commit changes.`)}catch(
|
|
503
|
-
\uD83D\uDCE5 Pulling latest changes from remote...`);let
|
|
504
|
-
`)}let Z=[];if(
|
|
598
|
+
Then run claude-intern again with --no-git flag:`),console.error(` claude-intern ${$} --no-git`);if(U0)U0.release();process.exit(1)}}if(!i.skipClarityCheck){console.log(`
|
|
599
|
+
\uD83D\uDD0D Running basic feasibility assessment...`),console.log(" (Checking for fundamental requirements only - technical details will be inferred from code)");let{tmpdir:v}=T0("os"),$0=S0(v(),`clarity-${$.toLowerCase()}-${Date.now()}.md`);M9.saveClarityAssessment(F,$0,process.env.JIRA_BASE_URL,N);try{let x0=await H5($0,q6,$,z,i.skipJiraComments);if(x0&&!x0.isImplementable)if(Y>1)console.log(`
|
|
600
|
+
\u26A0\uFE0F Task ${$} failed clarity assessment but continuing with batch processing...`);else{if(U0)U0.release();process.exit(1)}try{T0("fs").unlinkSync($0)}catch(S){}}catch(x0){console.warn("\u26A0\uFE0F Feasibility check failed, continuing with implementation:",x0),console.log(" You can skip feasibility checks with --skip-clarity-check");try{T0("fs").unlinkSync($0)}catch(S){}}}if(!i.skipJiraComments){let v=J5(V,G);if(v&&v.trim())try{console.log(`
|
|
601
|
+
\uD83D\uDD04 Transitioning ${$} to '${v}'...`),await z.transitionIssue($,v.trim()),console.log(`\u2705 Task moved to '${v}'`)}catch($0){console.warn(`\u26A0\uFE0F Failed to transition task to '${v}': ${$0.message}`),console.log(" Continuing with task processing...")}}let y;if(i.git&&i.autoCommit&&!process.env.GITHUB_TOKEN){let v=e0.fromEnvironment();if(v)try{y=await v.getGitAuthor(),console.log(`\uD83E\uDD16 Commits will be authored by: ${y.name}`)}catch($0){console.warn(`\u26A0\uFE0F Could not get GitHub App author info: ${$0.message}`),console.log(" Commits will use local git config instead.")}}console.log(`
|
|
602
|
+
\uD83E\uDD16 Running Claude with task details...`),await K5(f,q6,Number.parseInt(i.maxTurns),$,F.summary,i.git&&i.autoCommit,Q,i.createPr,M,z,i.skipJiraComments,Number.parseInt(i.hookRetries),G,y,i.autoReview,Number.parseInt(i.autoReviewIterations))}else console.log(`
|
|
603
|
+
\u2705 Task details saved. You can now:`),console.log(" 1. Create a feature branch manually:"),console.log(` git checkout -b feature/${$.toLowerCase()}`),console.log(" 2. Run clarity check:"),console.log(` ${q6} -p --dangerously-skip-permissions --max-turns 10 < ${f.replace(".md","-clarity.md")}`),console.log(" 3. Run Claude:"),console.log(` ${q6} -p --dangerously-skip-permissions --max-turns ${i.maxTurns} < ${f}`),console.log(" 4. Commit changes:"),console.log(' git add . && git commit -m "feat: implement task"'),console.log(`
|
|
604
|
+
Or run this script again with the same task key to automatically create the branch, run clarity check, invoke Claude, and commit changes.`)}catch(X){let z=X,Q=Y>1?`[${Z+1}/${Y}] `:"";if(console.error(`${Q}\u274C Error processing ${$}: ${z.message}`),i.verbose&&z.stack)console.error(z.stack);if(Y>1)throw X;process.exit(1)}}var U0=null;async function _5(){try{U0=new PZ;let $=U0.acquire();if(!$.success){if(console.error(`\u274C ${$.message}`),console.error(" Please wait for the other instance to complete or stop it manually."),$.pid)console.error(` You can stop the other instance with: kill ${$.pid}`);process.exit(1)}if(l2(),i.git){console.log(`
|
|
605
|
+
\uD83D\uDCE5 Pulling latest changes from remote...`);let X=await I.pullLatestChanges(i.prTargetBranch,{verbose:i.verbose});if(X.success)console.log(`\u2705 ${X.message}`);else console.log(`\u26A0\uFE0F ${X.message}`),console.log(" Continuing without pulling latest changes..."),console.log(` You may want to pull manually before processing tasks.
|
|
606
|
+
`)}let Z=[];if(i.jql){console.log(`\uD83D\uDD0D Searching JIRA with JQL: ${i.jql}`);let z=await new V6(process.env.JIRA_BASE_URL,process.env.JIRA_EMAIL,process.env.JIRA_API_TOKEN).searchIssues(i.jql);if(z.issues.length===0){console.log("\u26A0\uFE0F No issues found matching the JQL query");return}Z=z.issues.map((Q)=>Q.key),console.log(`\uD83D\uDCCB Found ${Z.length} tasks to process: ${Z.join(", ")}`)}else if(h2.length>0)Z=h2,console.log(`\uD83D\uDCCB Processing ${Z.length} task(s): ${Z.join(", ")}`);else console.error("\u274C Error: No tasks specified. Provide task keys as arguments or use --jql option."),console.error(" Examples:"),console.error(" claude-intern PROJ-123"),console.error(" claude-intern PROJ-123 PROJ-124 PROJ-125"),console.error(` claude-intern --jql "project = PROJ AND status = 'To Do'"`),process.exit(1);let Y={total:Z.length,successful:0,failed:0,errors:[]};for(let X=0;X<Z.length;X++){let z=Z[X];try{if(await V5(z,X,Z.length),Y.successful++,X<Z.length-1)console.log(`
|
|
505
607
|
`+"=".repeat(80)),console.log(`\u23ED\uFE0F Moving to next task...
|
|
506
|
-
`)}catch(Q){Y.failed++,Y.errors.push({taskKey:
|
|
608
|
+
`)}catch(Q){Y.failed++,Y.errors.push({taskKey:z,error:Q.message}),console.log(`\u26A0\uFE0F Continuing with remaining tasks...
|
|
507
609
|
`)}}if(Z.length>1){if(console.log(`
|
|
508
610
|
`+"=".repeat(80)),console.log("\uD83D\uDCCA Batch Processing Summary:"),console.log(` Total tasks: ${Y.total}`),console.log(` \u2705 Successful: ${Y.successful}`),console.log(` \u274C Failed: ${Y.failed}`),Y.errors.length>0)console.log(`
|
|
509
|
-
\u274C Failed tasks:`),Y.errors.forEach(({taskKey:
|
|
510
|
-
Please install Claude CLI or specify the correct path with --claude-path`));else G(new Error(`Failed to run Claude clarity check: ${F.message}`))}),q.on("close",async(F)=>{if(F===0)try{let
|
|
611
|
+
\u274C Failed tasks:`),Y.errors.forEach(({taskKey:X,error:z})=>{console.log(` - ${X}: ${z}`)});if(Y.failed>0){if(U0)U0.release();process.exit(1)}}if(U0)U0.release()}catch($){let Z=$;if(console.error(`\u274C Error: ${Z.message}`),i.verbose&&Z.stack)console.error(Z.stack);if(U0)U0.release();process.exit(1)}}async function H5($,Z,Y,X,z=!1){return new Promise((Q,G)=>{if(!j1($)){G(new Error(`Clarity assessment file not found: ${$}`));return}let V=j6($,"utf8");console.log("\uD83D\uDD0D Running feasibility assessment with Claude..."),console.log(` Command: ${Z} -p --dangerously-skip-permissions --max-turns 10`),console.log(` Input: ${$}`);let _="",B="",q=uZ(Z,["-p","--dangerously-skip-permissions","--max-turns","10"],{stdio:["pipe","pipe","pipe"]});if(q.stdout)q.stdout.on("data",(F)=>{_+=F.toString()});if(q.stderr)q.stderr.on("data",(F)=>{B+=F.toString()});if(q.on("error",(F)=>{if(F.code==="ENOENT")G(new Error(`Claude CLI not found at: ${Z}
|
|
612
|
+
Please install Claude CLI or specify the correct path with --claude-path`));else G(new Error(`Failed to run Claude clarity check: ${F.message}`))}),q.on("close",async(F)=>{if(F===0)try{let M=B5(_);try{let H=process.env.CLAUDE_INTERN_OUTPUT_DIR||"/tmp/claude-intern-tasks",O=S0(H,Y.toLowerCase()),D=S0(O,"feasibility-assessment.md"),T=`# Feasibility Assessment Results
|
|
511
613
|
|
|
512
|
-
`;if(
|
|
513
|
-
`,
|
|
614
|
+
`;if(T+=`**Status**: ${M.isImplementable?"\u2705 Implementable":"\u274C Not Implementable"}
|
|
615
|
+
`,T+=`**Clarity Score**: ${M.clarityScore}/10
|
|
514
616
|
|
|
515
|
-
`,
|
|
617
|
+
`,T+=`## Summary
|
|
516
618
|
|
|
517
|
-
${
|
|
619
|
+
${M.summary}
|
|
518
620
|
|
|
519
|
-
`,
|
|
621
|
+
`,M.issues.length>0)T+=`## Issues
|
|
520
622
|
|
|
521
|
-
`,
|
|
623
|
+
`,M.issues.forEach((g)=>{let C=g.severity==="critical"?"\uD83D\uDD34":g.severity==="major"?"\uD83D\uDFE1":"\uD83D\uDD35";T+=`### ${C} ${g.category} (${g.severity})
|
|
522
624
|
|
|
523
|
-
`,
|
|
625
|
+
`,T+=`${g.description}
|
|
524
626
|
|
|
525
|
-
`});if(
|
|
627
|
+
`});if(M.recommendations.length>0)T+=`## Recommendations
|
|
526
628
|
|
|
527
|
-
`,
|
|
528
|
-
`}),
|
|
529
|
-
`;
|
|
629
|
+
`,M.recommendations.forEach((g,C)=>{T+=`${C+1}. ${g}
|
|
630
|
+
`}),T+=`
|
|
631
|
+
`;T+=`## Raw JSON
|
|
530
632
|
|
|
531
633
|
\`\`\`json
|
|
532
|
-
${JSON.stringify(
|
|
634
|
+
${JSON.stringify(M,null,2)}
|
|
533
635
|
\`\`\`
|
|
534
|
-
`,
|
|
535
|
-
\uD83D\uDCBE Saved feasibility assessment to: ${
|
|
536
|
-
\u2705 Task feasibility assessment passed`),console.log(`\uD83D\uDCCA Clarity Score: ${
|
|
537
|
-
\uD83D\uDCAC Posting feasibility assessment to JIRA...`),await
|
|
636
|
+
`,q1(D,T,"utf8"),console.log(`
|
|
637
|
+
\uD83D\uDCBE Saved feasibility assessment to: ${D}`)}catch(H){console.warn(`\u26A0\uFE0F Failed to save feasibility assessment: ${H}`)}if(M.isImplementable){if(console.log(`
|
|
638
|
+
\u2705 Task feasibility assessment passed`),console.log(`\uD83D\uDCCA Clarity Score: ${M.clarityScore}/10 (threshold: 4/10)`),console.log(`\uD83D\uDCDD Summary: ${M.summary}`),M.clarityScore<7)console.log("\uD83D\uDCA1 Note: Some details may need to be inferred from existing codebase");if(!z)console.log(`
|
|
639
|
+
\uD83D\uDCAC Posting feasibility assessment to JIRA...`),await v2(X,Y,M);else console.log(`
|
|
538
640
|
\u23ED\uFE0F Skipping feasibility assessment JIRA comment (--skip-jira-comments)`)}else{if(console.log(`
|
|
539
|
-
\u274C Task feasibility assessment failed`),console.log(`\uD83D\uDCCA Clarity Score: ${
|
|
540
|
-
\uD83D\uDEA8 Critical issues identified:`),
|
|
541
|
-
\uD83D\uDCA1 Recommendations:`),
|
|
641
|
+
\u274C Task feasibility assessment failed`),console.log(`\uD83D\uDCCA Clarity Score: ${M.clarityScore}/10 (threshold: 4/10)`),console.log(`\uD83D\uDCDD Summary: ${M.summary}`),M.issues.length>0)console.log(`
|
|
642
|
+
\uD83D\uDEA8 Critical issues identified:`),M.issues.forEach((H)=>{let O=H.severity==="critical"?"\uD83D\uDD34":H.severity==="major"?"\uD83D\uDFE1":"\uD83D\uDD35";console.log(` ${O} ${H.category}: ${H.description}`)});if(M.recommendations.length>0)console.log(`
|
|
643
|
+
\uD83D\uDCA1 Recommendations:`),M.recommendations.forEach((H,O)=>{console.log(` ${O+1}. ${H}`)});if(!z)await v2(X,Y,M);else console.log(`
|
|
542
644
|
\u23ED\uFE0F Skipping failed assessment JIRA comment (--skip-jira-comments)`);console.log(`
|
|
543
|
-
\uD83D\uDED1 Stopping execution - fundamental requirements unclear`),console.log(" Please address the critical issues and run again"),console.log(" Or use --skip-clarity-check to bypass this assessment")}Q(
|
|
544
|
-
\uD83D\uDCBE Saved failed assessment output to: ${
|
|
545
|
-
\u26A0\uFE0F Clarity assessment reached maximum conversation turns`),console.log(" This may indicate task complexity or insufficient details"),!
|
|
546
|
-
`);try{await
|
|
645
|
+
\uD83D\uDED1 Stopping execution - fundamental requirements unclear`),console.log(" Please address the critical issues and run again"),console.log(" Or use --skip-clarity-check to bypass this assessment")}Q(M)}catch(M){console.warn("Failed to parse clarity assessment response:",M),console.log("Raw Claude output:",_);try{let H=process.env.CLAUDE_INTERN_OUTPUT_DIR||"/tmp/claude-intern-tasks",O=S0(H,Y.toLowerCase()),D=S0(O,"feasibility-assessment-failed.txt");q1(D,_,"utf8"),console.log(`
|
|
646
|
+
\uD83D\uDCBE Saved failed assessment output to: ${D}`)}catch(H){console.warn(`\u26A0\uFE0F Failed to save assessment output: ${H}`)}if(_.includes("Reached max turns")||_.includes("max-turns"))if(console.log(`
|
|
647
|
+
\u26A0\uFE0F Clarity assessment reached maximum conversation turns`),console.log(" This may indicate task complexity or insufficient details"),!z){console.log(` Will attempt to proceed with implementation but posting failure to JIRA...
|
|
648
|
+
`);try{await g2(X,Y,"max-turns",_)}catch(H){console.warn("Failed to post assessment failure to JIRA:",H)}}else console.log(` Will attempt to proceed with implementation (skipping JIRA comment)...
|
|
547
649
|
`);else if(console.log(`
|
|
548
|
-
\u26A0\uFE0F Could not parse clarity assessment response`),!
|
|
549
|
-
`);try{await
|
|
550
|
-
`);Q(null)}else G(new Error(`Claude clarity check exited with code ${F}`))}),q.stdin)q.stdin.write(
|
|
650
|
+
\u26A0\uFE0F Could not parse clarity assessment response`),!z){console.log(` Will attempt to proceed with implementation but posting failure to JIRA...
|
|
651
|
+
`);try{await g2(X,Y,"parse-error",_)}catch(H){console.warn("Failed to post assessment failure to JIRA:",H)}}else console.log(` Will attempt to proceed with implementation (skipping JIRA comment)...
|
|
652
|
+
`);Q(null)}else G(new Error(`Claude clarity check exited with code ${F}`))}),q.stdin)q.stdin.write(V),q.stdin.end()})}function B5($){let Z=$.match(/```json\s*([\s\S]*?)\s*```/);if(!Z){if($.includes("Reached max turns")||$.includes("max-turns"))throw new Error("warn: Claude reached max turns - no JSON assessment available");if($.trim().length===0)throw new Error("warn: Empty response from Claude");throw new Error("warn: No JSON found in Claude response")}try{let Y=JSON.parse(Z[1]);if(typeof Y.isImplementable!=="boolean"||typeof Y.clarityScore!=="number"||!Array.isArray(Y.issues)||!Array.isArray(Y.recommendations)||typeof Y.summary!=="string")throw new Error("warn: Invalid assessment structure - missing required fields");return Y}catch(Y){if(Y instanceof SyntaxError)throw new Error(`warn: Malformed JSON in Claude response: ${Y.message}`);throw new Error(`warn: Failed to parse assessment: ${Y}`)}}async function pZ($,Z,Y){try{await new V6(process.env.JIRA_BASE_URL,process.env.JIRA_EMAIL,process.env.JIRA_API_TOKEN).postImplementationComment($,Z,Y),console.log(`\u2705 Implementation summary posted to ${$}`)}catch(X){throw new Error(`Failed to post implementation comment: ${X}`)}}async function g2($,Z,Y,X){try{let z=Y==="max-turns",Q={body:{type:"doc",version:1,content:[{type:"panel",attrs:{panelType:"warning"},content:[{type:"paragraph",content:[{type:"text",text:"\uD83E\uDD16 Claude Intern - Feasibility Assessment Failed",marks:[{type:"strong"}]}]},{type:"paragraph",content:[{type:"text",text:z?"\u26A0\uFE0F Assessment reached maximum conversation turns before completion":"\u26A0\uFE0F Could not parse feasibility assessment response"}]},{type:"paragraph",content:[{type:"text",text:"\uD83D\uDCCB ",marks:[{type:"strong"}]},{type:"text",text:"What this means:",marks:[{type:"strong"}]}]},...z?[{type:"bulletList",content:[{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:"\uD83E\uDDE9 ",marks:[{type:"strong"}]},{type:"text",text:"Task complexity: ",marks:[{type:"strong"}]},{type:"text",text:"The task may involve multiple complex components or interdependencies that require extensive analysis"}]}]},{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:"\uD83D\uDCDD ",marks:[{type:"strong"}]},{type:"text",text:"Insufficient details: ",marks:[{type:"strong"}]},{type:"text",text:"The task description may lack specific requirements, acceptance criteria, or technical specifications"}]}]},{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:"\uD83D\uDD0D ",marks:[{type:"strong"}]},{type:"text",text:"Context discovery: ",marks:[{type:"strong"}]},{type:"text",text:"Extensive codebase exploration was needed to understand existing patterns and architecture"}]}]}]},{type:"paragraph",content:[{type:"text",text:"\uD83D\uDE80 ",marks:[{type:"strong"}]},{type:"text",text:"Next steps:",marks:[{type:"strong"}]}]},{type:"bulletList",content:[{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:"Implementation will proceed with available information"}]}]},{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:"Additional clarification may be requested during development"}]}]},{type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:"Consider adding more specific acceptance criteria for future similar tasks"}]}]}]}]:[{type:"paragraph",content:[{type:"text",text:"The AI assessment tool encountered an unexpected response format. Implementation will proceed but may require manual review of results."}]}]]}]}};await $.jiraApiCall("POST",`/rest/api/3/issue/${Z}/comment`,Q)}catch(z){console.warn("Failed to post assessment failure to JIRA:",z)}}async function v2($,Z,Y){try{await $.postClarityComment(Z,Y)}catch(X){console.warn("Failed to post clarity comment to JIRA:",X)}}function mZ($,Z,Y,X,z){try{let Q=process.env.CLAUDE_INTERN_OUTPUT_DIR||"/tmp/claude-intern-tasks",G=S0(Q,$.toLowerCase()),V=S0(G,"git-hook-errors.log"),_=new Date().toISOString(),B=z?"FIXED":"FAILED",q=`
|
|
551
653
|
${"=".repeat(80)}
|
|
552
654
|
Timestamp: ${_}
|
|
553
655
|
Hook Type: ${Z}
|
|
554
656
|
Attempt: ${Y}
|
|
555
|
-
Status: ${
|
|
657
|
+
Status: ${B}
|
|
556
658
|
Error:
|
|
557
|
-
${
|
|
659
|
+
${X}
|
|
558
660
|
${"=".repeat(80)}
|
|
559
|
-
`,F=
|
|
560
|
-
|
|
561
|
-
`;
|
|
562
|
-
|
|
563
|
-
Please
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
661
|
+
`,F=j1(V)?j6(V,"utf8"):`# Git Hook Errors Log
|
|
662
|
+
|
|
663
|
+
`;q1(V,F+q,"utf8"),console.log(`\uD83D\uDCBE Hook error logged to: ${V}`)}catch(Q){console.warn(`\u26A0\uFE0F Failed to save hook error to file: ${Q}`)}}function q5($){if(![/I'?ve created (a|an|the) (comprehensive )?(implementation )?plan/i,/created a plan for/i,/plan has been created/i,/implementation plan is (now )?ready/i,/drafted a plan/i,/wrote out a plan/i].some((z)=>z.test($)))return null;let X=[/(?:available at|saved to:?)\s*[`"]?((?:\/[^\s`"]+|~\/\.claude\/plans\/[^\s`"]+)\.md)[`"]?/i,/[`"]((?:\/home\/[^\s`"]+|~)\/\.claude\/plans\/[^\s`"]+\.md)[`"]/,/(\/home\/[^\s]+\/\.claude\/plans\/[^\s]+\.md)/];for(let z of X){let Q=$.match(z);if(Q&&Q[1]){let G=Q[1];if(G.startsWith("~")){let V=process.env.HOME||"/tmp";G=G.replace("~",V)}return G}}return"PLAN_DETECTED_NO_PATH"}function j5($,Z){return`${$&&$!=="PLAN_DETECTED_NO_PATH"?`You previously created an implementation plan at: ${$}
|
|
664
|
+
|
|
665
|
+
Please read this plan file and implement it NOW. Do not create another plan - actually write the code and make the changes described in the plan.`:`You previously created an implementation plan but did not implement it.
|
|
666
|
+
|
|
667
|
+
Please implement the task NOW. Do not just plan or describe what needs to be done - actually write the code and make the changes.`}
|
|
668
|
+
|
|
669
|
+
IMPORTANT: You MUST actually implement the changes, not just plan them. Create/modify files as needed. Do not exit until actual code changes have been made.
|
|
670
|
+
|
|
671
|
+
For reference, here is the original task:
|
|
672
|
+
---
|
|
673
|
+
${Z}
|
|
674
|
+
---
|
|
675
|
+
|
|
676
|
+
Now implement the solution. Write the actual code.`}async function K5($,Z,Y=25,X,z,Q=!0,G,V=!1,_="main",B,q=!1,F=10,M=null,H,O=!1,D=5,T=!1){return new Promise((g,C)=>{if(!j1($)){C(new Error(`Task file not found: ${$}`));return}let f=d2(),s=j6($,"utf8");console.log("\uD83D\uDE80 Launching Claude..."),console.log(` Command: ${Z} -p --dangerously-skip-permissions --max-turns ${Y} --verbose`),console.log(` Input: ${$}`),console.log(" Output: All Claude output will be displayed below in real-time"),console.log(`
|
|
677
|
+
`+"=".repeat(60));let N="",w="",y=uZ(Z,["-p","--dangerously-skip-permissions","--max-turns",Y.toString()],{stdio:["pipe","pipe","pipe"]});if(y.stdout)y.stdout.on("data",(v)=>{let $0=v.toString();w+=$0,process.stdout.write($0)});if(y.stderr)y.stderr.on("data",(v)=>{let $0=v.toString();N+=$0,process.stderr.write($0)});if(y.on("error",(v)=>{if(v.code==="ENOENT")C(new Error(`Claude CLI not found at: ${Z}
|
|
678
|
+
Please install Claude CLI or specify the correct path with --claude-path`));else C(new Error(`Failed to run Claude: ${v.message}`))}),y.on("close",async(v)=>{if(console.log(`
|
|
679
|
+
`+"=".repeat(60)),N.includes("Reached max turns")||N.includes("max turns reached")||N.includes("maximum turns reached")){if(console.log("\u26A0\uFE0F Claude reached maximum turns limit without completing the task"),console.log(" The task may be too complex or require more turns to complete"),console.log(" Consider breaking it into smaller tasks or increasing the max-turns limit"),X&&w.trim())try{let E0=process.env.CLAUDE_INTERN_OUTPUT_DIR||"/tmp/claude-intern-tasks",A0=S0(E0,X.toLowerCase()),K=S0(A0,"implementation-summary-incomplete.md");if(q1(K,w,"utf8"),console.log(`
|
|
680
|
+
\uD83D\uDCBE Saved incomplete implementation to: ${K}`),B&&!q&&G)try{let{JiraExtractor:P}=B7(W6),b=P.extractTextFromADF(G.fields?.description);await B.postIncompleteImplementationComment(X,w,z,b)}catch(P){console.warn(`\u26A0\uFE0F Failed to post incomplete implementation comment to JIRA: ${P}`)}if(B&&!q&&X&&f){let P=X.split("-")[0],b=f2(P,f);if(b&&b.trim())try{console.log(`
|
|
681
|
+
\uD83D\uDD04 Moving ${X} back to '${b}' due to max turns reached...`),await B.transitionIssue(X,b.trim()),console.log(`\u2705 Task moved to '${b}'`)}catch(r){console.warn(`\u26A0\uFE0F Failed to transition task to '${b}': ${r.message}`)}}}catch(E0){console.warn(`\u26A0\uFE0F Failed to save implementation summary: ${E0}`)}console.log(`
|
|
682
|
+
\u23ED\uFE0F Skipping commit and moving to next task (if any)...`),g();return}let x0=N.includes("Error:")&&!N.includes("Reached max turns"),S=/I (?:was unable to|cannot|could not|failed to)/i.test(w)||w.includes("implementation was unsuccessful")||w.includes("failed to implement")||w.includes("I apologize, but I");if(v===0){let E0=w.trim().length<100,A0=x0||S||E0;if(X&&w.trim())try{let K=process.env.CLAUDE_INTERN_OUTPUT_DIR||"/tmp/claude-intern-tasks",P=S0(K,X.toLowerCase()),b=S0(P,A0?"implementation-summary-incomplete.md":"implementation-summary.md");q1(b,w,"utf8"),console.log(`
|
|
683
|
+
\uD83D\uDCBE Saved implementation summary to: ${b}`)}catch(K){console.warn(`\u26A0\uFE0F Failed to save implementation summary: ${K}`)}if(A0){if(console.log("\u26A0\uFE0F Claude execution completed but appears to be incomplete or failed"),console.log(" Check the output above for specific issues"),console.log(`
|
|
684
|
+
\u23ED\uFE0F Skipping commit and moving to next task (if any)...`),B&&!q&&X&&w.trim()&&G)try{let{JiraExtractor:K}=B7(W6),P=K.extractTextFromADF(G.fields?.description);await B.postIncompleteImplementationComment(X,w,z,P)}catch(K){console.warn(`\u26A0\uFE0F Failed to post incomplete implementation comment to JIRA: ${K}`)}if(B&&!q&&X&&f){let K=X.split("-")[0],P=f2(K,f);if(P&&P.trim())try{console.log(`
|
|
685
|
+
\uD83D\uDD04 Moving ${X} back to '${P}' due to incomplete implementation...`),await B.transitionIssue(X,P.trim()),console.log(`\u2705 Task moved to '${P}'`)}catch(b){console.warn(`\u26A0\uFE0F Failed to transition task to '${P}': ${b.message}`)}}g();return}else console.log("\u2705 Claude execution completed successfully");if(Q&&X&&z)console.log(`
|
|
686
|
+
\uD83D\uDCDD Committing changes...`),(async()=>{let P=0;while(P<=F){P++;let b=await I.commitChanges(X,z,{verbose:i.verbose,author:H});if(b.success)return console.log(`\u2705 ${b.message}`),{success:!0,result:b};if(b.hookError&&P<=F){console.log(`
|
|
687
|
+
\u26A0\uFE0F Git hook failed (attempt ${P}/${F+1})`);let r=await B1("commit",Z,Y);if(mZ(X,"commit",P,b.hookError,r),r){console.log(`
|
|
573
688
|
\uD83D\uDD04 Retrying commit after Claude fixed the issues...`);continue}else return console.log(`
|
|
574
|
-
\u274C Could not fix git hook errors automatically`),{success:!1,result:
|
|
575
|
-
\u274C Max retries (${F}) exceeded for git hook fixes`);return console.log(`\u26A0\uFE0F ${
|
|
576
|
-
\uD83D\
|
|
577
|
-
\
|
|
689
|
+
\u274C Could not fix git hook errors automatically`),{success:!1,result:b}}else{if(P>F)console.log(`
|
|
690
|
+
\u274C Max retries (${F}) exceeded for git hook fixes`);return console.log(`\u26A0\uFE0F ${b.message}`),{success:!1,result:b}}}return{success:!1,result:{message:"Max retries exceeded"}}})().then(async({success:P,result:b})=>{if(!P){let r=b.message==="No changes to commit",H0=r?q5(w):null;if(r&&H0&&!T){if(console.log(`
|
|
691
|
+
\uD83D\uDD04 Claude created a plan but didn't implement it. Re-running to execute the plan...`),H0!=="PLAN_DETECTED_NO_PATH")console.log(` Plan file detected: ${H0}`);let X0=j5(H0,s),d=uZ(Z,["-p","--dangerously-skip-permissions","--max-turns",Y.toString()],{stdio:["pipe","pipe","pipe"]}),B0="",K0="";if(d.stdout)d.stdout.on("data",(o)=>{let A=o.toString();B0+=A,process.stdout.write(A)});if(d.stderr)d.stderr.on("data",(o)=>{let A=o.toString();K0+=A,process.stderr.write(A)});if(d.stdin)d.stdin.write(X0),d.stdin.end();d.on("close",async(o)=>{if(console.log(`
|
|
692
|
+
`+"=".repeat(60)),o===0){if(console.log("\u2705 Plan implementation completed"),X&&B0.trim())try{let Z0=S0(m2($),"implementation-summary.md");q1(Z0,`# Plan Implementation Output
|
|
693
|
+
|
|
694
|
+
${B0}`,"utf8"),console.log(`
|
|
695
|
+
\uD83D\uDCBE Updated implementation summary: ${Z0}`)}catch(Z0){console.warn(`\u26A0\uFE0F Failed to save implementation summary: ${Z0}`)}console.log(`
|
|
696
|
+
\uD83D\uDCDD Committing plan implementation changes...`);let A=await I.commitChanges(X,z,{verbose:i.verbose,author:H});if(A.success){if(console.log(`\u2705 ${A.message}`),V&&G){console.log(`
|
|
697
|
+
\uD83D\uDCE4 Pushing branch to remote...`);let Z0=await I.executeGitCommand(["push","-u","origin","HEAD"],{verbose:i.verbose});if(Z0.success){if(console.log("\u2705 Branch pushed successfully"),B&&!q&&B0.trim())try{await pZ(X,B0,z)}catch(R0){console.warn(`\u26A0\uFE0F Failed to post implementation comment: ${R0}`)}}else console.log(`\u26A0\uFE0F Failed to push: ${Z0.error}`)}}else console.log(`\u26A0\uFE0F ${A.message}`),console.log('You can commit changes manually with: git add . && git commit -m "feat: implement task"')}else console.log("\u26A0\uFE0F Plan implementation failed");g()}),d.on("error",(o)=>{console.error(`\u274C Failed to re-run Claude: ${o.message}`),g()});return}console.log('You can commit changes manually with: git add . && git commit -m "feat: implement task"'),g();return}if(V&&G){let r=async(o)=>{let A=0;while(A<=F){A++;let Z0=await I.runPrePushHookLocally({verbose:i.verbose});if(Z0.success){if(A===1)console.log(`\u2705 ${Z0.message}`);else console.log(`\u2705 Pre-push hook passed after ${A} attempt(s)`);return{success:!0,result:Z0}}if(Z0.hookError&&A<=F){console.log(`
|
|
698
|
+
\u26A0\uFE0F Pre-push hook failed during ${o} (attempt ${A}/${F+1})`);let R0=await B1("push",Z,Y);if(mZ(X,"push-local-validation",A,Z0.hookError,R0),R0){console.log(`
|
|
699
|
+
\uD83D\uDD04 Retrying local hook validation after Claude fixed the issues...`);continue}else return console.log(`
|
|
700
|
+
\u274C Could not fix pre-push hook errors automatically`),{success:!1,result:Z0}}else{if(A>F)console.log(`
|
|
701
|
+
\u274C Max retries (${F}) exceeded for pre-push hook fixes`);return console.log(`\u26A0\uFE0F ${Z0.message}`),{success:!1,result:Z0}}}return{success:!1,result:{message:"Max retries exceeded"}}};if(console.log(`
|
|
702
|
+
\uD83D\uDD0D Validating pre-push hook locally (before pushing)...`),!(await r("initial validation")).success){console.log(" Cannot proceed without passing pre-push hook validation"),g();return}let X0=await I.getCurrentBranch(),d=!1;if(O&&X0)try{console.log(`
|
|
703
|
+
\uD83D\uDD04 Running auto-review loop (without pushing)...`);let o=process.env.CLAUDE_INTERN_OUTPUT_DIR||"/tmp/claude-intern-tasks",A=X?S0(o,X.toLowerCase()):S0(o,`auto-review-${Date.now()}`),Z0=await _6({repository:"local/repo",prNumber:0,prBranch:X0,baseBranch:_,claudePath:Z,maxIterations:D,minPriority:"medium",workingDir:process.cwd(),outputDir:A,skipPush:!0}),R0=S0(A,"auto-review-summary.json");if(q1(R0,JSON.stringify(Z0,null,2)),console.log(`
|
|
704
|
+
\uD83D\uDCC4 Auto-review summary saved to: ${R0}`),d=!0,console.log(`
|
|
705
|
+
\uD83D\uDD0D Re-validating pre-push hook after auto-review improvements...`),!(await r("post auto-review validation")).success){console.log(" Cannot proceed - auto-review changes failed pre-push hook validation"),g();return}}catch(o){console.warn(`
|
|
706
|
+
\u26A0\uFE0F Auto-review loop failed: ${o.message}`),console.log(" Continuing with push and PR creation...")}if(console.log(`
|
|
707
|
+
\uD83D\uDCE4 Pushing branch to remote...`),(await(async()=>{let o=0;while(o<=F){o++;let A=await I.pushCurrentBranch({verbose:i.verbose});if(A.success)return console.log(`\u2705 ${A.message}`),{success:!0,result:A};if(A.hookError&&o<=F){console.log(`
|
|
708
|
+
\u26A0\uFE0F Git pre-push hook failed during actual push (attempt ${o}/${F+1})`);let Z0=await B1("push",Z,Y);if(mZ(X,"push",o,A.hookError,Z0),Z0){console.log(`
|
|
578
709
|
\uD83D\uDD04 Retrying push after Claude fixed and amended the commit...`);continue}else return console.log(`
|
|
579
|
-
\u274C Could not fix git pre-push hook errors automatically`),{success:!1,result:
|
|
580
|
-
\u274C Max retries (${F}) exceeded for git hook fixes`);return console.log(`\u26A0\uFE0F ${
|
|
581
|
-
\uD83D\uDCAC Posting implementation summary to JIRA...`),await
|
|
710
|
+
\u274C Could not fix git pre-push hook errors automatically`),{success:!1,result:A}}else{if(o>F)console.log(`
|
|
711
|
+
\u274C Max retries (${F}) exceeded for git hook fixes`);return console.log(`\u26A0\uFE0F ${A.message}`),{success:!1,result:A}}}return{success:!1,result:{message:"Max retries exceeded"}}})()).success){if(X&&w.trim()&&!q)try{console.log(`
|
|
712
|
+
\uD83D\uDCAC Posting implementation summary to JIRA...`),await pZ(X,w,z)}catch(o){console.warn(`\u26A0\uFE0F Failed to post implementation comment to JIRA: ${o}`),console.log(" Push succeeded, but JIRA comment failed")}else if(q&&X)console.log(`
|
|
582
713
|
\u23ED\uFE0F Skipping JIRA comment posting (--skip-jira-comments)`);console.log(`
|
|
583
|
-
\uD83D\uDD00 Creating pull request...`);try{let
|
|
584
|
-
\u274C Cannot create PR from protected branch '${
|
|
585
|
-
\uD83D\uDD04 Transitioning JIRA status after PR creation...`),await
|
|
586
|
-
\u23ED\uFE0F Skipping JIRA status transition (--skip-jira-comments)`)
|
|
587
|
-
\
|
|
588
|
-
\
|
|
714
|
+
\uD83D\uDD00 Creating pull request...`);try{let o=new EZ;if(X0){if(await I.isProtectedBranch(X0)){console.error(`
|
|
715
|
+
\u274C Cannot create PR from protected branch '${X0}'`),console.error(" This indicates a bug - feature branch was not created properly."),console.error(" Please create a feature branch manually and try again."),g();return}let A=await o.createPullRequest(G,X0,_,w);if(A.success){if(console.log(`\u2705 Pull request created: ${A.url}`),X&&B&&!q){let Z0=X.split("-")[0],R0=W5(Z0,f);if(R0&&R0.trim())try{console.log(`
|
|
716
|
+
\uD83D\uDD04 Transitioning JIRA status after PR creation...`),await B.transitionIssue(X,R0.trim())}catch(l1){console.warn(`\u26A0\uFE0F Failed to transition JIRA status: ${l1.message}`),console.log(" PR was created successfully, but status transition failed")}}else if(q)console.log(`
|
|
717
|
+
\u23ED\uFE0F Skipping JIRA status transition (--skip-jira-comments)`);if(d)console.log(`
|
|
718
|
+
\u2705 Auto-review was completed before push (see summary file for details)`)}else console.log(`\u26A0\uFE0F PR creation failed: ${A.message}`)}else console.log("\u26A0\uFE0F Could not determine current branch for PR creation")}catch(o){console.log(`\u26A0\uFE0F PR creation failed: ${o.message}`)}}else console.log(" Cannot create PR without pushing branch to remote")}else if(X&&w.trim()&&!q)try{console.log(`
|
|
719
|
+
\uD83D\uDCAC Posting implementation summary to JIRA...`),await pZ(X,w,z)}catch(r){console.warn(`\u26A0\uFE0F Failed to post implementation comment to JIRA: ${r}`),console.log(" Commit succeeded, but JIRA comment failed")}else if(q&&X)console.log(`
|
|
720
|
+
\u23ED\uFE0F Skipping JIRA comment posting (--skip-jira-comments)`);g()}).catch((P)=>{console.log(`\u26A0\uFE0F Failed to commit changes: ${P.message}`),console.log('You can commit changes manually with: git add . && git commit -m "feat: implement task"'),g()});else g()}else console.log(`\u274C Claude exited with non-zero code ${v}`),console.log(" No JIRA comment will be posted due to execution failure"),C(new Error(`Claude exited with code ${v}`))}),y.stdin)y.stdin.write(s),y.stdin.end()})}process.on("unhandledRejection",($)=>{if(console.error("\u274C Unhandled error:",$.message),i.verbose&&$.stack)console.error($.stack);if(U0)U0.release();process.exit(1)});process.on("SIGINT",()=>{if(console.log(`
|
|
589
721
|
|
|
590
|
-
\u26A0\uFE0F Received SIGINT (Ctrl+C), cleaning up...`),
|
|
722
|
+
\u26A0\uFE0F Received SIGINT (Ctrl+C), cleaning up...`),U0)U0.release();process.exit(130)});process.on("SIGTERM",()=>{if(console.log(`
|
|
591
723
|
|
|
592
|
-
\u26A0\uFE0F Received SIGTERM, cleaning up...`),
|
|
724
|
+
\u26A0\uFE0F Received SIGTERM, cleaning up...`),U0)U0.release();process.exit(143)});process.on("uncaughtException",($)=>{if(console.error("\u274C Uncaught exception:",$.message),$.stack)console.error($.stack);if(U0)U0.release();process.exit(1)});if(import.meta.main){let $=process.argv[2];if($==="init"||$==="serve"||$==="address-review");else _5()}export{_5 as main,V6 as JiraClient,M9 as ClaudeFormatter};
|