chipctx 0.1.24 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,12 @@
1
1
 
2
+ import { createRequire as __chipctxCreateRequire } from "node:module";
2
3
  import { spawn as __chipctxSpawnImpl, spawnSync as __chipctxSpawnSyncImpl } from "node:child_process";
3
4
  import { accessSync as __chipctxAccessSync, constants as __chipctxFsConstants, readFileSync as __chipctxReadFileSync, statSync as __chipctxStatSync } from "node:fs";
4
5
  import { delimiter as __chipctxPathDelimiter, join as __chipctxPathJoin } from "node:path";
5
6
  import { Readable as __chipctxReadable } from "node:stream";
6
7
  const __chipctxNodeSqliteModule = await import("node:sqlite").catch(() => null);
7
8
  const __chipctxNodeDatabaseSync = __chipctxNodeSqliteModule?.DatabaseSync ?? null;
9
+ const __chipctxRequire = import.meta.require ?? __chipctxCreateRequire(import.meta.url);
8
10
  var Bun = globalThis.Bun ?? (() => {
9
11
  function __chipctxResolveExecutable(binary) {
10
12
  const isWindows = process.platform === "win32";
@@ -120,7 +122,7 @@ var Bun = globalThis.Bun ?? (() => {
120
122
  };
121
123
  })();
122
124
 
123
- import{createRequire as Kf}from"node:module";var F6=Object.create;var{getPrototypeOf:Q6,defineProperty:Oq,getOwnPropertyNames:_f}=Object;var qf=Object.prototype.hasOwnProperty;var Z$=(q,_,$)=>{$=q!=null?F6(Q6(q)):{};let f=_||!q||!q.__esModule?Oq($,"default",{value:q,enumerable:!0}):$;for(let K of _f(q))if(!qf.call(f,K))Oq(f,K,{get:()=>q[K],enumerable:!0});return f};var J=(q,_)=>()=>(_||q((_={exports:{}}).exports,_),_.exports);var $f=(q,_)=>{for(var $ in _)Oq(q,$,{get:_[$],enumerable:!0,configurable:!0,set:(f)=>_[$]=()=>f})};var ff=(q,_)=>()=>(q&&(_=q(q=0)),_);var A_=Kf(import.meta.url);var Tq={};$f(Tq,{assets:()=>Pf});var Pf;var Yq=ff(()=>{Pf={"templates/import/csolution.yml.hbs":`solution:
125
+ var F6=Object.create;var{getPrototypeOf:Q6,defineProperty:Oq,getOwnPropertyNames:_f}=Object;var qf=Object.prototype.hasOwnProperty;function $f(q){return this[q]}var ff,Kf,Z$=(q,_,$)=>{var f=q!=null&&typeof q==="object";if(f){var K=_?ff??=new WeakMap:Kf??=new WeakMap,P=K.get(q);if(P)return P}$=q!=null?F6(Q6(q)):{};let j=_||!q||!q.__esModule?Oq($,"default",{value:q,enumerable:!0}):$;for(let v of _f(q))if(!qf.call(j,v))Oq(j,v,{get:$f.bind(q,v),enumerable:!0});if(f)K.set(q,j);return j};var J=(q,_)=>()=>(_||q((_={exports:{}}).exports,_),_.exports);var Pf=(q)=>q;function jf(q,_){this[q]=Pf.bind(null,_)}var vf=(q,_)=>{for(var $ in _)Oq(q,$,{get:_[$],enumerable:!0,configurable:!0,set:jf.bind(_,$)})};var wf=(q,_)=>()=>(q&&(_=q(q=0)),_);var A_=__chipctxRequire;var Tq={};vf(Tq,{assets:()=>Of});var Of;var Yq=wf(()=>{Of={"templates/import/csolution.yml.hbs":`solution:
124
126
  created-for: CMSIS-Toolbox@2.6.0
125
127
  description: {{project_name}} imported by chipctx CLI
126
128
 
@@ -533,16 +535,16 @@ SECTIONS
533
535
  }]
534
536
  }
535
537
  }
536
- `}});var e=J((uK)=>{uK.__esModule=!0;uK.extend=V$;uK.indexOf=zK;uK.escapeExpression=HK;uK.isEmpty=WK;uK.createFrame=JK;uK.blockParams=ZK;uK.appendContextPath=rK;var TK={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},YK=/[&<>"'`=]/g,kK=/[&<>"'`=]/;function hK(q){return TK[q]}function V$(q){for(var _=1;_<arguments.length;_++)for(var $ in arguments[_])if(Object.prototype.hasOwnProperty.call(arguments[_],$))q[$]=arguments[_][$];return q}var oq=Object.prototype.toString;uK.toString=oq;var pq=function(_){return typeof _==="function"};if(pq(/x/))uK.isFunction=pq=function(q){return typeof q==="function"&&oq.call(q)==="[object Function]"};uK.isFunction=pq;var i$=Array.isArray||function(q){return q&&typeof q==="object"?oq.call(q)==="[object Array]":!1};uK.isArray=i$;function zK(q,_){for(var $=0,f=q.length;$<f;$++)if(q[$]===_)return $;return-1}function HK(q){if(typeof q!=="string"){if(q&&q.toHTML)return q.toHTML();else if(q==null)return"";else if(!q)return q+"";q=""+q}if(!kK.test(q))return q;return q.replace(YK,hK)}function WK(q){if(!q&&q!==0)return!0;else if(i$(q)&&q.length===0)return!0;else return!1}function JK(q){var _=V$({},q);return _._parent=q,_}function ZK(q,_){return q.path=_,q}function rK(q,_){return(q?q+".":"")+_}});var l=J((N$,l$)=>{N$.__esModule=!0;var Gq=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function dq(q,_){var $=_&&_.loc,f=void 0,K=void 0,P=void 0,j=void 0;if($)f=$.start.line,K=$.end.line,P=$.start.column,j=$.end.column,q+=" - "+f+":"+P;var v=Error.prototype.constructor.call(this,q);for(var w=0;w<Gq.length;w++)this[Gq[w]]=v[Gq[w]];if(Error.captureStackTrace)Error.captureStackTrace(this,dq);try{if($)if(this.lineNumber=f,this.endLineNumber=K,Object.defineProperty)Object.defineProperty(this,"column",{value:P,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:j,enumerable:!0});else this.column=P,this.endColumn=j}catch(O){}}dq.prototype=Error();N$.default=dq;l$.exports=N$.default});var a$=J((t$,c$)=>{t$.__esModule=!0;var eq=e();t$.default=function(q){q.registerHelper("blockHelperMissing",function(_,$){var{inverse:f,fn:K}=$;if(_===!0)return K(this);else if(_===!1||_==null)return f(this);else if(eq.isArray(_))if(_.length>0){if($.ids)$.ids=[$.name];return q.helpers.each(_,$)}else return f(this);else{if($.data&&$.ids){var P=eq.createFrame($.data);P.contextPath=eq.appendContextPath($.data.contextPath,$.name),$={data:P}}return K(_,$)}})};c$.exports=t$.default});var I$=J((R$,E$)=>{R$.__esModule=!0;function NK(q){return q&&q.__esModule?q:{default:q}}var G_=e(),lK=l(),tK=NK(lK);R$.default=function(q){q.registerHelper("each",function(_,$){if(!$)throw new tK.default("Must pass iterator to #each");var{fn:f,inverse:K}=$,P=0,j="",v=void 0,w=void 0;if($.data&&$.ids)w=G_.appendContextPath($.data.contextPath,$.ids[0])+".";if(G_.isFunction(_))_=_.call(this);if($.data)v=G_.createFrame($.data);function O(W,H,u){if(v){if(v.key=W,v.index=H,v.first=H===0,v.last=!!u,w)v.contextPath=w+W}j=j+f(_[W],{data:v,blockParams:G_.blockParams([_[W],W],[w+W,null])})}if(_&&typeof _==="object")if(G_.isArray(_)){for(var Y=_.length;P<Y;P++)if(P in _)O(P,P,P===_.length-1)}else if(typeof Symbol==="function"&&_[Symbol.iterator]){var T=[],k=_[Symbol.iterator]();for(var h=k.next();!h.done;h=k.next())T.push(h.value);_=T;for(var Y=_.length;P<Y;P++)O(P,P,P===_.length-1)}else(function(){var W=void 0;if(Object.keys(_).forEach(function(H){if(W!==void 0)O(W,P-1);W=H,P++}),W!==void 0)O(W,P-1,!0)})();if(P===0)j=K(this);return j})};E$.exports=R$.default});var D$=J((g$,y$)=>{g$.__esModule=!0;function RK(q){return q&&q.__esModule?q:{default:q}}var EK=l(),IK=RK(EK);g$.default=function(q){q.registerHelper("helperMissing",function(){if(arguments.length===1)return;else throw new IK.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};y$.exports=g$.default});var U$=J((s$,B$)=>{s$.__esModule=!0;function DK(q){return q&&q.__esModule?q:{default:q}}var L$=e(),LK=l(),x$=DK(LK);s$.default=function(q){q.registerHelper("if",function(_,$){if(arguments.length!=2)throw new x$.default("#if requires exactly one argument");if(L$.isFunction(_))_=_.call(this);if(!$.hash.includeZero&&!_||L$.isEmpty(_))return $.inverse(this);else return $.fn(this)}),q.registerHelper("unless",function(_,$){if(arguments.length!=2)throw new x$.default("#unless requires exactly one argument");return q.helpers.if.call(this,_,{fn:$.inverse,inverse:$.fn,hash:$.hash})})};B$.exports=s$.default});var _8=J((F$,Q$)=>{F$.__esModule=!0;F$.default=function(q){q.registerHelper("log",function(){var _=[void 0],$=arguments[arguments.length-1];for(var f=0;f<arguments.length-1;f++)_.push(arguments[f]);var K=1;if($.hash.level!=null)K=$.hash.level;else if($.data&&$.data.level!=null)K=$.data.level;_[0]=K,q.log.apply(q,_)})};Q$.exports=F$.default});var f8=J((q8,$8)=>{q8.__esModule=!0;q8.default=function(q){q.registerHelper("lookup",function(_,$,f){if(!_)return _;return f.lookupProperty(_,$)})};$8.exports=q8.default});var j8=J((K8,P8)=>{K8.__esModule=!0;function _P(q){return q&&q.__esModule?q:{default:q}}var d_=e(),qP=l(),$P=_P(qP);K8.default=function(q){q.registerHelper("with",function(_,$){if(arguments.length!=2)throw new $P.default("#with requires exactly one argument");if(d_.isFunction(_))_=_.call(this);var f=$.fn;if(!d_.isEmpty(_)){var K=$.data;if($.data&&$.ids)K=d_.createFrame($.data),K.contextPath=d_.appendContextPath($.data.contextPath,$.ids[0]);return f(_,{data:K,blockParams:d_.blockParams([_],[K&&K.contextPath])})}else return $.inverse(this)})};P8.exports=K8.default});var bq=J((AP)=>{AP.__esModule=!0;AP.registerDefaultHelpers=rP;AP.moveHelperToHooks=uP;function __(q){return q&&q.__esModule?q:{default:q}}var PP=a$(),jP=__(PP),vP=I$(),wP=__(vP),OP=D$(),TP=__(OP),YP=U$(),kP=__(YP),hP=_8(),zP=__(hP),HP=f8(),WP=__(HP),JP=j8(),ZP=__(JP);function rP(q){jP.default(q),wP.default(q),TP.default(q),kP.default(q),zP.default(q),WP.default(q),ZP.default(q)}function uP(q,_,$){if(q.helpers[_]){if(q.hooks[_]=q.helpers[_],!$)delete q.helpers[_]}}});var O8=J((v8,w8)=>{v8.__esModule=!0;var pP=e();v8.default=function(q){q.registerDecorator("inline",function(_,$,f,K){var P=_;if(!$.partials)$.partials={},P=function(j,v){var w=f.partials;f.partials=pP.extend({},w,$.partials);var O=_(j,v);return f.partials=w,O};return $.partials[K.args[0]]=K.fn,P})};w8.exports=v8.default});var T8=J((CP)=>{CP.__esModule=!0;CP.registerDefaultDecorators=SP;function dP(q){return q&&q.__esModule?q:{default:q}}var eP=O8(),bP=dP(eP);function SP(q){bP.default(q)}});var Sq=J((Y8,k8)=>{Y8.__esModule=!0;var iP=e(),k_={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(_){if(typeof _==="string"){var $=iP.indexOf(k_.methodMap,_.toLowerCase());if($>=0)_=$;else _=parseInt(_,10)}return _},log:function(_){if(_=k_.lookupLevel(_),typeof console<"u"&&k_.lookupLevel(k_.level)<=_){var $=k_.methodMap[_];if(!console[$])$="log";for(var f=arguments.length,K=Array(f>1?f-1:0),P=1;P<f;P++)K[P-1]=arguments[P];console[$].apply(console,K)}}};Y8.default=k_;k8.exports=Y8.default});var h8=J((aP)=>{aP.__esModule=!0;aP.createNewLookupObject=cP;var tP=e();function cP(){for(var q=arguments.length,_=Array(q),$=0;$<q;$++)_[$]=arguments[$];return tP.extend.apply(void 0,[Object.create(null)].concat(_))}});var Cq=J((BP)=>{BP.__esModule=!0;BP.createProtoAccessControl=DP;BP.resultIsAllowed=LP;BP.resetLoggedProperties=sP;function IP(q){return q&&q.__esModule?q:{default:q}}var z8=h8(),gP=Sq(),yP=IP(gP),y_=Object.create(null);function DP(q){var _=Object.create(null);_.constructor=!1,_.__defineGetter__=!1,_.__defineSetter__=!1,_.__lookupGetter__=!1;var $=Object.create(null);return $.__proto__=!1,{properties:{whitelist:z8.createNewLookupObject($,q.allowedProtoProperties),defaultValue:q.allowProtoPropertiesByDefault},methods:{whitelist:z8.createNewLookupObject(_,q.allowedProtoMethods),defaultValue:q.allowProtoMethodsByDefault}}}function LP(q,_,$){if(typeof q==="function")return H8(_.methods,$);else return H8(_.properties,$)}function H8(q,_){if(q.whitelist[_]!==void 0)return q.whitelist[_]===!0;if(q.defaultValue!==void 0)return q.defaultValue;return xP(_),!1}function xP(q){if(y_[q]!==!0)y_[q]=!0,yP.default.log("error",'Handlebars: Access has been denied to resolve the property "'+q+`" because it is not an "own property" of its parent.
538
+ `}});var e=J((nK)=>{nK.__esModule=!0;nK.extend=V$;nK.indexOf=ZK;nK.escapeExpression=rK;nK.isEmpty=uK;nK.createFrame=AK;nK.blockParams=XK;nK.appendContextPath=mK;var zK={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},HK=/[&<>"'`=]/g,WK=/[&<>"'`=]/;function JK(q){return zK[q]}function V$(q){for(var _=1;_<arguments.length;_++)for(var $ in arguments[_])if(Object.prototype.hasOwnProperty.call(arguments[_],$))q[$]=arguments[_][$];return q}var oq=Object.prototype.toString;nK.toString=oq;var pq=function(_){return typeof _==="function"};if(pq(/x/))nK.isFunction=pq=function(q){return typeof q==="function"&&oq.call(q)==="[object Function]"};nK.isFunction=pq;var i$=Array.isArray||function(q){return q&&typeof q==="object"?oq.call(q)==="[object Array]":!1};nK.isArray=i$;function ZK(q,_){for(var $=0,f=q.length;$<f;$++)if(q[$]===_)return $;return-1}function rK(q){if(typeof q!=="string"){if(q&&q.toHTML)return q.toHTML();else if(q==null)return"";else if(!q)return q+"";q=""+q}if(!WK.test(q))return q;return q.replace(HK,JK)}function uK(q){if(!q&&q!==0)return!0;else if(i$(q)&&q.length===0)return!0;else return!1}function AK(q){var _=V$({},q);return _._parent=q,_}function XK(q,_){return q.path=_,q}function mK(q,_){return(q?q+".":"")+_}});var l=J((N$,l$)=>{N$.__esModule=!0;var Gq=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function dq(q,_){var $=_&&_.loc,f=void 0,K=void 0,P=void 0,j=void 0;if($)f=$.start.line,K=$.end.line,P=$.start.column,j=$.end.column,q+=" - "+f+":"+P;var v=Error.prototype.constructor.call(this,q);for(var w=0;w<Gq.length;w++)this[Gq[w]]=v[Gq[w]];if(Error.captureStackTrace)Error.captureStackTrace(this,dq);try{if($)if(this.lineNumber=f,this.endLineNumber=K,Object.defineProperty)Object.defineProperty(this,"column",{value:P,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:j,enumerable:!0});else this.column=P,this.endColumn=j}catch(O){}}dq.prototype=Error();N$.default=dq;l$.exports=N$.default});var a$=J((t$,c$)=>{t$.__esModule=!0;var eq=e();t$.default=function(q){q.registerHelper("blockHelperMissing",function(_,$){var{inverse:f,fn:K}=$;if(_===!0)return K(this);else if(_===!1||_==null)return f(this);else if(eq.isArray(_))if(_.length>0){if($.ids)$.ids=[$.name];return q.helpers.each(_,$)}else return f(this);else{if($.data&&$.ids){var P=eq.createFrame($.data);P.contextPath=eq.appendContextPath($.data.contextPath,$.name),$={data:P}}return K(_,$)}})};c$.exports=t$.default});var I$=J((R$,E$)=>{R$.__esModule=!0;function aK(q){return q&&q.__esModule?q:{default:q}}var G_=e(),RK=l(),EK=aK(RK);R$.default=function(q){q.registerHelper("each",function(_,$){if(!$)throw new EK.default("Must pass iterator to #each");var{fn:f,inverse:K}=$,P=0,j="",v=void 0,w=void 0;if($.data&&$.ids)w=G_.appendContextPath($.data.contextPath,$.ids[0])+".";if(G_.isFunction(_))_=_.call(this);if($.data)v=G_.createFrame($.data);function O(W,H,u){if(v){if(v.key=W,v.index=H,v.first=H===0,v.last=!!u,w)v.contextPath=w+W}j=j+f(_[W],{data:v,blockParams:G_.blockParams([_[W],W],[w+W,null])})}if(_&&typeof _==="object")if(G_.isArray(_)){for(var Y=_.length;P<Y;P++)if(P in _)O(P,P,P===_.length-1)}else if(typeof Symbol==="function"&&_[Symbol.iterator]){var T=[],k=_[Symbol.iterator]();for(var h=k.next();!h.done;h=k.next())T.push(h.value);_=T;for(var Y=_.length;P<Y;P++)O(P,P,P===_.length-1)}else(function(){var W=void 0;if(Object.keys(_).forEach(function(H){if(W!==void 0)O(W,P-1);W=H,P++}),W!==void 0)O(W,P-1,!0)})();if(P===0)j=K(this);return j})};E$.exports=R$.default});var D$=J((g$,y$)=>{g$.__esModule=!0;function yK(q){return q&&q.__esModule?q:{default:q}}var DK=l(),LK=yK(DK);g$.default=function(q){q.registerHelper("helperMissing",function(){if(arguments.length===1)return;else throw new LK.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};y$.exports=g$.default});var U$=J((s$,B$)=>{s$.__esModule=!0;function BK(q){return q&&q.__esModule?q:{default:q}}var L$=e(),UK=l(),x$=BK(UK);s$.default=function(q){q.registerHelper("if",function(_,$){if(arguments.length!=2)throw new x$.default("#if requires exactly one argument");if(L$.isFunction(_))_=_.call(this);if(!$.hash.includeZero&&!_||L$.isEmpty(_))return $.inverse(this);else return $.fn(this)}),q.registerHelper("unless",function(_,$){if(arguments.length!=2)throw new x$.default("#unless requires exactly one argument");return q.helpers.if.call(this,_,{fn:$.inverse,inverse:$.fn,hash:$.hash})})};B$.exports=s$.default});var _8=J((F$,Q$)=>{F$.__esModule=!0;F$.default=function(q){q.registerHelper("log",function(){var _=[void 0],$=arguments[arguments.length-1];for(var f=0;f<arguments.length-1;f++)_.push(arguments[f]);var K=1;if($.hash.level!=null)K=$.hash.level;else if($.data&&$.data.level!=null)K=$.data.level;_[0]=K,q.log.apply(q,_)})};Q$.exports=F$.default});var f8=J((q8,$8)=>{q8.__esModule=!0;q8.default=function(q){q.registerHelper("lookup",function(_,$,f){if(!_)return _;return f.lookupProperty(_,$)})};$8.exports=q8.default});var j8=J((K8,P8)=>{K8.__esModule=!0;function KP(q){return q&&q.__esModule?q:{default:q}}var d_=e(),PP=l(),jP=KP(PP);K8.default=function(q){q.registerHelper("with",function(_,$){if(arguments.length!=2)throw new jP.default("#with requires exactly one argument");if(d_.isFunction(_))_=_.call(this);var f=$.fn;if(!d_.isEmpty(_)){var K=$.data;if($.data&&$.ids)K=d_.createFrame($.data),K.contextPath=d_.appendContextPath($.data.contextPath,$.ids[0]);return f(_,{data:K,blockParams:d_.blockParams([_],[K&&K.contextPath])})}else return $.inverse(this)})};P8.exports=K8.default});var bq=J((pP)=>{pP.__esModule=!0;pP.registerDefaultHelpers=mP;pP.moveHelperToHooks=nP;function __(q){return q&&q.__esModule?q:{default:q}}var OP=a$(),TP=__(OP),YP=I$(),kP=__(YP),hP=D$(),zP=__(hP),HP=U$(),WP=__(HP),JP=_8(),ZP=__(JP),rP=f8(),uP=__(rP),AP=j8(),XP=__(AP);function mP(q){TP.default(q),kP.default(q),zP.default(q),WP.default(q),ZP.default(q),uP.default(q),XP.default(q)}function nP(q,_,$){if(q.helpers[_]){if(q.hooks[_]=q.helpers[_],!$)delete q.helpers[_]}}});var O8=J((v8,w8)=>{v8.__esModule=!0;var eP=e();v8.default=function(q){q.registerDecorator("inline",function(_,$,f,K){var P=_;if(!$.partials)$.partials={},P=function(j,v){var w=f.partials;f.partials=eP.extend({},w,$.partials);var O=_(j,v);return f.partials=w,O};return $.partials[K.args[0]]=K.fn,P})};w8.exports=v8.default});var T8=J((NP)=>{NP.__esModule=!0;NP.registerDefaultDecorators=iP;function CP(q){return q&&q.__esModule?q:{default:q}}var MP=O8(),VP=CP(MP);function iP(q){VP.default(q)}});var Sq=J((Y8,k8)=>{Y8.__esModule=!0;var cP=e(),k_={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(_){if(typeof _==="string"){var $=cP.indexOf(k_.methodMap,_.toLowerCase());if($>=0)_=$;else _=parseInt(_,10)}return _},log:function(_){if(_=k_.lookupLevel(_),typeof console<"u"&&k_.lookupLevel(k_.level)<=_){var $=k_.methodMap[_];if(!console[$])$="log";for(var f=arguments.length,K=Array(f>1?f-1:0),P=1;P<f;P++)K[P-1]=arguments[P];console[$].apply(console,K)}}};Y8.default=k_;k8.exports=Y8.default});var h8=J((gP)=>{gP.__esModule=!0;gP.createNewLookupObject=IP;var EP=e();function IP(){for(var q=arguments.length,_=Array(q),$=0;$<q;$++)_[$]=arguments[$];return EP.extend.apply(void 0,[Object.create(null)].concat(_))}});var Cq=J((_3)=>{_3.__esModule=!0;_3.createProtoAccessControl=BP;_3.resultIsAllowed=UP;_3.resetLoggedProperties=QP;function LP(q){return q&&q.__esModule?q:{default:q}}var z8=h8(),xP=Sq(),sP=LP(xP),y_=Object.create(null);function BP(q){var _=Object.create(null);_.constructor=!1,_.__defineGetter__=!1,_.__defineSetter__=!1,_.__lookupGetter__=!1;var $=Object.create(null);return $.__proto__=!1,{properties:{whitelist:z8.createNewLookupObject($,q.allowedProtoProperties),defaultValue:q.allowProtoPropertiesByDefault},methods:{whitelist:z8.createNewLookupObject(_,q.allowedProtoMethods),defaultValue:q.allowProtoMethodsByDefault}}}function UP(q,_,$){if(typeof q==="function")return H8(_.methods,$);else return H8(_.properties,$)}function H8(q,_){if(q.whitelist[_]!==void 0)return q.whitelist[_]===!0;if(q.defaultValue!==void 0)return q.defaultValue;return FP(_),!1}function FP(q){if(y_[q]!==!0)y_[q]=!0,sP.default.log("error",'Handlebars: Access has been denied to resolve the property "'+q+`" because it is not an "own property" of its parent.
537
539
  You can add a runtime option to disable the check or this warning:
538
- See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`)}function sP(){Object.keys(y_).forEach(function(q){delete y_[q]})}});var L_=J((Y3)=>{Y3.__esModule=!0;Y3.HandlebarsEnvironment=iq;function W8(q){return q&&q.__esModule?q:{default:q}}var q_=e(),q3=l(),Mq=W8(q3),$3=bq(),f3=T8(),K3=Sq(),D_=W8(K3),P3=Cq(),j3="4.7.8";Y3.VERSION=j3;var v3=8;Y3.COMPILER_REVISION=v3;var w3=7;Y3.LAST_COMPATIBLE_COMPILER_REVISION=w3;var O3={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};Y3.REVISION_CHANGES=O3;var Vq="[object Object]";function iq(q,_,$){this.helpers=q||{},this.partials=_||{},this.decorators=$||{},$3.registerDefaultHelpers(this),f3.registerDefaultDecorators(this)}iq.prototype={constructor:iq,logger:D_.default,log:D_.default.log,registerHelper:function(_,$){if(q_.toString.call(_)===Vq){if($)throw new Mq.default("Arg not supported with multiple helpers");q_.extend(this.helpers,_)}else this.helpers[_]=$},unregisterHelper:function(_){delete this.helpers[_]},registerPartial:function(_,$){if(q_.toString.call(_)===Vq)q_.extend(this.partials,_);else{if(typeof $>"u")throw new Mq.default('Attempting to register a partial called "'+_+'" as undefined');this.partials[_]=$}},unregisterPartial:function(_){delete this.partials[_]},registerDecorator:function(_,$){if(q_.toString.call(_)===Vq){if($)throw new Mq.default("Arg not supported with multiple decorators");q_.extend(this.decorators,_)}else this.decorators[_]=$},unregisterDecorator:function(_){delete this.decorators[_]},resetLoggedPropertyAccesses:function(){P3.resetLoggedProperties()}};var T3=D_.default.log;Y3.log=T3;Y3.createFrame=q_.createFrame;Y3.logger=D_.default});var r8=J((J8,Z8)=>{J8.__esModule=!0;function Nq(q){this.string=q}Nq.prototype.toString=Nq.prototype.toHTML=function(){return""+this.string};J8.default=Nq;Z8.exports=J8.default});var u8=J((n3)=>{n3.__esModule=!0;n3.wrapHelper=m3;function m3(q,_){if(typeof q!=="function")return q;var $=function(){var K=arguments[arguments.length-1];return arguments[arguments.length-1]=_(K),q.apply(this,arguments)};return $}});var p8=J((c3)=>{c3.__esModule=!0;c3.checkRevision=C3;c3.template=M3;c3.wrapProgram=x_;c3.resolvePartial=V3;c3.invokePartial=i3;c3.noop=m8;function G3(q){return q&&q.__esModule?q:{default:q}}function d3(q){if(q&&q.__esModule)return q;else{var _={};if(q!=null){for(var $ in q)if(Object.prototype.hasOwnProperty.call(q,$))_[$]=q[$]}return _.default=q,_}}var e3=e(),D=d3(e3),b3=l(),L=G3(b3),x=L_(),A8=bq(),S3=u8(),X8=Cq();function C3(q){var _=q&&q[0]||1,$=x.COMPILER_REVISION;if(_>=x.LAST_COMPATIBLE_COMPILER_REVISION&&_<=x.COMPILER_REVISION)return;if(_<x.LAST_COMPATIBLE_COMPILER_REVISION){var f=x.REVISION_CHANGES[$],K=x.REVISION_CHANGES[_];throw new L.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+f+") or downgrade your runtime to an older version ("+K+").")}else throw new L.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+q[1]+").")}function M3(q,_){if(!_)throw new L.default("No environment passed to template");if(!q||!q.main)throw new L.default("Unknown template object: "+typeof q);q.main.decorator=q.main_d,_.VM.checkRevision(q.compiler);var $=q.compiler&&q.compiler[0]===7;function f(j,v,w){if(w.hash){if(v=D.extend({},v,w.hash),w.ids)w.ids[0]=!0}j=_.VM.resolvePartial.call(this,j,v,w);var O=D.extend({},w,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),Y=_.VM.invokePartial.call(this,j,v,O);if(Y==null&&_.compile)w.partials[w.name]=_.compile(j,q.compilerOptions,_),Y=w.partials[w.name](v,O);if(Y!=null){if(w.indent){var T=Y.split(`
540
+ See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`)}function QP(){Object.keys(y_).forEach(function(q){delete y_[q]})}});var L_=J((H3)=>{H3.__esModule=!0;H3.HandlebarsEnvironment=iq;function W8(q){return q&&q.__esModule?q:{default:q}}var q_=e(),P3=l(),Mq=W8(P3),j3=bq(),v3=T8(),w3=Sq(),D_=W8(w3),O3=Cq(),T3="4.7.8";H3.VERSION=T3;var Y3=8;H3.COMPILER_REVISION=Y3;var k3=7;H3.LAST_COMPATIBLE_COMPILER_REVISION=k3;var h3={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};H3.REVISION_CHANGES=h3;var Vq="[object Object]";function iq(q,_,$){this.helpers=q||{},this.partials=_||{},this.decorators=$||{},j3.registerDefaultHelpers(this),v3.registerDefaultDecorators(this)}iq.prototype={constructor:iq,logger:D_.default,log:D_.default.log,registerHelper:function(_,$){if(q_.toString.call(_)===Vq){if($)throw new Mq.default("Arg not supported with multiple helpers");q_.extend(this.helpers,_)}else this.helpers[_]=$},unregisterHelper:function(_){delete this.helpers[_]},registerPartial:function(_,$){if(q_.toString.call(_)===Vq)q_.extend(this.partials,_);else{if(typeof $>"u")throw new Mq.default('Attempting to register a partial called "'+_+'" as undefined');this.partials[_]=$}},unregisterPartial:function(_){delete this.partials[_]},registerDecorator:function(_,$){if(q_.toString.call(_)===Vq){if($)throw new Mq.default("Arg not supported with multiple decorators");q_.extend(this.decorators,_)}else this.decorators[_]=$},unregisterDecorator:function(_){delete this.decorators[_]},resetLoggedPropertyAccesses:function(){O3.resetLoggedProperties()}};var z3=D_.default.log;H3.log=z3;H3.createFrame=q_.createFrame;H3.logger=D_.default});var r8=J((J8,Z8)=>{J8.__esModule=!0;function Nq(q){this.string=q}Nq.prototype.toString=Nq.prototype.toHTML=function(){return""+this.string};J8.default=Nq;Z8.exports=J8.default});var u8=J((d3)=>{d3.__esModule=!0;d3.wrapHelper=G3;function G3(q,_){if(typeof q!=="function")return q;var $=function(){var K=arguments[arguments.length-1];return arguments[arguments.length-1]=_(K),q.apply(this,arguments)};return $}});var p8=J((I3)=>{I3.__esModule=!0;I3.checkRevision=N3;I3.template=l3;I3.wrapProgram=x_;I3.resolvePartial=t3;I3.invokePartial=c3;I3.noop=m8;function S3(q){return q&&q.__esModule?q:{default:q}}function C3(q){if(q&&q.__esModule)return q;else{var _={};if(q!=null){for(var $ in q)if(Object.prototype.hasOwnProperty.call(q,$))_[$]=q[$]}return _.default=q,_}}var M3=e(),D=C3(M3),V3=l(),L=S3(V3),x=L_(),A8=bq(),i3=u8(),X8=Cq();function N3(q){var _=q&&q[0]||1,$=x.COMPILER_REVISION;if(_>=x.LAST_COMPATIBLE_COMPILER_REVISION&&_<=x.COMPILER_REVISION)return;if(_<x.LAST_COMPATIBLE_COMPILER_REVISION){var f=x.REVISION_CHANGES[$],K=x.REVISION_CHANGES[_];throw new L.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+f+") or downgrade your runtime to an older version ("+K+").")}else throw new L.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+q[1]+").")}function l3(q,_){if(!_)throw new L.default("No environment passed to template");if(!q||!q.main)throw new L.default("Unknown template object: "+typeof q);q.main.decorator=q.main_d,_.VM.checkRevision(q.compiler);var $=q.compiler&&q.compiler[0]===7;function f(j,v,w){if(w.hash){if(v=D.extend({},v,w.hash),w.ids)w.ids[0]=!0}j=_.VM.resolvePartial.call(this,j,v,w);var O=D.extend({},w,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),Y=_.VM.invokePartial.call(this,j,v,O);if(Y==null&&_.compile)w.partials[w.name]=_.compile(j,q.compilerOptions,_),Y=w.partials[w.name](v,O);if(Y!=null){if(w.indent){var T=Y.split(`
539
541
  `);for(var k=0,h=T.length;k<h;k++){if(!T[k]&&k+1===h)break;T[k]=w.indent+T[k]}Y=T.join(`
540
- `)}return Y}else throw new L.default("The partial "+w.name+" could not be compiled when running in runtime-only mode")}var K={strict:function(v,w,O){if(!v||!(w in v))throw new L.default('"'+w+'" not defined in '+v,{loc:O});return K.lookupProperty(v,w)},lookupProperty:function(v,w){var O=v[w];if(O==null)return O;if(Object.prototype.hasOwnProperty.call(v,w))return O;if(X8.resultIsAllowed(O,K.protoAccessControl,w))return O;return},lookup:function(v,w){var O=v.length;for(var Y=0;Y<O;Y++){var T=v[Y]&&K.lookupProperty(v[Y],w);if(T!=null)return v[Y][w]}},lambda:function(v,w){return typeof v==="function"?v.call(w):v},escapeExpression:D.escapeExpression,invokePartial:f,fn:function(v){var w=q[v];return w.decorator=q[v+"_d"],w},programs:[],program:function(v,w,O,Y,T){var k=this.programs[v],h=this.fn(v);if(w||T||Y||O)k=x_(this,v,h,w,O,Y,T);else if(!k)k=this.programs[v]=x_(this,v,h);return k},data:function(v,w){while(v&&w--)v=v._parent;return v},mergeIfNeeded:function(v,w){var O=v||w;if(v&&w&&v!==w)O=D.extend({},w,v);return O},nullContext:Object.seal({}),noop:_.VM.noop,compilerInfo:q.compiler};function P(j){var v=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],w=v.data;if(P._setup(v),!v.partial&&q.useData)w=N3(j,w);var O=void 0,Y=q.useBlockParams?[]:void 0;if(q.useDepths)if(v.depths)O=j!=v.depths[0]?[j].concat(v.depths):v.depths;else O=[j];function T(k){return""+q.main(K,k,K.helpers,K.partials,w,Y,O)}return T=n8(q.main,T,K,v.depths||[],w,Y),T(j,v)}return P.isTop=!0,P._setup=function(j){if(!j.partial){var v=D.extend({},_.helpers,j.helpers);if(l3(v,K),K.helpers=v,q.usePartial)K.partials=K.mergeIfNeeded(j.partials,_.partials);if(q.usePartial||q.useDecorators)K.decorators=D.extend({},_.decorators,j.decorators);K.hooks={},K.protoAccessControl=X8.createProtoAccessControl(j);var w=j.allowCallsToHelperMissing||$;A8.moveHelperToHooks(K,"helperMissing",w),A8.moveHelperToHooks(K,"blockHelperMissing",w)}else K.protoAccessControl=j.protoAccessControl,K.helpers=j.helpers,K.partials=j.partials,K.decorators=j.decorators,K.hooks=j.hooks},P._child=function(j,v,w,O){if(q.useBlockParams&&!w)throw new L.default("must pass block params");if(q.useDepths&&!O)throw new L.default("must pass parent depths");return x_(K,j,q[j],v,0,w,O)},P}function x_(q,_,$,f,K,P,j){function v(w){var O=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],Y=j;if(j&&w!=j[0]&&!(w===q.nullContext&&j[0]===null))Y=[w].concat(j);return $(q,w,q.helpers,q.partials,O.data||f,P&&[O.blockParams].concat(P),Y)}return v=n8($,v,q,j,f,P),v.program=_,v.depth=j?j.length:0,v.blockParams=K||0,v}function V3(q,_,$){if(!q)if($.name==="@partial-block")q=$.data["partial-block"];else q=$.partials[$.name];else if(!q.call&&!$.name)$.name=q,q=$.partials[q];return q}function i3(q,_,$){var f=$.data&&$.data["partial-block"];if($.partial=!0,$.ids)$.data.contextPath=$.ids[0]||$.data.contextPath;var K=void 0;if($.fn&&$.fn!==m8)(function(){$.data=x.createFrame($.data);var P=$.fn;if(K=$.data["partial-block"]=function(v){var w=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return w.data=x.createFrame(w.data),w.data["partial-block"]=f,P(v,w)},P.partials)$.partials=D.extend({},$.partials,P.partials)})();if(q===void 0&&K)q=K;if(q===void 0)throw new L.default("The partial "+$.name+" could not be found");else if(q instanceof Function)return q(_,$)}function m8(){return""}function N3(q,_){if(!_||!("root"in _))_=_?x.createFrame(_):{},_.root=q;return _}function n8(q,_,$,f,K,P){if(q.decorator){var j={};_=q.decorator(_,j,$,f&&f[0],K,P,f),D.extend(_,j)}return _}function l3(q,_){Object.keys(q).forEach(function($){var f=q[$];q[$]=t3(f,_)})}function t3(q,_){var $=_.lookupProperty;return S3.wrapHelper(q,function(f){return D.extend({lookupProperty:$},f)})}});var lq=J((o8,G8)=>{o8.__esModule=!0;o8.default=function(q){(function(){if(typeof globalThis==="object")return;Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__})();var _=globalThis.Handlebars;q.noConflict=function(){if(globalThis.Handlebars===q)globalThis.Handlebars=_;return q}};G8.exports=o8.default});var M8=J((S8,C8)=>{S8.__esModule=!0;function cq(q){return q&&q.__esModule?q:{default:q}}function aq(q){if(q&&q.__esModule)return q;else{var _={};if(q!=null){for(var $ in q)if(Object.prototype.hasOwnProperty.call(q,$))_[$]=q[$]}return _.default=q,_}}var s3=L_(),d8=aq(s3),B3=r8(),U3=cq(B3),F3=l(),Q3=cq(F3),_4=e(),tq=aq(_4),q4=p8(),e8=aq(q4),$4=lq(),f4=cq($4);function b8(){var q=new d8.HandlebarsEnvironment;return tq.extend(q,d8),q.SafeString=U3.default,q.Exception=Q3.default,q.Utils=tq,q.escapeExpression=tq.escapeExpression,q.VM=e8,q.template=function(_){return e8.template(_,q)},q}var e_=b8();e_.create=b8;f4.default(e_);e_.default=e_;S8.default=e_;C8.exports=S8.default});var Rq=J((i8,N8)=>{i8.__esModule=!0;var V8={helpers:{helperExpression:function(_){return _.type==="SubExpression"||(_.type==="MustacheStatement"||_.type==="BlockStatement")&&!!(_.params&&_.params.length||_.hash)},scopedId:function(_){return/^\.|this\b/.test(_.original)},simpleId:function(_){return _.parts.length===1&&!V8.helpers.scopedId(_)&&!_.depth}}};i8.default=V8;N8.exports=i8.default});var c8=J((l8,t8)=>{l8.__esModule=!0;var w4=function(){var q={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(K,P,j,v,w,O,Y){var T=O.length-1;switch(w){case 1:return O[T-1];case 2:this.$=v.prepareProgram(O[T]);break;case 3:this.$=O[T];break;case 4:this.$=O[T];break;case 5:this.$=O[T];break;case 6:this.$=O[T];break;case 7:this.$=O[T];break;case 8:this.$=O[T];break;case 9:this.$={type:"CommentStatement",value:v.stripComment(O[T]),strip:v.stripFlags(O[T],O[T]),loc:v.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:O[T],value:O[T],loc:v.locInfo(this._$)};break;case 11:this.$=v.prepareRawBlock(O[T-2],O[T-1],O[T],this._$);break;case 12:this.$={path:O[T-3],params:O[T-2],hash:O[T-1]};break;case 13:this.$=v.prepareBlock(O[T-3],O[T-2],O[T-1],O[T],!1,this._$);break;case 14:this.$=v.prepareBlock(O[T-3],O[T-2],O[T-1],O[T],!0,this._$);break;case 15:this.$={open:O[T-5],path:O[T-4],params:O[T-3],hash:O[T-2],blockParams:O[T-1],strip:v.stripFlags(O[T-5],O[T])};break;case 16:this.$={path:O[T-4],params:O[T-3],hash:O[T-2],blockParams:O[T-1],strip:v.stripFlags(O[T-5],O[T])};break;case 17:this.$={path:O[T-4],params:O[T-3],hash:O[T-2],blockParams:O[T-1],strip:v.stripFlags(O[T-5],O[T])};break;case 18:this.$={strip:v.stripFlags(O[T-1],O[T-1]),program:O[T]};break;case 19:var k=v.prepareBlock(O[T-2],O[T-1],O[T],O[T],!1,this._$),h=v.prepareProgram([k],O[T-1].loc);h.chained=!0,this.$={strip:O[T-2].strip,program:h,chain:!0};break;case 20:this.$=O[T];break;case 21:this.$={path:O[T-1],strip:v.stripFlags(O[T-2],O[T])};break;case 22:this.$=v.prepareMustache(O[T-3],O[T-2],O[T-1],O[T-4],v.stripFlags(O[T-4],O[T]),this._$);break;case 23:this.$=v.prepareMustache(O[T-3],O[T-2],O[T-1],O[T-4],v.stripFlags(O[T-4],O[T]),this._$);break;case 24:this.$={type:"PartialStatement",name:O[T-3],params:O[T-2],hash:O[T-1],indent:"",strip:v.stripFlags(O[T-4],O[T]),loc:v.locInfo(this._$)};break;case 25:this.$=v.preparePartialBlock(O[T-2],O[T-1],O[T],this._$);break;case 26:this.$={path:O[T-3],params:O[T-2],hash:O[T-1],strip:v.stripFlags(O[T-4],O[T])};break;case 27:this.$=O[T];break;case 28:this.$=O[T];break;case 29:this.$={type:"SubExpression",path:O[T-3],params:O[T-2],hash:O[T-1],loc:v.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:O[T],loc:v.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:v.id(O[T-2]),value:O[T],loc:v.locInfo(this._$)};break;case 32:this.$=v.id(O[T-1]);break;case 33:this.$=O[T];break;case 34:this.$=O[T];break;case 35:this.$={type:"StringLiteral",value:O[T],original:O[T],loc:v.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(O[T]),original:Number(O[T]),loc:v.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:O[T]==="true",original:O[T]==="true",loc:v.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:v.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:v.locInfo(this._$)};break;case 40:this.$=O[T];break;case 41:this.$=O[T];break;case 42:this.$=v.preparePath(!0,O[T],this._$);break;case 43:this.$=v.preparePath(!1,O[T],this._$);break;case 44:O[T-2].push({part:v.id(O[T]),original:O[T],separator:O[T-1]}),this.$=O[T-2];break;case 45:this.$=[{part:v.id(O[T]),original:O[T]}];break;case 46:this.$=[];break;case 47:O[T-1].push(O[T]);break;case 48:this.$=[];break;case 49:O[T-1].push(O[T]);break;case 50:this.$=[];break;case 51:O[T-1].push(O[T]);break;case 58:this.$=[];break;case 59:O[T-1].push(O[T]);break;case 64:this.$=[];break;case 65:O[T-1].push(O[T]);break;case 70:this.$=[];break;case 71:O[T-1].push(O[T]);break;case 78:this.$=[];break;case 79:O[T-1].push(O[T]);break;case 82:this.$=[];break;case 83:O[T-1].push(O[T]);break;case 86:this.$=[];break;case 87:O[T-1].push(O[T]);break;case 90:this.$=[];break;case 91:O[T-1].push(O[T]);break;case 94:this.$=[];break;case 95:O[T-1].push(O[T]);break;case 98:this.$=[O[T]];break;case 99:O[T-1].push(O[T]);break;case 100:this.$=[O[T]];break;case 101:O[T-1].push(O[T]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(K,P){throw Error(K)},parse:function(K){var P=this,j=[0],v=[null],w=[],O=this.table,Y="",T=0,k=0,h=0,W=2,H=1;if(this.lexer.setInput(K),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u")this.lexer.yylloc={};var u=this.lexer.yylloc;w.push(u);var Z=this.lexer.options&&this.lexer.options.ranges;if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;function X(y){j.length=j.length-2*y,v.length=v.length-y,w.length=w.length-y}function r(){var y=P.lexer.lex()||1;if(typeof y!=="number")y=P.symbols_[y]||y;return y}var A,c,V,i,_v,vq,P_={},l_,g,J$,t_;while(!0){if(V=j[j.length-1],this.defaultActions[V])i=this.defaultActions[V];else{if(A===null||typeof A>"u")A=r();i=O[V]&&O[V][A]}if(typeof i>"u"||!i.length||!i[0]){var wq="";if(!h){t_=[];for(l_ in O[V])if(this.terminals_[l_]&&l_>2)t_.push("'"+this.terminals_[l_]+"'");if(this.lexer.showPosition)wq="Parse error on line "+(T+1)+`:
542
+ `)}return Y}else throw new L.default("The partial "+w.name+" could not be compiled when running in runtime-only mode")}var K={strict:function(v,w,O){if(!v||!(w in v))throw new L.default('"'+w+'" not defined in '+v,{loc:O});return K.lookupProperty(v,w)},lookupProperty:function(v,w){var O=v[w];if(O==null)return O;if(Object.prototype.hasOwnProperty.call(v,w))return O;if(X8.resultIsAllowed(O,K.protoAccessControl,w))return O;return},lookup:function(v,w){var O=v.length;for(var Y=0;Y<O;Y++){var T=v[Y]&&K.lookupProperty(v[Y],w);if(T!=null)return v[Y][w]}},lambda:function(v,w){return typeof v==="function"?v.call(w):v},escapeExpression:D.escapeExpression,invokePartial:f,fn:function(v){var w=q[v];return w.decorator=q[v+"_d"],w},programs:[],program:function(v,w,O,Y,T){var k=this.programs[v],h=this.fn(v);if(w||T||Y||O)k=x_(this,v,h,w,O,Y,T);else if(!k)k=this.programs[v]=x_(this,v,h);return k},data:function(v,w){while(v&&w--)v=v._parent;return v},mergeIfNeeded:function(v,w){var O=v||w;if(v&&w&&v!==w)O=D.extend({},w,v);return O},nullContext:Object.seal({}),noop:_.VM.noop,compilerInfo:q.compiler};function P(j){var v=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],w=v.data;if(P._setup(v),!v.partial&&q.useData)w=a3(j,w);var O=void 0,Y=q.useBlockParams?[]:void 0;if(q.useDepths)if(v.depths)O=j!=v.depths[0]?[j].concat(v.depths):v.depths;else O=[j];function T(k){return""+q.main(K,k,K.helpers,K.partials,w,Y,O)}return T=n8(q.main,T,K,v.depths||[],w,Y),T(j,v)}return P.isTop=!0,P._setup=function(j){if(!j.partial){var v=D.extend({},_.helpers,j.helpers);if(R3(v,K),K.helpers=v,q.usePartial)K.partials=K.mergeIfNeeded(j.partials,_.partials);if(q.usePartial||q.useDecorators)K.decorators=D.extend({},_.decorators,j.decorators);K.hooks={},K.protoAccessControl=X8.createProtoAccessControl(j);var w=j.allowCallsToHelperMissing||$;A8.moveHelperToHooks(K,"helperMissing",w),A8.moveHelperToHooks(K,"blockHelperMissing",w)}else K.protoAccessControl=j.protoAccessControl,K.helpers=j.helpers,K.partials=j.partials,K.decorators=j.decorators,K.hooks=j.hooks},P._child=function(j,v,w,O){if(q.useBlockParams&&!w)throw new L.default("must pass block params");if(q.useDepths&&!O)throw new L.default("must pass parent depths");return x_(K,j,q[j],v,0,w,O)},P}function x_(q,_,$,f,K,P,j){function v(w){var O=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],Y=j;if(j&&w!=j[0]&&!(w===q.nullContext&&j[0]===null))Y=[w].concat(j);return $(q,w,q.helpers,q.partials,O.data||f,P&&[O.blockParams].concat(P),Y)}return v=n8($,v,q,j,f,P),v.program=_,v.depth=j?j.length:0,v.blockParams=K||0,v}function t3(q,_,$){if(!q)if($.name==="@partial-block")q=$.data["partial-block"];else q=$.partials[$.name];else if(!q.call&&!$.name)$.name=q,q=$.partials[q];return q}function c3(q,_,$){var f=$.data&&$.data["partial-block"];if($.partial=!0,$.ids)$.data.contextPath=$.ids[0]||$.data.contextPath;var K=void 0;if($.fn&&$.fn!==m8)(function(){$.data=x.createFrame($.data);var P=$.fn;if(K=$.data["partial-block"]=function(v){var w=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return w.data=x.createFrame(w.data),w.data["partial-block"]=f,P(v,w)},P.partials)$.partials=D.extend({},$.partials,P.partials)})();if(q===void 0&&K)q=K;if(q===void 0)throw new L.default("The partial "+$.name+" could not be found");else if(q instanceof Function)return q(_,$)}function m8(){return""}function a3(q,_){if(!_||!("root"in _))_=_?x.createFrame(_):{},_.root=q;return _}function n8(q,_,$,f,K,P){if(q.decorator){var j={};_=q.decorator(_,j,$,f&&f[0],K,P,f),D.extend(_,j)}return _}function R3(q,_){Object.keys(q).forEach(function($){var f=q[$];q[$]=E3(f,_)})}function E3(q,_){var $=_.lookupProperty;return i3.wrapHelper(q,function(f){return D.extend({lookupProperty:$},f)})}});var lq=J((o8,G8)=>{o8.__esModule=!0;o8.default=function(q){(function(){if(typeof globalThis==="object")return;Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__})();var _=globalThis.Handlebars;q.noConflict=function(){if(globalThis.Handlebars===q)globalThis.Handlebars=_;return q}};G8.exports=o8.default});var M8=J((S8,C8)=>{S8.__esModule=!0;function cq(q){return q&&q.__esModule?q:{default:q}}function aq(q){if(q&&q.__esModule)return q;else{var _={};if(q!=null){for(var $ in q)if(Object.prototype.hasOwnProperty.call(q,$))_[$]=q[$]}return _.default=q,_}}var Q3=L_(),d8=aq(Q3),_4=r8(),q4=cq(_4),$4=l(),f4=cq($4),K4=e(),tq=aq(K4),P4=p8(),e8=aq(P4),j4=lq(),v4=cq(j4);function b8(){var q=new d8.HandlebarsEnvironment;return tq.extend(q,d8),q.SafeString=q4.default,q.Exception=f4.default,q.Utils=tq,q.escapeExpression=tq.escapeExpression,q.VM=e8,q.template=function(_){return e8.template(_,q)},q}var e_=b8();e_.create=b8;v4.default(e_);e_.default=e_;S8.default=e_;C8.exports=S8.default});var Rq=J((i8,N8)=>{i8.__esModule=!0;var V8={helpers:{helperExpression:function(_){return _.type==="SubExpression"||(_.type==="MustacheStatement"||_.type==="BlockStatement")&&!!(_.params&&_.params.length||_.hash)},scopedId:function(_){return/^\.|this\b/.test(_.original)},simpleId:function(_){return _.parts.length===1&&!V8.helpers.scopedId(_)&&!_.depth}}};i8.default=V8;N8.exports=i8.default});var c8=J((l8,t8)=>{l8.__esModule=!0;var k4=function(){var q={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(K,P,j,v,w,O,Y){var T=O.length-1;switch(w){case 1:return O[T-1];case 2:this.$=v.prepareProgram(O[T]);break;case 3:this.$=O[T];break;case 4:this.$=O[T];break;case 5:this.$=O[T];break;case 6:this.$=O[T];break;case 7:this.$=O[T];break;case 8:this.$=O[T];break;case 9:this.$={type:"CommentStatement",value:v.stripComment(O[T]),strip:v.stripFlags(O[T],O[T]),loc:v.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:O[T],value:O[T],loc:v.locInfo(this._$)};break;case 11:this.$=v.prepareRawBlock(O[T-2],O[T-1],O[T],this._$);break;case 12:this.$={path:O[T-3],params:O[T-2],hash:O[T-1]};break;case 13:this.$=v.prepareBlock(O[T-3],O[T-2],O[T-1],O[T],!1,this._$);break;case 14:this.$=v.prepareBlock(O[T-3],O[T-2],O[T-1],O[T],!0,this._$);break;case 15:this.$={open:O[T-5],path:O[T-4],params:O[T-3],hash:O[T-2],blockParams:O[T-1],strip:v.stripFlags(O[T-5],O[T])};break;case 16:this.$={path:O[T-4],params:O[T-3],hash:O[T-2],blockParams:O[T-1],strip:v.stripFlags(O[T-5],O[T])};break;case 17:this.$={path:O[T-4],params:O[T-3],hash:O[T-2],blockParams:O[T-1],strip:v.stripFlags(O[T-5],O[T])};break;case 18:this.$={strip:v.stripFlags(O[T-1],O[T-1]),program:O[T]};break;case 19:var k=v.prepareBlock(O[T-2],O[T-1],O[T],O[T],!1,this._$),h=v.prepareProgram([k],O[T-1].loc);h.chained=!0,this.$={strip:O[T-2].strip,program:h,chain:!0};break;case 20:this.$=O[T];break;case 21:this.$={path:O[T-1],strip:v.stripFlags(O[T-2],O[T])};break;case 22:this.$=v.prepareMustache(O[T-3],O[T-2],O[T-1],O[T-4],v.stripFlags(O[T-4],O[T]),this._$);break;case 23:this.$=v.prepareMustache(O[T-3],O[T-2],O[T-1],O[T-4],v.stripFlags(O[T-4],O[T]),this._$);break;case 24:this.$={type:"PartialStatement",name:O[T-3],params:O[T-2],hash:O[T-1],indent:"",strip:v.stripFlags(O[T-4],O[T]),loc:v.locInfo(this._$)};break;case 25:this.$=v.preparePartialBlock(O[T-2],O[T-1],O[T],this._$);break;case 26:this.$={path:O[T-3],params:O[T-2],hash:O[T-1],strip:v.stripFlags(O[T-4],O[T])};break;case 27:this.$=O[T];break;case 28:this.$=O[T];break;case 29:this.$={type:"SubExpression",path:O[T-3],params:O[T-2],hash:O[T-1],loc:v.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:O[T],loc:v.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:v.id(O[T-2]),value:O[T],loc:v.locInfo(this._$)};break;case 32:this.$=v.id(O[T-1]);break;case 33:this.$=O[T];break;case 34:this.$=O[T];break;case 35:this.$={type:"StringLiteral",value:O[T],original:O[T],loc:v.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(O[T]),original:Number(O[T]),loc:v.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:O[T]==="true",original:O[T]==="true",loc:v.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:v.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:v.locInfo(this._$)};break;case 40:this.$=O[T];break;case 41:this.$=O[T];break;case 42:this.$=v.preparePath(!0,O[T],this._$);break;case 43:this.$=v.preparePath(!1,O[T],this._$);break;case 44:O[T-2].push({part:v.id(O[T]),original:O[T],separator:O[T-1]}),this.$=O[T-2];break;case 45:this.$=[{part:v.id(O[T]),original:O[T]}];break;case 46:this.$=[];break;case 47:O[T-1].push(O[T]);break;case 48:this.$=[];break;case 49:O[T-1].push(O[T]);break;case 50:this.$=[];break;case 51:O[T-1].push(O[T]);break;case 58:this.$=[];break;case 59:O[T-1].push(O[T]);break;case 64:this.$=[];break;case 65:O[T-1].push(O[T]);break;case 70:this.$=[];break;case 71:O[T-1].push(O[T]);break;case 78:this.$=[];break;case 79:O[T-1].push(O[T]);break;case 82:this.$=[];break;case 83:O[T-1].push(O[T]);break;case 86:this.$=[];break;case 87:O[T-1].push(O[T]);break;case 90:this.$=[];break;case 91:O[T-1].push(O[T]);break;case 94:this.$=[];break;case 95:O[T-1].push(O[T]);break;case 98:this.$=[O[T]];break;case 99:O[T-1].push(O[T]);break;case 100:this.$=[O[T]];break;case 101:O[T-1].push(O[T]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(K,P){throw Error(K)},parse:function(K){var P=this,j=[0],v=[null],w=[],O=this.table,Y="",T=0,k=0,h=0,W=2,H=1;if(this.lexer.setInput(K),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u")this.lexer.yylloc={};var u=this.lexer.yylloc;w.push(u);var Z=this.lexer.options&&this.lexer.options.ranges;if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;function X(y){j.length=j.length-2*y,v.length=v.length-y,w.length=w.length-y}function r(){var y=P.lexer.lex()||1;if(typeof y!=="number")y=P.symbols_[y]||y;return y}var A,c,V,i,Kv,vq,P_={},l_,g,J$,t_;while(!0){if(V=j[j.length-1],this.defaultActions[V])i=this.defaultActions[V];else{if(A===null||typeof A>"u")A=r();i=O[V]&&O[V][A]}if(typeof i>"u"||!i.length||!i[0]){var wq="";if(!h){t_=[];for(l_ in O[V])if(this.terminals_[l_]&&l_>2)t_.push("'"+this.terminals_[l_]+"'");if(this.lexer.showPosition)wq="Parse error on line "+(T+1)+`:
541
543
  `+this.lexer.showPosition()+`
542
544
  Expecting `+t_.join(", ")+", got '"+(this.terminals_[A]||A)+"'";else wq="Parse error on line "+(T+1)+": Unexpected "+(A==1?"end of input":"'"+(this.terminals_[A]||A)+"'");this.parseError(wq,{text:this.lexer.match,token:this.terminals_[A]||A,line:this.lexer.yylineno,loc:u,expected:t_})}}if(i[0]instanceof Array&&i.length>1)throw Error("Parse Error: multiple actions possible at state: "+V+", token: "+A);switch(i[0]){case 1:if(j.push(A),v.push(this.lexer.yytext),w.push(this.lexer.yylloc),j.push(i[1]),A=null,!c){if(k=this.lexer.yyleng,Y=this.lexer.yytext,T=this.lexer.yylineno,u=this.lexer.yylloc,h>0)h--}else A=c,c=null;break;case 2:if(g=this.productions_[i[1]][1],P_.$=v[v.length-g],P_._$={first_line:w[w.length-(g||1)].first_line,last_line:w[w.length-1].last_line,first_column:w[w.length-(g||1)].first_column,last_column:w[w.length-1].last_column},Z)P_._$.range=[w[w.length-(g||1)].range[0],w[w.length-1].range[1]];if(vq=this.performAction.call(P_,Y,k,T,this.yy,i[1],v,w),typeof vq<"u")return vq;if(g)j=j.slice(0,-1*g*2),v=v.slice(0,-1*g),w=w.slice(0,-1*g);j.push(this.productions_[i[1]][0]),v.push(P_.$),w.push(P_._$),J$=O[j[j.length-2]][j[j.length-1]],j.push(J$);break;case 3:return!0}}return!0}},_=function(){var f={EOF:1,parseError:function(P,j){if(this.yy.parser)this.yy.parser.parseError(P,j);else throw Error(P)},setInput:function(P){if(this._input=P,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},input:function(){var P=this._input[0];this.yytext+=P,this.yyleng++,this.offset++,this.match+=P,this.matched+=P;var j=P.match(/(?:\r\n?|\n).*/g);if(j)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),P},unput:function(P){var j=P.length,v=P.split(/(?:\r\n?|\n)/g);this._input=P+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-j-1),this.offset-=j;var w=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),v.length-1)this.yylineno-=v.length-1;var O=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:v?(v.length===w.length?this.yylloc.first_column:0)+w[w.length-v.length].length-v[0].length:this.yylloc.first_column-j},this.options.ranges)this.yylloc.range=[O[0],O[0]+this.yyleng-j];return this},more:function(){return this._more=!0,this},less:function(P){this.unput(this.match.slice(P))},pastInput:function(){var P=this.matched.substr(0,this.matched.length-this.match.length);return(P.length>20?"...":"")+P.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var P=this.match;if(P.length<20)P+=this._input.substr(0,20-P.length);return(P.substr(0,20)+(P.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var P=this.pastInput(),j=Array(P.length+1).join("-");return P+this.upcomingInput()+`
543
545
  `+j+"^"},next:function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var P,j,v,w,O,Y;if(!this._more)this.yytext="",this.match="";var T=this._currentRules();for(var k=0;k<T.length;k++)if(v=this._input.match(this.rules[T[k]]),v&&(!j||v[0].length>j[0].length)){if(j=v,w=k,!this.options.flex)break}if(j){if(Y=j[0].match(/(?:\r\n?|\n).*/g),Y)this.yylineno+=Y.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Y?Y[Y.length-1].length-Y[Y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+j[0].length},this.yytext+=j[0],this.match+=j[0],this.matches=j,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._input=this._input.slice(j[0].length),this.matched+=j[0],P=this.performAction.call(this,this.yy,this,T[w],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(P)return P;else return}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
544
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var P=this.next();if(typeof P<"u")return P;else return this.lex()},begin:function(P){this.conditionStack.push(P)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(P){this.begin(P)}};return f.options={},f.performAction=function(P,j,v,w){function O(T,k){return j.yytext=j.yytext.substring(T,j.yyleng-k+T)}var Y=w;switch(v){case 0:if(j.yytext.slice(-2)==="\\\\")O(0,1),this.begin("mu");else if(j.yytext.slice(-1)==="\\")O(0,1),this.begin("emu");else this.begin("mu");if(j.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:if(this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw")return 15;else return O(5,9),"END_RAW_BLOCK";break;case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(j.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return j.yytext=O(1,2).replace(/\\"/g,'"'),80;break;case 32:return j.yytext=O(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return j.yytext=j.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},f.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],f.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},f}();q.lexer=_;function $(){this.yy={}}return $.prototype=q,q.Parser=$,new $}();l8.default=w4;t8.exports=l8.default});var U_=J((E8,I8)=>{E8.__esModule=!0;function Y4(q){return q&&q.__esModule?q:{default:q}}var k4=l(),Eq=Y4(k4);function s_(){this.parents=[]}s_.prototype={constructor:s_,mutating:!1,acceptKey:function(_,$){var f=this.accept(_[$]);if(this.mutating){if(f&&!s_.prototype[f.type])throw new Eq.default('Unexpected node type "'+f.type+'" found when accepting '+$+" on "+_.type);_[$]=f}},acceptRequired:function(_,$){if(this.acceptKey(_,$),!_[$])throw new Eq.default(_.type+" requires "+$)},acceptArray:function(_){for(var $=0,f=_.length;$<f;$++)if(this.acceptKey(_,$),!_[$])_.splice($,1),$--,f--},accept:function(_){if(!_)return;if(!this[_.type])throw new Eq.default("Unknown type: "+_.type,_);if(this.current)this.parents.unshift(this.current);this.current=_;var $=this[_.type](_);if(this.current=this.parents.shift(),!this.mutating||$)return $;else if($!==!1)return _},Program:function(_){this.acceptArray(_.body)},MustacheStatement:B_,Decorator:B_,BlockStatement:a8,DecoratorBlock:a8,PartialStatement:R8,PartialBlockStatement:function(_){R8.call(this,_),this.acceptKey(_,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:B_,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(_){this.acceptArray(_.pairs)},HashPair:function(_){this.acceptRequired(_,"value")}};function B_(q){this.acceptRequired(q,"path"),this.acceptArray(q.params),this.acceptKey(q,"hash")}function a8(q){B_.call(this,q),this.acceptKey(q,"program"),this.acceptKey(q,"inverse")}function R8(q){this.acceptRequired(q,"name"),this.acceptArray(q.params),this.acceptKey(q,"hash")}E8.default=s_;I8.exports=E8.default});var D8=J((g8,y8)=>{g8.__esModule=!0;function H4(q){return q&&q.__esModule?q:{default:q}}var W4=U_(),J4=H4(W4);function I(){var q=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=q}I.prototype=new J4.default;I.prototype.Program=function(q){var _=!this.options.ignoreStandalone,$=!this.isRootSeen;this.isRootSeen=!0;var f=q.body;for(var K=0,P=f.length;K<P;K++){var j=f[K],v=this.accept(j);if(!v)continue;var w=Iq(f,K,$),O=gq(f,K,$),Y=v.openStandalone&&w,T=v.closeStandalone&&O,k=v.inlineStandalone&&w&&O;if(v.close)$_(f,K,!0);if(v.open)B(f,K,!0);if(_&&k){if($_(f,K),B(f,K)){if(j.type==="PartialStatement")j.indent=/([ \t]+$)/.exec(f[K-1].original)[1]}}if(_&&Y)$_((j.program||j.inverse).body),B(f,K);if(_&&T)$_(f,K),B((j.inverse||j.program).body)}return q};I.prototype.BlockStatement=I.prototype.DecoratorBlock=I.prototype.PartialBlockStatement=function(q){this.accept(q.program),this.accept(q.inverse);var _=q.program||q.inverse,$=q.program&&q.inverse,f=$,K=$;if($&&$.chained){f=$.body[0].program;while(K.chained)K=K.body[K.body.length-1].program}var P={open:q.openStrip.open,close:q.closeStrip.close,openStandalone:gq(_.body),closeStandalone:Iq((f||_).body)};if(q.openStrip.close)$_(_.body,null,!0);if($){var j=q.inverseStrip;if(j.open)B(_.body,null,!0);if(j.close)$_(f.body,null,!0);if(q.closeStrip.open)B(K.body,null,!0);if(!this.options.ignoreStandalone&&Iq(_.body)&&gq(f.body))B(_.body),$_(f.body)}else if(q.closeStrip.open)B(_.body,null,!0);return P};I.prototype.Decorator=I.prototype.MustacheStatement=function(q){return q.strip};I.prototype.PartialStatement=I.prototype.CommentStatement=function(q){var _=q.strip||{};return{inlineStandalone:!0,open:_.open,close:_.close}};function Iq(q,_,$){if(_===void 0)_=q.length;var f=q[_-1],K=q[_-2];if(!f)return $;if(f.type==="ContentStatement")return(K||!$?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(f.original)}function gq(q,_,$){if(_===void 0)_=-1;var f=q[_+1],K=q[_+2];if(!f)return $;if(f.type==="ContentStatement")return(K||!$?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(f.original)}function $_(q,_,$){var f=q[_==null?0:_+1];if(!f||f.type!=="ContentStatement"||!$&&f.rightStripped)return;var K=f.value;f.value=f.value.replace($?/^\s+/:/^[ \t]*\r?\n?/,""),f.rightStripped=f.value!==K}function B(q,_,$){var f=q[_==null?q.length-1:_-1];if(!f||f.type!=="ContentStatement"||!$&&f.leftStripped)return;var K=f.value;return f.value=f.value.replace($?/\s+$/:/[ \t]+$/,""),f.leftStripped=f.value!==K,f.leftStripped}g8.default=I;y8.exports=g8.default});var L8=J((C4)=>{C4.__esModule=!0;C4.SourceLocation=X4;C4.id=m4;C4.stripFlags=n4;C4.stripComment=p4;C4.preparePath=o4;C4.prepareMustache=G4;C4.prepareRawBlock=d4;C4.prepareBlock=e4;C4.prepareProgram=b4;C4.preparePartialBlock=S4;function u4(q){return q&&q.__esModule?q:{default:q}}var A4=l(),yq=u4(A4);function Dq(q,_){if(_=_.path?_.path.original:_,q.path.original!==_){var $={loc:q.path.loc};throw new yq.default(q.path.original+" doesn't match "+_,$)}}function X4(q,_){this.source=q,this.start={line:_.first_line,column:_.first_column},this.end={line:_.last_line,column:_.last_column}}function m4(q){if(/^\[.*\]$/.test(q))return q.substring(1,q.length-1);else return q}function n4(q,_){return{open:q.charAt(2)==="~",close:_.charAt(_.length-3)==="~"}}function p4(q){return q.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function o4(q,_,$){$=this.locInfo($);var f=q?"@":"",K=[],P=0;for(var j=0,v=_.length;j<v;j++){var w=_[j].part,O=_[j].original!==w;if(f+=(_[j].separator||"")+w,!O&&(w===".."||w==="."||w==="this")){if(K.length>0)throw new yq.default("Invalid path: "+f,{loc:$});else if(w==="..")P++}else K.push(w)}return{type:"PathExpression",data:q,depth:P,parts:K,original:f,loc:$}}function G4(q,_,$,f,K,P){var j=f.charAt(3)||f.charAt(2),v=j!=="{"&&j!=="&",w=/\*/.test(f);return{type:w?"Decorator":"MustacheStatement",path:q,params:_,hash:$,escaped:v,strip:K,loc:this.locInfo(P)}}function d4(q,_,$,f){Dq(q,$),f=this.locInfo(f);var K={type:"Program",body:_,strip:{},loc:f};return{type:"BlockStatement",path:q.path,params:q.params,hash:q.hash,program:K,openStrip:{},inverseStrip:{},closeStrip:{},loc:f}}function e4(q,_,$,f,K,P){if(f&&f.path)Dq(q,f);var j=/\*/.test(q.open);_.blockParams=q.blockParams;var v=void 0,w=void 0;if($){if(j)throw new yq.default("Unexpected inverse block on decorator",$);if($.chain)$.program.body[0].closeStrip=f.strip;w=$.strip,v=$.program}if(K)K=v,v=_,_=K;return{type:j?"DecoratorBlock":"BlockStatement",path:q.path,params:q.params,hash:q.hash,program:_,inverse:v,openStrip:q.strip,inverseStrip:w,closeStrip:f&&f.strip,loc:this.locInfo(P)}}function b4(q,_){if(!_&&q.length){var $=q[0].loc,f=q[q.length-1].loc;if($&&f)_={source:$.source,start:{line:$.start.line,column:$.start.column},end:{line:f.end.line,column:f.end.column}}}return{type:"Program",body:q,strip:{},loc:_}}function S4(q,_,$,f){return Dq(q,$),{type:"PartialBlockStatement",name:q.path,params:q.params,hash:q.hash,program:_,openStrip:q.strip,closeStrip:$&&$.strip,loc:this.locInfo(f)}}});var B8=J((F4)=>{F4.__esModule=!0;F4.parseWithoutProcessing=s8;F4.parse=U4;function g4(q){if(q&&q.__esModule)return q;else{var _={};if(q!=null){for(var $ in q)if(Object.prototype.hasOwnProperty.call(q,$))_[$]=q[$]}return _.default=q,_}}function x8(q){return q&&q.__esModule?q:{default:q}}var y4=c8(),Lq=x8(y4),D4=D8(),L4=x8(D4),x4=L8(),s4=g4(x4),B4=e();F4.parser=Lq.default;var F_={};B4.extend(F_,s4);function s8(q,_){if(q.type==="Program")return q;Lq.default.yy=F_,F_.locInfo=function(f){return new F_.SourceLocation(_&&_.srcName,f)};var $=Lq.default.parse(q);return $}function U4(q,_){var $=s8(q,_),f=new L4.default(_);return f.accept($)}});var _6=J((wj)=>{wj.__esModule=!0;wj.Compiler=xq;wj.precompile=jj;wj.compile=vj;function F8(q){return q&&q.__esModule?q:{default:q}}var fj=l(),S_=F8(fj),C_=e(),Kj=Rq(),b_=F8(Kj),Pj=[].slice;function xq(){}xq.prototype={compiler:xq,equals:function(_){var $=this.opcodes.length;if(_.opcodes.length!==$)return!1;for(var f=0;f<$;f++){var K=this.opcodes[f],P=_.opcodes[f];if(K.opcode!==P.opcode||!Q8(K.args,P.args))return!1}$=this.children.length;for(var f=0;f<$;f++)if(!this.children[f].equals(_.children[f]))return!1;return!0},guid:0,compile:function(_,$){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=$,this.stringParams=$.stringParams,this.trackIds=$.trackIds,$.blockParams=$.blockParams||[],$.knownHelpers=C_.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},$.knownHelpers),this.accept(_)},compileProgram:function(_){var $=new this.compiler,f=$.compile(_,this.options),K=this.guid++;return this.usePartial=this.usePartial||f.usePartial,this.children[K]=f,this.useDepths=this.useDepths||f.useDepths,K},accept:function(_){if(!this[_.type])throw new S_.default("Unknown type: "+_.type,_);this.sourceNode.unshift(_);var $=this[_.type](_);return this.sourceNode.shift(),$},Program:function(_){this.options.blockParams.unshift(_.blockParams);var $=_.body,f=$.length;for(var K=0;K<f;K++)this.accept($[K]);return this.options.blockParams.shift(),this.isSimple=f===1,this.blockParams=_.blockParams?_.blockParams.length:0,this},BlockStatement:function(_){U8(_);var{program:$,inverse:f}=_;$=$&&this.compileProgram($),f=f&&this.compileProgram(f);var K=this.classifySexpr(_);if(K==="helper")this.helperSexpr(_,$,f);else if(K==="simple")this.simpleSexpr(_),this.opcode("pushProgram",$),this.opcode("pushProgram",f),this.opcode("emptyHash"),this.opcode("blockValue",_.path.original);else this.ambiguousSexpr(_,$,f),this.opcode("pushProgram",$),this.opcode("pushProgram",f),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue");this.opcode("append")},DecoratorBlock:function(_){var $=_.program&&this.compileProgram(_.program),f=this.setupFullMustacheParams(_,$,void 0),K=_.path;this.useDecorators=!0,this.opcode("registerDecorator",f.length,K.original)},PartialStatement:function(_){this.usePartial=!0;var $=_.program;if($)$=this.compileProgram(_.program);var f=_.params;if(f.length>1)throw new S_.default("Unsupported number of partial arguments: "+f.length,_);else if(!f.length)if(this.options.explicitPartialContext)this.opcode("pushLiteral","undefined");else f.push({type:"PathExpression",parts:[],depth:0});var K=_.name.original,P=_.name.type==="SubExpression";if(P)this.accept(_.name);this.setupFullMustacheParams(_,$,void 0,!0);var j=_.indent||"";if(this.options.preventIndent&&j)this.opcode("appendContent",j),j="";this.opcode("invokePartial",P,K,j),this.opcode("append")},PartialBlockStatement:function(_){this.PartialStatement(_)},MustacheStatement:function(_){if(this.SubExpression(_),_.escaped&&!this.options.noEscape)this.opcode("appendEscaped");else this.opcode("append")},Decorator:function(_){this.DecoratorBlock(_)},ContentStatement:function(_){if(_.value)this.opcode("appendContent",_.value)},CommentStatement:function(){},SubExpression:function(_){U8(_);var $=this.classifySexpr(_);if($==="simple")this.simpleSexpr(_);else if($==="helper")this.helperSexpr(_);else this.ambiguousSexpr(_)},ambiguousSexpr:function(_,$,f){var K=_.path,P=K.parts[0],j=$!=null||f!=null;this.opcode("getContext",K.depth),this.opcode("pushProgram",$),this.opcode("pushProgram",f),K.strict=!0,this.accept(K),this.opcode("invokeAmbiguous",P,j)},simpleSexpr:function(_){var $=_.path;$.strict=!0,this.accept($),this.opcode("resolvePossibleLambda")},helperSexpr:function(_,$,f){var K=this.setupFullMustacheParams(_,$,f),P=_.path,j=P.parts[0];if(this.options.knownHelpers[j])this.opcode("invokeKnownHelper",K.length,j);else if(this.options.knownHelpersOnly)throw new S_.default("You specified knownHelpersOnly, but used the unknown helper "+j,_);else P.strict=!0,P.falsy=!0,this.accept(P),this.opcode("invokeHelper",K.length,P.original,b_.default.helpers.simpleId(P))},PathExpression:function(_){this.addDepth(_.depth),this.opcode("getContext",_.depth);var $=_.parts[0],f=b_.default.helpers.scopedId(_),K=!_.depth&&!f&&this.blockParamIndex($);if(K)this.opcode("lookupBlockParam",K,_.parts);else if(!$)this.opcode("pushContext");else if(_.data)this.options.data=!0,this.opcode("lookupData",_.depth,_.parts,_.strict);else this.opcode("lookupOnContext",_.parts,_.falsy,_.strict,f)},StringLiteral:function(_){this.opcode("pushString",_.value)},NumberLiteral:function(_){this.opcode("pushLiteral",_.value)},BooleanLiteral:function(_){this.opcode("pushLiteral",_.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(_){var $=_.pairs,f=0,K=$.length;this.opcode("pushHash");for(;f<K;f++)this.pushParam($[f].value);while(f--)this.opcode("assignToHash",$[f].key);this.opcode("popHash")},opcode:function(_){this.opcodes.push({opcode:_,args:Pj.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(_){if(!_)return;this.useDepths=!0},classifySexpr:function(_){var $=b_.default.helpers.simpleId(_.path),f=$&&!!this.blockParamIndex(_.path.parts[0]),K=!f&&b_.default.helpers.helperExpression(_),P=!f&&(K||$);if(P&&!K){var j=_.path.parts[0],v=this.options;if(v.knownHelpers[j])K=!0;else if(v.knownHelpersOnly)P=!1}if(K)return"helper";else if(P)return"ambiguous";else return"simple"},pushParams:function(_){for(var $=0,f=_.length;$<f;$++)this.pushParam(_[$])},pushParam:function(_){var $=_.value!=null?_.value:_.original||"";if(this.stringParams){if($.replace)$=$.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".");if(_.depth)this.addDepth(_.depth);if(this.opcode("getContext",_.depth||0),this.opcode("pushStringParam",$,_.type),_.type==="SubExpression")this.accept(_)}else{if(this.trackIds){var f=void 0;if(_.parts&&!b_.default.helpers.scopedId(_)&&!_.depth)f=this.blockParamIndex(_.parts[0]);if(f){var K=_.parts.slice(1).join(".");this.opcode("pushId","BlockParam",f,K)}else{if($=_.original||$,$.replace)$=$.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"");this.opcode("pushId",_.type,$)}}this.accept(_)}},setupFullMustacheParams:function(_,$,f,K){var P=_.params;if(this.pushParams(P),this.opcode("pushProgram",$),this.opcode("pushProgram",f),_.hash)this.accept(_.hash);else this.opcode("emptyHash",K);return P},blockParamIndex:function(_){for(var $=0,f=this.options.blockParams.length;$<f;$++){var K=this.options.blockParams[$],P=K&&C_.indexOf(K,_);if(K&&P>=0)return[$,P]}}};function jj(q,_,$){if(q==null||typeof q!=="string"&&q.type!=="Program")throw new S_.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+q);if(_=_||{},!("data"in _))_.data=!0;if(_.compat)_.useDepths=!0;var f=$.parse(q,_),K=new $.Compiler().compile(f,_);return new $.JavaScriptCompiler().compile(K,_)}function vj(q,_,$){if(_===void 0)_={};if(q==null||typeof q!=="string"&&q.type!=="Program")throw new S_.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+q);if(_=C_.extend({},_),!("data"in _))_.data=!0;if(_.compat)_.useDepths=!0;var f=void 0;function K(){var j=$.parse(q,_),v=new $.Compiler().compile(j,_),w=new $.JavaScriptCompiler().compile(v,_,void 0,!0);return $.template(w)}function P(j,v){if(!f)f=K();return f.call(this,j,v)}return P._setup=function(j){if(!f)f=K();return f._setup(j)},P._child=function(j,v,w,O){if(!f)f=K();return f._child(j,v,w,O)},P}function Q8(q,_){if(q===_)return!0;if(C_.isArray(q)&&C_.isArray(_)&&q.length===_.length){for(var $=0;$<q.length;$++)if(!Q8(q[$],_[$]))return!1;return!0}}function U8(q){if(!q.path.parts){var _=q.path;q.path={type:"PathExpression",data:!1,depth:0,parts:[_.original+""],original:_.original+"",loc:_.loc}}}});var $6=J((hj)=>{var q6="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");hj.encode=function(q){if(0<=q&&q<q6.length)return q6[q];throw TypeError("Must be between 0 and 63: "+q)};hj.decode=function(q){var _=65,$=90,f=97,K=122,P=48,j=57,v=43,w=47,O=26,Y=52;if(_<=q&&q<=$)return q-_;if(f<=q&&q<=K)return q-f+O;if(P<=q&&q<=j)return q-P+Y;if(q==v)return 62;if(q==w)return 63;return-1}});var Bq=J((Zj)=>{var f6=$6(),sq=5,K6=1<<sq,P6=K6-1,j6=K6;function Wj(q){return q<0?(-q<<1)+1:(q<<1)+0}function Jj(q){var _=(q&1)===1,$=q>>1;return _?-$:$}Zj.encode=function(_){var $="",f,K=Wj(_);do{if(f=K&P6,K>>>=sq,K>0)f|=j6;$+=f6.encode(f)}while(K>0);return $};Zj.decode=function(_,$,f){var K=_.length,P=0,j=0,v,w;do{if($>=K)throw Error("Expected more digits in base 64 VLQ value.");if(w=f6.decode(_.charCodeAt($++)),w===-1)throw Error("Invalid base64 digit: "+_.charAt($-1));v=!!(w&j6),w&=P6,P=P+(w<<j),j+=sq}while(v);f.value=Jj(P),f.rest=$}});var H_=J((Sj)=>{function Aj(q,_,$){if(_ in q)return q[_];else if(arguments.length===3)return $;else throw Error('"'+_+'" is a required argument.')}Sj.getArg=Aj;var v6=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Xj=/^data:.+\,.+$/;function M_(q){var _=q.match(v6);if(!_)return null;return{scheme:_[1],auth:_[2],host:_[3],port:_[4],path:_[5]}}Sj.urlParse=M_;function h_(q){var _="";if(q.scheme)_+=q.scheme+":";if(_+="//",q.auth)_+=q.auth+"@";if(q.host)_+=q.host;if(q.port)_+=":"+q.port;if(q.path)_+=q.path;return _}Sj.urlGenerate=h_;function Uq(q){var _=q,$=M_(q);if($){if(!$.path)return q;_=$.path}var f=Sj.isAbsolute(_),K=_.split(/\/+/);for(var P,j=0,v=K.length-1;v>=0;v--)if(P=K[v],P===".")K.splice(v,1);else if(P==="..")j++;else if(j>0)if(P==="")K.splice(v+1,j),j=0;else K.splice(v,2),j--;if(_=K.join("/"),_==="")_=f?"/":".";if($)return $.path=_,h_($);return _}Sj.normalize=Uq;function w6(q,_){if(q==="")q=".";if(_==="")_=".";var $=M_(_),f=M_(q);if(f)q=f.path||"/";if($&&!$.scheme){if(f)$.scheme=f.scheme;return h_($)}if($||_.match(Xj))return _;if(f&&!f.host&&!f.path)return f.host=_,h_(f);var K=_.charAt(0)==="/"?_:Uq(q.replace(/\/+$/,"")+"/"+_);if(f)return f.path=K,h_(f);return K}Sj.join=w6;Sj.isAbsolute=function(q){return q.charAt(0)==="/"||v6.test(q)};function mj(q,_){if(q==="")q=".";q=q.replace(/\/$/,"");var $=0;while(_.indexOf(q+"/")!==0){var f=q.lastIndexOf("/");if(f<0)return _;if(q=q.slice(0,f),q.match(/^([^\/]+:\/)?\/*$/))return _;++$}return Array($+1).join("../")+_.substr(q.length+1)}Sj.relative=mj;var O6=function(){var q=Object.create(null);return!("__proto__"in q)}();function T6(q){return q}function nj(q){if(Y6(q))return"$"+q;return q}Sj.toSetString=O6?T6:nj;function pj(q){if(Y6(q))return q.slice(1);return q}Sj.fromSetString=O6?T6:pj;function Y6(q){if(!q)return!1;var _=q.length;if(_<9)return!1;if(q.charCodeAt(_-1)!==95||q.charCodeAt(_-2)!==95||q.charCodeAt(_-3)!==111||q.charCodeAt(_-4)!==116||q.charCodeAt(_-5)!==111||q.charCodeAt(_-6)!==114||q.charCodeAt(_-7)!==112||q.charCodeAt(_-8)!==95||q.charCodeAt(_-9)!==95)return!1;for(var $=_-10;$>=0;$--)if(q.charCodeAt($)!==36)return!1;return!0}function oj(q,_,$){var f=z_(q.source,_.source);if(f!==0)return f;if(f=q.originalLine-_.originalLine,f!==0)return f;if(f=q.originalColumn-_.originalColumn,f!==0||$)return f;if(f=q.generatedColumn-_.generatedColumn,f!==0)return f;if(f=q.generatedLine-_.generatedLine,f!==0)return f;return z_(q.name,_.name)}Sj.compareByOriginalPositions=oj;function Gj(q,_,$){var f=q.generatedLine-_.generatedLine;if(f!==0)return f;if(f=q.generatedColumn-_.generatedColumn,f!==0||$)return f;if(f=z_(q.source,_.source),f!==0)return f;if(f=q.originalLine-_.originalLine,f!==0)return f;if(f=q.originalColumn-_.originalColumn,f!==0)return f;return z_(q.name,_.name)}Sj.compareByGeneratedPositionsDeflated=Gj;function z_(q,_){if(q===_)return 0;if(q===null)return 1;if(_===null)return-1;if(q>_)return 1;return-1}function dj(q,_){var $=q.generatedLine-_.generatedLine;if($!==0)return $;if($=q.generatedColumn-_.generatedColumn,$!==0)return $;if($=z_(q.source,_.source),$!==0)return $;if($=q.originalLine-_.originalLine,$!==0)return $;if($=q.originalColumn-_.originalColumn,$!==0)return $;return z_(q.name,_.name)}Sj.compareByGeneratedPositionsInflated=dj;function ej(q){return JSON.parse(q.replace(/^\)]}'[^\n]*\n/,""))}Sj.parseSourceMapInput=ej;function bj(q,_,$){if(_=_||"",q){if(q[q.length-1]!=="/"&&_[0]!=="/")q+="/";_=q+_}if($){var f=M_($);if(!f)throw Error("sourceMapURL could not be parsed");if(f.path){var K=f.path.lastIndexOf("/");if(K>=0)f.path=f.path.substring(0,K+1)}_=w6(h_(f),_)}return Uq(_)}Sj.computeSourceURL=bj});var _$=J((Dj)=>{var Fq=H_(),Qq=Object.prototype.hasOwnProperty,f_=typeof Map<"u";function s(){this._array=[],this._set=f_?new Map:Object.create(null)}s.fromArray=function(_,$){var f=new s;for(var K=0,P=_.length;K<P;K++)f.add(_[K],$);return f};s.prototype.size=function(){return f_?this._set.size:Object.getOwnPropertyNames(this._set).length};s.prototype.add=function(_,$){var f=f_?_:Fq.toSetString(_),K=f_?this.has(_):Qq.call(this._set,f),P=this._array.length;if(!K||$)this._array.push(_);if(!K)if(f_)this._set.set(_,P);else this._set[f]=P};s.prototype.has=function(_){if(f_)return this._set.has(_);else{var $=Fq.toSetString(_);return Qq.call(this._set,$)}};s.prototype.indexOf=function(_){if(f_){var $=this._set.get(_);if($>=0)return $}else{var f=Fq.toSetString(_);if(Qq.call(this._set,f))return this._set[f]}throw Error('"'+_+'" is not in the set.')};s.prototype.at=function(_){if(_>=0&&_<this._array.length)return this._array[_];throw Error("No element indexed by "+_)};s.prototype.toArray=function(){return this._array.slice()};Dj.ArraySet=s});var h6=J((sj)=>{var k6=H_();function xj(q,_){var $=q.generatedLine,f=_.generatedLine,K=q.generatedColumn,P=_.generatedColumn;return f>$||f==$&&P>=K||k6.compareByGeneratedPositionsInflated(q,_)<=0}function Q_(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Q_.prototype.unsortedForEach=function(_,$){this._array.forEach(_,$)};Q_.prototype.add=function(_){if(xj(this._last,_))this._last=_,this._array.push(_);else this._sorted=!1,this._array.push(_)};Q_.prototype.toArray=function(){if(!this._sorted)this._array.sort(k6.compareByGeneratedPositionsInflated),this._sorted=!0;return this._array};sj.MappingList=Q_});var q$=J((Fj)=>{var V_=Bq(),o=H_(),_q=_$().ArraySet,Uj=h6().MappingList;function t(q){if(!q)q={};this._file=o.getArg(q,"file",null),this._sourceRoot=o.getArg(q,"sourceRoot",null),this._skipValidation=o.getArg(q,"skipValidation",!1),this._sources=new _q,this._names=new _q,this._mappings=new Uj,this._sourcesContents=null}t.prototype._version=3;t.fromSourceMap=function(_){var $=_.sourceRoot,f=new t({file:_.file,sourceRoot:$});return _.eachMapping(function(K){var P={generated:{line:K.generatedLine,column:K.generatedColumn}};if(K.source!=null){if(P.source=K.source,$!=null)P.source=o.relative($,P.source);if(P.original={line:K.originalLine,column:K.originalColumn},K.name!=null)P.name=K.name}f.addMapping(P)}),_.sources.forEach(function(K){var P=K;if($!==null)P=o.relative($,K);if(!f._sources.has(P))f._sources.add(P);var j=_.sourceContentFor(K);if(j!=null)f.setSourceContent(K,j)}),f};t.prototype.addMapping=function(_){var $=o.getArg(_,"generated"),f=o.getArg(_,"original",null),K=o.getArg(_,"source",null),P=o.getArg(_,"name",null);if(!this._skipValidation)this._validateMapping($,f,K,P);if(K!=null){if(K=String(K),!this._sources.has(K))this._sources.add(K)}if(P!=null){if(P=String(P),!this._names.has(P))this._names.add(P)}this._mappings.add({generatedLine:$.line,generatedColumn:$.column,originalLine:f!=null&&f.line,originalColumn:f!=null&&f.column,source:K,name:P})};t.prototype.setSourceContent=function(_,$){var f=_;if(this._sourceRoot!=null)f=o.relative(this._sourceRoot,f);if($!=null){if(!this._sourcesContents)this._sourcesContents=Object.create(null);this._sourcesContents[o.toSetString(f)]=$}else if(this._sourcesContents){if(delete this._sourcesContents[o.toSetString(f)],Object.keys(this._sourcesContents).length===0)this._sourcesContents=null}};t.prototype.applySourceMap=function(_,$,f){var K=$;if($==null){if(_.file==null)throw Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);K=_.file}var P=this._sourceRoot;if(P!=null)K=o.relative(P,K);var j=new _q,v=new _q;this._mappings.unsortedForEach(function(w){if(w.source===K&&w.originalLine!=null){var O=_.originalPositionFor({line:w.originalLine,column:w.originalColumn});if(O.source!=null){if(w.source=O.source,f!=null)w.source=o.join(f,w.source);if(P!=null)w.source=o.relative(P,w.source);if(w.originalLine=O.line,w.originalColumn=O.column,O.name!=null)w.name=O.name}}var Y=w.source;if(Y!=null&&!j.has(Y))j.add(Y);var T=w.name;if(T!=null&&!v.has(T))v.add(T)},this),this._sources=j,this._names=v,_.sources.forEach(function(w){var O=_.sourceContentFor(w);if(O!=null){if(f!=null)w=o.join(f,w);if(P!=null)w=o.relative(P,w);this.setSourceContent(w,O)}},this)};t.prototype._validateMapping=function(_,$,f,K){if($&&typeof $.line!=="number"&&typeof $.column!=="number")throw Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(_&&"line"in _&&"column"in _&&_.line>0&&_.column>=0&&!$&&!f&&!K)return;else if(_&&"line"in _&&"column"in _&&$&&"line"in $&&"column"in $&&_.line>0&&_.column>=0&&$.line>0&&$.column>=0&&f)return;else throw Error("Invalid mapping: "+JSON.stringify({generated:_,source:f,original:$,name:K}))};t.prototype._serializeMappings=function(){var _=0,$=1,f=0,K=0,P=0,j=0,v="",w,O,Y,T,k=this._mappings.toArray();for(var h=0,W=k.length;h<W;h++){if(O=k[h],w="",O.generatedLine!==$){_=0;while(O.generatedLine!==$)w+=";",$++}else if(h>0){if(!o.compareByGeneratedPositionsInflated(O,k[h-1]))continue;w+=","}if(w+=V_.encode(O.generatedColumn-_),_=O.generatedColumn,O.source!=null){if(T=this._sources.indexOf(O.source),w+=V_.encode(T-j),j=T,w+=V_.encode(O.originalLine-1-K),K=O.originalLine-1,w+=V_.encode(O.originalColumn-f),f=O.originalColumn,O.name!=null)Y=this._names.indexOf(O.name),w+=V_.encode(Y-P),P=Y}v+=w}return v};t.prototype._generateSourcesContent=function(_,$){return _.map(function(f){if(!this._sourcesContents)return null;if($!=null)f=o.relative($,f);var K=o.toSetString(f);return Object.prototype.hasOwnProperty.call(this._sourcesContents,K)?this._sourcesContents[K]:null},this)};t.prototype.toJSON=function(){var _={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null)_.file=this._file;if(this._sourceRoot!=null)_.sourceRoot=this._sourceRoot;if(this._sourcesContents)_.sourcesContent=this._generateSourcesContent(_.sources,_.sourceRoot);return _};t.prototype.toString=function(){return JSON.stringify(this.toJSON())};Fj.SourceMapGenerator=t});var H6=J((_7)=>{_7.GREATEST_LOWER_BOUND=1;_7.LEAST_UPPER_BOUND=2;function $$(q,_,$,f,K,P){var j=Math.floor((_-q)/2)+q,v=K($,f[j],!0);if(v===0)return j;else if(v>0){if(_-j>1)return $$(j,_,$,f,K,P);if(P==_7.LEAST_UPPER_BOUND)return _<f.length?_:-1;else return j}else{if(j-q>1)return $$(q,j,$,f,K,P);if(P==_7.LEAST_UPPER_BOUND)return j;else return q<0?-1:q}}_7.search=function(_,$,f,K){if($.length===0)return-1;var P=$$(-1,$.length,_,$,f,K||_7.GREATEST_LOWER_BOUND);if(P<0)return-1;while(P-1>=0){if(f($[P],$[P-1],!0)!==0)break;--P}return P}});var W6=J((f7)=>{function K$(q,_,$){var f=q[_];q[_]=q[$],q[$]=f}function $7(q,_){return Math.round(q+Math.random()*(_-q))}function P$(q,_,$,f){if($<f){var K=$7($,f),P=$-1;K$(q,K,f);var j=q[f];for(var v=$;v<f;v++)if(_(q[v],j)<=0)P+=1,K$(q,P,v);K$(q,P+1,v);var w=P+1;P$(q,_,$,w-1),P$(q,_,w+1,f)}}f7.quickSort=function(q,_){P$(q,_,0,q.length-1)}});var Z6=J((j7)=>{var z=H_(),j$=H6(),W_=_$().ArraySet,P7=Bq(),i_=W6().quickSort;function m(q,_){var $=q;if(typeof q==="string")$=z.parseSourceMapInput(q);return $.sections!=null?new R($,_):new G($,_)}m.fromSourceMap=function(q,_){return G.fromSourceMap(q,_)};m.prototype._version=3;m.prototype.__generatedMappings=null;Object.defineProperty(m.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__generatedMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__generatedMappings}});m.prototype.__originalMappings=null;Object.defineProperty(m.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__originalMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__originalMappings}});m.prototype._charIsMappingSeparator=function(_,$){var f=_.charAt($);return f===";"||f===","};m.prototype._parseMappings=function(_,$){throw Error("Subclasses must implement _parseMappings")};m.GENERATED_ORDER=1;m.ORIGINAL_ORDER=2;m.GREATEST_LOWER_BOUND=1;m.LEAST_UPPER_BOUND=2;m.prototype.eachMapping=function(_,$,f){var K=$||null,P=f||m.GENERATED_ORDER,j;switch(P){case m.GENERATED_ORDER:j=this._generatedMappings;break;case m.ORIGINAL_ORDER:j=this._originalMappings;break;default:throw Error("Unknown order of iteration.")}var v=this.sourceRoot;j.map(function(w){var O=w.source===null?null:this._sources.at(w.source);return O=z.computeSourceURL(v,O,this._sourceMapURL),{source:O,generatedLine:w.generatedLine,generatedColumn:w.generatedColumn,originalLine:w.originalLine,originalColumn:w.originalColumn,name:w.name===null?null:this._names.at(w.name)}},this).forEach(_,K)};m.prototype.allGeneratedPositionsFor=function(_){var $=z.getArg(_,"line"),f={source:z.getArg(_,"source"),originalLine:$,originalColumn:z.getArg(_,"column",0)};if(f.source=this._findSourceIndex(f.source),f.source<0)return[];var K=[],P=this._findMapping(f,this._originalMappings,"originalLine","originalColumn",z.compareByOriginalPositions,j$.LEAST_UPPER_BOUND);if(P>=0){var j=this._originalMappings[P];if(_.column===void 0){var v=j.originalLine;while(j&&j.originalLine===v)K.push({line:z.getArg(j,"generatedLine",null),column:z.getArg(j,"generatedColumn",null),lastColumn:z.getArg(j,"lastGeneratedColumn",null)}),j=this._originalMappings[++P]}else{var w=j.originalColumn;while(j&&j.originalLine===$&&j.originalColumn==w)K.push({line:z.getArg(j,"generatedLine",null),column:z.getArg(j,"generatedColumn",null),lastColumn:z.getArg(j,"lastGeneratedColumn",null)}),j=this._originalMappings[++P]}}return K};j7.SourceMapConsumer=m;function G(q,_){var $=q;if(typeof q==="string")$=z.parseSourceMapInput(q);var f=z.getArg($,"version"),K=z.getArg($,"sources"),P=z.getArg($,"names",[]),j=z.getArg($,"sourceRoot",null),v=z.getArg($,"sourcesContent",null),w=z.getArg($,"mappings"),O=z.getArg($,"file",null);if(f!=this._version)throw Error("Unsupported version: "+f);if(j)j=z.normalize(j);K=K.map(String).map(z.normalize).map(function(Y){return j&&z.isAbsolute(j)&&z.isAbsolute(Y)?z.relative(j,Y):Y}),this._names=W_.fromArray(P.map(String),!0),this._sources=W_.fromArray(K,!0),this._absoluteSources=this._sources.toArray().map(function(Y){return z.computeSourceURL(j,Y,_)}),this.sourceRoot=j,this.sourcesContent=v,this._mappings=w,this._sourceMapURL=_,this.file=O}G.prototype=Object.create(m.prototype);G.prototype.consumer=m;G.prototype._findSourceIndex=function(q){var _=q;if(this.sourceRoot!=null)_=z.relative(this.sourceRoot,_);if(this._sources.has(_))return this._sources.indexOf(_);var $;for($=0;$<this._absoluteSources.length;++$)if(this._absoluteSources[$]==q)return $;return-1};G.fromSourceMap=function(_,$){var f=Object.create(G.prototype),K=f._names=W_.fromArray(_._names.toArray(),!0),P=f._sources=W_.fromArray(_._sources.toArray(),!0);f.sourceRoot=_._sourceRoot,f.sourcesContent=_._generateSourcesContent(f._sources.toArray(),f.sourceRoot),f.file=_._file,f._sourceMapURL=$,f._absoluteSources=f._sources.toArray().map(function(h){return z.computeSourceURL(f.sourceRoot,h,$)});var j=_._mappings.toArray().slice(),v=f.__generatedMappings=[],w=f.__originalMappings=[];for(var O=0,Y=j.length;O<Y;O++){var T=j[O],k=new J6;if(k.generatedLine=T.generatedLine,k.generatedColumn=T.generatedColumn,T.source){if(k.source=P.indexOf(T.source),k.originalLine=T.originalLine,k.originalColumn=T.originalColumn,T.name)k.name=K.indexOf(T.name);w.push(k)}v.push(k)}return i_(f.__originalMappings,z.compareByOriginalPositions),f};G.prototype._version=3;Object.defineProperty(G.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function J6(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}G.prototype._parseMappings=function(_,$){var f=1,K=0,P=0,j=0,v=0,w=0,O=_.length,Y=0,T={},k={},h=[],W=[],H,u,Z,X,r;while(Y<O)if(_.charAt(Y)===";")f++,Y++,K=0;else if(_.charAt(Y)===",")Y++;else{H=new J6,H.generatedLine=f;for(X=Y;X<O;X++)if(this._charIsMappingSeparator(_,X))break;if(u=_.slice(Y,X),Z=T[u],Z)Y+=u.length;else{Z=[];while(Y<X)P7.decode(_,Y,k),r=k.value,Y=k.rest,Z.push(r);if(Z.length===2)throw Error("Found a source, but no line and column");if(Z.length===3)throw Error("Found a source and line, but no column");T[u]=Z}if(H.generatedColumn=K+Z[0],K=H.generatedColumn,Z.length>1){if(H.source=v+Z[1],v+=Z[1],H.originalLine=P+Z[2],P=H.originalLine,H.originalLine+=1,H.originalColumn=j+Z[3],j=H.originalColumn,Z.length>4)H.name=w+Z[4],w+=Z[4]}if(W.push(H),typeof H.originalLine==="number")h.push(H)}i_(W,z.compareByGeneratedPositionsDeflated),this.__generatedMappings=W,i_(h,z.compareByOriginalPositions),this.__originalMappings=h};G.prototype._findMapping=function(_,$,f,K,P,j){if(_[f]<=0)throw TypeError("Line must be greater than or equal to 1, got "+_[f]);if(_[K]<0)throw TypeError("Column must be greater than or equal to 0, got "+_[K]);return j$.search(_,$,P,j)};G.prototype.computeColumnSpans=function(){for(var _=0;_<this._generatedMappings.length;++_){var $=this._generatedMappings[_];if(_+1<this._generatedMappings.length){var f=this._generatedMappings[_+1];if($.generatedLine===f.generatedLine){$.lastGeneratedColumn=f.generatedColumn-1;continue}}$.lastGeneratedColumn=1/0}};G.prototype.originalPositionFor=function(_){var $={generatedLine:z.getArg(_,"line"),generatedColumn:z.getArg(_,"column")},f=this._findMapping($,this._generatedMappings,"generatedLine","generatedColumn",z.compareByGeneratedPositionsDeflated,z.getArg(_,"bias",m.GREATEST_LOWER_BOUND));if(f>=0){var K=this._generatedMappings[f];if(K.generatedLine===$.generatedLine){var P=z.getArg(K,"source",null);if(P!==null)P=this._sources.at(P),P=z.computeSourceURL(this.sourceRoot,P,this._sourceMapURL);var j=z.getArg(K,"name",null);if(j!==null)j=this._names.at(j);return{source:P,line:z.getArg(K,"originalLine",null),column:z.getArg(K,"originalColumn",null),name:j}}}return{source:null,line:null,column:null,name:null}};G.prototype.hasContentsOfAllSources=function(){if(!this.sourcesContent)return!1;return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(_){return _==null})};G.prototype.sourceContentFor=function(_,$){if(!this.sourcesContent)return null;var f=this._findSourceIndex(_);if(f>=0)return this.sourcesContent[f];var K=_;if(this.sourceRoot!=null)K=z.relative(this.sourceRoot,K);var P;if(this.sourceRoot!=null&&(P=z.urlParse(this.sourceRoot))){var j=K.replace(/^file:\/\//,"");if(P.scheme=="file"&&this._sources.has(j))return this.sourcesContent[this._sources.indexOf(j)];if((!P.path||P.path=="/")&&this._sources.has("/"+K))return this.sourcesContent[this._sources.indexOf("/"+K)]}if($)return null;else throw Error('"'+K+'" is not in the SourceMap.')};G.prototype.generatedPositionFor=function(_){var $=z.getArg(_,"source");if($=this._findSourceIndex($),$<0)return{line:null,column:null,lastColumn:null};var f={source:$,originalLine:z.getArg(_,"line"),originalColumn:z.getArg(_,"column")},K=this._findMapping(f,this._originalMappings,"originalLine","originalColumn",z.compareByOriginalPositions,z.getArg(_,"bias",m.GREATEST_LOWER_BOUND));if(K>=0){var P=this._originalMappings[K];if(P.source===f.source)return{line:z.getArg(P,"generatedLine",null),column:z.getArg(P,"generatedColumn",null),lastColumn:z.getArg(P,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};j7.BasicSourceMapConsumer=G;function R(q,_){var $=q;if(typeof q==="string")$=z.parseSourceMapInput(q);var f=z.getArg($,"version"),K=z.getArg($,"sections");if(f!=this._version)throw Error("Unsupported version: "+f);this._sources=new W_,this._names=new W_;var P={line:-1,column:0};this._sections=K.map(function(j){if(j.url)throw Error("Support for url field in sections not implemented.");var v=z.getArg(j,"offset"),w=z.getArg(v,"line"),O=z.getArg(v,"column");if(w<P.line||w===P.line&&O<P.column)throw Error("Section offsets must be ordered and non-overlapping.");return P=v,{generatedOffset:{generatedLine:w+1,generatedColumn:O+1},consumer:new m(z.getArg(j,"map"),_)}})}R.prototype=Object.create(m.prototype);R.prototype.constructor=m;R.prototype._version=3;Object.defineProperty(R.prototype,"sources",{get:function(){var q=[];for(var _=0;_<this._sections.length;_++)for(var $=0;$<this._sections[_].consumer.sources.length;$++)q.push(this._sections[_].consumer.sources[$]);return q}});R.prototype.originalPositionFor=function(_){var $={generatedLine:z.getArg(_,"line"),generatedColumn:z.getArg(_,"column")},f=j$.search($,this._sections,function(P,j){var v=P.generatedLine-j.generatedOffset.generatedLine;if(v)return v;return P.generatedColumn-j.generatedOffset.generatedColumn}),K=this._sections[f];if(!K)return{source:null,line:null,column:null,name:null};return K.consumer.originalPositionFor({line:$.generatedLine-(K.generatedOffset.generatedLine-1),column:$.generatedColumn-(K.generatedOffset.generatedLine===$.generatedLine?K.generatedOffset.generatedColumn-1:0),bias:_.bias})};R.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(_){return _.consumer.hasContentsOfAllSources()})};R.prototype.sourceContentFor=function(_,$){for(var f=0;f<this._sections.length;f++){var K=this._sections[f],P=K.consumer.sourceContentFor(_,!0);if(P)return P}if($)return null;else throw Error('"'+_+'" is not in the SourceMap.')};R.prototype.generatedPositionFor=function(_){for(var $=0;$<this._sections.length;$++){var f=this._sections[$];if(f.consumer._findSourceIndex(z.getArg(_,"source"))===-1)continue;var K=f.consumer.generatedPositionFor(_);if(K){var P={line:K.line+(f.generatedOffset.generatedLine-1),column:K.column+(f.generatedOffset.generatedLine===K.line?f.generatedOffset.generatedColumn-1:0)};return P}}return{line:null,column:null}};R.prototype._parseMappings=function(_,$){this.__generatedMappings=[],this.__originalMappings=[];for(var f=0;f<this._sections.length;f++){var K=this._sections[f],P=K.consumer._generatedMappings;for(var j=0;j<P.length;j++){var v=P[j],w=K.consumer._sources.at(v.source);w=z.computeSourceURL(K.consumer.sourceRoot,w,this._sourceMapURL),this._sources.add(w),w=this._sources.indexOf(w);var O=null;if(v.name)O=K.consumer._names.at(v.name),this._names.add(O),O=this._names.indexOf(O);var Y={source:w,generatedLine:v.generatedLine+(K.generatedOffset.generatedLine-1),generatedColumn:v.generatedColumn+(K.generatedOffset.generatedLine===v.generatedLine?K.generatedOffset.generatedColumn-1:0),originalLine:v.originalLine,originalColumn:v.originalColumn,name:O};if(this.__generatedMappings.push(Y),typeof Y.originalLine==="number")this.__originalMappings.push(Y)}}i_(this.__generatedMappings,z.compareByGeneratedPositionsDeflated),i_(this.__originalMappings,z.compareByOriginalPositions)};j7.IndexedSourceMapConsumer=R});var r6=J((h7)=>{var T7=q$().SourceMapGenerator,qq=H_(),Y7=/(\r?\n)/,k7=10,J_="$$$isSourceNode$$$";function M(q,_,$,f,K){if(this.children=[],this.sourceContents={},this.line=q==null?null:q,this.column=_==null?null:_,this.source=$==null?null:$,this.name=K==null?null:K,this[J_]=!0,f!=null)this.add(f)}M.fromStringWithSourceMap=function(_,$,f){var K=new M,P=_.split(Y7),j=0,v=function(){var k=W(),h=W()||"";return k+h;function W(){return j<P.length?P[j++]:void 0}},w=1,O=0,Y=null;if($.eachMapping(function(k){if(Y!==null)if(w<k.generatedLine)T(Y,v()),w++,O=0;else{var h=P[j]||"",W=h.substr(0,k.generatedColumn-O);P[j]=h.substr(k.generatedColumn-O),O=k.generatedColumn,T(Y,W),Y=k;return}while(w<k.generatedLine)K.add(v()),w++;if(O<k.generatedColumn){var h=P[j]||"";K.add(h.substr(0,k.generatedColumn)),P[j]=h.substr(k.generatedColumn),O=k.generatedColumn}Y=k},this),j<P.length){if(Y)T(Y,v());K.add(P.splice(j).join(""))}return $.sources.forEach(function(k){var h=$.sourceContentFor(k);if(h!=null){if(f!=null)k=qq.join(f,k);K.setSourceContent(k,h)}}),K;function T(k,h){if(k===null||k.source===void 0)K.add(h);else{var W=f?qq.join(f,k.source):k.source;K.add(new M(k.originalLine,k.originalColumn,W,h,k.name))}}};M.prototype.add=function(_){if(Array.isArray(_))_.forEach(function($){this.add($)},this);else if(_[J_]||typeof _==="string"){if(_)this.children.push(_)}else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+_);return this};M.prototype.prepend=function(_){if(Array.isArray(_))for(var $=_.length-1;$>=0;$--)this.prepend(_[$]);else if(_[J_]||typeof _==="string")this.children.unshift(_);else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+_);return this};M.prototype.walk=function(_){var $;for(var f=0,K=this.children.length;f<K;f++)if($=this.children[f],$[J_])$.walk(_);else if($!=="")_($,{source:this.source,line:this.line,column:this.column,name:this.name})};M.prototype.join=function(_){var $,f,K=this.children.length;if(K>0){$=[];for(f=0;f<K-1;f++)$.push(this.children[f]),$.push(_);$.push(this.children[f]),this.children=$}return this};M.prototype.replaceRight=function(_,$){var f=this.children[this.children.length-1];if(f[J_])f.replaceRight(_,$);else if(typeof f==="string")this.children[this.children.length-1]=f.replace(_,$);else this.children.push("".replace(_,$));return this};M.prototype.setSourceContent=function(_,$){this.sourceContents[qq.toSetString(_)]=$};M.prototype.walkSourceContents=function(_){for(var $=0,f=this.children.length;$<f;$++)if(this.children[$][J_])this.children[$].walkSourceContents(_);var K=Object.keys(this.sourceContents);for(var $=0,f=K.length;$<f;$++)_(qq.fromSetString(K[$]),this.sourceContents[K[$]])};M.prototype.toString=function(){var _="";return this.walk(function($){_+=$}),_};M.prototype.toStringWithSourceMap=function(_){var $={code:"",line:1,column:0},f=new T7(_),K=!1,P=null,j=null,v=null,w=null;return this.walk(function(O,Y){if($.code+=O,Y.source!==null&&Y.line!==null&&Y.column!==null){if(P!==Y.source||j!==Y.line||v!==Y.column||w!==Y.name)f.addMapping({source:Y.source,original:{line:Y.line,column:Y.column},generated:{line:$.line,column:$.column},name:Y.name});P=Y.source,j=Y.line,v=Y.column,w=Y.name,K=!0}else if(K)f.addMapping({generated:{line:$.line,column:$.column}}),P=null,K=!1;for(var T=0,k=O.length;T<k;T++)if(O.charCodeAt(T)===k7){if($.line++,$.column=0,T+1===k)P=null,K=!1;else if(K)f.addMapping({source:Y.source,original:{line:Y.line,column:Y.column},generated:{line:$.line,column:$.column},name:Y.name})}else $.column++}),this.walkSourceContents(function(O,Y){f.setSourceContent(O,Y)}),{code:$.code,map:f}};h7.SourceNode=M});var u6=J((H7)=>{H7.SourceMapGenerator=q$().SourceMapGenerator;H7.SourceMapConsumer=Z6().SourceMapConsumer;H7.SourceNode=r6().SourceNode});var n6=J((X6,m6)=>{X6.__esModule=!0;var w$=e(),K_=void 0;try{if(typeof define!=="function"||!define.amd)O$=u6(),K_=O$.SourceNode}catch(q){}var O$;if(!K_)K_=function(q,_,$,f){if(this.src="",f)this.add(f)},K_.prototype={add:function(_){if(w$.isArray(_))_=_.join("");this.src+=_},prepend:function(_){if(w$.isArray(_))_=_.join("");this.src=_+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}};function v$(q,_,$){if(w$.isArray(q)){var f=[];for(var K=0,P=q.length;K<P;K++)f.push(_.wrap(q[K],$));return f}else if(typeof q==="boolean"||typeof q==="number")return q+"";return q}function A6(q){this.srcFile=q,this.source=[]}A6.prototype={isEmpty:function(){return!this.source.length},prepend:function(_,$){this.source.unshift(this.wrap(_,$))},push:function(_,$){this.source.push(this.wrap(_,$))},merge:function(){var _=this.empty();return this.each(function($){_.add([" ",$,`
545
- `])}),_},each:function(_){for(var $=0,f=this.source.length;$<f;$++)_(this.source[$])},empty:function(){var _=this.currentLocation||{start:{}};return new K_(_.start.line,_.start.column,this.srcFile)},wrap:function(_){var $=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];if(_ instanceof K_)return _;return _=v$(_,this,$),new K_($.start.line,$.start.column,this.srcFile,_)},functionCall:function(_,$,f){return f=this.generateList(f),this.wrap([_,$?"."+$+"(":"(",f,")"])},quotedString:function(_){return'"'+(_+"").replace(/\\/g,"\\\\").replace(/"/g,"\\\"").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(_){var $=this,f=[];Object.keys(_).forEach(function(P){var j=v$(_[P],$);if(j!=="undefined")f.push([$.quotedString(P),":",j])});var K=this.generateList(f);return K.prepend("{"),K.add("}"),K},generateList:function(_){var $=this.empty();for(var f=0,K=_.length;f<K;f++){if(f)$.add(",");$.add(v$(_[f],this))}return $},generateArray:function(_){var $=this.generateList(_);return $.prepend("["),$.add("]"),$}};X6.default=A6;m6.exports=X6.default});var b6=J((d6,e6)=>{d6.__esModule=!0;function G6(q){return q&&q.__esModule?q:{default:q}}var p6=L_(),A7=l(),T$=G6(A7),X7=e(),m7=n6(),o6=G6(m7);function Z_(q){this.value=q}function r_(){}r_.prototype={nameLookup:function(_,$){return this.internalNameLookup(_,$)},depthedLookup:function(_){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(_),")"]},compilerInfo:function(){var _=p6.COMPILER_REVISION,$=p6.REVISION_CHANGES[_];return[_,$]},appendToBuffer:function(_,$,f){if(!X7.isArray(_))_=[_];if(_=this.source.wrap(_,$),this.environment.isSimple)return["return ",_,";"];else if(f)return["buffer += ",_,";"];else return _.appendToBuffer=!0,_},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(_,$){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",_,",",JSON.stringify($),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(_,$,f,K){this.environment=_,this.options=$,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!K,this.name=this.environment.name,this.isChild=!!f,this.context=f||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(_,$),this.useDepths=this.useDepths||_.useDepths||_.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||_.useBlockParams;var P=_.opcodes,j=void 0,v=void 0,w=void 0,O=void 0;for(w=0,O=P.length;w<O;w++)j=P[w],this.source.currentLocation=j.loc,v=v||j.loc,this[j.opcode].apply(this,j.args);if(this.source.currentLocation=v,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new T$.default("Compile completed with content left on stack");if(!this.decorators.isEmpty())if(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
546
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var P=this.next();if(typeof P<"u")return P;else return this.lex()},begin:function(P){this.conditionStack.push(P)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(P){this.begin(P)}};return f.options={},f.performAction=function(P,j,v,w){function O(T,k){return j.yytext=j.yytext.substring(T,j.yyleng-k+T)}var Y=w;switch(v){case 0:if(j.yytext.slice(-2)==="\\\\")O(0,1),this.begin("mu");else if(j.yytext.slice(-1)==="\\")O(0,1),this.begin("emu");else this.begin("mu");if(j.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:if(this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw")return 15;else return O(5,9),"END_RAW_BLOCK";break;case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(j.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return j.yytext=O(1,2).replace(/\\"/g,'"'),80;break;case 32:return j.yytext=O(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return j.yytext=j.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},f.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],f.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},f}();q.lexer=_;function $(){this.yy={}}return $.prototype=q,q.Parser=$,new $}();l8.default=k4;t8.exports=l8.default});var U_=J((E8,I8)=>{E8.__esModule=!0;function H4(q){return q&&q.__esModule?q:{default:q}}var W4=l(),Eq=H4(W4);function s_(){this.parents=[]}s_.prototype={constructor:s_,mutating:!1,acceptKey:function(_,$){var f=this.accept(_[$]);if(this.mutating){if(f&&!s_.prototype[f.type])throw new Eq.default('Unexpected node type "'+f.type+'" found when accepting '+$+" on "+_.type);_[$]=f}},acceptRequired:function(_,$){if(this.acceptKey(_,$),!_[$])throw new Eq.default(_.type+" requires "+$)},acceptArray:function(_){for(var $=0,f=_.length;$<f;$++)if(this.acceptKey(_,$),!_[$])_.splice($,1),$--,f--},accept:function(_){if(!_)return;if(!this[_.type])throw new Eq.default("Unknown type: "+_.type,_);if(this.current)this.parents.unshift(this.current);this.current=_;var $=this[_.type](_);if(this.current=this.parents.shift(),!this.mutating||$)return $;else if($!==!1)return _},Program:function(_){this.acceptArray(_.body)},MustacheStatement:B_,Decorator:B_,BlockStatement:a8,DecoratorBlock:a8,PartialStatement:R8,PartialBlockStatement:function(_){R8.call(this,_),this.acceptKey(_,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:B_,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(_){this.acceptArray(_.pairs)},HashPair:function(_){this.acceptRequired(_,"value")}};function B_(q){this.acceptRequired(q,"path"),this.acceptArray(q.params),this.acceptKey(q,"hash")}function a8(q){B_.call(this,q),this.acceptKey(q,"program"),this.acceptKey(q,"inverse")}function R8(q){this.acceptRequired(q,"name"),this.acceptArray(q.params),this.acceptKey(q,"hash")}E8.default=s_;I8.exports=E8.default});var D8=J((g8,y8)=>{g8.__esModule=!0;function r4(q){return q&&q.__esModule?q:{default:q}}var u4=U_(),A4=r4(u4);function I(){var q=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=q}I.prototype=new A4.default;I.prototype.Program=function(q){var _=!this.options.ignoreStandalone,$=!this.isRootSeen;this.isRootSeen=!0;var f=q.body;for(var K=0,P=f.length;K<P;K++){var j=f[K],v=this.accept(j);if(!v)continue;var w=Iq(f,K,$),O=gq(f,K,$),Y=v.openStandalone&&w,T=v.closeStandalone&&O,k=v.inlineStandalone&&w&&O;if(v.close)$_(f,K,!0);if(v.open)B(f,K,!0);if(_&&k){if($_(f,K),B(f,K)){if(j.type==="PartialStatement")j.indent=/([ \t]+$)/.exec(f[K-1].original)[1]}}if(_&&Y)$_((j.program||j.inverse).body),B(f,K);if(_&&T)$_(f,K),B((j.inverse||j.program).body)}return q};I.prototype.BlockStatement=I.prototype.DecoratorBlock=I.prototype.PartialBlockStatement=function(q){this.accept(q.program),this.accept(q.inverse);var _=q.program||q.inverse,$=q.program&&q.inverse,f=$,K=$;if($&&$.chained){f=$.body[0].program;while(K.chained)K=K.body[K.body.length-1].program}var P={open:q.openStrip.open,close:q.closeStrip.close,openStandalone:gq(_.body),closeStandalone:Iq((f||_).body)};if(q.openStrip.close)$_(_.body,null,!0);if($){var j=q.inverseStrip;if(j.open)B(_.body,null,!0);if(j.close)$_(f.body,null,!0);if(q.closeStrip.open)B(K.body,null,!0);if(!this.options.ignoreStandalone&&Iq(_.body)&&gq(f.body))B(_.body),$_(f.body)}else if(q.closeStrip.open)B(_.body,null,!0);return P};I.prototype.Decorator=I.prototype.MustacheStatement=function(q){return q.strip};I.prototype.PartialStatement=I.prototype.CommentStatement=function(q){var _=q.strip||{};return{inlineStandalone:!0,open:_.open,close:_.close}};function Iq(q,_,$){if(_===void 0)_=q.length;var f=q[_-1],K=q[_-2];if(!f)return $;if(f.type==="ContentStatement")return(K||!$?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(f.original)}function gq(q,_,$){if(_===void 0)_=-1;var f=q[_+1],K=q[_+2];if(!f)return $;if(f.type==="ContentStatement")return(K||!$?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(f.original)}function $_(q,_,$){var f=q[_==null?0:_+1];if(!f||f.type!=="ContentStatement"||!$&&f.rightStripped)return;var K=f.value;f.value=f.value.replace($?/^\s+/:/^[ \t]*\r?\n?/,""),f.rightStripped=f.value!==K}function B(q,_,$){var f=q[_==null?q.length-1:_-1];if(!f||f.type!=="ContentStatement"||!$&&f.leftStripped)return;var K=f.value;return f.value=f.value.replace($?/\s+$/:/[ \t]+$/,""),f.leftStripped=f.value!==K,f.leftStripped}g8.default=I;y8.exports=g8.default});var L8=J((N4)=>{N4.__esModule=!0;N4.SourceLocation=o4;N4.id=G4;N4.stripFlags=d4;N4.stripComment=e4;N4.preparePath=b4;N4.prepareMustache=S4;N4.prepareRawBlock=C4;N4.prepareBlock=M4;N4.prepareProgram=V4;N4.preparePartialBlock=i4;function n4(q){return q&&q.__esModule?q:{default:q}}var p4=l(),yq=n4(p4);function Dq(q,_){if(_=_.path?_.path.original:_,q.path.original!==_){var $={loc:q.path.loc};throw new yq.default(q.path.original+" doesn't match "+_,$)}}function o4(q,_){this.source=q,this.start={line:_.first_line,column:_.first_column},this.end={line:_.last_line,column:_.last_column}}function G4(q){if(/^\[.*\]$/.test(q))return q.substring(1,q.length-1);else return q}function d4(q,_){return{open:q.charAt(2)==="~",close:_.charAt(_.length-3)==="~"}}function e4(q){return q.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function b4(q,_,$){$=this.locInfo($);var f=q?"@":"",K=[],P=0;for(var j=0,v=_.length;j<v;j++){var w=_[j].part,O=_[j].original!==w;if(f+=(_[j].separator||"")+w,!O&&(w===".."||w==="."||w==="this")){if(K.length>0)throw new yq.default("Invalid path: "+f,{loc:$});else if(w==="..")P++}else K.push(w)}return{type:"PathExpression",data:q,depth:P,parts:K,original:f,loc:$}}function S4(q,_,$,f,K,P){var j=f.charAt(3)||f.charAt(2),v=j!=="{"&&j!=="&",w=/\*/.test(f);return{type:w?"Decorator":"MustacheStatement",path:q,params:_,hash:$,escaped:v,strip:K,loc:this.locInfo(P)}}function C4(q,_,$,f){Dq(q,$),f=this.locInfo(f);var K={type:"Program",body:_,strip:{},loc:f};return{type:"BlockStatement",path:q.path,params:q.params,hash:q.hash,program:K,openStrip:{},inverseStrip:{},closeStrip:{},loc:f}}function M4(q,_,$,f,K,P){if(f&&f.path)Dq(q,f);var j=/\*/.test(q.open);_.blockParams=q.blockParams;var v=void 0,w=void 0;if($){if(j)throw new yq.default("Unexpected inverse block on decorator",$);if($.chain)$.program.body[0].closeStrip=f.strip;w=$.strip,v=$.program}if(K)K=v,v=_,_=K;return{type:j?"DecoratorBlock":"BlockStatement",path:q.path,params:q.params,hash:q.hash,program:_,inverse:v,openStrip:q.strip,inverseStrip:w,closeStrip:f&&f.strip,loc:this.locInfo(P)}}function V4(q,_){if(!_&&q.length){var $=q[0].loc,f=q[q.length-1].loc;if($&&f)_={source:$.source,start:{line:$.start.line,column:$.start.column},end:{line:f.end.line,column:f.end.column}}}return{type:"Program",body:q,strip:{},loc:_}}function i4(q,_,$,f){return Dq(q,$),{type:"PartialBlockStatement",name:q.path,params:q.params,hash:q.hash,program:_,openStrip:q.strip,closeStrip:$&&$.strip,loc:this.locInfo(f)}}});var B8=J(($j)=>{$j.__esModule=!0;$j.parseWithoutProcessing=s8;$j.parse=qj;function x4(q){if(q&&q.__esModule)return q;else{var _={};if(q!=null){for(var $ in q)if(Object.prototype.hasOwnProperty.call(q,$))_[$]=q[$]}return _.default=q,_}}function x8(q){return q&&q.__esModule?q:{default:q}}var s4=c8(),Lq=x8(s4),B4=D8(),U4=x8(B4),F4=L8(),Q4=x4(F4),_j=e();$j.parser=Lq.default;var F_={};_j.extend(F_,Q4);function s8(q,_){if(q.type==="Program")return q;Lq.default.yy=F_,F_.locInfo=function(f){return new F_.SourceLocation(_&&_.srcName,f)};var $=Lq.default.parse(q);return $}function qj(q,_){var $=s8(q,_),f=new U4.default(_);return f.accept($)}});var _6=J((kj)=>{kj.__esModule=!0;kj.Compiler=xq;kj.precompile=Tj;kj.compile=Yj;function F8(q){return q&&q.__esModule?q:{default:q}}var vj=l(),S_=F8(vj),C_=e(),wj=Rq(),b_=F8(wj),Oj=[].slice;function xq(){}xq.prototype={compiler:xq,equals:function(_){var $=this.opcodes.length;if(_.opcodes.length!==$)return!1;for(var f=0;f<$;f++){var K=this.opcodes[f],P=_.opcodes[f];if(K.opcode!==P.opcode||!Q8(K.args,P.args))return!1}$=this.children.length;for(var f=0;f<$;f++)if(!this.children[f].equals(_.children[f]))return!1;return!0},guid:0,compile:function(_,$){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=$,this.stringParams=$.stringParams,this.trackIds=$.trackIds,$.blockParams=$.blockParams||[],$.knownHelpers=C_.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},$.knownHelpers),this.accept(_)},compileProgram:function(_){var $=new this.compiler,f=$.compile(_,this.options),K=this.guid++;return this.usePartial=this.usePartial||f.usePartial,this.children[K]=f,this.useDepths=this.useDepths||f.useDepths,K},accept:function(_){if(!this[_.type])throw new S_.default("Unknown type: "+_.type,_);this.sourceNode.unshift(_);var $=this[_.type](_);return this.sourceNode.shift(),$},Program:function(_){this.options.blockParams.unshift(_.blockParams);var $=_.body,f=$.length;for(var K=0;K<f;K++)this.accept($[K]);return this.options.blockParams.shift(),this.isSimple=f===1,this.blockParams=_.blockParams?_.blockParams.length:0,this},BlockStatement:function(_){U8(_);var{program:$,inverse:f}=_;$=$&&this.compileProgram($),f=f&&this.compileProgram(f);var K=this.classifySexpr(_);if(K==="helper")this.helperSexpr(_,$,f);else if(K==="simple")this.simpleSexpr(_),this.opcode("pushProgram",$),this.opcode("pushProgram",f),this.opcode("emptyHash"),this.opcode("blockValue",_.path.original);else this.ambiguousSexpr(_,$,f),this.opcode("pushProgram",$),this.opcode("pushProgram",f),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue");this.opcode("append")},DecoratorBlock:function(_){var $=_.program&&this.compileProgram(_.program),f=this.setupFullMustacheParams(_,$,void 0),K=_.path;this.useDecorators=!0,this.opcode("registerDecorator",f.length,K.original)},PartialStatement:function(_){this.usePartial=!0;var $=_.program;if($)$=this.compileProgram(_.program);var f=_.params;if(f.length>1)throw new S_.default("Unsupported number of partial arguments: "+f.length,_);else if(!f.length)if(this.options.explicitPartialContext)this.opcode("pushLiteral","undefined");else f.push({type:"PathExpression",parts:[],depth:0});var K=_.name.original,P=_.name.type==="SubExpression";if(P)this.accept(_.name);this.setupFullMustacheParams(_,$,void 0,!0);var j=_.indent||"";if(this.options.preventIndent&&j)this.opcode("appendContent",j),j="";this.opcode("invokePartial",P,K,j),this.opcode("append")},PartialBlockStatement:function(_){this.PartialStatement(_)},MustacheStatement:function(_){if(this.SubExpression(_),_.escaped&&!this.options.noEscape)this.opcode("appendEscaped");else this.opcode("append")},Decorator:function(_){this.DecoratorBlock(_)},ContentStatement:function(_){if(_.value)this.opcode("appendContent",_.value)},CommentStatement:function(){},SubExpression:function(_){U8(_);var $=this.classifySexpr(_);if($==="simple")this.simpleSexpr(_);else if($==="helper")this.helperSexpr(_);else this.ambiguousSexpr(_)},ambiguousSexpr:function(_,$,f){var K=_.path,P=K.parts[0],j=$!=null||f!=null;this.opcode("getContext",K.depth),this.opcode("pushProgram",$),this.opcode("pushProgram",f),K.strict=!0,this.accept(K),this.opcode("invokeAmbiguous",P,j)},simpleSexpr:function(_){var $=_.path;$.strict=!0,this.accept($),this.opcode("resolvePossibleLambda")},helperSexpr:function(_,$,f){var K=this.setupFullMustacheParams(_,$,f),P=_.path,j=P.parts[0];if(this.options.knownHelpers[j])this.opcode("invokeKnownHelper",K.length,j);else if(this.options.knownHelpersOnly)throw new S_.default("You specified knownHelpersOnly, but used the unknown helper "+j,_);else P.strict=!0,P.falsy=!0,this.accept(P),this.opcode("invokeHelper",K.length,P.original,b_.default.helpers.simpleId(P))},PathExpression:function(_){this.addDepth(_.depth),this.opcode("getContext",_.depth);var $=_.parts[0],f=b_.default.helpers.scopedId(_),K=!_.depth&&!f&&this.blockParamIndex($);if(K)this.opcode("lookupBlockParam",K,_.parts);else if(!$)this.opcode("pushContext");else if(_.data)this.options.data=!0,this.opcode("lookupData",_.depth,_.parts,_.strict);else this.opcode("lookupOnContext",_.parts,_.falsy,_.strict,f)},StringLiteral:function(_){this.opcode("pushString",_.value)},NumberLiteral:function(_){this.opcode("pushLiteral",_.value)},BooleanLiteral:function(_){this.opcode("pushLiteral",_.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(_){var $=_.pairs,f=0,K=$.length;this.opcode("pushHash");for(;f<K;f++)this.pushParam($[f].value);while(f--)this.opcode("assignToHash",$[f].key);this.opcode("popHash")},opcode:function(_){this.opcodes.push({opcode:_,args:Oj.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(_){if(!_)return;this.useDepths=!0},classifySexpr:function(_){var $=b_.default.helpers.simpleId(_.path),f=$&&!!this.blockParamIndex(_.path.parts[0]),K=!f&&b_.default.helpers.helperExpression(_),P=!f&&(K||$);if(P&&!K){var j=_.path.parts[0],v=this.options;if(v.knownHelpers[j])K=!0;else if(v.knownHelpersOnly)P=!1}if(K)return"helper";else if(P)return"ambiguous";else return"simple"},pushParams:function(_){for(var $=0,f=_.length;$<f;$++)this.pushParam(_[$])},pushParam:function(_){var $=_.value!=null?_.value:_.original||"";if(this.stringParams){if($.replace)$=$.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".");if(_.depth)this.addDepth(_.depth);if(this.opcode("getContext",_.depth||0),this.opcode("pushStringParam",$,_.type),_.type==="SubExpression")this.accept(_)}else{if(this.trackIds){var f=void 0;if(_.parts&&!b_.default.helpers.scopedId(_)&&!_.depth)f=this.blockParamIndex(_.parts[0]);if(f){var K=_.parts.slice(1).join(".");this.opcode("pushId","BlockParam",f,K)}else{if($=_.original||$,$.replace)$=$.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"");this.opcode("pushId",_.type,$)}}this.accept(_)}},setupFullMustacheParams:function(_,$,f,K){var P=_.params;if(this.pushParams(P),this.opcode("pushProgram",$),this.opcode("pushProgram",f),_.hash)this.accept(_.hash);else this.opcode("emptyHash",K);return P},blockParamIndex:function(_){for(var $=0,f=this.options.blockParams.length;$<f;$++){var K=this.options.blockParams[$],P=K&&C_.indexOf(K,_);if(K&&P>=0)return[$,P]}}};function Tj(q,_,$){if(q==null||typeof q!=="string"&&q.type!=="Program")throw new S_.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+q);if(_=_||{},!("data"in _))_.data=!0;if(_.compat)_.useDepths=!0;var f=$.parse(q,_),K=new $.Compiler().compile(f,_);return new $.JavaScriptCompiler().compile(K,_)}function Yj(q,_,$){if(_===void 0)_={};if(q==null||typeof q!=="string"&&q.type!=="Program")throw new S_.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+q);if(_=C_.extend({},_),!("data"in _))_.data=!0;if(_.compat)_.useDepths=!0;var f=void 0;function K(){var j=$.parse(q,_),v=new $.Compiler().compile(j,_),w=new $.JavaScriptCompiler().compile(v,_,void 0,!0);return $.template(w)}function P(j,v){if(!f)f=K();return f.call(this,j,v)}return P._setup=function(j){if(!f)f=K();return f._setup(j)},P._child=function(j,v,w,O){if(!f)f=K();return f._child(j,v,w,O)},P}function Q8(q,_){if(q===_)return!0;if(C_.isArray(q)&&C_.isArray(_)&&q.length===_.length){for(var $=0;$<q.length;$++)if(!Q8(q[$],_[$]))return!1;return!0}}function U8(q){if(!q.path.parts){var _=q.path;q.path={type:"PathExpression",data:!1,depth:0,parts:[_.original+""],original:_.original+"",loc:_.loc}}}});var $6=J((Jj)=>{var q6="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Jj.encode=function(q){if(0<=q&&q<q6.length)return q6[q];throw TypeError("Must be between 0 and 63: "+q)};Jj.decode=function(q){var _=65,$=90,f=97,K=122,P=48,j=57,v=43,w=47,O=26,Y=52;if(_<=q&&q<=$)return q-_;if(f<=q&&q<=K)return q-f+O;if(P<=q&&q<=j)return q-P+Y;if(q==v)return 62;if(q==w)return 63;return-1}});var Bq=J((Xj)=>{var f6=$6(),sq=5,K6=1<<sq,P6=K6-1,j6=K6;function uj(q){return q<0?(-q<<1)+1:(q<<1)+0}function Aj(q){var _=(q&1)===1,$=q>>1;return _?-$:$}Xj.encode=function(_){var $="",f,K=uj(_);do{if(f=K&P6,K>>>=sq,K>0)f|=j6;$+=f6.encode(f)}while(K>0);return $};Xj.decode=function(_,$,f){var K=_.length,P=0,j=0,v,w;do{if($>=K)throw Error("Expected more digits in base 64 VLQ value.");if(w=f6.decode(_.charCodeAt($++)),w===-1)throw Error("Invalid base64 digit: "+_.charAt($-1));v=!!(w&j6),w&=P6,P=P+(w<<j),j+=sq}while(v);f.value=Aj(P),f.rest=$}});var H_=J((ij)=>{function pj(q,_,$){if(_ in q)return q[_];else if(arguments.length===3)return $;else throw Error('"'+_+'" is a required argument.')}ij.getArg=pj;var v6=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,oj=/^data:.+\,.+$/;function M_(q){var _=q.match(v6);if(!_)return null;return{scheme:_[1],auth:_[2],host:_[3],port:_[4],path:_[5]}}ij.urlParse=M_;function h_(q){var _="";if(q.scheme)_+=q.scheme+":";if(_+="//",q.auth)_+=q.auth+"@";if(q.host)_+=q.host;if(q.port)_+=":"+q.port;if(q.path)_+=q.path;return _}ij.urlGenerate=h_;function Uq(q){var _=q,$=M_(q);if($){if(!$.path)return q;_=$.path}var f=ij.isAbsolute(_),K=_.split(/\/+/);for(var P,j=0,v=K.length-1;v>=0;v--)if(P=K[v],P===".")K.splice(v,1);else if(P==="..")j++;else if(j>0)if(P==="")K.splice(v+1,j),j=0;else K.splice(v,2),j--;if(_=K.join("/"),_==="")_=f?"/":".";if($)return $.path=_,h_($);return _}ij.normalize=Uq;function w6(q,_){if(q==="")q=".";if(_==="")_=".";var $=M_(_),f=M_(q);if(f)q=f.path||"/";if($&&!$.scheme){if(f)$.scheme=f.scheme;return h_($)}if($||_.match(oj))return _;if(f&&!f.host&&!f.path)return f.host=_,h_(f);var K=_.charAt(0)==="/"?_:Uq(q.replace(/\/+$/,"")+"/"+_);if(f)return f.path=K,h_(f);return K}ij.join=w6;ij.isAbsolute=function(q){return q.charAt(0)==="/"||v6.test(q)};function Gj(q,_){if(q==="")q=".";q=q.replace(/\/$/,"");var $=0;while(_.indexOf(q+"/")!==0){var f=q.lastIndexOf("/");if(f<0)return _;if(q=q.slice(0,f),q.match(/^([^\/]+:\/)?\/*$/))return _;++$}return Array($+1).join("../")+_.substr(q.length+1)}ij.relative=Gj;var O6=function(){var q=Object.create(null);return!("__proto__"in q)}();function T6(q){return q}function dj(q){if(Y6(q))return"$"+q;return q}ij.toSetString=O6?T6:dj;function ej(q){if(Y6(q))return q.slice(1);return q}ij.fromSetString=O6?T6:ej;function Y6(q){if(!q)return!1;var _=q.length;if(_<9)return!1;if(q.charCodeAt(_-1)!==95||q.charCodeAt(_-2)!==95||q.charCodeAt(_-3)!==111||q.charCodeAt(_-4)!==116||q.charCodeAt(_-5)!==111||q.charCodeAt(_-6)!==114||q.charCodeAt(_-7)!==112||q.charCodeAt(_-8)!==95||q.charCodeAt(_-9)!==95)return!1;for(var $=_-10;$>=0;$--)if(q.charCodeAt($)!==36)return!1;return!0}function bj(q,_,$){var f=z_(q.source,_.source);if(f!==0)return f;if(f=q.originalLine-_.originalLine,f!==0)return f;if(f=q.originalColumn-_.originalColumn,f!==0||$)return f;if(f=q.generatedColumn-_.generatedColumn,f!==0)return f;if(f=q.generatedLine-_.generatedLine,f!==0)return f;return z_(q.name,_.name)}ij.compareByOriginalPositions=bj;function Sj(q,_,$){var f=q.generatedLine-_.generatedLine;if(f!==0)return f;if(f=q.generatedColumn-_.generatedColumn,f!==0||$)return f;if(f=z_(q.source,_.source),f!==0)return f;if(f=q.originalLine-_.originalLine,f!==0)return f;if(f=q.originalColumn-_.originalColumn,f!==0)return f;return z_(q.name,_.name)}ij.compareByGeneratedPositionsDeflated=Sj;function z_(q,_){if(q===_)return 0;if(q===null)return 1;if(_===null)return-1;if(q>_)return 1;return-1}function Cj(q,_){var $=q.generatedLine-_.generatedLine;if($!==0)return $;if($=q.generatedColumn-_.generatedColumn,$!==0)return $;if($=z_(q.source,_.source),$!==0)return $;if($=q.originalLine-_.originalLine,$!==0)return $;if($=q.originalColumn-_.originalColumn,$!==0)return $;return z_(q.name,_.name)}ij.compareByGeneratedPositionsInflated=Cj;function Mj(q){return JSON.parse(q.replace(/^\)]}'[^\n]*\n/,""))}ij.parseSourceMapInput=Mj;function Vj(q,_,$){if(_=_||"",q){if(q[q.length-1]!=="/"&&_[0]!=="/")q+="/";_=q+_}if($){var f=M_($);if(!f)throw Error("sourceMapURL could not be parsed");if(f.path){var K=f.path.lastIndexOf("/");if(K>=0)f.path=f.path.substring(0,K+1)}_=w6(h_(f),_)}return Uq(_)}ij.computeSourceURL=Vj});var _$=J((Bj)=>{var Fq=H_(),Qq=Object.prototype.hasOwnProperty,f_=typeof Map<"u";function s(){this._array=[],this._set=f_?new Map:Object.create(null)}s.fromArray=function(_,$){var f=new s;for(var K=0,P=_.length;K<P;K++)f.add(_[K],$);return f};s.prototype.size=function(){return f_?this._set.size:Object.getOwnPropertyNames(this._set).length};s.prototype.add=function(_,$){var f=f_?_:Fq.toSetString(_),K=f_?this.has(_):Qq.call(this._set,f),P=this._array.length;if(!K||$)this._array.push(_);if(!K)if(f_)this._set.set(_,P);else this._set[f]=P};s.prototype.has=function(_){if(f_)return this._set.has(_);else{var $=Fq.toSetString(_);return Qq.call(this._set,$)}};s.prototype.indexOf=function(_){if(f_){var $=this._set.get(_);if($>=0)return $}else{var f=Fq.toSetString(_);if(Qq.call(this._set,f))return this._set[f]}throw Error('"'+_+'" is not in the set.')};s.prototype.at=function(_){if(_>=0&&_<this._array.length)return this._array[_];throw Error("No element indexed by "+_)};s.prototype.toArray=function(){return this._array.slice()};Bj.ArraySet=s});var h6=J((Qj)=>{var k6=H_();function Fj(q,_){var $=q.generatedLine,f=_.generatedLine,K=q.generatedColumn,P=_.generatedColumn;return f>$||f==$&&P>=K||k6.compareByGeneratedPositionsInflated(q,_)<=0}function Q_(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Q_.prototype.unsortedForEach=function(_,$){this._array.forEach(_,$)};Q_.prototype.add=function(_){if(Fj(this._last,_))this._last=_,this._array.push(_);else this._sorted=!1,this._array.push(_)};Q_.prototype.toArray=function(){if(!this._sorted)this._array.sort(k6.compareByGeneratedPositionsInflated),this._sorted=!0;return this._array};Qj.MappingList=Q_});var q$=J(($7)=>{var V_=Bq(),o=H_(),_q=_$().ArraySet,q7=h6().MappingList;function t(q){if(!q)q={};this._file=o.getArg(q,"file",null),this._sourceRoot=o.getArg(q,"sourceRoot",null),this._skipValidation=o.getArg(q,"skipValidation",!1),this._sources=new _q,this._names=new _q,this._mappings=new q7,this._sourcesContents=null}t.prototype._version=3;t.fromSourceMap=function(_){var $=_.sourceRoot,f=new t({file:_.file,sourceRoot:$});return _.eachMapping(function(K){var P={generated:{line:K.generatedLine,column:K.generatedColumn}};if(K.source!=null){if(P.source=K.source,$!=null)P.source=o.relative($,P.source);if(P.original={line:K.originalLine,column:K.originalColumn},K.name!=null)P.name=K.name}f.addMapping(P)}),_.sources.forEach(function(K){var P=K;if($!==null)P=o.relative($,K);if(!f._sources.has(P))f._sources.add(P);var j=_.sourceContentFor(K);if(j!=null)f.setSourceContent(K,j)}),f};t.prototype.addMapping=function(_){var $=o.getArg(_,"generated"),f=o.getArg(_,"original",null),K=o.getArg(_,"source",null),P=o.getArg(_,"name",null);if(!this._skipValidation)this._validateMapping($,f,K,P);if(K!=null){if(K=String(K),!this._sources.has(K))this._sources.add(K)}if(P!=null){if(P=String(P),!this._names.has(P))this._names.add(P)}this._mappings.add({generatedLine:$.line,generatedColumn:$.column,originalLine:f!=null&&f.line,originalColumn:f!=null&&f.column,source:K,name:P})};t.prototype.setSourceContent=function(_,$){var f=_;if(this._sourceRoot!=null)f=o.relative(this._sourceRoot,f);if($!=null){if(!this._sourcesContents)this._sourcesContents=Object.create(null);this._sourcesContents[o.toSetString(f)]=$}else if(this._sourcesContents){if(delete this._sourcesContents[o.toSetString(f)],Object.keys(this._sourcesContents).length===0)this._sourcesContents=null}};t.prototype.applySourceMap=function(_,$,f){var K=$;if($==null){if(_.file==null)throw Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);K=_.file}var P=this._sourceRoot;if(P!=null)K=o.relative(P,K);var j=new _q,v=new _q;this._mappings.unsortedForEach(function(w){if(w.source===K&&w.originalLine!=null){var O=_.originalPositionFor({line:w.originalLine,column:w.originalColumn});if(O.source!=null){if(w.source=O.source,f!=null)w.source=o.join(f,w.source);if(P!=null)w.source=o.relative(P,w.source);if(w.originalLine=O.line,w.originalColumn=O.column,O.name!=null)w.name=O.name}}var Y=w.source;if(Y!=null&&!j.has(Y))j.add(Y);var T=w.name;if(T!=null&&!v.has(T))v.add(T)},this),this._sources=j,this._names=v,_.sources.forEach(function(w){var O=_.sourceContentFor(w);if(O!=null){if(f!=null)w=o.join(f,w);if(P!=null)w=o.relative(P,w);this.setSourceContent(w,O)}},this)};t.prototype._validateMapping=function(_,$,f,K){if($&&typeof $.line!=="number"&&typeof $.column!=="number")throw Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(_&&"line"in _&&"column"in _&&_.line>0&&_.column>=0&&!$&&!f&&!K)return;else if(_&&"line"in _&&"column"in _&&$&&"line"in $&&"column"in $&&_.line>0&&_.column>=0&&$.line>0&&$.column>=0&&f)return;else throw Error("Invalid mapping: "+JSON.stringify({generated:_,source:f,original:$,name:K}))};t.prototype._serializeMappings=function(){var _=0,$=1,f=0,K=0,P=0,j=0,v="",w,O,Y,T,k=this._mappings.toArray();for(var h=0,W=k.length;h<W;h++){if(O=k[h],w="",O.generatedLine!==$){_=0;while(O.generatedLine!==$)w+=";",$++}else if(h>0){if(!o.compareByGeneratedPositionsInflated(O,k[h-1]))continue;w+=","}if(w+=V_.encode(O.generatedColumn-_),_=O.generatedColumn,O.source!=null){if(T=this._sources.indexOf(O.source),w+=V_.encode(T-j),j=T,w+=V_.encode(O.originalLine-1-K),K=O.originalLine-1,w+=V_.encode(O.originalColumn-f),f=O.originalColumn,O.name!=null)Y=this._names.indexOf(O.name),w+=V_.encode(Y-P),P=Y}v+=w}return v};t.prototype._generateSourcesContent=function(_,$){return _.map(function(f){if(!this._sourcesContents)return null;if($!=null)f=o.relative($,f);var K=o.toSetString(f);return Object.prototype.hasOwnProperty.call(this._sourcesContents,K)?this._sourcesContents[K]:null},this)};t.prototype.toJSON=function(){var _={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null)_.file=this._file;if(this._sourceRoot!=null)_.sourceRoot=this._sourceRoot;if(this._sourcesContents)_.sourcesContent=this._generateSourcesContent(_.sources,_.sourceRoot);return _};t.prototype.toString=function(){return JSON.stringify(this.toJSON())};$7.SourceMapGenerator=t});var H6=J((K7)=>{K7.GREATEST_LOWER_BOUND=1;K7.LEAST_UPPER_BOUND=2;function $$(q,_,$,f,K,P){var j=Math.floor((_-q)/2)+q,v=K($,f[j],!0);if(v===0)return j;else if(v>0){if(_-j>1)return $$(j,_,$,f,K,P);if(P==K7.LEAST_UPPER_BOUND)return _<f.length?_:-1;else return j}else{if(j-q>1)return $$(q,j,$,f,K,P);if(P==K7.LEAST_UPPER_BOUND)return j;else return q<0?-1:q}}K7.search=function(_,$,f,K){if($.length===0)return-1;var P=$$(-1,$.length,_,$,f,K||K7.GREATEST_LOWER_BOUND);if(P<0)return-1;while(P-1>=0){if(f($[P],$[P-1],!0)!==0)break;--P}return P}});var W6=J((v7)=>{function K$(q,_,$){var f=q[_];q[_]=q[$],q[$]=f}function j7(q,_){return Math.round(q+Math.random()*(_-q))}function P$(q,_,$,f){if($<f){var K=j7($,f),P=$-1;K$(q,K,f);var j=q[f];for(var v=$;v<f;v++)if(_(q[v],j)<=0)P+=1,K$(q,P,v);K$(q,P+1,v);var w=P+1;P$(q,_,$,w-1),P$(q,_,w+1,f)}}v7.quickSort=function(q,_){P$(q,_,0,q.length-1)}});var Z6=J((T7)=>{var z=H_(),j$=H6(),W_=_$().ArraySet,O7=Bq(),i_=W6().quickSort;function m(q,_){var $=q;if(typeof q==="string")$=z.parseSourceMapInput(q);return $.sections!=null?new R($,_):new G($,_)}m.fromSourceMap=function(q,_){return G.fromSourceMap(q,_)};m.prototype._version=3;m.prototype.__generatedMappings=null;Object.defineProperty(m.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__generatedMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__generatedMappings}});m.prototype.__originalMappings=null;Object.defineProperty(m.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__originalMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__originalMappings}});m.prototype._charIsMappingSeparator=function(_,$){var f=_.charAt($);return f===";"||f===","};m.prototype._parseMappings=function(_,$){throw Error("Subclasses must implement _parseMappings")};m.GENERATED_ORDER=1;m.ORIGINAL_ORDER=2;m.GREATEST_LOWER_BOUND=1;m.LEAST_UPPER_BOUND=2;m.prototype.eachMapping=function(_,$,f){var K=$||null,P=f||m.GENERATED_ORDER,j;switch(P){case m.GENERATED_ORDER:j=this._generatedMappings;break;case m.ORIGINAL_ORDER:j=this._originalMappings;break;default:throw Error("Unknown order of iteration.")}var v=this.sourceRoot;j.map(function(w){var O=w.source===null?null:this._sources.at(w.source);return O=z.computeSourceURL(v,O,this._sourceMapURL),{source:O,generatedLine:w.generatedLine,generatedColumn:w.generatedColumn,originalLine:w.originalLine,originalColumn:w.originalColumn,name:w.name===null?null:this._names.at(w.name)}},this).forEach(_,K)};m.prototype.allGeneratedPositionsFor=function(_){var $=z.getArg(_,"line"),f={source:z.getArg(_,"source"),originalLine:$,originalColumn:z.getArg(_,"column",0)};if(f.source=this._findSourceIndex(f.source),f.source<0)return[];var K=[],P=this._findMapping(f,this._originalMappings,"originalLine","originalColumn",z.compareByOriginalPositions,j$.LEAST_UPPER_BOUND);if(P>=0){var j=this._originalMappings[P];if(_.column===void 0){var v=j.originalLine;while(j&&j.originalLine===v)K.push({line:z.getArg(j,"generatedLine",null),column:z.getArg(j,"generatedColumn",null),lastColumn:z.getArg(j,"lastGeneratedColumn",null)}),j=this._originalMappings[++P]}else{var w=j.originalColumn;while(j&&j.originalLine===$&&j.originalColumn==w)K.push({line:z.getArg(j,"generatedLine",null),column:z.getArg(j,"generatedColumn",null),lastColumn:z.getArg(j,"lastGeneratedColumn",null)}),j=this._originalMappings[++P]}}return K};T7.SourceMapConsumer=m;function G(q,_){var $=q;if(typeof q==="string")$=z.parseSourceMapInput(q);var f=z.getArg($,"version"),K=z.getArg($,"sources"),P=z.getArg($,"names",[]),j=z.getArg($,"sourceRoot",null),v=z.getArg($,"sourcesContent",null),w=z.getArg($,"mappings"),O=z.getArg($,"file",null);if(f!=this._version)throw Error("Unsupported version: "+f);if(j)j=z.normalize(j);K=K.map(String).map(z.normalize).map(function(Y){return j&&z.isAbsolute(j)&&z.isAbsolute(Y)?z.relative(j,Y):Y}),this._names=W_.fromArray(P.map(String),!0),this._sources=W_.fromArray(K,!0),this._absoluteSources=this._sources.toArray().map(function(Y){return z.computeSourceURL(j,Y,_)}),this.sourceRoot=j,this.sourcesContent=v,this._mappings=w,this._sourceMapURL=_,this.file=O}G.prototype=Object.create(m.prototype);G.prototype.consumer=m;G.prototype._findSourceIndex=function(q){var _=q;if(this.sourceRoot!=null)_=z.relative(this.sourceRoot,_);if(this._sources.has(_))return this._sources.indexOf(_);var $;for($=0;$<this._absoluteSources.length;++$)if(this._absoluteSources[$]==q)return $;return-1};G.fromSourceMap=function(_,$){var f=Object.create(G.prototype),K=f._names=W_.fromArray(_._names.toArray(),!0),P=f._sources=W_.fromArray(_._sources.toArray(),!0);f.sourceRoot=_._sourceRoot,f.sourcesContent=_._generateSourcesContent(f._sources.toArray(),f.sourceRoot),f.file=_._file,f._sourceMapURL=$,f._absoluteSources=f._sources.toArray().map(function(h){return z.computeSourceURL(f.sourceRoot,h,$)});var j=_._mappings.toArray().slice(),v=f.__generatedMappings=[],w=f.__originalMappings=[];for(var O=0,Y=j.length;O<Y;O++){var T=j[O],k=new J6;if(k.generatedLine=T.generatedLine,k.generatedColumn=T.generatedColumn,T.source){if(k.source=P.indexOf(T.source),k.originalLine=T.originalLine,k.originalColumn=T.originalColumn,T.name)k.name=K.indexOf(T.name);w.push(k)}v.push(k)}return i_(f.__originalMappings,z.compareByOriginalPositions),f};G.prototype._version=3;Object.defineProperty(G.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function J6(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}G.prototype._parseMappings=function(_,$){var f=1,K=0,P=0,j=0,v=0,w=0,O=_.length,Y=0,T={},k={},h=[],W=[],H,u,Z,X,r;while(Y<O)if(_.charAt(Y)===";")f++,Y++,K=0;else if(_.charAt(Y)===",")Y++;else{H=new J6,H.generatedLine=f;for(X=Y;X<O;X++)if(this._charIsMappingSeparator(_,X))break;if(u=_.slice(Y,X),Z=T[u],Z)Y+=u.length;else{Z=[];while(Y<X)O7.decode(_,Y,k),r=k.value,Y=k.rest,Z.push(r);if(Z.length===2)throw Error("Found a source, but no line and column");if(Z.length===3)throw Error("Found a source and line, but no column");T[u]=Z}if(H.generatedColumn=K+Z[0],K=H.generatedColumn,Z.length>1){if(H.source=v+Z[1],v+=Z[1],H.originalLine=P+Z[2],P=H.originalLine,H.originalLine+=1,H.originalColumn=j+Z[3],j=H.originalColumn,Z.length>4)H.name=w+Z[4],w+=Z[4]}if(W.push(H),typeof H.originalLine==="number")h.push(H)}i_(W,z.compareByGeneratedPositionsDeflated),this.__generatedMappings=W,i_(h,z.compareByOriginalPositions),this.__originalMappings=h};G.prototype._findMapping=function(_,$,f,K,P,j){if(_[f]<=0)throw TypeError("Line must be greater than or equal to 1, got "+_[f]);if(_[K]<0)throw TypeError("Column must be greater than or equal to 0, got "+_[K]);return j$.search(_,$,P,j)};G.prototype.computeColumnSpans=function(){for(var _=0;_<this._generatedMappings.length;++_){var $=this._generatedMappings[_];if(_+1<this._generatedMappings.length){var f=this._generatedMappings[_+1];if($.generatedLine===f.generatedLine){$.lastGeneratedColumn=f.generatedColumn-1;continue}}$.lastGeneratedColumn=1/0}};G.prototype.originalPositionFor=function(_){var $={generatedLine:z.getArg(_,"line"),generatedColumn:z.getArg(_,"column")},f=this._findMapping($,this._generatedMappings,"generatedLine","generatedColumn",z.compareByGeneratedPositionsDeflated,z.getArg(_,"bias",m.GREATEST_LOWER_BOUND));if(f>=0){var K=this._generatedMappings[f];if(K.generatedLine===$.generatedLine){var P=z.getArg(K,"source",null);if(P!==null)P=this._sources.at(P),P=z.computeSourceURL(this.sourceRoot,P,this._sourceMapURL);var j=z.getArg(K,"name",null);if(j!==null)j=this._names.at(j);return{source:P,line:z.getArg(K,"originalLine",null),column:z.getArg(K,"originalColumn",null),name:j}}}return{source:null,line:null,column:null,name:null}};G.prototype.hasContentsOfAllSources=function(){if(!this.sourcesContent)return!1;return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(_){return _==null})};G.prototype.sourceContentFor=function(_,$){if(!this.sourcesContent)return null;var f=this._findSourceIndex(_);if(f>=0)return this.sourcesContent[f];var K=_;if(this.sourceRoot!=null)K=z.relative(this.sourceRoot,K);var P;if(this.sourceRoot!=null&&(P=z.urlParse(this.sourceRoot))){var j=K.replace(/^file:\/\//,"");if(P.scheme=="file"&&this._sources.has(j))return this.sourcesContent[this._sources.indexOf(j)];if((!P.path||P.path=="/")&&this._sources.has("/"+K))return this.sourcesContent[this._sources.indexOf("/"+K)]}if($)return null;else throw Error('"'+K+'" is not in the SourceMap.')};G.prototype.generatedPositionFor=function(_){var $=z.getArg(_,"source");if($=this._findSourceIndex($),$<0)return{line:null,column:null,lastColumn:null};var f={source:$,originalLine:z.getArg(_,"line"),originalColumn:z.getArg(_,"column")},K=this._findMapping(f,this._originalMappings,"originalLine","originalColumn",z.compareByOriginalPositions,z.getArg(_,"bias",m.GREATEST_LOWER_BOUND));if(K>=0){var P=this._originalMappings[K];if(P.source===f.source)return{line:z.getArg(P,"generatedLine",null),column:z.getArg(P,"generatedColumn",null),lastColumn:z.getArg(P,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};T7.BasicSourceMapConsumer=G;function R(q,_){var $=q;if(typeof q==="string")$=z.parseSourceMapInput(q);var f=z.getArg($,"version"),K=z.getArg($,"sections");if(f!=this._version)throw Error("Unsupported version: "+f);this._sources=new W_,this._names=new W_;var P={line:-1,column:0};this._sections=K.map(function(j){if(j.url)throw Error("Support for url field in sections not implemented.");var v=z.getArg(j,"offset"),w=z.getArg(v,"line"),O=z.getArg(v,"column");if(w<P.line||w===P.line&&O<P.column)throw Error("Section offsets must be ordered and non-overlapping.");return P=v,{generatedOffset:{generatedLine:w+1,generatedColumn:O+1},consumer:new m(z.getArg(j,"map"),_)}})}R.prototype=Object.create(m.prototype);R.prototype.constructor=m;R.prototype._version=3;Object.defineProperty(R.prototype,"sources",{get:function(){var q=[];for(var _=0;_<this._sections.length;_++)for(var $=0;$<this._sections[_].consumer.sources.length;$++)q.push(this._sections[_].consumer.sources[$]);return q}});R.prototype.originalPositionFor=function(_){var $={generatedLine:z.getArg(_,"line"),generatedColumn:z.getArg(_,"column")},f=j$.search($,this._sections,function(P,j){var v=P.generatedLine-j.generatedOffset.generatedLine;if(v)return v;return P.generatedColumn-j.generatedOffset.generatedColumn}),K=this._sections[f];if(!K)return{source:null,line:null,column:null,name:null};return K.consumer.originalPositionFor({line:$.generatedLine-(K.generatedOffset.generatedLine-1),column:$.generatedColumn-(K.generatedOffset.generatedLine===$.generatedLine?K.generatedOffset.generatedColumn-1:0),bias:_.bias})};R.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(_){return _.consumer.hasContentsOfAllSources()})};R.prototype.sourceContentFor=function(_,$){for(var f=0;f<this._sections.length;f++){var K=this._sections[f],P=K.consumer.sourceContentFor(_,!0);if(P)return P}if($)return null;else throw Error('"'+_+'" is not in the SourceMap.')};R.prototype.generatedPositionFor=function(_){for(var $=0;$<this._sections.length;$++){var f=this._sections[$];if(f.consumer._findSourceIndex(z.getArg(_,"source"))===-1)continue;var K=f.consumer.generatedPositionFor(_);if(K){var P={line:K.line+(f.generatedOffset.generatedLine-1),column:K.column+(f.generatedOffset.generatedLine===K.line?f.generatedOffset.generatedColumn-1:0)};return P}}return{line:null,column:null}};R.prototype._parseMappings=function(_,$){this.__generatedMappings=[],this.__originalMappings=[];for(var f=0;f<this._sections.length;f++){var K=this._sections[f],P=K.consumer._generatedMappings;for(var j=0;j<P.length;j++){var v=P[j],w=K.consumer._sources.at(v.source);w=z.computeSourceURL(K.consumer.sourceRoot,w,this._sourceMapURL),this._sources.add(w),w=this._sources.indexOf(w);var O=null;if(v.name)O=K.consumer._names.at(v.name),this._names.add(O),O=this._names.indexOf(O);var Y={source:w,generatedLine:v.generatedLine+(K.generatedOffset.generatedLine-1),generatedColumn:v.generatedColumn+(K.generatedOffset.generatedLine===v.generatedLine?K.generatedOffset.generatedColumn-1:0),originalLine:v.originalLine,originalColumn:v.originalColumn,name:O};if(this.__generatedMappings.push(Y),typeof Y.originalLine==="number")this.__originalMappings.push(Y)}}i_(this.__generatedMappings,z.compareByGeneratedPositionsDeflated),i_(this.__originalMappings,z.compareByOriginalPositions)};T7.IndexedSourceMapConsumer=R});var r6=J((J7)=>{var z7=q$().SourceMapGenerator,qq=H_(),H7=/(\r?\n)/,W7=10,J_="$$$isSourceNode$$$";function M(q,_,$,f,K){if(this.children=[],this.sourceContents={},this.line=q==null?null:q,this.column=_==null?null:_,this.source=$==null?null:$,this.name=K==null?null:K,this[J_]=!0,f!=null)this.add(f)}M.fromStringWithSourceMap=function(_,$,f){var K=new M,P=_.split(H7),j=0,v=function(){var k=W(),h=W()||"";return k+h;function W(){return j<P.length?P[j++]:void 0}},w=1,O=0,Y=null;if($.eachMapping(function(k){if(Y!==null)if(w<k.generatedLine)T(Y,v()),w++,O=0;else{var h=P[j]||"",W=h.substr(0,k.generatedColumn-O);P[j]=h.substr(k.generatedColumn-O),O=k.generatedColumn,T(Y,W),Y=k;return}while(w<k.generatedLine)K.add(v()),w++;if(O<k.generatedColumn){var h=P[j]||"";K.add(h.substr(0,k.generatedColumn)),P[j]=h.substr(k.generatedColumn),O=k.generatedColumn}Y=k},this),j<P.length){if(Y)T(Y,v());K.add(P.splice(j).join(""))}return $.sources.forEach(function(k){var h=$.sourceContentFor(k);if(h!=null){if(f!=null)k=qq.join(f,k);K.setSourceContent(k,h)}}),K;function T(k,h){if(k===null||k.source===void 0)K.add(h);else{var W=f?qq.join(f,k.source):k.source;K.add(new M(k.originalLine,k.originalColumn,W,h,k.name))}}};M.prototype.add=function(_){if(Array.isArray(_))_.forEach(function($){this.add($)},this);else if(_[J_]||typeof _==="string"){if(_)this.children.push(_)}else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+_);return this};M.prototype.prepend=function(_){if(Array.isArray(_))for(var $=_.length-1;$>=0;$--)this.prepend(_[$]);else if(_[J_]||typeof _==="string")this.children.unshift(_);else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+_);return this};M.prototype.walk=function(_){var $;for(var f=0,K=this.children.length;f<K;f++)if($=this.children[f],$[J_])$.walk(_);else if($!=="")_($,{source:this.source,line:this.line,column:this.column,name:this.name})};M.prototype.join=function(_){var $,f,K=this.children.length;if(K>0){$=[];for(f=0;f<K-1;f++)$.push(this.children[f]),$.push(_);$.push(this.children[f]),this.children=$}return this};M.prototype.replaceRight=function(_,$){var f=this.children[this.children.length-1];if(f[J_])f.replaceRight(_,$);else if(typeof f==="string")this.children[this.children.length-1]=f.replace(_,$);else this.children.push("".replace(_,$));return this};M.prototype.setSourceContent=function(_,$){this.sourceContents[qq.toSetString(_)]=$};M.prototype.walkSourceContents=function(_){for(var $=0,f=this.children.length;$<f;$++)if(this.children[$][J_])this.children[$].walkSourceContents(_);var K=Object.keys(this.sourceContents);for(var $=0,f=K.length;$<f;$++)_(qq.fromSetString(K[$]),this.sourceContents[K[$]])};M.prototype.toString=function(){var _="";return this.walk(function($){_+=$}),_};M.prototype.toStringWithSourceMap=function(_){var $={code:"",line:1,column:0},f=new z7(_),K=!1,P=null,j=null,v=null,w=null;return this.walk(function(O,Y){if($.code+=O,Y.source!==null&&Y.line!==null&&Y.column!==null){if(P!==Y.source||j!==Y.line||v!==Y.column||w!==Y.name)f.addMapping({source:Y.source,original:{line:Y.line,column:Y.column},generated:{line:$.line,column:$.column},name:Y.name});P=Y.source,j=Y.line,v=Y.column,w=Y.name,K=!0}else if(K)f.addMapping({generated:{line:$.line,column:$.column}}),P=null,K=!1;for(var T=0,k=O.length;T<k;T++)if(O.charCodeAt(T)===W7){if($.line++,$.column=0,T+1===k)P=null,K=!1;else if(K)f.addMapping({source:Y.source,original:{line:Y.line,column:Y.column},generated:{line:$.line,column:$.column},name:Y.name})}else $.column++}),this.walkSourceContents(function(O,Y){f.setSourceContent(O,Y)}),{code:$.code,map:f}};J7.SourceNode=M});var u6=J((r7)=>{r7.SourceMapGenerator=q$().SourceMapGenerator;r7.SourceMapConsumer=Z6().SourceMapConsumer;r7.SourceNode=r6().SourceNode});var n6=J((X6,m6)=>{X6.__esModule=!0;var w$=e(),K_=void 0;try{if(typeof define!=="function"||!define.amd)O$=u6(),K_=O$.SourceNode}catch(q){}var O$;if(!K_)K_=function(q,_,$,f){if(this.src="",f)this.add(f)},K_.prototype={add:function(_){if(w$.isArray(_))_=_.join("");this.src+=_},prepend:function(_){if(w$.isArray(_))_=_.join("");this.src=_+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}};function v$(q,_,$){if(w$.isArray(q)){var f=[];for(var K=0,P=q.length;K<P;K++)f.push(_.wrap(q[K],$));return f}else if(typeof q==="boolean"||typeof q==="number")return q+"";return q}function A6(q){this.srcFile=q,this.source=[]}A6.prototype={isEmpty:function(){return!this.source.length},prepend:function(_,$){this.source.unshift(this.wrap(_,$))},push:function(_,$){this.source.push(this.wrap(_,$))},merge:function(){var _=this.empty();return this.each(function($){_.add([" ",$,`
547
+ `])}),_},each:function(_){for(var $=0,f=this.source.length;$<f;$++)_(this.source[$])},empty:function(){var _=this.currentLocation||{start:{}};return new K_(_.start.line,_.start.column,this.srcFile)},wrap:function(_){var $=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];if(_ instanceof K_)return _;return _=v$(_,this,$),new K_($.start.line,$.start.column,this.srcFile,_)},functionCall:function(_,$,f){return f=this.generateList(f),this.wrap([_,$?"."+$+"(":"(",f,")"])},quotedString:function(_){return'"'+(_+"").replace(/\\/g,"\\\\").replace(/"/g,"\\\"").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(_){var $=this,f=[];Object.keys(_).forEach(function(P){var j=v$(_[P],$);if(j!=="undefined")f.push([$.quotedString(P),":",j])});var K=this.generateList(f);return K.prepend("{"),K.add("}"),K},generateList:function(_){var $=this.empty();for(var f=0,K=_.length;f<K;f++){if(f)$.add(",");$.add(v$(_[f],this))}return $},generateArray:function(_){var $=this.generateList(_);return $.prepend("["),$.add("]"),$}};X6.default=A6;m6.exports=X6.default});var b6=J((d6,e6)=>{d6.__esModule=!0;function G6(q){return q&&q.__esModule?q:{default:q}}var p6=L_(),p7=l(),T$=G6(p7),o7=e(),G7=n6(),o6=G6(G7);function Z_(q){this.value=q}function r_(){}r_.prototype={nameLookup:function(_,$){return this.internalNameLookup(_,$)},depthedLookup:function(_){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(_),")"]},compilerInfo:function(){var _=p6.COMPILER_REVISION,$=p6.REVISION_CHANGES[_];return[_,$]},appendToBuffer:function(_,$,f){if(!o7.isArray(_))_=[_];if(_=this.source.wrap(_,$),this.environment.isSimple)return["return ",_,";"];else if(f)return["buffer += ",_,";"];else return _.appendToBuffer=!0,_},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(_,$){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",_,",",JSON.stringify($),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(_,$,f,K){this.environment=_,this.options=$,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!K,this.name=this.environment.name,this.isChild=!!f,this.context=f||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(_,$),this.useDepths=this.useDepths||_.useDepths||_.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||_.useBlockParams;var P=_.opcodes,j=void 0,v=void 0,w=void 0,O=void 0;for(w=0,O=P.length;w<O;w++)j=P[w],this.source.currentLocation=j.loc,v=v||j.loc,this[j.opcode].apply(this,j.args);if(this.source.currentLocation=v,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new T$.default("Compile completed with content left on stack");if(!this.decorators.isEmpty())if(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
546
548
  `]),this.decorators.push("return fn;"),K)this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]);else this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
547
549
  `),this.decorators.push(`}
548
550
  `),this.decorators=this.decorators.merge();else this.decorators=void 0;var Y=this.createFunctionContext(K);if(!this.isChild){var T={compiler:this.compilerInfo(),main:Y};if(this.decorators)T.main_d=this.decorators,T.useDecorators=!0;var k=this.context,h=k.programs,W=k.decorators;for(w=0,O=h.length;w<O;w++)if(h[w]){if(T[w]=h[w],W[w])T[w+"_d"]=W[w],T.useDecorators=!0}if(this.environment.usePartial)T.usePartial=!0;if(this.options.data)T.useData=!0;if(this.useDepths)T.useDepths=!0;if(this.useBlockParams)T.useBlockParams=!0;if(this.options.compat)T.compat=!0;if(!K)if(T.compiler=JSON.stringify(T.compiler),this.source.currentLocation={start:{line:1,column:0}},T=this.objectLiteral(T),$.srcName)T=T.toStringWithSourceMap({file:$.destName}),T.map=T.map&&T.map.toString();else T=T.toString();else T.compilerOptions=this.options;return T}else return Y},preamble:function(){this.lastContext=0,this.source=new o6.default(this.options.srcName),this.decorators=new o6.default(this.options.srcName)},createFunctionContext:function(_){var $=this,f="",K=this.stackVars.concat(this.registers.list);if(K.length>0)f+=", "+K.join(", ");var P=0;if(Object.keys(this.aliases).forEach(function(w){var O=$.aliases[w];if(O.children&&O.referenceCount>1)f+=", alias"+ ++P+"="+w,O.children[0]="alias"+P}),this.lookupPropertyFunctionIsUsed)f+=", "+this.lookupPropertyFunctionVarDeclaration();var j=["container","depth0","helpers","partials","data"];if(this.useBlockParams||this.useDepths)j.push("blockParams");if(this.useDepths)j.push("depths");var v=this.mergeSource(f);if(_)return j.push(v),Function.apply(this,j);else return this.source.wrap(["function(",j.join(","),`) {
@@ -554,8 +556,8 @@ Expecting `+t_.join(", ")+", got '"+(this.terminals_[A]||A)+"'";else wq="Parse e
554
556
  }
555
557
  return undefined
556
558
  }
557
- `.trim()},blockValue:function(_){var $=this.aliasable("container.hooks.blockHelperMissing"),f=[this.contextName(0)];this.setupHelperArgs(_,0,f);var K=this.popStack();f.splice(1,0,K),this.push(this.source.functionCall($,"call",f))},ambiguousBlockValue:function(){var _=this.aliasable("container.hooks.blockHelperMissing"),$=[this.contextName(0)];this.setupHelperArgs("",0,$,!0),this.flushInline();var f=this.topStack();$.splice(1,0,f),this.pushSource(["if (!",this.lastHelper,") { ",f," = ",this.source.functionCall(_,"call",$),"}"])},appendContent:function(_){if(this.pendingContent)_=this.pendingContent+_;else this.pendingLocation=this.source.currentLocation;this.pendingContent=_},append:function(){if(this.isInline())this.replaceStack(function($){return[" != null ? ",$,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var _=this.popStack();if(this.pushSource(["if (",_," != null) { ",this.appendToBuffer(_,void 0,!0)," }"]),this.environment.isSimple)this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(_){this.lastContext=_},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(_,$,f,K){var P=0;if(!K&&this.options.compat&&!this.lastContext)this.push(this.depthedLookup(_[P++]));else this.pushContext();this.resolvePath("context",_,P,$,f)},lookupBlockParam:function(_,$){this.useBlockParams=!0,this.push(["blockParams[",_[0],"][",_[1],"]"]),this.resolvePath("context",$,1)},lookupData:function(_,$,f){if(!_)this.pushStackLiteral("data");else this.pushStackLiteral("container.data(data, "+_+")");this.resolvePath("data",$,0,!0,f)},resolvePath:function(_,$,f,K,P){var j=this;if(this.options.strict||this.options.assumeObjects){this.push(n7(this.options.strict&&P,this,$,f,_));return}var v=$.length;for(;f<v;f++)this.replaceStack(function(w){var O=j.nameLookup(w,$[f],_);if(!K)return[" != null ? ",O," : ",w];else return[" && ",O]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(_,$){if(this.pushContext(),this.pushString($),$!=="SubExpression")if(typeof _==="string")this.pushString(_);else this.pushStackLiteral(_)},emptyHash:function(_){if(this.trackIds)this.push("{}");if(this.stringParams)this.push("{}"),this.push("{}");this.pushStackLiteral(_?"undefined":"{}")},pushHash:function(){if(this.hash)this.hashes.push(this.hash);this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var _=this.hash;if(this.hash=this.hashes.pop(),this.trackIds)this.push(this.objectLiteral(_.ids));if(this.stringParams)this.push(this.objectLiteral(_.contexts)),this.push(this.objectLiteral(_.types));this.push(this.objectLiteral(_.values))},pushString:function(_){this.pushStackLiteral(this.quotedString(_))},pushLiteral:function(_){this.pushStackLiteral(_)},pushProgram:function(_){if(_!=null)this.pushStackLiteral(this.programExpression(_));else this.pushStackLiteral(null)},registerDecorator:function(_,$){var f=this.nameLookup("decorators",$,"decorator"),K=this.setupHelperArgs($,_);this.decorators.push(["fn = ",this.decorators.functionCall(f,"",["fn","props","container",K])," || fn;"])},invokeHelper:function(_,$,f){var K=this.popStack(),P=this.setupHelper(_,$),j=[];if(f)j.push(P.name);if(j.push(K),!this.options.strict)j.push(this.aliasable("container.hooks.helperMissing"));var v=["(",this.itemsSeparatedBy(j,"||"),")"],w=this.source.functionCall(v,"call",P.callParams);this.push(w)},itemsSeparatedBy:function(_,$){var f=[];f.push(_[0]);for(var K=1;K<_.length;K++)f.push($,_[K]);return f},invokeKnownHelper:function(_,$){var f=this.setupHelper(_,$);this.push(this.source.functionCall(f.name,"call",f.callParams))},invokeAmbiguous:function(_,$){this.useRegister("helper");var f=this.popStack();this.emptyHash();var K=this.setupHelper(0,_,$),P=this.lastHelper=this.nameLookup("helpers",_,"helper"),j=["(","(helper = ",P," || ",f,")"];if(!this.options.strict)j[0]="(helper = ",j.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"));this.push(["(",j,K.paramsInit?["),(",K.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",K.callParams)," : helper))"])},invokePartial:function(_,$,f){var K=[],P=this.setupParams($,1,K);if(_)$=this.popStack(),delete P.name;if(f)P.indent=JSON.stringify(f);if(P.helpers="helpers",P.partials="partials",P.decorators="container.decorators",!_)K.unshift(this.nameLookup("partials",$,"partial"));else K.unshift($);if(this.options.compat)P.depths="depths";P=this.objectLiteral(P),K.push(P),this.push(this.source.functionCall("container.invokePartial","",K))},assignToHash:function(_){var $=this.popStack(),f=void 0,K=void 0,P=void 0;if(this.trackIds)P=this.popStack();if(this.stringParams)K=this.popStack(),f=this.popStack();var j=this.hash;if(f)j.contexts[_]=f;if(K)j.types[_]=K;if(P)j.ids[_]=P;j.values[_]=$},pushId:function(_,$,f){if(_==="BlockParam")this.pushStackLiteral("blockParams["+$[0]+"].path["+$[1]+"]"+(f?" + "+JSON.stringify("."+f):""));else if(_==="PathExpression")this.pushString($);else if(_==="SubExpression")this.pushStackLiteral("true");else this.pushStackLiteral("null")},compiler:r_,compileChildren:function(_,$){var f=_.children,K=void 0,P=void 0;for(var j=0,v=f.length;j<v;j++){K=f[j],P=new this.compiler;var w=this.matchExistingProgram(K);if(w==null){this.context.programs.push("");var O=this.context.programs.length;K.index=O,K.name="program"+O,this.context.programs[O]=P.compile(K,$,this.context,!this.precompile),this.context.decorators[O]=P.decorators,this.context.environments[O]=K,this.useDepths=this.useDepths||P.useDepths,this.useBlockParams=this.useBlockParams||P.useBlockParams,K.useDepths=this.useDepths,K.useBlockParams=this.useBlockParams}else K.index=w.index,K.name="program"+w.index,this.useDepths=this.useDepths||w.useDepths,this.useBlockParams=this.useBlockParams||w.useBlockParams}},matchExistingProgram:function(_){for(var $=0,f=this.context.environments.length;$<f;$++){var K=this.context.environments[$];if(K&&K.equals(_))return K}},programExpression:function(_){var $=this.environment.children[_],f=[$.index,"data",$.blockParams];if(this.useBlockParams||this.useDepths)f.push("blockParams");if(this.useDepths)f.push("depths");return"container.program("+f.join(", ")+")"},useRegister:function(_){if(!this.registers[_])this.registers[_]=!0,this.registers.list.push(_)},push:function(_){if(!(_ instanceof Z_))_=this.source.wrap(_);return this.inlineStack.push(_),_},pushStackLiteral:function(_){this.push(new Z_(_))},pushSource:function(_){if(this.pendingContent)this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0;if(_)this.source.push(_)},replaceStack:function(_){var $=["("],f=void 0,K=void 0,P=void 0;if(!this.isInline())throw new T$.default("replaceStack on non-inline");var j=this.popStack(!0);if(j instanceof Z_)f=[j.value],$=["(",f],P=!0;else{K=!0;var v=this.incrStack();$=["((",this.push(v)," = ",j,")"],f=this.topStack()}var w=_.call(this,f);if(!P)this.popStack();if(K)this.stackSlot--;this.push($.concat(w,")"))},incrStack:function(){if(this.stackSlot++,this.stackSlot>this.stackVars.length)this.stackVars.push("stack"+this.stackSlot);return this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var _=this.inlineStack;this.inlineStack=[];for(var $=0,f=_.length;$<f;$++){var K=_[$];if(K instanceof Z_)this.compileStack.push(K);else{var P=this.incrStack();this.pushSource([P," = ",K,";"]),this.compileStack.push(P)}}},isInline:function(){return this.inlineStack.length},popStack:function(_){var $=this.isInline(),f=($?this.inlineStack:this.compileStack).pop();if(!_&&f instanceof Z_)return f.value;else{if(!$){if(!this.stackSlot)throw new T$.default("Invalid stack pop");this.stackSlot--}return f}},topStack:function(){var _=this.isInline()?this.inlineStack:this.compileStack,$=_[_.length-1];if($ instanceof Z_)return $.value;else return $},contextName:function(_){if(this.useDepths&&_)return"depths["+_+"]";else return"depth"+_},quotedString:function(_){return this.source.quotedString(_)},objectLiteral:function(_){return this.source.objectLiteral(_)},aliasable:function(_){var $=this.aliases[_];if($)return $.referenceCount++,$;return $=this.aliases[_]=this.source.wrap(_),$.aliasable=!0,$.referenceCount=1,$},setupHelper:function(_,$,f){var K=[],P=this.setupHelperArgs($,_,K,f),j=this.nameLookup("helpers",$,"helper"),v=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:K,paramsInit:P,name:j,callParams:[v].concat(K)}},setupParams:function(_,$,f){var K={},P=[],j=[],v=[],w=!f,O=void 0;if(w)f=[];if(K.name=this.quotedString(_),K.hash=this.popStack(),this.trackIds)K.hashIds=this.popStack();if(this.stringParams)K.hashTypes=this.popStack(),K.hashContexts=this.popStack();var Y=this.popStack(),T=this.popStack();if(T||Y)K.fn=T||"container.noop",K.inverse=Y||"container.noop";var k=$;while(k--){if(O=this.popStack(),f[k]=O,this.trackIds)v[k]=this.popStack();if(this.stringParams)j[k]=this.popStack(),P[k]=this.popStack()}if(w)K.args=this.source.generateArray(f);if(this.trackIds)K.ids=this.source.generateArray(v);if(this.stringParams)K.types=this.source.generateArray(j),K.contexts=this.source.generateArray(P);if(this.options.data)K.data="data";if(this.useBlockParams)K.blockParams="blockParams";return K},setupHelperArgs:function(_,$,f,K){var P=this.setupParams(_,$,f);if(P.loc=JSON.stringify(this.source.currentLocation),P=this.objectLiteral(P),K)return this.useRegister("options"),f.push("options"),["options=",P];else if(f)return f.push(P),"";else return P}};(function(){var q="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),_=r_.RESERVED_WORDS={};for(var $=0,f=q.length;$<f;$++)_[q[$]]=!0})();r_.isValidJavaScriptVariableName=function(q){return!r_.RESERVED_WORDS[q]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(q)};function n7(q,_,$,f,K){var P=_.popStack(),j=$.length;if(q)j--;for(;f<j;f++)P=_.nameLookup(P,$[f],K);if(q)return[_.aliasable("container.strict"),"(",P,", ",_.quotedString($[f]),", ",JSON.stringify(_.source.currentLocation)," )"];else return P}d6.default=r_;e6.exports=d6.default});var V6=J((C6,M6)=>{C6.__esModule=!0;function N_(q){return q&&q.__esModule?q:{default:q}}var G7=M8(),d7=N_(G7),e7=Rq(),b7=N_(e7),Y$=B8(),k$=_6(),S7=b6(),C7=N_(S7),M7=U_(),V7=N_(M7),i7=lq(),N7=N_(i7),l7=d7.default.create;function S6(){var q=l7();return q.compile=function(_,$){return k$.compile(_,$,q)},q.precompile=function(_,$){return k$.precompile(_,$,q)},q.AST=b7.default,q.Compiler=k$.Compiler,q.JavaScriptCompiler=C7.default,q.Parser=Y$.parser,q.parse=Y$.parse,q.parseWithoutProcessing=Y$.parseWithoutProcessing,q}var u_=S6();u_.create=S6;N7.default(u_);u_.Visitor=V7.default;u_.default=u_;C6.default=u_;M6.exports=C6.default});var i6=J((g7)=>{g7.__esModule=!0;g7.print=I7;g7.PrintVisitor=n;function a7(q){return q&&q.__esModule?q:{default:q}}var R7=U_(),E7=a7(R7);function I7(q){return new n().accept(q)}function n(){this.padding=0}n.prototype=new E7.default;n.prototype.pad=function(q){var _="";for(var $=0,f=this.padding;$<f;$++)_+=" ";return _+=q+`
558
- `,_};n.prototype.Program=function(q){var _="",$=q.body,f=void 0,K=void 0;if(q.blockParams){var P="BLOCK PARAMS: [";for(f=0,K=q.blockParams.length;f<K;f++)P+=" "+q.blockParams[f];P+=" ]",_+=this.pad(P)}for(f=0,K=$.length;f<K;f++)_+=this.accept($[f]);return this.padding--,_};n.prototype.MustacheStatement=function(q){return this.pad("{{ "+this.SubExpression(q)+" }}")};n.prototype.Decorator=function(q){return this.pad("{{ DIRECTIVE "+this.SubExpression(q)+" }}")};n.prototype.BlockStatement=n.prototype.DecoratorBlock=function(q){var _="";if(_+=this.pad((q.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,_+=this.pad(this.SubExpression(q)),q.program)_+=this.pad("PROGRAM:"),this.padding++,_+=this.accept(q.program),this.padding--;if(q.inverse){if(q.program)this.padding++;if(_+=this.pad("{{^}}"),this.padding++,_+=this.accept(q.inverse),this.padding--,q.program)this.padding--}return this.padding--,_};n.prototype.PartialStatement=function(q){var _="PARTIAL:"+q.name.original;if(q.params[0])_+=" "+this.accept(q.params[0]);if(q.hash)_+=" "+this.accept(q.hash);return this.pad("{{> "+_+" }}")};n.prototype.PartialBlockStatement=function(q){var _="PARTIAL BLOCK:"+q.name.original;if(q.params[0])_+=" "+this.accept(q.params[0]);if(q.hash)_+=" "+this.accept(q.hash);return _+=" "+this.pad("PROGRAM:"),this.padding++,_+=this.accept(q.program),this.padding--,this.pad("{{> "+_+" }}")};n.prototype.ContentStatement=function(q){return this.pad("CONTENT[ '"+q.value+"' ]")};n.prototype.CommentStatement=function(q){return this.pad("{{! '"+q.value+"' }}")};n.prototype.SubExpression=function(q){var _=q.params,$=[],f=void 0;for(var K=0,P=_.length;K<P;K++)$.push(this.accept(_[K]));return _="["+$.join(", ")+"]",f=q.hash?" "+this.accept(q.hash):"",this.accept(q.path)+" "+_+f};n.prototype.PathExpression=function(q){var _=q.parts.join("/");return(q.data?"@":"")+"PATH:"+_};n.prototype.StringLiteral=function(q){return'"'+q.value+'"'};n.prototype.NumberLiteral=function(q){return"NUMBER{"+q.value+"}"};n.prototype.BooleanLiteral=function(q){return"BOOLEAN{"+q.value+"}"};n.prototype.UndefinedLiteral=function(){return"UNDEFINED"};n.prototype.NullLiteral=function(){return"NULL"};n.prototype.Hash=function(q){var _=q.pairs,$=[];for(var f=0,K=_.length;f<K;f++)$.push(this.accept(_[f]));return"HASH{"+$.join(", ")+"}"};n.prototype.HashPair=function(q){return q.key+"="+this.accept(q.value)}});var h$=J((e9,t6)=>{var $q=V6().default,l6=i6();$q.PrintVisitor=l6.PrintVisitor;$q.print=l6.print;t6.exports=$q;function N6(q,_){var $=A_("fs"),f=$.readFileSync(_,"utf8");q.exports=$q.compile(f)}if(A_.extensions)A_.extensions[".handlebars"]=N6,A_.extensions[".hbs"]=N6});import{readFileSync as F7}from"fs";import{dirname as s6,join as B6,resolve as U6}from"path";import{join as W$}from"node:path";import{writeFileSync as L6,mkdirSync as U7}from"node:fs";import{readFileSync as jf,readdirSync as Kv,statSync as Pv}from"node:fs";import{join as vf,dirname as r$}from"node:path";import{fileURLToPath as wf}from"node:url";var c_=null;try{c_=(await Promise.resolve().then(() => (Yq(),Tq))).assets}catch{}var Of=r$(r$(wf(import.meta.url)));function j_(q){if(c_&&q in c_)return c_[q];let _=vf(Of,q);try{return jf(_,"utf-8")}catch{throw Error(`Asset not found: ${q}`)}}var X_=null;function Tf(){if(X_)return X_;let q=j_("assets/chipctx-gen/device-mappings.json"),_=JSON.parse(q);X_=[];for(let $ of Object.values(_.families))for(let f of $)try{X_.push({...f,compiledPattern:new RegExp(f.pattern)})}catch(K){throw Error(`Invalid regex "${f.pattern}" in device-mappings.json: ${K.message}`)}return X_}function u$(q){let _=Tf();for(let $ of _)if($.compiledPattern.test(q))return $;return null}class kq{layers;linkerGenerator;constructor(q,_){this.layers=q;this.linkerGenerator=_}async resolve(q,_){for(let $ of this.layers)try{if(await $.canResolve(q))try{let f=await $.resolve(q,_);if(!f.linkerScript&&this.linkerGenerator)f.linkerScript=await this.linkerGenerator.generate(q,_);return f}catch(f){console.warn(`[chipctx-gen] ${$.name} resolve failed: ${f.message}, trying next layer`);continue}}catch(f){console.warn(`[chipctx-gen] ${$.name} canResolve failed: ${f.message}, trying next layer`);continue}throw Error(`No startup source available for ${q.name}`)}}import{readFileSync as uq,existsSync as Aq,readdirSync as Xq,mkdirSync as qK}from"node:fs";import{copyFileSync as Yf,chmodSync as kf,mkdirSync as hv,readdirSync as zv}from"node:fs";function N(q,_){Yf(q,_),kf(_,420)}import{join as E,basename as O_,dirname as $K}from"node:path";var hf=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",zf="[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]["+hf+"]*",Hf=new RegExp("^"+zf+"$");function a_(q,_){let $=[],f=_.exec(q);while(f){let K=[];K.startIndex=_.lastIndex-f[0].length;let P=f.length;for(let j=0;j<P;j++)K.push(f[j]);$.push(K),f=_.exec(q)}return $}var v_=function(q){let _=Hf.exec(q);return!(_===null||typeof _>"u")};function A$(q){return typeof q<"u"}var m_=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],R_=["__proto__","constructor","prototype"];var Wf={allowBooleanAttributes:!1,unpairedTags:[]};function o$(q,_){_=Object.assign({},Wf,_);let $=[],f=!1,K=!1;if(q[0]==="\uFEFF")q=q.substr(1);for(let P=0;P<q.length;P++)if(q[P]==="<"&&q[P+1]==="?"){if(P+=2,P=m$(q,P),P.err)return P}else if(q[P]==="<"){let j=P;if(P++,q[P]==="!"){P=n$(q,P);continue}else{let v=!1;if(q[P]==="/")v=!0,P++;let w="";for(;P<q.length&&q[P]!==">"&&q[P]!==" "&&q[P]!=="\t"&&q[P]!==`
559
- `&&q[P]!=="\r";P++)w+=q[P];if(w=w.trim(),w[w.length-1]==="/")w=w.substring(0,w.length-1),P--;if(!nf(w)){let T;if(w.trim().length===0)T="Invalid space after '<'.";else T="Tag '"+w+"' is an invalid name.";return p("InvalidTag",T,d(q,P))}let O=rf(q,P);if(O===!1)return p("InvalidAttr","Attributes for '"+w+"' have open quote.",d(q,P));let Y=O.value;if(P=O.index,Y[Y.length-1]==="/"){let T=P-Y.length;Y=Y.substring(0,Y.length-1);let k=p$(Y,_);if(k===!0)f=!0;else return p(k.err.code,k.err.msg,d(q,T+k.err.line))}else if(v)if(!O.tagClosed)return p("InvalidTag","Closing tag '"+w+"' doesn't have proper closing.",d(q,P));else if(Y.trim().length>0)return p("InvalidTag","Closing tag '"+w+"' can't have attributes or invalid starting.",d(q,j));else if($.length===0)return p("InvalidTag","Closing tag '"+w+"' has not been opened.",d(q,j));else{let T=$.pop();if(w!==T.tagName){let k=d(q,T.tagStartPos);return p("InvalidTag","Expected closing tag '"+T.tagName+"' (opened in line "+k.line+", col "+k.col+") instead of closing tag '"+w+"'.",d(q,j))}if($.length==0)K=!0}else{let T=p$(Y,_);if(T!==!0)return p(T.err.code,T.err.msg,d(q,P-Y.length+T.err.line));if(K===!0)return p("InvalidXml","Multiple possible root nodes found.",d(q,P));else if(_.unpairedTags.indexOf(w)!==-1);else $.push({tagName:w,tagStartPos:j});f=!0}for(P++;P<q.length;P++)if(q[P]==="<")if(q[P+1]==="!"){P++,P=n$(q,P);continue}else if(q[P+1]==="?"){if(P=m$(q,++P),P.err)return P}else break;else if(q[P]==="&"){let T=Xf(q,P);if(T==-1)return p("InvalidChar","char '&' is not expected.",d(q,P));P=T}else if(K===!0&&!X$(q[P]))return p("InvalidXml","Extra text at the end",d(q,P));if(q[P]==="<")P--}}else{if(X$(q[P]))continue;return p("InvalidChar","char '"+q[P]+"' is not expected.",d(q,P))}if(!f)return p("InvalidXml","Start tag expected.",1);else if($.length==1)return p("InvalidTag","Unclosed tag '"+$[0].tagName+"'.",d(q,$[0].tagStartPos));else if($.length>0)return p("InvalidXml","Invalid '"+JSON.stringify($.map((P)=>P.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0}function X$(q){return q===" "||q==="\t"||q===`
560
- `||q==="\r"}function m$(q,_){let $=_;for(;_<q.length;_++)if(q[_]=="?"||q[_]==" "){let f=q.substr($,_-$);if(_>5&&f==="xml")return p("InvalidXml","XML declaration allowed only at the start of the document.",d(q,_));else if(q[_]=="?"&&q[_+1]==">"){_++;break}else continue}return _}function n$(q,_){if(q.length>_+5&&q[_+1]==="-"&&q[_+2]==="-"){for(_+=3;_<q.length;_++)if(q[_]==="-"&&q[_+1]==="-"&&q[_+2]===">"){_+=2;break}}else if(q.length>_+8&&q[_+1]==="D"&&q[_+2]==="O"&&q[_+3]==="C"&&q[_+4]==="T"&&q[_+5]==="Y"&&q[_+6]==="P"&&q[_+7]==="E"){let $=1;for(_+=8;_<q.length;_++)if(q[_]==="<")$++;else if(q[_]===">"){if($--,$===0)break}}else if(q.length>_+9&&q[_+1]==="["&&q[_+2]==="C"&&q[_+3]==="D"&&q[_+4]==="A"&&q[_+5]==="T"&&q[_+6]==="A"&&q[_+7]==="["){for(_+=8;_<q.length;_++)if(q[_]==="]"&&q[_+1]==="]"&&q[_+2]===">"){_+=2;break}}return _}var Jf='"',Zf="'";function rf(q,_){let $="",f="",K=!1;for(;_<q.length;_++){if(q[_]===Jf||q[_]===Zf)if(f==="")f=q[_];else if(f!==q[_]);else f="";else if(q[_]===">"){if(f===""){K=!0;break}}$+=q[_]}if(f!=="")return!1;return{value:$,index:_,tagClosed:K}}var uf=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function p$(q,_){let $=a_(q,uf),f={};for(let K=0;K<$.length;K++){if($[K][1].length===0)return p("InvalidAttr","Attribute '"+$[K][2]+"' has no space in starting.",n_($[K]));else if($[K][3]!==void 0&&$[K][4]===void 0)return p("InvalidAttr","Attribute '"+$[K][2]+"' is without value.",n_($[K]));else if($[K][3]===void 0&&!_.allowBooleanAttributes)return p("InvalidAttr","boolean attribute '"+$[K][2]+"' is not allowed.",n_($[K]));let P=$[K][2];if(!mf(P))return p("InvalidAttr","Attribute '"+P+"' is an invalid name.",n_($[K]));if(!Object.prototype.hasOwnProperty.call(f,P))f[P]=1;else return p("InvalidAttr","Attribute '"+P+"' is repeated.",n_($[K]))}return!0}function Af(q,_){let $=/\d/;if(q[_]==="x")_++,$=/[\da-fA-F]/;for(;_<q.length;_++){if(q[_]===";")return _;if(!q[_].match($))break}return-1}function Xf(q,_){if(_++,q[_]===";")return-1;if(q[_]==="#")return _++,Af(q,_);let $=0;for(;_<q.length;_++,$++){if(q[_].match(/\w/)&&$<20)continue;if(q[_]===";")break;return-1}return _}function p(q,_,$){return{err:{code:q,msg:_,line:$.line||$,col:$.col}}}function mf(q){return v_(q)}function nf(q){return v_(q)}function d(q,_){let $=q.substring(0,_).split(/\r?\n/);return{line:$.length,col:$[$.length-1].length+1}}function n_(q){return q.startIndex+q[1].length}var G$=(q)=>{if(m_.includes(q))return"__"+q;return q},pf={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(q,_){return _},attributeValueProcessor:function(q,_){return _},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(q,_,$){return q},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:G$};function of(q,_){if(typeof q!=="string")return;let $=q.toLowerCase();if(m_.some((f)=>$===f.toLowerCase()))throw Error(`[SECURITY] Invalid ${_}: "${q}" is a reserved JavaScript keyword that could cause prototype pollution`);if(R_.some((f)=>$===f.toLowerCase()))throw Error(`[SECURITY] Invalid ${_}: "${q}" is a reserved JavaScript keyword that could cause prototype pollution`)}function d$(q){if(typeof q==="boolean")return{enabled:q,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1000,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null};if(typeof q==="object"&&q!==null)return{enabled:q.enabled!==!1,maxEntitySize:q.maxEntitySize??1e4,maxExpansionDepth:q.maxExpansionDepth??10,maxTotalExpansions:q.maxTotalExpansions??1000,maxExpandedLength:q.maxExpandedLength??1e5,maxEntityCount:q.maxEntityCount??100,allowedTags:q.allowedTags??null,tagFilter:q.tagFilter??null};return d$(!0)}var e$=function(q){let _=Object.assign({},pf,q),$=[{value:_.attributeNamePrefix,name:"attributeNamePrefix"},{value:_.attributesGroupName,name:"attributesGroupName"},{value:_.textNodeName,name:"textNodeName"},{value:_.cdataPropName,name:"cdataPropName"},{value:_.commentPropName,name:"commentPropName"}];for(let{value:f,name:K}of $)if(f)of(f,K);if(_.onDangerousProperty===null)_.onDangerousProperty=G$;if(_.processEntities=d$(_.processEntities),_.stopNodes&&Array.isArray(_.stopNodes))_.stopNodes=_.stopNodes.map((f)=>{if(typeof f==="string"&&f.startsWith("*."))return".."+f.substring(2);return f});return _};var E_;if(typeof Symbol!=="function")E_="@@xmlMetadata";else E_=Symbol("XML Node Metadata");class S{constructor(q){this.tagname=q,this.child=[],this[":@"]=Object.create(null)}add(q,_){if(q==="__proto__")q="#__proto__";this.child.push({[q]:_})}addChild(q,_){if(q.tagname==="__proto__")q.tagname="#__proto__";if(q[":@"]&&Object.keys(q[":@"]).length>0)this.child.push({[q.tagname]:q.child,[":@"]:q[":@"]});else this.child.push({[q.tagname]:q.child});if(_!==void 0)this.child[this.child.length-1][E_]={startIndex:_}}static getMetaDataSymbol(){return E_}}class I_{constructor(q){this.suppressValidationErr=!q,this.options=q}readDocType(q,_){let $=Object.create(null),f=0;if(q[_+3]==="O"&&q[_+4]==="C"&&q[_+5]==="T"&&q[_+6]==="Y"&&q[_+7]==="P"&&q[_+8]==="E"){_=_+9;let K=1,P=!1,j=!1,v="";for(;_<q.length;_++)if(q[_]==="<"&&!j){if(P&&F(q,"!ENTITY",_)){_+=7;let w,O;if([w,O,_]=this.readEntityExp(q,_+1,this.suppressValidationErr),O.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount&&f>=this.options.maxEntityCount)throw Error(`Entity count (${f+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);let Y=w.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");$[w]={regx:RegExp(`&${Y};`,"g"),val:O},f++}}else if(P&&F(q,"!ELEMENT",_)){_+=8;let{index:w}=this.readElementExp(q,_+1);_=w}else if(P&&F(q,"!ATTLIST",_))_+=8;else if(P&&F(q,"!NOTATION",_)){_+=9;let{index:w}=this.readNotationExp(q,_+1,this.suppressValidationErr);_=w}else if(F(q,"!--",_))j=!0;else throw Error("Invalid DOCTYPE");K++,v=""}else if(q[_]===">"){if(j){if(q[_-1]==="-"&&q[_-2]==="-")j=!1,K--}else K--;if(K===0)break}else if(q[_]==="[")P=!0;else v+=q[_];if(K!==0)throw Error("Unclosed DOCTYPE")}else throw Error("Invalid Tag instead of DOCTYPE");return{entities:$,i:_}}readEntityExp(q,_){_=b(q,_);let $="";while(_<q.length&&!/\s/.test(q[_])&&q[_]!=='"'&&q[_]!=="'")$+=q[_],_++;if(p_($),_=b(q,_),!this.suppressValidationErr){if(q.substring(_,_+6).toUpperCase()==="SYSTEM")throw Error("External entities are not supported");else if(q[_]==="%")throw Error("Parameter entities are not supported")}let f="";if([_,f]=this.readIdentifierVal(q,_,"entity"),this.options.enabled!==!1&&this.options.maxEntitySize&&f.length>this.options.maxEntitySize)throw Error(`Entity "${$}" size (${f.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return _--,[$,f,_]}readNotationExp(q,_){_=b(q,_);let $="";while(_<q.length&&!/\s/.test(q[_]))$+=q[_],_++;!this.suppressValidationErr&&p_($),_=b(q,_);let f=q.substring(_,_+6).toUpperCase();if(!this.suppressValidationErr&&f!=="SYSTEM"&&f!=="PUBLIC")throw Error(`Expected SYSTEM or PUBLIC, found "${f}"`);_+=f.length,_=b(q,_);let K=null,P=null;if(f==="PUBLIC"){if([_,K]=this.readIdentifierVal(q,_,"publicIdentifier"),_=b(q,_),q[_]==='"'||q[_]==="'")[_,P]=this.readIdentifierVal(q,_,"systemIdentifier")}else if(f==="SYSTEM"){if([_,P]=this.readIdentifierVal(q,_,"systemIdentifier"),!this.suppressValidationErr&&!P)throw Error("Missing mandatory system identifier for SYSTEM notation")}return{notationName:$,publicIdentifier:K,systemIdentifier:P,index:--_}}readIdentifierVal(q,_,$){let f="",K=q[_];if(K!=='"'&&K!=="'")throw Error(`Expected quoted string, found "${K}"`);_++;while(_<q.length&&q[_]!==K)f+=q[_],_++;if(q[_]!==K)throw Error(`Unterminated ${$} value`);return _++,[_,f]}readElementExp(q,_){_=b(q,_);let $="";while(_<q.length&&!/\s/.test(q[_]))$+=q[_],_++;if(!this.suppressValidationErr&&!v_($))throw Error(`Invalid element name: "${$}"`);_=b(q,_);let f="";if(q[_]==="E"&&F(q,"MPTY",_))_+=4;else if(q[_]==="A"&&F(q,"NY",_))_+=2;else if(q[_]==="("){_++;while(_<q.length&&q[_]!==")")f+=q[_],_++;if(q[_]!==")")throw Error("Unterminated content model")}else if(!this.suppressValidationErr)throw Error(`Invalid Element Expression, found "${q[_]}"`);return{elementName:$,contentModel:f.trim(),index:_}}readAttlistExp(q,_){_=b(q,_);let $="";while(_<q.length&&!/\s/.test(q[_]))$+=q[_],_++;p_($),_=b(q,_);let f="";while(_<q.length&&!/\s/.test(q[_]))f+=q[_],_++;if(!p_(f))throw Error(`Invalid attribute name: "${f}"`);_=b(q,_);let K="";if(q.substring(_,_+8).toUpperCase()==="NOTATION"){if(K="NOTATION",_+=8,_=b(q,_),q[_]!=="(")throw Error(`Expected '(', found "${q[_]}"`);_++;let j=[];while(_<q.length&&q[_]!==")"){let v="";while(_<q.length&&q[_]!=="|"&&q[_]!==")")v+=q[_],_++;if(v=v.trim(),!p_(v))throw Error(`Invalid notation name: "${v}"`);if(j.push(v),q[_]==="|")_++,_=b(q,_)}if(q[_]!==")")throw Error("Unterminated list of notations");_++,K+=" ("+j.join("|")+")"}else{while(_<q.length&&!/\s/.test(q[_]))K+=q[_],_++;let j=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!j.includes(K.toUpperCase()))throw Error(`Invalid attribute type: "${K}"`)}_=b(q,_);let P="";if(q.substring(_,_+8).toUpperCase()==="#REQUIRED")P="#REQUIRED",_+=8;else if(q.substring(_,_+7).toUpperCase()==="#IMPLIED")P="#IMPLIED",_+=7;else[_,P]=this.readIdentifierVal(q,_,"ATTLIST");return{elementName:$,attributeName:f,attributeType:K,defaultValue:P,index:_}}}var b=(q,_)=>{while(_<q.length&&/\s/.test(q[_]))_++;return _};function F(q,_,$){for(let f=0;f<_.length;f++)if(_[f]!==q[$+f+1])return!1;return!0}function p_(q){if(v_(q))return q;else throw Error(`Invalid entity name ${q}`)}var Gf=/^[-+]?0x[a-fA-F0-9]+$/,df=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,ef={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original"};function hq(q,_={}){if(_=Object.assign({},ef,_),!q||typeof q!=="string")return q;let $=q.trim();if(_.skipLike!==void 0&&_.skipLike.test($))return q;else if(q==="0")return 0;else if(_.hex&&Gf.test($))return Mf($,16);else if(!isFinite($))return Vf(q,Number($),_);else if($.includes("e")||$.includes("E"))return Sf(q,$,_);else{let f=df.exec($);if(f){let K=f[1]||"",P=f[2],j=Cf(f[3]),v=K?q[P.length+1]===".":q[P.length]===".";if(!_.leadingZeros&&(P.length>1||P.length===1&&!v))return q;else{let w=Number($),O=String(w);if(w===0)return w;if(O.search(/[eE]/)!==-1)if(_.eNotation)return w;else return q;else if($.indexOf(".")!==-1)if(O==="0")return w;else if(O===j)return w;else if(O===`${K}${j}`)return w;else return q;let Y=P?j:$;if(P)return Y===O||K+Y===O?w:q;else return Y===O||Y===K+O?w:q}}else return q}}var bf=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Sf(q,_,$){if(!$.eNotation)return q;let f=_.match(bf);if(f){let K=f[1]||"",P=f[3].indexOf("e")===-1?"E":"e",j=f[2],v=K?q[j.length+1]===P:q[j.length]===P;if(j.length>1&&v)return q;else if(j.length===1&&(f[3].startsWith(`.${P}`)||f[3][0]===P))return Number(_);else if($.leadingZeros&&!v)return _=(f[1]||"")+f[3],Number(_);else return q}else return q}function Cf(q){if(q&&q.indexOf(".")!==-1){if(q=q.replace(/0+$/,""),q===".")q="0";else if(q[0]===".")q="0"+q;else if(q[q.length-1]===".")q=q.substring(0,q.length-1);return q}return q}function Mf(q,_){if(parseInt)return parseInt(q,_);else if(Number.parseInt)return Number.parseInt(q,_);else if(window&&window.parseInt)return window.parseInt(q,_);else throw Error("parseInt, Number.parseInt, window.parseInt are not supported")}function Vf(q,_,$){let f=_===1/0;switch($.infinity.toLowerCase()){case"null":return null;case"infinity":return _;case"string":return f?"Infinity":"-Infinity";case"original":default:return q}}function zq(q){if(typeof q==="function")return q;if(Array.isArray(q))return(_)=>{for(let $ of q){if(typeof $==="string"&&_===$)return!0;if($ instanceof RegExp&&$.test(_))return!0}};return()=>!1}class w_{constructor(q,_={}){this.pattern=q,this.separator=_.separator||".",this.segments=this._parse(q),this._hasDeepWildcard=this.segments.some(($)=>$.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some(($)=>$.attrName!==void 0),this._hasPositionSelector=this.segments.some(($)=>$.position!==void 0)}_parse(q){let _=[],$=0,f="";while($<q.length)if(q[$]===this.separator)if($+1<q.length&&q[$+1]===this.separator){if(f.trim())_.push(this._parseSegment(f.trim())),f="";_.push({type:"deep-wildcard"}),$+=2}else{if(f.trim())_.push(this._parseSegment(f.trim()));f="",$++}else f+=q[$],$++;if(f.trim())_.push(this._parseSegment(f.trim()));return _}_parseSegment(q){let _={type:"tag"},$=null,f=q,K=q.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(K){if(f=K[1]+K[3],K[2]){let O=K[2].slice(1,-1);if(O)$=O}}let P=void 0,j=f;if(f.includes("::")){let O=f.indexOf("::");if(P=f.substring(0,O).trim(),j=f.substring(O+2).trim(),!P)throw Error(`Invalid namespace in pattern: ${q}`)}let v=void 0,w=null;if(j.includes(":")){let O=j.lastIndexOf(":"),Y=j.substring(0,O).trim(),T=j.substring(O+1).trim();if(["first","last","odd","even"].includes(T)||/^nth\(\d+\)$/.test(T))v=Y,w=T;else v=j}else v=j;if(!v)throw Error(`Invalid segment pattern: ${q}`);if(_.tag=v,P)_.namespace=P;if($)if($.includes("=")){let O=$.indexOf("=");_.attrName=$.substring(0,O).trim(),_.attrValue=$.substring(O+1).trim()}else _.attrName=$.trim();if(w){let O=w.match(/^nth\((\d+)\)$/);if(O)_.position="nth",_.positionValue=parseInt(O[1],10);else _.position=w}return _}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class o_{constructor(q={}){this.separator=q.separator||".",this.path=[],this.siblingStacks=[]}push(q,_=null,$=null){if(this.path.length>0){let O=this.path[this.path.length-1];O.values=void 0}let f=this.path.length;if(!this.siblingStacks[f])this.siblingStacks[f]=new Map;let K=this.siblingStacks[f],P=$?`${$}:${q}`:q,j=K.get(P)||0,v=0;for(let O of K.values())v+=O;K.set(P,j+1);let w={tag:q,position:v,counter:j};if($!==null&&$!==void 0)w.namespace=$;if(_!==null&&_!==void 0)w.values=_;this.path.push(w)}pop(){if(this.path.length===0)return;let q=this.path.pop();if(this.siblingStacks.length>this.path.length+1)this.siblingStacks.length=this.path.length+1;return q}updateCurrent(q){if(this.path.length>0){let _=this.path[this.path.length-1];if(q!==null&&q!==void 0)_.values=q}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(q){if(this.path.length===0)return;return this.path[this.path.length-1].values?.[q]}hasAttr(q){if(this.path.length===0)return!1;let _=this.path[this.path.length-1];return _.values!==void 0&&q in _.values}getPosition(){if(this.path.length===0)return-1;return this.path[this.path.length-1].position??0}getCounter(){if(this.path.length===0)return-1;return this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(q,_=!0){let $=q||this.separator;return this.path.map((f)=>{if(_&&f.namespace)return`${f.namespace}:${f.tag}`;return f.tag}).join($)}toArray(){return this.path.map((q)=>q.tag)}reset(){this.path=[],this.siblingStacks=[]}matches(q){let _=q.segments;if(_.length===0)return!1;if(q.hasDeepWildcard())return this._matchWithDeepWildcard(_);return this._matchSimple(_)}_matchSimple(q){if(this.path.length!==q.length)return!1;for(let _=0;_<q.length;_++){let $=q[_],f=this.path[_],K=_===this.path.length-1;if(!this._matchSegment($,f,K))return!1}return!0}_matchWithDeepWildcard(q){let _=this.path.length-1,$=q.length-1;while($>=0&&_>=0){let f=q[$];if(f.type==="deep-wildcard"){if($--,$<0)return!0;let K=q[$],P=!1;for(let j=_;j>=0;j--){let v=j===this.path.length-1;if(this._matchSegment(K,this.path[j],v)){_=j-1,$--,P=!0;break}}if(!P)return!1}else{let K=_===this.path.length-1;if(!this._matchSegment(f,this.path[_],K))return!1;_--,$--}}return $<0}_matchSegment(q,_,$){if(q.tag!=="*"&&q.tag!==_.tag)return!1;if(q.namespace!==void 0){if(q.namespace!=="*"&&q.namespace!==_.namespace)return!1}if(q.attrName!==void 0){if(!$)return!1;if(!_.values||!(q.attrName in _.values))return!1;if(q.attrValue!==void 0){let f=_.values[q.attrName];if(String(f)!==String(q.attrValue))return!1}}if(q.position!==void 0){if(!$)return!1;let f=_.counter??0;if(q.position==="first"&&f!==0)return!1;else if(q.position==="odd"&&f%2!==1)return!1;else if(q.position==="even"&&f%2!==0)return!1;else if(q.position==="nth"){if(f!==q.positionValue)return!1}}return!0}snapshot(){return{path:this.path.map((q)=>({...q})),siblingStacks:this.siblingStacks.map((q)=>new Map(q))}}restore(q){this.path=q.path.map((_)=>({..._})),this.siblingStacks=q.siblingStacks.map((_)=>new Map(_))}}function Nf(q,_){if(!q)return{};let $=_.attributesGroupName?q[_.attributesGroupName]:q;if(!$)return{};let f={};for(let K in $)if(K.startsWith(_.attributeNamePrefix)){let P=K.substring(_.attributeNamePrefix.length);f[P]=$[K]}else f[K]=$[K];return f}function lf(q){if(!q||typeof q!=="string")return;let _=q.indexOf(":");if(_!==-1&&_>0){let $=q.substring(0,_);if($!=="xmlns")return $}return}class g_{constructor(q){if(this.options=q,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(_,$)=>b$($,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(_,$)=>b$($,16,"&#x")}},this.addExternalEntities=tf,this.parseXml=If,this.parseTextData=cf,this.resolveNameSpace=af,this.buildAttributesMap=Ef,this.isItStopNode=Lf,this.replaceEntitiesValue=yf,this.readStopNodeData=sf,this.saveTextToParentTag=Df,this.addChild=gf,this.ignoreAttributesFn=zq(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0,this.matcher=new o_,this.isCurrentNodeStopNode=!1,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodeExpressions=[];for(let _=0;_<this.options.stopNodes.length;_++){let $=this.options.stopNodes[_];if(typeof $==="string")this.stopNodeExpressions.push(new w_($));else if($ instanceof w_)this.stopNodeExpressions.push($)}}}}function tf(q){let _=Object.keys(q);for(let $=0;$<_.length;$++){let f=_[$],K=f.replace(/[.\-+*:]/g,"\\.");this.lastEntities[f]={regex:new RegExp("&"+K+";","g"),val:q[f]}}}function cf(q,_,$,f,K,P,j){if(q!==void 0){if(this.options.trimValues&&!f)q=q.trim();if(q.length>0){if(!j)q=this.replaceEntitiesValue(q,_,$);let v=this.options.jPath?$.toString():$,w=this.options.tagValueProcessor(_,q,v,K,P);if(w===null||w===void 0)return q;else if(typeof w!==typeof q||w!==q)return w;else if(this.options.trimValues)return Jq(q,this.options.parseTagValue,this.options.numberParseOptions);else if(q.trim()===q)return Jq(q,this.options.parseTagValue,this.options.numberParseOptions);else return q}}}function af(q){if(this.options.removeNSPrefix){let _=q.split(":"),$=q.charAt(0)==="/"?"/":"";if(_[0]==="xmlns")return"";if(_.length===2)q=$+_[1]}return q}var Rf=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Ef(q,_,$){if(this.options.ignoreAttributes!==!0&&typeof q==="string"){let f=a_(q,Rf),K=f.length,P={},j={};for(let v=0;v<K;v++){let w=this.resolveNameSpace(f[v][1]),O=f[v][4];if(w.length&&O!==void 0){let Y=O;if(this.options.trimValues)Y=Y.trim();Y=this.replaceEntitiesValue(Y,$,_),j[w]=Y}}if(Object.keys(j).length>0&&typeof _==="object"&&_.updateCurrent)_.updateCurrent(j);for(let v=0;v<K;v++){let w=this.resolveNameSpace(f[v][1]),O=this.options.jPath?_.toString():_;if(this.ignoreAttributesFn(w,O))continue;let Y=f[v][4],T=this.options.attributeNamePrefix+w;if(w.length){if(this.options.transformAttributeName)T=this.options.transformAttributeName(T);if(T=S$(T,this.options),Y!==void 0){if(this.options.trimValues)Y=Y.trim();Y=this.replaceEntitiesValue(Y,$,_);let k=this.options.jPath?_.toString():_,h=this.options.attributeValueProcessor(w,Y,k);if(h===null||h===void 0)P[T]=Y;else if(typeof h!==typeof Y||h!==Y)P[T]=h;else P[T]=Jq(Y,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)P[T]=!0}}if(!Object.keys(P).length)return;if(this.options.attributesGroupName){let v={};return v[this.options.attributesGroupName]=P,v}return P}}var If=function(q){q=q.replace(/\r\n?/g,`
561
- `);let _=new S("!xml"),$=_,f="";this.matcher.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let K=new I_(this.options.processEntities);for(let P=0;P<q.length;P++)if(q[P]==="<")if(q[P+1]==="/"){let v=Q(q,">",P,"Closing Tag is not closed."),w=q.substring(P+2,v).trim();if(this.options.removeNSPrefix){let Y=w.indexOf(":");if(Y!==-1)w=w.substr(Y+1)}if(w=Hq(this.options.transformTagName,w,"",this.options).tagName,$)f=this.saveTextToParentTag(f,$,this.matcher);let O=this.matcher.getCurrentTag();if(w&&this.options.unpairedTags.indexOf(w)!==-1)throw Error(`Unpaired tag can not be used as closing tag: </${w}>`);if(O&&this.options.unpairedTags.indexOf(O)!==-1)this.matcher.pop(),this.tagsNodeStack.pop();this.matcher.pop(),this.isCurrentNodeStopNode=!1,$=this.tagsNodeStack.pop(),f="",P=v}else if(q[P+1]==="?"){let v=Wq(q,P,!1,"?>");if(!v)throw Error("Pi Tag is not closed.");if(f=this.saveTextToParentTag(f,$,this.matcher),this.options.ignoreDeclaration&&v.tagName==="?xml"||this.options.ignorePiTags);else{let w=new S(v.tagName);if(w.add(this.options.textNodeName,""),v.tagName!==v.tagExp&&v.attrExpPresent)w[":@"]=this.buildAttributesMap(v.tagExp,this.matcher,v.tagName);this.addChild($,w,this.matcher,P)}P=v.closeIndex+1}else if(q.substr(P+1,3)==="!--"){let v=Q(q,"-->",P+4,"Comment is not closed.");if(this.options.commentPropName){let w=q.substring(P+4,v-2);f=this.saveTextToParentTag(f,$,this.matcher),$.add(this.options.commentPropName,[{[this.options.textNodeName]:w}])}P=v}else if(q.substr(P+1,2)==="!D"){let v=K.readDocType(q,P);this.docTypeEntities=v.entities,P=v.i}else if(q.substr(P+1,2)==="!["){let v=Q(q,"]]>",P,"CDATA is not closed.")-2,w=q.substring(P+9,v);f=this.saveTextToParentTag(f,$,this.matcher);let O=this.parseTextData(w,$.tagname,this.matcher,!0,!1,!0,!0);if(O==null)O="";if(this.options.cdataPropName)$.add(this.options.cdataPropName,[{[this.options.textNodeName]:w}]);else $.add(this.options.textNodeName,O);P=v+2}else{let v=Wq(q,P,this.options.removeNSPrefix);if(!v){let r=q.substring(Math.max(0,P-50),Math.min(q.length,P+50));throw Error(`readTagExp returned undefined at position ${P}. Context: "${r}"`)}let{tagName:w,rawTagName:O,tagExp:Y,attrExpPresent:T,closeIndex:k}=v;if({tagName:w,tagExp:Y}=Hq(this.options.transformTagName,w,Y,this.options),this.options.strictReservedNames&&(w===this.options.commentPropName||w===this.options.cdataPropName))throw Error(`Invalid tag name: ${w}`);if($&&f){if($.tagname!=="!xml")f=this.saveTextToParentTag(f,$,this.matcher,!1)}let h=$;if(h&&this.options.unpairedTags.indexOf(h.tagname)!==-1)$=this.tagsNodeStack.pop(),this.matcher.pop();let W=!1;if(Y.length>0&&Y.lastIndexOf("/")===Y.length-1){if(W=!0,w[w.length-1]==="/")w=w.substr(0,w.length-1),Y=w;else Y=Y.substr(0,Y.length-1);T=w!==Y}let H=null,u={},Z=void 0;if(Z=lf(O),w!==_.tagname)this.matcher.push(w,{},Z);if(w!==Y&&T){if(H=this.buildAttributesMap(Y,this.matcher,w),H)u=Nf(H,this.options)}if(w!==_.tagname)this.isCurrentNodeStopNode=this.isItStopNode(this.stopNodeExpressions,this.matcher);let X=P;if(this.isCurrentNodeStopNode){let r="";if(W)P=v.closeIndex;else if(this.options.unpairedTags.indexOf(w)!==-1)P=v.closeIndex;else{let c=this.readStopNodeData(q,O,k+1);if(!c)throw Error(`Unexpected end of ${O}`);P=c.i,r=c.tagContent}let A=new S(w);if(H)A[":@"]=H;A.add(this.options.textNodeName,r),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild($,A,this.matcher,X)}else{if(W){({tagName:w,tagExp:Y}=Hq(this.options.transformTagName,w,Y,this.options));let r=new S(w);if(H)r[":@"]=H;this.addChild($,r,this.matcher,X),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(this.options.unpairedTags.indexOf(w)!==-1){let r=new S(w);if(H)r[":@"]=H;this.addChild($,r,this.matcher,X),this.matcher.pop(),this.isCurrentNodeStopNode=!1,P=v.closeIndex;continue}else{let r=new S(w);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw Error("Maximum nested tags exceeded");if(this.tagsNodeStack.push($),H)r[":@"]=H;this.addChild($,r,this.matcher,X),$=r}f="",P=k}}else f+=q[P];return _.child};function gf(q,_,$,f){if(!this.options.captureMetaData)f=void 0;let K=this.options.jPath?$.toString():$,P=this.options.updateTag(_.tagname,K,_[":@"]);if(P===!1);else if(typeof P==="string")_.tagname=P,q.addChild(_,f);else q.addChild(_,f)}function yf(q,_,$){let f=this.options.processEntities;if(!f||!f.enabled)return q;if(f.allowedTags){let K=this.options.jPath?$.toString():$;if(!(Array.isArray(f.allowedTags)?f.allowedTags.includes(_):f.allowedTags(_,K)))return q}if(f.tagFilter){let K=this.options.jPath?$.toString():$;if(!f.tagFilter(_,K))return q}for(let K of Object.keys(this.docTypeEntities)){let P=this.docTypeEntities[K],j=q.match(P.regx);if(j){if(this.entityExpansionCount+=j.length,f.maxTotalExpansions&&this.entityExpansionCount>f.maxTotalExpansions)throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${f.maxTotalExpansions}`);let v=q.length;if(q=q.replace(P.regx,P.val),f.maxExpandedLength){if(this.currentExpandedLength+=q.length-v,this.currentExpandedLength>f.maxExpandedLength)throw Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${f.maxExpandedLength}`)}}}for(let K of Object.keys(this.lastEntities)){let P=this.lastEntities[K],j=q.match(P.regex);if(j){if(this.entityExpansionCount+=j.length,f.maxTotalExpansions&&this.entityExpansionCount>f.maxTotalExpansions)throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${f.maxTotalExpansions}`)}q=q.replace(P.regex,P.val)}if(q.indexOf("&")===-1)return q;if(this.options.htmlEntities)for(let K of Object.keys(this.htmlEntities)){let P=this.htmlEntities[K],j=q.match(P.regex);if(j){if(this.entityExpansionCount+=j.length,f.maxTotalExpansions&&this.entityExpansionCount>f.maxTotalExpansions)throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${f.maxTotalExpansions}`)}q=q.replace(P.regex,P.val)}return q=q.replace(this.ampEntity.regex,this.ampEntity.val),q}function Df(q,_,$,f){if(q){if(f===void 0)f=_.child.length===0;if(q=this.parseTextData(q,_.tagname,$,!1,_[":@"]?Object.keys(_[":@"]).length!==0:!1,f),q!==void 0&&q!=="")_.add(this.options.textNodeName,q);q=""}return q}function Lf(q,_){if(!q||q.length===0)return!1;for(let $=0;$<q.length;$++)if(_.matches(q[$]))return!0;return!1}function xf(q,_,$=">"){let f,K="";for(let P=_;P<q.length;P++){let j=q[P];if(f){if(j===f)f=""}else if(j==='"'||j==="'")f=j;else if(j===$[0])if($[1]){if(q[P+1]===$[1])return{data:K,index:P}}else return{data:K,index:P};else if(j==="\t")j=" ";K+=j}}function Q(q,_,$,f){let K=q.indexOf(_,$);if(K===-1)throw Error(f);else return K+_.length-1}function Wq(q,_,$,f=">"){let K=xf(q,_+1,f);if(!K)return;let{data:P,index:j}=K,v=P.search(/\s/),w=P,O=!0;if(v!==-1)w=P.substring(0,v),P=P.substring(v+1).trimStart();let Y=w;if($){let T=w.indexOf(":");if(T!==-1)w=w.substr(T+1),O=w!==K.data.substr(T+1)}return{tagName:w,tagExp:P,closeIndex:j,attrExpPresent:O,rawTagName:Y}}function sf(q,_,$){let f=$,K=1;for(;$<q.length;$++)if(q[$]==="<")if(q[$+1]==="/"){let P=Q(q,">",$,`${_} is not closed`);if(q.substring($+2,P).trim()===_){if(K--,K===0)return{tagContent:q.substring(f,$),i:P}}$=P}else if(q[$+1]==="?")$=Q(q,"?>",$+1,"StopNode is not closed.");else if(q.substr($+1,3)==="!--")$=Q(q,"-->",$+3,"StopNode is not closed.");else if(q.substr($+1,2)==="![")$=Q(q,"]]>",$,"StopNode is not closed.")-2;else{let P=Wq(q,$,">");if(P){if((P&&P.tagName)===_&&P.tagExp[P.tagExp.length-1]!=="/")K++;$=P.closeIndex}}}function Jq(q,_,$){if(_&&typeof q==="string"){let f=q.trim();if(f==="true")return!0;else if(f==="false")return!1;else return hq(q,$)}else if(A$(q))return q;else return""}function b$(q,_,$){let f=Number.parseInt(q,_);if(f>=0&&f<=1114111)return String.fromCodePoint(f);else return $+q+";"}function Hq(q,_,$,f){if(q){let K=q(_);if($===_)$=K;_=K}return _=S$(_,f),{tagName:_,tagExp:$}}function S$(q,_){if(R_.includes(q))throw Error(`[SECURITY] Invalid name: "${q}" is a reserved JavaScript keyword that could cause prototype pollution`);else if(m_.includes(q))return _.onDangerousProperty(q);return q}var Zq=S.getMetaDataSymbol();function Bf(q,_){if(!q||typeof q!=="object")return{};if(!_)return q;let $={};for(let f in q)if(f.startsWith(_)){let K=f.substring(_.length);$[K]=q[f]}else $[f]=q[f];return $}function rq(q,_,$){return C$(q,_,$)}function C$(q,_,$){let f,K={};for(let P=0;P<q.length;P++){let j=q[P],v=Uf(j);if(v!==void 0&&v!==_.textNodeName){let w=Bf(j[":@"]||{},_.attributeNamePrefix);$.push(v,w)}if(v===_.textNodeName)if(f===void 0)f=j[v];else f+=""+j[v];else if(v===void 0)continue;else if(j[v]){let w=C$(j[v],_,$),O=Qf(w,_);if(j[":@"])Ff(w,j[":@"],$,_);else if(Object.keys(w).length===1&&w[_.textNodeName]!==void 0&&!_.alwaysCreateTextNode)w=w[_.textNodeName];else if(Object.keys(w).length===0)if(_.alwaysCreateTextNode)w[_.textNodeName]="";else w="";if(j[Zq]!==void 0&&typeof w==="object"&&w!==null)w[Zq]=j[Zq];if(K[v]!==void 0&&Object.prototype.hasOwnProperty.call(K,v)){if(!Array.isArray(K[v]))K[v]=[K[v]];K[v].push(w)}else{let Y=_.jPath?$.toString():$;if(_.isArray(v,Y,O))K[v]=[w];else K[v]=w}if(v!==void 0&&v!==_.textNodeName)$.pop()}}if(typeof f==="string"){if(f.length>0)K[_.textNodeName]=f}else if(f!==void 0)K[_.textNodeName]=f;return K}function Uf(q){let _=Object.keys(q);for(let $=0;$<_.length;$++){let f=_[$];if(f!==":@")return f}}function Ff(q,_,$,f){if(_){let K=Object.keys(_),P=K.length;for(let j=0;j<P;j++){let v=K[j],w=v.startsWith(f.attributeNamePrefix)?v.substring(f.attributeNamePrefix.length):v,O=f.jPath?$.toString()+"."+w:$;if(f.isArray(v,O,!0,!0))q[v]=[_[v]];else q[v]=_[v]}}}function Qf(q,_){let{textNodeName:$}=_,f=Object.keys(q).length;if(f===0)return!0;if(f===1&&(q[$]||typeof q[$]==="boolean"||q[$]===0))return!0;return!1}class a{constructor(q){this.externalEntities={},this.options=e$(q)}parse(q,_){if(typeof q!=="string"&&q.toString)q=q.toString();else if(typeof q!=="string")throw Error("XML data is accepted in String or Bytes[] form.");if(_){if(_===!0)_={};let K=o$(q,_);if(K!==!0)throw Error(`${K.err.msg}:${K.err.line}:${K.err.col}`)}let $=new g_(this.options);$.addExternalEntities(this.externalEntities);let f=$.parseXml(q);if(this.options.preserveOrder||f===void 0)return f;else return rq(f,this.options,$.matcher)}addEntity(q,_){if(_.indexOf("&")!==-1)throw Error("Entity value can't have '&'");else if(q.indexOf("&")!==-1||q.indexOf(";")!==-1)throw Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(_==="&")throw Error("An entity with value '&' is not permitted");else this.externalEntities[q]=_}static getMetaDataSymbol(){return S.getMetaDataSymbol()}}function M$(q){let f=new a({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse(q).package;if(!f)throw Error("Invalid PDSC: missing <package> root element");let K=_K(f.components?.component),P=K.some((v)=>v["@_generator"]==="CubeMX"),j=K.some((v)=>v["@_Cgroup"]?.includes("Startup")||v["@_Csub"]==="Startup");if(P&&!j)return"2.x";if(j)return"1.x";throw Error("Cannot classify DFP version: PDSC has neither Startup component nor CubeMX generator reference")}function _K(q){if(!q)return[];return Array.isArray(q)?q:[q]}class mq{packRoot;name="DfpPackLayer (L1)";constructor(q){this.packRoot=q}async canResolve(q){let _=this.findPdsc(q);if(!_)return!1;let $=uq(_,"utf-8");return M$($)==="1.x"}async resolve(q,_){let $=this.findPdsc(q);if(!$)throw Error(`No PDSC found for device family ${q.family}`);let f=$K($),K=uq($,"utf-8"),j=new a({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse(K),w=T_(j.package?.components?.component).find((H)=>H["@_Cgroup"]?.includes("Startup")||H["@_Csub"]==="Startup");if(!w)throw Error(`No Startup component found in PDSC for ${q.family}`);let O=T_(w.files?.file),Y=null,T=null,k=[];for(let H of O){let u=H["@_name"]??"",Z=H["@_category"]??"",X=E(f,u);if(!Aq(X))continue;if(Z==="source"&&u.includes("startup")){let r=E(_,O_(u));N(X,r),Y=r}else if(Z==="source"&&u.includes("system")){let r=E(_,O_(u));N(X,r),T=r}else if(Z==="header"){let r=E(_,"Include");qK(r,{recursive:!0});let A=E(r,O_(u));N(X,A),k.push(A)}}if(!Y)throw Error(`No startup file found in Pack for ${q.family}`);if(!T)throw Error(`No system file found in Pack for ${q.family}`);let h=null,W=this.findBestLinkerScript(f,K,q);if(W){let H=E(_,O_(W));N(W,H),h=H}return{startupFile:Y,systemFile:T,linkerScript:h,headers:k,source:"dfp-pack"}}findPdsc(q){if(!Aq(this.packRoot))return null;let _=Xq(this.packRoot);for(let $ of _){let f=E(this.packRoot,$);try{let P=Xq(f).find((j)=>j.endsWith(".pdsc"));if(P){let j=E(f,P),v=uq(j,"utf-8");if(v.includes(q.family)||v.includes(q.name))return j}}catch{}}return null}findBestLinkerScript(q,_,$){let f=fK(_,q);if(f)return f;return PK(q,$)}}function T_(q){if(!q)return[];return Array.isArray(q)?q:[q]}function fK(q,_){let f=new a({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse(q),K=T_(f.package?.conditions?.condition),P=new Set;for(let w of K){let O=w["@_id"]??"";if(T_(w.require).some((k)=>(k["@_Tcompiler"]??"").toUpperCase()==="GCC"))P.add(O)}let v=T_(f.package?.components?.component).filter((w)=>{let O=(w["@_Cclass"]??"").toLowerCase(),Y=(w["@_Cgroup"]??"").toLowerCase(),T=(w["@_Csub"]??"").toLowerCase();return O.includes("device")&&(Y.includes("startup")||T==="startup")});for(let w of v){let O=T_(w.files?.file);for(let Y of O){if((Y["@_category"]??"")!=="linkerScript")continue;let T=Y["@_condition"]??"";if(T&&!P.has(T))continue;let k=E(_,Y["@_name"]??"");if(Aq(k))return k}}return null}var KK=["example","examples","template","templates","test","tests","board","boards"];function PK(q,_){let $=jK(q);if($.length===0)return null;let f=$.filter((P)=>{let j=P.slice(q.length).toLowerCase();return!KK.some((v)=>j.includes(v))});if(f.length===0)return null;let K=f.map((P)=>{let j=P.slice(q.length+1);return{path:P,score:vK(j,_.name,_.family),depth:j.split(/[/\\]/).length,nameLen:O_(P).length}});if(K.sort((P,j)=>{if(j.score!==P.score)return j.score-P.score;if(P.depth!==j.depth)return P.depth-j.depth;return P.nameLen-j.nameLen}),K[0].score<0)return null;return K[0].path}function jK(q){let _=[],$=(f)=>{try{for(let K of Xq(f,{withFileTypes:!0})){let P=E(f,K.name);if(K.isDirectory())$(P);else if(K.name.endsWith(".ld")||K.name.endsWith(".lds"))_.push(P)}}catch{}};return $(q),_}function vK(q,_,$){let f=q.toLowerCase(),K=O_(q).toLowerCase(),P=0;if(f.includes("gcc"))P+=30;if(f.includes("armcc")||f.includes("iar")||f.includes("mdk"))P-=100;if(K.includes("flash")||K.includes("rom"))P+=50;if(K.includes("sram")||K.includes("ram"))P-=20;if(K.includes(_.toLowerCase()))P+=40;if(K.includes($.toLowerCase()))P+=20;if(q.split(/[/\\]/).map((v)=>v.toLowerCase()).some((v)=>v.includes("device")||v==="startup"||v==="gcc"))P+=10;return P}import{existsSync as Y_,readdirSync as wK,mkdirSync as OK}from"node:fs";import{join as C}from"node:path";class nq{coreRoot;name="ArduinoCoreLayer (L4)";constructor(q){this.coreRoot=q}async canResolve(q){if(!q.family.startsWith("STM32"))return!1;return this.getFamilyDir(q)!==null}async resolve(q,_){let $=this.getFamilyDir(q);if(!$)throw Error(`Arduino Core has no files for family ${q.family}`);let f=C($,"Source","Templates","gcc"),K=`startup_${q.subfamilyDefine.toLowerCase()}.s`,P=C(f,K);if(!Y_(P))throw Error(`Startup file not found: ${P}`);let j=C(_,K);N(P,j);let v=C($,"Source","Templates"),O=`system_${q.family.toLowerCase()}.c`,Y=C(v,O);if(!Y_(Y))throw Error(`System file not found: ${Y}`);let T=C(_,O);N(Y,T);let k=[],h=C($,"Include");if(Y_(h)){let W=C(_,"Include");OK(W,{recursive:!0});let H=`${q.subfamilyDefine.toLowerCase()}.h`,u=C(h,H);if(Y_(u)){let Z=C(W,H);N(u,Z),k.push(Z)}}return{startupFile:j,systemFile:T,linkerScript:null,headers:k,source:"arduino-core"}}getFamilyDir(q){let _=C(this.coreRoot,"system","Drivers","CMSIS","Device","ST");if(!Y_(_))return null;let $=C(_,q.family);if(Y_($))return $;try{let K=wK(_).find((P)=>P.toLowerCase()===q.family.toLowerCase());if(K)return C(_,K)}catch{}return null}}var c6=Z$(h$(),1);var fq=null;function x7(){if(fq)return fq;let q=j_("assets/chipctx-gen/templates/linker.ld.hbs");return fq=c6.default.compile(q,{noEscape:!0}),fq}function a6(q){return x7()({...q,stackSize:q.stackSize??"0x400",heapSize:q.heapSize??"0x200"})}var R6=Z$(h$(),1);var Kq=null;function s7(){if(Kq)return Kq;let q=j_("assets/chipctx-gen/templates/cgen.yml.hbs");return Kq=R6.default.compile(q,{noEscape:!0}),Kq}function E6(q){return s7()({...q,version:"1.0.0",board:q.board??""})}import{readFileSync as z$,existsSync as I6,readdirSync as g6,mkdirSync as y6}from"node:fs";import{join as U,basename as D6,dirname as B7}from"node:path";class H${packRoot;constructor(q){this.packRoot=q}detectDriverType(q){let _=this.findPdsc(q);if(!_)return"none";let $=z$(_,"utf-8"),K=new a({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse($),P=Pq(K.package?.components?.component);if(P.some((j)=>j["@_Cgroup"]==="HAL"||this.getFiles(j).some((v)=>v.includes("_hal_"))))return"hal";if(P.some((j)=>j["@_Cgroup"]==="Driver"||this.getFiles(j).some((v)=>v.includes("_ll_"))))return"ll";return"none"}async fetch(q,_,$){if($==="none")return{files:[],driverGroupName:null,includeDir:null};let f=$==="auto"?this.detectDriverType(q):$;if(f==="none")return{files:[],driverGroupName:null,includeDir:null};let K=this.findPdsc(q);if(!K)return{files:[],driverGroupName:null,includeDir:null};let P=B7(K),j=z$(K,"utf-8"),w=new a({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse(j),Y=Pq(w.package?.components?.component).filter((u)=>{if(f==="hal")return u["@_Cgroup"]==="HAL"||this.getFiles(u).some((Z)=>Z.includes("_hal_"));return u["@_Cgroup"]==="Driver"||this.getFiles(u).some((Z)=>Z.includes("_ll_"))}),T=[],k=U(_,"Driver"),h=U(k,"Src"),W=U(k,"Inc");y6(h,{recursive:!0}),y6(W,{recursive:!0});for(let u of Y){let Z=Pq(u.files?.file);for(let X of Z){let r=X["@_name"]??"",A=X["@_category"]??"",c=U(P,r);if(!I6(c))continue;if(A==="source"){let V=U(h,D6(r));N(c,V),T.push(V)}else if(A==="header"){let V=U(W,D6(r));N(c,V)}}}let H=f==="hal"?"HAL_Driver":"LL_Driver";return{files:T,driverGroupName:T.length>0?H:null,includeDir:T.length>0?W:null}}getFiles(q){return Pq(q.files?.file).map((_)=>_["@_name"]??"")}findPdsc(q){if(!I6(this.packRoot))return null;let _=g6(this.packRoot);for(let $ of _){let f=U(this.packRoot,$);try{let P=g6(f).find((j)=>j.endsWith(".pdsc"));if(P){let j=U(f,P),v=z$(j,"utf-8");if(v.includes(q.family)||v.includes(q.name))return j}}catch{}}return null}}function Pq(q){if(!q)return[];return Array.isArray(q)?q:[q]}async function x6(q){let{deviceName:_,outputDir:$,packRoot:f,arduinoCoreRoot:K,driverMode:P}=q,j=u$(_);if(!j)return{success:!1,cgenPath:null,generatedFiles:[],error:`Unknown device: "${_}". Not in device-mappings.json.`};let v={name:_,family:j.family,subfamilyDefine:j.subfamilyDefine,cpu:j.cpu,fpu:j.fpu,dfpVersion:j.dfpVersion};U7($,{recursive:!0});let w={generate:async(Z,X)=>{let r=a6({flashOrigin:j.memory.flash.origin,flashSize:j.memory.flash.size,ramOrigin:j.memory.ram.origin,ramSize:j.memory.ram.size,ccmOrigin:j.memory.ccm?.origin,ccmSize:j.memory.ccm?.size}),A=W$(X,`${_}.ld`);return L6(A,r),A}},O=new kq([new mq(f),new nq(K)],w),Y;try{Y=await O.resolve(v,$)}catch(Z){return{success:!1,cgenPath:null,generatedFiles:[],error:Z.message}}let T=[Y.startupFile,Y.systemFile];if(Y.linkerScript)T.push(Y.linkerScript);T.push(...Y.headers);let k,h;if(P!=="none"){let X=await new H$(f).fetch(v,$,P);if(X.files.length>0)k=X.files,h=X.driverGroupName??void 0,T.push(...X.files)}let W=E6({device:_,board:q.board,subfamilyDefine:j.subfamilyDefine,startupFile:`./${jq($,Y.startupFile)}`,systemFile:`./${jq($,Y.systemFile)}`,includePaths:Y.headers.length>0?[`./${jq($,W$($,"Include"))}`]:[],driverFiles:k?.map((Z)=>`./${jq($,Z)}`),driverGroupName:h}),H=q.projectName??_,u=W$($,`${H}.cgen.yml`);return L6(u,W),T.push(u),{success:!0,cgenPath:u,generatedFiles:T,error:null}}function jq(q,_){if(_.startsWith(q)){let $=_.slice(q.length);if($.startsWith("/"))$=$.slice(1);return $}return _}async function Q7(){let q=process.argv.slice(2);if(q.length===0)console.error("Usage: chipctx-gen <cbuild-gen-idx.yml>"),console.error(" This is a CMSIS Generator. It is called by cbuild automatically."),process.exit(1);let _=U6(q[0]),$;try{$=F7(_,"utf-8")}catch(T){console.error(`[chipctx-gen] Cannot read: ${_}`),console.error(`[chipctx-gen] Error: ${T.message}`),process.exit(1)}let f=$.match(/device:\s*(\S+)/),K=$.match(/output:\s*(\S+)/);if(!f)console.error("[chipctx-gen] Cannot find 'device' field in cbuild-gen-idx.yml"),process.exit(1);let P=f[1],j=K?U6(s6(_),K[1]):s6(_),v=process.env.CMSIS_PACK_ROOT??B6(process.env.HOME??"",".cache","arm","packs"),w=process.env.ARDUINO_CORE_ROOT??B6(process.env.HOME??"",".chipctx","arduino","data","packages","STMicroelectronics","hardware","stm32"),O=process.env.CHIPCTX_DRIVER_MODE??"none";console.log(`[chipctx-gen] Device: ${P}`),console.log(`[chipctx-gen] Output: ${j}`);let Y=await x6({deviceName:P,outputDir:j,packRoot:v,arduinoCoreRoot:w,driverMode:O});if(Y.success)console.log(`[chipctx-gen] Generated ${Y.generatedFiles.length} files`),console.log(`[chipctx-gen] cgen.yml: ${Y.cgenPath}`),process.exit(0);else console.error(`[chipctx-gen] Failed: ${Y.error}`),process.exit(1)}Q7().catch((q)=>{console.error(`[chipctx-gen] Unexpected error: ${q.message}`),process.exit(1)});
559
+ `.trim()},blockValue:function(_){var $=this.aliasable("container.hooks.blockHelperMissing"),f=[this.contextName(0)];this.setupHelperArgs(_,0,f);var K=this.popStack();f.splice(1,0,K),this.push(this.source.functionCall($,"call",f))},ambiguousBlockValue:function(){var _=this.aliasable("container.hooks.blockHelperMissing"),$=[this.contextName(0)];this.setupHelperArgs("",0,$,!0),this.flushInline();var f=this.topStack();$.splice(1,0,f),this.pushSource(["if (!",this.lastHelper,") { ",f," = ",this.source.functionCall(_,"call",$),"}"])},appendContent:function(_){if(this.pendingContent)_=this.pendingContent+_;else this.pendingLocation=this.source.currentLocation;this.pendingContent=_},append:function(){if(this.isInline())this.replaceStack(function($){return[" != null ? ",$,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var _=this.popStack();if(this.pushSource(["if (",_," != null) { ",this.appendToBuffer(_,void 0,!0)," }"]),this.environment.isSimple)this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(_){this.lastContext=_},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(_,$,f,K){var P=0;if(!K&&this.options.compat&&!this.lastContext)this.push(this.depthedLookup(_[P++]));else this.pushContext();this.resolvePath("context",_,P,$,f)},lookupBlockParam:function(_,$){this.useBlockParams=!0,this.push(["blockParams[",_[0],"][",_[1],"]"]),this.resolvePath("context",$,1)},lookupData:function(_,$,f){if(!_)this.pushStackLiteral("data");else this.pushStackLiteral("container.data(data, "+_+")");this.resolvePath("data",$,0,!0,f)},resolvePath:function(_,$,f,K,P){var j=this;if(this.options.strict||this.options.assumeObjects){this.push(d7(this.options.strict&&P,this,$,f,_));return}var v=$.length;for(;f<v;f++)this.replaceStack(function(w){var O=j.nameLookup(w,$[f],_);if(!K)return[" != null ? ",O," : ",w];else return[" && ",O]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(_,$){if(this.pushContext(),this.pushString($),$!=="SubExpression")if(typeof _==="string")this.pushString(_);else this.pushStackLiteral(_)},emptyHash:function(_){if(this.trackIds)this.push("{}");if(this.stringParams)this.push("{}"),this.push("{}");this.pushStackLiteral(_?"undefined":"{}")},pushHash:function(){if(this.hash)this.hashes.push(this.hash);this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var _=this.hash;if(this.hash=this.hashes.pop(),this.trackIds)this.push(this.objectLiteral(_.ids));if(this.stringParams)this.push(this.objectLiteral(_.contexts)),this.push(this.objectLiteral(_.types));this.push(this.objectLiteral(_.values))},pushString:function(_){this.pushStackLiteral(this.quotedString(_))},pushLiteral:function(_){this.pushStackLiteral(_)},pushProgram:function(_){if(_!=null)this.pushStackLiteral(this.programExpression(_));else this.pushStackLiteral(null)},registerDecorator:function(_,$){var f=this.nameLookup("decorators",$,"decorator"),K=this.setupHelperArgs($,_);this.decorators.push(["fn = ",this.decorators.functionCall(f,"",["fn","props","container",K])," || fn;"])},invokeHelper:function(_,$,f){var K=this.popStack(),P=this.setupHelper(_,$),j=[];if(f)j.push(P.name);if(j.push(K),!this.options.strict)j.push(this.aliasable("container.hooks.helperMissing"));var v=["(",this.itemsSeparatedBy(j,"||"),")"],w=this.source.functionCall(v,"call",P.callParams);this.push(w)},itemsSeparatedBy:function(_,$){var f=[];f.push(_[0]);for(var K=1;K<_.length;K++)f.push($,_[K]);return f},invokeKnownHelper:function(_,$){var f=this.setupHelper(_,$);this.push(this.source.functionCall(f.name,"call",f.callParams))},invokeAmbiguous:function(_,$){this.useRegister("helper");var f=this.popStack();this.emptyHash();var K=this.setupHelper(0,_,$),P=this.lastHelper=this.nameLookup("helpers",_,"helper"),j=["(","(helper = ",P," || ",f,")"];if(!this.options.strict)j[0]="(helper = ",j.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"));this.push(["(",j,K.paramsInit?["),(",K.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",K.callParams)," : helper))"])},invokePartial:function(_,$,f){var K=[],P=this.setupParams($,1,K);if(_)$=this.popStack(),delete P.name;if(f)P.indent=JSON.stringify(f);if(P.helpers="helpers",P.partials="partials",P.decorators="container.decorators",!_)K.unshift(this.nameLookup("partials",$,"partial"));else K.unshift($);if(this.options.compat)P.depths="depths";P=this.objectLiteral(P),K.push(P),this.push(this.source.functionCall("container.invokePartial","",K))},assignToHash:function(_){var $=this.popStack(),f=void 0,K=void 0,P=void 0;if(this.trackIds)P=this.popStack();if(this.stringParams)K=this.popStack(),f=this.popStack();var j=this.hash;if(f)j.contexts[_]=f;if(K)j.types[_]=K;if(P)j.ids[_]=P;j.values[_]=$},pushId:function(_,$,f){if(_==="BlockParam")this.pushStackLiteral("blockParams["+$[0]+"].path["+$[1]+"]"+(f?" + "+JSON.stringify("."+f):""));else if(_==="PathExpression")this.pushString($);else if(_==="SubExpression")this.pushStackLiteral("true");else this.pushStackLiteral("null")},compiler:r_,compileChildren:function(_,$){var f=_.children,K=void 0,P=void 0;for(var j=0,v=f.length;j<v;j++){K=f[j],P=new this.compiler;var w=this.matchExistingProgram(K);if(w==null){this.context.programs.push("");var O=this.context.programs.length;K.index=O,K.name="program"+O,this.context.programs[O]=P.compile(K,$,this.context,!this.precompile),this.context.decorators[O]=P.decorators,this.context.environments[O]=K,this.useDepths=this.useDepths||P.useDepths,this.useBlockParams=this.useBlockParams||P.useBlockParams,K.useDepths=this.useDepths,K.useBlockParams=this.useBlockParams}else K.index=w.index,K.name="program"+w.index,this.useDepths=this.useDepths||w.useDepths,this.useBlockParams=this.useBlockParams||w.useBlockParams}},matchExistingProgram:function(_){for(var $=0,f=this.context.environments.length;$<f;$++){var K=this.context.environments[$];if(K&&K.equals(_))return K}},programExpression:function(_){var $=this.environment.children[_],f=[$.index,"data",$.blockParams];if(this.useBlockParams||this.useDepths)f.push("blockParams");if(this.useDepths)f.push("depths");return"container.program("+f.join(", ")+")"},useRegister:function(_){if(!this.registers[_])this.registers[_]=!0,this.registers.list.push(_)},push:function(_){if(!(_ instanceof Z_))_=this.source.wrap(_);return this.inlineStack.push(_),_},pushStackLiteral:function(_){this.push(new Z_(_))},pushSource:function(_){if(this.pendingContent)this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0;if(_)this.source.push(_)},replaceStack:function(_){var $=["("],f=void 0,K=void 0,P=void 0;if(!this.isInline())throw new T$.default("replaceStack on non-inline");var j=this.popStack(!0);if(j instanceof Z_)f=[j.value],$=["(",f],P=!0;else{K=!0;var v=this.incrStack();$=["((",this.push(v)," = ",j,")"],f=this.topStack()}var w=_.call(this,f);if(!P)this.popStack();if(K)this.stackSlot--;this.push($.concat(w,")"))},incrStack:function(){if(this.stackSlot++,this.stackSlot>this.stackVars.length)this.stackVars.push("stack"+this.stackSlot);return this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var _=this.inlineStack;this.inlineStack=[];for(var $=0,f=_.length;$<f;$++){var K=_[$];if(K instanceof Z_)this.compileStack.push(K);else{var P=this.incrStack();this.pushSource([P," = ",K,";"]),this.compileStack.push(P)}}},isInline:function(){return this.inlineStack.length},popStack:function(_){var $=this.isInline(),f=($?this.inlineStack:this.compileStack).pop();if(!_&&f instanceof Z_)return f.value;else{if(!$){if(!this.stackSlot)throw new T$.default("Invalid stack pop");this.stackSlot--}return f}},topStack:function(){var _=this.isInline()?this.inlineStack:this.compileStack,$=_[_.length-1];if($ instanceof Z_)return $.value;else return $},contextName:function(_){if(this.useDepths&&_)return"depths["+_+"]";else return"depth"+_},quotedString:function(_){return this.source.quotedString(_)},objectLiteral:function(_){return this.source.objectLiteral(_)},aliasable:function(_){var $=this.aliases[_];if($)return $.referenceCount++,$;return $=this.aliases[_]=this.source.wrap(_),$.aliasable=!0,$.referenceCount=1,$},setupHelper:function(_,$,f){var K=[],P=this.setupHelperArgs($,_,K,f),j=this.nameLookup("helpers",$,"helper"),v=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:K,paramsInit:P,name:j,callParams:[v].concat(K)}},setupParams:function(_,$,f){var K={},P=[],j=[],v=[],w=!f,O=void 0;if(w)f=[];if(K.name=this.quotedString(_),K.hash=this.popStack(),this.trackIds)K.hashIds=this.popStack();if(this.stringParams)K.hashTypes=this.popStack(),K.hashContexts=this.popStack();var Y=this.popStack(),T=this.popStack();if(T||Y)K.fn=T||"container.noop",K.inverse=Y||"container.noop";var k=$;while(k--){if(O=this.popStack(),f[k]=O,this.trackIds)v[k]=this.popStack();if(this.stringParams)j[k]=this.popStack(),P[k]=this.popStack()}if(w)K.args=this.source.generateArray(f);if(this.trackIds)K.ids=this.source.generateArray(v);if(this.stringParams)K.types=this.source.generateArray(j),K.contexts=this.source.generateArray(P);if(this.options.data)K.data="data";if(this.useBlockParams)K.blockParams="blockParams";return K},setupHelperArgs:function(_,$,f,K){var P=this.setupParams(_,$,f);if(P.loc=JSON.stringify(this.source.currentLocation),P=this.objectLiteral(P),K)return this.useRegister("options"),f.push("options"),["options=",P];else if(f)return f.push(P),"";else return P}};(function(){var q="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),_=r_.RESERVED_WORDS={};for(var $=0,f=q.length;$<f;$++)_[q[$]]=!0})();r_.isValidJavaScriptVariableName=function(q){return!r_.RESERVED_WORDS[q]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(q)};function d7(q,_,$,f,K){var P=_.popStack(),j=$.length;if(q)j--;for(;f<j;f++)P=_.nameLookup(P,$[f],K);if(q)return[_.aliasable("container.strict"),"(",P,", ",_.quotedString($[f]),", ",JSON.stringify(_.source.currentLocation)," )"];else return P}d6.default=r_;e6.exports=d6.default});var V6=J((C6,M6)=>{C6.__esModule=!0;function N_(q){return q&&q.__esModule?q:{default:q}}var S7=M8(),C7=N_(S7),M7=Rq(),V7=N_(M7),Y$=B8(),k$=_6(),i7=b6(),N7=N_(i7),l7=U_(),t7=N_(l7),c7=lq(),a7=N_(c7),R7=C7.default.create;function S6(){var q=R7();return q.compile=function(_,$){return k$.compile(_,$,q)},q.precompile=function(_,$){return k$.precompile(_,$,q)},q.AST=V7.default,q.Compiler=k$.Compiler,q.JavaScriptCompiler=N7.default,q.Parser=Y$.parser,q.parse=Y$.parse,q.parseWithoutProcessing=Y$.parseWithoutProcessing,q}var u_=S6();u_.create=S6;a7.default(u_);u_.Visitor=t7.default;u_.default=u_;C6.default=u_;M6.exports=C6.default});var i6=J((x7)=>{x7.__esModule=!0;x7.print=L7;x7.PrintVisitor=n;function g7(q){return q&&q.__esModule?q:{default:q}}var y7=U_(),D7=g7(y7);function L7(q){return new n().accept(q)}function n(){this.padding=0}n.prototype=new D7.default;n.prototype.pad=function(q){var _="";for(var $=0,f=this.padding;$<f;$++)_+=" ";return _+=q+`
560
+ `,_};n.prototype.Program=function(q){var _="",$=q.body,f=void 0,K=void 0;if(q.blockParams){var P="BLOCK PARAMS: [";for(f=0,K=q.blockParams.length;f<K;f++)P+=" "+q.blockParams[f];P+=" ]",_+=this.pad(P)}for(f=0,K=$.length;f<K;f++)_+=this.accept($[f]);return this.padding--,_};n.prototype.MustacheStatement=function(q){return this.pad("{{ "+this.SubExpression(q)+" }}")};n.prototype.Decorator=function(q){return this.pad("{{ DIRECTIVE "+this.SubExpression(q)+" }}")};n.prototype.BlockStatement=n.prototype.DecoratorBlock=function(q){var _="";if(_+=this.pad((q.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,_+=this.pad(this.SubExpression(q)),q.program)_+=this.pad("PROGRAM:"),this.padding++,_+=this.accept(q.program),this.padding--;if(q.inverse){if(q.program)this.padding++;if(_+=this.pad("{{^}}"),this.padding++,_+=this.accept(q.inverse),this.padding--,q.program)this.padding--}return this.padding--,_};n.prototype.PartialStatement=function(q){var _="PARTIAL:"+q.name.original;if(q.params[0])_+=" "+this.accept(q.params[0]);if(q.hash)_+=" "+this.accept(q.hash);return this.pad("{{> "+_+" }}")};n.prototype.PartialBlockStatement=function(q){var _="PARTIAL BLOCK:"+q.name.original;if(q.params[0])_+=" "+this.accept(q.params[0]);if(q.hash)_+=" "+this.accept(q.hash);return _+=" "+this.pad("PROGRAM:"),this.padding++,_+=this.accept(q.program),this.padding--,this.pad("{{> "+_+" }}")};n.prototype.ContentStatement=function(q){return this.pad("CONTENT[ '"+q.value+"' ]")};n.prototype.CommentStatement=function(q){return this.pad("{{! '"+q.value+"' }}")};n.prototype.SubExpression=function(q){var _=q.params,$=[],f=void 0;for(var K=0,P=_.length;K<P;K++)$.push(this.accept(_[K]));return _="["+$.join(", ")+"]",f=q.hash?" "+this.accept(q.hash):"",this.accept(q.path)+" "+_+f};n.prototype.PathExpression=function(q){var _=q.parts.join("/");return(q.data?"@":"")+"PATH:"+_};n.prototype.StringLiteral=function(q){return'"'+q.value+'"'};n.prototype.NumberLiteral=function(q){return"NUMBER{"+q.value+"}"};n.prototype.BooleanLiteral=function(q){return"BOOLEAN{"+q.value+"}"};n.prototype.UndefinedLiteral=function(){return"UNDEFINED"};n.prototype.NullLiteral=function(){return"NULL"};n.prototype.Hash=function(q){var _=q.pairs,$=[];for(var f=0,K=_.length;f<K;f++)$.push(this.accept(_[f]));return"HASH{"+$.join(", ")+"}"};n.prototype.HashPair=function(q){return q.key+"="+this.accept(q.value)}});var h$=J((C9,t6)=>{var $q=V6().default,l6=i6();$q.PrintVisitor=l6.PrintVisitor;$q.print=l6.print;t6.exports=$q;function N6(q,_){var $=A_("fs"),f=$.readFileSync(_,"utf8");q.exports=$q.compile(f)}if(A_.extensions)A_.extensions[".handlebars"]=N6,A_.extensions[".hbs"]=N6});import{readFileSync as $v}from"fs";import{dirname as s6,join as B6,resolve as U6}from"path";import{join as W$}from"path";import{writeFileSync as L6,mkdirSync as qv}from"fs";import{readFileSync as Tf,readdirSync as vv,statSync as wv}from"fs";import{join as Yf,dirname as r$}from"path";import{fileURLToPath as kf}from"url";var c_=null;try{c_=(await Promise.resolve().then(() => (Yq(),Tq))).assets}catch{}var hf=r$(r$(kf(import.meta.url)));function j_(q){if(c_&&q in c_)return c_[q];let _=Yf(hf,q);try{return Tf(_,"utf-8")}catch{throw Error(`Asset not found: ${q}`)}}var X_=null;function zf(){if(X_)return X_;let q=j_("assets/chipctx-gen/device-mappings.json"),_=JSON.parse(q);X_=[];for(let $ of Object.values(_.families))for(let f of $)try{X_.push({...f,compiledPattern:new RegExp(f.pattern)})}catch(K){throw Error(`Invalid regex "${f.pattern}" in device-mappings.json: ${K.message}`)}return X_}function u$(q){let _=zf();for(let $ of _)if($.compiledPattern.test(q))return $;return null}class kq{layers;linkerGenerator;constructor(q,_){this.layers=q;this.linkerGenerator=_}async resolve(q,_){for(let $ of this.layers)try{if(await $.canResolve(q))try{let f=await $.resolve(q,_);if(!f.linkerScript&&this.linkerGenerator)f.linkerScript=await this.linkerGenerator.generate(q,_);return f}catch(f){console.warn(`[chipctx-gen] ${$.name} resolve failed: ${f.message}, trying next layer`);continue}}catch(f){console.warn(`[chipctx-gen] ${$.name} canResolve failed: ${f.message}, trying next layer`);continue}throw Error(`No startup source available for ${q.name}`)}}import{readFileSync as uq,existsSync as Aq,readdirSync as Xq,mkdirSync as PK}from"fs";import{copyFileSync as Hf,chmodSync as Wf,mkdirSync as Wv,readdirSync as Jv}from"fs";function N(q,_){Hf(q,_),Wf(_,420)}import{join as E,basename as O_,dirname as jK}from"path";var Jf=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Zf="[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]["+Jf+"]*",rf=new RegExp("^"+Zf+"$");function a_(q,_){let $=[],f=_.exec(q);while(f){let K=[];K.startIndex=_.lastIndex-f[0].length;let P=f.length;for(let j=0;j<P;j++)K.push(f[j]);$.push(K),f=_.exec(q)}return $}var v_=function(q){let _=rf.exec(q);return!(_===null||typeof _>"u")};function A$(q){return typeof q<"u"}var m_=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],R_=["__proto__","constructor","prototype"];var uf={allowBooleanAttributes:!1,unpairedTags:[]};function o$(q,_){_=Object.assign({},uf,_);let $=[],f=!1,K=!1;if(q[0]==="\uFEFF")q=q.substr(1);for(let P=0;P<q.length;P++)if(q[P]==="<"&&q[P+1]==="?"){if(P+=2,P=m$(q,P),P.err)return P}else if(q[P]==="<"){let j=P;if(P++,q[P]==="!"){P=n$(q,P);continue}else{let v=!1;if(q[P]==="/")v=!0,P++;let w="";for(;P<q.length&&q[P]!==">"&&q[P]!==" "&&q[P]!=="\t"&&q[P]!==`
561
+ `&&q[P]!=="\r";P++)w+=q[P];if(w=w.trim(),w[w.length-1]==="/")w=w.substring(0,w.length-1),P--;if(!df(w)){let T;if(w.trim().length===0)T="Invalid space after '<'.";else T="Tag '"+w+"' is an invalid name.";return p("InvalidTag",T,d(q,P))}let O=mf(q,P);if(O===!1)return p("InvalidAttr","Attributes for '"+w+"' have open quote.",d(q,P));let Y=O.value;if(P=O.index,Y[Y.length-1]==="/"){let T=P-Y.length;Y=Y.substring(0,Y.length-1);let k=p$(Y,_);if(k===!0)f=!0;else return p(k.err.code,k.err.msg,d(q,T+k.err.line))}else if(v)if(!O.tagClosed)return p("InvalidTag","Closing tag '"+w+"' doesn't have proper closing.",d(q,P));else if(Y.trim().length>0)return p("InvalidTag","Closing tag '"+w+"' can't have attributes or invalid starting.",d(q,j));else if($.length===0)return p("InvalidTag","Closing tag '"+w+"' has not been opened.",d(q,j));else{let T=$.pop();if(w!==T.tagName){let k=d(q,T.tagStartPos);return p("InvalidTag","Expected closing tag '"+T.tagName+"' (opened in line "+k.line+", col "+k.col+") instead of closing tag '"+w+"'.",d(q,j))}if($.length==0)K=!0}else{let T=p$(Y,_);if(T!==!0)return p(T.err.code,T.err.msg,d(q,P-Y.length+T.err.line));if(K===!0)return p("InvalidXml","Multiple possible root nodes found.",d(q,P));else if(_.unpairedTags.indexOf(w)!==-1);else $.push({tagName:w,tagStartPos:j});f=!0}for(P++;P<q.length;P++)if(q[P]==="<")if(q[P+1]==="!"){P++,P=n$(q,P);continue}else if(q[P+1]==="?"){if(P=m$(q,++P),P.err)return P}else break;else if(q[P]==="&"){let T=of(q,P);if(T==-1)return p("InvalidChar","char '&' is not expected.",d(q,P));P=T}else if(K===!0&&!X$(q[P]))return p("InvalidXml","Extra text at the end",d(q,P));if(q[P]==="<")P--}}else{if(X$(q[P]))continue;return p("InvalidChar","char '"+q[P]+"' is not expected.",d(q,P))}if(!f)return p("InvalidXml","Start tag expected.",1);else if($.length==1)return p("InvalidTag","Unclosed tag '"+$[0].tagName+"'.",d(q,$[0].tagStartPos));else if($.length>0)return p("InvalidXml","Invalid '"+JSON.stringify($.map((P)=>P.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0}function X$(q){return q===" "||q==="\t"||q===`
562
+ `||q==="\r"}function m$(q,_){let $=_;for(;_<q.length;_++)if(q[_]=="?"||q[_]==" "){let f=q.substr($,_-$);if(_>5&&f==="xml")return p("InvalidXml","XML declaration allowed only at the start of the document.",d(q,_));else if(q[_]=="?"&&q[_+1]==">"){_++;break}else continue}return _}function n$(q,_){if(q.length>_+5&&q[_+1]==="-"&&q[_+2]==="-"){for(_+=3;_<q.length;_++)if(q[_]==="-"&&q[_+1]==="-"&&q[_+2]===">"){_+=2;break}}else if(q.length>_+8&&q[_+1]==="D"&&q[_+2]==="O"&&q[_+3]==="C"&&q[_+4]==="T"&&q[_+5]==="Y"&&q[_+6]==="P"&&q[_+7]==="E"){let $=1;for(_+=8;_<q.length;_++)if(q[_]==="<")$++;else if(q[_]===">"){if($--,$===0)break}}else if(q.length>_+9&&q[_+1]==="["&&q[_+2]==="C"&&q[_+3]==="D"&&q[_+4]==="A"&&q[_+5]==="T"&&q[_+6]==="A"&&q[_+7]==="["){for(_+=8;_<q.length;_++)if(q[_]==="]"&&q[_+1]==="]"&&q[_+2]===">"){_+=2;break}}return _}var Af='"',Xf="'";function mf(q,_){let $="",f="",K=!1;for(;_<q.length;_++){if(q[_]===Af||q[_]===Xf)if(f==="")f=q[_];else if(f!==q[_]);else f="";else if(q[_]===">"){if(f===""){K=!0;break}}$+=q[_]}if(f!=="")return!1;return{value:$,index:_,tagClosed:K}}var nf=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function p$(q,_){let $=a_(q,nf),f={};for(let K=0;K<$.length;K++){if($[K][1].length===0)return p("InvalidAttr","Attribute '"+$[K][2]+"' has no space in starting.",n_($[K]));else if($[K][3]!==void 0&&$[K][4]===void 0)return p("InvalidAttr","Attribute '"+$[K][2]+"' is without value.",n_($[K]));else if($[K][3]===void 0&&!_.allowBooleanAttributes)return p("InvalidAttr","boolean attribute '"+$[K][2]+"' is not allowed.",n_($[K]));let P=$[K][2];if(!Gf(P))return p("InvalidAttr","Attribute '"+P+"' is an invalid name.",n_($[K]));if(!Object.prototype.hasOwnProperty.call(f,P))f[P]=1;else return p("InvalidAttr","Attribute '"+P+"' is repeated.",n_($[K]))}return!0}function pf(q,_){let $=/\d/;if(q[_]==="x")_++,$=/[\da-fA-F]/;for(;_<q.length;_++){if(q[_]===";")return _;if(!q[_].match($))break}return-1}function of(q,_){if(_++,q[_]===";")return-1;if(q[_]==="#")return _++,pf(q,_);let $=0;for(;_<q.length;_++,$++){if(q[_].match(/\w/)&&$<20)continue;if(q[_]===";")break;return-1}return _}function p(q,_,$){return{err:{code:q,msg:_,line:$.line||$,col:$.col}}}function Gf(q){return v_(q)}function df(q){return v_(q)}function d(q,_){let $=q.substring(0,_).split(/\r?\n/);return{line:$.length,col:$[$.length-1].length+1}}function n_(q){return q.startIndex+q[1].length}var G$=(q)=>{if(m_.includes(q))return"__"+q;return q},ef={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(q,_){return _},attributeValueProcessor:function(q,_){return _},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(q,_,$){return q},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:G$};function bf(q,_){if(typeof q!=="string")return;let $=q.toLowerCase();if(m_.some((f)=>$===f.toLowerCase()))throw Error(`[SECURITY] Invalid ${_}: "${q}" is a reserved JavaScript keyword that could cause prototype pollution`);if(R_.some((f)=>$===f.toLowerCase()))throw Error(`[SECURITY] Invalid ${_}: "${q}" is a reserved JavaScript keyword that could cause prototype pollution`)}function d$(q){if(typeof q==="boolean")return{enabled:q,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1000,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null};if(typeof q==="object"&&q!==null)return{enabled:q.enabled!==!1,maxEntitySize:q.maxEntitySize??1e4,maxExpansionDepth:q.maxExpansionDepth??10,maxTotalExpansions:q.maxTotalExpansions??1000,maxExpandedLength:q.maxExpandedLength??1e5,maxEntityCount:q.maxEntityCount??100,allowedTags:q.allowedTags??null,tagFilter:q.tagFilter??null};return d$(!0)}var e$=function(q){let _=Object.assign({},ef,q),$=[{value:_.attributeNamePrefix,name:"attributeNamePrefix"},{value:_.attributesGroupName,name:"attributesGroupName"},{value:_.textNodeName,name:"textNodeName"},{value:_.cdataPropName,name:"cdataPropName"},{value:_.commentPropName,name:"commentPropName"}];for(let{value:f,name:K}of $)if(f)bf(f,K);if(_.onDangerousProperty===null)_.onDangerousProperty=G$;if(_.processEntities=d$(_.processEntities),_.stopNodes&&Array.isArray(_.stopNodes))_.stopNodes=_.stopNodes.map((f)=>{if(typeof f==="string"&&f.startsWith("*."))return".."+f.substring(2);return f});return _};var E_;if(typeof Symbol!=="function")E_="@@xmlMetadata";else E_=Symbol("XML Node Metadata");class S{constructor(q){this.tagname=q,this.child=[],this[":@"]=Object.create(null)}add(q,_){if(q==="__proto__")q="#__proto__";this.child.push({[q]:_})}addChild(q,_){if(q.tagname==="__proto__")q.tagname="#__proto__";if(q[":@"]&&Object.keys(q[":@"]).length>0)this.child.push({[q.tagname]:q.child,[":@"]:q[":@"]});else this.child.push({[q.tagname]:q.child});if(_!==void 0)this.child[this.child.length-1][E_]={startIndex:_}}static getMetaDataSymbol(){return E_}}class I_{constructor(q){this.suppressValidationErr=!q,this.options=q}readDocType(q,_){let $=Object.create(null),f=0;if(q[_+3]==="O"&&q[_+4]==="C"&&q[_+5]==="T"&&q[_+6]==="Y"&&q[_+7]==="P"&&q[_+8]==="E"){_=_+9;let K=1,P=!1,j=!1,v="";for(;_<q.length;_++)if(q[_]==="<"&&!j){if(P&&F(q,"!ENTITY",_)){_+=7;let w,O;if([w,O,_]=this.readEntityExp(q,_+1,this.suppressValidationErr),O.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount&&f>=this.options.maxEntityCount)throw Error(`Entity count (${f+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);let Y=w.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");$[w]={regx:RegExp(`&${Y};`,"g"),val:O},f++}}else if(P&&F(q,"!ELEMENT",_)){_+=8;let{index:w}=this.readElementExp(q,_+1);_=w}else if(P&&F(q,"!ATTLIST",_))_+=8;else if(P&&F(q,"!NOTATION",_)){_+=9;let{index:w}=this.readNotationExp(q,_+1,this.suppressValidationErr);_=w}else if(F(q,"!--",_))j=!0;else throw Error("Invalid DOCTYPE");K++,v=""}else if(q[_]===">"){if(j){if(q[_-1]==="-"&&q[_-2]==="-")j=!1,K--}else K--;if(K===0)break}else if(q[_]==="[")P=!0;else v+=q[_];if(K!==0)throw Error("Unclosed DOCTYPE")}else throw Error("Invalid Tag instead of DOCTYPE");return{entities:$,i:_}}readEntityExp(q,_){_=b(q,_);let $="";while(_<q.length&&!/\s/.test(q[_])&&q[_]!=='"'&&q[_]!=="'")$+=q[_],_++;if(p_($),_=b(q,_),!this.suppressValidationErr){if(q.substring(_,_+6).toUpperCase()==="SYSTEM")throw Error("External entities are not supported");else if(q[_]==="%")throw Error("Parameter entities are not supported")}let f="";if([_,f]=this.readIdentifierVal(q,_,"entity"),this.options.enabled!==!1&&this.options.maxEntitySize&&f.length>this.options.maxEntitySize)throw Error(`Entity "${$}" size (${f.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return _--,[$,f,_]}readNotationExp(q,_){_=b(q,_);let $="";while(_<q.length&&!/\s/.test(q[_]))$+=q[_],_++;!this.suppressValidationErr&&p_($),_=b(q,_);let f=q.substring(_,_+6).toUpperCase();if(!this.suppressValidationErr&&f!=="SYSTEM"&&f!=="PUBLIC")throw Error(`Expected SYSTEM or PUBLIC, found "${f}"`);_+=f.length,_=b(q,_);let K=null,P=null;if(f==="PUBLIC"){if([_,K]=this.readIdentifierVal(q,_,"publicIdentifier"),_=b(q,_),q[_]==='"'||q[_]==="'")[_,P]=this.readIdentifierVal(q,_,"systemIdentifier")}else if(f==="SYSTEM"){if([_,P]=this.readIdentifierVal(q,_,"systemIdentifier"),!this.suppressValidationErr&&!P)throw Error("Missing mandatory system identifier for SYSTEM notation")}return{notationName:$,publicIdentifier:K,systemIdentifier:P,index:--_}}readIdentifierVal(q,_,$){let f="",K=q[_];if(K!=='"'&&K!=="'")throw Error(`Expected quoted string, found "${K}"`);_++;while(_<q.length&&q[_]!==K)f+=q[_],_++;if(q[_]!==K)throw Error(`Unterminated ${$} value`);return _++,[_,f]}readElementExp(q,_){_=b(q,_);let $="";while(_<q.length&&!/\s/.test(q[_]))$+=q[_],_++;if(!this.suppressValidationErr&&!v_($))throw Error(`Invalid element name: "${$}"`);_=b(q,_);let f="";if(q[_]==="E"&&F(q,"MPTY",_))_+=4;else if(q[_]==="A"&&F(q,"NY",_))_+=2;else if(q[_]==="("){_++;while(_<q.length&&q[_]!==")")f+=q[_],_++;if(q[_]!==")")throw Error("Unterminated content model")}else if(!this.suppressValidationErr)throw Error(`Invalid Element Expression, found "${q[_]}"`);return{elementName:$,contentModel:f.trim(),index:_}}readAttlistExp(q,_){_=b(q,_);let $="";while(_<q.length&&!/\s/.test(q[_]))$+=q[_],_++;p_($),_=b(q,_);let f="";while(_<q.length&&!/\s/.test(q[_]))f+=q[_],_++;if(!p_(f))throw Error(`Invalid attribute name: "${f}"`);_=b(q,_);let K="";if(q.substring(_,_+8).toUpperCase()==="NOTATION"){if(K="NOTATION",_+=8,_=b(q,_),q[_]!=="(")throw Error(`Expected '(', found "${q[_]}"`);_++;let j=[];while(_<q.length&&q[_]!==")"){let v="";while(_<q.length&&q[_]!=="|"&&q[_]!==")")v+=q[_],_++;if(v=v.trim(),!p_(v))throw Error(`Invalid notation name: "${v}"`);if(j.push(v),q[_]==="|")_++,_=b(q,_)}if(q[_]!==")")throw Error("Unterminated list of notations");_++,K+=" ("+j.join("|")+")"}else{while(_<q.length&&!/\s/.test(q[_]))K+=q[_],_++;let j=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!j.includes(K.toUpperCase()))throw Error(`Invalid attribute type: "${K}"`)}_=b(q,_);let P="";if(q.substring(_,_+8).toUpperCase()==="#REQUIRED")P="#REQUIRED",_+=8;else if(q.substring(_,_+7).toUpperCase()==="#IMPLIED")P="#IMPLIED",_+=7;else[_,P]=this.readIdentifierVal(q,_,"ATTLIST");return{elementName:$,attributeName:f,attributeType:K,defaultValue:P,index:_}}}var b=(q,_)=>{while(_<q.length&&/\s/.test(q[_]))_++;return _};function F(q,_,$){for(let f=0;f<_.length;f++)if(_[f]!==q[$+f+1])return!1;return!0}function p_(q){if(v_(q))return q;else throw Error(`Invalid entity name ${q}`)}var Sf=/^[-+]?0x[a-fA-F0-9]+$/,Cf=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Mf={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original"};function hq(q,_={}){if(_=Object.assign({},Mf,_),!q||typeof q!=="string")return q;let $=q.trim();if(_.skipLike!==void 0&&_.skipLike.test($))return q;else if(q==="0")return 0;else if(_.hex&&Sf.test($))return tf($,16);else if(!isFinite($))return cf(q,Number($),_);else if($.includes("e")||$.includes("E"))return Nf(q,$,_);else{let f=Cf.exec($);if(f){let K=f[1]||"",P=f[2],j=lf(f[3]),v=K?q[P.length+1]===".":q[P.length]===".";if(!_.leadingZeros&&(P.length>1||P.length===1&&!v))return q;else{let w=Number($),O=String(w);if(w===0)return w;if(O.search(/[eE]/)!==-1)if(_.eNotation)return w;else return q;else if($.indexOf(".")!==-1)if(O==="0")return w;else if(O===j)return w;else if(O===`${K}${j}`)return w;else return q;let Y=P?j:$;if(P)return Y===O||K+Y===O?w:q;else return Y===O||Y===K+O?w:q}}else return q}}var Vf=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Nf(q,_,$){if(!$.eNotation)return q;let f=_.match(Vf);if(f){let K=f[1]||"",P=f[3].indexOf("e")===-1?"E":"e",j=f[2],v=K?q[j.length+1]===P:q[j.length]===P;if(j.length>1&&v)return q;else if(j.length===1&&(f[3].startsWith(`.${P}`)||f[3][0]===P))return Number(_);else if($.leadingZeros&&!v)return _=(f[1]||"")+f[3],Number(_);else return q}else return q}function lf(q){if(q&&q.indexOf(".")!==-1){if(q=q.replace(/0+$/,""),q===".")q="0";else if(q[0]===".")q="0"+q;else if(q[q.length-1]===".")q=q.substring(0,q.length-1);return q}return q}function tf(q,_){if(parseInt)return parseInt(q,_);else if(Number.parseInt)return Number.parseInt(q,_);else if(window&&window.parseInt)return window.parseInt(q,_);else throw Error("parseInt, Number.parseInt, window.parseInt are not supported")}function cf(q,_,$){let f=_===1/0;switch($.infinity.toLowerCase()){case"null":return null;case"infinity":return _;case"string":return f?"Infinity":"-Infinity";case"original":default:return q}}function zq(q){if(typeof q==="function")return q;if(Array.isArray(q))return(_)=>{for(let $ of q){if(typeof $==="string"&&_===$)return!0;if($ instanceof RegExp&&$.test(_))return!0}};return()=>!1}class w_{constructor(q,_={}){this.pattern=q,this.separator=_.separator||".",this.segments=this._parse(q),this._hasDeepWildcard=this.segments.some(($)=>$.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some(($)=>$.attrName!==void 0),this._hasPositionSelector=this.segments.some(($)=>$.position!==void 0)}_parse(q){let _=[],$=0,f="";while($<q.length)if(q[$]===this.separator)if($+1<q.length&&q[$+1]===this.separator){if(f.trim())_.push(this._parseSegment(f.trim())),f="";_.push({type:"deep-wildcard"}),$+=2}else{if(f.trim())_.push(this._parseSegment(f.trim()));f="",$++}else f+=q[$],$++;if(f.trim())_.push(this._parseSegment(f.trim()));return _}_parseSegment(q){let _={type:"tag"},$=null,f=q,K=q.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(K){if(f=K[1]+K[3],K[2]){let O=K[2].slice(1,-1);if(O)$=O}}let P=void 0,j=f;if(f.includes("::")){let O=f.indexOf("::");if(P=f.substring(0,O).trim(),j=f.substring(O+2).trim(),!P)throw Error(`Invalid namespace in pattern: ${q}`)}let v=void 0,w=null;if(j.includes(":")){let O=j.lastIndexOf(":"),Y=j.substring(0,O).trim(),T=j.substring(O+1).trim();if(["first","last","odd","even"].includes(T)||/^nth\(\d+\)$/.test(T))v=Y,w=T;else v=j}else v=j;if(!v)throw Error(`Invalid segment pattern: ${q}`);if(_.tag=v,P)_.namespace=P;if($)if($.includes("=")){let O=$.indexOf("=");_.attrName=$.substring(0,O).trim(),_.attrValue=$.substring(O+1).trim()}else _.attrName=$.trim();if(w){let O=w.match(/^nth\((\d+)\)$/);if(O)_.position="nth",_.positionValue=parseInt(O[1],10);else _.position=w}return _}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class o_{constructor(q={}){this.separator=q.separator||".",this.path=[],this.siblingStacks=[]}push(q,_=null,$=null){if(this.path.length>0){let O=this.path[this.path.length-1];O.values=void 0}let f=this.path.length;if(!this.siblingStacks[f])this.siblingStacks[f]=new Map;let K=this.siblingStacks[f],P=$?`${$}:${q}`:q,j=K.get(P)||0,v=0;for(let O of K.values())v+=O;K.set(P,j+1);let w={tag:q,position:v,counter:j};if($!==null&&$!==void 0)w.namespace=$;if(_!==null&&_!==void 0)w.values=_;this.path.push(w)}pop(){if(this.path.length===0)return;let q=this.path.pop();if(this.siblingStacks.length>this.path.length+1)this.siblingStacks.length=this.path.length+1;return q}updateCurrent(q){if(this.path.length>0){let _=this.path[this.path.length-1];if(q!==null&&q!==void 0)_.values=q}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(q){if(this.path.length===0)return;return this.path[this.path.length-1].values?.[q]}hasAttr(q){if(this.path.length===0)return!1;let _=this.path[this.path.length-1];return _.values!==void 0&&q in _.values}getPosition(){if(this.path.length===0)return-1;return this.path[this.path.length-1].position??0}getCounter(){if(this.path.length===0)return-1;return this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(q,_=!0){let $=q||this.separator;return this.path.map((f)=>{if(_&&f.namespace)return`${f.namespace}:${f.tag}`;return f.tag}).join($)}toArray(){return this.path.map((q)=>q.tag)}reset(){this.path=[],this.siblingStacks=[]}matches(q){let _=q.segments;if(_.length===0)return!1;if(q.hasDeepWildcard())return this._matchWithDeepWildcard(_);return this._matchSimple(_)}_matchSimple(q){if(this.path.length!==q.length)return!1;for(let _=0;_<q.length;_++){let $=q[_],f=this.path[_],K=_===this.path.length-1;if(!this._matchSegment($,f,K))return!1}return!0}_matchWithDeepWildcard(q){let _=this.path.length-1,$=q.length-1;while($>=0&&_>=0){let f=q[$];if(f.type==="deep-wildcard"){if($--,$<0)return!0;let K=q[$],P=!1;for(let j=_;j>=0;j--){let v=j===this.path.length-1;if(this._matchSegment(K,this.path[j],v)){_=j-1,$--,P=!0;break}}if(!P)return!1}else{let K=_===this.path.length-1;if(!this._matchSegment(f,this.path[_],K))return!1;_--,$--}}return $<0}_matchSegment(q,_,$){if(q.tag!=="*"&&q.tag!==_.tag)return!1;if(q.namespace!==void 0){if(q.namespace!=="*"&&q.namespace!==_.namespace)return!1}if(q.attrName!==void 0){if(!$)return!1;if(!_.values||!(q.attrName in _.values))return!1;if(q.attrValue!==void 0){let f=_.values[q.attrName];if(String(f)!==String(q.attrValue))return!1}}if(q.position!==void 0){if(!$)return!1;let f=_.counter??0;if(q.position==="first"&&f!==0)return!1;else if(q.position==="odd"&&f%2!==1)return!1;else if(q.position==="even"&&f%2!==0)return!1;else if(q.position==="nth"){if(f!==q.positionValue)return!1}}return!0}snapshot(){return{path:this.path.map((q)=>({...q})),siblingStacks:this.siblingStacks.map((q)=>new Map(q))}}restore(q){this.path=q.path.map((_)=>({..._})),this.siblingStacks=q.siblingStacks.map((_)=>new Map(_))}}function af(q,_){if(!q)return{};let $=_.attributesGroupName?q[_.attributesGroupName]:q;if(!$)return{};let f={};for(let K in $)if(K.startsWith(_.attributeNamePrefix)){let P=K.substring(_.attributeNamePrefix.length);f[P]=$[K]}else f[K]=$[K];return f}function Rf(q){if(!q||typeof q!=="string")return;let _=q.indexOf(":");if(_!==-1&&_>0){let $=q.substring(0,_);if($!=="xmlns")return $}return}class g_{constructor(q){if(this.options=q,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(_,$)=>b$($,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(_,$)=>b$($,16,"&#x")}},this.addExternalEntities=Ef,this.parseXml=Lf,this.parseTextData=If,this.resolveNameSpace=gf,this.buildAttributesMap=Df,this.isItStopNode=Uf,this.replaceEntitiesValue=sf,this.readStopNodeData=Qf,this.saveTextToParentTag=Bf,this.addChild=xf,this.ignoreAttributesFn=zq(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0,this.matcher=new o_,this.isCurrentNodeStopNode=!1,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodeExpressions=[];for(let _=0;_<this.options.stopNodes.length;_++){let $=this.options.stopNodes[_];if(typeof $==="string")this.stopNodeExpressions.push(new w_($));else if($ instanceof w_)this.stopNodeExpressions.push($)}}}}function Ef(q){let _=Object.keys(q);for(let $=0;$<_.length;$++){let f=_[$],K=f.replace(/[.\-+*:]/g,"\\.");this.lastEntities[f]={regex:new RegExp("&"+K+";","g"),val:q[f]}}}function If(q,_,$,f,K,P,j){if(q!==void 0){if(this.options.trimValues&&!f)q=q.trim();if(q.length>0){if(!j)q=this.replaceEntitiesValue(q,_,$);let v=this.options.jPath?$.toString():$,w=this.options.tagValueProcessor(_,q,v,K,P);if(w===null||w===void 0)return q;else if(typeof w!==typeof q||w!==q)return w;else if(this.options.trimValues)return Jq(q,this.options.parseTagValue,this.options.numberParseOptions);else if(q.trim()===q)return Jq(q,this.options.parseTagValue,this.options.numberParseOptions);else return q}}}function gf(q){if(this.options.removeNSPrefix){let _=q.split(":"),$=q.charAt(0)==="/"?"/":"";if(_[0]==="xmlns")return"";if(_.length===2)q=$+_[1]}return q}var yf=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Df(q,_,$){if(this.options.ignoreAttributes!==!0&&typeof q==="string"){let f=a_(q,yf),K=f.length,P={},j={};for(let v=0;v<K;v++){let w=this.resolveNameSpace(f[v][1]),O=f[v][4];if(w.length&&O!==void 0){let Y=O;if(this.options.trimValues)Y=Y.trim();Y=this.replaceEntitiesValue(Y,$,_),j[w]=Y}}if(Object.keys(j).length>0&&typeof _==="object"&&_.updateCurrent)_.updateCurrent(j);for(let v=0;v<K;v++){let w=this.resolveNameSpace(f[v][1]),O=this.options.jPath?_.toString():_;if(this.ignoreAttributesFn(w,O))continue;let Y=f[v][4],T=this.options.attributeNamePrefix+w;if(w.length){if(this.options.transformAttributeName)T=this.options.transformAttributeName(T);if(T=S$(T,this.options),Y!==void 0){if(this.options.trimValues)Y=Y.trim();Y=this.replaceEntitiesValue(Y,$,_);let k=this.options.jPath?_.toString():_,h=this.options.attributeValueProcessor(w,Y,k);if(h===null||h===void 0)P[T]=Y;else if(typeof h!==typeof Y||h!==Y)P[T]=h;else P[T]=Jq(Y,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)P[T]=!0}}if(!Object.keys(P).length)return;if(this.options.attributesGroupName){let v={};return v[this.options.attributesGroupName]=P,v}return P}}var Lf=function(q){q=q.replace(/\r\n?/g,`
563
+ `);let _=new S("!xml"),$=_,f="";this.matcher.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let K=new I_(this.options.processEntities);for(let P=0;P<q.length;P++)if(q[P]==="<")if(q[P+1]==="/"){let v=Q(q,">",P,"Closing Tag is not closed."),w=q.substring(P+2,v).trim();if(this.options.removeNSPrefix){let Y=w.indexOf(":");if(Y!==-1)w=w.substr(Y+1)}if(w=Hq(this.options.transformTagName,w,"",this.options).tagName,$)f=this.saveTextToParentTag(f,$,this.matcher);let O=this.matcher.getCurrentTag();if(w&&this.options.unpairedTags.indexOf(w)!==-1)throw Error(`Unpaired tag can not be used as closing tag: </${w}>`);if(O&&this.options.unpairedTags.indexOf(O)!==-1)this.matcher.pop(),this.tagsNodeStack.pop();this.matcher.pop(),this.isCurrentNodeStopNode=!1,$=this.tagsNodeStack.pop(),f="",P=v}else if(q[P+1]==="?"){let v=Wq(q,P,!1,"?>");if(!v)throw Error("Pi Tag is not closed.");if(f=this.saveTextToParentTag(f,$,this.matcher),this.options.ignoreDeclaration&&v.tagName==="?xml"||this.options.ignorePiTags);else{let w=new S(v.tagName);if(w.add(this.options.textNodeName,""),v.tagName!==v.tagExp&&v.attrExpPresent)w[":@"]=this.buildAttributesMap(v.tagExp,this.matcher,v.tagName);this.addChild($,w,this.matcher,P)}P=v.closeIndex+1}else if(q.substr(P+1,3)==="!--"){let v=Q(q,"-->",P+4,"Comment is not closed.");if(this.options.commentPropName){let w=q.substring(P+4,v-2);f=this.saveTextToParentTag(f,$,this.matcher),$.add(this.options.commentPropName,[{[this.options.textNodeName]:w}])}P=v}else if(q.substr(P+1,2)==="!D"){let v=K.readDocType(q,P);this.docTypeEntities=v.entities,P=v.i}else if(q.substr(P+1,2)==="!["){let v=Q(q,"]]>",P,"CDATA is not closed.")-2,w=q.substring(P+9,v);f=this.saveTextToParentTag(f,$,this.matcher);let O=this.parseTextData(w,$.tagname,this.matcher,!0,!1,!0,!0);if(O==null)O="";if(this.options.cdataPropName)$.add(this.options.cdataPropName,[{[this.options.textNodeName]:w}]);else $.add(this.options.textNodeName,O);P=v+2}else{let v=Wq(q,P,this.options.removeNSPrefix);if(!v){let r=q.substring(Math.max(0,P-50),Math.min(q.length,P+50));throw Error(`readTagExp returned undefined at position ${P}. Context: "${r}"`)}let{tagName:w,rawTagName:O,tagExp:Y,attrExpPresent:T,closeIndex:k}=v;if({tagName:w,tagExp:Y}=Hq(this.options.transformTagName,w,Y,this.options),this.options.strictReservedNames&&(w===this.options.commentPropName||w===this.options.cdataPropName))throw Error(`Invalid tag name: ${w}`);if($&&f){if($.tagname!=="!xml")f=this.saveTextToParentTag(f,$,this.matcher,!1)}let h=$;if(h&&this.options.unpairedTags.indexOf(h.tagname)!==-1)$=this.tagsNodeStack.pop(),this.matcher.pop();let W=!1;if(Y.length>0&&Y.lastIndexOf("/")===Y.length-1){if(W=!0,w[w.length-1]==="/")w=w.substr(0,w.length-1),Y=w;else Y=Y.substr(0,Y.length-1);T=w!==Y}let H=null,u={},Z=void 0;if(Z=Rf(O),w!==_.tagname)this.matcher.push(w,{},Z);if(w!==Y&&T){if(H=this.buildAttributesMap(Y,this.matcher,w),H)u=af(H,this.options)}if(w!==_.tagname)this.isCurrentNodeStopNode=this.isItStopNode(this.stopNodeExpressions,this.matcher);let X=P;if(this.isCurrentNodeStopNode){let r="";if(W)P=v.closeIndex;else if(this.options.unpairedTags.indexOf(w)!==-1)P=v.closeIndex;else{let c=this.readStopNodeData(q,O,k+1);if(!c)throw Error(`Unexpected end of ${O}`);P=c.i,r=c.tagContent}let A=new S(w);if(H)A[":@"]=H;A.add(this.options.textNodeName,r),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild($,A,this.matcher,X)}else{if(W){({tagName:w,tagExp:Y}=Hq(this.options.transformTagName,w,Y,this.options));let r=new S(w);if(H)r[":@"]=H;this.addChild($,r,this.matcher,X),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(this.options.unpairedTags.indexOf(w)!==-1){let r=new S(w);if(H)r[":@"]=H;this.addChild($,r,this.matcher,X),this.matcher.pop(),this.isCurrentNodeStopNode=!1,P=v.closeIndex;continue}else{let r=new S(w);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw Error("Maximum nested tags exceeded");if(this.tagsNodeStack.push($),H)r[":@"]=H;this.addChild($,r,this.matcher,X),$=r}f="",P=k}}else f+=q[P];return _.child};function xf(q,_,$,f){if(!this.options.captureMetaData)f=void 0;let K=this.options.jPath?$.toString():$,P=this.options.updateTag(_.tagname,K,_[":@"]);if(P===!1);else if(typeof P==="string")_.tagname=P,q.addChild(_,f);else q.addChild(_,f)}function sf(q,_,$){let f=this.options.processEntities;if(!f||!f.enabled)return q;if(f.allowedTags){let K=this.options.jPath?$.toString():$;if(!(Array.isArray(f.allowedTags)?f.allowedTags.includes(_):f.allowedTags(_,K)))return q}if(f.tagFilter){let K=this.options.jPath?$.toString():$;if(!f.tagFilter(_,K))return q}for(let K of Object.keys(this.docTypeEntities)){let P=this.docTypeEntities[K],j=q.match(P.regx);if(j){if(this.entityExpansionCount+=j.length,f.maxTotalExpansions&&this.entityExpansionCount>f.maxTotalExpansions)throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${f.maxTotalExpansions}`);let v=q.length;if(q=q.replace(P.regx,P.val),f.maxExpandedLength){if(this.currentExpandedLength+=q.length-v,this.currentExpandedLength>f.maxExpandedLength)throw Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${f.maxExpandedLength}`)}}}for(let K of Object.keys(this.lastEntities)){let P=this.lastEntities[K],j=q.match(P.regex);if(j){if(this.entityExpansionCount+=j.length,f.maxTotalExpansions&&this.entityExpansionCount>f.maxTotalExpansions)throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${f.maxTotalExpansions}`)}q=q.replace(P.regex,P.val)}if(q.indexOf("&")===-1)return q;if(this.options.htmlEntities)for(let K of Object.keys(this.htmlEntities)){let P=this.htmlEntities[K],j=q.match(P.regex);if(j){if(this.entityExpansionCount+=j.length,f.maxTotalExpansions&&this.entityExpansionCount>f.maxTotalExpansions)throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${f.maxTotalExpansions}`)}q=q.replace(P.regex,P.val)}return q=q.replace(this.ampEntity.regex,this.ampEntity.val),q}function Bf(q,_,$,f){if(q){if(f===void 0)f=_.child.length===0;if(q=this.parseTextData(q,_.tagname,$,!1,_[":@"]?Object.keys(_[":@"]).length!==0:!1,f),q!==void 0&&q!=="")_.add(this.options.textNodeName,q);q=""}return q}function Uf(q,_){if(!q||q.length===0)return!1;for(let $=0;$<q.length;$++)if(_.matches(q[$]))return!0;return!1}function Ff(q,_,$=">"){let f,K="";for(let P=_;P<q.length;P++){let j=q[P];if(f){if(j===f)f=""}else if(j==='"'||j==="'")f=j;else if(j===$[0])if($[1]){if(q[P+1]===$[1])return{data:K,index:P}}else return{data:K,index:P};else if(j==="\t")j=" ";K+=j}}function Q(q,_,$,f){let K=q.indexOf(_,$);if(K===-1)throw Error(f);else return K+_.length-1}function Wq(q,_,$,f=">"){let K=Ff(q,_+1,f);if(!K)return;let{data:P,index:j}=K,v=P.search(/\s/),w=P,O=!0;if(v!==-1)w=P.substring(0,v),P=P.substring(v+1).trimStart();let Y=w;if($){let T=w.indexOf(":");if(T!==-1)w=w.substr(T+1),O=w!==K.data.substr(T+1)}return{tagName:w,tagExp:P,closeIndex:j,attrExpPresent:O,rawTagName:Y}}function Qf(q,_,$){let f=$,K=1;for(;$<q.length;$++)if(q[$]==="<")if(q[$+1]==="/"){let P=Q(q,">",$,`${_} is not closed`);if(q.substring($+2,P).trim()===_){if(K--,K===0)return{tagContent:q.substring(f,$),i:P}}$=P}else if(q[$+1]==="?")$=Q(q,"?>",$+1,"StopNode is not closed.");else if(q.substr($+1,3)==="!--")$=Q(q,"-->",$+3,"StopNode is not closed.");else if(q.substr($+1,2)==="![")$=Q(q,"]]>",$,"StopNode is not closed.")-2;else{let P=Wq(q,$,">");if(P){if((P&&P.tagName)===_&&P.tagExp[P.tagExp.length-1]!=="/")K++;$=P.closeIndex}}}function Jq(q,_,$){if(_&&typeof q==="string"){let f=q.trim();if(f==="true")return!0;else if(f==="false")return!1;else return hq(q,$)}else if(A$(q))return q;else return""}function b$(q,_,$){let f=Number.parseInt(q,_);if(f>=0&&f<=1114111)return String.fromCodePoint(f);else return $+q+";"}function Hq(q,_,$,f){if(q){let K=q(_);if($===_)$=K;_=K}return _=S$(_,f),{tagName:_,tagExp:$}}function S$(q,_){if(R_.includes(q))throw Error(`[SECURITY] Invalid name: "${q}" is a reserved JavaScript keyword that could cause prototype pollution`);else if(m_.includes(q))return _.onDangerousProperty(q);return q}var Zq=S.getMetaDataSymbol();function _K(q,_){if(!q||typeof q!=="object")return{};if(!_)return q;let $={};for(let f in q)if(f.startsWith(_)){let K=f.substring(_.length);$[K]=q[f]}else $[f]=q[f];return $}function rq(q,_,$){return C$(q,_,$)}function C$(q,_,$){let f,K={};for(let P=0;P<q.length;P++){let j=q[P],v=qK(j);if(v!==void 0&&v!==_.textNodeName){let w=_K(j[":@"]||{},_.attributeNamePrefix);$.push(v,w)}if(v===_.textNodeName)if(f===void 0)f=j[v];else f+=""+j[v];else if(v===void 0)continue;else if(j[v]){let w=C$(j[v],_,$),O=fK(w,_);if(j[":@"])$K(w,j[":@"],$,_);else if(Object.keys(w).length===1&&w[_.textNodeName]!==void 0&&!_.alwaysCreateTextNode)w=w[_.textNodeName];else if(Object.keys(w).length===0)if(_.alwaysCreateTextNode)w[_.textNodeName]="";else w="";if(j[Zq]!==void 0&&typeof w==="object"&&w!==null)w[Zq]=j[Zq];if(K[v]!==void 0&&Object.prototype.hasOwnProperty.call(K,v)){if(!Array.isArray(K[v]))K[v]=[K[v]];K[v].push(w)}else{let Y=_.jPath?$.toString():$;if(_.isArray(v,Y,O))K[v]=[w];else K[v]=w}if(v!==void 0&&v!==_.textNodeName)$.pop()}}if(typeof f==="string"){if(f.length>0)K[_.textNodeName]=f}else if(f!==void 0)K[_.textNodeName]=f;return K}function qK(q){let _=Object.keys(q);for(let $=0;$<_.length;$++){let f=_[$];if(f!==":@")return f}}function $K(q,_,$,f){if(_){let K=Object.keys(_),P=K.length;for(let j=0;j<P;j++){let v=K[j],w=v.startsWith(f.attributeNamePrefix)?v.substring(f.attributeNamePrefix.length):v,O=f.jPath?$.toString()+"."+w:$;if(f.isArray(v,O,!0,!0))q[v]=[_[v]];else q[v]=_[v]}}}function fK(q,_){let{textNodeName:$}=_,f=Object.keys(q).length;if(f===0)return!0;if(f===1&&(q[$]||typeof q[$]==="boolean"||q[$]===0))return!0;return!1}class a{constructor(q){this.externalEntities={},this.options=e$(q)}parse(q,_){if(typeof q!=="string"&&q.toString)q=q.toString();else if(typeof q!=="string")throw Error("XML data is accepted in String or Bytes[] form.");if(_){if(_===!0)_={};let K=o$(q,_);if(K!==!0)throw Error(`${K.err.msg}:${K.err.line}:${K.err.col}`)}let $=new g_(this.options);$.addExternalEntities(this.externalEntities);let f=$.parseXml(q);if(this.options.preserveOrder||f===void 0)return f;else return rq(f,this.options,$.matcher)}addEntity(q,_){if(_.indexOf("&")!==-1)throw Error("Entity value can't have '&'");else if(q.indexOf("&")!==-1||q.indexOf(";")!==-1)throw Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(_==="&")throw Error("An entity with value '&' is not permitted");else this.externalEntities[q]=_}static getMetaDataSymbol(){return S.getMetaDataSymbol()}}function M$(q){let f=new a({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse(q).package;if(!f)throw Error("Invalid PDSC: missing <package> root element");let K=KK(f.components?.component),P=K.some((v)=>v["@_generator"]==="CubeMX"),j=K.some((v)=>v["@_Cgroup"]?.includes("Startup")||v["@_Csub"]==="Startup");if(P&&!j)return"2.x";if(j)return"1.x";throw Error("Cannot classify DFP version: PDSC has neither Startup component nor CubeMX generator reference")}function KK(q){if(!q)return[];return Array.isArray(q)?q:[q]}class mq{packRoot;name="DfpPackLayer (L1)";constructor(q){this.packRoot=q}async canResolve(q){let _=this.findPdsc(q);if(!_)return!1;let $=uq(_,"utf-8");return M$($)==="1.x"}async resolve(q,_){let $=this.findPdsc(q);if(!$)throw Error(`No PDSC found for device family ${q.family}`);let f=jK($),K=uq($,"utf-8"),j=new a({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse(K),w=T_(j.package?.components?.component).find((H)=>H["@_Cgroup"]?.includes("Startup")||H["@_Csub"]==="Startup");if(!w)throw Error(`No Startup component found in PDSC for ${q.family}`);let O=T_(w.files?.file),Y=null,T=null,k=[];for(let H of O){let u=H["@_name"]??"",Z=H["@_category"]??"",X=E(f,u);if(!Aq(X))continue;if(Z==="source"&&u.includes("startup")){let r=E(_,O_(u));N(X,r),Y=r}else if(Z==="source"&&u.includes("system")){let r=E(_,O_(u));N(X,r),T=r}else if(Z==="header"){let r=E(_,"Include");PK(r,{recursive:!0});let A=E(r,O_(u));N(X,A),k.push(A)}}if(!Y)throw Error(`No startup file found in Pack for ${q.family}`);if(!T)throw Error(`No system file found in Pack for ${q.family}`);let h=null,W=this.findBestLinkerScript(f,K,q);if(W){let H=E(_,O_(W));N(W,H),h=H}return{startupFile:Y,systemFile:T,linkerScript:h,headers:k,source:"dfp-pack"}}findPdsc(q){if(!Aq(this.packRoot))return null;let _=Xq(this.packRoot);for(let $ of _){let f=E(this.packRoot,$);try{let P=Xq(f).find((j)=>j.endsWith(".pdsc"));if(P){let j=E(f,P),v=uq(j,"utf-8");if(v.includes(q.family)||v.includes(q.name))return j}}catch{}}return null}findBestLinkerScript(q,_,$){let f=vK(_,q);if(f)return f;return OK(q,$)}}function T_(q){if(!q)return[];return Array.isArray(q)?q:[q]}function vK(q,_){let f=new a({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse(q),K=T_(f.package?.conditions?.condition),P=new Set;for(let w of K){let O=w["@_id"]??"";if(T_(w.require).some((k)=>(k["@_Tcompiler"]??"").toUpperCase()==="GCC"))P.add(O)}let v=T_(f.package?.components?.component).filter((w)=>{let O=(w["@_Cclass"]??"").toLowerCase(),Y=(w["@_Cgroup"]??"").toLowerCase(),T=(w["@_Csub"]??"").toLowerCase();return O.includes("device")&&(Y.includes("startup")||T==="startup")});for(let w of v){let O=T_(w.files?.file);for(let Y of O){if((Y["@_category"]??"")!=="linkerScript")continue;let T=Y["@_condition"]??"";if(T&&!P.has(T))continue;let k=E(_,Y["@_name"]??"");if(Aq(k))return k}}return null}var wK=["example","examples","template","templates","test","tests","board","boards"];function OK(q,_){let $=TK(q);if($.length===0)return null;let f=$.filter((P)=>{let j=P.slice(q.length).toLowerCase();return!wK.some((v)=>j.includes(v))});if(f.length===0)return null;let K=f.map((P)=>{let j=P.slice(q.length+1);return{path:P,score:YK(j,_.name,_.family),depth:j.split(/[/\\]/).length,nameLen:O_(P).length}});if(K.sort((P,j)=>{if(j.score!==P.score)return j.score-P.score;if(P.depth!==j.depth)return P.depth-j.depth;return P.nameLen-j.nameLen}),K[0].score<0)return null;return K[0].path}function TK(q){let _=[],$=(f)=>{try{for(let K of Xq(f,{withFileTypes:!0})){let P=E(f,K.name);if(K.isDirectory())$(P);else if(K.name.endsWith(".ld")||K.name.endsWith(".lds"))_.push(P)}}catch{}};return $(q),_}function YK(q,_,$){let f=q.toLowerCase(),K=O_(q).toLowerCase(),P=0;if(f.includes("gcc"))P+=30;if(f.includes("armcc")||f.includes("iar")||f.includes("mdk"))P-=100;if(K.includes("flash")||K.includes("rom"))P+=50;if(K.includes("sram")||K.includes("ram"))P-=20;if(K.includes(_.toLowerCase()))P+=40;if(K.includes($.toLowerCase()))P+=20;if(q.split(/[/\\]/).map((v)=>v.toLowerCase()).some((v)=>v.includes("device")||v==="startup"||v==="gcc"))P+=10;return P}import{existsSync as Y_,readdirSync as kK,mkdirSync as hK}from"fs";import{join as C}from"path";class nq{coreRoot;name="ArduinoCoreLayer (L4)";constructor(q){this.coreRoot=q}async canResolve(q){if(!q.family.startsWith("STM32"))return!1;return this.getFamilyDir(q)!==null}async resolve(q,_){let $=this.getFamilyDir(q);if(!$)throw Error(`Arduino Core has no files for family ${q.family}`);let f=C($,"Source","Templates","gcc"),K=`startup_${q.subfamilyDefine.toLowerCase()}.s`,P=C(f,K);if(!Y_(P))throw Error(`Startup file not found: ${P}`);let j=C(_,K);N(P,j);let v=C($,"Source","Templates"),O=`system_${q.family.toLowerCase()}.c`,Y=C(v,O);if(!Y_(Y))throw Error(`System file not found: ${Y}`);let T=C(_,O);N(Y,T);let k=[],h=C($,"Include");if(Y_(h)){let W=C(_,"Include");hK(W,{recursive:!0});let H=`${q.subfamilyDefine.toLowerCase()}.h`,u=C(h,H);if(Y_(u)){let Z=C(W,H);N(u,Z),k.push(Z)}}return{startupFile:j,systemFile:T,linkerScript:null,headers:k,source:"arduino-core"}}getFamilyDir(q){let _=C(this.coreRoot,"system","Drivers","CMSIS","Device","ST");if(!Y_(_))return null;let $=C(_,q.family);if(Y_($))return $;try{let K=kK(_).find((P)=>P.toLowerCase()===q.family.toLowerCase());if(K)return C(_,K)}catch{}return null}}var c6=Z$(h$(),1);var fq=null;function F7(){if(fq)return fq;let q=j_("assets/chipctx-gen/templates/linker.ld.hbs");return fq=c6.default.compile(q,{noEscape:!0}),fq}function a6(q){return F7()({...q,stackSize:q.stackSize??"0x400",heapSize:q.heapSize??"0x200"})}var R6=Z$(h$(),1);var Kq=null;function Q7(){if(Kq)return Kq;let q=j_("assets/chipctx-gen/templates/cgen.yml.hbs");return Kq=R6.default.compile(q,{noEscape:!0}),Kq}function E6(q){return Q7()({...q,version:"1.0.0",board:q.board??""})}import{readFileSync as z$,existsSync as I6,readdirSync as g6,mkdirSync as y6}from"fs";import{join as U,basename as D6,dirname as _v}from"path";class H${packRoot;constructor(q){this.packRoot=q}detectDriverType(q){let _=this.findPdsc(q);if(!_)return"none";let $=z$(_,"utf-8"),K=new a({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse($),P=Pq(K.package?.components?.component);if(P.some((j)=>j["@_Cgroup"]==="HAL"||this.getFiles(j).some((v)=>v.includes("_hal_"))))return"hal";if(P.some((j)=>j["@_Cgroup"]==="Driver"||this.getFiles(j).some((v)=>v.includes("_ll_"))))return"ll";return"none"}async fetch(q,_,$){if($==="none")return{files:[],driverGroupName:null,includeDir:null};let f=$==="auto"?this.detectDriverType(q):$;if(f==="none")return{files:[],driverGroupName:null,includeDir:null};let K=this.findPdsc(q);if(!K)return{files:[],driverGroupName:null,includeDir:null};let P=_v(K),j=z$(K,"utf-8"),w=new a({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse(j),Y=Pq(w.package?.components?.component).filter((u)=>{if(f==="hal")return u["@_Cgroup"]==="HAL"||this.getFiles(u).some((Z)=>Z.includes("_hal_"));return u["@_Cgroup"]==="Driver"||this.getFiles(u).some((Z)=>Z.includes("_ll_"))}),T=[],k=U(_,"Driver"),h=U(k,"Src"),W=U(k,"Inc");y6(h,{recursive:!0}),y6(W,{recursive:!0});for(let u of Y){let Z=Pq(u.files?.file);for(let X of Z){let r=X["@_name"]??"",A=X["@_category"]??"",c=U(P,r);if(!I6(c))continue;if(A==="source"){let V=U(h,D6(r));N(c,V),T.push(V)}else if(A==="header"){let V=U(W,D6(r));N(c,V)}}}let H=f==="hal"?"HAL_Driver":"LL_Driver";return{files:T,driverGroupName:T.length>0?H:null,includeDir:T.length>0?W:null}}getFiles(q){return Pq(q.files?.file).map((_)=>_["@_name"]??"")}findPdsc(q){if(!I6(this.packRoot))return null;let _=g6(this.packRoot);for(let $ of _){let f=U(this.packRoot,$);try{let P=g6(f).find((j)=>j.endsWith(".pdsc"));if(P){let j=U(f,P),v=z$(j,"utf-8");if(v.includes(q.family)||v.includes(q.name))return j}}catch{}}return null}}function Pq(q){if(!q)return[];return Array.isArray(q)?q:[q]}async function x6(q){let{deviceName:_,outputDir:$,packRoot:f,arduinoCoreRoot:K,driverMode:P}=q,j=u$(_);if(!j)return{success:!1,cgenPath:null,generatedFiles:[],error:`Unknown device: "${_}". Not in device-mappings.json.`};let v={name:_,family:j.family,subfamilyDefine:j.subfamilyDefine,cpu:j.cpu,fpu:j.fpu,dfpVersion:j.dfpVersion};qv($,{recursive:!0});let w={generate:async(Z,X)=>{let r=a6({flashOrigin:j.memory.flash.origin,flashSize:j.memory.flash.size,ramOrigin:j.memory.ram.origin,ramSize:j.memory.ram.size,ccmOrigin:j.memory.ccm?.origin,ccmSize:j.memory.ccm?.size}),A=W$(X,`${_}.ld`);return L6(A,r),A}},O=new kq([new mq(f),new nq(K)],w),Y;try{Y=await O.resolve(v,$)}catch(Z){return{success:!1,cgenPath:null,generatedFiles:[],error:Z.message}}let T=[Y.startupFile,Y.systemFile];if(Y.linkerScript)T.push(Y.linkerScript);T.push(...Y.headers);let k,h;if(P!=="none"){let X=await new H$(f).fetch(v,$,P);if(X.files.length>0)k=X.files,h=X.driverGroupName??void 0,T.push(...X.files)}let W=E6({device:_,board:q.board,subfamilyDefine:j.subfamilyDefine,startupFile:`./${jq($,Y.startupFile)}`,systemFile:`./${jq($,Y.systemFile)}`,includePaths:Y.headers.length>0?[`./${jq($,W$($,"Include"))}`]:[],driverFiles:k?.map((Z)=>`./${jq($,Z)}`),driverGroupName:h}),H=q.projectName??_,u=W$($,`${H}.cgen.yml`);return L6(u,W),T.push(u),{success:!0,cgenPath:u,generatedFiles:T,error:null}}function jq(q,_){if(_.startsWith(q)){let $=_.slice(q.length);if($.startsWith("/"))$=$.slice(1);return $}return _}async function fv(){let q=process.argv.slice(2);if(q.length===0)console.error("Usage: chipctx-gen <cbuild-gen-idx.yml>"),console.error(" This is a CMSIS Generator. It is called by cbuild automatically."),process.exit(1);let _=U6(q[0]),$;try{$=$v(_,"utf-8")}catch(T){console.error(`[chipctx-gen] Cannot read: ${_}`),console.error(`[chipctx-gen] Error: ${T.message}`),process.exit(1)}let f=$.match(/device:\s*(\S+)/),K=$.match(/output:\s*(\S+)/);if(!f)console.error("[chipctx-gen] Cannot find 'device' field in cbuild-gen-idx.yml"),process.exit(1);let P=f[1],j=K?U6(s6(_),K[1]):s6(_),v=process.env.CMSIS_PACK_ROOT??B6(process.env.HOME??"",".cache","arm","packs"),w=process.env.ARDUINO_CORE_ROOT??B6(process.env.HOME??"",".chipctx","arduino","data","packages","STMicroelectronics","hardware","stm32"),O=process.env.CHIPCTX_DRIVER_MODE??"none";console.log(`[chipctx-gen] Device: ${P}`),console.log(`[chipctx-gen] Output: ${j}`);let Y=await x6({deviceName:P,outputDir:j,packRoot:v,arduinoCoreRoot:w,driverMode:O});if(Y.success)console.log(`[chipctx-gen] Generated ${Y.generatedFiles.length} files`),console.log(`[chipctx-gen] cgen.yml: ${Y.cgenPath}`),process.exit(0);else console.error(`[chipctx-gen] Failed: ${Y.error}`),process.exit(1)}fv().catch((q)=>{console.error(`[chipctx-gen] Unexpected error: ${q.message}`),process.exit(1)});