From 49903e2fc791f560bccbe12d6fa36d0566407e17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Moitti=C3=A9?= Date: Mon, 19 Aug 2024 15:06:00 +0200 Subject: [PATCH] Release version 0.12.1 --- changelog.md | 3 ++- dist/terrator-plugin.js | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/changelog.md b/changelog.md index 6727071..9b6e681 100644 --- a/changelog.md +++ b/changelog.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) -## [Unreleased] +## [0.12.1] - 2024/08/19 ### Changed @@ -278,6 +278,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add renderer for terraform files. - Import metadata instead of passing it through constructor in TerraformMetadata. +[0.12.1]: https://github.com/ditrit/terrator-plugin/blob/0.12.1/changelog.md [0.12.0]: https://github.com/ditrit/terrator-plugin/blob/0.12.0/changelog.md [0.11.0]: https://github.com/ditrit/terrator-plugin/blob/0.11.0/changelog.md [0.10.0]: https://github.com/ditrit/terrator-plugin/blob/0.10.0/changelog.md diff --git a/dist/terrator-plugin.js b/dist/terrator-plugin.js index 267d650..8116654 100644 --- a/dist/terrator-plugin.js +++ b/dist/terrator-plugin.js @@ -1,2 +1,2 @@ /*! For license information please see terrator-plugin.js.LICENSE.txt */ -(()=>{var t={149:(t,e)=>{(()=>{var t={326:function(t){var e;"undefined"!=typeof self&&self,e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=11)}([function(t,e,n){"use strict";var r=Array.prototype,i=Object.prototype,o={"&":"&",'"':""","'":"'","<":"<",">":">","\\":"\"},s=/[&"'<>\\]/g;function a(t,e){return i.hasOwnProperty.call(t,e)}function c(t){return o[t]}function u(t,e,n){var r,i,o;if(t instanceof Error&&(t=(i=t).name+": "+i.message),Object.setPrototypeOf?(r=new Error(t),Object.setPrototypeOf(r,u.prototype)):(r=this,Object.defineProperty(r,"message",{enumerable:!1,writable:!0,value:t})),Object.defineProperty(r,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(r,this.constructor),i){var s=Object.getOwnPropertyDescriptor(i,"stack");(o=s&&(s.get||function(){return s.value}))||(o=function(){return i.stack})}else{var a=new Error(t).stack;o=function(){return a}}return Object.defineProperty(r,"stack",{get:function(){return o.call(r)}}),Object.defineProperty(r,"cause",{value:i}),r.lineno=e,r.colno=n,r.firstUpdate=!0,r.Update=function(t){var e="("+(t||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?e+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(e+=" [Line "+this.lineno+"]")),e+="\n ",this.firstUpdate&&(e+=" "),this.message=e+(this.message||""),this.firstUpdate=!1,this},r}function l(t){return"[object Function]"===i.toString.call(t)}function h(t){return"[object Array]"===i.toString.call(t)}function f(t){return"[object String]"===i.toString.call(t)}function p(t){return"[object Object]"===i.toString.call(t)}function d(t){var e,n=(e=t)?"string"==typeof e?e.split("."):[e]:[];return function(t){for(var e=t,r=0;rt.length)s=i.slice(0,t.length),i.slice(s.length,u).forEach((function(t,n){n2?i-2:0),s=2;s0||!n)&&process.stdout.write(" ".repeat(e));var o=i===r.length-1?"":"\n";process.stdout.write(""+t+o)}))}t.exports={Node:c,Root:h,NodeList:l,Value:u,Literal:f,Symbol:p,Group:d,Array:m,Pair:y,Dict:g,Output:U,Capture:z,TemplateData:V,If:b,IfAsync:_,InlineIf:w,For:x,AsyncEach:k,AsyncAll:T,Macro:S,Caller:E,Import:A,FromImport:O,FunCall:N,Filter:C,FilterAsync:L,KeywordArgs:R,Block:P,Super:I,Extends:M,Include:D,Set:j,Switch:B,Case:F,LookupVal:v,BinOp:H,In:q,Is:W,Or:G,And:Y,Not:$,Add:X,Concat:Z,Sub:J,Mul:Q,Div:tt,FloorDiv:et,Mod:nt,Pow:rt,Neg:it,Pos:ot,Compare:st,CompareOperand:at,CallExtension:ct,CallExtensionAsync:ut,printNodes:function t(e,n){if(n=n||0,lt(e.typename+": ",n),e instanceof l)lt("\n"),e.children.forEach((function(e){t(e,n+2)}));else if(e instanceof ct)lt(e.extName+"."+e.prop+"\n"),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach((function(e){t(e,n+2)}));else{var r=[],i=null;e.iterFields((function(t,e){t instanceof c?r.push([e,t]):(i=i||{})[e]=t})),i?lt(JSON.stringify(i,null,2)+"\n",null,!0):lt("\n"),r.forEach((function(e){var r=e[0],i=e[1];lt("["+r+"] =>",n+2),t(i,n+4)}))}}}},function(t,e){},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var i=n(8),o=n(17),s=n(3),a=n(0).TemplateError,c=n(2).Frame,u=n(1).Obj,l={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},h=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n);var o=i.prototype;return o.init=function(t,e){this.templateName=t,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this._scopeClosers="",this.inBlock=!1,this.throwOnUndefined=e},o.fail=function(t,e,n){throw void 0!==e&&(e+=1),void 0!==n&&(n+=1),new a(t,e,n)},o._pushBuffer=function(){var t=this._tmpid();return this.bufferStack.push(this.buffer),this.buffer=t,this._emit("var "+this.buffer+' = "";'),t},o._popBuffer=function(){this.buffer=this.bufferStack.pop()},o._emit=function(t){this.codebuf.push(t)},o._emitLine=function(t){this._emit(t+"\n")},o._emitLines=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r0&&i._emit(","),i.compile(t,e)})),r&&this._emit(r)},o._compileExpression=function(t,e){this.assertType(t,s.Literal,s.Symbol,s.Group,s.Array,s.Dict,s.FunCall,s.Caller,s.Filter,s.LookupVal,s.Compare,s.InlineIf,s.In,s.Is,s.And,s.Or,s.Not,s.Add,s.Concat,s.Sub,s.Mul,s.Div,s.FloorDiv,s.Mod,s.Pow,s.Neg,s.Pos,s.Compare,s.NodeList),this.compile(t,e)},o.assertType=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r0&&r._emit(","),t){r._emitLine("function(cb) {"),r._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");var i=r._pushBuffer();r._withScopedSyntax((function(){r.compile(t,e),r._emitLine("cb(null, "+i+");")})),r._popBuffer(),r._emitLine("return "+i+";"),r._emitLine("}")}else r._emit("null")})),n){var c=this._tmpid();this._emitLine(", "+this._makeCallback(c)),this._emitLine(this.buffer+" += runtime.suppressValue("+c+", "+a+" && env.opts.autoescape);"),this._addScopeLevel()}else this._emit(")"),this._emit(", "+a+" && env.opts.autoescape);\n")},o.compileCallExtensionAsync=function(t,e){this.compileCallExtension(t,e,!0)},o.compileNodeList=function(t,e){this._compileChildren(t,e)},o.compileLiteral=function(t){if("string"==typeof t.value){var e=t.value.replace(/\\/g,"\\\\");e=(e=(e=(e=(e=e.replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+e+'"')}else null===t.value?this._emit("null"):this._emit(t.value.toString())},o.compileSymbol=function(t,e){var n=t.value,r=e.lookup(n);r?this._emit(r):this._emit('runtime.contextOrFrameLookup(context, frame, "'+n+'")')},o.compileGroup=function(t,e){this._compileAggregate(t,e,"(",")")},o.compileArray=function(t,e){this._compileAggregate(t,e,"[","]")},o.compileDict=function(t,e){this._compileAggregate(t,e,"{","}")},o.compilePair=function(t,e){var n=t.key,r=t.value;n instanceof s.Symbol?n=new s.Literal(n.lineno,n.colno,n.value):n instanceof s.Literal&&"string"==typeof n.value||this.fail("compilePair: Dict keys must be strings or names",n.lineno,n.colno),this.compile(n,e),this._emit(": "),this._compileExpression(r,e)},o.compileInlineIf=function(t,e){this._emit("("),this.compile(t.cond,e),this._emit("?"),this.compile(t.body,e),this._emit(":"),null!==t.else_?this.compile(t.else_,e):this._emit('""'),this._emit(")")},o.compileIn=function(t,e){this._emit("runtime.inOperator("),this.compile(t.left,e),this._emit(","),this.compile(t.right,e),this._emit(")")},o.compileIs=function(t,e){var n=t.right.name?t.right.name.value:t.right.value;this._emit('env.getTest("'+n+'").call(context, '),this.compile(t.left,e),t.right.args&&(this._emit(","),this.compile(t.right.args,e)),this._emit(") === true")},o._binOpEmitter=function(t,e,n){this.compile(t.left,e),this._emit(n),this.compile(t.right,e)},o.compileOr=function(t,e){return this._binOpEmitter(t,e," || ")},o.compileAnd=function(t,e){return this._binOpEmitter(t,e," && ")},o.compileAdd=function(t,e){return this._binOpEmitter(t,e," + ")},o.compileConcat=function(t,e){return this._binOpEmitter(t,e,' + "" + ')},o.compileSub=function(t,e){return this._binOpEmitter(t,e," - ")},o.compileMul=function(t,e){return this._binOpEmitter(t,e," * ")},o.compileDiv=function(t,e){return this._binOpEmitter(t,e," / ")},o.compileMod=function(t,e){return this._binOpEmitter(t,e," % ")},o.compileNot=function(t,e){this._emit("!"),this.compile(t.target,e)},o.compileFloorDiv=function(t,e){this._emit("Math.floor("),this.compile(t.left,e),this._emit(" / "),this.compile(t.right,e),this._emit(")")},o.compilePow=function(t,e){this._emit("Math.pow("),this.compile(t.left,e),this._emit(", "),this.compile(t.right,e),this._emit(")")},o.compileNeg=function(t,e){this._emit("-"),this.compile(t.target,e)},o.compilePos=function(t,e){this._emit("+"),this.compile(t.target,e)},o.compileCompare=function(t,e){var n=this;this.compile(t.expr,e),t.ops.forEach((function(t){n._emit(" "+l[t.type]+" "),n.compile(t.expr,e)}))},o.compileLookupVal=function(t,e){this._emit("runtime.memberLookup(("),this._compileExpression(t.target,e),this._emit("),"),this._compileExpression(t.val,e),this._emit(")")},o._getNodeName=function(t){switch(t.typename){case"Symbol":return t.value;case"FunCall":return"the return value of ("+this._getNodeName(t.name)+")";case"LookupVal":return this._getNodeName(t.target)+'["'+this._getNodeName(t.val)+'"]';case"Literal":return t.value.toString();default:return"--expression--"}},o.compileFunCall=function(t,e){this._emit("(lineno = "+t.lineno+", colno = "+t.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(t.name,e),this._emit(', "'+this._getNodeName(t.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(t.args,e,"[","])"),this._emit(")")},o.compileFilter=function(t,e){var n=t.name;this.assertType(n,s.Symbol),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(t.args,e),this._emit(")")},o.compileFilterAsync=function(t,e){var n=t.name,r=t.symbol.value;this.assertType(n,s.Symbol),e.set(r,r),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(t.args,e),this._emitLine(", "+this._makeCallback(r)),this._addScopeLevel()},o.compileKeywordArgs=function(t,e){this._emit("runtime.makeKeywordArgs("),this.compileDict(t,e),this._emit(")")},o.compileSet=function(t,e){var n=this,r=[];t.targets.forEach((function(t){var i=t.value,o=e.lookup(i);null==o&&(o=n._tmpid(),n._emitLine("var "+o+";")),r.push(o)})),t.value?(this._emit(r.join(" = ")+" = "),this._compileExpression(t.value,e),this._emitLine(";")):(this._emit(r.join(" = ")+" = "),this.compile(t.body,e),this._emitLine(";")),t.targets.forEach((function(t,e){var i=r[e],o=t.value;n._emitLine('frame.set("'+o+'", '+i+", true);"),n._emitLine("if(frame.topLevel) {"),n._emitLine('context.setVariable("'+o+'", '+i+");"),n._emitLine("}"),"_"!==o.charAt(0)&&(n._emitLine("if(frame.topLevel) {"),n._emitLine('context.addExport("'+o+'", '+i+");"),n._emitLine("}"))}))},o.compileSwitch=function(t,e){var n=this;this._emit("switch ("),this.compile(t.expr,e),this._emit(") {"),t.cases.forEach((function(t,r){n._emit("case "),n.compile(t.cond,e),n._emit(": "),n.compile(t.body,e),t.body.children.length&&n._emitLine("break;")})),t.default&&(this._emit("default:"),this.compile(t.default,e)),this._emit("}")},o.compileIf=function(t,e,n){var r=this;this._emit("if("),this._compileExpression(t.cond,e),this._emitLine(") {"),this._withScopedSyntax((function(){r.compile(t.body,e),n&&r._emit("cb()")})),t.else_?(this._emitLine("}\nelse {"),this._withScopedSyntax((function(){r.compile(t.else_,e),n&&r._emit("cb()")}))):n&&(this._emitLine("}\nelse {"),this._emit("cb()")),this._emitLine("}")},o.compileIfAsync=function(t,e){this._emit("(function(cb) {"),this.compileIf(t,e,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},o._emitLoopBindings=function(t,e,n,r){var i=this;[{name:"index",val:n+" + 1"},{name:"index0",val:n},{name:"revindex",val:r+" - "+n},{name:"revindex0",val:r+" - "+n+" - 1"},{name:"first",val:n+" === 0"},{name:"last",val:n+" === "+r+" - 1"},{name:"length",val:r}].forEach((function(t){i._emitLine('frame.set("loop.'+t.name+'", '+t.val+");")}))},o.compileFor=function(t,e){var n=this,r=this._tmpid(),i=this._tmpid(),o=this._tmpid();if(e=e.push(),this._emitLine("frame = frame.push();"),this._emit("var "+o+" = "),this._compileExpression(t.arr,e),this._emitLine(";"),this._emit("if("+o+") {"),this._emitLine(o+" = runtime.fromIterator("+o+");"),t.name instanceof s.Array){this._emitLine("var "+r+";"),this._emitLine("if(runtime.isArray("+o+")) {"),this._emitLine("var "+i+" = "+o+".length;"),this._emitLine("for("+r+"=0; "+r+" < "+o+".length; "+r+"++) {"),t.name.children.forEach((function(i,s){var a=n._tmpid();n._emitLine("var "+a+" = "+o+"["+r+"]["+s+"];"),n._emitLine('frame.set("'+i+'", '+o+"["+r+"]["+s+"]);"),e.set(t.name.children[s].value,a)})),this._emitLoopBindings(t,o,r,i),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("}"),this._emitLine("} else {");var a=t.name.children,c=a[0],u=a[1],l=this._tmpid(),h=this._tmpid();e.set(c.value,l),e.set(u.value,h),this._emitLine(r+" = -1;"),this._emitLine("var "+i+" = runtime.keys("+o+").length;"),this._emitLine("for(var "+l+" in "+o+") {"),this._emitLine(r+"++;"),this._emitLine("var "+h+" = "+o+"["+l+"];"),this._emitLine('frame.set("'+c.value+'", '+l+");"),this._emitLine('frame.set("'+u.value+'", '+h+");"),this._emitLoopBindings(t,o,r,i),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("}"),this._emitLine("}")}else{var f=this._tmpid();e.set(t.name.value,f),this._emitLine("var "+i+" = "+o+".length;"),this._emitLine("for(var "+r+"=0; "+r+" < "+o+".length; "+r+"++) {"),this._emitLine("var "+f+" = "+o+"["+r+"];"),this._emitLine('frame.set("'+t.name.value+'", '+f+");"),this._emitLoopBindings(t,o,r,i),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("}")}this._emitLine("}"),t.else_&&(this._emitLine("if (!"+i+") {"),this.compile(t.else_,e),this._emitLine("}")),this._emitLine("frame = frame.pop();")},o._compileAsyncLoop=function(t,e,n){var r=this,i=this._tmpid(),o=this._tmpid(),a=this._tmpid(),c=n?"asyncAll":"asyncEach";if(e=e.push(),this._emitLine("frame = frame.push();"),this._emit("var "+a+" = runtime.fromIterator("),this._compileExpression(t.arr,e),this._emitLine(");"),t.name instanceof s.Array){var u=t.name.children.length;this._emit("runtime."+c+"("+a+", "+u+", function("),t.name.children.forEach((function(t){r._emit(t.value+",")})),this._emit(i+","+o+",next) {"),t.name.children.forEach((function(t){var n=t.value;e.set(n,n),r._emitLine('frame.set("'+n+'", '+n+");")}))}else{var l=t.name.value;this._emitLine("runtime."+c+"("+a+", 1, function("+l+", "+i+", "+o+",next) {"),this._emitLine('frame.set("'+l+'", '+l+");"),e.set(l,l)}this._emitLoopBindings(t,a,i,o),this._withScopedSyntax((function(){var o;n&&(o=r._pushBuffer()),r.compile(t.body,e),r._emitLine("next("+i+(o?","+o:"")+");"),n&&r._popBuffer()}));var h=this._tmpid();this._emitLine("}, "+this._makeCallback(h)),this._addScopeLevel(),n&&this._emitLine(this.buffer+" += "+h+";"),t.else_&&(this._emitLine("if (!"+a+".length) {"),this.compile(t.else_,e),this._emitLine("}")),this._emitLine("frame = frame.pop();")},o.compileAsyncEach=function(t,e){this._compileAsyncLoop(t,e)},o.compileAsyncAll=function(t,e){this._compileAsyncLoop(t,e,!0)},o._compileMacro=function(t,e){var n=this,r=[],i=null,o="macro_"+this._tmpid(),a=void 0!==e;t.args.children.forEach((function(e,o){o===t.args.children.length-1&&e instanceof s.Dict?i=e:(n.assertType(e,s.Symbol),r.push(e))}));var u,l=[].concat(r.map((function(t){return"l_"+t.value})),["kwargs"]),h=r.map((function(t){return'"'+t.value+'"'})),f=(i&&i.children||[]).map((function(t){return'"'+t.key.value+'"'}));u=a?e.push(!0):new c,this._emitLines("var "+o+" = runtime.makeMacro(","["+h.join(", ")+"], ","["+f.join(", ")+"], ","function ("+l.join(", ")+") {","var callerFrame = frame;","frame = "+(a?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),r.forEach((function(t){n._emitLine('frame.set("'+t.value+'", l_'+t.value+");"),u.set(t.value,"l_"+t.value)})),i&&i.children.forEach((function(t){var e=t.key.value;n._emit('frame.set("'+e+'", '),n._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+e+'")'),n._emit(' ? kwargs["'+e+'"] : '),n._compileExpression(t.value,u),n._emit(");")}));var p=this._pushBuffer();return this._withScopedSyntax((function(){n.compile(t.body,u)})),this._emitLine("frame = "+(a?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+p+");"),this._emitLine("});"),this._popBuffer(),o},o.compileMacro=function(t,e){var n=this._compileMacro(t),r=t.name.value;e.set(r,n),e.parent?this._emitLine('frame.set("'+r+'", '+n+");"):("_"!==t.name.value.charAt(0)&&this._emitLine('context.addExport("'+r+'");'),this._emitLine('context.setVariable("'+r+'", '+n+");"))},o.compileCaller=function(t,e){this._emit("(function (){");var n=this._compileMacro(t,e);this._emit("return "+n+";})()")},o._compileGetTemplate=function(t,e,n,r){var i=this._tmpid(),o=this._templateName(),s=this._makeCallback(i),a=n?"true":"false",c=r?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(t.template,e),this._emitLine(", "+a+", "+o+", "+c+", "+s),i},o.compileImport=function(t,e){var n=t.target.value,r=this._compileGetTemplate(t,e,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(t.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),e.set(n,r),e.parent?this._emitLine('frame.set("'+n+'", '+r+");"):this._emitLine('context.setVariable("'+n+'", '+r+");")},o.compileFromImport=function(t,e){var n=this,r=this._compileGetTemplate(t,e,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(t.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),t.names.children.forEach((function(t){var i,o,a=n._tmpid();t instanceof s.Pair?(i=t.key.value,o=t.value.value):o=i=t.value,n._emitLine("if(Object.prototype.hasOwnProperty.call("+r+', "'+i+'")) {'),n._emitLine("var "+a+" = "+r+"."+i+";"),n._emitLine("} else {"),n._emitLine("cb(new Error(\"cannot import '"+i+"'\")); return;"),n._emitLine("}"),e.set(o,a),e.parent?n._emitLine('frame.set("'+o+'", '+a+");"):n._emitLine('context.setVariable("'+o+'", '+a+");")}))},o.compileBlock=function(t){var e=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+t.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(e)),this._emitLine(this.buffer+" += "+e+";"),this._addScopeLevel()},o.compileSuper=function(t,e){var n=t.blockName.value,r=t.symbol.value,i=this._makeCallback(r);this._emitLine('context.getSuper(env, "'+n+'", b_'+n+", frame, runtime, "+i),this._emitLine(r+" = runtime.markSafe("+r+");"),this._addScopeLevel(),e.set(r,r)},o.compileExtends=function(t,e){var n=this._tmpid(),r=this._compileGetTemplate(t,e,!0,!1);this._emitLine("parentTemplate = "+r),this._emitLine("for(var "+n+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+n+", parentTemplate.blocks["+n+"]);"),this._emitLine("}"),this._addScopeLevel()},o.compileInclude=function(t,e){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {");var n=this._compileGetTemplate(t,e,!1,t.ignoreMissing);this._emitLine("callback(null,"+n+");});"),this._emitLine("});");var r=this._tmpid();this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(r)),this._emitLine("callback(null,"+r+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel()},o.compileTemplateData=function(t,e){this.compileLiteral(t,e)},o.compileCapture=function(t,e){var n=this,r=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=r},o.compileOutput=function(t,e){var n=this;t.children.forEach((function(r){r instanceof s.TemplateData?r.value&&(n._emit(n.buffer+" += "),n.compileLiteral(r,e),n._emitLine(";")):(n._emit(n.buffer+" += runtime.suppressValue("),n.throwOnUndefined&&n._emit("runtime.ensureDefined("),n.compile(r,e),n.throwOnUndefined&&n._emit(","+t.lineno+","+t.colno+")"),n._emit(", env.opts.autoescape);\n"))}))},o.compileRoot=function(t,e){var n=this;e&&this.fail("compileRoot: root node can't have frame"),e=new c,this._emitFuncBegin(t,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(t,e),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0;var r=[],i=t.findAll(s.Block);i.forEach((function(t,e){var i=t.name.value;if(-1!==r.indexOf(i))throw new Error('Block "'+i+'" defined more than once.');r.push(i),n._emitFuncBegin(t,"b_"+i);var o=new c;n._emitLine("var frame = frame.push(true);"),n.compile(t.body,o),n._emitFuncEnd()})),this._emitLine("return {"),i.forEach((function(t,e){var r="b_"+t.name.value;n._emitLine(r+": "+r+",")})),this._emitLine("root: root\n};")},o.compile=function(t,e){var n=this["compile"+t.typename];n?n.call(this,t,e):this.fail("compile: Cannot compile node: "+t.typename,t.lineno,t.colno)},o.getCode=function(){return this.codebuf.join("")},i}(u);t.exports={compile:function(t,e,n,r,s){void 0===s&&(s={});var a=new h(r,s.throwOnUndefined),c=(n||[]).map((function(t){return t.preprocess})).filter((function(t){return!!t})).reduce((function(t,e){return e(t)}),t);return a.compile(o.transform(i.parse(c,n,s),e,r)),a.getCode()},Compiler:h}},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var i=n(4),o=n(1).EmitterObj;t.exports=function(t){var e,n;function o(){return t.apply(this,arguments)||this}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n);var s=o.prototype;return s.resolve=function(t,e){return i.resolve(i.dirname(t),e)},s.isRelative=function(t){return 0===t.indexOf("./")||0===t.indexOf("../")},o}(o)},function(t,e,n){"use strict";function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,i(t,e)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}var o=n(12),s=n(15),a=n(0),c=n(5),u=n(18),l=n(10),h=l.FileSystemLoader,f=l.WebLoader,p=l.PrecompiledLoader,d=n(20),m=n(21),y=n(1),g=y.Obj,v=y.EmitterObj,b=n(2),_=b.handleError,w=b.Frame,x=n(22);function k(t,e,n){o((function(){t(e,n)}))}var T={type:"code",obj:{root:function(t,e,n,r,i){try{i(null,"")}catch(t){i(_(t,null,null))}}}},S=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var n=e.prototype;return n.init=function(t,e){var n=this;e=this.opts=e||{},this.opts.dev=!!e.dev,this.opts.autoescape=null==e.autoescape||e.autoescape,this.opts.throwOnUndefined=!!e.throwOnUndefined,this.opts.trimBlocks=!!e.trimBlocks,this.opts.lstripBlocks=!!e.lstripBlocks,this.loaders=[],t?this.loaders=a.isArray(t)?t:[t]:h?this.loaders=[new h("views")]:f&&(this.loaders=[new f("/views")]),"undefined"!=typeof window&&window.nunjucksPrecompiled&&this.loaders.unshift(new p(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=m(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],a._entries(u).forEach((function(t){var e=t[0],r=t[1];return n.addFilter(e,r)})),a._entries(d).forEach((function(t){var e=t[0],r=t[1];return n.addTest(e,r)}))},n._initLoaders=function(){var t=this;this.loaders.forEach((function(e){e.cache={},"function"==typeof e.on&&(e.on("update",(function(n,r){e.cache[n]=null,t.emit("update",n,r,e)})),e.on("load",(function(n,r){t.emit("load",n,r,e)})))}))},n.invalidateCache=function(){this.loaders.forEach((function(t){t.cache={}}))},n.addExtension=function(t,e){return e.__name=t,this.extensions[t]=e,this.extensionsList.push(e),this},n.removeExtension=function(t){var e=this.getExtension(t);e&&(this.extensionsList=a.without(this.extensionsList,e),delete this.extensions[t])},n.getExtension=function(t){return this.extensions[t]},n.hasExtension=function(t){return!!this.extensions[t]},n.addGlobal=function(t,e){return this.globals[t]=e,this},n.getGlobal=function(t){if(void 0===this.globals[t])throw new Error("global not found: "+t);return this.globals[t]},n.addFilter=function(t,e,n){var r=e;return n&&this.asyncFilters.push(t),this.filters[t]=r,this},n.getFilter=function(t){if(!this.filters[t])throw new Error("filter not found: "+t);return this.filters[t]},n.addTest=function(t,e){return this.tests[t]=e,this},n.getTest=function(t){if(!this.tests[t])throw new Error("test not found: "+t);return this.tests[t]},n.resolveTemplate=function(t,e,n){return t.isRelative&&e&&t.isRelative(n)&&t.resolve?t.resolve(e,n):n},n.getTemplate=function(t,e,n,r,i){var o,s=this,c=this,u=null;if(t&&t.raw&&(t=t.raw),a.isFunction(n)&&(i=n,n=null,e=e||!1),a.isFunction(e)&&(i=e,e=!1),t instanceof A)u=t;else{if("string"!=typeof t)throw new Error("template names must be a string: "+t);for(var l=0;l0&&!this.skip(i.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",t.lineno,t.colno);var a=this.parsePrimary();if("_"===a.value.charAt(0)&&this.fail("parseFrom: names starting with an underscore cannot be imported",a.lineno,a.colno),this.skipSymbol("as")){var c=this.parsePrimary();r.addChild(new o.Pair(a.lineno,a.colno,a,c))}else r.addChild(a);n=this.parseWithContext()}return new o.FromImport(t.lineno,t.colno,e,r,n)},c.parseBlock=function(){var t=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",t.lineno,t.colno);var e=new o.Block(t.lineno,t.colno);e.name=this.parsePrimary(),e.name instanceof o.Symbol||this.fail("parseBlock: variable name expected",t.lineno,t.colno),this.advanceAfterBlockEnd(t.value),e.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(e.name.value);var n=this.peekToken();return n||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(n.value),e},c.parseExtends=function(){var t="extends",e=this.peekToken();this.skipSymbol(t)||this.fail("parseTemplateRef: expected "+t);var n=new o.Extends(e.lineno,e.colno);return n.template=this.parseExpression(),this.advanceAfterBlockEnd(e.value),n},c.parseInclude=function(){var t="include",e=this.peekToken();this.skipSymbol(t)||this.fail("parseInclude: expected "+t);var n=new o.Include(e.lineno,e.colno);return n.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(n.ignoreMissing=!0),this.advanceAfterBlockEnd(e.value),n},c.parseIf=function(){var t,e=this.peekToken();this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?t=new o.If(e.lineno,e.colno):this.skipSymbol("ifAsync")?t=new o.IfAsync(e.lineno,e.colno):this.fail("parseIf: expected if, elif, or elseif",e.lineno,e.colno),t.cond=this.parseExpression(),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("elif","elseif","else","endif");var n=this.peekToken();switch(n&&n.value){case"elseif":case"elif":t.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),t.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":t.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return t},c.parseSet=function(){var t=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",t.lineno,t.colno);for(var e,n=new o.Set(t.lineno,t.colno,[]);(e=this.parsePrimary())&&(n.targets.push(e),this.skip(i.TOKEN_COMMA)););return this.skipValue(i.TOKEN_OPERATOR,"=")?(n.value=this.parseExpression(),this.advanceAfterBlockEnd(t.value)):this.skip(i.TOKEN_BLOCK_END)?(n.body=new o.Capture(t.lineno,t.colno,this.parseUntilBlocks("endset")),n.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",t.lineno,t.colno),n},c.parseSwitch=function(){var t="switch",e="endswitch",n="case",r="default",i=this.peekToken();this.skipSymbol(t)||this.skipSymbol(n)||this.skipSymbol(r)||this.fail('parseSwitch: expected "switch," "case" or "default"',i.lineno,i.colno);var s=this.parseExpression();this.advanceAfterBlockEnd(t),this.parseUntilBlocks(n,r,e);var a,c=this.peekToken(),u=[];do{this.skipSymbol(n);var l=this.parseExpression();this.advanceAfterBlockEnd(t);var h=this.parseUntilBlocks(n,r,e);u.push(new o.Case(c.line,c.col,l,h)),c=this.peekToken()}while(c&&c.value===n);switch(c.value){case r:this.advanceAfterBlockEnd(),a=this.parseUntilBlocks(e),this.advanceAfterBlockEnd();break;case e:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new o.Switch(i.lineno,i.colno,s,u,a)},c.parseStatement=function(){var t=this.peekToken();if(t.type!==i.TOKEN_SYMBOL&&this.fail("tag name expected",t.lineno,t.colno),this.breakOnBlocks&&-1!==a.indexOf(this.breakOnBlocks,t.value))return null;switch(t.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var e=0;e0;){var c=s[0],u=s[1],l=s[2];l===t?r+=1:l===e&&(r-=1),0===r?(i+=u,this.tokens.backN(c.length-u.length)):i+=c}return new o.Output(a.lineno,a.colno,[new o.TemplateData(a.lineno,a.colno,i)])},c.parsePostfix=function(t){for(var e,n=this.peekToken();n;){if(n.type===i.TOKEN_LEFT_PAREN)t=new o.FunCall(n.lineno,n.colno,t,this.parseSignature());else if(n.type===i.TOKEN_LEFT_BRACKET)(e=this.parseAggregate()).children.length>1&&this.fail("invalid index"),t=new o.LookupVal(n.lineno,n.colno,t,e.children[0]);else{if(n.type!==i.TOKEN_OPERATOR||"."!==n.value)break;this.nextToken();var r=this.nextToken();r.type!==i.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+r.value,r.lineno,r.colno),e=new o.Literal(r.lineno,r.colno,r.value),t=new o.LookupVal(n.lineno,n.colno,t,e)}n=this.peekToken()}return t},c.parseExpression=function(){return this.parseInlineIf()},c.parseInlineIf=function(){var t=this.parseOr();if(this.skipSymbol("if")){var e=this.parseOr(),n=t;(t=new o.InlineIf(t.lineno,t.colno)).body=n,t.cond=e,this.skipSymbol("else")?t.else_=this.parseOr():t.else_=null}return t},c.parseOr=function(){for(var t=this.parseAnd();this.skipSymbol("or");){var e=this.parseAnd();t=new o.Or(t.lineno,t.colno,t,e)}return t},c.parseAnd=function(){for(var t=this.parseNot();this.skipSymbol("and");){var e=this.parseNot();t=new o.And(t.lineno,t.colno,t,e)}return t},c.parseNot=function(){var t=this.peekToken();return this.skipSymbol("not")?new o.Not(t.lineno,t.colno,this.parseNot()):this.parseIn()},c.parseIn=function(){for(var t=this.parseIs();;){var e=this.nextToken();if(!e)break;var n=e.type===i.TOKEN_SYMBOL&&"not"===e.value;if(n||this.pushToken(e),!this.skipSymbol("in")){n&&this.pushToken(e);break}var r=this.parseIs();t=new o.In(t.lineno,t.colno,t,r),n&&(t=new o.Not(t.lineno,t.colno,t))}return t},c.parseIs=function(){var t=this.parseCompare();if(this.skipSymbol("is")){var e=this.skipSymbol("not"),n=this.parseCompare();t=new o.Is(t.lineno,t.colno,t,n),e&&(t=new o.Not(t.lineno,t.colno,t))}return t},c.parseCompare=function(){for(var t=["==","===","!=","!==","<",">","<=",">="],e=this.parseConcat(),n=[];;){var r=this.nextToken();if(!r)break;if(-1===t.indexOf(r.value)){this.pushToken(r);break}n.push(new o.CompareOperand(r.lineno,r.colno,this.parseConcat(),r.value))}return n.length?new o.Compare(n[0].lineno,n[0].colno,e,n):e},c.parseConcat=function(){for(var t=this.parseAdd();this.skipValue(i.TOKEN_TILDE,"~");){var e=this.parseAdd();t=new o.Concat(t.lineno,t.colno,t,e)}return t},c.parseAdd=function(){for(var t=this.parseSub();this.skipValue(i.TOKEN_OPERATOR,"+");){var e=this.parseSub();t=new o.Add(t.lineno,t.colno,t,e)}return t},c.parseSub=function(){for(var t=this.parseMul();this.skipValue(i.TOKEN_OPERATOR,"-");){var e=this.parseMul();t=new o.Sub(t.lineno,t.colno,t,e)}return t},c.parseMul=function(){for(var t=this.parseDiv();this.skipValue(i.TOKEN_OPERATOR,"*");){var e=this.parseDiv();t=new o.Mul(t.lineno,t.colno,t,e)}return t},c.parseDiv=function(){for(var t=this.parseFloorDiv();this.skipValue(i.TOKEN_OPERATOR,"/");){var e=this.parseFloorDiv();t=new o.Div(t.lineno,t.colno,t,e)}return t},c.parseFloorDiv=function(){for(var t=this.parseMod();this.skipValue(i.TOKEN_OPERATOR,"//");){var e=this.parseMod();t=new o.FloorDiv(t.lineno,t.colno,t,e)}return t},c.parseMod=function(){for(var t=this.parsePow();this.skipValue(i.TOKEN_OPERATOR,"%");){var e=this.parsePow();t=new o.Mod(t.lineno,t.colno,t,e)}return t},c.parsePow=function(){for(var t=this.parseUnary();this.skipValue(i.TOKEN_OPERATOR,"**");){var e=this.parseUnary();t=new o.Pow(t.lineno,t.colno,t,e)}return t},c.parseUnary=function(t){var e,n=this.peekToken();return e=this.skipValue(i.TOKEN_OPERATOR,"-")?new o.Neg(n.lineno,n.colno,this.parseUnary(!0)):this.skipValue(i.TOKEN_OPERATOR,"+")?new o.Pos(n.lineno,n.colno,this.parseUnary(!0)):this.parsePrimary(),t||(e=this.parseFilter(e)),e},c.parsePrimary=function(t){var e,n=this.nextToken(),r=null;if(n?n.type===i.TOKEN_STRING?e=n.value:n.type===i.TOKEN_INT?e=parseInt(n.value,10):n.type===i.TOKEN_FLOAT?e=parseFloat(n.value):n.type===i.TOKEN_BOOLEAN?"true"===n.value?e=!0:"false"===n.value?e=!1:this.fail("invalid boolean: "+n.value,n.lineno,n.colno):n.type===i.TOKEN_NONE?e=null:n.type===i.TOKEN_REGEX&&(e=new RegExp(n.value.body,n.value.flags)):this.fail("expected expression, got end of file"),void 0!==e?r=new o.Literal(n.lineno,n.colno,e):n.type===i.TOKEN_SYMBOL?r=new o.Symbol(n.lineno,n.colno,n.value):(this.pushToken(n),r=this.parseAggregate()),t||(r=this.parsePostfix(r)),r)return r;throw this.error("unexpected token: "+n.value,n.lineno,n.colno)},c.parseFilterName=function(){for(var t=this.expect(i.TOKEN_SYMBOL),e=t.value;this.skipValue(i.TOKEN_OPERATOR,".");)e+="."+this.expect(i.TOKEN_SYMBOL).value;return new o.Symbol(t.lineno,t.colno,e)},c.parseFilterArgs=function(t){return this.peekToken().type===i.TOKEN_LEFT_PAREN?this.parsePostfix(t).args.children:[]},c.parseFilter=function(t){for(;this.skip(i.TOKEN_PIPE);){var e=this.parseFilterName();t=new o.Filter(e.lineno,e.colno,e,new o.NodeList(e.lineno,e.colno,[t].concat(this.parseFilterArgs(t))))}return t},c.parseFilterStatement=function(){var t=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var e=this.parseFilterName(),n=this.parseFilterArgs(e);this.advanceAfterBlockEnd(t.value);var r=new o.Capture(e.lineno,e.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var i=new o.Filter(e.lineno,e.colno,e,new o.NodeList(e.lineno,e.colno,[r].concat(n)));return new o.Output(e.lineno,e.colno,[i])},c.parseAggregate=function(){var t,e=this.nextToken();switch(e.type){case i.TOKEN_LEFT_PAREN:t=new o.Group(e.lineno,e.colno);break;case i.TOKEN_LEFT_BRACKET:t=new o.Array(e.lineno,e.colno);break;case i.TOKEN_LEFT_CURLY:t=new o.Dict(e.lineno,e.colno);break;default:return null}for(;;){var n=this.peekToken().type;if(n===i.TOKEN_RIGHT_PAREN||n===i.TOKEN_RIGHT_BRACKET||n===i.TOKEN_RIGHT_CURLY){this.nextToken();break}if(t.children.length>0&&(this.skip(i.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",e.lineno,e.colno)),t instanceof o.Dict){var r=this.parsePrimary();this.skip(i.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",e.lineno,e.colno);var s=this.parseExpression();t.addChild(new o.Pair(r.lineno,r.colno,r,s))}else{var a=this.parseExpression();t.addChild(a)}}return t},c.parseSignature=function(t,e){var n=this.peekToken();if(!e&&n.type!==i.TOKEN_LEFT_PAREN){if(t)return null;this.fail("expected arguments",n.lineno,n.colno)}n.type===i.TOKEN_LEFT_PAREN&&(n=this.nextToken());for(var r=new o.NodeList(n.lineno,n.colno),s=new o.KeywordArgs(n.lineno,n.colno),a=!1;;){if(n=this.peekToken(),!e&&n.type===i.TOKEN_RIGHT_PAREN){this.nextToken();break}if(e&&n.type===i.TOKEN_BLOCK_END)break;if(a&&!this.skip(i.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",n.lineno,n.colno);else{var c=this.parseExpression();this.skipValue(i.TOKEN_OPERATOR,"=")?s.addChild(new o.Pair(c.lineno,c.colno,c,this.parseExpression())):r.addChild(c)}a=!0}return s.children.length&&r.addChild(s),r},c.parseUntilBlocks=function(){for(var t=this.breakOnBlocks,e=arguments.length,n=new Array(e),r=0;r=","//","**"],j=L+this.current();switch(-1!==r.indexOf(D,j)&&(this.forward(),L=j,-1!==r.indexOf(D,j+this.current())&&(L=j+this.current(),this.forward())),L){case"(":M=d;break;case")":M=m;break;case"[":M=y;break;case"]":M=g;break;case"{":M=v;break;case"}":M=b;break;case",":M=w;break;case":":M=x;break;case"~":M=k;break;case"|":M=T;break;default:M=_}return C(M,L,e,n)}if((t=this._extractUntil(i+o)).match(/^[-+]?[0-9]+$/)){if("."===this.current()){this.forward();var B=this._extract("0123456789");return C(S,t+"."+B,e,n)}return C("int",t,e,n)}if(t.match(/^(true|false)$/))return C(E,t,e,n);if("none"===t)return C(A,t,e,n);if("null"===t)return C(A,t,e,n);if(t)return C(O,t,e,n);throw new Error("Unexpected value while parsing: "+t)}var F,U=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if((t=this._extractString(this.tags.BLOCK_START+"-"))||(t=this._extractString(this.tags.BLOCK_START)))return this.in_code=!0,C(u,t,e,n);if((t=this._extractString(this.tags.VARIABLE_START+"-"))||(t=this._extractString(this.tags.VARIABLE_START)))return this.in_code=!0,C(h,t,e,n);t="";var z=!1;for(this._matches(this.tags.COMMENT_START)&&(z=!0,t=this._extractString(this.tags.COMMENT_START));null!==(F=this._extractUntil(U));){if(t+=F,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!z){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=t.length){var V=t.slice(-this.colno);if(/^\s+$/.test(V)&&!(t=t.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!z)throw new Error("unexpected end of comment");t+=this._extractString(this.tags.COMMENT_END);break}t+=this.current(),this.forward()}if(null===F&&z)throw new Error("expected end of comment, got end of file");return C(z?p:c,t,e,n)},e._parseString=function(t){this.forward();for(var e="";!this.isFinished()&&this.current()!==t;){var n=this.current();if("\\"===n){switch(this.forward(),this.current()){case"n":e+="\n";break;case"t":e+="\t";break;case"r":e+="\r";break;default:e+=this.current()}this.forward()}else e+=n,this.forward()}return this.forward(),e},e._matches=function(t){return this.index+t.length>this.len?null:this.str.slice(this.index,this.index+t.length)===t},e._extractString=function(t){return this._matches(t)?(this.forwardN(t.length),t):null},e._extractUntil=function(t){return this._extractMatching(!0,t||"")},e._extract=function(t){return this._extractMatching(!1,t)},e._extractMatching=function(t,e){if(this.isFinished())return null;var n=e.indexOf(this.current());if(t&&-1===n||!t&&-1!==n){var r=this.current();this.forward();for(var i=e.indexOf(this.current());(t&&-1===i||!t&&-1!==i)&&!this.isFinished();)r+=this.current(),this.forward(),i=e.indexOf(this.current());return r}return""},e._extractRegex=function(t){var e=this.currentStr().match(t);return e?(this.forwardN(e[0].length),e):null},e.isFinished=function(){return this.index>=this.len},e.forwardN=function(t){for(var e=0;e1024){for(var e=0,n=i.length-o;e0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function d(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[t];if(void 0===c)return!1;if("function"==typeof c)o(c,this,e);else{var u=c.length,l=y(c,u);for(n=0;n=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1=0;r--)this.removeListener(t,e[r]);return this},a.prototype.listeners=function(t){return d(this,t,!0)},a.prototype.rawListeners=function(t){return d(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){"use strict";var r=n(3),i=n(0),o=0;function s(){return"hole_"+o++}function a(t,e){for(var n=null,r=0;r=e)return t;var n=e-t.length,s=r.repeat(" ",n/2-n%2),a=r.repeat(" ",n/2);return i.copySafeness(t,s+t+a)},e.default=function(t,e,n){return n?t||e:void 0!==t?t:e},e.dictsort=function(t,e,n){if(!r.isObject(t))throw new r.TemplateError("dictsort filter: val must be an object");var i,o=[];for(var s in t)o.push([s,t[s]]);if(void 0===n||"key"===n)i=0;else{if("value"!==n)throw new r.TemplateError("dictsort filter: You can only sort by either key or value");i=1}return o.sort((function(t,n){var o=t[i],s=n[i];return e||(r.isString(o)&&(o=o.toUpperCase()),r.isString(s)&&(s=s.toUpperCase())),o>s?1:o===s?0:-1})),o},e.dump=function(t,e){return JSON.stringify(t,null,e)},e.escape=function(t){return t instanceof i.SafeString?t:(t=null==t?"":t,i.markSafe(r.escape(t.toString())))},e.safe=function(t){return t instanceof i.SafeString?t:(t=null==t?"":t,i.markSafe(t.toString()))},e.first=function(t){return t[0]},e.forceescape=function(t){return t=null==t?"":t,i.markSafe(r.escape(t.toString()))},e.groupby=function(t,e){return r.groupBy(t,e,this.env.opts.throwOnUndefined)},e.indent=function(t,e,n){if(""===(t=o(t,"")))return"";e=e||4;var s=t.split("\n"),a=r.repeat(" ",e),c=s.map((function(t,e){return 0!==e||n?""+a+t:t})).join("\n");return i.copySafeness(t,c)},e.join=function(t,e,n){return e=e||"",n&&(t=r.map(t,(function(t){return t[n]}))),t.join(e)},e.last=function(t){return t[t.length-1]},e.length=function(t){var e=o(t,"");return void 0!==e?"function"==typeof Map&&e instanceof Map||"function"==typeof Set&&e instanceof Set?e.size:!r.isObject(e)||e instanceof i.SafeString?e.length:r.keys(e).length:0},e.list=c,e.lower=function(t){return(t=o(t,"")).toLowerCase()},e.nl2br=function(t){return null==t?"":i.copySafeness(t,t.replace(/\r\n|\n/g,"
\n"))},e.random=function(t){return t[Math.floor(Math.random()*t.length)]},e.reject=u(!1),e.rejectattr=function(t,e){return t.filter((function(t){return!t[e]}))},e.select=u(!0),e.selectattr=function(t,e){return t.filter((function(t){return!!t[e]}))},e.replace=function(t,e,n,r){var o=t;if(e instanceof RegExp)return t.replace(e,n);void 0===r&&(r=-1);var s="";if("number"==typeof e)e=""+e;else if("string"!=typeof e)return t;if("number"==typeof t&&(t=""+t),"string"!=typeof t&&!(t instanceof i.SafeString))return t;if(""===e)return s=n+t.split("").join(n)+n,i.copySafeness(t,s);var a=t.indexOf(e);if(0===r||-1===a)return t;for(var c=0,u=0;a>-1&&(-1===r||u=i&&l.push(n),o.push(l)}return o},e.sum=function(t,e,n){return void 0===n&&(n=0),e&&(t=r.map(t,(function(t){return t[e]}))),n+t.reduce((function(t,e){return t+e}),0)},e.sort=i.makeMacro(["value","reverse","case_sensitive","attribute"],[],(function(t,e,n,i){var o=this,s=r.map(t,(function(t){return t})),a=r.getAttrGetter(i);return s.sort((function(t,s){var c=i?a(t):t,u=i?a(s):s;if(o.env.opts.throwOnUndefined&&i&&(void 0===c||void 0===u))throw new TypeError('sort: attribute "'+i+'" resolved to undefined');return!n&&r.isString(c)&&r.isString(u)&&(c=c.toLowerCase(),u=u.toLowerCase()),cu?e?-1:1:0})),s})),e.string=function(t){return i.copySafeness(t,t)},e.striptags=function(t,e){var n,r=l((t=o(t,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|/gi,""));return n=e?r.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,"\n").replace(/\n\n\n+/g,"\n\n"):r.replace(/\s+/gi," "),i.copySafeness(t,n)},e.title=function(t){var e=(t=o(t,"")).split(" ").map((function(t){return a(t)}));return i.copySafeness(t,e.join(" "))},e.trim=l,e.truncate=function(t,e,n,r){var s=t;if(e=e||255,(t=o(t,"")).length<=e)return t;if(n)t=t.substring(0,e);else{var a=t.lastIndexOf(" ",e);-1===a&&(a=e),t=t.substring(0,a)}return t+=null!=r?r:"...",i.copySafeness(s,t)},e.upper=function(t){return(t=o(t,"")).toUpperCase()},e.urlencode=function(t){var e=encodeURIComponent;return r.isString(t)?e(t):(r.isArray(t)?t:r._entries(t)).map((function(t){var n=t[0],r=t[1];return e(n)+"="+e(r)})).join("&")};var h=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,f=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,p=/^https?:\/\/.*$/,d=/^www\./,m=/\.(?:org|net|com)(?:\:|\/|$)/;e.urlize=function(t,e,n){s(e)&&(e=1/0);var r=!0===n?' rel="nofollow"':"";return t.split(/(\s+)/).filter((function(t){return t&&t.length})).map((function(t){var n=t.match(h),i=n?n[1]:t,o=i.substr(0,e);return p.test(i)?'"+o+"":d.test(i)?'"+o+"":f.test(i)?''+i+"":m.test(i)?'"+o+"":t})).join("")},e.wordcount=function(t){var e=(t=o(t,""))?t.match(/\w+/g):null;return e?e.length:null},e.float=function(t,e){var n=parseFloat(t);return s(n)?e:n};var y=i.makeMacro(["value","default","base"],[],(function(t,e,n){void 0===n&&(n=10);var r=parseInt(t,n);return s(r)?e:r}));e.int=y,e.d=e.default,e.e=e.escape},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var i=function(t){var e,n;function i(e){var n;return(n=t.call(this)||this).precompiled=e||{},n}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n),i.prototype.getSource=function(t){return this.precompiled[t]?{src:{type:"code",obj:this.precompiled[t]},path:t}:null},i}(n(6));t.exports={PrecompiledLoader:i}},function(t,e,n){"use strict";var r=n(2).SafeString;e.callable=function(t){return"function"==typeof t},e.defined=function(t){return void 0!==t},e.divisibleby=function(t,e){return t%e==0},e.escaped=function(t){return t instanceof r},e.equalto=function(t,e){return t===e},e.eq=e.equalto,e.sameas=e.equalto,e.even=function(t){return t%2==0},e.falsy=function(t){return!t},e.ge=function(t,e){return t>=e},e.greaterthan=function(t,e){return t>e},e.gt=e.greaterthan,e.le=function(t,e){return t<=e},e.lessthan=function(t,e){return t0)for(var i=t;ie;o+=n)r.push(o);return r},cycler:function(){return t=Array.prototype.slice.call(arguments),e=-1,{current:null,reset:function(){e=-1,this.current=null},next:function(){return++e>=t.length&&(e=0),this.current=t[e],this.current}};var t,e},joiner:function(t){return function(t){t=t||",";var e=!0;return function(){var n=e?"":t;return e=!1,n}}(t)}}}},function(t,e,n){var r=n(4);t.exports=function(t,e){function n(t,e){if(this.name=t,this.path=t,this.defaultEngine=e.defaultEngine,this.ext=r.extname(t),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=("."!==this.defaultEngine[0]?".":"")+this.defaultEngine)}return n.prototype.render=function(e,n){t.render(this.name,e,n)},e.set("view",n),e.set("nunjucksEnv",t),t}},function(t,e,n){"use strict";var r=n(4),i=n(4),o=n(0)._prettifyError,s=n(5),a=n(7).Environment,c=n(24);function u(t,e){return!!Array.isArray(e)&&e.some((function(e){return t.match(e)}))}function l(t,e){(e=e||{}).isString=!0;var n=e.env||new a([]),r=e.wrapper||c;if(!e.name)throw new Error('the "name" option is required when compiling a string');return r([h(t,e.name,n)],e)}function h(t,e,n){var r,i=(n=n||new a([])).asyncFilters,c=n.extensionsList;e=e.replace(/\\/g,"/");try{r=s.compile(t,i,c,e,n.opts)}catch(t){throw o(e,!1,t)}return{name:e,template:r}}t.exports={precompile:function(t,e){var n=(e=e||{}).env||new a([]),o=e.wrapper||c;if(e.isString)return l(t,e);var s=r.existsSync(t)&&r.statSync(t),f=[],p=[];if(s.isFile())f.push(h(r.readFileSync(t,"utf-8"),e.name||t,n));else if(s.isDirectory()){!function n(o){r.readdirSync(o).forEach((function(s){var a=i.join(o,s),c=a.substr(i.join(t,"/").length),l=r.statSync(a);l&&l.isDirectory()?u(c+="/",e.exclude)||n(a):u(c,e.include)&&p.push(a)}))}(t);for(var d=0;dt.length||i>0&&s>=r||i<0&&s<=r);s+=i)o.push(n.memberLookup(t,s));return o}function p(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var d={pop:function(t){if(void 0===t)return this.pop();if(t>=this.length||t<0)throw new Error("KeyError");return this.splice(t,1)},append:function(t){return this.push(t)},remove:function(t){for(var e=0;e{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";r.r(i),r.d(i,{Component:()=>S,ComponentAttribute:()=>h,ComponentAttributeDefinition:()=>P,ComponentDefinition:()=>A,ComponentDrawOption:()=>g,ComponentLink:()=>U,ComponentLinkDefinition:()=>V,ComponentRenderer:()=>FO,DefaultConfiguration:()=>GN,DefaultData:()=>UN,DefaultDrawer:()=>hN,DefaultMetadata:()=>mN,DefaultParser:()=>bN,DefaultPlugin:()=>ZN,DefaultRender:()=>kN,FileInformation:()=>m,FileInput:()=>$,LinkRenderer:()=>KO,ParserLog:()=>a,Tag:()=>QN,Variable:()=>sC});var t={};function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t,e,n){return(e=o(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t){var n=function(t){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(n)?n:n+""}r.r(t),r.d(t,{Adder:()=>xt,Delaunay:()=>Vc,FormatSpecifier:()=>sh,InternMap:()=>St,InternSet:()=>Et,Node:()=>Ly,Path:()=>ia,Voronoi:()=>Dc,ZoomTransform:()=>UE,active:()=>us,arc:()=>TT,area:()=>RT,areaRadial:()=>zT,ascending:()=>X,autoType:()=>wu,axisBottom:()=>pn,axisLeft:()=>dn,axisRight:()=>fn,axisTop:()=>hn,bin:()=>se,bisect:()=>ot,bisectCenter:()=>it,bisectLeft:()=>rt,bisectRight:()=>nt,bisector:()=>J,blob:()=>ll,blur:()=>st,blur2:()=>at,blurImage:()=>ct,brush:()=>Bs,brushSelection:()=>Ms,brushX:()=>Ds,brushY:()=>js,buffer:()=>fl,chord:()=>$s,chordDirected:()=>Zs,chordTranspose:()=>Xs,cluster:()=>Ty,color:()=>oi,contourDensity:()=>pc,contours:()=>oc,count:()=>pt,create:()=>Jk,creator:()=>_r,cross:()=>gt,csv:()=>gl,csvFormat:()=>cu,csvFormatBody:()=>uu,csvFormatRow:()=>hu,csvFormatRows:()=>lu,csvFormatValue:()=>fu,csvParse:()=>su,csvParseRows:()=>au,cubehelix:()=>$a,cumsum:()=>vt,curveBasis:()=>LS,curveBasisClosed:()=>PS,curveBasisOpen:()=>MS,curveBumpX:()=>qT,curveBumpY:()=>WT,curveBundle:()=>jS,curveCardinal:()=>US,curveCardinalClosed:()=>VS,curveCardinalOpen:()=>HS,curveCatmullRom:()=>GS,curveCatmullRomClosed:()=>$S,curveCatmullRomOpen:()=>ZS,curveLinear:()=>OT,curveLinearClosed:()=>QS,curveMonotoneX:()=>aE,curveMonotoneY:()=>cE,curveNatural:()=>hE,curveStep:()=>pE,curveStepAfter:()=>mE,curveStepBefore:()=>dE,descending:()=>Z,deviation:()=>_t,difference:()=>He,disjoint:()=>qe,dispatch:()=>_n,drag:()=>$c,dragDisable:()=>Fr,dragEnable:()=>Ur,dsv:()=>yl,dsvFormat:()=>iu,easeBack:()=>il,easeBackIn:()=>nl,easeBackInOut:()=>il,easeBackOut:()=>rl,easeBounce:()=>Qu,easeBounceIn:()=>Ju,easeBounceInOut:()=>tl,easeBounceOut:()=>Qu,easeCircle:()=>zu,easeCircleIn:()=>Fu,easeCircleInOut:()=>zu,easeCircleOut:()=>Uu,easeCubic:()=>os,easeCubicIn:()=>rs,easeCubicInOut:()=>os,easeCubicOut:()=>is,easeElastic:()=>al,easeElasticIn:()=>sl,easeElasticInOut:()=>cl,easeElasticOut:()=>al,easeExp:()=>Bu,easeExpIn:()=>Du,easeExpInOut:()=>Bu,easeExpOut:()=>ju,easeLinear:()=>ku,easePoly:()=>Nu,easePolyIn:()=>Au,easePolyInOut:()=>Nu,easePolyOut:()=>Ou,easeQuad:()=>Eu,easeQuadIn:()=>Tu,easeQuadInOut:()=>Eu,easeQuadOut:()=>Su,easeSin:()=>Iu,easeSinIn:()=>Ru,easeSinInOut:()=>Iu,easeSinOut:()=>Pu,every:()=>Be,extent:()=>wt,fcumsum:()=>Tt,filter:()=>Ue,flatGroup:()=>Mt,flatRollup:()=>Dt,forceCenter:()=>El,forceCollide:()=>Fl,forceLink:()=>Vl,forceManyBody:()=>Zl,forceRadial:()=>Jl,forceSimulation:()=>Xl,forceX:()=>Ql,forceY:()=>th,format:()=>hh,formatDefaultLocale:()=>yh,formatLocale:()=>mh,formatPrefix:()=>fh,formatSpecifier:()=>oh,fsum:()=>kt,geoAlbers:()=>Fm,geoAlbersUsa:()=>Um,geoArea:()=>wf,geoAzimuthalEqualArea:()=>Hm,geoAzimuthalEqualAreaRaw:()=>Km,geoAzimuthalEquidistant:()=>Wm,geoAzimuthalEquidistantRaw:()=>qm,geoBounds:()=>np,geoCentroid:()=>dp,geoCircle:()=>Sp,geoClipAntimeridian:()=>Dp,geoClipCircle:()=>jp,geoClipExtent:()=>qp,geoClipRectangle:()=>Hp,geoConicConformal:()=>Jm,geoConicConformalRaw:()=>Zm,geoConicEqualArea:()=>Bm,geoConicEqualAreaRaw:()=>jm,geoConicEquidistant:()=>ny,geoConicEquidistantRaw:()=>ey,geoContains:()=>cd,geoDistance:()=>Qp,geoEqualEarth:()=>uy,geoEqualEarthRaw:()=>cy,geoEquirectangular:()=>ty,geoEquirectangularRaw:()=>Qm,geoGnomonic:()=>hy,geoGnomonicRaw:()=>ly,geoGraticule:()=>hd,geoGraticule10:()=>fd,geoIdentity:()=>fy,geoInterpolate:()=>pd,geoLength:()=>Xp,geoMercator:()=>Ym,geoMercatorRaw:()=>Gm,geoNaturalEarth1:()=>dy,geoNaturalEarth1Raw:()=>py,geoOrthographic:()=>yy,geoOrthographicRaw:()=>my,geoPath:()=>_m,geoProjection:()=>Im,geoProjectionMutator:()=>Mm,geoRotation:()=>xp,geoStereographic:()=>vy,geoStereographicRaw:()=>gy,geoStream:()=>Xh,geoTransform:()=>wm,geoTransverseMercator:()=>_y,geoTransverseMercatorRaw:()=>by,gray:()=>Na,greatest:()=>pe,greatestIndex:()=>Ce,group:()=>Rt,groupSort:()=>Gt,groups:()=>Pt,hcl:()=>Ba,hierarchy:()=>Ey,histogram:()=>se,hsl:()=>vi,html:()=>Tl,image:()=>bl,index:()=>Ft,indexes:()=>Ut,interpolate:()=>Hi,interpolateArray:()=>Di,interpolateBasis:()=>Ti,interpolateBasisClosed:()=>Si,interpolateBlues:()=>Sk,interpolateBrBG:()=>jx,interpolateBuGn:()=>ek,interpolateBuPu:()=>rk,interpolateCividis:()=>Dk,interpolateCool:()=>Fk,interpolateCubehelix:()=>qg,interpolateCubehelixDefault:()=>jk,interpolateCubehelixLong:()=>Wg,interpolateDate:()=>Bi,interpolateDiscrete:()=>Rg,interpolateGnBu:()=>ok,interpolateGreens:()=>Ak,interpolateGreys:()=>Nk,interpolateHcl:()=>Vg,interpolateHclLong:()=>Kg,interpolateHsl:()=>Bg,interpolateHslLong:()=>Fg,interpolateHue:()=>Pg,interpolateInferno:()=>Xk,interpolateLab:()=>Ug,interpolateMagma:()=>$k,interpolateNumber:()=>Fi,interpolateNumberArray:()=>Ii,interpolateObject:()=>Ui,interpolateOrRd:()=>ak,interpolateOranges:()=>Mk,interpolatePRGn:()=>Fx,interpolatePiYG:()=>zx,interpolatePlasma:()=>Zk,interpolatePuBu:()=>hk,interpolatePuBuGn:()=>uk,interpolatePuOr:()=>Kx,interpolatePuRd:()=>pk,interpolatePurples:()=>Lk,interpolateRainbow:()=>zk,interpolateRdBu:()=>qx,interpolateRdGy:()=>Gx,interpolateRdPu:()=>mk,interpolateRdYlBu:()=>$x,interpolateRdYlGn:()=>Zx,interpolateReds:()=>Pk,interpolateRgb:()=>Ci,interpolateRgbBasis:()=>Ri,interpolateRgbBasisClosed:()=>Pi,interpolateRound:()=>Ig,interpolateSinebow:()=>qk,interpolateSpectral:()=>Qx,interpolateString:()=>Ki,interpolateTransformCss:()=>Ro,interpolateTransformSvg:()=>Po,interpolateTurbo:()=>Wk,interpolateViridis:()=>Yk,interpolateWarm:()=>Bk,interpolateYlGn:()=>bk,interpolateYlGnBu:()=>gk,interpolateYlOrBr:()=>wk,interpolateYlOrRd:()=>kk,interpolateZoom:()=>Dg,interrupt:()=>Eo,intersection:()=>We,interval:()=>jE,isoFormat:()=>IE,isoParse:()=>DE,json:()=>wl,lab:()=>Ca,lch:()=>ja,least:()=>Oe,leastIndex:()=>Ne,line:()=>LT,lineRadial:()=>UT,link:()=>XT,linkHorizontal:()=>ZT,linkRadial:()=>QT,linkVertical:()=>JT,local:()=>tT,map:()=>ze,matcher:()=>En,max:()=>ae,maxIndex:()=>ce,mean:()=>be,median:()=>_e,medianIndex:()=>we,merge:()=>xe,min:()=>ue,minIndex:()=>le,mode:()=>ke,namespace:()=>zn,namespaces:()=>Un,nice:()=>ie,now:()=>io,pack:()=>ng,packEnclose:()=>Uy,packSiblings:()=>tg,pairs:()=>Te,partition:()=>cg,path:()=>oa,pathRound:()=>sa,permute:()=>Kt,pie:()=>MT,piecewise:()=>Gg,pointRadial:()=>VT,pointer:()=>Wi,pointers:()=>nT,polygonArea:()=>$g,polygonCentroid:()=>Xg,polygonContains:()=>ev,polygonHull:()=>tv,polygonLength:()=>nv,precisionFixed:()=>gh,precisionPrefix:()=>vh,precisionRound:()=>bh,quadtree:()=>Ll,quantile:()=>de,quantileIndex:()=>ye,quantileSorted:()=>me,quantize:()=>Yg,quickselect:()=>he,radialArea:()=>zT,radialLine:()=>UT,randomBates:()=>uv,randomBernoulli:()=>fv,randomBeta:()=>mv,randomBinomial:()=>yv,randomCauchy:()=>vv,randomExponential:()=>lv,randomGamma:()=>dv,randomGeometric:()=>pv,randomInt:()=>ov,randomIrwinHall:()=>cv,randomLcg:()=>Tv,randomLogNormal:()=>av,randomLogistic:()=>bv,randomNormal:()=>sv,randomPareto:()=>hv,randomPoisson:()=>_v,randomUniform:()=>iv,randomWeibull:()=>gv,range:()=>Ee,rank:()=>Ae,reduce:()=>Ve,reverse:()=>Ke,rgb:()=>ui,ribbon:()=>ga,ribbonArrow:()=>va,rollup:()=>jt,rollups:()=>Bt,scaleBand:()=>Nv,scaleDiverging:()=>vx,scaleDivergingLog:()=>bx,scaleDivergingPow:()=>wx,scaleDivergingSqrt:()=>xx,scaleDivergingSymlog:()=>_x,scaleIdentity:()=>Hv,scaleImplicit:()=>Av,scaleLinear:()=>Kv,scaleLog:()=>Qv,scaleOrdinal:()=>Ov,scalePoint:()=>Lv,scalePow:()=>cb,scaleQuantile:()=>fb,scaleQuantize:()=>pb,scaleRadial:()=>hb,scaleSequential:()=>hx,scaleSequentialLog:()=>fx,scaleSequentialPow:()=>dx,scaleSequentialQuantile:()=>yx,scaleSequentialSqrt:()=>mx,scaleSequentialSymlog:()=>px,scaleSqrt:()=>ub,scaleSymlog:()=>rb,scaleThreshold:()=>db,scaleTime:()=>ax,scaleUtc:()=>cx,scan:()=>Le,schemeAccent:()=>Sx,schemeBlues:()=>Tk,schemeBrBG:()=>Dx,schemeBuGn:()=>tk,schemeBuPu:()=>nk,schemeCategory10:()=>Tx,schemeDark2:()=>Ex,schemeGnBu:()=>ik,schemeGreens:()=>Ek,schemeGreys:()=>Ok,schemeObservable10:()=>Ax,schemeOrRd:()=>sk,schemeOranges:()=>Ik,schemePRGn:()=>Bx,schemePaired:()=>Ox,schemePastel1:()=>Nx,schemePastel2:()=>Cx,schemePiYG:()=>Ux,schemePuBu:()=>lk,schemePuBuGn:()=>ck,schemePuOr:()=>Vx,schemePuRd:()=>fk,schemePurples:()=>Ck,schemeRdBu:()=>Hx,schemeRdGy:()=>Wx,schemeRdPu:()=>dk,schemeRdYlBu:()=>Yx,schemeRdYlGn:()=>Xx,schemeReds:()=>Rk,schemeSet1:()=>Lx,schemeSet2:()=>Rx,schemeSet3:()=>Px,schemeSpectral:()=>Jx,schemeTableau10:()=>Ix,schemeYlGn:()=>vk,schemeYlGnBu:()=>yk,schemeYlOrBr:()=>_k,schemeYlOrRd:()=>xk,select:()=>Ir,selectAll:()=>rT,selection:()=>Pr,selector:()=>xn,selectorAll:()=>Sn,shuffle:()=>Re,shuffler:()=>Pe,some:()=>Fe,sort:()=>Ht,stack:()=>_E,stackOffsetDiverging:()=>xE,stackOffsetExpand:()=>wE,stackOffsetNone:()=>yE,stackOffsetSilhouette:()=>kE,stackOffsetWiggle:()=>TE,stackOrderAppearance:()=>SE,stackOrderAscending:()=>AE,stackOrderDescending:()=>NE,stackOrderInsideOut:()=>CE,stackOrderNone:()=>gE,stackOrderReverse:()=>LE,stratify:()=>dg,style:()=>Jn,subset:()=>Xe,sum:()=>Ie,superset:()=>Ye,svg:()=>Sl,symbol:()=>AS,symbolAsterisk:()=>eS,symbolCircle:()=>nS,symbolCross:()=>rS,symbolDiamond:()=>sS,symbolDiamond2:()=>aS,symbolPlus:()=>cS,symbolSquare:()=>uS,symbolSquare2:()=>lS,symbolStar:()=>dS,symbolTimes:()=>TS,symbolTriangle:()=>yS,symbolTriangle2:()=>vS,symbolWye:()=>kS,symbolX:()=>TS,symbols:()=>SS,symbolsFill:()=>SS,symbolsStroke:()=>ES,text:()=>dl,thresholdFreedmanDiaconis:()=>ge,thresholdScott:()=>ve,thresholdSturges:()=>oe,tickFormat:()=>zv,tickIncrement:()=>ne,tickStep:()=>re,ticks:()=>ee,timeDay:()=>Db,timeDays:()=>jb,timeFormat:()=>D_,timeFormatDefaultLocale:()=>rx,timeFormatLocale:()=>I_,timeFriday:()=>Yb,timeFridays:()=>e_,timeHour:()=>Rb,timeHours:()=>Pb,timeInterval:()=>kb,timeMillisecond:()=>Tb,timeMilliseconds:()=>Sb,timeMinute:()=>Ob,timeMinutes:()=>Nb,timeMonday:()=>Hb,timeMondays:()=>Zb,timeMonth:()=>v_,timeMonths:()=>b_,timeParse:()=>j_,timeSaturday:()=>$b,timeSaturdays:()=>n_,timeSecond:()=>Eb,timeSeconds:()=>Ab,timeSunday:()=>Kb,timeSundays:()=>Xb,timeThursday:()=>Gb,timeThursdays:()=>t_,timeTickInterval:()=>C_,timeTicks:()=>N_,timeTuesday:()=>qb,timeTuesdays:()=>Jb,timeWednesday:()=>Wb,timeWednesdays:()=>Qb,timeWeek:()=>Kb,timeWeeks:()=>Xb,timeYear:()=>x_,timeYears:()=>k_,timeout:()=>fo,timer:()=>ao,timerFlush:()=>co,transition:()=>ts,transpose:()=>Me,tree:()=>kg,treemap:()=>Og,treemapBinary:()=>Ng,treemapDice:()=>ag,treemapResquarify:()=>Lg,treemapSlice:()=>Tg,treemapSliceDice:()=>Cg,treemapSquarify:()=>Ag,tsv:()=>vl,tsvFormat:()=>yu,tsvFormatBody:()=>gu,tsvFormatRow:()=>bu,tsvFormatRows:()=>vu,tsvFormatValue:()=>_u,tsvParse:()=>du,tsvParseRows:()=>mu,union:()=>Ze,unixDay:()=>Ub,unixDays:()=>zb,utcDay:()=>Bb,utcDays:()=>Fb,utcFormat:()=>B_,utcFriday:()=>u_,utcFridays:()=>y_,utcHour:()=>Ib,utcHours:()=>Mb,utcMillisecond:()=>Tb,utcMilliseconds:()=>Sb,utcMinute:()=>Cb,utcMinutes:()=>Lb,utcMonday:()=>o_,utcMondays:()=>f_,utcMonth:()=>__,utcMonths:()=>w_,utcParse:()=>F_,utcSaturday:()=>l_,utcSaturdays:()=>g_,utcSecond:()=>Eb,utcSeconds:()=>Ab,utcSunday:()=>i_,utcSundays:()=>h_,utcThursday:()=>c_,utcThursdays:()=>m_,utcTickInterval:()=>O_,utcTicks:()=>A_,utcTuesday:()=>s_,utcTuesdays:()=>p_,utcWednesday:()=>a_,utcWednesdays:()=>d_,utcWeek:()=>i_,utcWeeks:()=>h_,utcYear:()=>T_,utcYears:()=>S_,variance:()=>bt,window:()=>Yn,xml:()=>kl,zip:()=>je,zoom:()=>ZE,zoomIdentity:()=>zE,zoomTransform:()=>VE});var s=function(t){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{path:null,severity:null,startLineNumber:null,startColumn:null,endLineNumber:null,endColumn:null,message:null,initialErrorMessage:null,componentId:null,attribute:null,extraData:""};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.path,r=e.severity,i=e.startLineNumber,o=e.startColumn,s=e.endLineNumber,a=e.endColumn,c=e.message,u=e.initialErrorMessage,l=e.componentId,h=e.attribute,f=e.extraData;this.path=null!=n?n:null,this.severity=null!=r?r:t.SEVERITY_HINT,this.startLineNumber=null!=i?i:null,this.startColumn=null!=o?o:null,this.endLineNumber=null!=s?s:null,this.endColumn=null!=a?a:null,this.message=null!=c?c:null,this.initialErrorMessage=null!=u?u:null,this.componentId=null!=l?l:null,this.attribute=null!=h?h:null,this.extraData=null!=f?f:""}));n(s,"SEVERITY_HINT",1),n(s,"SEVERITY_INFO",2),n(s,"SEVERITY_WARNING",4),n(s,"SEVERITY_ERROR",8);const a=s;function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}var l=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{name:null,value:null,type:null,definition:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.name,r=e.value,i=e.type,o=e.definition;this.name=n||null,this.value=null!=r?r:null,this.type=i||null,this.definition=o||null},e=[{key:"isVariable",get:function(){return!1}},{key:"getErrors",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return this.validateDefinitionType(e,r),this.validateType(e,r),this.validateRuleMinMax(e,r),this.validateRuleValues(e,r),this.validateRuleRegex(e,r),this.validateRequiredAttributes(e,r),n&&"Object"===(null===(t=this.definition)||void 0===t?void 0:t.type)&&Array.isArray(this.value)&&this.value.forEach((function(t){return t.getErrors(e,!0,r)})),e}},{key:"validateDefinitionType",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return null===this.definition?t:"Link"===this.definition.type&&"Array"!==this.type?(t.push(new a({componentId:e,severity:a.SEVERITY_ERROR,message:"parser.error.invalidLinkType",attribute:this.name})),t):"Reference"===this.definition.type&&"String"!==this.type?(t.push(new a({componentId:e,severity:a.SEVERITY_ERROR,message:"parser.error.invalidReferenceType",attribute:this.name})),t):("Reference"!==this.definition.type&&"Link"!==this.definition.type&&this.definition.type!==this.type&&t.push(new a({componentId:e,severity:a.SEVERITY_ERROR,message:"parser.error.not".concat(this.definition.type),attribute:this.name})),t)}},{key:"validateType",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return null===this.value?t:"Boolean"===this.type?("boolean"!=typeof this.value&&t.push(new a({componentId:e,severity:a.SEVERITY_ERROR,message:"parser.error.notBoolean",attribute:this.name})),t):"String"===this.type?("string"!=typeof this.value&&t.push(new a({componentId:e,severity:a.SEVERITY_ERROR,message:"parser.error.notString",attribute:this.name})),t):"Number"===this.type?("number"!=typeof this.value&&t.push(new a({componentId:e,severity:a.SEVERITY_ERROR,message:"parser.error.notNumber",attribute:this.name})),t):(Array.isArray(this.value)||t.push(new a({componentId:e,severity:a.SEVERITY_ERROR,message:"parser.error.not".concat(this.type),attribute:this.name})),t)}},{key:"validateRuleMinMax",value:function(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("Boolean"===this.type||"Object"===this.type||null===(t=this.definition)||void 0===t||!t.rules)return n;var i="number"==typeof this.value?this.value:(null===(e=this.value)||void 0===e?void 0:e.length)||0;return null!==this.definition.rules.min&&ithis.definition.rules.max&&n.push(new a({componentId:r,severity:a.SEVERITY_ERROR,message:"parser.error.max".concat(this.definition.type),attribute:this.name,extraData:this.definition.rules.max})),n}},{key:"validateRuleValues",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!this.definition||0===this.definition.rules.values.length)return e;var r=Array.isArray(this.value);return(r&&this.value.some((function(e){return!t.definition.rules.values.includes(e)}))||!r&&!this.definition.rules.values.includes(this.value))&&e.push(new a({componentId:n,severity:a.SEVERITY_ERROR,message:"parser.error.invalidValue",attribute:this.name,extraData:this.definition.rules.values.join(", ")})),e}},{key:"validateRuleRegex",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return null!==(t=this.definition)&&void 0!==t&&t.rules.regex&&null!==this.value?(new RegExp(this.definition.rules.regex).test(this.value)||e.push(new a({componentId:n,severity:a.SEVERITY_ERROR,message:this.definition.rules.regexMessage||"parser.error.regex",attribute:this.name})),e):e}},{key:"validateRequiredAttributes",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.definition&&"Object"===this.definition.type?(this.definition.definedAttributes.forEach((function(r){var i=t.value.find((function(t){return t.name===r.name}));!r.required||i&&null!==i.value||e.push(new a({componentId:n,severity:a.SEVERITY_ERROR,message:"parser.error.required",attribute:r.name}))})),e):e}}],e&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{path:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.path;this.path=null!=n?n:null},(e=[{key:"fileName",get:function(){return this.path?this.path.replace(/^.*[\\/]/,""):null}}])&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{x:null,y:null,width:null,height:null,hide:!1};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.x,r=e.y,i=e.width,o=e.height,s=e.hide;this.x=n||null,this.y=r||null,this.width=i||null,this.height=o||null,this.hide=s||!1}));const g=y;function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function b(t){var e=function(t){if("object"!=v(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==v(e)?e:e+""}function _(t,e,n){return e=x(e),function(t,e){if(e&&("object"==v(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,w()?Reflect.construct(e,n||[],x(t).constructor):e.apply(t,n))}function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(w=function(){return!!t})()}function x(t){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},x(t)}function k(t,e){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},k(t,e)}var T=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:null,externalId:null,name:null,definition:null,drawOption:null,attributes:[]};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=_(this,e,[n]);var r=n.id,i=n.externalId,o=n.name,s=n.definition,a=n.drawOption,c=n.attributes;return t.__class="Component",t.id=r||null,t.externalId=i||t.id,t.name=o||null,t.definition=s||null,t.drawOption=a||new g,t.attributes=c||[],t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&k(t,e)}(e,t),n=e,r=[{key:"setExternalId",value:function(t){this.externalId=t}},{key:"getConfigurationKey",value:function(){return this.id}},{key:"setReferenceAttribute",value:function(t){var e=this.definition.definedAttributes.find((function(e){return e.containerRef===t.definition.type}));if(e){var n=this.attributes.filter((function(t){var n=t.definition;return(null==n?void 0:n.name)===e.name}));n.length>0?n.forEach((function(e){e.value=t.id})):this.attributes.push(this.createAttribute({name:e.name,value:t.id,type:"String",definition:e}))}}},{key:"__createNestedAttributes",value:function(t){var e=this,n=this.attributes;return t.slice().reverse().forEach((function(t){var r=n.find((function(e){return e.definition.name===t.name}));r||(r=e.createAttribute({name:t.name,definition:t,type:"Object",value:[]}),n.push(r)),n=r.value})),n}},{key:"createAttribute",value:function(t){return new h(t)}},{key:"removeAllReferenceAttributes",value:function(t){this.attributes=t?this.attributes.filter((function(e){return!("Reference"===e.definition.type&&e.definition.containerRef===t.definition.type&&e.value===t.id)})):this.attributes.filter((function(t){return"Reference"!==t.definition.type}))}},{key:"setLinkAttribute",value:function(t){var e=[],n=this.__getLinkAttribute(e,this.definition.definedAttributes,t),r=this.__createNestedAttributes(e),i=r.find((function(t){return t.definition.name===n.name}));i||(i=this.createAttribute({name:n.name,definition:n,type:"Array",value:[]}),r.push(i)),i.value.includes(t.target)||i.value.push(t.target)}},{key:"__getLinkAttribute",value:function(t,e,n){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null;this.__removeLinkAttribute(this.attributes,t,e)}},{key:"__removeLinkAttribute",value:function(t,e,n){var r=this;t.forEach((function(t){var i;if("Object"===t.type&&r.__removeLinkAttribute(t.value,e,n),"Link"===(null===(i=t.definition)||void 0===i?void 0:i.type)&&(!n||t.name===n)){var o=t.value.findIndex((function(t){return t===e}));o>=0&&t.value.splice(o,1)}}))}},{key:"getAttributeByName",value:function(t){return this.__getAttributeByName(this.attributes,t)}},{key:"__getAttributeByName",value:function(t,e){for(var n=0;n3?i-3:0),s=3;s2?n-2:0),i=2;i0&&void 0!==arguments[0]?arguments[0]:[];return this.validateDefinition(e),this.validateRequiredAttributes(e),this.attributes.forEach((function(n){return n.getErrors(e,!0,t.id)})),e}},{key:"validateRequiredAttributes",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.definition?(this.definition.definedAttributes.forEach((function(n){var r=t.attributes.find((function(t){return t.name===n.name}));!n.required||r&&null!==r.value||e.push(new a({componentId:t.id,severity:a.SEVERITY_ERROR,message:"parser.error.required",attribute:n.name}))})),e):e}},{key:"validateDefinition",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null===this.definition&&t.push(new a({componentId:this.id,severity:a.SEVERITY_WARNING,message:"parser.warning.noComponentDefinition"})),t}},{key:"getDefinedAttributesByType",value:function(t){var e=[];return this.__setDefinedAttributesByType(e,this.definition.definedAttributes,t),e}},{key:"__setDefinedAttributesByType",value:function(t,e,n){var r=this;e.forEach((function(e){"Object"===e.type&&r.__setDefinedAttributesByType(t,e.definedAttributes,n),e.type===n&&t.push(e)}))}},{key:"canContain",value:function(t){return this.definition.isContainer&&this.definition.childrenTypes.includes(t)}}],r&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{type:null,icon:null,model:null,displayName:null,description:null,categories:[],tags:[],url:null,parentTypes:[],childrenTypes:[],definedAttributes:[],isContainer:!1,displayType:null,workflowDirection:null,linkModel:null,defaultWidth:0,defaultHeight:0,minWidth:0,minHeight:0,reservedWidth:0,reservedHeight:0,margin:10,gap:30};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.type,r=e.icon,i=e.model,o=e.displayName,s=e.description,a=e.categories,c=e.tags,u=e.url,l=e.parentTypes,h=e.childrenTypes,f=e.definedAttributes,p=e.isContainer,d=e.displayType,m=e.workflowDirection,y=e.linkModel,g=e.defaultWidth,v=e.defaultHeight,b=e.minWidth,_=e.minHeight,w=e.reservedWidth,x=e.reservedHeight,k=e.margin,T=e.gap;this.type=n||null,this.icon=r||null,this.model=i||null,this.displayName=o||null,this.description=s||null,this.categories=a||[],this.tags=c||[],this.url=u||null,this.parentTypes=l||[],this.childrenTypes=h||[],this.definedAttributes=f||[],this.isContainer=void 0!==p&&p,this.displayType=d||null,this.workflowDirection=m||"horizontal",this.linkModel=y||null,this.defaultWidth=g||0,this.defaultHeight=v||0,this.minWidth=b||0,this.minHeight=_||0,this.reservedWidth=w||0,this.reservedHeight=x||0,this.margin=k||10,this.gap=T||30}));const A=E;function O(t){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(t)}function N(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function C(t,e,n){return(e=L(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function L(t){var e=function(t){if("object"!=O(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==O(e)?e:e+""}var R=function(t){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{name:null,type:null,displayName:null,description:null,tags:[],url:null,linkType:null,linkRef:[],linkModel:null,containerRef:null,required:!1,definedAttributes:[],rules:{values:[],min:null,max:null,regex:null,regexMessage:null}};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.name,r=e.type,i=e.displayName,o=e.description,s=e.tags,a=e.url,c=e.linkType,u=e.linkRef,l=e.linkModel,h=e.containerRef,f=e.definedAttributes,p=e.required,d=e.rules;this.name=n||null,this.type=r||null,this.displayName=i||null,this.description=o||null,this.tags=s||[],this.url=a||null,this.linkType=c||null,this.linkRef=u||[],this.linkModel=l||null,this.containerRef=h||null,this.definedAttributes=f||[],this.required=p||!1,this.rules=function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{source:null,target:null,name:null,definition:null,isReverse:!1};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=M(this,e);var r=n.source,i=n.target,o=n.name,s=n.definition,a=n.isReverse;return t.__class="Link",t.source=r||null,t.target=i||null,t.name=o||null,t.definition=s||null,t.isReverse=!!a,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&B(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(m);const U=F;var z=function(t){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{attributeRef:null,sourceRef:null,targetRef:null,type:null,model:null,isTemporary:!1};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.attributeRef,r=e.sourceRef,i=e.targetRef,o=e.type,s=e.model,a=e.isTemporary;this.attributeRef=n||null,this.sourceRef=r||null,this.targetRef=i||null,this.type=o||null,this.model=s||null,this.isTemporary=!!a}));const V=z;function K(t){return K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},K(t)}function H(t,e,n){return e=W(e),function(t,e){if(e&&("object"==K(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,q()?Reflect.construct(e,n||[],W(t).constructor):e.apply(t,n))}function q(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(q=function(){return!!t})()}function W(t){return W=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},W(t)}function G(t,e){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},G(t,e)}var Y=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{path:null,name:null,content:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=H(this,e,[n]);var r=n.content;return t.content=r||null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&G(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(m);const $=Y;function X(t,e){return null==t||null==e?NaN:te?1:t>=e?0:NaN}function Z(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function J(t){let e,n,r;function i(t,r,i=0,o=t.length){if(i>>1;n(t[e],r)<0?i=e+1:o=e}while(iX(t(e),n),r=(e,n)=>t(e)-n):(e=t===X||t===Z?t:Q,n=t,r=t),{left:i,center:function(t,e,n=0,o=t.length){const s=i(t,e,n,o-1);return s>n&&r(t[s-1],e)>-r(t[s],e)?s-1:s},right:function(t,r,i=0,o=t.length){if(i>>1;n(t[e],r)<=0?i=e+1:o=e}while(i=0))throw new RangeError("invalid r");let n=t.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!e)return t;const r=ft(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const at=ut(ft),ct=ut((function(t){const e=ft(t);return(t,n,r,i,o)=>{e(t,n,0+(r<<=2),0+(i<<=2),o<<=2),e(t,n,r+1,i+1,o),e(t,n,r+2,i+2,o),e(t,n,r+3,i+3,o)}}));function ut(t){return function(e,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:s}=e;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((s=Math.floor(void 0!==s?s:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!s||!n&&!r)return e;const a=n&&t(n),c=r&&t(r),u=i.slice();return a&&c?(lt(a,u,i,o,s),lt(a,i,u,o,s),lt(a,u,i,o,s),ht(c,i,u,o,s),ht(c,u,i,o,s),ht(c,i,u,o,s)):a?(lt(a,i,u,o,s),lt(a,u,i,o,s),lt(a,i,u,o,s)):c&&(ht(c,i,u,o,s),ht(c,u,i,o,s),ht(c,i,u,o,s)),e}}function lt(t,e,n,r,i){for(let o=0,s=r*i;o{if(!((o-=s)>=i))return;let a=t*r[i];const c=s*t;for(let t=i,e=i+c;t{if(!((s-=a)>=o))return;let c=e*i[o];const u=a*e,l=u+a;for(let t=o,e=o+u;t=e&&++n;else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(i=+i)>=i&&++n}return n}function dt(t){return 0|t.length}function mt(t){return!(t>0)}function yt(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function gt(...t){const e="function"==typeof t[t.length-1]&&function(t){return e=>t(...e)}(t.pop()),n=(t=t.map(yt)).map(dt),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(mt))return o;for(;;){o.push(i.map(((e,n)=>t[n][e])));let s=r;for(;++i[s]===n[s];){if(0===s)return e?o.map(e):o;i[s--]=0}}}function vt(t,e){var n=0,r=0;return Float64Array.from(t,void 0===e?t=>n+=+t||0:i=>n+=+e(i,r++,t)||0)}function bt(t,e){let n,r=0,i=0,o=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(n=e-i,i+=n/++r,o+=n*(e-i));else{let s=-1;for(let a of t)null!=(a=e(a,++s,t))&&(a=+a)>=a&&(n=a-i,i+=n/++r,o+=n*(a-i))}if(r>1)return o/(r-1)}function _t(t,e){const n=bt(t,e);return n?Math.sqrt(n):n}function wt(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r=o&&(n=r=o):(n>o&&(n=o),r0){for(o=t[--i];i>0&&(e=o,n=t[--i],o=e+n,r=n-(o-e),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(n=2*r,e=o+n,n==e-o&&(o=e))}return o}}function kt(t,e){const n=new xt;if(void 0===e)for(let e of t)(e=+e)&&n.add(e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function Tt(t,e){const n=new xt;let r=-1;return Float64Array.from(t,void 0===e?t=>n.add(+t||0):i=>n.add(+e(i,++r,t)||0))}class St extends Map{constructor(t,e=Ct){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(At(this,t))}has(t){return super.has(At(this,t))}set(t,e){return super.set(Ot(this,t),e)}delete(t){return super.delete(Nt(this,t))}}class Et extends Set{constructor(t,e=Ct){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const e of t)this.add(e)}has(t){return super.has(At(this,t))}add(t){return super.add(Ot(this,t))}delete(t){return super.delete(Nt(this,t))}}function At({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Ot({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Nt({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Ct(t){return null!==t&&"object"==typeof t?t.valueOf():t}function Lt(t){return t}function Rt(t,...e){return Vt(t,Lt,Lt,e)}function Pt(t,...e){return Vt(t,Array.from,Lt,e)}function It(t,e){for(let n=1,r=e.length;nt.pop().map((([e,n])=>[...t,e,n]))));return t}function Mt(t,...e){return It(Pt(t,...e),e)}function Dt(t,e,...n){return It(Bt(t,e,...n),n)}function jt(t,e,...n){return Vt(t,Lt,e,n)}function Bt(t,e,...n){return Vt(t,Array.from,e,n)}function Ft(t,...e){return Vt(t,Lt,zt,e)}function Ut(t,...e){return Vt(t,Array.from,zt,e)}function zt(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function Vt(t,e,n,r){return function t(i,o){if(o>=r.length)return n(i);const s=new St,a=r[o++];let c=-1;for(const t of i){const e=a(t,++c,i),n=s.get(e);n?n.push(t):s.set(e,[t])}for(const[e,n]of s)s.set(e,t(n,o));return e(s)}(t,0)}function Kt(t,e){return Array.from(e,(e=>t[e]))}function Ht(t,...e){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&2!==n.length||e.length>1){const r=Uint32Array.from(t,((t,e)=>e));return e.length>1?(e=e.map((e=>t.map(e))),r.sort(((t,n)=>{for(const r of e){const e=Wt(r[t],r[n]);if(e)return e}}))):(n=t.map(n),r.sort(((t,e)=>Wt(n[t],n[e])))),Kt(t,r)}return t.sort(qt(n))}function qt(t=X){if(t===X)return Wt;if("function"!=typeof t)throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}function Wt(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(te?1:0)}function Gt(t,e,n){return(2!==e.length?Ht(jt(t,e,n),(([t,e],[n,r])=>X(e,r)||X(t,n))):Ht(Rt(t,n),(([t,n],[r,i])=>e(n,i)||X(t,r)))).map((([t])=>t))}var Yt=Array.prototype,$t=Yt.slice;function Xt(t){return()=>t}Yt.map;const Zt=Math.sqrt(50),Jt=Math.sqrt(10),Qt=Math.sqrt(2);function te(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=Zt?10:o>=Jt?5:o>=Qt?2:1;let a,c,u;return i<0?(u=Math.pow(10,-i)/s,a=Math.round(t*u),c=Math.round(e*u),a/ue&&--c,u=-u):(u=Math.pow(10,i)*s,a=Math.round(t/u),c=Math.round(e/u),a*ue&&--c),c0))return[];if((t=+t)==(e=+e))return[t];const r=e=i))return[];const a=o-i+1,c=new Array(a);if(r)if(s<0)for(let t=0;t0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function oe(t){return Math.max(1,Math.ceil(Math.log(pt(t))/Math.LN2)+1)}function se(){var t=Lt,e=wt,n=oe;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,s,a=r.length,c=new Array(a);for(i=0;i=h)if(t>=h&&e===wt){const t=ne(l,h,n);isFinite(t)&&(t>0?h=(Math.floor(h/t)+1)*t:t<0&&(h=(Math.ceil(h*-t)+1)/-t))}else f.pop()}for(var p=f.length,d=0,m=p;f[d]<=l;)++d;for(;f[m-1]>h;)--m;(d||m0?f[i-1]:l,y.x1=i0)for(i=0;i=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n=i)&&(n=i)}return n}function ce(t,e){let n,r=-1,i=-1;if(void 0===e)for(const e of t)++i,null!=e&&(n=e)&&(n=e,r=i);else for(let o of t)null!=(o=e(o,++i,t))&&(n=o)&&(n=o,r=i);return r}function ue(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function le(t,e){let n,r=-1,i=-1;if(void 0===e)for(const e of t)++i,null!=e&&(n>e||void 0===n&&e>=e)&&(n=e,r=i);else for(let o of t)null!=(o=e(o,++i,t))&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);return r}function he(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=void 0===i?Wt:qt(i);r>n;){if(r-n>600){const o=r-n+1,s=e-n+1,a=Math.log(o),c=.5*Math.exp(2*a/3),u=.5*Math.sqrt(a*c*(o-c)/o)*(s-o/2<0?-1:1);he(t,e,Math.max(n,Math.floor(e-s*c/o+u)),Math.min(r,Math.floor(e+(o-s)*c/o+u)),i)}const o=t[e];let s=n,a=r;for(fe(t,n,e),i(t[r],o)>0&&fe(t,n,r);s0;)--a}0===i(t[n],o)?fe(t,n,a):(++a,fe(t,a,r)),a<=e&&(n=a+1),e<=a&&(r=a-1)}return t}function fe(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function pe(t,e=X){let n,r=!1;if(1===e.length){let i;for(const o of t){const t=e(o);(r?X(t,i)>0:0===X(t,t))&&(n=o,i=t,r=!0)}}else for(const i of t)(r?e(i,n)>0:0===e(i,i))&&(n=i,r=!0);return n}function de(t,e,n){if(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}(t,n)),(r=t.length)&&!isNaN(e=+e)){if(e<=0||r<2)return ue(t);if(e>=1)return ae(t);var r,i=(r-1)*e,o=Math.floor(i),s=ae(he(t,o).subarray(0,o+1));return s+(ue(t.subarray(o+1))-s)*(i-o)}}function me(t,e,n=tt){if((r=t.length)&&!isNaN(e=+e)){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),s=+n(t[o],o,t);return s+(+n(t[o+1],o+1,t)-s)*(i-o)}}function ye(t,e,n=tt){if(!isNaN(e=+e)){if(r=Float64Array.from(t,((e,r)=>tt(n(t[r],r,t)))),e<=0)return le(r);if(e>=1)return ce(r);var r,i=Uint32Array.from(t,((t,e)=>e)),o=r.length-1,s=Math.floor(o*e);return he(i,s,0,o,((t,e)=>Wt(r[t],r[e]))),(s=pe(i.subarray(0,s+1),(t=>r[t])))>=0?s:-1}}function ge(t,e,n){const r=pt(t),i=de(t,.75)-de(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function ve(t,e,n){const r=pt(t),i=_t(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function be(t,e){let n=0,r=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(++n,r+=e);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function _e(t,e){return de(t,.5,e)}function we(t,e){return ye(t,.5,e)}function xe(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function ke(t,e){const n=new St;if(void 0===e)for(let e of t)null!=e&&e>=e&&n.set(e,(n.get(e)||0)+1);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&i>=i&&n.set(i,(n.get(i)||0)+1)}let r,i=0;for(const[t,e]of n)e>i&&(i=e,r=t);return r}function Te(t,e=Se){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function Se(t,e){return[t,e]}function Ee(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++re(n[t],n[r]);let o,s;return t=Uint32Array.from(n,((t,e)=>e)),t.sort(e===X?(t,e)=>Wt(n[t],n[e]):qt(i)),t.forEach(((t,e)=>{const n=i(t,void 0===o?t:o);n>=0?((void 0===o||n>0)&&(o=t,s=e),r[t]=s):r[t]=NaN})),r}function Oe(t,e=X){let n,r=!1;if(1===e.length){let i;for(const o of t){const t=e(o);(r?X(t,i)<0:0===X(t,t))&&(n=o,i=t,r=!0)}}else for(const i of t)(r?e(i,n)<0:0===e(i,i))&&(n=i,r=!0);return n}function Ne(t,e=X){if(1===e.length)return le(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?0===e(o,o):e(o,n)<0)&&(n=o,r=i);return r}function Ce(t,e=X){if(1===e.length)return ce(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?0===e(o,o):e(o,n)>0)&&(n=o,r=i);return r}function Le(t,e){const n=Ne(t,e);return n<0?void 0:n}const Re=Pe(Math.random);function Pe(t){return function(e,n=0,r=e.length){let i=r-(n=+n);for(;i;){const r=t()*i--|0,o=e[i+n];e[i+n]=e[r+n],e[r+n]=o}return e}}function Ie(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function Me(t){if(!(i=t.length))return[];for(var e=-1,n=ue(t,De),r=new Array(n);++ee(n,r,t)))}function Ve(t,e,n){if("function"!=typeof e)throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,s=-1;if(arguments.length<3){if(({done:i,value:n}=r.next()),i)return;++s}for(;({done:i,value:o}=r.next()),!i;)n=e(n,o,++s,t);return n}function Ke(t){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(t).reverse()}function He(t,...e){t=new Et(t);for(const n of e)for(const e of n)t.delete(e);return t}function qe(t,e){const n=e[Symbol.iterator](),r=new Et;for(const e of t){if(r.has(e))return!1;let t,i;for(;({value:t,done:i}=n.next())&&!i;){if(Object.is(e,t))return!1;r.add(t)}}return!0}function We(t,...e){t=new Et(t),e=e.map(Ge);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function Ge(t){return t instanceof Et?t:new Et(t)}function Ye(t,e){const n=t[Symbol.iterator](),r=new Set;for(const t of e){const e=$e(t);if(r.has(e))continue;let i,o;for(;({value:i,done:o}=n.next());){if(o)return!1;const t=$e(i);if(r.add(t),Object.is(e,t))break}}return!0}function $e(t){return null!==t&&"object"==typeof t?t.valueOf():t}function Xe(t,e){return Ye(e,t)}function Ze(...t){const e=new Et;for(const n of t)for(const t of n)e.add(t);return e}function Je(t){return t}var Qe=1,tn=2,en=3,nn=4,rn=1e-6;function on(t){return"translate("+t+",0)"}function sn(t){return"translate(0,"+t+")"}function an(t){return e=>+t(e)}function cn(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function un(){return!this.__axis}function ln(t,e){var n=[],r=null,i=null,o=6,s=6,a=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=t===Qe||t===nn?-1:1,l=t===nn||t===tn?"x":"y",h=t===Qe||t===en?on:sn;function f(f){var p=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):Je:i,m=Math.max(o,0)+a,y=e.range(),g=+y[0]+c,v=+y[y.length-1]+c,b=(e.bandwidth?cn:an)(e.copy(),c),_=f.selection?f.selection():f,w=_.selectAll(".domain").data([null]),x=_.selectAll(".tick").data(p,e).order(),k=x.exit(),T=x.enter().append("g").attr("class","tick"),S=x.select("line"),E=x.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(T),S=S.merge(T.append("line").attr("stroke","currentColor").attr(l+"2",u*o)),E=E.merge(T.append("text").attr("fill","currentColor").attr(l,u*m).attr("dy",t===Qe?"0em":t===en?"0.71em":"0.32em")),f!==_&&(w=w.transition(f),x=x.transition(f),S=S.transition(f),E=E.transition(f),k=k.transition(f).attr("opacity",rn).attr("transform",(function(t){return isFinite(t=b(t))?h(t+c):this.getAttribute("transform")})),T.attr("opacity",rn).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:b(t))+c)}))),k.remove(),w.attr("d",t===nn||t===tn?s?"M"+u*s+","+g+"H"+c+"V"+v+"H"+u*s:"M"+c+","+g+"V"+v:s?"M"+g+","+u*s+"V"+c+"H"+v+"V"+u*s:"M"+g+","+c+"H"+v),x.attr("opacity",1).attr("transform",(function(t){return h(b(t)+c)})),S.attr(l+"2",u*o),E.attr(l,u*m).text(d),_.filter(un).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===tn?"start":t===nn?"end":"middle"),_.each((function(){this.__axis=b}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(o=s=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(s=+t,f):s},f.tickPadding=function(t){return arguments.length?(a=+t,f):a},f.offset=function(t){return arguments.length?(c=+t,f):c},f}function hn(t){return ln(Qe,t)}function fn(t){return ln(tn,t)}function pn(t){return ln(en,t)}function dn(t){return ln(nn,t)}var mn={value:()=>{}};function yn(){for(var t,e=0,n=arguments.length,r={};e=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),s=-1,a=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++s0)for(var n,r,i=new Array(n),o=0;oe?1:t>=e?0:NaN}Pn.prototype={constructor:Pn,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Fn="http://www.w3.org/1999/xhtml";const Un={svg:"http://www.w3.org/2000/svg",xhtml:Fn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function zn(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Un.hasOwnProperty(e)?{space:Un[e],local:t}:t}function Vn(t){return function(){this.removeAttribute(t)}}function Kn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Hn(t,e){return function(){this.setAttribute(t,e)}}function qn(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Wn(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Gn(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Yn(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function $n(t){return function(){this.style.removeProperty(t)}}function Xn(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Zn(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Jn(t,e){return t.style.getPropertyValue(e)||Yn(t).getComputedStyle(t,null).getPropertyValue(e)}function Qn(t){return function(){delete this[t]}}function tr(t,e){return function(){this[t]=e}}function er(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function nr(t){return t.trim().split(/^|\s+/)}function rr(t){return t.classList||new ir(t)}function ir(t){this._node=t,this._names=nr(t.getAttribute("class")||"")}function or(t,e){for(var n=rr(t),r=-1,i=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Cr=[null];function Lr(t,e){this._groups=t,this._parents=e}function Rr(){return new Lr([[document.documentElement]],Cr)}Lr.prototype=Rr.prototype={constructor:Lr,select:function(t){"function"!=typeof t&&(t=xn(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=w&&(w=_+1);!(b=g[w])&&++w=0;)(r=i[o])&&(s&&4^r.compareDocumentPosition(s)&&s.parentNode.insertBefore(r,s),s=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Bn);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==e?$n:"function"==typeof e?Zn:Xn)(t,e,null==n?"":n)):Jn(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Qn:"function"==typeof e?er:tr)(t,e)):this.node()[t]},classed:function(t,e){var n=nr(t+"");if(arguments.length<2){for(var r=rr(this.node()),i=-1,o=n.length;++i=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),s=o.length;if(!(arguments.length<2)){for(a=e?Er:Sr,r=0;r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ai(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ai(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Xr.exec(t))?new li(e[1],e[2],e[3],1):(e=Zr.exec(t))?new li(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Jr.exec(t))?ai(e[1],e[2],e[3],e[4]):(e=Qr.exec(t))?ai(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ti.exec(t))?yi(e[1],e[2]/100,e[3]/100,1):(e=ei.exec(t))?yi(e[1],e[2]/100,e[3]/100,e[4]):ni.hasOwnProperty(t)?si(ni[t]):"transparent"===t?new li(NaN,NaN,NaN,0):null}function si(t){return new li(t>>16&255,t>>8&255,255&t,1)}function ai(t,e,n,r){return r<=0&&(t=e=n=NaN),new li(t,e,n,r)}function ci(t){return t instanceof Kr||(t=oi(t)),t?new li((t=t.rgb()).r,t.g,t.b,t.opacity):new li}function ui(t,e,n,r){return 1===arguments.length?ci(t):new li(t,e,n,null==r?1:r)}function li(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function hi(){return`#${mi(this.r)}${mi(this.g)}${mi(this.b)}`}function fi(){const t=pi(this.opacity);return`${1===t?"rgb(":"rgba("}${di(this.r)}, ${di(this.g)}, ${di(this.b)}${1===t?")":`, ${t})`}`}function pi(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function di(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function mi(t){return((t=di(t))<16?"0":"")+t.toString(16)}function yi(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new bi(t,e,n,r)}function gi(t){if(t instanceof bi)return new bi(t.h,t.s,t.l,t.opacity);if(t instanceof Kr||(t=oi(t)),!t)return new bi;if(t instanceof bi)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,c=(o+i)/2;return a?(s=e===o?(n-r)/a+6*(n0&&c<1?0:s,new bi(s,a,c,t.opacity)}function vi(t,e,n,r){return 1===arguments.length?gi(t):new bi(t,e,n,null==r?1:r)}function bi(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function _i(t){return(t=(t||0)%360)<0?t+360:t}function wi(t){return Math.max(0,Math.min(1,t||0))}function xi(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function ki(t,e,n,r,i){var o=t*t,s=o*t;return((1-3*t+3*o-s)*e+(4-6*o+3*s)*n+(1+3*t+3*o-3*s)*r+s*i)/6}function Ti(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],s=r>0?t[r-1]:2*i-o,a=r=240?t-240:t+120,i,r),xi(t,i,r),xi(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new bi(_i(this.h),wi(this.s),wi(this.l),pi(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=pi(this.opacity);return`${1===t?"hsl(":"hsla("}${_i(this.h)}, ${100*wi(this.s)}%, ${100*wi(this.l)}%${1===t?")":`, ${t})`}`}}));const Ei=t=>()=>t;function Ai(t,e){return function(n){return t+n*e}}function Oi(t,e){var n=e-t;return n?Ai(t,n>180||n<-180?n-360*Math.round(n/360):n):Ei(isNaN(t)?e:t)}function Ni(t,e){var n=e-t;return n?Ai(t,n):Ei(isNaN(t)?e:t)}const Ci=function t(e){var n=function(t){return 1==(t=+t)?Ni:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ei(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=ui(t)).r,(e=ui(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),s=Ni(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=s(e),t+""}}return r.gamma=t,r}(1);function Li(t){return function(e){var n,r,i=e.length,o=new Array(i),s=new Array(i),a=new Array(i);for(n=0;no&&(i=e.slice(o,i),a[s]?a[s]+=i:a[++s]=i),(n=n[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,c.push({i:s,x:Fi(n,r)})),o=Vi.lastIndex;return o=0&&e._call.call(void 0,t),e=e._next;--$i}function uo(){to=(Qi=no.now())+eo,$i=Xi=0;try{co()}finally{$i=0,function(){for(var t,e,n=Gi,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Gi=e);Yi=t,ho(r)}(),to=0}}function lo(){var t=no.now(),e=t-Qi;e>Ji&&(eo-=e,Qi=t)}function ho(t){$i||(Xi&&(Xi=clearTimeout(Xi)),t-to>24?(t<1/0&&(Xi=setTimeout(uo,t-no.now()-eo)),Zi&&(Zi=clearInterval(Zi))):(Zi||(Qi=no.now(),Zi=setInterval(lo,Ji)),$i=1,ro(uo)))}function fo(t,e,n){var r=new so;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}so.prototype=ao.prototype={constructor:so,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?io():+n)+(null==e?0:+e),this._next||Yi===this||(Yi?Yi._next=this:Gi=this,Yi=this),this._call=t,this._time=n,ho()},stop:function(){this._call&&(this._call=null,this._time=1/0,ho())}};var po=_n("start","end","cancel","interrupt"),mo=[],yo=0,go=1,vo=2,bo=3,_o=5,wo=6;function xo(t,e,n,r,i,o){var s=t.__transition;if(s){if(n in s)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(c){var u,l,h,f;if(n.state!==go)return a();for(u in i)if((f=i[u]).name===n.name){if(f.state===bo)return fo(o);4===f.state?(f.state=wo,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+uyo)throw new Error("too late; already scheduled");return n}function To(t,e){var n=So(t,e);if(n.state>bo)throw new Error("too late; already running");return n}function So(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Eo(t,e){var n,r,i,o=t.__transition,s=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>vo&&n.state<_o,n.state=wo,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):s=!1;s&&delete t.__transition}}var Ao,Oo=180/Math.PI,No={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Co(t,e,n,r,i,o){var s,a,c;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,c/=a),t*r180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Fi(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,s.rotate,a,c),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Fi(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,s.skewX,a,c),function(t,e,n,r,o,s){if(t!==n||e!==r){var a=o.push(i(o)+"scale(",null,",",null,")");s.push({i:a-4,x:Fi(t,n)},{i:a-2,x:Fi(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,a,c),o=s=null,function(t){for(var e,n=-1,r=c.length;++n=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?ko:To;return function(){var s=o(this,t),a=s.on;a!==r&&(i=(r=a).copy()).on(e,n),s.on=i}}(n,t,e))},attr:function(t,e){var n=zn(t),r="transform"===n?Po:jo;return this.attrTween(t,"function"==typeof e?(n.local?Ko:Vo)(n,r,Do(this,"attr."+t,e)):null==e?(n.local?Fo:Bo)(n):(n.local?zo:Uo)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=zn(t);return this.tween(n,(r.local?Ho:qo)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Ro:jo;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=Jn(this,t),s=(this.style.removeProperty(t),Jn(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}(t,r)).on("end.style."+t,Zo(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var s=Jn(this,t),a=n(this),c=a+"";return null==a&&(this.style.removeProperty(t),c=a=Jn(this,t)),s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,a))}}(t,r,Do(this,"style."+t,e))).each(function(t,e){var n,r,i,o,s="style."+e,a="end."+s;return function(){var c=To(this,t),u=c.on,l=null==c.value[s]?o||(o=Zo(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(a,i=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var s=Jn(this,t);return s===o?null:s===r?i:i=e(r=s,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,o,n)),r}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Do(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=So(this.node(),n).tween,o=0,s=i.length;ogo&&n.name===e)return new Qo([[t]],cs,e,+r);return null}const ls=t=>()=>t;function hs(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function fs(t){t.preventDefault(),t.stopImmediatePropagation()}var ps={name:"drag"},ds={name:"space"},ms={name:"handle"},ys={name:"center"};const{abs:gs,max:vs,min:bs}=Math;function _s(t){return[+t[0],+t[1]]}function ws(t){return[_s(t[0]),_s(t[1])]}var xs={name:"x",handles:["w","e"].map(Cs),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ks={name:"y",handles:["n","s"].map(Cs),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Ts={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Cs),input:function(t){return null==t?null:ws(t)},output:function(t){return t}},Ss={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Es={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},As={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Os={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Ns={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Cs(t){return{type:t}}function Ls(t){return!t.ctrlKey&&!t.button}function Rs(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Ps(){return navigator.maxTouchPoints||"ontouchstart"in this}function Is(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Ms(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function Ds(){return Fs(xs)}function js(){return Fs(ks)}function Bs(){return Fs(Ts)}function Fs(t){var e,n=Rs,r=Ls,i=Ps,o=!0,s=_n("start","brush","end"),a=6;function c(e){var n=e.property("__brush",m).selectAll(".overlay").data([Cs("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ss.overlay).merge(n).each((function(){var t=Is(this).extent;Ir(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([Cs("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Ss.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return Ss[t.type]})),e.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(i).on("touchstart.brush",f).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function u(){var t=Ir(this),e=Is(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-a/2:e[0][0]-a/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-a/2:e[0][1]-a/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+a:a})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+a:a}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new h(t,e,n):r}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function f(n){if((!e||n.touches)&&r.apply(this,arguments)){var i,s,a,c,h,f,p,d,m,y,g,v=this,b=n.target.__data__.type,_="selection"===(o&&n.metaKey?b="overlay":b)?ps:o&&n.altKey?ys:ms,w=t===ks?null:Os[b],x=t===xs?null:Ns[b],k=Is(v),T=k.extent,S=k.selection,E=T[0][0],A=T[0][1],O=T[1][0],N=T[1][1],C=0,L=0,R=w&&x&&o&&n.shiftKey,P=Array.from(n.touches||[n],(t=>{const e=t.identifier;return(t=Wi(t,v)).point0=t.slice(),t.identifier=e,t}));Eo(v);var I=l(v,arguments,!0).beforestart();if("overlay"===b){S&&(m=!0);const e=[P[0],P[1]||P[0]];k.selection=S=[[i=t===ks?E:bs(e[0][0],e[1][0]),a=t===xs?A:bs(e[0][1],e[1][1])],[h=t===ks?O:vs(e[0][0],e[1][0]),p=t===xs?N:vs(e[0][1],e[1][1])]],P.length>1&&F(n)}else i=S[0][0],a=S[0][1],h=S[1][0],p=S[1][1];s=i,c=a,f=h,d=p;var M=Ir(v).attr("pointer-events","none"),D=M.selectAll(".overlay").attr("cursor",Ss[b]);if(n.touches)I.moved=B,I.ended=U;else{var j=Ir(n.view).on("mousemove.brush",B,!0).on("mouseup.brush",U,!0);o&&j.on("keydown.brush",(function(t){switch(t.keyCode){case 16:R=w&&x;break;case 18:_===ms&&(w&&(h=f-C*w,i=s+C*w),x&&(p=d-L*x,a=c+L*x),_=ys,F(t));break;case 32:_!==ms&&_!==ys||(w<0?h=f-C:w>0&&(i=s-C),x<0?p=d-L:x>0&&(a=c-L),_=ds,D.attr("cursor",Ss.selection),F(t));break;default:return}fs(t)}),!0).on("keyup.brush",(function(t){switch(t.keyCode){case 16:R&&(y=g=R=!1,F(t));break;case 18:_===ys&&(w<0?h=f:w>0&&(i=s),x<0?p=d:x>0&&(a=c),_=ms,F(t));break;case 32:_===ds&&(t.altKey?(w&&(h=f-C*w,i=s+C*w),x&&(p=d-L*x,a=c+L*x),_=ys):(w<0?h=f:w>0&&(i=s),x<0?p=d:x>0&&(a=c),_=ms),D.attr("cursor",Ss[b]),F(t));break;default:return}fs(t)}),!0),Fr(n.view)}u.call(v),I.start(n,_.name)}function B(t){for(const e of t.changedTouches||[t])for(const t of P)t.identifier===e.identifier&&(t.cur=Wi(e,v));if(R&&!y&&!g&&1===P.length){const t=P[0];gs(t.cur[0]-t[0])>gs(t.cur[1]-t[1])?g=!0:y=!0}for(const t of P)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);m=!0,fs(t),F(t)}function F(t){const e=P[0],n=e.point0;var r;switch(C=e[0]-n[0],L=e[1]-n[1],_){case ds:case ps:w&&(C=vs(E-i,bs(O-h,C)),s=i+C,f=h+C),x&&(L=vs(A-a,bs(N-p,L)),c=a+L,d=p+L);break;case ms:P[1]?(w&&(s=vs(E,bs(O,P[0][0])),f=vs(E,bs(O,P[1][0])),w=1),x&&(c=vs(A,bs(N,P[0][1])),d=vs(A,bs(N,P[1][1])),x=1)):(w<0?(C=vs(E-i,bs(O-i,C)),s=i+C,f=h):w>0&&(C=vs(E-h,bs(O-h,C)),s=i,f=h+C),x<0?(L=vs(A-a,bs(N-a,L)),c=a+L,d=p):x>0&&(L=vs(A-p,bs(N-p,L)),c=a,d=p+L));break;case ys:w&&(s=vs(E,bs(O,i-C*w)),f=vs(E,bs(O,h+C*w))),x&&(c=vs(A,bs(N,a-L*x)),d=vs(A,bs(N,p+L*x)))}ft+n))}function $s(){return Js(!1,!1)}function Xs(){return Js(!1,!0)}function Zs(){return Js(!0,!1)}function Js(t,e){var n=0,r=null,i=null,o=null;function s(s){var a,c=s.length,u=new Array(c),l=Ys(0,c),h=new Array(c*c),f=new Array(c),p=0;s=Float64Array.from({length:c*c},e?(t,e)=>s[e%c][e/c|0]:(t,e)=>s[e/c|0][e%c]);for(let e=0;er(u[t],u[e])));for(const n of l){const r=e;if(t){const t=Ys(1+~c,c).filter((t=>t<0?s[~t*c+n]:s[n*c+t]));i&&t.sort(((t,e)=>i(t<0?-s[~t*c+n]:s[n*c+t],e<0?-s[~e*c+n]:s[n*c+e])));for(const r of t)r<0?(h[~r*c+n]||(h[~r*c+n]={source:null,target:null})).target={index:n,startAngle:e,endAngle:e+=s[~r*c+n]*p,value:s[~r*c+n]}:(h[n*c+r]||(h[n*c+r]={source:null,target:null})).source={index:n,startAngle:e,endAngle:e+=s[n*c+r]*p,value:s[n*c+r]};f[n]={index:n,startAngle:r,endAngle:e,value:u[n]}}else{const t=Ys(0,c).filter((t=>s[n*c+t]||s[t*c+n]));i&&t.sort(((t,e)=>i(s[n*c+t],s[n*c+e])));for(const r of t){let t;if(n=0))throw new Error(`invalid digits: ${t}`);if(e>15)return ra;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;eea)if(Math.abs(l*a-c*u)>ea&&i){let f=n-o,p=r-s,d=a*a+c*c,m=f*f+p*p,y=Math.sqrt(d),g=Math.sqrt(h),v=i*Math.tan((Qs-Math.acos((d+h-m)/(2*y*g)))/2),b=v/g,_=v/y;Math.abs(b-1)>ea&&this._append`L${t+b*u},${e+b*l}`,this._append`A${i},${i},0,0,${+(l*f>u*p)},${this._x1=t+_*a},${this._y1=e+_*c}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,n,r,i,o){if(t=+t,e=+e,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(r),a=n*Math.sin(r),c=t+s,u=e+a,l=1^o,h=o?r-i:i-r;null===this._x1?this._append`M${c},${u}`:(Math.abs(this._x1-c)>ea||Math.abs(this._y1-u)>ea)&&this._append`L${c},${u}`,n&&(h<0&&(h=h%ta+ta),h>na?this._append`A${n},${n},0,1,${l},${t-s},${e-a}A${n},${n},0,1,${l},${this._x1=c},${this._y1=u}`:h>ea&&this._append`A${n},${n},0,${+(h>=Qs)},${l},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function oa(){return new ia}function sa(t=3){return new ia(+t)}oa.prototype=ia.prototype;var aa=Array.prototype.slice;function ca(t){return function(){return t}}function ua(t){return t.source}function la(t){return t.target}function ha(t){return t.radius}function fa(t){return t.startAngle}function pa(t){return t.endAngle}function da(){return 0}function ma(){return 10}function ya(t){var e=ua,n=la,r=ha,i=ha,o=fa,s=pa,a=da,c=null;function u(){var u,l=e.apply(this,arguments),h=n.apply(this,arguments),f=a.apply(this,arguments)/2,p=aa.call(arguments),d=+r.apply(this,(p[0]=l,p)),m=o.apply(this,p)-Hs,y=s.apply(this,p)-Hs,g=+i.apply(this,(p[0]=h,p)),v=o.apply(this,p)-Hs,b=s.apply(this,p)-Hs;if(c||(c=u=oa()),f>Gs&&(Us(y-m)>2*f+Gs?y>m?(m+=f,y-=f):(m-=f,y+=f):m=y=(m+y)/2,Us(b-v)>2*f+Gs?b>v?(v+=f,b-=f):(v-=f,b+=f):v=b=(v+b)/2),c.moveTo(d*zs(m),d*Vs(m)),c.arc(0,0,d,m,y),m!==v||y!==b)if(t){var _=g-+t.apply(this,arguments),w=(v+b)/2;c.quadraticCurveTo(0,0,_*zs(v),_*Vs(v)),c.lineTo(g*zs(w),g*Vs(w)),c.lineTo(_*zs(b),_*Vs(b))}else c.quadraticCurveTo(0,0,g*zs(v),g*Vs(v)),c.arc(0,0,g,v,b);if(c.quadraticCurveTo(0,0,d*zs(m),d*Vs(m)),c.closePath(),u)return c=null,u+""||null}return t&&(u.headRadius=function(e){return arguments.length?(t="function"==typeof e?e:ca(+e),u):t}),u.radius=function(t){return arguments.length?(r=i="function"==typeof t?t:ca(+t),u):r},u.sourceRadius=function(t){return arguments.length?(r="function"==typeof t?t:ca(+t),u):r},u.targetRadius=function(t){return arguments.length?(i="function"==typeof t?t:ca(+t),u):i},u.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:ca(+t),u):o},u.endAngle=function(t){return arguments.length?(s="function"==typeof t?t:ca(+t),u):s},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:ca(+t),u):a},u.source=function(t){return arguments.length?(e=t,u):e},u.target=function(t){return arguments.length?(n=t,u):n},u.context=function(t){return arguments.length?(c=null==t?null:t,u):c},u}function ga(){return ya()}function va(){return ya(ma)}const ba=Math.PI/180,_a=180/Math.PI,wa=.96422,xa=1,ka=.82521,Ta=4/29,Sa=6/29,Ea=3*Sa*Sa,Aa=Sa*Sa*Sa;function Oa(t){if(t instanceof La)return new La(t.l,t.a,t.b,t.opacity);if(t instanceof Fa)return Ua(t);t instanceof li||(t=ci(t));var e,n,r=Ma(t.r),i=Ma(t.g),o=Ma(t.b),s=Ra((.2225045*r+.7168786*i+.0606169*o)/xa);return r===i&&i===o?e=n=s:(e=Ra((.4360747*r+.3850649*i+.1430804*o)/wa),n=Ra((.0139322*r+.0971045*i+.7141733*o)/ka)),new La(116*s-16,500*(e-s),200*(s-n),t.opacity)}function Na(t,e){return new La(t,0,0,null==e?1:e)}function Ca(t,e,n,r){return 1===arguments.length?Oa(t):new La(t,e,n,null==r?1:r)}function La(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Ra(t){return t>Aa?Math.pow(t,1/3):t/Ea+Ta}function Pa(t){return t>Sa?t*t*t:Ea*(t-Ta)}function Ia(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ma(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Da(t){if(t instanceof Fa)return new Fa(t.h,t.c,t.l,t.opacity);if(t instanceof La||(t=Oa(t)),0===t.a&&0===t.b)return new Fa(NaN,0()=>t;function tc(t,e){for(var n,r=-1,i=e.length;++rr!=p>r&&n<(f-u)*(r-l)/(p-l)+u&&(i=-i)}return i}function nc(t,e,n){var r,i,o,s;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],o=n[r],s=e[r],i<=o&&o<=s||s<=o&&o<=i)}function rc(){}var ic=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function oc(){var t=1,e=1,n=oe,r=a;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Ja);else{const n=wt(t,sc);for(e=ee(...ie(n[0],n[1],e),e);e[e.length-1]>=n[1];)e.pop();for(;e[1]o(t,e)))}function o(n,i){const o=null==i?NaN:+i;if(isNaN(o))throw new Error(`invalid value: ${i}`);var a=[],c=[];return function(n,r,i){var o,a,c,u,l,h,f=new Array,p=new Array;for(o=a=-1,u=ac(n[0],r),ic[u<<1].forEach(d);++o=r,ic[l<<2].forEach(d);++o0?a.push([t]):c.push(t)})),c.forEach((function(t){for(var e,n=0,r=a.length;n0&&o0&&s=0&&o>=0))throw new Error("invalid size");return t=r,e=o,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Qa(Za.call(t)):Qa(t),i):n},i.smooth=function(t){return arguments.length?(r=t?a:rc,i):r===a},i}function sc(t){return isFinite(t)?t:NaN}function ac(t,e){return null!=t&&+t>=e}function cc(t){return null==t||isNaN(t=+t)?-1/0:t}function uc(t,e,n,r){const i=r-e,o=n-e,s=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(s)?t:t+s-.5}function lc(t){return t[0]}function hc(t){return t[1]}function fc(){return 1}function pc(){var t=lc,e=hc,n=fc,r=960,i=500,o=20,s=2,a=3*o,c=r+2*a>>s,u=i+2*a>>s,l=Qa(20);function h(r){var i=new Float32Array(c*u),l=Math.pow(2,-s),h=-1;for(const o of r){var f=(t(o,++h,r)+a)*l,p=(e(o,h,r)+a)*l,d=+n(o,h,r);if(d&&f>=0&&f=0&&pt*r)))(e).map(((t,e)=>(t.value=+n[e],p(t))))}function p(t){return t.coordinates.forEach(d),t}function d(t){t.forEach(m)}function m(t){t.forEach(y)}function y(t){t[0]=t[0]*Math.pow(2,s)-a,t[1]=t[1]*Math.pow(2,s)-a}function g(){return c=r+2*(a=3*o)>>s,u=i+2*a>>s,f}return f.contours=function(t){var e=h(t),n=oc().size([c,u]),r=Math.pow(2,2*s),i=t=>{t=+t;var i=p(n.contour(e,t*r));return i.value=t,i};return Object.defineProperty(i,"max",{get:()=>ae(e)/r}),i},f.x=function(e){return arguments.length?(t="function"==typeof e?e:Qa(+e),f):t},f.y=function(t){return arguments.length?(e="function"==typeof t?t:Qa(+t),f):e},f.weight=function(t){return arguments.length?(n="function"==typeof t?t:Qa(+t),f):n},f.size=function(t){if(!arguments.length)return[r,i];var e=+t[0],n=+t[1];if(!(e>=0&&n>=0))throw new Error("invalid size");return r=e,i=n,g()},f.cellSize=function(t){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return s=Math.floor(Math.log(t)/Math.LN2),g()},f.thresholds=function(t){return arguments.length?(l="function"==typeof t?t:Array.isArray(t)?Qa(Za.call(t)):Qa(t),f):l},f.bandwidth=function(t){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*t*t+1)-1)/2,g()},f}const dc=134217729;function mc(t,e,n,r,i){let o,s,a,c,u=e[0],l=r[0],h=0,f=0;l>u==l>-u?(o=u,u=e[++h]):(o=l,l=r[++f]);let p=0;if(hu==l>-u?(s=u+o,a=o-(s-u),u=e[++h]):(s=l+o,a=o-(s-l),l=r[++f]),o=s,0!==a&&(i[p++]=a);hu==l>-u?(s=o+u,c=s-o,a=o-(s-c)+(u-c),u=e[++h]):(s=o+l,c=s-o,a=o-(s-c)+(l-c),l=r[++f]),o=s,0!==a&&(i[p++]=a);for(;h=33306690738754716e-32*u?c:-function(t,e,n,r,i,o,s){let a,c,u,l,h,f,p,d,m,y,g,v,b,_,w,x,k,T;const S=t-i,E=n-i,A=e-o,O=r-o;_=S*O,f=dc*S,p=f-(f-S),d=S-p,f=dc*O,m=f-(f-O),y=O-m,w=d*y-(_-p*m-d*m-p*y),x=A*E,f=dc*A,p=f-(f-A),d=A-p,f=dc*E,m=f-(f-E),y=E-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,gc[0]=w-(g+h)+(h-k),v=_+g,h=v-_,b=_-(v-h)+(g-h),g=b-x,h=b-g,gc[1]=b-(g+h)+(h-x),T=v+g,h=T-v,gc[2]=v-(T-h)+(g-h),gc[3]=T;let N=function(t,e){let n=e[0];for(let t=1;t<4;t++)n+=e[t];return n}(0,gc),C=22204460492503146e-32*s;if(N>=C||-N>=C)return N;if(h=t-S,a=t-(S+h)+(h-i),h=n-E,u=n-(E+h)+(h-i),h=e-A,c=e-(A+h)+(h-o),h=r-O,l=r-(O+h)+(h-o),0===a&&0===c&&0===u&&0===l)return N;if(C=11093356479670487e-47*s+33306690738754706e-32*Math.abs(N),N+=S*l+O*a-(A*u+E*c),N>=C||-N>=C)return N;_=a*O,f=dc*a,p=f-(f-a),d=a-p,f=dc*O,m=f-(f-O),y=O-m,w=d*y-(_-p*m-d*m-p*y),x=c*E,f=dc*c,p=f-(f-c),d=c-p,f=dc*E,m=f-(f-E),y=E-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,wc[0]=w-(g+h)+(h-k),v=_+g,h=v-_,b=_-(v-h)+(g-h),g=b-x,h=b-g,wc[1]=b-(g+h)+(h-x),T=v+g,h=T-v,wc[2]=v-(T-h)+(g-h),wc[3]=T;const L=mc(4,gc,4,wc,vc);_=S*l,f=dc*S,p=f-(f-S),d=S-p,f=dc*l,m=f-(f-l),y=l-m,w=d*y-(_-p*m-d*m-p*y),x=A*u,f=dc*A,p=f-(f-A),d=A-p,f=dc*u,m=f-(f-u),y=u-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,wc[0]=w-(g+h)+(h-k),v=_+g,h=v-_,b=_-(v-h)+(g-h),g=b-x,h=b-g,wc[1]=b-(g+h)+(h-x),T=v+g,h=T-v,wc[2]=v-(T-h)+(g-h),wc[3]=T;const R=mc(L,vc,4,wc,bc);_=a*l,f=dc*a,p=f-(f-a),d=a-p,f=dc*l,m=f-(f-l),y=l-m,w=d*y-(_-p*m-d*m-p*y),x=c*u,f=dc*c,p=f-(f-c),d=c-p,f=dc*u,m=f-(f-u),y=u-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,wc[0]=w-(g+h)+(h-k),v=_+g,h=v-_,b=_-(v-h)+(g-h),g=b-x,h=b-g,wc[1]=b-(g+h)+(h-x),T=v+g,h=T-v,wc[2]=v-(T-h)+(g-h),wc[3]=T;const P=mc(R,bc,4,wc,_c);return _c[P-1]}(t,e,n,r,i,o,u)}yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(8),yc(8),yc(8),yc(4),yc(8),yc(8),yc(8),yc(12),yc(192),yc(192),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(8),yc(8),yc(8),yc(8),yc(8),yc(8),yc(8),yc(8),yc(8),yc(4),yc(4),yc(4),yc(8),yc(16),yc(16),yc(16),yc(32),yc(32),yc(48),yc(64),yc(1152),yc(1152),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(24),yc(24),yc(24),yc(24),yc(24),yc(24),yc(24),yc(24),yc(24),yc(24),yc(1152),yc(1152),yc(1152),yc(1152),yc(1152),yc(2304),yc(2304),yc(3456),yc(5760),yc(8),yc(8),yc(8),yc(16),yc(24),yc(48),yc(48),yc(96),yc(192),yc(384),yc(384),yc(384),yc(768),yc(96),yc(96),yc(96),yc(1152);const kc=Math.pow(2,-52),Tc=new Uint32Array(512);class Sc{static from(t,e=Lc,n=Rc){const r=t.length,i=new Float64Array(2*r);for(let o=0;o>1;if(e>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const n=Math.max(2*e-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(e)),this._hullPrev=new Uint32Array(e),this._hullNext=new Uint32Array(e),this._hullTri=new Uint32Array(e),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(e),this._dists=new Float64Array(e),this.update()}update(){const{coords:t,_hullPrev:e,_hullNext:n,_hullTri:r,_hullHash:i}=this,o=t.length>>1;let s=1/0,a=1/0,c=-1/0,u=-1/0;for(let e=0;ec&&(c=n),r>u&&(u=r),this._ids[e]=e}const l=(s+c)/2,h=(a+u)/2;let f,p,d;for(let e=0,n=1/0;e0&&(p=e,n=r)}let g=t[2*p],v=t[2*p+1],b=1/0;for(let e=0;er&&(e[n++]=i,r=o)}return this.hull=e.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(xc(m,y,g,v,_,w)<0){const t=p,e=g,n=v;p=d,g=_,v=w,d=t,_=e,w=n}const x=function(t,e,n,r,i,o){const s=n-t,a=r-e,c=i-t,u=o-e,l=s*s+a*a,h=c*c+u*u,f=.5/(s*u-a*c);return{x:t+(u*l-a*h)*f,y:e+(s*h-c*l)*f}}(m,y,g,v,_,w);this._cx=x.x,this._cy=x.y;for(let e=0;e0&&Math.abs(u-o)<=kc&&Math.abs(l-s)<=kc)continue;if(o=u,s=l,c===f||c===p||c===d)continue;let h=0;for(let t=0,e=this._hashKey(u,l);t=0;)if(y=m,y===h){y=-1;break}if(-1===y)continue;let g=this._addTriangle(y,c,n[y],-1,-1,r[y]);r[c]=this._legalize(g+2),r[y]=g,k++;let v=n[y];for(;m=n[v],xc(u,l,t[2*v],t[2*v+1],t[2*m],t[2*m+1])<0;)g=this._addTriangle(v,c,m,r[c],-1,r[v]),r[c]=this._legalize(g+2),n[v]=v,k--,v=m;if(y===h)for(;m=e[y],xc(u,l,t[2*m],t[2*m+1],t[2*y],t[2*y+1])<0;)g=this._addTriangle(m,c,y,-1,r[y],r[m]),this._legalize(g+2),r[m]=g,n[y]=y,k--,y=m;this._hullStart=e[c]=y,n[y]=e[v]=c,n[c]=v,i[this._hashKey(u,l)]=c,i[this._hashKey(t[2*y],t[2*y+1])]=y}this.hull=new Uint32Array(k);for(let t=0,e=this._hullStart;t0?3-n:1+n)/4}(t-this._cx,e-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:e,_halfedges:n,coords:r}=this;let i=0,o=0;for(;;){const s=n[t],a=t-t%3;if(o=a+(t+2)%3,-1===s){if(0===i)break;t=Tc[--i];continue}const c=s-s%3,u=a+(t+1)%3,l=c+(s+2)%3,h=e[o],f=e[t],p=e[u],d=e[l];if(Ac(r[2*h],r[2*h+1],r[2*f],r[2*f+1],r[2*p],r[2*p+1],r[2*d],r[2*d+1])){e[t]=d,e[s]=h;const r=n[l];if(-1===r){let e=this._hullStart;do{if(this._hullTri[e]===l){this._hullTri[e]=t;break}e=this._hullPrev[e]}while(e!==this._hullStart)}this._link(t,r),this._link(s,n[o]),this._link(o,l);const a=c+(s+1)%3;i=n&&e[t[s]]>o;)t[s+1]=t[s--];t[s+1]=r}else{let i=n+1,o=r;Cc(t,n+r>>1,i),e[t[n]]>e[t[r]]&&Cc(t,n,r),e[t[i]]>e[t[r]]&&Cc(t,i,r),e[t[n]]>e[t[i]]&&Cc(t,n,i);const s=t[i],a=e[s];for(;;){do{i++}while(e[t[i]]a);if(o=o-n?(Nc(t,e,i,r),Nc(t,e,n,o-1)):(Nc(t,e,n,o-1),Nc(t,e,i,r))}}function Cc(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Lc(t){return t[0]}function Rc(t){return t[1]}const Pc=1e-6;class Ic{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,e){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,e){this._+=`L${this._x1=+t},${this._y1=+e}`}arc(t,e,n){const r=(t=+t)+(n=+n),i=e=+e;if(n<0)throw new Error("negative radius");null===this._x1?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>Pc||Math.abs(this._y1-i)>Pc)&&(this._+="L"+r+","+i),n&&(this._+=`A${n},${n},0,1,1,${t-n},${e}A${n},${n},0,1,1,${this._x1=r},${this._y1=i}`)}rect(t,e,n,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${+n}v${+r}h${-n}Z`}value(){return this._||null}}class Mc{constructor(){this._=[]}moveTo(t,e){this._.push([t,e])}closePath(){this._.push(this._[0].slice())}lineTo(t,e){this._.push([t,e])}value(){return this._.length?this._:null}}class Dc{constructor(t,[e,n,r,i]=[0,0,960,500]){if(!((r=+r)>=(e=+e)&&(i=+i)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=r,this.xmin=e,this.ymax=i,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:e,triangles:n},vectors:r}=this;let i,o;const s=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let r,a,c=0,u=0,l=n.length;c1;)i-=2;for(let t=2;t0){if(e>=this.ymax)return null;(i=(this.ymax-e)/r)0){if(t>=this.xmax)return null;(i=(this.xmax-t)/n)this.xmax?2:0)|(ethis.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let e=0;e2&&function(t){const{triangles:e,coords:n}=t;for(let t=0;t1e-10)return!1}return!0}(t)){this.collinear=Int32Array.from({length:e.length/2},((t,e)=>e)).sort(((t,n)=>e[2*t]-e[2*n]||e[2*t+1]-e[2*n+1]));const t=this.collinear[0],n=this.collinear[this.collinear.length-1],r=[e[2*t],e[2*t+1],e[2*n],e[2*n+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let t=0,n=e.length/2;t0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],o[r[0]]=1,2===r.length&&(o[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(t){return new Dc(this,t)}*neighbors(t){const{inedges:e,hull:n,_hullIndex:r,halfedges:i,triangles:o,collinear:s}=this;if(s){const e=s.indexOf(t);return e>0&&(yield s[e-1]),void(e=0&&i!==n&&i!==r;)n=i;return i}_step(t,e,n){const{inedges:r,hull:i,_hullIndex:o,halfedges:s,triangles:a,points:c}=this;if(-1===r[t]||!c.length)return(t+1)%(c.length>>1);let u=t,l=Bc(e-c[2*t],2)+Bc(n-c[2*t+1],2);const h=r[t];let f=h;do{let r=a[f];const h=Bc(e-c[2*r],2)+Bc(n-c[2*r+1],2);if(h()=>t;function Hc(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:s,y:a,dx:c,dy:u,dispatch:l}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:l}})}function qc(t){return!t.ctrlKey&&!t.button}function Wc(){return this.parentNode}function Gc(t,e){return null==e?{x:t.x,y:t.y}:e}function Yc(){return navigator.maxTouchPoints||"ontouchstart"in this}function $c(){var t,e,n,r,i=qc,o=Wc,s=Gc,a=Yc,c={},u=_n("start","drag","end"),l=0,h=0;function f(t){t.on("mousedown.drag",p).filter(a).on("touchstart.drag",y).on("touchmove.drag",g,Mr).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(s,a){if(!r&&i.call(this,s,a)){var c=b(this,o.call(this,s,a),s,a,"mouse");c&&(Ir(s.view).on("mousemove.drag",d,Dr).on("mouseup.drag",m,Dr),Fr(s.view),jr(s),n=!1,t=s.clientX,e=s.clientY,c("start",s))}}function d(r){if(Br(r),!n){var i=r.clientX-t,o=r.clientY-e;n=i*i+o*o>h}c.mouse("drag",r)}function m(t){Ir(t.view).on("mousemove.drag mouseup.drag",null),Ur(t.view,n),Br(t),c.mouse("end",t)}function y(t,e){if(i.call(this,t,e)){var n,r,s=t.changedTouches,a=o.call(this,t,e),c=s.length;for(n=0;n=o?c=!0:(r=t.charCodeAt(s++))===Qc?u=!0:r===tu&&(u=!0,t.charCodeAt(s)===Qc&&++s),t.slice(i+1,e-1).replace(/""/g,'"')}for(;s9999?"+"+ru(e,6):ru(e,4))+"-"+ru(t.getUTCMonth()+1,2)+"-"+ru(t.getUTCDate(),2)+(o?"T"+ru(n,2)+":"+ru(r,2)+":"+ru(i,2)+"."+ru(o,3)+"Z":i?"T"+ru(n,2)+":"+ru(r,2)+":"+ru(i,2)+"Z":r||n?"T"+ru(n,2)+":"+ru(r,2)+"Z":"")}(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,o=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=eu(t);return function(r,i){return e(n(r),i,t)}}(t,e):eu(t)}));return o.columns=i||[],o},parseRows:r,format:function(e,n){return null==n&&(n=nu(e)),[n.map(s).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=nu(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:s}}var ou=iu(","),su=ou.parse,au=ou.parseRows,cu=ou.format,uu=ou.formatBody,lu=ou.formatRows,hu=ou.formatRow,fu=ou.formatValue,pu=iu("\t"),du=pu.parse,mu=pu.parseRows,yu=pu.format,gu=pu.formatBody,vu=pu.formatRows,bu=pu.formatRow,_u=pu.formatValue;function wu(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;xu&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const xu=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),ku=t=>+t;function Tu(t){return t*t}function Su(t){return t*(2-t)}function Eu(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var Au=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),Ou=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),Nu=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Cu=Math.PI,Lu=Cu/2;function Ru(t){return 1==+t?1:1-Math.cos(t*Lu)}function Pu(t){return Math.sin(t*Lu)}function Iu(t){return(1-Math.cos(Cu*t))/2}function Mu(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Du(t){return Mu(1-+t)}function ju(t){return 1-Mu(t)}function Bu(t){return((t*=2)<=1?Mu(1-t):2-Mu(t-1))/2}function Fu(t){return 1-Math.sqrt(1-t*t)}function Uu(t){return Math.sqrt(1- --t*t)}function zu(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Vu=4/11,Ku=6/11,Hu=8/11,qu=3/4,Wu=9/11,Gu=10/11,Yu=15/16,$u=21/22,Xu=63/64,Zu=1/Vu/Vu;function Ju(t){return 1-Qu(1-t)}function Qu(t){return(t=+t)dl(e,n).then((e=>(new DOMParser).parseFromString(e,t)))}const kl=xl("application/xml");var Tl=xl("text/html"),Sl=xl("image/svg+xml");function El(t,e){var n,r=1;function i(){var i,o,s=n.length,a=0,c=0;for(i=0;i=(o=(m+g)/2))?m=o:g=o,(l=n>=(s=(y+v)/2))?y=s:v=s,i=p,!(p=p[h=l<<1|u]))return i[h]=d,t;if(a=+t._x.call(null,p.data),c=+t._y.call(null,p.data),e===a&&n===c)return d.next=p,i?i[h]=d:t._root=d,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(u=e>=(o=(m+g)/2))?m=o:g=o,(l=n>=(s=(y+v)/2))?y=s:v=s}while((h=l<<1|u)==(f=(c>=s)<<1|a>=o));return i[f]=p,i[h]=d,t}function Ol(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Nl(t){return t[0]}function Cl(t){return t[1]}function Ll(t,e,n){var r=new Rl(null==e?Nl:e,null==n?Cl:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Rl(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Pl(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Il=Ll.prototype=Rl.prototype;function Ml(t){return function(){return t}}function Dl(t){return 1e-6*(t()-.5)}function jl(t){return t.x+t.vx}function Bl(t){return t.y+t.vy}function Fl(t){var e,n,r,i=1,o=1;function s(){for(var t,s,c,u,l,h,f,p=e.length,d=0;du+d||ol+d||sc.index){var m=u-a.x-a.vx,y=l-a.y-a.vy,g=m*m+y*y;gt.r&&(t.r=t[e].r)}function c(){if(e){var r,i,o=e.length;for(n=new Array(o),r=0;r[a(t,e,r),t])));for(s=0,i=new Array(u);sl&&(l=r),ih&&(h=i));if(c>l||u>h)return this;for(this.cover(c,u).cover(l,h),n=0;nt||t>=i||r>e||e>=o;)switch(a=(ef||(o=c.y0)>p||(s=c.x1)=g)<<1|t>=y)&&(c=d[d.length-1],d[d.length-1]=d[d.length-1-u],d[d.length-1-u]=c)}else{var v=t-+this._x.call(null,m.data),b=e-+this._y.call(null,m.data),_=v*v+b*b;if(_=(a=(d+y)/2))?d=a:y=a,(l=s>=(c=(m+g)/2))?m=c:g=c,e=p,!(p=p[h=l<<1|u]))return this;if(!p.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,f=h)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):e?(i?e[h]=i:delete e[h],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[f]=p:this._root=p),this):(this._root=i,this)},Il.removeAll=function(t){for(var e=0,n=t.length;e(t=(Kl*t+Hl)%ql)/ql}();function h(){f(),u.call("tick",e),n1?(null==n?a.delete(t):a.set(t,d(n)),e):a.get(t)},find:function(e,n,r){var i,o,s,a,c,u=0,l=t.length;for(null==r?r=1/0:r*=r,u=0;u1?(u.on(t,n),e):u.on(t)}}}function Zl(){var t,e,n,r,i,o=Ml(-30),s=1,a=1/0,c=.81;function u(n){var i,o=t.length,s=Ll(t,Wl,Gl).visitAfter(h);for(r=n,i=0;i=a)){(t.data!==e||t.next)&&(0===h&&(d+=(h=Dl(n))*h),0===f&&(d+=(f=Dl(n))*f),d1?r[0]+r.slice(2):r,+t.slice(n+1)]}function nh(t){return(t=eh(Math.abs(t)))?t[1]:NaN}var rh,ih=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function oh(t){if(!(e=ih.exec(t)))throw new Error("invalid format: "+t);var e;return new sh({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function sh(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function ah(t,e){var n=eh(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}oh.prototype=sh.prototype,sh.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const ch={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>ah(100*t,e),r:ah,s:function(t,e){var n=eh(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(rh=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+eh(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function uh(t){return t}var lh,hh,fh,ph=Array.prototype.map,dh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function mh(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?uh:(e=ph.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],s=0,a=e[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),o.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=e[s=(s+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",s=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?uh:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(ph.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=oh(t)).fill,n=t.align,h=t.sign,f=t.symbol,p=t.zero,d=t.width,m=t.comma,y=t.precision,g=t.trim,v=t.type;"n"===v?(m=!0,v="g"):ch[v]||(void 0===y&&(y=12),g=!0,v="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var b="$"===f?i:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",_="$"===f?o:/[%p]/.test(v)?c:"",w=ch[v],x=/[defgprs%]/.test(v);function k(t){var i,o,c,f=b,k=_;if("c"===v)k=w(t)+k,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:w(Math.abs(t),y),g&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==h&&(T=!1),f=(T?"("===h?h:u:"-"===h||"("===h?"":h)+f,k=("s"===v?dh[8+rh/3]:"")+k+(T&&"("===h?")":""),x)for(i=-1,o=t.length;++i(c=t.charCodeAt(i))||c>57){k=(46===c?s+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}m&&!p&&(t=r(t,1/0));var S=f.length+t.length+k.length,E=S>1)+f+t+k+E.slice(S);break;default:t=E+f+t+k}return a(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=oh(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(nh(e)/3))),i=Math.pow(10,-r),o=dh[8+r/3];return function(t){return n(i*t)+o}}}}function yh(t){return lh=mh(t),hh=lh.format,fh=lh.formatPrefix,lh}function gh(t){return Math.max(0,-nh(Math.abs(t)))}function vh(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(nh(e)/3)))-nh(Math.abs(t)))}function bh(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,nh(e)-nh(t))+1}yh({thousands:",",grouping:[3],currency:["$",""]});var _h=1e-6,wh=1e-12,xh=Math.PI,kh=xh/2,Th=xh/4,Sh=2*xh,Eh=180/xh,Ah=xh/180,Oh=Math.abs,Nh=Math.atan,Ch=Math.atan2,Lh=Math.cos,Rh=Math.ceil,Ph=Math.exp,Ih=(Math.floor,Math.hypot),Mh=Math.log,Dh=Math.pow,jh=Math.sin,Bh=Math.sign||function(t){return t>0?1:t<0?-1:0},Fh=Math.sqrt,Uh=Math.tan;function zh(t){return t>1?0:t<-1?xh:Math.acos(t)}function Vh(t){return t>1?kh:t<-1?-kh:Math.asin(t)}function Kh(t){return(t=jh(t/2))*t}function Hh(){}function qh(t,e){t&&Gh.hasOwnProperty(t.type)&&Gh[t.type](t,e)}var Wh={Feature:function(t,e){qh(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,o=Lh(e=(e*=Ah)/2+Th),s=jh(e),a=ef*s,c=tf*o+a*Lh(i),u=a*r*jh(i);df.add(Ch(u,c)),Qh=t,tf=o,ef=s}function wf(t){return mf=new xt,Xh(t,yf),2*mf}function xf(t){return[Ch(t[1],t[0]),Vh(t[2])]}function kf(t){var e=t[0],n=t[1],r=Lh(n);return[r*Lh(e),r*jh(e),jh(n)]}function Tf(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Sf(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Ef(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Af(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Of(t){var e=Fh(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Nf,Cf,Lf,Rf,Pf,If,Mf,Df,jf,Bf,Ff,Uf,zf,Vf,Kf,Hf,qf={point:Wf,lineStart:Yf,lineEnd:$f,polygonStart:function(){qf.point=Xf,qf.lineStart=Zf,qf.lineEnd=Jf,hf=new xt,yf.polygonStart()},polygonEnd:function(){yf.polygonEnd(),qf.point=Wf,qf.lineStart=Yf,qf.lineEnd=$f,df<0?(nf=-(of=180),rf=-(sf=90)):hf>_h?sf=90:hf<-_h&&(rf=-90),pf[0]=nf,pf[1]=of},sphere:function(){nf=-(of=180),rf=-(sf=90)}};function Wf(t,e){ff.push(pf=[nf=t,of=t]),esf&&(sf=e)}function Gf(t,e){var n=kf([t*Ah,e*Ah]);if(lf){var r=Sf(lf,n),i=Sf([r[1],-r[0],0],r);Of(i),i=xf(i);var o,s=t-af,a=s>0?1:-1,c=i[0]*Eh*a,u=Oh(s)>180;u^(a*afsf&&(sf=o):u^(a*af<(c=(c+360)%360-180)&&csf&&(sf=e)),u?tQf(nf,of)&&(of=t):Qf(t,of)>Qf(nf,of)&&(nf=t):of>=nf?(tof&&(of=t)):t>af?Qf(nf,t)>Qf(nf,of)&&(of=t):Qf(t,of)>Qf(nf,of)&&(nf=t)}else ff.push(pf=[nf=t,of=t]);esf&&(sf=e),lf=n,af=t}function Yf(){qf.point=Gf}function $f(){pf[0]=nf,pf[1]=of,qf.point=Wf,lf=null}function Xf(t,e){if(lf){var n=t-af;hf.add(Oh(n)>180?n+(n>0?360:-360):n)}else cf=t,uf=e;yf.point(t,e),Gf(t,e)}function Zf(){yf.lineStart()}function Jf(){Xf(cf,uf),yf.lineEnd(),Oh(hf)>_h&&(nf=-(of=180)),pf[0]=nf,pf[1]=of,lf=null}function Qf(t,e){return(e-=t)<0?e+360:e}function tp(t,e){return t[0]-e[0]}function ep(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eQf(r[0],r[1])&&(r[1]=i[1]),Qf(i[0],r[1])>Qf(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(s=-1/0,e=0,r=o[n=o.length-1];e<=n;r=i,++e)i=o[e],(a=Qf(r[1],i[0]))>s&&(s=a,nf=i[0],of=r[1])}return ff=pf=null,nf===1/0||rf===1/0?[[NaN,NaN],[NaN,NaN]]:[[nf,rf],[of,sf]]}var rp={sphere:Hh,point:ip,lineStart:sp,lineEnd:up,polygonStart:function(){rp.lineStart=lp,rp.lineEnd=hp},polygonEnd:function(){rp.lineStart=sp,rp.lineEnd=up}};function ip(t,e){t*=Ah;var n=Lh(e*=Ah);op(n*Lh(t),n*jh(t),jh(e))}function op(t,e,n){++Nf,Lf+=(t-Lf)/Nf,Rf+=(e-Rf)/Nf,Pf+=(n-Pf)/Nf}function sp(){rp.point=ap}function ap(t,e){t*=Ah;var n=Lh(e*=Ah);Vf=n*Lh(t),Kf=n*jh(t),Hf=jh(e),rp.point=cp,op(Vf,Kf,Hf)}function cp(t,e){t*=Ah;var n=Lh(e*=Ah),r=n*Lh(t),i=n*jh(t),o=jh(e),s=Ch(Fh((s=Kf*o-Hf*i)*s+(s=Hf*r-Vf*o)*s+(s=Vf*i-Kf*r)*s),Vf*r+Kf*i+Hf*o);Cf+=s,If+=s*(Vf+(Vf=r)),Mf+=s*(Kf+(Kf=i)),Df+=s*(Hf+(Hf=o)),op(Vf,Kf,Hf)}function up(){rp.point=ip}function lp(){rp.point=fp}function hp(){pp(Uf,zf),rp.point=ip}function fp(t,e){Uf=t,zf=e,t*=Ah,e*=Ah,rp.point=pp;var n=Lh(e);Vf=n*Lh(t),Kf=n*jh(t),Hf=jh(e),op(Vf,Kf,Hf)}function pp(t,e){t*=Ah;var n=Lh(e*=Ah),r=n*Lh(t),i=n*jh(t),o=jh(e),s=Kf*o-Hf*i,a=Hf*r-Vf*o,c=Vf*i-Kf*r,u=Ih(s,a,c),l=Vh(u),h=u&&-l/u;jf.add(h*s),Bf.add(h*a),Ff.add(h*c),Cf+=l,If+=l*(Vf+(Vf=r)),Mf+=l*(Kf+(Kf=i)),Df+=l*(Hf+(Hf=o)),op(Vf,Kf,Hf)}function dp(t){Nf=Cf=Lf=Rf=Pf=If=Mf=Df=0,jf=new xt,Bf=new xt,Ff=new xt,Xh(t,rp);var e=+jf,n=+Bf,r=+Ff,i=Ih(e,n,r);return ixh&&(t-=Math.round(t/Sh)*Sh),[t,e]}function vp(t,e,n){return(t%=Sh)?e||n?yp(_p(t),wp(e,n)):_p(t):e||n?wp(e,n):gp}function bp(t){return function(e,n){return Oh(e+=t)>xh&&(e-=Math.round(e/Sh)*Sh),[e,n]}}function _p(t){var e=bp(t);return e.invert=bp(-t),e}function wp(t,e){var n=Lh(t),r=jh(t),i=Lh(e),o=jh(e);function s(t,e){var s=Lh(e),a=Lh(t)*s,c=jh(t)*s,u=jh(e),l=u*n+a*r;return[Ch(c*i-l*o,a*n-u*r),Vh(l*i+c*o)]}return s.invert=function(t,e){var s=Lh(e),a=Lh(t)*s,c=jh(t)*s,u=jh(e),l=u*i-c*o;return[Ch(c*i+u*o,a*n+l*r),Vh(l*n-a*r)]},s}function xp(t){function e(e){return(e=t(e[0]*Ah,e[1]*Ah))[0]*=Eh,e[1]*=Eh,e}return t=vp(t[0]*Ah,t[1]*Ah,t.length>2?t[2]*Ah:0),e.invert=function(e){return(e=t.invert(e[0]*Ah,e[1]*Ah))[0]*=Eh,e[1]*=Eh,e},e}function kp(t,e,n,r,i,o){if(n){var s=Lh(e),a=jh(e),c=r*n;null==i?(i=e+r*Sh,o=e-c/2):(i=Tp(s,i),o=Tp(s,o),(r>0?io)&&(i+=r*Sh));for(var u,l=i;r>0?l>o:l1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Ap(t,e){return Oh(t[0]-e[0])<_h&&Oh(t[1]-e[1])<_h}function Op(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Np(t,e,n,r,i){var o,s,a=[],c=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],s=t[e];if(Ap(r,s)){if(!r[2]&&!s[2]){for(i.lineStart(),o=0;o=0;--o)i.point((l=u[o])[0],l[1]);else r(f.x,f.p.x,-1,i);f=f.p}u=(f=f.o).z,p=!p}while(!f.v);i.lineEnd()}}}function Cp(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r=0?1:-1,E=S*T,A=E>xh,O=y*x;if(c.add(Ch(O*S*jh(E),g*k+O*Lh(E))),s+=A?T+S*Sh:T,A^d>=n^_>=n){var N=Sf(kf(p),kf(b));Of(N);var C=Sf(o,N);Of(C);var L=(A^T>=0?-1:1)*Vh(C[2]);(r>L||r===L&&(N[0]||N[1]))&&(a+=A^T>=0?1:-1)}}return(s<-_h||s<_h&&c<-wh)^1&a}function Pp(t,e,n,r){return function(i){var o,s,a,c=e(i),u=Ep(),l=e(u),h=!1,f={point:p,lineStart:m,lineEnd:y,polygonStart:function(){f.point=g,f.lineStart=v,f.lineEnd=b,s=[],o=[]},polygonEnd:function(){f.point=p,f.lineStart=m,f.lineEnd=y,s=xe(s);var t=Rp(o,r);s.length?(h||(i.polygonStart(),h=!0),Np(s,Mp,t,n,i)):t&&(h||(i.polygonStart(),h=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),h&&(i.polygonEnd(),h=!1),s=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(e,n){t(e,n)&&i.point(e,n)}function d(t,e){c.point(t,e)}function m(){f.point=d,c.lineStart()}function y(){f.point=p,c.lineEnd()}function g(t,e){a.push([t,e]),l.point(t,e)}function v(){l.lineStart(),a=[]}function b(){g(a[0][0],a[0][1]),l.lineEnd();var t,e,n,r,c=l.clean(),f=u.result(),p=f.length;if(a.pop(),o.push(a),a=null,p)if(1&c){if((e=(n=f[0]).length-1)>0){for(h||(i.polygonStart(),h=!0),i.lineStart(),t=0;t1&&2&c&&f.push(f.pop().concat(f.shift())),s.push(f.filter(Ip))}return f}}function Ip(t){return t.length>1}function Mp(t,e){return((t=t.x)[0]<0?t[1]-kh-_h:kh-t[1])-((e=e.x)[0]<0?e[1]-kh-_h:kh-e[1])}gp.invert=gp;const Dp=Pp((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,s){var a=o>0?xh:-xh,c=Oh(o-n);Oh(c-xh)<_h?(t.point(n,r=(r+s)/2>0?kh:-kh),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(o,r),e=0):i!==a&&c>=xh&&(Oh(n-i)<_h&&(n-=i*_h),Oh(o-a)<_h&&(o-=a*_h),r=function(t,e,n,r){var i,o,s=jh(t-n);return Oh(s)>_h?Nh((jh(e)*(o=Lh(r))*jh(n)-jh(r)*(i=Lh(e))*jh(t))/(i*o*s)):(e+r)/2}(n,r,o,s),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),e=0),t.point(n=o,r=s),i=a},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*kh,r.point(-xh,i),r.point(0,i),r.point(xh,i),r.point(xh,0),r.point(xh,-i),r.point(0,-i),r.point(-xh,-i),r.point(-xh,0),r.point(-xh,i);else if(Oh(t[0]-e[0])>_h){var o=t[0]0,i=Oh(e)>_h;function o(t,n){return Lh(t)*Lh(n)>e}function s(t,n,r){var i=[1,0,0],o=Sf(kf(t),kf(n)),s=Tf(o,o),a=o[0],c=s-a*a;if(!c)return!r&&t;var u=e*s/c,l=-e*a/c,h=Sf(i,o),f=Af(i,u);Ef(f,Af(o,l));var p=h,d=Tf(f,p),m=Tf(p,p),y=d*d-m*(Tf(f,f)-1);if(!(y<0)){var g=Fh(y),v=Af(p,(-d-g)/m);if(Ef(v,f),v=xf(v),!r)return v;var b,_=t[0],w=n[0],x=t[1],k=n[1];w<_&&(b=_,_=w,w=b);var T=w-_,S=Oh(T-xh)<_h;if(!S&&k0^v[1]<(Oh(v[0]-_)<_h?x:k):x<=v[1]&&v[1]<=k:T>xh^(_<=v[0]&&v[0]<=w)){var E=Af(p,(-d+g)/m);return Ef(E,f),[v,xf(E)]}}}function a(e,n){var i=r?t:xh-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return Pp(o,(function(t){var e,n,c,u,l;return{lineStart:function(){u=c=!1,l=1},point:function(h,f){var p,d=[h,f],m=o(h,f),y=r?m?0:a(h,f):m?a(h+(h<0?xh:-xh),f):0;if(!e&&(u=c=m)&&t.lineStart(),m!==c&&(!(p=s(e,d))||Ap(e,p)||Ap(d,p))&&(d[2]=1),m!==c)l=0,m?(t.lineStart(),p=s(d,e),t.point(p[0],p[1])):(p=s(e,d),t.point(p[0],p[1],2),t.lineEnd()),e=p;else if(i&&e&&r^m){var g;y&n||!(g=s(d,e,!0))||(l=0,r?(t.lineStart(),t.point(g[0][0],g[0][1]),t.point(g[1][0],g[1][1]),t.lineEnd()):(t.point(g[1][0],g[1][1]),t.lineEnd(),t.lineStart(),t.point(g[0][0],g[0][1],3)))}!m||e&&Ap(e,d)||t.point(d[0],d[1]),e=d,c=m,n=y},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return l|(u&&c)<<1}}}),(function(e,r,i,o){kp(o,t,n,i,e,r)}),r?[0,-t]:[-xh,t-xh])}var Bp,Fp,Up,zp,Vp=1e9,Kp=-Vp;function Hp(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,a,u){var l=0,h=0;if(null==i||(l=s(i,a))!==(h=s(o,a))||c(i,o)<0^a>0)do{u.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+a+4)%4)!==h);else u.point(o[0],o[1])}function s(r,i){return Oh(r[0]-t)<_h?i>0?0:3:Oh(r[0]-n)<_h?i>0?2:1:Oh(r[1]-e)<_h?i>0?1:0:i>0?3:2}function a(t,e){return c(t.x,e.x)}function c(t,e){var n=s(t,1),r=s(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(s){var c,u,l,h,f,p,d,m,y,g,v,b=s,_=Ep(),w={point:x,lineStart:function(){w.point=k,u&&u.push(l=[]),g=!0,y=!1,d=m=NaN},lineEnd:function(){c&&(k(h,f),p&&y&&_.rejoin(),c.push(_.result())),w.point=x,y&&b.lineEnd()},polygonStart:function(){b=_,c=[],u=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;nr&&(f-o)*(r-s)>(p-s)*(t-o)&&++e:p<=r&&(f-o)*(r-s)<(p-s)*(t-o)&&--e;return e}(),n=v&&e,i=(c=xe(c)).length;(n||i)&&(s.polygonStart(),n&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),i&&Np(c,a,e,o,s),s.polygonEnd()),b=s,c=u=l=null}};function x(t,e){i(t,e)&&b.point(t,e)}function k(o,s){var a=i(o,s);if(u&&l.push([o,s]),g)h=o,f=s,p=a,g=!1,a&&(b.lineStart(),b.point(o,s));else if(a&&y)b.point(o,s);else{var c=[d=Math.max(Kp,Math.min(Vp,d)),m=Math.max(Kp,Math.min(Vp,m))],_=[o=Math.max(Kp,Math.min(Vp,o)),s=Math.max(Kp,Math.min(Vp,s))];!function(t,e,n,r,i,o){var s,a=t[0],c=t[1],u=0,l=1,h=e[0]-a,f=e[1]-c;if(s=n-a,h||!(s>0)){if(s/=h,h<0){if(s0){if(s>l)return;s>u&&(u=s)}if(s=i-a,h||!(s<0)){if(s/=h,h<0){if(s>l)return;s>u&&(u=s)}else if(h>0){if(s0)){if(s/=f,f<0){if(s0){if(s>l)return;s>u&&(u=s)}if(s=o-c,f||!(s<0)){if(s/=f,f<0){if(s>l)return;s>u&&(u=s)}else if(f>0){if(s0&&(t[0]=a+u*h,t[1]=c+u*f),l<1&&(e[0]=a+l*h,e[1]=c+l*f),!0}}}}}(c,_,t,e,n,r)?a&&(b.lineStart(),b.point(o,s),v=!1):(y||(b.lineStart(),b.point(c[0],c[1])),b.point(_[0],_[1]),a||b.lineEnd(),v=!1)}d=o,m=s,y=a}return w}}function qp(){var t,e,n,r=0,i=0,o=960,s=500;return n={stream:function(n){return t&&e===n?t:t=Hp(r,i,o,s)(e=n)},extent:function(a){return arguments.length?(r=+a[0][0],i=+a[0][1],o=+a[1][0],s=+a[1][1],t=e=null,n):[[r,i],[o,s]]}}}var Wp={sphere:Hh,point:Hh,lineStart:function(){Wp.point=Yp,Wp.lineEnd=Gp},lineEnd:Hh,polygonStart:Hh,polygonEnd:Hh};function Gp(){Wp.point=Wp.lineEnd=Hh}function Yp(t,e){Fp=t*=Ah,Up=jh(e*=Ah),zp=Lh(e),Wp.point=$p}function $p(t,e){t*=Ah;var n=jh(e*=Ah),r=Lh(e),i=Oh(t-Fp),o=Lh(i),s=r*jh(i),a=zp*n-Up*r*o,c=Up*n+zp*r*o;Bp.add(Ch(Fh(s*s+a*a),c)),Fp=t,Up=n,zp=r}function Xp(t){return Bp=new xt,Xh(t,Wp),+Bp}var Zp=[null,null],Jp={type:"LineString",coordinates:Zp};function Qp(t,e){return Zp[0]=t,Zp[1]=e,Xp(Jp)}var td={Feature:function(t,e){return nd(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r0&&(i=Qp(t[o],t[o-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))_h})).map(c)).concat(Ee(Rh(o/p)*p,i,p).filter((function(t){return Oh(t%m)>_h})).map(u))}return g.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},g.outline=function(){return{type:"Polygon",coordinates:[l(r).concat(h(s).slice(1),l(n).reverse().slice(1),h(a).reverse().slice(1))]}},g.extent=function(t){return arguments.length?g.extentMajor(t).extentMinor(t):g.extentMinor()},g.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],a=+t[0][1],s=+t[1][1],r>n&&(t=r,r=n,n=t),a>s&&(t=a,a=s,s=t),g.precision(y)):[[r,a],[n,s]]},g.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),g.precision(y)):[[e,o],[t,i]]},g.step=function(t){return arguments.length?g.stepMajor(t).stepMinor(t):g.stepMinor()},g.stepMajor=function(t){return arguments.length?(d=+t[0],m=+t[1],g):[d,m]},g.stepMinor=function(t){return arguments.length?(f=+t[0],p=+t[1],g):[f,p]},g.precision=function(f){return arguments.length?(y=+f,c=ud(o,i,90),u=ld(e,t,y),l=ud(a,s,90),h=ld(r,n,y),g):y},g.extentMajor([[-180,-90+_h],[180,90-_h]]).extentMinor([[-180,-80-_h],[180,80+_h]])}function fd(){return hd()()}function pd(t,e){var n=t[0]*Ah,r=t[1]*Ah,i=e[0]*Ah,o=e[1]*Ah,s=Lh(r),a=jh(r),c=Lh(o),u=jh(o),l=s*Lh(n),h=s*jh(n),f=c*Lh(i),p=c*jh(i),d=2*Vh(Fh(Kh(o-r)+s*c*Kh(i-n))),m=jh(d),y=d?function(t){var e=jh(t*=d)/m,n=jh(d-t)/m,r=n*l+e*f,i=n*h+e*p,o=n*a+e*u;return[Ch(i,r)*Eh,Ch(o,Fh(r*r+i*i))*Eh]}:function(){return[n*Eh,r*Eh]};return y.distance=d,y}const dd=t=>t;var md,yd,gd,vd,bd=new xt,_d=new xt,wd={point:Hh,lineStart:Hh,lineEnd:Hh,polygonStart:function(){wd.lineStart=xd,wd.lineEnd=Sd},polygonEnd:function(){wd.lineStart=wd.lineEnd=wd.point=Hh,bd.add(Oh(_d)),_d=new xt},result:function(){var t=bd/2;return bd=new xt,t}};function xd(){wd.point=kd}function kd(t,e){wd.point=Td,md=gd=t,yd=vd=e}function Td(t,e){_d.add(vd*t-gd*e),gd=t,vd=e}function Sd(){Td(md,yd)}const Ed=wd;var Ad=1/0,Od=Ad,Nd=-Ad,Cd=Nd,Ld={point:function(t,e){tNd&&(Nd=t),eCd&&(Cd=e)},lineStart:Hh,lineEnd:Hh,polygonStart:Hh,polygonEnd:Hh,result:function(){var t=[[Ad,Od],[Nd,Cd]];return Nd=Cd=-(Od=Ad=1/0),t}};const Rd=Ld;var Pd,Id,Md,Dd,jd=0,Bd=0,Fd=0,Ud=0,zd=0,Vd=0,Kd=0,Hd=0,qd=0,Wd={point:Gd,lineStart:Yd,lineEnd:Zd,polygonStart:function(){Wd.lineStart=Jd,Wd.lineEnd=Qd},polygonEnd:function(){Wd.point=Gd,Wd.lineStart=Yd,Wd.lineEnd=Zd},result:function(){var t=qd?[Kd/qd,Hd/qd]:Vd?[Ud/Vd,zd/Vd]:Fd?[jd/Fd,Bd/Fd]:[NaN,NaN];return jd=Bd=Fd=Ud=zd=Vd=Kd=Hd=qd=0,t}};function Gd(t,e){jd+=t,Bd+=e,++Fd}function Yd(){Wd.point=$d}function $d(t,e){Wd.point=Xd,Gd(Md=t,Dd=e)}function Xd(t,e){var n=t-Md,r=e-Dd,i=Fh(n*n+r*r);Ud+=i*(Md+t)/2,zd+=i*(Dd+e)/2,Vd+=i,Gd(Md=t,Dd=e)}function Zd(){Wd.point=Gd}function Jd(){Wd.point=tm}function Qd(){em(Pd,Id)}function tm(t,e){Wd.point=em,Gd(Pd=Md=t,Id=Dd=e)}function em(t,e){var n=t-Md,r=e-Dd,i=Fh(n*n+r*r);Ud+=i*(Md+t)/2,zd+=i*(Dd+e)/2,Vd+=i,Kd+=(i=Dd*t-Md*e)*(Md+t),Hd+=i*(Dd+e),qd+=3*i,Gd(Md=t,Dd=e)}const nm=Wd;function rm(t){this._context=t}rm.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Sh)}},result:Hh};var im,om,sm,am,cm,um=new xt,lm={point:Hh,lineStart:function(){lm.point=hm},lineEnd:function(){im&&fm(om,sm),lm.point=Hh},polygonStart:function(){im=!0},polygonEnd:function(){im=null},result:function(){var t=+um;return um=new xt,t}};function hm(t,e){lm.point=fm,om=am=t,sm=cm=e}function fm(t,e){am-=t,cm-=e,um.add(Fh(am*am+cm*cm)),am=t,cm=e}const pm=lm;let dm,mm,ym,gm;class vm{constructor(t){this._append=null==t?bm:function(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return bm;if(e!==dm){const t=10**e;dm=e,mm=function(e){let n=1;this._+=e[0];for(const r=e.length;n=0))throw new RangeError(`invalid digits: ${t}`);i=e}return null===e&&(r=new vm(i)),s},s.projection(t).digits(i).context(e)}function wm(t){return{stream:xm(t)}}function xm(t){return function(e){var n=new km;for(var r in t)n[r]=t[r];return n.stream=e,n}}function km(){}function Tm(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Xh(n,t.stream(Rd)),e(Rd.result()),null!=r&&t.clipExtent(r),t}function Sm(t,e,n){return Tm(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),s=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,a=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([s,a])}),n)}function Em(t,e,n){return Sm(t,[[0,0],e],n)}function Am(t,e,n){return Tm(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,s=-i*n[0][1];t.scale(150*i).translate([o,s])}),n)}function Om(t,e,n){return Tm(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],s=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,s])}),n)}km.prototype={constructor:km,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Nm=16,Cm=Lh(30*Ah);function Lm(t,e){return+e?function(t,e){function n(r,i,o,s,a,c,u,l,h,f,p,d,m,y){var g=u-r,v=l-i,b=g*g+v*v;if(b>4*e&&m--){var _=s+f,w=a+p,x=c+d,k=Fh(_*_+w*w+x*x),T=Vh(x/=k),S=Oh(Oh(x)-1)<_h||Oh(o-h)<_h?(o+h)/2:Ch(w,_),E=t(S,T),A=E[0],O=E[1],N=A-r,C=O-i,L=v*N-g*C;(L*L/b>e||Oh((g*N+v*C)/b-.5)>.3||s*f+a*p+c*d2?t[2]%360*Ah:0,N()):[y*Eh,g*Eh,v*Eh]},A.angle=function(t){return arguments.length?(b=t%360*Ah,N()):b*Eh},A.reflectX=function(t){return arguments.length?(_=t?-1:1,N()):_<0},A.reflectY=function(t){return arguments.length?(w=t?-1:1,N()):w<0},A.precision=function(t){return arguments.length?(s=Lm(a,E=t*t),C()):Fh(E)},A.fitExtent=function(t,e){return Sm(A,t,e)},A.fitSize=function(t,e){return Em(A,t,e)},A.fitWidth=function(t,e){return Am(A,t,e)},A.fitHeight=function(t,e){return Om(A,t,e)},function(){return e=t.apply(this,arguments),A.invert=e.invert&&O,N()}}function Dm(t){var e=0,n=xh/3,r=Mm(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Ah,n=t[1]*Ah):[e*Eh,n*Eh]},i}function jm(t,e){var n=jh(t),r=(n+jh(e))/2;if(Oh(r)<_h)return function(t){var e=Lh(t);function n(t,n){return[t*e,jh(n)/e]}return n.invert=function(t,n){return[t/e,Vh(n*e)]},n}(t);var i=1+n*(2*r-n),o=Fh(i)/r;function s(t,e){var n=Fh(i-2*r*jh(e))/r;return[n*jh(t*=r),o-n*Lh(t)]}return s.invert=function(t,e){var n=o-e,s=Ch(t,Oh(n))*Bh(n);return n*r<0&&(s-=xh*Bh(t)*Bh(n)),[s/r,Vh((i-(t*t+n*n)*r*r)/(2*r))]},s}function Bm(){return Dm(jm).scale(155.424).center([0,33.6442])}function Fm(){return Bm().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Um(){var t,e,n,r,i,o,s=Fm(),a=Bm().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=Bm().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){o=[t,e]}};function l(t){var e=t[0],s=t[1];return o=null,n.point(e,s),o||(r.point(e,s),o)||(i.point(e,s),o)}function h(){return t=e=null,l}return l.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:s).invert(t)},l.stream=function(n){return t&&e===n?t:(r=[s.stream(e=n),a.stream(n),c.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n0?e<-kh+_h&&(e=-kh+_h):e>kh-_h&&(e=kh-_h);var n=i/Dh(Xm(e),r);return[n*jh(r*t),i-n*Lh(r*t)]}return o.invert=function(t,e){var n=i-e,o=Bh(r)*Fh(t*t+n*n),s=Ch(t,Oh(n))*Bh(n);return n*r<0&&(s-=xh*Bh(t)*Bh(n)),[s/r,2*Nh(Dh(i/o,1/r))-kh]},o}function Jm(){return Dm(Zm).scale(109.5).parallels([30,30])}function Qm(t,e){return[t,e]}function ty(){return Im(Qm).scale(152.63)}function ey(t,e){var n=Lh(t),r=t===e?jh(t):(n-Lh(e))/(e-t),i=n/r+t;if(Oh(r)<_h)return Qm;function o(t,e){var n=i-e,o=r*t;return[n*jh(o),i-n*Lh(o)]}return o.invert=function(t,e){var n=i-e,o=Ch(t,Oh(n))*Bh(n);return n*r<0&&(o-=xh*Bh(t)*Bh(n)),[o/r,i-Bh(r)*Fh(t*t+n*n)]},o}function ny(){return Dm(ey).scale(131.154).center([0,13.9389])}qm.invert=Vm((function(t){return t})),Gm.invert=function(t,e){return[t,2*Nh(Ph(e))-kh]},Qm.invert=Qm;var ry=1.340264,iy=-.081106,oy=893e-6,sy=.003796,ay=Fh(3)/2;function cy(t,e){var n=Vh(ay*jh(e)),r=n*n,i=r*r*r;return[t*Lh(n)/(ay*(ry+3*iy*r+i*(7*oy+9*sy*r))),n*(ry+iy*r+i*(oy+sy*r))]}function uy(){return Im(cy).scale(177.158)}function ly(t,e){var n=Lh(e),r=Lh(t)*n;return[n*jh(t)/r,jh(e)/r]}function hy(){return Im(ly).scale(144.049).clipAngle(60)}function fy(){var t,e,n,r,i,o,s,a=1,c=0,u=0,l=1,h=1,f=0,p=null,d=1,m=1,y=xm({point:function(t,e){var n=b([t,e]);this.stream.point(n[0],n[1])}}),g=dd;function v(){return d=a*l,m=a*h,o=s=null,b}function b(n){var r=n[0]*d,i=n[1]*m;if(f){var o=i*t-r*e;r=r*t+i*e,i=o}return[r+c,i+u]}return b.invert=function(n){var r=n[0]-c,i=n[1]-u;if(f){var o=i*t+r*e;r=r*t-i*e,i=o}return[r/d,i/m]},b.stream=function(t){return o&&s===t?o:o=y(g(s=t))},b.postclip=function(t){return arguments.length?(g=t,p=n=r=i=null,v()):g},b.clipExtent=function(t){return arguments.length?(g=null==t?(p=n=r=i=null,dd):Hp(p=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),v()):null==p?null:[[p,n],[r,i]]},b.scale=function(t){return arguments.length?(a=+t,v()):a},b.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],v()):[c,u]},b.angle=function(n){return arguments.length?(e=jh(f=n%360*Ah),t=Lh(f),v()):f*Eh},b.reflectX=function(t){return arguments.length?(l=t?-1:1,v()):l<0},b.reflectY=function(t){return arguments.length?(h=t?-1:1,v()):h<0},b.fitExtent=function(t,e){return Sm(b,t,e)},b.fitSize=function(t,e){return Em(b,t,e)},b.fitWidth=function(t,e){return Am(b,t,e)},b.fitHeight=function(t,e){return Om(b,t,e)},b}function py(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function dy(){return Im(py).scale(175.295)}function my(t,e){return[Lh(e)*jh(t),jh(e)]}function yy(){return Im(my).scale(249.5).clipAngle(90+_h)}function gy(t,e){var n=Lh(e),r=1+Lh(t)*n;return[n*jh(t)/r,jh(e)/r]}function vy(){return Im(gy).scale(250).clipAngle(142)}function by(t,e){return[Mh(Uh((kh+e)/2)),-t]}function _y(){var t=$m(by),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function wy(t,e){return t.parent===e.parent?1:2}function xy(t,e){return t+e.x}function ky(t,e){return Math.max(t,e.y)}function Ty(){var t=wy,e=1,n=1,r=!1;function i(i){var o,s=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(xy,0)/t.length}(n),e.y=function(t){return 1+t.reduce(ky,0)}(n)):(e.x=o?s+=t(e,o):0,e.y=0,o=e)}));var a=function(t){for(var e;e=t.children;)t=e[0];return t}(i),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=a.x-t(a,c)/2,l=c.x+t(c,a)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(l-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function Sy(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function Ey(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Oy)):void 0===e&&(e=Ay);for(var n,r,i,o,s,a=new Ly(t),c=[a];n=c.pop();)if((i=e(n.data))&&(s=(i=Array.from(i)).length))for(n.children=i,o=s-1;o>=0;--o)c.push(r=i[o]=new Ly(i[o])),r.parent=n,r.depth=n.depth+1;return a.eachBefore(Cy)}function Ay(t){return t.children}function Oy(t){return Array.isArray(t)?t[1]:null}function Ny(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Cy(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Ly(t){this.data=t,this.depth=this.height=0,this.parent=null}function Ry(t){return null==t?null:Py(t)}function Py(t){if("function"!=typeof t)throw new Error;return t}function Iy(){return 0}function My(t){return function(){return t}}cy.invert=function(t,e){for(var n,r=e,i=r*r,o=i*i*i,s=0;s<12&&(o=(i=(r-=n=(r*(ry+iy*i+o*(oy+sy*i))-e)/(ry+3*iy*i+o*(7*oy+9*sy*i)))*r)*i*i,!(Oh(n)_h&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},my.invert=Vm(Vh),gy.invert=Vm((function(t){return 2*Nh(t)})),by.invert=function(t,e){return[-e,2*Nh(Ph(t))-kh]},Ly.prototype=Ey.prototype={constructor:Ly,count:function(){return this.eachAfter(Sy)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,o=this,s=[o],a=[],c=-1;o=s.pop();)if(a.push(o),n=o.children)for(r=0,i=n.length;r=0;--r)o.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return Ey(this).eachBefore(Ny)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,o=[i];do{for(t=o.reverse(),o=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n(t=(Dy*t+jy)%By)/By}function Uy(t){return zy(t,Fy())}function zy(t,e){for(var n,r,i=0,o=(t=function(t,e){let n,r,i=t.length;for(;i;)r=e()*i--|0,n=t[i],t[i]=t[r],t[r]=n;return t}(Array.from(t),e)).length,s=[];i0&&n*n>r*r+i*i}function qy(t,e){for(var n=0;n1e-6?(A+Math.sqrt(A*A-4*E*O))/(2*E):O/A);return{x:r+x+k*N,y:i+T+S*N,r:N}}function $y(t,e,n){var r,i,o,s,a=t.x-e.x,c=t.y-e.y,u=a*a+c*c;u?(i=e.r+n.r,i*=i,s=t.r+n.r,i>(s*=s)?(r=(u+s-i)/(2*u),o=Math.sqrt(Math.max(0,s/u-r*r)),n.x=t.x-r*a-o*c,n.y=t.y-r*c+o*a):(r=(u+i-s)/(2*u),o=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*a-o*c,n.y=e.y+r*c+o*a)):(n.x=e.x+n.r,n.y=e.y)}function Xy(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Zy(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function Jy(t){this._=t,this.next=null,this.previous=null}function Qy(t,e){if(!(s=(n=t,t="object"==typeof n&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,o,s,a,c,u,l,h,f,p;if((r=t[0]).x=0,r.y=0,!(s>1))return r.r;if(i=t[1],r.x=-i.r,i.x=r.r,i.y=0,!(s>2))return r.r+i.r;$y(i,r,o=t[2]),r=new Jy(r),i=new Jy(i),o=new Jy(o),r.next=o.previous=i,i.next=r.previous=o,o.next=i.previous=r;t:for(u=3;ufunction(t){let e=(t=`${t}`).length;return yg(t,e-1)&&!yg(t,e-2)&&(t=t.slice(0,-1)),"/"===t[0]?t:`/${t}`}(t(e,n,r)))),n=e.map(mg),i=new Set(e).add("");for(const t of n)i.has(t)||(i.add(t),e.push(t),n.push(mg(t)),f.push(hg));p=(t,n)=>e[n],d=(t,e)=>n[e]}for(s=0,i=f.length;s=0&&(u=f[t]).data===hg;--t)u.data=null}if(a.parent=ug,a.eachBefore((function(t){t.depth=t.parent.depth+1,--i})).eachBefore(Cy),a.parent=null,i>0)throw new Error("cycle");return a}return r.id=function(t){return arguments.length?(e=Ry(t),r):e},r.parentId=function(t){return arguments.length?(n=Ry(t),r):n},r.path=function(e){return arguments.length?(t=Ry(e),r):t},r}function mg(t){let e=t.length;if(e<2)return"";for(;--e>1&&!yg(t,e););return t.slice(0,e)}function yg(t,e){if("/"===t[e]){let n=0;for(;e>0&&"\\"===t[--e];)++n;if(!(1&n))return!0}return!1}function gg(t,e){return t.parent===e.parent?1:2}function vg(t){var e=t.children;return e?e[0]:t.t}function bg(t){var e=t.children;return e?e[e.length-1]:t.t}function _g(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function wg(t,e,n){return t.a.parent===e.parent?t.a:n}function xg(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function kg(){var t=gg,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,o,s=new xg(t,0),a=[s];e=a.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)a.push(n=e.children[i]=new xg(r[i],i)),n.parent=e;return(s.parent=new xg(null,0)).children=[s],s}(i);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(s),r)i.eachBefore(a);else{var u=i,l=i,h=i;i.eachBefore((function(t){t.xl.x&&(l=t),t.depth>h.depth&&(h=t)}));var f=u===l?1:t(u,l)/2,p=f-u.x,d=e/(l.x+f+p),m=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+p)*d,t.y=t.depth*m}))}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,s=e,a=n,c=o.parent.children[0],u=o.m,l=s.m,h=a.m,f=c.m;a=bg(a),o=vg(o),a&&o;)c=vg(c),(s=bg(s)).a=e,(i=a.z+h-o.z-u+t(a._,o._))>0&&(_g(wg(a,e,r),e,i),u+=i,l+=i),h+=a.m,u+=o.m,f+=c.m,l+=s.m;a&&!bg(s)&&(s.t=a,s.m+=h-l),o&&!vg(c)&&(c.t=o,c.m+=u-f,r=e)}return r}(e,i,e.parent.A||r[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function a(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function Tg(t,e,n,r,i){for(var o,s=t.children,a=-1,c=s.length,u=t.value&&(i-n)/t.value;++af&&(f=a),y=l*l*m,(p=Math.max(f/y,y/h))>d){l-=a;break}d=p}g.push(s={value:l,dice:c1?e:1)},n}(Sg);function Og(){var t=Ag,e=!1,n=1,r=1,i=[0],o=Iy,s=Iy,a=Iy,c=Iy,u=Iy;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(sg),t}function h(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,h=e.x1-n,f=e.y1-n;h=n-1){var l=a[e];return l.x0=i,l.y0=o,l.x1=s,void(l.y1=c)}for(var h=u[e],f=r/2+h,p=e+1,d=n-1;p>>1;u[m]c-o){var v=r?(i*g+s*y)/r:s;t(e,p,y,i,o,v,c),t(p,n,g,v,o,s,c)}else{var b=r?(o*g+c*y)/r:c;t(e,p,y,i,o,s,b),t(p,n,g,i,b,s,c)}}(0,c,t.value,e,n,r,i)}function Cg(t,e,n,r,i){(1&t.depth?Tg:ag)(t,e,n,r,i)}const Lg=function t(e){function n(t,n,r,i,o){if((s=t._squarify)&&s.ratio===e)for(var s,a,c,u,l,h=-1,f=s.length,p=t.value;++h1?e:1)},n}(Sg);function Rg(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function Pg(t,e){var n=Oi(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}}function Ig(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Mg(t){return((t=Math.exp(t))+1/t)/2}const Dg=function t(e,n,r){function i(t,i){var o,s,a=t[0],c=t[1],u=t[2],l=i[0],h=i[1],f=i[2],p=l-a,d=h-c,m=p*p+d*d;if(m<1e-12)s=Math.log(f/u)/e,o=function(t){return[a+t*p,c+t*d,u*Math.exp(e*t*s)]};else{var y=Math.sqrt(m),g=(f*f-u*u+r*m)/(2*u*n*y),v=(f*f-u*u-r*m)/(2*f*n*y),b=Math.log(Math.sqrt(g*g+1)-g),_=Math.log(Math.sqrt(v*v+1)-v);s=(_-b)/e,o=function(t){var r,i=t*s,o=Mg(b),l=u/(n*y)*(o*(r=e*i+b,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(b));return[a+l*p,c+l*d,u*o/Mg(e*i+b)]}}return o.duration=1e3*s*e/Math.SQRT2,o}return i.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},i}(Math.SQRT2,2,4);function jg(t){return function(e,n){var r=t((e=vi(e)).h,(n=vi(n)).h),i=Ni(e.s,n.s),o=Ni(e.l,n.l),s=Ni(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=o(t),e.opacity=s(t),e+""}}}const Bg=jg(Oi);var Fg=jg(Ni);function Ug(t,e){var n=Ni((t=Ca(t)).l,(e=Ca(e)).l),r=Ni(t.a,e.a),i=Ni(t.b,e.b),o=Ni(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=o(e),t+""}}function zg(t){return function(e,n){var r=t((e=Ba(e)).h,(n=Ba(n)).h),i=Ni(e.c,n.c),o=Ni(e.l,n.l),s=Ni(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=o(t),e.opacity=s(t),e+""}}}const Vg=zg(Oi);var Kg=zg(Ni);function Hg(t){return function e(n){function r(e,r){var i=t((e=$a(e)).h,(r=$a(r)).h),o=Ni(e.s,r.s),s=Ni(e.l,r.l),a=Ni(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=o(t),e.l=s(Math.pow(t,n)),e.opacity=a(t),e+""}}return n=+n,r.gamma=e,r}(1)}const qg=Hg(Oi);var Wg=Hg(Ni);function Gg(t,e){void 0===e&&(e=t,t=Hi);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n1&&Zg(t[n[i-2]],t[n[i-1]],t[r])<=0;)--i;n[i++]=r}return n.slice(0,i)}function tv(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e=0;--e)u.push(t[r[o[e]][2]]);for(e=+a;ea!=u>a&&s<(c-n)*(a-r)/(u-r)+n&&(l=!l),c=n,u=r;return l}function nv(t){for(var e,n,r=-1,i=t.length,o=t[i-1],s=o[0],a=o[1],c=0;++r1);return t+n*o*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(rv),av=function t(e){var n=sv.source(e);function r(){var t=n.apply(this,arguments);return function(){return Math.exp(t())}}return r.source=t,r}(rv),cv=function t(e){function n(t){return(t=+t)<=0?()=>0:function(){for(var n=0,r=t;r>1;--r)n+=e();return n+r*e()}}return n.source=t,n}(rv),uv=function t(e){var n=cv.source(e);function r(t){if(0==(t=+t))return e;var r=n(t);return function(){return r()/t}}return r.source=t,r}(rv),lv=function t(e){function n(t){return function(){return-Math.log1p(-e())/t}}return n.source=t,n}(rv),hv=function t(e){function n(t){if((t=+t)<0)throw new RangeError("invalid alpha");return t=1/-t,function(){return Math.pow(1-e(),t)}}return n.source=t,n}(rv),fv=function t(e){function n(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+t)}}return n.source=t,n}(rv),pv=function t(e){function n(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return 0===t?()=>1/0:1===t?()=>1:(t=Math.log1p(-t),function(){return 1+Math.floor(Math.log1p(-e())/t)})}return n.source=t,n}(rv),dv=function t(e){var n=sv.source(e)();function r(t,r){if((t=+t)<0)throw new RangeError("invalid k");if(0===t)return()=>0;if(r=null==r?1:+r,1===t)return()=>-Math.log1p(-e())*r;var i=(t<1?t+1:t)-1/3,o=1/(3*Math.sqrt(i)),s=t<1?()=>Math.pow(e(),1/t):()=>1;return function(){do{do{var t=n(),a=1+o*t}while(a<=0);a*=a*a;var c=1-e()}while(c>=1-.0331*t*t*t*t&&Math.log(c)>=.5*t*t+i*(1-a+Math.log(a)));return i*a*s()*r}}return r.source=t,r}(rv),mv=function t(e){var n=dv.source(e);function r(t,e){var r=n(t),i=n(e);return function(){var t=r();return 0===t?0:t/(t+i())}}return r.source=t,r}(rv),yv=function t(e){var n=pv.source(e),r=mv.source(e);function i(t,e){return t=+t,(e=+e)>=1?()=>t:e<=0?()=>0:function(){for(var i=0,o=t,s=e;o*s>16&&o*(1-s)>16;){var a=Math.floor((o+1)*s),c=r(a,o-a+1)();c<=s?(i+=a,o-=a,s=(s-c)/(1-c)):(o=a-1,s/=c)}for(var u=s<.5,l=n(u?s:1-s),h=l(),f=0;h<=o;++f)h+=l();return i+(u?f:o-f)}}return i.source=t,i}(rv),gv=function t(e){function n(t,n,r){var i;return 0==(t=+t)?i=t=>-Math.log(t):(t=1/t,i=e=>Math.pow(e,t)),n=null==n?0:+n,r=null==r?1:+r,function(){return n+r*i(-Math.log1p(-e()))}}return n.source=t,n}(rv),vv=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,function(){return t+n*Math.tan(Math.PI*e())}}return n.source=t,n}(rv),bv=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,function(){var r=e();return t+n*Math.log(r/(1-r))}}return n.source=t,n}(rv),_v=function t(e){var n=dv.source(e),r=yv.source(e);function i(t){return function(){for(var i=0,o=t;o>16;){var s=Math.floor(.875*o),a=n(s)();if(a>o)return i+r(s-1,o/a)();i+=s,o-=a}for(var c=-Math.log1p(-e()),u=0;c<=o;++u)c-=Math.log1p(-e());return i+u}}return i.source=t,i}(rv),wv=1664525,xv=1013904223,kv=1/4294967296;function Tv(t=Math.random()){let e=0|(0<=t&&t<1?t/kv:Math.abs(t));return()=>(e=wv*e+xv|0,kv*(e>>>0))}function Sv(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Ev(t,e){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof e?this.interpolator(e):this.range(e)}return this}const Av=Symbol("implicit");function Ov(){var t=new St,e=[],n=[],r=Av;function i(i){let o=t.get(i);if(void 0===o){if(r!==Av)return r;t.set(i,o=e.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new St;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Ov(e,n).unknown(r)},Sv.apply(i,arguments),i}function Nv(){var t,e,n=Ov().unknown(void 0),r=n.domain,i=n.range,o=0,s=1,a=!1,c=0,u=0,l=.5;function h(){var n=r().length,h=se&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(s[0],s[t-1])),r=t>2?jv:Dv,i=o=null,h}function h(e){return null==e||isNaN(e=+e)?n:(i||(i=r(s.map(t),a,c)))(t(u(e)))}return h.invert=function(n){return u(e((o||(o=r(a,s.map(t),Fi)))(n)))},h.domain=function(t){return arguments.length?(s=Array.from(t,Rv),l()):s.slice()},h.range=function(t){return arguments.length?(a=Array.from(t),l()):a.slice()},h.rangeRound=function(t){return a=Array.from(t),c=Ig,l()},h.clamp=function(t){return arguments.length?(u=!!t||Iv,l()):u!==Iv},h.interpolate=function(t){return arguments.length?(c=t,l()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}function Uv(){return Fv()(Iv,Iv)}function zv(t,e,n,r){var i,o=re(t,e,n);switch((r=oh(null==r?",f":r)).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=vh(o,s))||(r.precision=i),fh(r,s);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=bh(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=gh(o))||(r.precision=i-2*("%"===r.type))}return hh(r)}function Vv(t){var e=t.domain;return t.ticks=function(t){var n=e();return ee(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return zv(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,o=e(),s=0,a=o.length-1,c=o[s],u=o[a],l=10;for(u0;){if((i=ne(c,u,n))===r)return o[s]=c,o[a]=u,e(o);if(i>0)c=Math.floor(c/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,u=Math.floor(u*i)/i}r=i}return t},t}function Kv(){var t=Uv();return t.copy=function(){return Bv(t,Kv())},Sv.apply(t,arguments),Vv(t)}function Hv(t){var e;function n(t){return null==t||isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Array.from(e,Rv),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return Hv(t).unknown(e)},t=arguments.length?Array.from(t,Rv):[0,1],Vv(n)}function qv(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],s=t[i];return s-t(-e,n)}function Jv(t){const e=t(Wv,Gv),n=e.domain;let r,i,o=10;function s(){return r=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}(o),i=function(t){return 10===t?Xv:t===Math.E?Math.exp:e=>Math.pow(t,e)}(o),n()[0]<0?(r=Zv(r),i=Zv(i),t(Yv,$v)):t(Wv,Gv),e}return e.base=function(t){return arguments.length?(o=+t,s()):o},e.domain=function(t){return arguments.length?(n(t),s()):n()},e.ticks=t=>{const e=n();let s=e[0],a=e[e.length-1];const c=a0){for(;h<=f;++h)for(u=1;ua)break;d.push(l)}}else for(;h<=f;++h)for(u=o-1;u>=1;--u)if(l=h>0?u/i(-h):u*i(h),!(la)break;d.push(l)}2*d.length{if(null==t&&(t=10),null==n&&(n=10===o?"s":","),"function"!=typeof n&&(o%1||null!=(n=oh(n)).precision||(n.trim=!0),n=hh(n)),t===1/0)return n;const s=Math.max(1,o*t/e.ticks().length);return t=>{let e=t/i(Math.round(r(t)));return e*on(qv(n(),{floor:t=>i(Math.floor(r(t))),ceil:t=>i(Math.ceil(r(t)))})),e}function Qv(){const t=Jv(Fv()).domain([1,10]);return t.copy=()=>Bv(t,Qv()).base(t.base()),Sv.apply(t,arguments),t}function tb(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function eb(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function nb(t){var e=1,n=t(tb(e),eb(e));return n.constant=function(n){return arguments.length?t(tb(e=+n),eb(e)):e},Vv(n)}function rb(){var t=nb(Fv());return t.copy=function(){return Bv(t,rb()).constant(t.constant())},Sv.apply(t,arguments)}function ib(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function ob(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function sb(t){return t<0?-t*t:t*t}function ab(t){var e=t(Iv,Iv),n=1;return e.exponent=function(e){return arguments.length?1==(n=+e)?t(Iv,Iv):.5===n?t(ob,sb):t(ib(n),ib(1/n)):n},Vv(e)}function cb(){var t=ab(Fv());return t.copy=function(){return Bv(t,cb()).exponent(t.exponent())},Sv.apply(t,arguments),t}function ub(){return cb.apply(null,arguments).exponent(.5)}function lb(t){return Math.sign(t)*t*t}function hb(){var t,e=Uv(),n=[0,1],r=!1;function i(n){var i=function(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}(e(n));return isNaN(i)?t:r?Math.round(i):i}return i.invert=function(t){return e.invert(lb(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(t){return arguments.length?(e.range((n=Array.from(t,Rv)).map(lb)),i):n.slice()},i.rangeRound=function(t){return i.range(t).round(!0)},i.round=function(t){return arguments.length?(r=!!t,i):r},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return hb(e.domain(),n).round(r).clamp(e.clamp()).unknown(t)},Sv.apply(i,arguments),Vv(i)}function fb(){var t,e=[],n=[],r=[];function i(){var t=0,i=Math.max(1,n.length);for(r=new Array(i-1);++t0?r[i-1]:e[0],i=r?[i[r-1],n]:[i[s-1],i[s]]},s.unknown=function(e){return arguments.length?(t=e,s):s},s.thresholds=function(){return i.slice()},s.copy=function(){return pb().domain([e,n]).range(o).unknown(t)},Sv.apply(Vv(s),arguments)}function db(){var t,e=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[ot(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=Array.from(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=Array.from(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return db().domain(e).range(n).unknown(t)},Sv.apply(i,arguments)}const mb=1e3,yb=6e4,gb=36e5,vb=864e5,bb=6048e5,_b=31536e6,wb=new Date,xb=new Date;function kb(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=e=>(t(e=new Date(+e)),e),i.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),i.round=t=>{const e=i(t),n=i.ceil(t);return t-e(e(t=new Date(+t),null==n?1:Math.floor(n)),t),i.range=(n,r,o)=>{const s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n0))return s;let a;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(akb((e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),((t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})),n&&(i.count=(e,r)=>(wb.setTime(+e),xb.setTime(+r),t(wb),t(xb),Math.floor(n(wb,xb))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?e=>r(e)%t==0:e=>i.count(0,e)%t==0):i:null)),i}const Tb=kb((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));Tb.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?kb((e=>{e.setTime(Math.floor(e/t)*t)}),((e,n)=>{e.setTime(+e+n*t)}),((e,n)=>(n-e)/t)):Tb:null);const Sb=Tb.range,Eb=kb((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*mb)}),((t,e)=>(e-t)/mb),(t=>t.getUTCSeconds())),Ab=Eb.range,Ob=kb((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mb)}),((t,e)=>{t.setTime(+t+e*yb)}),((t,e)=>(e-t)/yb),(t=>t.getMinutes())),Nb=Ob.range,Cb=kb((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*yb)}),((t,e)=>(e-t)/yb),(t=>t.getUTCMinutes())),Lb=Cb.range,Rb=kb((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mb-t.getMinutes()*yb)}),((t,e)=>{t.setTime(+t+e*gb)}),((t,e)=>(e-t)/gb),(t=>t.getHours())),Pb=Rb.range,Ib=kb((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*gb)}),((t,e)=>(e-t)/gb),(t=>t.getUTCHours())),Mb=Ib.range,Db=kb((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*yb)/vb),(t=>t.getDate()-1)),jb=Db.range,Bb=kb((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/vb),(t=>t.getUTCDate()-1)),Fb=Bb.range,Ub=kb((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/vb),(t=>Math.floor(t/vb))),zb=Ub.range;function Vb(t){return kb((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*yb)/bb))}const Kb=Vb(0),Hb=Vb(1),qb=Vb(2),Wb=Vb(3),Gb=Vb(4),Yb=Vb(5),$b=Vb(6),Xb=Kb.range,Zb=Hb.range,Jb=qb.range,Qb=Wb.range,t_=Gb.range,e_=Yb.range,n_=$b.range;function r_(t){return kb((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/bb))}const i_=r_(0),o_=r_(1),s_=r_(2),a_=r_(3),c_=r_(4),u_=r_(5),l_=r_(6),h_=i_.range,f_=o_.range,p_=s_.range,d_=a_.range,m_=c_.range,y_=u_.range,g_=l_.range,v_=kb((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth())),b_=v_.range,__=kb((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth())),w_=__.range,x_=kb((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));x_.every=t=>isFinite(t=Math.floor(t))&&t>0?kb((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,n)=>{e.setFullYear(e.getFullYear()+n*t)})):null;const k_=x_.range,T_=kb((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));T_.every=t=>isFinite(t=Math.floor(t))&&t>0?kb((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null;const S_=T_.range;function E_(t,e,n,r,i,o){const s=[[Eb,1,mb],[Eb,5,5e3],[Eb,15,15e3],[Eb,30,3e4],[o,1,yb],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,gb],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,vb],[r,2,1728e5],[n,1,bb],[e,1,2592e6],[e,3,7776e6],[t,1,_b]];function a(e,n,r){const i=Math.abs(n-e)/r,o=J((([,,t])=>t)).right(s,i);if(o===s.length)return t.every(re(e/_b,n/_b,r));if(0===o)return Tb.every(Math.max(re(e,n,r),1));const[a,c]=s[i/s[o-1][2]=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ex,s:nx,S:xw,u:kw,U:Tw,V:Ew,w:Aw,W:Ow,x:null,X:null,y:Nw,Y:Lw,Z:Pw,"%":tx},_={a:function(t){return s[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Iw,e:Iw,f:Fw,g:Xw,G:Jw,H:Mw,I:Dw,j:jw,L:Bw,m:Uw,M:zw,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ex,s:nx,S:Vw,u:Kw,U:Hw,V:Ww,w:Gw,W:Yw,x:null,X:null,y:$w,Y:Zw,Z:Qw,"%":tx},w={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return T(t,e,n,r)},d:iw,e:iw,f:lw,g:tw,G:Q_,H:sw,I:sw,j:ow,L:uw,m:rw,M:aw,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=l.get(r[0].toLowerCase()),n+r[0].length):-1},q:nw,Q:fw,s:pw,S:cw,u:$_,U:X_,V:Z_,w:Y_,W:J_,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:tw,Y:Q_,Z:ew,"%":hw};function x(t,e){return function(n){var r,i,o,s=[],a=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++a53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=R_(P_(o.y,0,1))).getUTCDay(),r=i>4||0===i?o_.ceil(r):o_(r),r=Bb.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=L_(P_(o.y,0,1))).getDay(),r=i>4||0===i?Hb.ceil(r):Hb(r),r=Db.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?R_(P_(o.y,0,1)).getUTCDay():L_(P_(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,R_(o)):L_(o)}}function T(t,e,n,r){for(var i,o,s=0,a=e.length,c=n.length;s=c)return-1;if(37===(i=e.charCodeAt(s++))){if(i=e.charAt(s++),!(o=w[i in U_?e.charAt(s++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=x(n,b),b.X=x(r,b),b.c=x(e,b),_.x=x(n,_),_.X=x(r,_),_.c=x(e,_),{format:function(t){var e=x(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=x(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}var M_,D_,j_,B_,F_,U_={"-":"",_:" ",0:"0"},z_=/^\s*\d+/,V_=/^%/,K_=/[\\^$*+?|[\]().{}]/g;function H_(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o[t.toLowerCase(),e])))}function Y_(t,e,n){var r=z_.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function $_(t,e,n){var r=z_.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function X_(t,e,n){var r=z_.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Z_(t,e,n){var r=z_.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function J_(t,e,n){var r=z_.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Q_(t,e,n){var r=z_.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function tw(t,e,n){var r=z_.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ew(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function nw(t,e,n){var r=z_.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function rw(t,e,n){var r=z_.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function iw(t,e,n){var r=z_.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function ow(t,e,n){var r=z_.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function sw(t,e,n){var r=z_.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function aw(t,e,n){var r=z_.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function cw(t,e,n){var r=z_.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function uw(t,e,n){var r=z_.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function lw(t,e,n){var r=z_.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function hw(t,e,n){var r=V_.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function fw(t,e,n){var r=z_.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function pw(t,e,n){var r=z_.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function dw(t,e){return H_(t.getDate(),e,2)}function mw(t,e){return H_(t.getHours(),e,2)}function yw(t,e){return H_(t.getHours()%12||12,e,2)}function gw(t,e){return H_(1+Db.count(x_(t),t),e,3)}function vw(t,e){return H_(t.getMilliseconds(),e,3)}function bw(t,e){return vw(t,e)+"000"}function _w(t,e){return H_(t.getMonth()+1,e,2)}function ww(t,e){return H_(t.getMinutes(),e,2)}function xw(t,e){return H_(t.getSeconds(),e,2)}function kw(t){var e=t.getDay();return 0===e?7:e}function Tw(t,e){return H_(Kb.count(x_(t)-1,t),e,2)}function Sw(t){var e=t.getDay();return e>=4||0===e?Gb(t):Gb.ceil(t)}function Ew(t,e){return t=Sw(t),H_(Gb.count(x_(t),t)+(4===x_(t).getDay()),e,2)}function Aw(t){return t.getDay()}function Ow(t,e){return H_(Hb.count(x_(t)-1,t),e,2)}function Nw(t,e){return H_(t.getFullYear()%100,e,2)}function Cw(t,e){return H_((t=Sw(t)).getFullYear()%100,e,2)}function Lw(t,e){return H_(t.getFullYear()%1e4,e,4)}function Rw(t,e){var n=t.getDay();return H_((t=n>=4||0===n?Gb(t):Gb.ceil(t)).getFullYear()%1e4,e,4)}function Pw(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+H_(e/60|0,"0",2)+H_(e%60,"0",2)}function Iw(t,e){return H_(t.getUTCDate(),e,2)}function Mw(t,e){return H_(t.getUTCHours(),e,2)}function Dw(t,e){return H_(t.getUTCHours()%12||12,e,2)}function jw(t,e){return H_(1+Bb.count(T_(t),t),e,3)}function Bw(t,e){return H_(t.getUTCMilliseconds(),e,3)}function Fw(t,e){return Bw(t,e)+"000"}function Uw(t,e){return H_(t.getUTCMonth()+1,e,2)}function zw(t,e){return H_(t.getUTCMinutes(),e,2)}function Vw(t,e){return H_(t.getUTCSeconds(),e,2)}function Kw(t){var e=t.getUTCDay();return 0===e?7:e}function Hw(t,e){return H_(i_.count(T_(t)-1,t),e,2)}function qw(t){var e=t.getUTCDay();return e>=4||0===e?c_(t):c_.ceil(t)}function Ww(t,e){return t=qw(t),H_(c_.count(T_(t),t)+(4===T_(t).getUTCDay()),e,2)}function Gw(t){return t.getUTCDay()}function Yw(t,e){return H_(o_.count(T_(t)-1,t),e,2)}function $w(t,e){return H_(t.getUTCFullYear()%100,e,2)}function Xw(t,e){return H_((t=qw(t)).getUTCFullYear()%100,e,2)}function Zw(t,e){return H_(t.getUTCFullYear()%1e4,e,4)}function Jw(t,e){var n=t.getUTCDay();return H_((t=n>=4||0===n?c_(t):c_.ceil(t)).getUTCFullYear()%1e4,e,4)}function Qw(){return"+0000"}function tx(){return"%"}function ex(t){return+t}function nx(t){return Math.floor(+t/1e3)}function rx(t){return M_=I_(t),D_=M_.format,j_=M_.parse,B_=M_.utcFormat,F_=M_.utcParse,M_}function ix(t){return new Date(t)}function ox(t){return t instanceof Date?+t:+new Date(+t)}function sx(t,e,n,r,i,o,s,a,c,u){var l=Uv(),h=l.invert,f=l.domain,p=u(".%L"),d=u(":%S"),m=u("%I:%M"),y=u("%I %p"),g=u("%a %d"),v=u("%b %d"),b=u("%B"),_=u("%Y");function w(t){return(c(t)e(r/(t.length-1))))},n.quantiles=function(e){return Array.from({length:e+1},((n,r)=>de(t,r/e)))},n.copy=function(){return yx(e).domain(t)},Ev.apply(n,arguments)}function gx(){var t,e,n,r,i,o,s,a=0,c=.5,u=1,l=1,h=Iv,f=!1;function p(t){return isNaN(t=+t)?s:(t=.5+((t=+o(t))-e)*(l*tRi(t[t.length-1]);var Dx=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(kx);const jx=Mx(Dx);var Bx=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(kx);const Fx=Mx(Bx);var Ux=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(kx);const zx=Mx(Ux);var Vx=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(kx);const Kx=Mx(Vx);var Hx=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(kx);const qx=Mx(Hx);var Wx=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(kx);const Gx=Mx(Wx);var Yx=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(kx);const $x=Mx(Yx);var Xx=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(kx);const Zx=Mx(Xx);var Jx=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(kx);const Qx=Mx(Jx);var tk=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(kx);const ek=Mx(tk);var nk=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(kx);const rk=Mx(nk);var ik=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(kx);const ok=Mx(ik);var sk=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(kx);const ak=Mx(sk);var ck=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(kx);const uk=Mx(ck);var lk=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(kx);const hk=Mx(lk);var fk=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(kx);const pk=Mx(fk);var dk=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(kx);const mk=Mx(dk);var yk=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(kx);const gk=Mx(yk);var vk=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(kx);const bk=Mx(vk);var _k=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(kx);const wk=Mx(_k);var xk=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(kx);const kk=Mx(xk);var Tk=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(kx);const Sk=Mx(Tk);var Ek=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(kx);const Ak=Mx(Ek);var Ok=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(kx);const Nk=Mx(Ok);var Ck=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(kx);const Lk=Mx(Ck);var Rk=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(kx);const Pk=Mx(Rk);var Ik=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(kx);const Mk=Mx(Ik);function Dk(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"}const jk=Wg($a(300,.5,0),$a(-240,.5,1));var Bk=Wg($a(-100,.75,.35),$a(80,1.5,.8)),Fk=Wg($a(260,.75,.35),$a(80,1.5,.8)),Uk=$a();function zk(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Uk.h=360*t-100,Uk.s=1.5-1.5*e,Uk.l=.8-.9*e,Uk+""}var Vk=ui(),Kk=Math.PI/3,Hk=2*Math.PI/3;function qk(t){var e;return t=(.5-t)*Math.PI,Vk.r=255*(e=Math.sin(t))*e,Vk.g=255*(e=Math.sin(t+Kk))*e,Vk.b=255*(e=Math.sin(t+Hk))*e,Vk+""}function Wk(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"}function Gk(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const Yk=Gk(kx("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var $k=Gk(kx("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Xk=Gk(kx("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Zk=Gk(kx("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function Jk(t){return Ir(_r(t).call(document.documentElement))}var Qk=0;function tT(){return new eT}function eT(){this._="@"+(++Qk).toString(36)}function nT(t,e){return t.target&&(t=qi(t),void 0===e&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,(t=>Wi(t,e)))}function rT(t){return"string"==typeof t?new Lr([document.querySelectorAll(t)],[document.documentElement]):new Lr([kn(t)],Cr)}function iT(t){return function(){return t}}eT.prototype=tT.prototype={constructor:eT,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};const oT=Math.abs,sT=Math.atan2,aT=Math.cos,cT=Math.max,uT=Math.min,lT=Math.sin,hT=Math.sqrt,fT=1e-12,pT=Math.PI,dT=pT/2,mT=2*pT;function yT(t){return t>=1?dT:t<=-1?-dT:Math.asin(t)}function gT(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new ia(e)}function vT(t){return t.innerRadius}function bT(t){return t.outerRadius}function _T(t){return t.startAngle}function wT(t){return t.endAngle}function xT(t){return t&&t.padAngle}function kT(t,e,n,r,i,o,s){var a=t-n,c=e-r,u=(s?o:-o)/hT(a*a+c*c),l=u*c,h=-u*a,f=t+l,p=e+h,d=n+l,m=r+h,y=(f+d)/2,g=(p+m)/2,v=d-f,b=m-p,_=v*v+b*b,w=i-o,x=f*m-d*p,k=(b<0?-1:1)*hT(cT(0,w*w*_-x*x)),T=(x*b-v*k)/_,S=(-x*v-b*k)/_,E=(x*b+v*k)/_,A=(-x*v+b*k)/_,O=T-y,N=S-g,C=E-y,L=A-g;return O*O+N*N>C*C+L*L&&(T=E,S=A),{cx:T,cy:S,x01:-l,y01:-h,x11:T*(i/w-1),y11:S*(i/w-1)}}function TT(){var t=vT,e=bT,n=iT(0),r=null,i=_T,o=wT,s=xT,a=null,c=gT(u);function u(){var u,l,h,f=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-dT,m=o.apply(this,arguments)-dT,y=oT(m-d),g=m>d;if(a||(a=u=c()),pfT)if(y>mT-fT)a.moveTo(p*aT(d),p*lT(d)),a.arc(0,0,p,d,m,!g),f>fT&&(a.moveTo(f*aT(m),f*lT(m)),a.arc(0,0,f,m,d,g));else{var v,b,_=d,w=m,x=d,k=m,T=y,S=y,E=s.apply(this,arguments)/2,A=E>fT&&(r?+r.apply(this,arguments):hT(f*f+p*p)),O=uT(oT(p-f)/2,+n.apply(this,arguments)),N=O,C=O;if(A>fT){var L=yT(A/f*lT(E)),R=yT(A/p*lT(E));(T-=2*L)>fT?(x+=L*=g?1:-1,k-=L):(T=0,x=k=(d+m)/2),(S-=2*R)>fT?(_+=R*=g?1:-1,w-=R):(S=0,_=w=(d+m)/2)}var P=p*aT(_),I=p*lT(_),M=f*aT(k),D=f*lT(k);if(O>fT){var j,B=p*aT(w),F=p*lT(w),U=f*aT(x),z=f*lT(x);if(y1?0:h<-1?pT:Math.acos(h))/2),G=hT(j[0]*j[0]+j[1]*j[1]);N=uT(O,(f-G)/(W-1)),C=uT(O,(p-G)/(W+1))}else N=C=0}S>fT?C>fT?(v=kT(U,z,P,I,p,C,g),b=kT(B,F,M,D,p,C,g),a.moveTo(v.cx+v.x01,v.cy+v.y01),CfT&&T>fT?N>fT?(v=kT(M,D,B,F,f,-N,g),b=kT(P,I,U,z,f,-N,g),a.lineTo(v.cx+v.x01,v.cy+v.y01),N=h;--f)a.point(g[f],v[f]);a.lineEnd(),a.areaEnd()}y&&(g[l]=+t(p,l,u),v[l]=+e(p,l,u),a.point(r?+r(p,l,u):g[l],n?+n(p,l,u):v[l]))}if(d)return a=null,d+""||null}function l(){return LT().defined(i).curve(s).context(o)}return t="function"==typeof t?t:void 0===t?NT:iT(+t),e="function"==typeof e?e:iT(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?CT:iT(+n),u.x=function(e){return arguments.length?(t="function"==typeof e?e:iT(+e),r=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:iT(+e),u):t},u.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:iT(+t),u):r},u.y=function(t){return arguments.length?(e="function"==typeof t?t:iT(+t),n=null,u):e},u.y0=function(t){return arguments.length?(e="function"==typeof t?t:iT(+t),u):e},u.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:iT(+t),u):n},u.lineX0=u.lineY0=function(){return l().x(t).y(e)},u.lineY1=function(){return l().x(t).y(n)},u.lineX1=function(){return l().x(r).y(e)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:iT(!!t),u):i},u.curve=function(t){return arguments.length?(s=t,null!=o&&(a=s(o)),u):s},u.context=function(t){return arguments.length?(null==t?o=a=null:a=s(o=t),u):o},u}function PT(t,e){return et?1:e>=t?0:NaN}function IT(t){return t}function MT(){var t=IT,e=PT,n=null,r=iT(0),i=iT(mT),o=iT(0);function s(s){var a,c,u,l,h,f=(s=ET(s)).length,p=0,d=new Array(f),m=new Array(f),y=+r.apply(this,arguments),g=Math.min(mT,Math.max(-mT,i.apply(this,arguments)-y)),v=Math.min(Math.abs(g)/f,o.apply(this,arguments)),b=v*(g<0?-1:1);for(a=0;a0&&(p+=h);for(null!=e?d.sort((function(t,n){return e(m[t],m[n])})):null!=n&&d.sort((function(t,e){return n(s[t],s[e])})),a=0,u=p?(g-f*b)/p:0;a0?h*u:0)+b,m[c]={data:s[c],index:a,value:h,startAngle:y,endAngle:l,padAngle:v};return m}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:iT(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:iT(+t),s):r},s.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:iT(+t),s):i},s.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:iT(+t),s):o},s}AT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var DT=BT(OT);function jT(t){this._curve=t}function BT(t){function e(e){return new jT(t(e))}return e._curve=t,e}function FT(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(BT(t)):e()._curve},t}function UT(){return FT(LT().curve(DT))}function zT(){var t=RT().curve(DT),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return FT(n())},delete t.lineX0,t.lineEndAngle=function(){return FT(r())},delete t.lineX1,t.lineInnerRadius=function(){return FT(i())},delete t.lineY0,t.lineOuterRadius=function(){return FT(o())},delete t.lineY1,t.curve=function(t){return arguments.length?e(BT(t)):e()._curve},t}function VT(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}jT.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};class KT{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}class HT{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,e){if(t=+t,e=+e,0===this._point)this._point=1;else{const n=VT(this._x0,this._y0),r=VT(this._x0,this._y0=(this._y0+e)/2),i=VT(t,this._y0),o=VT(t,e);this._context.moveTo(...n),this._context.bezierCurveTo(...r,...i,...o)}this._x0=t,this._y0=e}}function qT(t){return new KT(t,!0)}function WT(t){return new KT(t,!1)}function GT(t){return new HT(t)}function YT(t){return t.source}function $T(t){return t.target}function XT(t){let e=YT,n=$T,r=NT,i=CT,o=null,s=null,a=gT(c);function c(){let c;const u=ST.call(arguments),l=e.apply(this,u),h=n.apply(this,u);if(null==o&&(s=t(c=a())),s.lineStart(),u[0]=l,s.point(+r.apply(this,u),+i.apply(this,u)),u[0]=h,s.point(+r.apply(this,u),+i.apply(this,u)),s.lineEnd(),c)return s=null,c+""||null}return c.source=function(t){return arguments.length?(e=t,c):e},c.target=function(t){return arguments.length?(n=t,c):n},c.x=function(t){return arguments.length?(r="function"==typeof t?t:iT(+t),c):r},c.y=function(t){return arguments.length?(i="function"==typeof t?t:iT(+t),c):i},c.context=function(e){return arguments.length?(null==e?o=s=null:s=t(o=e),c):o},c}function ZT(){return XT(qT)}function JT(){return XT(WT)}function QT(){const t=XT(GT);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const tS=hT(3),eS={draw(t,e){const n=.59436*hT(e+uT(e/28,.75)),r=n/2,i=r*tS;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},nS={draw(t,e){const n=hT(e/pT);t.moveTo(n,0),t.arc(0,0,n,0,mT)}},rS={draw(t,e){const n=hT(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},iS=hT(1/3),oS=2*iS,sS={draw(t,e){const n=hT(e/oS),r=n*iS;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},aS={draw(t,e){const n=.62625*hT(e);t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},cS={draw(t,e){const n=.87559*hT(e-uT(e/7,2));t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},uS={draw(t,e){const n=hT(e),r=-n/2;t.rect(r,r,n,n)}},lS={draw(t,e){const n=.4431*hT(e);t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},hS=lT(pT/10)/lT(7*pT/10),fS=lT(mT/10)*hS,pS=-aT(mT/10)*hS,dS={draw(t,e){const n=hT(.8908130915292852*e),r=fS*n,i=pS*n;t.moveTo(0,-n),t.lineTo(r,i);for(let e=1;e<5;++e){const o=mT*e/5,s=aT(o),a=lT(o);t.lineTo(a*n,-s*n),t.lineTo(s*r-a*i,a*r+s*i)}t.closePath()}},mS=hT(3),yS={draw(t,e){const n=-hT(e/(3*mS));t.moveTo(0,2*n),t.lineTo(-mS*n,-n),t.lineTo(mS*n,-n),t.closePath()}},gS=hT(3),vS={draw(t,e){const n=.6824*hT(e),r=n/2,i=n*gS/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},bS=-.5,_S=hT(3)/2,wS=1/hT(12),xS=3*(wS/2+1),kS={draw(t,e){const n=hT(e/xS),r=n/2,i=n*wS,o=r,s=n*wS+n,a=-o,c=s;t.moveTo(r,i),t.lineTo(o,s),t.lineTo(a,c),t.lineTo(bS*r-_S*i,_S*r+bS*i),t.lineTo(bS*o-_S*s,_S*o+bS*s),t.lineTo(bS*a-_S*c,_S*a+bS*c),t.lineTo(bS*r+_S*i,bS*i-_S*r),t.lineTo(bS*o+_S*s,bS*s-_S*o),t.lineTo(bS*a+_S*c,bS*c-_S*a),t.closePath()}},TS={draw(t,e){const n=.6189*hT(e-uT(e/6,1.7));t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},SS=[nS,rS,sS,uS,dS,yS,kS],ES=[nS,cS,TS,vS,eS,lS,aS];function AS(t,e){let n=null,r=gT(i);function i(){let i;if(n||(n=i=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),i)return n=null,i+""||null}return t="function"==typeof t?t:iT(t||nS),e="function"==typeof e?e:iT(void 0===e?64:+e),i.type=function(e){return arguments.length?(t="function"==typeof e?e:iT(e),i):t},i.size=function(t){return arguments.length?(e="function"==typeof t?t:iT(+t),i):e},i.context=function(t){return arguments.length?(n=null==t?null:t,i):n},i}function OS(){}function NS(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function CS(t){this._context=t}function LS(t){return new CS(t)}function RS(t){this._context=t}function PS(t){return new RS(t)}function IS(t){this._context=t}function MS(t){return new IS(t)}function DS(t,e){this._basis=new CS(t),this._beta=e}CS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:NS(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:NS(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},RS.prototype={areaStart:OS,areaEnd:OS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:NS(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},IS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:NS(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},DS.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],s=t[n]-i,a=e[n]-o,c=-1;++c<=n;)r=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*s),this._beta*e[c]+(1-this._beta)*(o+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const jS=function t(e){function n(t){return 1===e?new CS(t):new DS(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function BS(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function FS(t,e){this._context=t,this._k=(1-e)/6}FS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:BS(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:BS(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const US=function t(e){function n(t){return new FS(t,e)}return n.tension=function(e){return t(+e)},n}(0);function zS(t,e){this._context=t,this._k=(1-e)/6}zS.prototype={areaStart:OS,areaEnd:OS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:BS(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const VS=function t(e){function n(t){return new zS(t,e)}return n.tension=function(e){return t(+e)},n}(0);function KS(t,e){this._context=t,this._k=(1-e)/6}KS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:BS(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const HS=function t(e){function n(t){return new KS(t,e)}return n.tension=function(e){return t(+e)},n}(0);function qS(t,e,n){var r=t._x1,i=t._y1,o=t._x2,s=t._y2;if(t._l01_a>fT){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>fT){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/l,s=(s*u+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,s,t._x2,t._y2)}function WS(t,e){this._context=t,this._alpha=e}WS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:qS(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const GS=function t(e){function n(t){return e?new WS(t,e):new FS(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function YS(t,e){this._context=t,this._alpha=e}YS.prototype={areaStart:OS,areaEnd:OS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:qS(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const $S=function t(e){function n(t){return e?new YS(t,e):new zS(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function XS(t,e){this._context=t,this._alpha=e}XS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:qS(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ZS=function t(e){function n(t){return e?new XS(t,e):new KS(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function JS(t){this._context=t}function QS(t){return new JS(t)}function tE(t){return t<0?-1:1}function eE(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),s=(n-t._y1)/(i||r<0&&-0),a=(o*i+s*r)/(r+i);return(tE(o)+tE(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function nE(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function rE(t,e,n){var r=t._x0,i=t._y0,o=t._x1,s=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,i+a*e,o-a,s-a*n,o,s)}function iE(t){this._context=t}function oE(t){this._context=new sE(t)}function sE(t){this._context=t}function aE(t){return new iE(t)}function cE(t){return new oE(t)}function uE(t){this._context=t}function lE(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),s=new Array(r);for(i[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(s[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e1)for(var n,r,i,o=1,s=t[e[0]],a=s.length;o=0;)n[e]=e;return n}function vE(t,e){return t[e]}function bE(t){const e=[];return e.key=t,e}function _E(){var t=iT([]),e=gE,n=yE,r=vE;function i(i){var o,s,a=Array.from(t.apply(this,arguments),bE),c=a.length,u=-1;for(const t of i)for(o=0,++u;o0){for(var n,r,i,o=0,s=t[0].length;o0)for(var n,r,i,o,s,a,c=0,u=t[e[0]].length;c0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=s,r[0]=s+=i):(r[0]=0,r[1]=i)}function kE(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],o=i.length;r0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,o=0,s=1;so&&(o=e,r=n);return r}function AE(t){var e=t.map(OE);return gE(t).sort((function(t,n){return e[t]-e[n]}))}function OE(t){for(var e,n=0,r=-1,i=t.length;++r=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var RE="%Y-%m-%dT%H:%M:%S.%LZ",PE=Date.prototype.toISOString?function(t){return t.toISOString()}:B_(RE);const IE=PE;var ME=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:F_(RE);const DE=ME;function jE(t,e,n){var r=new so,i=e;return null==e?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(t,e,n){e=+e,n=null==n?io():+n,r._restart((function o(s){s+=i,r._restart(o,i+=e,n),t(s)}),e,n)},r.restart(t,e,n),r)}const BE=t=>()=>t;function FE(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function UE(t,e,n){this.k=t,this.x=e,this.y=n}UE.prototype={constructor:UE,scale:function(t){return 1===t?this:new UE(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new UE(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var zE=new UE(1,0,0);function VE(t){for(;!t.__zoom;)if(!(t=t.parentNode))return zE;return t.__zoom}function KE(t){t.stopImmediatePropagation()}function HE(t){t.preventDefault(),t.stopImmediatePropagation()}function qE(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function WE(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function GE(){return this.__zoom||zE}function YE(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function $E(){return navigator.maxTouchPoints||"ontouchstart"in this}function XE(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],s=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function ZE(){var t,e,n,r=qE,i=WE,o=XE,s=YE,a=$E,c=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],l=250,h=Dg,f=_n("start","zoom","end"),p=500,d=150,m=0,y=10;function g(t){t.property("__zoom",GE).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",S).on("dblclick.zoom",E).filter(a).on("touchstart.zoom",A).on("touchmove.zoom",O).on("touchend.zoom touchcancel.zoom",N).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(t,e){return(e=Math.max(c[0],Math.min(c[1],e)))===t.k?t:new UE(e,t.x,t.y)}function b(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new UE(t.k,r,i)}function _(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function w(t,e,n,r){t.on("start.zoom",(function(){x(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){x(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,o=arguments,s=x(t,o).event(r),a=i.apply(t,o),c=null==n?_(a):"function"==typeof n?n.apply(t,o):n,u=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),l=t.__zoom,f="function"==typeof e?e.apply(t,o):e,p=h(l.invert(c).concat(u/l.k),f.invert(c).concat(u/f.k));return function(t){if(1===t)t=f;else{var e=p(t),n=u/e[2];t=new UE(n,c[0]-e[0]*n,c[1]-e[1]*n)}s.zoom(null,t)}}))}function x(t,e,n){return!n&&t.__zooming||new k(t,e)}function k(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,e),this.taps=0}function T(t,...e){if(r.apply(this,arguments)){var n=x(this,e).event(t),i=this.__zoom,a=Math.max(c[0],Math.min(c[1],i.k*Math.pow(2,s.apply(this,arguments)))),l=Wi(t);if(n.wheel)n.mouse[0][0]===l[0]&&n.mouse[0][1]===l[1]||(n.mouse[1]=i.invert(n.mouse[0]=l)),clearTimeout(n.wheel);else{if(i.k===a)return;n.mouse=[l,i.invert(l)],Eo(this),n.start()}HE(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),d),n.zoom("mouse",o(b(v(i,a),n.mouse[0],n.mouse[1]),n.extent,u))}}function S(t,...e){if(!n&&r.apply(this,arguments)){var i=t.currentTarget,s=x(this,e,!0).event(t),a=Ir(t.view).on("mousemove.zoom",(function(t){if(HE(t),!s.moved){var e=t.clientX-l,n=t.clientY-h;s.moved=e*e+n*n>m}s.event(t).zoom("mouse",o(b(s.that.__zoom,s.mouse[0]=Wi(t,i),s.mouse[1]),s.extent,u))}),!0).on("mouseup.zoom",(function(t){a.on("mousemove.zoom mouseup.zoom",null),Ur(t.view,s.moved),HE(t),s.event(t).end()}),!0),c=Wi(t,i),l=t.clientX,h=t.clientY;Fr(t.view),KE(t),s.mouse=[c,this.__zoom.invert(c)],Eo(this),s.start()}}function E(t,...e){if(r.apply(this,arguments)){var n=this.__zoom,s=Wi(t.changedTouches?t.changedTouches[0]:t,this),a=n.invert(s),c=n.k*(t.shiftKey?.5:2),h=o(b(v(n,c),s,a),i.apply(this,e),u);HE(t),l>0?Ir(this).transition().duration(l).call(w,h,s,t):Ir(this).call(g.transform,h,s,t)}}function A(n,...i){if(r.apply(this,arguments)){var o,s,a,c,u=n.touches,l=u.length,h=x(this,i,n.changedTouches.length===l).event(n);for(KE(n),s=0;s g").attr("transform","".concat(i," ").concat(o))}},{key:"getSourcesId",value:function(t){return this.pluginData.scene.selection.includes(t.subject.datum().data.id)?this.pluginData.scene.selection:[t.subject.datum().data.id]}},{key:"getSourcePosition",value:function(t){var e=this.viewport.select(".".concat(t," .model"));return{x:parseFloat(e.attr("x")),y:parseFloat(e.attr("y"))}}},{key:"getTargetsByDepth",value:function(t){var e=this,n=t.subject.datum().data.id,r=t.sourceEvent,i=r.clientX,o=r.clientY,s=[];return this.viewport.selectAll("g.component.container:not(.".concat(n,")")).each((function(t){var n=e.viewport.select(".".concat(t.data.id," .background")).node().getBoundingClientRect(),r=n.x,a=n.y,c=n.width,u=n.height;if(i>=r&&i<=r+c&&o>=a&&o<=a+u){for(var l=parseInt(e.viewport.select(".".concat(t.data.id)).attr("depth"),10)-1;s.length<=l;)s.push([]);s[l].push(t.data.id)}})),s}},{key:"getTargetsId",value:function(t){return this.getTargetsByDepth(t).flat().reverse()}},{key:"getTargetId",value:function(t){return this.getTargetsId(t)[0]}},{key:"getTransform",value:function(t,e){var n=this.viewport.select(t).node().getBoundingClientRect(),r=n.x,i=n.y,o=this.viewport.select(e).node().getBoundingClientRect();return{dx:r-o.x,dy:i-o.y}}}],e&&function(t,e){for(var n=0;nh?p:h),r.attr("height",d>f?d:f);var m=this.viewport.select(".".concat(e.data.id," .components-background")),y=m.node().getBoundingClientRect();return h=Math.max((s-y.x)/n,e.data.definition.minWidth-e.data.definition.reservedWidth),f=Math.max((a-y.y)/n,e.data.definition.minHeight-e.data.definition.reservedHeight),p=(u-y.x)/n,d=(l-y.y)/n,m.attr("width",p>h?p:h),m.attr("height",d>f?d:f),!1}},{key:"finalize",value:function(t){var e=t.subject.datum().data.id,n=this.viewport.select(".".concat(e," .model")),r=this.pluginData.getComponentById(e);return r.drawOption.width=parseFloat(n.attr("width")),r.drawOption.height=parseFloat(n.attr("height")),this.pluginData.emitEvent({components:[e],type:"Drawer",action:"resize",status:"success"}),!0}},{key:"getMaxPosition",value:function(t){var e=this,n=this.pluginData.getComponentById(t),r=0,i=0;return this.pluginData.getChildren(t).forEach((function(t){var o=e.viewport.select(".".concat(t.id," .model")).node().getBoundingClientRect(),s=o.x,a=o.y,c=o.width,u=o.height;r=Math.max(r,s+c+n.definition.margin),i=Math.max(i,a+u+n.definition.margin)})),{x:r,y:i}}}],r&&function(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=Array(e);nt.length)&&(e=t.length);for(var n=0,r=Array(e);n0,hasWarning:r>0,numberOfErrors:n,numberOfWarnings:r,hasX:!!t.drawOption.x,hasY:!!t.drawOption.y,isSelected:this.pluginData.scene.selection.includes(t.id),getIcon:function(t){return e.pluginData.resources.icons[t]},canHaveLink:this.pluginData.canHaveLink(t.definition.type),getAttribute:function(e){return t.attributes.find((function(t){return t.name===e}))}})}}],e&&function(t,e){for(var n=0;n0&&this.pluginData.emitEvent({components:o,type:"Drawer",action:"move",status:"success"}),s.length>0&&this.pluginData.emitEvent({components:s,type:"Drawer",action:"resize",status:"success"}),!0}},{key:"getNodes",value:function(){var t=this,e={id:"root",parent:null,children:[],depth:0,type:"default",isContainer:!0,margin:this.pluginData.configuration.rootContainer.margin,gap:this.pluginData.configuration.rootContainer.gap},n=new Map(this.pluginData.components.map((function(e){return[e.id,t.createNode(e)]})));return n.set("root",e),n.forEach((function(t){if(t.parent){var e=n.get(t.parent);t.parent=e,e.children.push(t)}})),n}},{key:"createNode",value:function(t){return{id:t.id,parent:t.getContainerId()||"root",type:t.definition.displayType||"default",direction:t.definition.workflowDirection,children:[],depth:this.pluginData.getComponentDepth(t.id)+1,isContainer:t.definition.isContainer,width:t.definition.defaultWidth,height:t.definition.defaultHeight,minWidth:t.definition.minWidth,minHeight:t.definition.minHeight,reservedWidth:t.definition.reservedWidth,reservedHeight:t.definition.reservedHeight,margin:t.definition.margin,gap:t.definition.gap,x:t.drawOption.x,y:t.drawOption.y}}},{key:"generateLayout",value:function(t,e,n){var r=this;e.children.forEach((function(e){r.generateLayout(t,e,n)})),e.isContainer&&"default"===e.type?this.generateDefaultLayout(e,n):e.isContainer&&this.generateWorkflowLayout(t,e)}},{key:"generateDefaultLayout",value:function(t,e){this.text=0;var n=[],r=[],i=t.margin,o=t.gap,s=t.minWidth,a=t.minHeight,c=t.reservedWidth,u=t.reservedHeight,l=0,h=0;t.children.forEach((function(t){t.x&&t.y&&e?(n.push(t),l=Math.max(t.x+t.width,l),h=Math.max(t.y+t.height,h)):r.push(t)}));for(var f,p=0,d=0,m=this.getPoints(p,i,o);r.length>0;)f||(f=r[0]),0===m.length&&(d=0,p+=1,m=this.getPoints(p,i,o)),m.length>0&&this.canBePlaced(n,f,m[d])&&(f.x=m[d].x,f.y=m[d].y,l=Math.max(f.x+f.width,l),h=Math.max(f.y+f.height,h),n.push(f),r.shift(),f=null),(d+=1)>=m.length&&(d=0,p+=1,m=this.getPoints(p,i,o));t.width=Math.max(l+i+c,s),t.height=Math.max(h+i+u,a)}},{key:"canBePlaced",value:function(t,e,n){return t.every((function(t){var r=t.x,i=t.y,o=t.width,s=t.height,a=n.x+e.widthr+o,u=n.y+e.heighti+s;return a||c||u||l}))}},{key:"getPoints",value:function(t,e,n){if(0===t)return[{x:e,y:e}];for(var r=e+n*t,i=e+n*t,o=[],s=e,a=e;a<=r&&(a!==r||i!==s);)o.push({x:a,y:i}),a+=n,o.push({x:r,y:s}),s+=n;return o.push({x:r,y:i}),o}},{key:"generateWorkflowLayout",value:function(t,e){"vertical"===e.direction?this.generateVerticalWorkflowLayout(t,e):this.generateHorizontalWorkflowLayout(t,e)}},{key:"generateHorizontalWorkflowLayout",value:function(t,e){var n=e.margin,r=e.gap,i=e.minWidth,o=e.minHeight,s=e.reservedWidth,a=e.reservedHeight,c=n,u=0;e.children.forEach((function(t){t.x=c,t.y=n,c=t.x+t.width+r,t.height>u&&(u=t.height)})),e.width=Math.max(c-r+n+s,i),e.height=Math.max(u+2*n+a,o)}},{key:"generateVerticalWorkflowLayout",value:function(t,e){var n=e.margin,r=e.gap,i=e.minWidth,o=e.minHeight,s=e.reservedWidth,a=e.reservedHeight,c=n,u=0;e.children.forEach((function(t){t.x=n,t.y=c,c=t.y+t.height+r,t.width>u&&(u=t.width)})),e.width=Math.max(u+2*n+s,i),e.height=Math.max(c-r+n+a,o)}},{key:"resize",value:function(t){var e=this.pluginData.getComponentById(t);if(!e.definition.isContainer)return!1;var n=0,r=0;this.pluginData.getChildren(t).forEach((function(t){var e=t.drawOption.x+t.drawOption.width,i=t.drawOption.y+t.drawOption.height;e>n&&(n=e),i>r&&(r=i)}));var i=e.definition,o=i.minWidth,s=i.minHeight,a=i.reservedWidth,c=i.reservedHeight,u=i.margin,l=Math.max(n+2*u+a,o),h=Math.max(r+2*u+c,s);return l===e.drawOption.width&&h===e.drawOption.height||(e.drawOption.width=l,e.drawOption.height=h,this.pluginData.emitEvent({components:[t],type:"Drawer",action:"resize",status:"success"})),!0}}],r&&function(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=Array(e);n=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=r.call(s,"catchLoc"),u=r.call(s,"finallyLoc");if(c&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),N(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;N(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function cN(t,e,n,r,i,o,s){try{var a=t[o](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}function uN(t){var e=function(t){if("object"!=eN(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=eN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==eN(e)?e:e+""}var lN=function(){return e=function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.pluginData=n,this.componentRenderer=null,this.linkRenderer=null,this.layout=null,this.viewport=null,this.scene=null,this.d3=t,this.actions={deleteAction:null,dragComponent:null,dragScene:null,linkAction:null,menuAction:null,resizeComponent:null,toggleSelection:null,selectionAll:null,deselectionAll:null,zoom:null},this.states={linking:!1,menuOpening:!1,moving:!1,resizing:!1,selection:!1},this.readOnly=!1},n=[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.d3.select("#".concat(t)).selectAll(null).remove(),this.d3.select("#".concat(t)).html(""),this.viewport=this.d3.select("#".concat(t)),this.componentRenderer=this.initComponentRenderer(e),this.linkRenderer=this.initLinkRenderer(e),this.layout=new tN(this.pluginData,this.viewport),this.readOnly=e,this.clearActions(),this.readOnly&&(this.pluginData.scene.x=0,this.pluginData.scene.y=0,this.pluginData.scene.zoom=1),this.initActions(),this.initScene()}},{key:"initComponentRenderer",value:function(t){return new FO(this.pluginData,this.viewport,t)}},{key:"initLinkRenderer",value:function(t){return new KO(this.pluginData,this.viewport,t)}},{key:"clearActions",value:function(){this.actions.deleteAction=null,this.actions.dragComponent=null,this.actions.dragScene=null,this.actions.menuAction=null,this.actions.resizeComponent=null,this.actions.toggleSelection=null,this.actions.selectionAll=null,this.actions.deselectionAll=null,this.actions.zoom=null,this.viewport.on("wheel",null),this.d3.select("body").on("keydown",null).on("keyup",null),this.viewport.on(".drag",null)}},{key:"initActions",value:function(){var t=this;this.actions.selectionAll=new kO(this.pluginData,this.viewport,this.layout),this.actions.deleteAction=new uA(this.pluginData,this.viewport,this.layout),this.actions.dragScene=new SA(this.pluginData,this.viewport,this.layout),this.actions.menuAction=new zA(this.pluginData,this.viewport,this.layout),this.actions.link=new PA(this.pluginData,this.viewport,this.layout),this.actions.zoom=new LO(this.pluginData,this.viewport,this.layout),this.actions.dragComponent=new gA(this.pluginData,this.viewport,this.layout),this.actions.resizeComponent=new $A(this.pluginData,this.viewport,this.layout),this.actions.toggleSelection=new oO(this.pluginData,this.viewport,this.layout),this.actions.deselectionAll=new pO(this.pluginData,this.viewport,this.layout),this.viewport.on("wheel",(function(e){t.actions.zoom.execute(e)&&t.draw()})),this.readOnly||this.d3.select("body").on("keydown",(function(e){var n=!1;t.pluginData.configuration.keysBinding.selection.includes(e.key)&&(t.states.selection=!0),t.pluginData.configuration.keysBinding.deleteObject.includes(e.key)&&(n=t.actions.deleteAction.execute(e)),t.pluginData.configuration.keysBinding.selectAll.includes(e.key)&&(n=t.actions.selectionAll.execute(e)),t.pluginData.configuration.keysBinding.deselectAll.includes(e.key)&&(n=t.actions.deselectionAll.execute(e)),n&&t.draw()})).on("keyup",(function(e){var n=!1;t.pluginData.configuration.keysBinding.selection.includes(e.key)&&(t.states.selection=!1),t.pluginData.configuration.keysBinding.deleteObject.includes(e.key)&&(n=t.actions.deleteAction.finalize(e)),t.pluginData.configuration.keysBinding.selectAll.includes(e.key)&&(n=t.actions.selectionAll.finalize(e)),t.pluginData.configuration.keysBinding.deselectAll.includes(e.key)&&(n=t.actions.deselectionAll.finalize(e)),n&&t.draw()}));var e=this.d3.drag().subject((function(e){var n=e.sourceEvent.target.closest(".component");if(t.states.resizing=!!e.sourceEvent.target.closest(".resize-button"),t.states.menuOpening=!!e.sourceEvent.target.closest(".menu-button"),!n)return t.scene;var r=t.viewport.select(Array.from(n.classList).map((function(t){return".".concat(t)})).join(""));return t.states.linking=!!e.sourceEvent.target.closest(".anchor")&&t.pluginData.canHaveLink(r.datum().data.definition.type),r})).on("drag",(function(e){t.states.moving=!0;var n="scene"===e.subject.datum().data.id,r=!1;t.readOnly?t.actions.dragScene.execute(e):(n?r=t.actions.dragScene.execute(e):t.states.linking?(r=t.actions.link.execute(e),t.linkRenderer.render()):t.states.resizing?(r=t.actions.resizeComponent.execute(e),t.linkRenderer.render()):(r=t.actions.dragComponent.execute(e),t.linkRenderer.render()),r&&t.draw())})).on("end",function(){var e,n=(e=aN().mark((function e(n){var r,i,o,s,a,c,u;return aN().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.states.moving,i=t.states.selection,o=t.states.menuOpening,s=t.states.resizing,a=t.states.linking,c="scene"===n.subject.datum().data.id,u=!1,!t.readOnly){e.next=10;break}return c&&r&&t.actions.dragScene.finalize(n),e.abrupt("return");case 10:a?u=t.actions.link.finalize(n):r&&c?u=t.actions.dragScene.finalize(n):s?u=t.actions.resizeComponent.finalize(n):r&&!c?u=t.actions.dragComponent.finalize(n):!r&&o?u=t.actions.menuAction.finalize(n):r||c||!i||(u=t.actions.toggleSelection.finalize(n)),u&&t.draw(),t.states.moving=!1;case 13:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(t){cN(o,r,i,s,a,"next",t)}function a(t){cN(o,r,i,s,a,"throw",t)}s(void 0)}))});return function(t){return n.apply(this,arguments)}}());this.viewport.call(e)}},{key:"getScene",value:function(){return this.viewport.selectAll(".scene").data(this.getSceneData()).join("svg").attr("class","scene").attr("width","100%").attr("height","100%")}},{key:"initScene",value:function(){var t=this;this.viewport.append("style").text(this.pluginData.resources.style),this.scene=this.getScene(),this.scene.attr("version","1.1"),this.scene.attr("xmlns","http://www.w3.org/2000/svg"),this.scene.append("defs").html(Object.keys(this.pluginData.resources.markers).map((function(e){return t.pluginData.resources.markers[e]})).join(""));var e=this.pluginData.scene,n=e.x,r=e.y,i=e.zoom,o="translate(".concat(n," ").concat(r,") scale(").concat(i,")");this.scene.append("g").attr("class","components").attr("transform",o),this.scene.append("g").attr("class","links").attr("transform",o)}},{key:"draw",value:function(){if(this.scene=this.getScene(),this.componentRenderer.render("scene"),this.linkRenderer.render("scene"),this.readOnly){for(var t=this.viewport.node().getBoundingClientRect(),e=t.width,n=t.height,r=this.viewport.select(".scene .components").node().getBBox(),i=r.width,o=r.height,s=r.x,a=r.y,c=e/ic;)u*=.9;this.scene.attr("viewBox","".concat(s-15," ").concat(a-15," ").concat(i+s+15," ").concat(o+a+15)),this.pluginData.scene.zoom=u}}},{key:"arrangeComponentsPosition",value:function(t,e){this.layout.generateComponentsLayout(t,e)}},{key:"resize",value:function(t){this.layout.resize(t)}},{key:"getSceneData",value:function(){var t=this;return[this.d3.hierarchy(oN({id:"scene",name:"",children:nN(this.pluginData.components.filter((function(t){return null===t.getContainerId()})))},this.pluginData.scene),(function(e){return"scene"===e.id?e.children:t.pluginData.getChildren(e.id)}))]}},{key:"dropComponent",value:function(t,e){var n=e.target.closest(".component");if(t.drawOption.width=t.definition.width,t.drawOption.height=t.definition.height,!n){var r=this.viewport.select(".scene").node().getBoundingClientRect(),i=r.x,o=r.y;return t.drawOption.x=(e.clientX-i-this.pluginData.scene.x)/this.pluginData.scene.zoom-t.definition.defaultWidth/2,void(t.drawOption.y=(e.clientY-o-this.pluginData.scene.y)/this.pluginData.scene.zoom-t.definition.defaultHeight/2)}if(n.canContain(t.definition.type)){var s=this.viewport.select(".".concat(t.id,".container")).node().getBoundingClientRect(),a=s.x,c=s.y;t.drawOption.x=(e.clientX-a-this.pluginData.scene.x)/this.pluginData.scene.zoom-t.definition.defaultWidth/2,t.drawOption.y=(e.clientY-c-this.pluginData.scene.y)/this.pluginData.scene.zoom-t.definition.defaultHeight/2}}},{key:"exportSvg",value:function(t){return this.viewport.selectAll(".scene > g").attr("transform",""),document.querySelector("#".concat(t," .scene")).outerHTML}}],n&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[]).map((function(t){return t.path}))}},{key:"parseConfiguration",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.pluginData.emitEvent({parent:r,type:"Parser",action:"read",status:"running",files:[e.path],data:{global:!1}});if(null!=e.content){var o=JSON.parse(e.content);o[t.path]?o[t.path][this.pluginData.name]?(Object.keys(o[t.path][this.pluginData.name]).forEach((function(e){var r=n.pluginData.getComponentByConfigurationKey(e);r&&o[t.path][n.pluginData.name][e]&&(r.drawOption=new g(o[t.path][n.pluginData.name][e]))})),this.pluginData.emitEvent({id:i,status:"success"})):this.pluginData.emitEvent({id:i,status:"warning",data:{code:"no_plugin_content",global:!1}}):this.pluginData.emitEvent({id:i,status:"warning",data:{code:"no_diagram_content",global:!1}})}else this.pluginData.emitEvent({id:i,status:"warning",data:{code:"no_content",global:!1}})}},{key:"isParsable",value:function(t){return null!=t}}],e&&function(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(t,e){return t[e.path]="",t}),{});return this.renderFiles(t).forEach((function(t){e[t.path]=t.content})),Object.keys(e).map((function(t){return new $({path:t,content:e[t]})}))}},{key:"renderFiles",value:function(){return[]}},{key:"renderConfiguration",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.pluginData.emitEvent({parent:r,type:"Render",action:"write",status:"running",files:[e.path],data:{global:!1}}),o=JSON.parse(e.content)||{};o[t.path]||(o[t.path]={}),o[t.path][this.pluginData.name]={},this.pluginData.components.filter((function(t){return t.drawOption})).forEach((function(e){var r=e.getConfigurationKey();o[t.path][n.pluginData.name][r]=e.drawOption})),e.content=JSON.stringify(o,(function(t,e){return null===e?void 0:e}),2),this.pluginData.emitEvent({id:i,status:"success"})}}],e&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{id:null,parentId:null,files:null,components:null,links:null,type:null,action:null,status:null,data:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.id,r=e.parentId,i=e.files,o=e.components,s=e.links,a=e.type,c=e.action,u=e.status,l=e.data;this.id=n||null,this.parentId=r||null,this.startDate=null,this.endDate=null,this.files=i||null,this.components=o||null,this.links=s||null,this.type=a||null,this.action=c||null,this.status=u||null,this.data=l||null}));const SN=TN;function EN(t){return EN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},EN(t)}function AN(t,e,n){return e=NN(e),function(t,e){if(e&&("object"==EN(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ON()?Reflect.construct(e,n||[],NN(t).constructor):e.apply(t,n))}function ON(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ON=function(){return!!t})()}function NN(t){return NN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},NN(t)}function CN(t,e){return CN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},CN(t,e)}var LN=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{anchorName:null};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=AN(this,e,[n])).anchorName=n.anchorName||null,t.endX=null,t.endY=null,t.isTemporary=!0,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&CN(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(U);const RN=LN;function PN(t){return PN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},PN(t)}function IN(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n1&&void 0!==arguments[1]?arguments[1]:{name:null,version:null,components:[],variables:[],definitions:{components:[],links:[]},parseLogs:[],resources:{},scene:{x:0,y:0,zoom:1,selection:[],selectionRef:null}},m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=d.name||null,this.version=d.version||null,this.components=d.components||[],this.scene={x:(null===(n=d.scene)||void 0===n?void 0:n.x)||0,y:(null===(r=d.scene)||void 0===r?void 0:r.y)||0,zoom:(null===(i=d.scene)||void 0===i?void 0:i.zoom)||1,selection:(null===(o=d.scene)||void 0===o?void 0:o.selection)||[],selectionRef:(null===(s=d.scene)||void 0===s?void 0:s.selectionRef)||null},this.variables=d.variables||[],this.definitions={components:(null===(a=d.definitions)||void 0===a?void 0:a.components)||[],links:(null===(c=d.definitions)||void 0===c?void 0:c.links)||[]},this.parseLogs=d.parseLogs||[],this.__eventIndex=0,this.eventManager=m,this.eventLogs=[],this.configuration=e,this.resources={icons:DN({},null===(u=d.resources)||void 0===u?void 0:u.icons),markers:DN({},null===(l=d.resources)||void 0===l?void 0:l.markers),links:DN({},null===(h=d.resources)||void 0===h?void 0:h.links),models:DN({},null===(f=d.resources)||void 0===f?void 0:f.models),style:(null===(p=d.resources)||void 0===p?void 0:p.style)||""},this.temporaryLink=null},e=[{key:"coreVersion",get:function(){return"0.27.2"}},{key:"getComponentById",value:function(t){return this.components.find((function(e){return e.id===t}))||null}},{key:"getComponentDepth",value:function(t){var e=this.getComponentById(t).getContainerId();return e?this.getComponentDepth(e)+1:0}},{key:"getComponentByConfigurationKey",value:function(t){return this.getComponentById(t)}},{key:"renameComponentExternalId",value:function(t,e){this.getComponentById(t).setExternalId(e)}},{key:"getComponentsByType",value:function(t){return this.components.filter((function(e){var n=e.definition;return n&&n.type===t}))}},{key:"addComponent",value:function(t,e){var n=this.generateComponentId();return this.components.push(new S({id:n,name:n,definition:t,path:e})),n}},{key:"generateComponentId",value:function(){var t=this.components.map((function(t){return t.id})).filter((function(t){return new RegExp("".concat("id_","\\d+")).test(t)})).map((function(t){return parseInt(t.substring(3),10)})),e=0===t.length?1:Math.max.apply(Math,function(t){return function(t){if(Array.isArray(t))return IN(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return IN(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?IN(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t))+1;return"".concat("id_").concat(e)}},{key:"removeComponentById",value:function(t){var e=this;this.getChildren(t).forEach((function(t){return e.removeComponentById(t.id)})),this.components=this.components.filter((function(e){return e.id!==t})),this.components.forEach((function(e){e.removeLinkAttribute(t)}))}},{key:"removeLink",value:function(t){var e=t.source,n=t.target,r=t.definition.attributeRef;this.getComponentById(e).removeLinkAttribute(n,r)}},{key:"getLinks",value:function(){var t=this,e=[];return this.definitions.links.forEach((function(n){t.getComponentsByType(n.sourceRef).forEach((function(r){var i=r.getAttributeByName(n.attributeRef);i&&t.getLinkedComponentsIds(i).forEach((function(t){return e.push(new U({definition:n,source:r.id,target:t,isReverse:"Reverse"===i.definition.linkType}))}))}))})),this.temporaryLink&&e.push(this.temporaryLink),e.concat(this.getWorkflowLinks())}},{key:"getAttributeValue",value:function(t){return t.isVariable?this.getVariableValue(t.value):t.value}},{key:"getLinkedComponentsIds",value:function(t){var e=this.getAttributeValue(t);return null===e?[]:Array.isArray(e)?e:[e]}},{key:"getVariableValue",value:function(t){var e;return(null===(e=this.variables.find((function(e){return e.name===t})))||void 0===e?void 0:e.value)||null}},{key:"setVariableValue",value:function(t,e){var n=this.variables.find((function(e){return e.name===t}));n&&(n.value=e)}},{key:"getComponentIdFromValue",value:function(t){return t}},{key:"canHaveLink",value:function(t){return this.definitions.links.some((function(e){return e.sourceRef===t}))}},{key:"canBeLinked",value:function(t,e){return this.definitions.links.some((function(n){var r=n.sourceRef,i=n.targetRef;return r===t&&i===e}))}},{key:"createTemporaryLink",value:function(t,e){this.temporaryLink=new RN({anchorName:e,source:t,definition:this.definitions.links.find((function(t){return t.isTemporary}))})}},{key:"getWorkflowLinks",value:function(){var t=this;return this.components.filter((function(t){var e;return null===(e=t.definition.displayType)||void 0===e?void 0:e.match("workflow")})).reduce((function(e,n){var r=t.getChildren(n.id);if(r.length>1)for(var i=0;in,this.components.splice(i,0,r),this.components.splice(n+(it}))}},{key:"emitEvent",value:function(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.id;return r?(e=this.getEventLogById(r),Object.keys(n).forEach((function(t){e[t]=n[t]}))):(this.__eventIndex+=1,r=this.__eventIndex,(e=new SN(DN(DN({},n),{},{id:r}))).startDate=Date.now(),this.eventLogs.push(e)),["success","warning","error"].includes(e.status)&&(e.endDate=Date.now()),null!==(t=this.eventManager)&&void 0!==t&&t.next&&this.eventManager.next({plugin:this.name,event:DN({},e)}),r}}],e&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{editor:{syntax:null},restrictiveFolder:null,defaultFileName:null,defaultFileExtension:null,tags:[],isFolderTypeDiagram:!0,extraResources:[],rootContainer:{margin:30,gap:50},container:{margin:30,gap:50},keysBinding:{},i18n:{}};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.editor=KN({syntax:null},s.editor),this.restrictiveFolder=s.restrictiveFolder||null,this.defaultFileName=s.defaultFileName||null,this.defaultFileExtension=s.defaultFileExtension||null,this.tags=s.tags||[],this.isFolderTypeDiagram=null===(e=s.isFolderTypeDiagram)||void 0===e||e,this.extraResources=s.extraResources||[],this.rootContainer={margin:(null===(n=s.rootContainer)||void 0===n?void 0:n.margin)||30,gap:(null===(r=s.rootContainer)||void 0===r?void 0:r.gap)||50},this.container={margin:(null===(i=s.container)||void 0===i?void 0:i.margin)||30,gap:(null===(o=s.container)||void 0===o?void 0:o.gap)||50},this.keysBinding=KN({moveSceneUp:["ArrowUp"],moveSceneDown:["ArrowDown"],moveSceneLeft:["ArrowLeft"],moveSceneRight:["ArrowRight"],moveComponentUp:[],moveComponentDown:[],moveComponentLeft:[],moveComponentRight:[],zoomIn:["+"],zoomOut:["-"],deleteObject:["Delete"],editComponent:[",","?"],selection:["Shift"],selectAll:["A"],deselectAll:["D"]},s.keysBinding),this.i18n=s.i18n||{}}));const GN=WN;function YN(t){return YN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},YN(t)}function $N(t){var e=function(t){if("object"!=YN(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=YN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==YN(e)?e:e+""}var XN=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{event:null,configuration:null,pluginData:null,pluginDrawer:null,pluginMetadata:null,pluginParser:null,pluginRenderer:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.configuration=e.configuration||new GN,this.data=e.pluginData||new UN(this.configuration,{},e.event),this.__drawer=e.pluginDrawer||new hN(this.data),this.__metadata=e.pluginMetadata||new mN(this.data),this.__parser=e.pluginParser||new bN(this.data),this.__renderer=e.pluginRenderer||new kN(this.data)},e=[{key:"init",value:function(){var t=this.data.emitEvent({type:"Plugin",action:"init",status:"running"});this.__metadata.parse(t),this.data.initLinkDefinitions(t),this.data.emitEvent({id:t,status:"success"})}},{key:"initResources",value:function(t){this.data.resources=t}},{key:"initDrawer",value:function(t,e){this.__drawer.init(t,e)}},{key:"draw",value:function(){this.__drawer.draw()}},{key:"parse",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=this.data.emitEvent({type:"Parser",action:"read",status:"running",files:n.map((function(t){return t.path})).concat(null==e?void 0:e.path),data:{global:!0}});this.__parser.parse(t,n,r),this.__parser.parseConfiguration(t,e,r),this.data.emitEvent({id:r,status:"success"})}},{key:"isParsable",value:function(t){return this.__parser.isParsable(t)}},{key:"getModels",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.__parser.getModels(e.filter((function(e){return t.isParsable(e)})))}},{key:"render",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=this.data.emitEvent({type:"Render",action:"write",status:"running",files:n.map((function(t){return t.path})).concat(e.path),data:{global:!0}});this.__renderer.renderConfiguration(t,e,r);var i=this.__renderer.render(n,r).concat(e);return this.data.emitEvent({id:r,status:"success"}),i}},{key:"arrangeComponentsPosition",value:function(t,e){this.__drawer.arrangeComponentsPosition(t,e)}},{key:"resize",value:function(t){this.__drawer.resize(t)}},{key:"exportSvg",value:function(t){this.__drawer.init(t,!0),this.draw();var e=this.__drawer.exportSvg(t);return this.__drawer.init(t,!1),this.draw(),e}},{key:"getComponentPosition",value:function(t,e){var n=e.x,r=e.y,i=this.__drawer.actions.zoom,o=i.scale,s=i.translate,a=document.querySelector("#".concat(t)).getBoundingClientRect(),c=a.left,u=a.top;return{x:(n-c-s.x)/o,y:(r-u-s.y)/o}}},{key:"addComponent",value:function(t,e,n,r){var i=this.data.addComponent(e,n),o=this.data.getComponentById(i);if(t){var s=this.data.getComponentById(t);o.setReferenceAttribute(s)}return r&&this.__drawer.dropComponent(o,r),i}}],e&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{type:null,value:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.type,r=e.value;this.type=n||null,this.value=r||null}));const QN=JN;function tC(t){return tC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tC(t)}function eC(t,e,n){return e=rC(e),function(t,e){if(e&&("object"==tC(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,nC()?Reflect.construct(e,n||[],rC(t).constructor):e.apply(t,n))}function nC(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(nC=function(){return!!t})()}function rC(t){return rC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rC(t)}function iC(t,e){return iC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},iC(t,e)}var oC=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{name:null,type:null,value:null,category:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=eC(this,e,[n]);var r=n.name,i=n.type,o=n.value,s=n.category;return t.__class="Variable",t.name=r||null,t.type=i||null,t.value=o||null,t.category=s||null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&iC(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(m);const sC=oC})();var o=e;for(var s in i)o[s]=i[s];i.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})()},326:function(t){var e;"undefined"!=typeof self&&self,e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=11)}([function(t,e,n){"use strict";var r=Array.prototype,i=Object.prototype,o={"&":"&",'"':""","'":"'","<":"<",">":">","\\":"\"},s=/[&"'<>\\]/g;function a(t,e){return i.hasOwnProperty.call(t,e)}function c(t){return o[t]}function u(t,e,n){var r,i,o;if(t instanceof Error&&(t=(i=t).name+": "+i.message),Object.setPrototypeOf?(r=new Error(t),Object.setPrototypeOf(r,u.prototype)):(r=this,Object.defineProperty(r,"message",{enumerable:!1,writable:!0,value:t})),Object.defineProperty(r,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(r,this.constructor),i){var s=Object.getOwnPropertyDescriptor(i,"stack");(o=s&&(s.get||function(){return s.value}))||(o=function(){return i.stack})}else{var a=new Error(t).stack;o=function(){return a}}return Object.defineProperty(r,"stack",{get:function(){return o.call(r)}}),Object.defineProperty(r,"cause",{value:i}),r.lineno=e,r.colno=n,r.firstUpdate=!0,r.Update=function(t){var e="("+(t||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?e+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(e+=" [Line "+this.lineno+"]")),e+="\n ",this.firstUpdate&&(e+=" "),this.message=e+(this.message||""),this.firstUpdate=!1,this},r}function l(t){return"[object Function]"===i.toString.call(t)}function h(t){return"[object Array]"===i.toString.call(t)}function f(t){return"[object String]"===i.toString.call(t)}function p(t){return"[object Object]"===i.toString.call(t)}function d(t){var e,n=(e=t)?"string"==typeof e?e.split("."):[e]:[];return function(t){for(var e=t,r=0;rt.length)s=i.slice(0,t.length),i.slice(s.length,u).forEach((function(t,n){n2?i-2:0),s=2;s0||!n)&&process.stdout.write(" ".repeat(e));var o=i===r.length-1?"":"\n";process.stdout.write(""+t+o)}))}t.exports={Node:c,Root:h,NodeList:l,Value:u,Literal:f,Symbol:p,Group:d,Array:m,Pair:y,Dict:g,Output:U,Capture:z,TemplateData:V,If:b,IfAsync:_,InlineIf:w,For:x,AsyncEach:k,AsyncAll:T,Macro:S,Caller:E,Import:A,FromImport:O,FunCall:N,Filter:C,FilterAsync:L,KeywordArgs:R,Block:P,Super:I,Extends:M,Include:D,Set:j,Switch:B,Case:F,LookupVal:v,BinOp:H,In:q,Is:W,Or:G,And:Y,Not:$,Add:X,Concat:Z,Sub:J,Mul:Q,Div:tt,FloorDiv:et,Mod:nt,Pow:rt,Neg:it,Pos:ot,Compare:st,CompareOperand:at,CallExtension:ct,CallExtensionAsync:ut,printNodes:function t(e,n){if(n=n||0,lt(e.typename+": ",n),e instanceof l)lt("\n"),e.children.forEach((function(e){t(e,n+2)}));else if(e instanceof ct)lt(e.extName+"."+e.prop+"\n"),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach((function(e){t(e,n+2)}));else{var r=[],i=null;e.iterFields((function(t,e){t instanceof c?r.push([e,t]):(i=i||{})[e]=t})),i?lt(JSON.stringify(i,null,2)+"\n",null,!0):lt("\n"),r.forEach((function(e){var r=e[0],i=e[1];lt("["+r+"] =>",n+2),t(i,n+4)}))}}}},function(t,e){},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var i=n(8),o=n(17),s=n(3),a=n(0).TemplateError,c=n(2).Frame,u=n(1).Obj,l={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},h=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n);var o=i.prototype;return o.init=function(t,e){this.templateName=t,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this._scopeClosers="",this.inBlock=!1,this.throwOnUndefined=e},o.fail=function(t,e,n){throw void 0!==e&&(e+=1),void 0!==n&&(n+=1),new a(t,e,n)},o._pushBuffer=function(){var t=this._tmpid();return this.bufferStack.push(this.buffer),this.buffer=t,this._emit("var "+this.buffer+' = "";'),t},o._popBuffer=function(){this.buffer=this.bufferStack.pop()},o._emit=function(t){this.codebuf.push(t)},o._emitLine=function(t){this._emit(t+"\n")},o._emitLines=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r0&&i._emit(","),i.compile(t,e)})),r&&this._emit(r)},o._compileExpression=function(t,e){this.assertType(t,s.Literal,s.Symbol,s.Group,s.Array,s.Dict,s.FunCall,s.Caller,s.Filter,s.LookupVal,s.Compare,s.InlineIf,s.In,s.Is,s.And,s.Or,s.Not,s.Add,s.Concat,s.Sub,s.Mul,s.Div,s.FloorDiv,s.Mod,s.Pow,s.Neg,s.Pos,s.Compare,s.NodeList),this.compile(t,e)},o.assertType=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r0&&r._emit(","),t){r._emitLine("function(cb) {"),r._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");var i=r._pushBuffer();r._withScopedSyntax((function(){r.compile(t,e),r._emitLine("cb(null, "+i+");")})),r._popBuffer(),r._emitLine("return "+i+";"),r._emitLine("}")}else r._emit("null")})),n){var c=this._tmpid();this._emitLine(", "+this._makeCallback(c)),this._emitLine(this.buffer+" += runtime.suppressValue("+c+", "+a+" && env.opts.autoescape);"),this._addScopeLevel()}else this._emit(")"),this._emit(", "+a+" && env.opts.autoescape);\n")},o.compileCallExtensionAsync=function(t,e){this.compileCallExtension(t,e,!0)},o.compileNodeList=function(t,e){this._compileChildren(t,e)},o.compileLiteral=function(t){if("string"==typeof t.value){var e=t.value.replace(/\\/g,"\\\\");e=(e=(e=(e=(e=e.replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+e+'"')}else null===t.value?this._emit("null"):this._emit(t.value.toString())},o.compileSymbol=function(t,e){var n=t.value,r=e.lookup(n);r?this._emit(r):this._emit('runtime.contextOrFrameLookup(context, frame, "'+n+'")')},o.compileGroup=function(t,e){this._compileAggregate(t,e,"(",")")},o.compileArray=function(t,e){this._compileAggregate(t,e,"[","]")},o.compileDict=function(t,e){this._compileAggregate(t,e,"{","}")},o.compilePair=function(t,e){var n=t.key,r=t.value;n instanceof s.Symbol?n=new s.Literal(n.lineno,n.colno,n.value):n instanceof s.Literal&&"string"==typeof n.value||this.fail("compilePair: Dict keys must be strings or names",n.lineno,n.colno),this.compile(n,e),this._emit(": "),this._compileExpression(r,e)},o.compileInlineIf=function(t,e){this._emit("("),this.compile(t.cond,e),this._emit("?"),this.compile(t.body,e),this._emit(":"),null!==t.else_?this.compile(t.else_,e):this._emit('""'),this._emit(")")},o.compileIn=function(t,e){this._emit("runtime.inOperator("),this.compile(t.left,e),this._emit(","),this.compile(t.right,e),this._emit(")")},o.compileIs=function(t,e){var n=t.right.name?t.right.name.value:t.right.value;this._emit('env.getTest("'+n+'").call(context, '),this.compile(t.left,e),t.right.args&&(this._emit(","),this.compile(t.right.args,e)),this._emit(") === true")},o._binOpEmitter=function(t,e,n){this.compile(t.left,e),this._emit(n),this.compile(t.right,e)},o.compileOr=function(t,e){return this._binOpEmitter(t,e," || ")},o.compileAnd=function(t,e){return this._binOpEmitter(t,e," && ")},o.compileAdd=function(t,e){return this._binOpEmitter(t,e," + ")},o.compileConcat=function(t,e){return this._binOpEmitter(t,e,' + "" + ')},o.compileSub=function(t,e){return this._binOpEmitter(t,e," - ")},o.compileMul=function(t,e){return this._binOpEmitter(t,e," * ")},o.compileDiv=function(t,e){return this._binOpEmitter(t,e," / ")},o.compileMod=function(t,e){return this._binOpEmitter(t,e," % ")},o.compileNot=function(t,e){this._emit("!"),this.compile(t.target,e)},o.compileFloorDiv=function(t,e){this._emit("Math.floor("),this.compile(t.left,e),this._emit(" / "),this.compile(t.right,e),this._emit(")")},o.compilePow=function(t,e){this._emit("Math.pow("),this.compile(t.left,e),this._emit(", "),this.compile(t.right,e),this._emit(")")},o.compileNeg=function(t,e){this._emit("-"),this.compile(t.target,e)},o.compilePos=function(t,e){this._emit("+"),this.compile(t.target,e)},o.compileCompare=function(t,e){var n=this;this.compile(t.expr,e),t.ops.forEach((function(t){n._emit(" "+l[t.type]+" "),n.compile(t.expr,e)}))},o.compileLookupVal=function(t,e){this._emit("runtime.memberLookup(("),this._compileExpression(t.target,e),this._emit("),"),this._compileExpression(t.val,e),this._emit(")")},o._getNodeName=function(t){switch(t.typename){case"Symbol":return t.value;case"FunCall":return"the return value of ("+this._getNodeName(t.name)+")";case"LookupVal":return this._getNodeName(t.target)+'["'+this._getNodeName(t.val)+'"]';case"Literal":return t.value.toString();default:return"--expression--"}},o.compileFunCall=function(t,e){this._emit("(lineno = "+t.lineno+", colno = "+t.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(t.name,e),this._emit(', "'+this._getNodeName(t.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(t.args,e,"[","])"),this._emit(")")},o.compileFilter=function(t,e){var n=t.name;this.assertType(n,s.Symbol),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(t.args,e),this._emit(")")},o.compileFilterAsync=function(t,e){var n=t.name,r=t.symbol.value;this.assertType(n,s.Symbol),e.set(r,r),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(t.args,e),this._emitLine(", "+this._makeCallback(r)),this._addScopeLevel()},o.compileKeywordArgs=function(t,e){this._emit("runtime.makeKeywordArgs("),this.compileDict(t,e),this._emit(")")},o.compileSet=function(t,e){var n=this,r=[];t.targets.forEach((function(t){var i=t.value,o=e.lookup(i);null==o&&(o=n._tmpid(),n._emitLine("var "+o+";")),r.push(o)})),t.value?(this._emit(r.join(" = ")+" = "),this._compileExpression(t.value,e),this._emitLine(";")):(this._emit(r.join(" = ")+" = "),this.compile(t.body,e),this._emitLine(";")),t.targets.forEach((function(t,e){var i=r[e],o=t.value;n._emitLine('frame.set("'+o+'", '+i+", true);"),n._emitLine("if(frame.topLevel) {"),n._emitLine('context.setVariable("'+o+'", '+i+");"),n._emitLine("}"),"_"!==o.charAt(0)&&(n._emitLine("if(frame.topLevel) {"),n._emitLine('context.addExport("'+o+'", '+i+");"),n._emitLine("}"))}))},o.compileSwitch=function(t,e){var n=this;this._emit("switch ("),this.compile(t.expr,e),this._emit(") {"),t.cases.forEach((function(t,r){n._emit("case "),n.compile(t.cond,e),n._emit(": "),n.compile(t.body,e),t.body.children.length&&n._emitLine("break;")})),t.default&&(this._emit("default:"),this.compile(t.default,e)),this._emit("}")},o.compileIf=function(t,e,n){var r=this;this._emit("if("),this._compileExpression(t.cond,e),this._emitLine(") {"),this._withScopedSyntax((function(){r.compile(t.body,e),n&&r._emit("cb()")})),t.else_?(this._emitLine("}\nelse {"),this._withScopedSyntax((function(){r.compile(t.else_,e),n&&r._emit("cb()")}))):n&&(this._emitLine("}\nelse {"),this._emit("cb()")),this._emitLine("}")},o.compileIfAsync=function(t,e){this._emit("(function(cb) {"),this.compileIf(t,e,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},o._emitLoopBindings=function(t,e,n,r){var i=this;[{name:"index",val:n+" + 1"},{name:"index0",val:n},{name:"revindex",val:r+" - "+n},{name:"revindex0",val:r+" - "+n+" - 1"},{name:"first",val:n+" === 0"},{name:"last",val:n+" === "+r+" - 1"},{name:"length",val:r}].forEach((function(t){i._emitLine('frame.set("loop.'+t.name+'", '+t.val+");")}))},o.compileFor=function(t,e){var n=this,r=this._tmpid(),i=this._tmpid(),o=this._tmpid();if(e=e.push(),this._emitLine("frame = frame.push();"),this._emit("var "+o+" = "),this._compileExpression(t.arr,e),this._emitLine(";"),this._emit("if("+o+") {"),this._emitLine(o+" = runtime.fromIterator("+o+");"),t.name instanceof s.Array){this._emitLine("var "+r+";"),this._emitLine("if(runtime.isArray("+o+")) {"),this._emitLine("var "+i+" = "+o+".length;"),this._emitLine("for("+r+"=0; "+r+" < "+o+".length; "+r+"++) {"),t.name.children.forEach((function(i,s){var a=n._tmpid();n._emitLine("var "+a+" = "+o+"["+r+"]["+s+"];"),n._emitLine('frame.set("'+i+'", '+o+"["+r+"]["+s+"]);"),e.set(t.name.children[s].value,a)})),this._emitLoopBindings(t,o,r,i),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("}"),this._emitLine("} else {");var a=t.name.children,c=a[0],u=a[1],l=this._tmpid(),h=this._tmpid();e.set(c.value,l),e.set(u.value,h),this._emitLine(r+" = -1;"),this._emitLine("var "+i+" = runtime.keys("+o+").length;"),this._emitLine("for(var "+l+" in "+o+") {"),this._emitLine(r+"++;"),this._emitLine("var "+h+" = "+o+"["+l+"];"),this._emitLine('frame.set("'+c.value+'", '+l+");"),this._emitLine('frame.set("'+u.value+'", '+h+");"),this._emitLoopBindings(t,o,r,i),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("}"),this._emitLine("}")}else{var f=this._tmpid();e.set(t.name.value,f),this._emitLine("var "+i+" = "+o+".length;"),this._emitLine("for(var "+r+"=0; "+r+" < "+o+".length; "+r+"++) {"),this._emitLine("var "+f+" = "+o+"["+r+"];"),this._emitLine('frame.set("'+t.name.value+'", '+f+");"),this._emitLoopBindings(t,o,r,i),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("}")}this._emitLine("}"),t.else_&&(this._emitLine("if (!"+i+") {"),this.compile(t.else_,e),this._emitLine("}")),this._emitLine("frame = frame.pop();")},o._compileAsyncLoop=function(t,e,n){var r=this,i=this._tmpid(),o=this._tmpid(),a=this._tmpid(),c=n?"asyncAll":"asyncEach";if(e=e.push(),this._emitLine("frame = frame.push();"),this._emit("var "+a+" = runtime.fromIterator("),this._compileExpression(t.arr,e),this._emitLine(");"),t.name instanceof s.Array){var u=t.name.children.length;this._emit("runtime."+c+"("+a+", "+u+", function("),t.name.children.forEach((function(t){r._emit(t.value+",")})),this._emit(i+","+o+",next) {"),t.name.children.forEach((function(t){var n=t.value;e.set(n,n),r._emitLine('frame.set("'+n+'", '+n+");")}))}else{var l=t.name.value;this._emitLine("runtime."+c+"("+a+", 1, function("+l+", "+i+", "+o+",next) {"),this._emitLine('frame.set("'+l+'", '+l+");"),e.set(l,l)}this._emitLoopBindings(t,a,i,o),this._withScopedSyntax((function(){var o;n&&(o=r._pushBuffer()),r.compile(t.body,e),r._emitLine("next("+i+(o?","+o:"")+");"),n&&r._popBuffer()}));var h=this._tmpid();this._emitLine("}, "+this._makeCallback(h)),this._addScopeLevel(),n&&this._emitLine(this.buffer+" += "+h+";"),t.else_&&(this._emitLine("if (!"+a+".length) {"),this.compile(t.else_,e),this._emitLine("}")),this._emitLine("frame = frame.pop();")},o.compileAsyncEach=function(t,e){this._compileAsyncLoop(t,e)},o.compileAsyncAll=function(t,e){this._compileAsyncLoop(t,e,!0)},o._compileMacro=function(t,e){var n=this,r=[],i=null,o="macro_"+this._tmpid(),a=void 0!==e;t.args.children.forEach((function(e,o){o===t.args.children.length-1&&e instanceof s.Dict?i=e:(n.assertType(e,s.Symbol),r.push(e))}));var u,l=[].concat(r.map((function(t){return"l_"+t.value})),["kwargs"]),h=r.map((function(t){return'"'+t.value+'"'})),f=(i&&i.children||[]).map((function(t){return'"'+t.key.value+'"'}));u=a?e.push(!0):new c,this._emitLines("var "+o+" = runtime.makeMacro(","["+h.join(", ")+"], ","["+f.join(", ")+"], ","function ("+l.join(", ")+") {","var callerFrame = frame;","frame = "+(a?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),r.forEach((function(t){n._emitLine('frame.set("'+t.value+'", l_'+t.value+");"),u.set(t.value,"l_"+t.value)})),i&&i.children.forEach((function(t){var e=t.key.value;n._emit('frame.set("'+e+'", '),n._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+e+'")'),n._emit(' ? kwargs["'+e+'"] : '),n._compileExpression(t.value,u),n._emit(");")}));var p=this._pushBuffer();return this._withScopedSyntax((function(){n.compile(t.body,u)})),this._emitLine("frame = "+(a?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+p+");"),this._emitLine("});"),this._popBuffer(),o},o.compileMacro=function(t,e){var n=this._compileMacro(t),r=t.name.value;e.set(r,n),e.parent?this._emitLine('frame.set("'+r+'", '+n+");"):("_"!==t.name.value.charAt(0)&&this._emitLine('context.addExport("'+r+'");'),this._emitLine('context.setVariable("'+r+'", '+n+");"))},o.compileCaller=function(t,e){this._emit("(function (){");var n=this._compileMacro(t,e);this._emit("return "+n+";})()")},o._compileGetTemplate=function(t,e,n,r){var i=this._tmpid(),o=this._templateName(),s=this._makeCallback(i),a=n?"true":"false",c=r?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(t.template,e),this._emitLine(", "+a+", "+o+", "+c+", "+s),i},o.compileImport=function(t,e){var n=t.target.value,r=this._compileGetTemplate(t,e,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(t.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),e.set(n,r),e.parent?this._emitLine('frame.set("'+n+'", '+r+");"):this._emitLine('context.setVariable("'+n+'", '+r+");")},o.compileFromImport=function(t,e){var n=this,r=this._compileGetTemplate(t,e,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(t.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),t.names.children.forEach((function(t){var i,o,a=n._tmpid();t instanceof s.Pair?(i=t.key.value,o=t.value.value):o=i=t.value,n._emitLine("if(Object.prototype.hasOwnProperty.call("+r+', "'+i+'")) {'),n._emitLine("var "+a+" = "+r+"."+i+";"),n._emitLine("} else {"),n._emitLine("cb(new Error(\"cannot import '"+i+"'\")); return;"),n._emitLine("}"),e.set(o,a),e.parent?n._emitLine('frame.set("'+o+'", '+a+");"):n._emitLine('context.setVariable("'+o+'", '+a+");")}))},o.compileBlock=function(t){var e=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+t.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(e)),this._emitLine(this.buffer+" += "+e+";"),this._addScopeLevel()},o.compileSuper=function(t,e){var n=t.blockName.value,r=t.symbol.value,i=this._makeCallback(r);this._emitLine('context.getSuper(env, "'+n+'", b_'+n+", frame, runtime, "+i),this._emitLine(r+" = runtime.markSafe("+r+");"),this._addScopeLevel(),e.set(r,r)},o.compileExtends=function(t,e){var n=this._tmpid(),r=this._compileGetTemplate(t,e,!0,!1);this._emitLine("parentTemplate = "+r),this._emitLine("for(var "+n+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+n+", parentTemplate.blocks["+n+"]);"),this._emitLine("}"),this._addScopeLevel()},o.compileInclude=function(t,e){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {");var n=this._compileGetTemplate(t,e,!1,t.ignoreMissing);this._emitLine("callback(null,"+n+");});"),this._emitLine("});");var r=this._tmpid();this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(r)),this._emitLine("callback(null,"+r+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel()},o.compileTemplateData=function(t,e){this.compileLiteral(t,e)},o.compileCapture=function(t,e){var n=this,r=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=r},o.compileOutput=function(t,e){var n=this;t.children.forEach((function(r){r instanceof s.TemplateData?r.value&&(n._emit(n.buffer+" += "),n.compileLiteral(r,e),n._emitLine(";")):(n._emit(n.buffer+" += runtime.suppressValue("),n.throwOnUndefined&&n._emit("runtime.ensureDefined("),n.compile(r,e),n.throwOnUndefined&&n._emit(","+t.lineno+","+t.colno+")"),n._emit(", env.opts.autoescape);\n"))}))},o.compileRoot=function(t,e){var n=this;e&&this.fail("compileRoot: root node can't have frame"),e=new c,this._emitFuncBegin(t,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(t,e),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0;var r=[],i=t.findAll(s.Block);i.forEach((function(t,e){var i=t.name.value;if(-1!==r.indexOf(i))throw new Error('Block "'+i+'" defined more than once.');r.push(i),n._emitFuncBegin(t,"b_"+i);var o=new c;n._emitLine("var frame = frame.push(true);"),n.compile(t.body,o),n._emitFuncEnd()})),this._emitLine("return {"),i.forEach((function(t,e){var r="b_"+t.name.value;n._emitLine(r+": "+r+",")})),this._emitLine("root: root\n};")},o.compile=function(t,e){var n=this["compile"+t.typename];n?n.call(this,t,e):this.fail("compile: Cannot compile node: "+t.typename,t.lineno,t.colno)},o.getCode=function(){return this.codebuf.join("")},i}(u);t.exports={compile:function(t,e,n,r,s){void 0===s&&(s={});var a=new h(r,s.throwOnUndefined),c=(n||[]).map((function(t){return t.preprocess})).filter((function(t){return!!t})).reduce((function(t,e){return e(t)}),t);return a.compile(o.transform(i.parse(c,n,s),e,r)),a.getCode()},Compiler:h}},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var i=n(4),o=n(1).EmitterObj;t.exports=function(t){var e,n;function o(){return t.apply(this,arguments)||this}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n);var s=o.prototype;return s.resolve=function(t,e){return i.resolve(i.dirname(t),e)},s.isRelative=function(t){return 0===t.indexOf("./")||0===t.indexOf("../")},o}(o)},function(t,e,n){"use strict";function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,i(t,e)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}var o=n(12),s=n(15),a=n(0),c=n(5),u=n(18),l=n(10),h=l.FileSystemLoader,f=l.WebLoader,p=l.PrecompiledLoader,d=n(20),m=n(21),y=n(1),g=y.Obj,v=y.EmitterObj,b=n(2),_=b.handleError,w=b.Frame,x=n(22);function k(t,e,n){o((function(){t(e,n)}))}var T={type:"code",obj:{root:function(t,e,n,r,i){try{i(null,"")}catch(t){i(_(t,null,null))}}}},S=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var n=e.prototype;return n.init=function(t,e){var n=this;e=this.opts=e||{},this.opts.dev=!!e.dev,this.opts.autoescape=null==e.autoescape||e.autoescape,this.opts.throwOnUndefined=!!e.throwOnUndefined,this.opts.trimBlocks=!!e.trimBlocks,this.opts.lstripBlocks=!!e.lstripBlocks,this.loaders=[],t?this.loaders=a.isArray(t)?t:[t]:h?this.loaders=[new h("views")]:f&&(this.loaders=[new f("/views")]),"undefined"!=typeof window&&window.nunjucksPrecompiled&&this.loaders.unshift(new p(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=m(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],a._entries(u).forEach((function(t){var e=t[0],r=t[1];return n.addFilter(e,r)})),a._entries(d).forEach((function(t){var e=t[0],r=t[1];return n.addTest(e,r)}))},n._initLoaders=function(){var t=this;this.loaders.forEach((function(e){e.cache={},"function"==typeof e.on&&(e.on("update",(function(n,r){e.cache[n]=null,t.emit("update",n,r,e)})),e.on("load",(function(n,r){t.emit("load",n,r,e)})))}))},n.invalidateCache=function(){this.loaders.forEach((function(t){t.cache={}}))},n.addExtension=function(t,e){return e.__name=t,this.extensions[t]=e,this.extensionsList.push(e),this},n.removeExtension=function(t){var e=this.getExtension(t);e&&(this.extensionsList=a.without(this.extensionsList,e),delete this.extensions[t])},n.getExtension=function(t){return this.extensions[t]},n.hasExtension=function(t){return!!this.extensions[t]},n.addGlobal=function(t,e){return this.globals[t]=e,this},n.getGlobal=function(t){if(void 0===this.globals[t])throw new Error("global not found: "+t);return this.globals[t]},n.addFilter=function(t,e,n){var r=e;return n&&this.asyncFilters.push(t),this.filters[t]=r,this},n.getFilter=function(t){if(!this.filters[t])throw new Error("filter not found: "+t);return this.filters[t]},n.addTest=function(t,e){return this.tests[t]=e,this},n.getTest=function(t){if(!this.tests[t])throw new Error("test not found: "+t);return this.tests[t]},n.resolveTemplate=function(t,e,n){return t.isRelative&&e&&t.isRelative(n)&&t.resolve?t.resolve(e,n):n},n.getTemplate=function(t,e,n,r,i){var o,s=this,c=this,u=null;if(t&&t.raw&&(t=t.raw),a.isFunction(n)&&(i=n,n=null,e=e||!1),a.isFunction(e)&&(i=e,e=!1),t instanceof A)u=t;else{if("string"!=typeof t)throw new Error("template names must be a string: "+t);for(var l=0;l0&&!this.skip(i.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",t.lineno,t.colno);var a=this.parsePrimary();if("_"===a.value.charAt(0)&&this.fail("parseFrom: names starting with an underscore cannot be imported",a.lineno,a.colno),this.skipSymbol("as")){var c=this.parsePrimary();r.addChild(new o.Pair(a.lineno,a.colno,a,c))}else r.addChild(a);n=this.parseWithContext()}return new o.FromImport(t.lineno,t.colno,e,r,n)},c.parseBlock=function(){var t=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",t.lineno,t.colno);var e=new o.Block(t.lineno,t.colno);e.name=this.parsePrimary(),e.name instanceof o.Symbol||this.fail("parseBlock: variable name expected",t.lineno,t.colno),this.advanceAfterBlockEnd(t.value),e.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(e.name.value);var n=this.peekToken();return n||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(n.value),e},c.parseExtends=function(){var t="extends",e=this.peekToken();this.skipSymbol(t)||this.fail("parseTemplateRef: expected "+t);var n=new o.Extends(e.lineno,e.colno);return n.template=this.parseExpression(),this.advanceAfterBlockEnd(e.value),n},c.parseInclude=function(){var t="include",e=this.peekToken();this.skipSymbol(t)||this.fail("parseInclude: expected "+t);var n=new o.Include(e.lineno,e.colno);return n.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(n.ignoreMissing=!0),this.advanceAfterBlockEnd(e.value),n},c.parseIf=function(){var t,e=this.peekToken();this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?t=new o.If(e.lineno,e.colno):this.skipSymbol("ifAsync")?t=new o.IfAsync(e.lineno,e.colno):this.fail("parseIf: expected if, elif, or elseif",e.lineno,e.colno),t.cond=this.parseExpression(),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("elif","elseif","else","endif");var n=this.peekToken();switch(n&&n.value){case"elseif":case"elif":t.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),t.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":t.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return t},c.parseSet=function(){var t=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",t.lineno,t.colno);for(var e,n=new o.Set(t.lineno,t.colno,[]);(e=this.parsePrimary())&&(n.targets.push(e),this.skip(i.TOKEN_COMMA)););return this.skipValue(i.TOKEN_OPERATOR,"=")?(n.value=this.parseExpression(),this.advanceAfterBlockEnd(t.value)):this.skip(i.TOKEN_BLOCK_END)?(n.body=new o.Capture(t.lineno,t.colno,this.parseUntilBlocks("endset")),n.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",t.lineno,t.colno),n},c.parseSwitch=function(){var t="switch",e="endswitch",n="case",r="default",i=this.peekToken();this.skipSymbol(t)||this.skipSymbol(n)||this.skipSymbol(r)||this.fail('parseSwitch: expected "switch," "case" or "default"',i.lineno,i.colno);var s=this.parseExpression();this.advanceAfterBlockEnd(t),this.parseUntilBlocks(n,r,e);var a,c=this.peekToken(),u=[];do{this.skipSymbol(n);var l=this.parseExpression();this.advanceAfterBlockEnd(t);var h=this.parseUntilBlocks(n,r,e);u.push(new o.Case(c.line,c.col,l,h)),c=this.peekToken()}while(c&&c.value===n);switch(c.value){case r:this.advanceAfterBlockEnd(),a=this.parseUntilBlocks(e),this.advanceAfterBlockEnd();break;case e:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new o.Switch(i.lineno,i.colno,s,u,a)},c.parseStatement=function(){var t=this.peekToken();if(t.type!==i.TOKEN_SYMBOL&&this.fail("tag name expected",t.lineno,t.colno),this.breakOnBlocks&&-1!==a.indexOf(this.breakOnBlocks,t.value))return null;switch(t.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var e=0;e0;){var c=s[0],u=s[1],l=s[2];l===t?r+=1:l===e&&(r-=1),0===r?(i+=u,this.tokens.backN(c.length-u.length)):i+=c}return new o.Output(a.lineno,a.colno,[new o.TemplateData(a.lineno,a.colno,i)])},c.parsePostfix=function(t){for(var e,n=this.peekToken();n;){if(n.type===i.TOKEN_LEFT_PAREN)t=new o.FunCall(n.lineno,n.colno,t,this.parseSignature());else if(n.type===i.TOKEN_LEFT_BRACKET)(e=this.parseAggregate()).children.length>1&&this.fail("invalid index"),t=new o.LookupVal(n.lineno,n.colno,t,e.children[0]);else{if(n.type!==i.TOKEN_OPERATOR||"."!==n.value)break;this.nextToken();var r=this.nextToken();r.type!==i.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+r.value,r.lineno,r.colno),e=new o.Literal(r.lineno,r.colno,r.value),t=new o.LookupVal(n.lineno,n.colno,t,e)}n=this.peekToken()}return t},c.parseExpression=function(){return this.parseInlineIf()},c.parseInlineIf=function(){var t=this.parseOr();if(this.skipSymbol("if")){var e=this.parseOr(),n=t;(t=new o.InlineIf(t.lineno,t.colno)).body=n,t.cond=e,this.skipSymbol("else")?t.else_=this.parseOr():t.else_=null}return t},c.parseOr=function(){for(var t=this.parseAnd();this.skipSymbol("or");){var e=this.parseAnd();t=new o.Or(t.lineno,t.colno,t,e)}return t},c.parseAnd=function(){for(var t=this.parseNot();this.skipSymbol("and");){var e=this.parseNot();t=new o.And(t.lineno,t.colno,t,e)}return t},c.parseNot=function(){var t=this.peekToken();return this.skipSymbol("not")?new o.Not(t.lineno,t.colno,this.parseNot()):this.parseIn()},c.parseIn=function(){for(var t=this.parseIs();;){var e=this.nextToken();if(!e)break;var n=e.type===i.TOKEN_SYMBOL&&"not"===e.value;if(n||this.pushToken(e),!this.skipSymbol("in")){n&&this.pushToken(e);break}var r=this.parseIs();t=new o.In(t.lineno,t.colno,t,r),n&&(t=new o.Not(t.lineno,t.colno,t))}return t},c.parseIs=function(){var t=this.parseCompare();if(this.skipSymbol("is")){var e=this.skipSymbol("not"),n=this.parseCompare();t=new o.Is(t.lineno,t.colno,t,n),e&&(t=new o.Not(t.lineno,t.colno,t))}return t},c.parseCompare=function(){for(var t=["==","===","!=","!==","<",">","<=",">="],e=this.parseConcat(),n=[];;){var r=this.nextToken();if(!r)break;if(-1===t.indexOf(r.value)){this.pushToken(r);break}n.push(new o.CompareOperand(r.lineno,r.colno,this.parseConcat(),r.value))}return n.length?new o.Compare(n[0].lineno,n[0].colno,e,n):e},c.parseConcat=function(){for(var t=this.parseAdd();this.skipValue(i.TOKEN_TILDE,"~");){var e=this.parseAdd();t=new o.Concat(t.lineno,t.colno,t,e)}return t},c.parseAdd=function(){for(var t=this.parseSub();this.skipValue(i.TOKEN_OPERATOR,"+");){var e=this.parseSub();t=new o.Add(t.lineno,t.colno,t,e)}return t},c.parseSub=function(){for(var t=this.parseMul();this.skipValue(i.TOKEN_OPERATOR,"-");){var e=this.parseMul();t=new o.Sub(t.lineno,t.colno,t,e)}return t},c.parseMul=function(){for(var t=this.parseDiv();this.skipValue(i.TOKEN_OPERATOR,"*");){var e=this.parseDiv();t=new o.Mul(t.lineno,t.colno,t,e)}return t},c.parseDiv=function(){for(var t=this.parseFloorDiv();this.skipValue(i.TOKEN_OPERATOR,"/");){var e=this.parseFloorDiv();t=new o.Div(t.lineno,t.colno,t,e)}return t},c.parseFloorDiv=function(){for(var t=this.parseMod();this.skipValue(i.TOKEN_OPERATOR,"//");){var e=this.parseMod();t=new o.FloorDiv(t.lineno,t.colno,t,e)}return t},c.parseMod=function(){for(var t=this.parsePow();this.skipValue(i.TOKEN_OPERATOR,"%");){var e=this.parsePow();t=new o.Mod(t.lineno,t.colno,t,e)}return t},c.parsePow=function(){for(var t=this.parseUnary();this.skipValue(i.TOKEN_OPERATOR,"**");){var e=this.parseUnary();t=new o.Pow(t.lineno,t.colno,t,e)}return t},c.parseUnary=function(t){var e,n=this.peekToken();return e=this.skipValue(i.TOKEN_OPERATOR,"-")?new o.Neg(n.lineno,n.colno,this.parseUnary(!0)):this.skipValue(i.TOKEN_OPERATOR,"+")?new o.Pos(n.lineno,n.colno,this.parseUnary(!0)):this.parsePrimary(),t||(e=this.parseFilter(e)),e},c.parsePrimary=function(t){var e,n=this.nextToken(),r=null;if(n?n.type===i.TOKEN_STRING?e=n.value:n.type===i.TOKEN_INT?e=parseInt(n.value,10):n.type===i.TOKEN_FLOAT?e=parseFloat(n.value):n.type===i.TOKEN_BOOLEAN?"true"===n.value?e=!0:"false"===n.value?e=!1:this.fail("invalid boolean: "+n.value,n.lineno,n.colno):n.type===i.TOKEN_NONE?e=null:n.type===i.TOKEN_REGEX&&(e=new RegExp(n.value.body,n.value.flags)):this.fail("expected expression, got end of file"),void 0!==e?r=new o.Literal(n.lineno,n.colno,e):n.type===i.TOKEN_SYMBOL?r=new o.Symbol(n.lineno,n.colno,n.value):(this.pushToken(n),r=this.parseAggregate()),t||(r=this.parsePostfix(r)),r)return r;throw this.error("unexpected token: "+n.value,n.lineno,n.colno)},c.parseFilterName=function(){for(var t=this.expect(i.TOKEN_SYMBOL),e=t.value;this.skipValue(i.TOKEN_OPERATOR,".");)e+="."+this.expect(i.TOKEN_SYMBOL).value;return new o.Symbol(t.lineno,t.colno,e)},c.parseFilterArgs=function(t){return this.peekToken().type===i.TOKEN_LEFT_PAREN?this.parsePostfix(t).args.children:[]},c.parseFilter=function(t){for(;this.skip(i.TOKEN_PIPE);){var e=this.parseFilterName();t=new o.Filter(e.lineno,e.colno,e,new o.NodeList(e.lineno,e.colno,[t].concat(this.parseFilterArgs(t))))}return t},c.parseFilterStatement=function(){var t=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var e=this.parseFilterName(),n=this.parseFilterArgs(e);this.advanceAfterBlockEnd(t.value);var r=new o.Capture(e.lineno,e.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var i=new o.Filter(e.lineno,e.colno,e,new o.NodeList(e.lineno,e.colno,[r].concat(n)));return new o.Output(e.lineno,e.colno,[i])},c.parseAggregate=function(){var t,e=this.nextToken();switch(e.type){case i.TOKEN_LEFT_PAREN:t=new o.Group(e.lineno,e.colno);break;case i.TOKEN_LEFT_BRACKET:t=new o.Array(e.lineno,e.colno);break;case i.TOKEN_LEFT_CURLY:t=new o.Dict(e.lineno,e.colno);break;default:return null}for(;;){var n=this.peekToken().type;if(n===i.TOKEN_RIGHT_PAREN||n===i.TOKEN_RIGHT_BRACKET||n===i.TOKEN_RIGHT_CURLY){this.nextToken();break}if(t.children.length>0&&(this.skip(i.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",e.lineno,e.colno)),t instanceof o.Dict){var r=this.parsePrimary();this.skip(i.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",e.lineno,e.colno);var s=this.parseExpression();t.addChild(new o.Pair(r.lineno,r.colno,r,s))}else{var a=this.parseExpression();t.addChild(a)}}return t},c.parseSignature=function(t,e){var n=this.peekToken();if(!e&&n.type!==i.TOKEN_LEFT_PAREN){if(t)return null;this.fail("expected arguments",n.lineno,n.colno)}n.type===i.TOKEN_LEFT_PAREN&&(n=this.nextToken());for(var r=new o.NodeList(n.lineno,n.colno),s=new o.KeywordArgs(n.lineno,n.colno),a=!1;;){if(n=this.peekToken(),!e&&n.type===i.TOKEN_RIGHT_PAREN){this.nextToken();break}if(e&&n.type===i.TOKEN_BLOCK_END)break;if(a&&!this.skip(i.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",n.lineno,n.colno);else{var c=this.parseExpression();this.skipValue(i.TOKEN_OPERATOR,"=")?s.addChild(new o.Pair(c.lineno,c.colno,c,this.parseExpression())):r.addChild(c)}a=!0}return s.children.length&&r.addChild(s),r},c.parseUntilBlocks=function(){for(var t=this.breakOnBlocks,e=arguments.length,n=new Array(e),r=0;r=","//","**"],j=L+this.current();switch(-1!==r.indexOf(D,j)&&(this.forward(),L=j,-1!==r.indexOf(D,j+this.current())&&(L=j+this.current(),this.forward())),L){case"(":M=d;break;case")":M=m;break;case"[":M=y;break;case"]":M=g;break;case"{":M=v;break;case"}":M=b;break;case",":M=w;break;case":":M=x;break;case"~":M=k;break;case"|":M=T;break;default:M=_}return C(M,L,e,n)}if((t=this._extractUntil(i+o)).match(/^[-+]?[0-9]+$/)){if("."===this.current()){this.forward();var B=this._extract("0123456789");return C(S,t+"."+B,e,n)}return C("int",t,e,n)}if(t.match(/^(true|false)$/))return C(E,t,e,n);if("none"===t)return C(A,t,e,n);if("null"===t)return C(A,t,e,n);if(t)return C(O,t,e,n);throw new Error("Unexpected value while parsing: "+t)}var F,U=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if((t=this._extractString(this.tags.BLOCK_START+"-"))||(t=this._extractString(this.tags.BLOCK_START)))return this.in_code=!0,C(u,t,e,n);if((t=this._extractString(this.tags.VARIABLE_START+"-"))||(t=this._extractString(this.tags.VARIABLE_START)))return this.in_code=!0,C(h,t,e,n);t="";var z=!1;for(this._matches(this.tags.COMMENT_START)&&(z=!0,t=this._extractString(this.tags.COMMENT_START));null!==(F=this._extractUntil(U));){if(t+=F,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!z){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=t.length){var V=t.slice(-this.colno);if(/^\s+$/.test(V)&&!(t=t.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!z)throw new Error("unexpected end of comment");t+=this._extractString(this.tags.COMMENT_END);break}t+=this.current(),this.forward()}if(null===F&&z)throw new Error("expected end of comment, got end of file");return C(z?p:c,t,e,n)},e._parseString=function(t){this.forward();for(var e="";!this.isFinished()&&this.current()!==t;){var n=this.current();if("\\"===n){switch(this.forward(),this.current()){case"n":e+="\n";break;case"t":e+="\t";break;case"r":e+="\r";break;default:e+=this.current()}this.forward()}else e+=n,this.forward()}return this.forward(),e},e._matches=function(t){return this.index+t.length>this.len?null:this.str.slice(this.index,this.index+t.length)===t},e._extractString=function(t){return this._matches(t)?(this.forwardN(t.length),t):null},e._extractUntil=function(t){return this._extractMatching(!0,t||"")},e._extract=function(t){return this._extractMatching(!1,t)},e._extractMatching=function(t,e){if(this.isFinished())return null;var n=e.indexOf(this.current());if(t&&-1===n||!t&&-1!==n){var r=this.current();this.forward();for(var i=e.indexOf(this.current());(t&&-1===i||!t&&-1!==i)&&!this.isFinished();)r+=this.current(),this.forward(),i=e.indexOf(this.current());return r}return""},e._extractRegex=function(t){var e=this.currentStr().match(t);return e?(this.forwardN(e[0].length),e):null},e.isFinished=function(){return this.index>=this.len},e.forwardN=function(t){for(var e=0;e1024){for(var e=0,n=i.length-o;e0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function d(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[t];if(void 0===c)return!1;if("function"==typeof c)o(c,this,e);else{var u=c.length,l=y(c,u);for(n=0;n=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1=0;r--)this.removeListener(t,e[r]);return this},a.prototype.listeners=function(t){return d(this,t,!0)},a.prototype.rawListeners=function(t){return d(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){"use strict";var r=n(3),i=n(0),o=0;function s(){return"hole_"+o++}function a(t,e){for(var n=null,r=0;r=e)return t;var n=e-t.length,s=r.repeat(" ",n/2-n%2),a=r.repeat(" ",n/2);return i.copySafeness(t,s+t+a)},e.default=function(t,e,n){return n?t||e:void 0!==t?t:e},e.dictsort=function(t,e,n){if(!r.isObject(t))throw new r.TemplateError("dictsort filter: val must be an object");var i,o=[];for(var s in t)o.push([s,t[s]]);if(void 0===n||"key"===n)i=0;else{if("value"!==n)throw new r.TemplateError("dictsort filter: You can only sort by either key or value");i=1}return o.sort((function(t,n){var o=t[i],s=n[i];return e||(r.isString(o)&&(o=o.toUpperCase()),r.isString(s)&&(s=s.toUpperCase())),o>s?1:o===s?0:-1})),o},e.dump=function(t,e){return JSON.stringify(t,null,e)},e.escape=function(t){return t instanceof i.SafeString?t:(t=null==t?"":t,i.markSafe(r.escape(t.toString())))},e.safe=function(t){return t instanceof i.SafeString?t:(t=null==t?"":t,i.markSafe(t.toString()))},e.first=function(t){return t[0]},e.forceescape=function(t){return t=null==t?"":t,i.markSafe(r.escape(t.toString()))},e.groupby=function(t,e){return r.groupBy(t,e,this.env.opts.throwOnUndefined)},e.indent=function(t,e,n){if(""===(t=o(t,"")))return"";e=e||4;var s=t.split("\n"),a=r.repeat(" ",e),c=s.map((function(t,e){return 0!==e||n?""+a+t:t})).join("\n");return i.copySafeness(t,c)},e.join=function(t,e,n){return e=e||"",n&&(t=r.map(t,(function(t){return t[n]}))),t.join(e)},e.last=function(t){return t[t.length-1]},e.length=function(t){var e=o(t,"");return void 0!==e?"function"==typeof Map&&e instanceof Map||"function"==typeof Set&&e instanceof Set?e.size:!r.isObject(e)||e instanceof i.SafeString?e.length:r.keys(e).length:0},e.list=c,e.lower=function(t){return(t=o(t,"")).toLowerCase()},e.nl2br=function(t){return null==t?"":i.copySafeness(t,t.replace(/\r\n|\n/g,"
\n"))},e.random=function(t){return t[Math.floor(Math.random()*t.length)]},e.reject=u(!1),e.rejectattr=function(t,e){return t.filter((function(t){return!t[e]}))},e.select=u(!0),e.selectattr=function(t,e){return t.filter((function(t){return!!t[e]}))},e.replace=function(t,e,n,r){var o=t;if(e instanceof RegExp)return t.replace(e,n);void 0===r&&(r=-1);var s="";if("number"==typeof e)e=""+e;else if("string"!=typeof e)return t;if("number"==typeof t&&(t=""+t),"string"!=typeof t&&!(t instanceof i.SafeString))return t;if(""===e)return s=n+t.split("").join(n)+n,i.copySafeness(t,s);var a=t.indexOf(e);if(0===r||-1===a)return t;for(var c=0,u=0;a>-1&&(-1===r||u=i&&l.push(n),o.push(l)}return o},e.sum=function(t,e,n){return void 0===n&&(n=0),e&&(t=r.map(t,(function(t){return t[e]}))),n+t.reduce((function(t,e){return t+e}),0)},e.sort=i.makeMacro(["value","reverse","case_sensitive","attribute"],[],(function(t,e,n,i){var o=this,s=r.map(t,(function(t){return t})),a=r.getAttrGetter(i);return s.sort((function(t,s){var c=i?a(t):t,u=i?a(s):s;if(o.env.opts.throwOnUndefined&&i&&(void 0===c||void 0===u))throw new TypeError('sort: attribute "'+i+'" resolved to undefined');return!n&&r.isString(c)&&r.isString(u)&&(c=c.toLowerCase(),u=u.toLowerCase()),cu?e?-1:1:0})),s})),e.string=function(t){return i.copySafeness(t,t)},e.striptags=function(t,e){var n,r=l((t=o(t,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|/gi,""));return n=e?r.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,"\n").replace(/\n\n\n+/g,"\n\n"):r.replace(/\s+/gi," "),i.copySafeness(t,n)},e.title=function(t){var e=(t=o(t,"")).split(" ").map((function(t){return a(t)}));return i.copySafeness(t,e.join(" "))},e.trim=l,e.truncate=function(t,e,n,r){var s=t;if(e=e||255,(t=o(t,"")).length<=e)return t;if(n)t=t.substring(0,e);else{var a=t.lastIndexOf(" ",e);-1===a&&(a=e),t=t.substring(0,a)}return t+=null!=r?r:"...",i.copySafeness(s,t)},e.upper=function(t){return(t=o(t,"")).toUpperCase()},e.urlencode=function(t){var e=encodeURIComponent;return r.isString(t)?e(t):(r.isArray(t)?t:r._entries(t)).map((function(t){var n=t[0],r=t[1];return e(n)+"="+e(r)})).join("&")};var h=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,f=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,p=/^https?:\/\/.*$/,d=/^www\./,m=/\.(?:org|net|com)(?:\:|\/|$)/;e.urlize=function(t,e,n){s(e)&&(e=1/0);var r=!0===n?' rel="nofollow"':"";return t.split(/(\s+)/).filter((function(t){return t&&t.length})).map((function(t){var n=t.match(h),i=n?n[1]:t,o=i.substr(0,e);return p.test(i)?'"+o+"":d.test(i)?'"+o+"":f.test(i)?''+i+"":m.test(i)?'"+o+"":t})).join("")},e.wordcount=function(t){var e=(t=o(t,""))?t.match(/\w+/g):null;return e?e.length:null},e.float=function(t,e){var n=parseFloat(t);return s(n)?e:n};var y=i.makeMacro(["value","default","base"],[],(function(t,e,n){void 0===n&&(n=10);var r=parseInt(t,n);return s(r)?e:r}));e.int=y,e.d=e.default,e.e=e.escape},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var i=function(t){var e,n;function i(e){var n;return(n=t.call(this)||this).precompiled=e||{},n}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n),i.prototype.getSource=function(t){return this.precompiled[t]?{src:{type:"code",obj:this.precompiled[t]},path:t}:null},i}(n(6));t.exports={PrecompiledLoader:i}},function(t,e,n){"use strict";var r=n(2).SafeString;e.callable=function(t){return"function"==typeof t},e.defined=function(t){return void 0!==t},e.divisibleby=function(t,e){return t%e==0},e.escaped=function(t){return t instanceof r},e.equalto=function(t,e){return t===e},e.eq=e.equalto,e.sameas=e.equalto,e.even=function(t){return t%2==0},e.falsy=function(t){return!t},e.ge=function(t,e){return t>=e},e.greaterthan=function(t,e){return t>e},e.gt=e.greaterthan,e.le=function(t,e){return t<=e},e.lessthan=function(t,e){return t0)for(var i=t;ie;o+=n)r.push(o);return r},cycler:function(){return t=Array.prototype.slice.call(arguments),e=-1,{current:null,reset:function(){e=-1,this.current=null},next:function(){return++e>=t.length&&(e=0),this.current=t[e],this.current}};var t,e},joiner:function(t){return function(t){t=t||",";var e=!0;return function(){var n=e?"":t;return e=!1,n}}(t)}}}},function(t,e,n){var r=n(4);t.exports=function(t,e){function n(t,e){if(this.name=t,this.path=t,this.defaultEngine=e.defaultEngine,this.ext=r.extname(t),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=("."!==this.defaultEngine[0]?".":"")+this.defaultEngine)}return n.prototype.render=function(e,n){t.render(this.name,e,n)},e.set("view",n),e.set("nunjucksEnv",t),t}},function(t,e,n){"use strict";var r=n(4),i=n(4),o=n(0)._prettifyError,s=n(5),a=n(7).Environment,c=n(24);function u(t,e){return!!Array.isArray(e)&&e.some((function(e){return t.match(e)}))}function l(t,e){(e=e||{}).isString=!0;var n=e.env||new a([]),r=e.wrapper||c;if(!e.name)throw new Error('the "name" option is required when compiling a string');return r([h(t,e.name,n)],e)}function h(t,e,n){var r,i=(n=n||new a([])).asyncFilters,c=n.extensionsList;e=e.replace(/\\/g,"/");try{r=s.compile(t,i,c,e,n.opts)}catch(t){throw o(e,!1,t)}return{name:e,template:r}}t.exports={precompile:function(t,e){var n=(e=e||{}).env||new a([]),o=e.wrapper||c;if(e.isString)return l(t,e);var s=r.existsSync(t)&&r.statSync(t),f=[],p=[];if(s.isFile())f.push(h(r.readFileSync(t,"utf-8"),e.name||t,n));else if(s.isDirectory()){!function n(o){r.readdirSync(o).forEach((function(s){var a=i.join(o,s),c=a.substr(i.join(t,"/").length),l=r.statSync(a);l&&l.isDirectory()?u(c+="/",e.exclude)||n(a):u(c,e.include)&&p.push(a)}))}(t);for(var d=0;dt.length||i>0&&s>=r||i<0&&s<=r);s+=i)o.push(n.memberLookup(t,s));return o}function p(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var d={pop:function(t){if(void 0===t)return this.pop();if(t>=this.length||t<0)throw new Error("KeyError");return this.splice(t,1)},append:function(t){return this.push(t)},remove:function(t){for(var e=0;e{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{default:()=>Os});var t=n(149);function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{blockType:null,provider:null,isUnknown:!1};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=c(this,e,[o(o({},n),{},{defaultWidth:n.isContainer?186:96,defaultHeight:n.isContainer?160:80,minWidth:n.isContainer?186:96,minHeight:n.isContainer?140:80,reservedWidth:n.isContainer?12:0,reservedHeight:n.isContainer?80:0,margin:15,gap:50})])).blockType=n.blockType||null,t.provider=n.provider||null,t.isUnknown=n.isUnknown||!1,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(e,t),function(t){return Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(t.ComponentDefinition);const p=f;function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function m(t,e,n){return e=g(e),function(t,e){if(e&&("object"==d(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,y()?Reflect.construct(e,n||[],g(t).constructor):e.apply(t,n))}function y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(y=function(){return!!t})()}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}var b=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{linkAttribute:"id"};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=m(this,e,[n])).linkAttribute=n.linkAttribute||"id",t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(e,t),function(t){return Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(t.ComponentAttributeDefinition);const _=b;var w={name:"vpc_id",displayName:"VPC ID",containerRef:"aws_vpc",linkAttribute:"id",linkRef:"aws_vpc",linkType:"Default",linkModel:"defaultLink",type:"Link"},x={name:"vpc_id",displayName:"VPC ID",containerRef:"aws_vpc",type:"Reference"},k={name:"tags",displayName:"Tags",description:"A map of tags to assign to the resource.",type:"Object",url:"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"},T={name:"security_groups",displayName:"Security groups",description:"List of security group names to associate with.",linkAttribute:"name",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",type:"Link"},S={name:"subnet_id",displayName:"Subnet ID",linkAttribute:"id",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",type:"Link"},E={name:"port",displayName:"Port",type:"Number",rules:{max:"65535",min:"1"}};const A=[{blockType:"provider",type:"aws",displayName:"AWS provider",description:"Use the Amazon Web Services (AWS) provider to interact with the many resources supported by AWS.",icon:"aws",model:"DefaultModel",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs",categories:["AWS","Provider"],tags:[],definedAttributes:[{name:"region",displayName:"Region",description:"AWS service endpoints",required:!0,type:"String",url:"https://docs.aws.amazon.com/general/latest/gr/rande.html"},{name:"skip_region_validation",displayName:"Skip region validation",description:"Define if region validation should be skipped or not.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#skip_region_validation"},{name:"access_key",displayName:"Access key",description:"The ID of the access key to allow Terraform requests to authenticate with.",type:"String",url:"https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html"},{name:"secret_key",displayName:"Secret key",description:"The secret key to allow Terraform requests to authenticate with.",type:"String",url:"https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html"},{name:"token",displayName:"Token",description:"Used to validate session temporary credentials.",type:"String",url:"https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html"},{name:"allowed_account_ids",displayName:"Allowed Account IDs",description:"List of allowed AWS account IDs to prevent you from mistakenly
using an incorrect one (and potentially end up destroying a live environment).",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#allowed_account_ids"},{name:"forbidden_account_ids",displayName:"Forbidden Account IDs",description:"List of forbidden AWS account IDs to prevent you from mistakenly
using an incorrect one (and potentially end up destroying a live environment).",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#forbidden_account_ids"},{name:"skip_requesting_account_id",displayName:"Skip requesting account ID",description:"Whether to skip requesting the account ID or not.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#skip_requesting_account_id"},{name:"custom_ca_bundle",displayName:"Custom Certificate Authority (CA) bundle",description:"File containing custom root and intermediate certificates.",type:"String",url:"https://docs.aws.amazon.com/privateca/latest/userguide/PcaWelcome.html"},{name:"insecure",displayName:"Insecure",description:'Whether to explicitly allow the provider to perform "insecure" SSL requests or not.',type:"Boolean",url:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html"},{name:"ec2_metadata_service_endpoint",displayName:"EC2 metadata service (IMDS) endpoint",description:"Address of the EC2 metadata service (IMDS) endpoint to use.",type:"String",url:"https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-cfg-ec2-imds.html"},{name:"ec2_metadata_service_endpoint_mode",displayName:"EC2 metadata service (IMDS) endpoint mode",description:"Communication mode to use with the metadata service.",type:"String",url:"https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-cfg-ec2-imds.html",rules:{values:["IPv4","IPv6"]}},{name:"http_proxy",displayName:"HTTP proxy",description:"Address of an HTTP proxy to use when accessing the AWS API.",type:"String",url:"https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-http.html",rules:{regex:"[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)"}},{name:"max_retries",displayName:"Max retries",description:"Maximum number of times an API call is retried when AWS throttles requests or on transient failures.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#max_retries"},{name:"profile",displayName:"Profile",description:"AWS profile name as set in the shared configuration and credentials files.",type:"String",url:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html"},{name:"shared_config_files",displayName:"Shared config files",description:"List of paths to AWS shared config files.",type:"String",url:"https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html"},{name:"shared_credentials_files",displayName:"Shared credentials files",description:"List of paths to the shared credentials files.",type:"String",url:"https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html"},{name:"skip_credentials_validation",displayName:"Skip credentials validation",description:"Whether to skip credentials validation via the STS API or not.",type:"Boolean",url:"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html"},{name:"sts_region",displayName:"Security Token Service (STS) region",description:"AWS region for Security Token Service (STS)",type:"String",url:"https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html"},{name:"s3_use_path_style",displayName:"Use path-style for S3",description:"Whether to enable the request to use path-style addressing or not
i.e., https://s3.amazonaws.com/BUCKET/KEY.",type:"Boolean",url:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html"},{name:"skip_metadata_api_check",displayName:"Skip metadata API check",description:"Whether to skip the AWS Metadata API check or not.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#skip_metadata_api_check"},{name:"use_dualstack_endpoint",displayName:"Use dual-stack endpoint",description:"Force the provider to resolve endpoints with DualStack capability.",type:"Boolean",url:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/dual-stack-endpoints.html"},{name:"use_fips_endpoint",displayName:"Use FIPS endpoint",description:"Force the provider to resolve endpoints with FIPS capability.",type:"Boolean",url:"https://aws.amazon.com/compliance/fips/"},{name:"assume_role",displayName:"Assume role",description:"Set of temporary security credentials that you can use to access AWS resources.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#assume_role",definedAttributes:[{name:"duration",displayName:"Duration",description:"Duration of the assume role session.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#duration"},{name:"external_id",displayName:"External ID",description:"External identifier to use when assuming the role.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#external_id"},{name:"policy",displayName:"Policy",description:"IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#policy"},{name:"policy_arns",displayName:"Policy ARNs",description:"Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#policy_arns"},{name:"role_arn",displayName:"Role ARN",description:"ARN of the IAM Role to assume. Can also be set with the AWS_ROLE_ARN environment variable.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#role_arn"},{name:"session_name",displayName:"Session name",description:"Session name to use when assuming the role. Can also be set with the AWS_ROLE_SESSION_NAME environment variable.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#session_name"},{name:"source_identity",displayName:"Source identity",description:"Source identity specified by the principal assuming the role.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#source_identity"},k,{name:"transitive_tag_keys",displayName:"Transitive tag keys",description:"Set of assume role session tag keys to pass to any subsequent sessions.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#transitive_tag_keys"}]},{name:"assume_role_with_web_identity",displayName:"Assume role with web identity",description:"Configuration block for assuming an IAM role using a web identity.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#assume_role_with_web_identity",definedAttributes:[{name:"duration",displayName:"Duration",description:"Duration of the assume role session.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#duration"},{name:"policy",displayName:"Policy",description:"IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#policy"},{name:"policy_arns",displayName:"Policy ARNs",description:"Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#policy_arns"},{name:"role_arn",displayName:"Role ARN",description:"ARN of the IAM Role to assume. Can also be set with the AWS_ROLE_ARN environment variable.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#role_arn"},{name:"session_name",displayName:"Session name",description:"Session name to use when assuming the role. Can also be set with the AWS_ROLE_SESSION_NAME environment variable.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#session_name"},{name:"web_identity_token",displayName:"Web identity token",description:"Value of a web identity token from an OpenID Connect (OIDC) or OAuth provider. One of web_identity_token or web_identity_token_file is required.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#web_identity_token"},{name:"web_identity_token_file",displayName:"Web identity token file",description:"File containing a web identity token from an OpenID Connect (OIDC) or OAuth provider. One of web_identity_token_file or web_identity_token is required. Can also be set with the AWS_WEB_IDENTITY_TOKEN_FILE environment variable.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#web_identity_token_file"}]},{name:"default_tags",displayName:"Default tags",description:"You can assign metadata to your AWS resources in the form of tags.
Each tag is a label consisting of a user-defined key and value.
Tags can help you manage, identify, organize, search for, and filter resources.",type:"Object",url:"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html",definedAttributes:[k]},{name:"ignore_tags",displayName:"Ignore tags",description:"Configuration block with resource tag settings to ignore across all resources handled by this provider
(except any individual service tag resources such as aws_ec2_tag)
for situations where external systems are managing certain resource tags.",type:"Object",url:"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html",definedAttributes:[{name:"keys",displayName:"Keys",description:"List of exact resource tag keys to ignore across all resources handled by this provider.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#keys"},{name:"key_prefixes",displayName:"Key prefixes",description:"List of resource tag key prefixes to ignore across all resources handled by this provider.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#key_prefixes"}]},{name:"endpoints",displayName:"Endpoints",description:"Configure the Terraform AWS Provider to use customized endpoints.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/guides/custom-service-endpoints"}]}];function O(t){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(t)}function N(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function C(t){for(var e=1;eIf set to true, DNS hostnames that are addressed between linked EC2-Classic instances and instances in the VPC will resolve to private IP addresses.",type:"Boolean",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html"},{name:"assign_generated_ipv6_cidr_block",displayName:"Assign generated IPv6 CIDR block",description:"Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC.",type:"Boolean",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html"},{name:"enable_network_address_usage_metrics",displayName:"Enable network address usage metrics",description:"Enable network address usage metrics for the VPC.",type:"Boolean",url:"https://docs.aws.amazon.com/vpc/latest/userguide/network-address-usage.html"},k]},{type:"aws_subnet",blockType:"resource",provider:"aws",displayName:"Subnet",description:"A subnet is a range of IP addresses in your VPC. You can launch AWS resources into your subnets.",icon:"Aws_Mesh",model:"DefaultModel",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-subnets.html",categories:["AWS","Networking"],tags:[],definedAttributes:[C(C({},x),{},{description:"The VPC ID to create the subnet in.",required:!0,url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#vpc_id"}),{name:"gateway_id",type:"Link",linkAttribute:"id",linkRef:"aws_internet_gateway",linkType:"Default",linkModel:"defaultLink"},{name:"availability_zone",displayName:"Availability zone",description:"The Availability Zone for the subnet.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#availability_zone"},{name:"availability_zone_id",displayName:"Availability zone ID",description:"The ID of the Availability Zone for the subnet.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#availability_zone_id"},{name:"cidr_block",displayName:"CIDR block",description:"IPv4 CIDR block for the subnet",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#cidr_block",rules:{regex:"^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$"}},{name:"customer_owned_ipv4_pool",displayName:"Customer owned IPv4 pool",description:"The ID of an address pool that you own.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#customer_owned_ipv4_pool"},{name:"map_customer_owned_ip_on_launch",displayName:"Map customer owned IP on launch",description:"Specify true to indicate that network interfaces created in the subnet should be assigned a customer owned IP address.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#map_customer_owned_ip_on_launch"},{name:"map_customer_ip_on_launch",displayName:"Map customer IP on launch",description:"Specify true to indicate that instances launched into the subnet should be assigned a public IP address.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#map_public_ip_on_launch"},{name:"enable_dns64",displayName:"Enable DNS64",description:"Whether DNS queries made to the Amazon-provided DNS Resolver
in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#enable_dns64"},{name:"assign_ipv6_address_on_creation",displayName:"Assign IPv6 address on creation",description:"Specify true to indicate that network interfaces created in the specified subnet should be assigned an IPv6 address.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#assign_ipv6_address_on_creation"},{name:"ipv6_cidr_block",displayName:"IPv6 CIDR block",description:"The IPv6 network range for the subnet, in CIDR notation",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#ipv6_cidr_block",rules:{regex:"[a-fA-F0-9]{4}(:[a-fA-F0-9]{4}){7}"}},{name:"ipv6_native",displayName:"IPv6 native",description:"Whether to create an IPv6-only subnet.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#ipv6_native"},{name:"enable_resource_name_dns_a_record_on_launch",displayName:"Enable ressource name DNS A record on launch",description:"Whether to respond to DNS queries for instance hostnames with DNS A records.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#enable_resource_name_dns_a_record_on_launch"},{name:"enable_resource_name_dns_aaaa_record_on_launch",displayName:"Enable ressource name DNS AAAA record on launch",description:"Whether to respond to DNS queries for instance hostnames with DNS AAAA records.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#enable_resource_name_dns_aaaa_record_on_launch"},{name:"private_dns_hostname_type_on_launch",displayName:"Private DNS hostname type on launch",description:"The type of hostnames to assign to instances in the subnet at launch.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#private_dns_hostname_type_on_launch"},{name:"outpost_arn",displayName:"Outpost Amazon Resource Name (ARN)",description:"Amazon Resource Name (ARN) of the Outpost",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#outpost_arn"},C(C({},k),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#tags"})]},{type:"aws_db_subnet_group",blockType:"resource",provider:"aws",displayName:"AWS DB subnet group",description:"A collection of subnets that you create in a VPC and that you then designate for your DB instances.",icon:"AwsDbSubnetGroup",model:"DefaultModel",url:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html#USER_VPC.Subnets",categories:["AWS","Networking"],tags:[],definedAttributes:[{name:"subnet_ids",displayName:"Subnet IDs",description:"A list of VPC subnet IDs.",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html"}]},{type:"aws_route",blockType:"resource",provider:"aws",displayName:"AWS route",description:"Contains a set of rules, called routes, that determine where network traffic from your subnet or gateway is directed.",icon:"Aws_Route-53",model:"DefaultModel",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html",categories:["AWS","Networking"],tags:[],definedAttributes:[{name:"route_table_id",displayName:"Route table ID",description:"The ID of the routing table.",containerRef:"aws_route",required:!0,type:"Reference",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route#route_table_id"},{name:"gateway_id",displayName:"Gateway ID",description:"Identifier of a VPC internet gateway or a virtual private gateway.",linkAttribute:"id",linkRef:"aws_internet_gateway",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route#gateway_id"}]},{type:"aws_route_table",blockType:"resource",provider:"aws",displayName:"Route table",description:"A route table contains a set of rules, called routes, that determine where network traffic from your subnet or gateway is directed.",icon:"Aws_Route-53_Route-Table",model:"DefaultModel",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html",categories:["AWS","Networking"],tags:[],definedAttributes:[C(C({},x),{},{description:"The ID of the VPC for which to create the route table.",required:!0,url:"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"}),{name:"propagating_vgws",displayName:"Propagating Virtual GateWays (VGWS)",description:"List of virtual gateways for propagation",type:"Array",url:"https://docs.aws.amazon.com/directconnect/latest/UserGuide/virtualgateways.html"},k]},{type:"aws_route_table_association",blockType:"resource",provider:"aws",displayName:"Route table association",description:"Association between a route table and a subnet, internet gateway, or virtual private gateway.",icon:"Aws_Connector",model:"DefaultModel",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html",categories:["AWS","Networking"],tags:[],definedAttributes:[C(C({},x),{},{description:"The ID of the VPC for which to create the route table association.",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html"}),{name:"route_table_id",displayName:"Route table ID",description:"The ID of the route table to associate the subnet with.",linkRef:"aws_route_table",linkType:"Reverse",linkModel:"defaultLink",required:!0,type:"Link",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html"},{name:"gateway_id",displayName:"Gateway ID",description:"The ID of the gateway to associate the route table with. Conflicts with subnet_id.",linkRef:"aws_internet_gateway",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html"},C(C({},S),{},{description:"The ID of the subnet to associate the route table with. Conflicts with gateway_id.",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-subnets.html"})]},{type:"aws_internet_gateway",blockType:"resource",provider:"aws",displayName:"Internet gateway",description:"An internet gateway is a horizontally scaled, redundant, and highly available VPC component
that allows communication between your VPC and the internet.",icon:"Aws_VPC_Internet-Gateway",model:"DefaultModel",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html",categories:["AWS","Networking"],tags:[],definedAttributes:[C(C({},x),{},{description:"The VPC ID to create the gateway in.",url:"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"}),k]}];function P(t){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(t)}function I(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function M(t){for(var e=1;eConflicts with key_name.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#key_name_prefix"},M(M({},k),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#tags"})]}];function B(t){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B(t)}function F(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function U(t){for(var e=1;eWhen you create a launch configuration, you specify information for the instances.",icon:"Aws_Launch-Configuration",model:"DefaultModel",url:"https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-configurations.html",categories:["AWS","Compute"],tags:[],definedAttributes:[{name:"image_id",displayName:"Image ID",description:"The EC2 image ID to launch.",linkRef:"aws_ami",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#image_id"},{name:"instance_type",displayName:"Instance type",description:"The size of instance to launch.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#instance_type"},{name:"iam_instance_profile",displayName:"IAM instance profile",description:"The name attribute of the IAM instance profile to associate with launched instances.",type:"String",url:"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html"},{name:"associate_public_ip_address",displayName:"Associate public IP address",description:"Associate a public ip address with an instance in a VPC.",type:"Boolean",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html"},{name:"enable_monitoring",displayName:"Enable monitoring",description:"Enables/disables detailed monitoring.",type:"Boolean",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring_ec2.html"},{name:"key_name",displayName:"Key name",description:"The key name that should be used for the instance.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#key_name"},{name:"name",displayName:"Name",description:"The name of the launch configuration.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#name"},{name:"name_prefix",displayName:"Name prefix",description:"Creates a unique name beginning with the specified prefix.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#name_prefix"},U(U({},T),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#security_groups"}),{name:"placement_tenancy",displayName:"Placement tenancy",description:"The tenancy of the instance.",type:"String",url:"https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_CreateLaunchConfiguration.html",rules:{values:["enabled","disabled"]}},{name:"spot_price",displayName:"Spot price",description:"The maximum price to use for reserving spot instances.",type:"Number",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances.html"},{name:"user_data",displayName:"User data",description:'The user data to provide when launching the instance.
If you need to pass gzip-compressed data via this argument, use "user_data_base64" instead.',type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#user_data"},{name:"user_data_base64",displayName:"User data base64",description:'Can be used instead of "user_data" to pass base64-encoded binary data directly,
whenever the value is not a valid UTF-8 string.',type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#user_data_base64"},{name:"vpc_classic_link_id",displayName:"VPC ClassicLink ID",description:"The ID of a ClassicLink-enabled VPC.",linkRef:"aws_vpc",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"},{name:"vpc_classic_link_security_groups",displayName:"VPC ClassicLink security groups",description:"The IDs of one or more security groups for the specified ClassicLink-enabled VPC.",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html"},{name:"ebs_optimized",displayName:"EBS optimized",description:"If true, the launched EC2 instance will be EBS-optimized.",type:"Boolean",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html"},{name:"ebs_block_device",displayName:"EBS block device",description:"Additional EBS block devices to attach to the instance.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#ebs_block_device",definedAttributes:[{name:"device_name",displayName:"Device name",description:"The name of the device to mount.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#device_name"},{name:"snapshot_id",displayName:"Snapshot ID",description:"The Snapshot ID to mount.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#snapshot_id"},{name:"volume_size",displayName:"Volume size",description:"The size of the volume in gigabytes.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#volume_size"},{name:"volume_type",displayName:"Volume type",description:"The type of volume.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#volume_type",rules:{values:["standard","gp2","gp3","st1","sc1","io1"]}},{name:"iops",displayName:"IOPS",description:'The amount of provisioned Input/output Operations Per Second (IOPS). This must be set with a volume_type of "io1".',type:"Number",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-characteristics.html"},{name:"throughput",displayName:"Throughput",description:"The throughput (MiBps) to provision for a gp3 volume.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#throughput"},{name:"delete_on_termination",displayName:"Delete on termination",description:"Whether the volume should be destroyed on instance termination.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#delete_on_termination"},{name:"encrypted",displayName:"Encrypted",description:"Whether the volume should be encrypted or not.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#encrypted"},{name:"no_device",displayName:"No device",description:"Whether the device in the block device mapping of the AMI is suppressed.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#no_device"}]},{name:"ephemeral_block_device",displayName:"Ephemeral block device",description:'Customize Ephemeral (also known as "Instance Store") volumes on the instance.',type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#ephemeral_block_device",definedAttributes:[{name:"device_name",displayName:"Device name",description:"The name of the block device to mount on the instance.",required:"true",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#ephemeral_block_device"},{name:"no_device",displayName:"No device",description:"Whether the device in the block device mapping of the AMI is suppressed.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#ephemeral_block_device"},{name:"virtual_name",displayName:"Virtual name",description:"The Instance Store Device Name.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#virtual_name"}]},{name:"metadata_options",displayName:"Metadata options",description:"The metadata options for the instance.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#metadata_options",definedAttributes:[{name:"http_endpoint",displayName:"HTTP endpoint",description:"The state of the metadata service: enabled, disabled.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#http_endpoint",rules:{values:["enabled","disabled"]}},{name:"http_tokens",displayName:"HTTP tokens",description:"Whether the HTTP tokens are required.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#http_tokens",rules:{values:["optional","required"]}},{name:"http_put_response_hop_limit",displayName:"HTTP PUT response hop limit",description:"The desired HTTP PUT response hop limit for instance metadata requests.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#http_put_response_hop_limit"}]},{name:"root_block_device",displayName:"Root block device",description:"Customize details about the root block device of the instance.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device",definedAttributes:[{description:"Whether the volume should be destroyed on instance termination.",displayName:"Delete on termination",name:"delete_on_termination",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{description:"Whether the volume should be encrypted or not. Defaults to false.",displayName:"Encrypted",name:"encrypted",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{description:"The amount of provisioned IOPS.",displayName:"IOPS",name:"iops",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{description:"The throughput (MiBps) to provision for a gp3 volume.",displayName:"Throughput",name:"throughput",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{description:"The size of the volume in gigabytes.",displayName:"Volume",name:"volume_size",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{displayName:"Volume type",name:"volume_type",rules:{values:["standard","gp2","gp3","st1","sc1","io1"]},type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"}]}]},{type:"aws_autoscaling_group",blockType:"resource",provider:"aws",displayName:"Auto Scaling Group",description:"Provides an Auto Scaling Group resource.",icon:"Aws_Auto-Scaling",model:"DefaultModel",url:"https://docs.aws.amazon.com/autoscaling/ec2/userguide/auto-scaling-groups.html",categories:["AWS","Compute"],tags:[],definedAttributes:[{name:"name",displayName:"Name",description:"Name of the Auto Scaling Group.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#name"},{name:"min_size",displayName:"Min Size",description:"Minimum size of the Auto Scaling Group.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#min_size"},{name:"max_size",displayName:"Max Size",description:"Maximum size of the Auto Scaling Group.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#max_size"},{name:"deired_capacity",displayName:"Desired Capacity",description:"Number of Amazon EC2 instances that should be running in the group.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#desired_capacity"},{name:"health_check_type",displayName:"Health Check Type",description:"Controls how health checking is done.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#health_check_type",rules:{values:["EC2","ELB"]}},{name:"target_group_arns",displayName:"Target Group ARNs",description:"Set of aws_alb_target_group ARNs, for use with Application or Network Load Balancing.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#target_group_arns"}]},{type:"aws_autoscaling_policy",blockType:"resource",provider:"aws",displayName:"Autoscaling policy",description:"Provides an Auto Scaling policy resource.",icon:"Aws_Auto-Scaling",model:"DefaultModel",url:"https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html",categories:["AWS","Compute"],tags:[],definedAttributes:[{name:"name",displayName:"Name",description:"Name of the policy.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#name"},{name:"autoscaling_group_name",displayName:"Autoscaling group name",description:"Name of the autoscaling group.",linkRef:"aws_autoscaling_group",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#autoscaling_group_name"},{name:"adjustment_type",displayName:"Adjustment type",description:"Whether the adjustment is an absolute number or a percentage of the current capacity.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#adjustment_type",rules:{values:["ChangeInCapacity","ExactCapacity","PercentChangeInCapacity"]}},{name:"policy_type",displayName:"Policy type",description:"Policy type",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#policy_type",rules:{values:["SimpleScaling","StepScaling","TargetTrackingScaling","PredictiveScaling"]}},{name:"cooldown",displayName:"Cooldown",description:"Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
Only available for SimpleScaling policies.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#cooldown"},{name:"scaling_adjustment",displayName:"Scaling adjustment",description:"Number of instances by which to scale.
Only available for SimpleScaling policies.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#scaling_adjustment"},{name:"estimated_instance_warmup",displayName:"Estimated instance warmup",description:"Estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#estimated_instance_warmup"},{name:"enabled",displayName:"Enabled",description:"Whether the policy should be enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#enabled"},{name:"min_adjustment_magnitude",displayName:"Min adjustment magnitude",description:"Minimum value to scale by when adjustment_type is set to PercentChangeInCapacity.
Only valid when policy_type is SimpleScaling or StepScalling.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#min_adjustment_magnitude"},{name:"metric_aggregation_type",displayName:"Metric aggregation type",description:"The aggregation type for the CloudWatch metrics.
Only valid when policy_type is StepScaling.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#metric_aggregation_type",rules:{values:["Average","Minimum","Maximum"]}},{name:"step_adjustment",displayName:"Step adjustment",description:"A list of step adjustments.
Only valid when policy_type is StepScaling.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#step_adjustment",definedAttributes:[{name:"metric_interval_lower_bound",displayName:"Metric interval lower bound",description:"The lower bound for the difference between the alarm threshold and the CloudWatch metric.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#metric_interval_lower_bound"},{name:"metric_interval_upper_bound",displayName:"Metric interval upper bound",description:"The upper bound for the difference between the alarm threshold and the CloudWatch metric.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#metric_interval_upper_bound"},{name:"scaling_adjustment",displayName:"Scaling adjustment",description:"The number of members by which to scale.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#scaling_adjustment"}]}]}];function K(t){return K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},K(t)}function H(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function q(t){for(var e=1;ewhen the bucket is destroyed so that the bucket can be destroyed without error.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#force_destroy"},{name:"object_lock_enabled",displayName:"Object lock enabled",description:"Indicates whether this bucket has an Object Lock configuration enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#object_lock_enabled"},q(q({},k),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#tags"})]},{type:"aws_s3_bucket_acl",blockType:"resource",provider:"aws",displayName:"S3 bucket Access Control List (ACL)",description:"Amazon S3 access control lists (ACLs) enable you to manage access to buckets and objects.",icon:"Aws_Storage-Service_Bucket-ACL",model:"DefaultModel",url:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/acls.html",categories:["AWS","Storage"],tags:[],definedAttributes:[{name:"bucket",displayName:"Bucket",description:"The name of the bucket to put the ACL in.",linkRef:"aws_s3_bucket",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_acl#bucket"},{name:"acl",displayName:"ACL",description:"ACL to apply to the bucket
Conflicts with access_control_policy",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_acl#acl"},{name:"expected_bucket_owner",displayName:"Bucket owner",description:"Account ID of the expected bucket owner",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_acl#expected_bucket_owner"}]},{type:"aws_efs_file_system",blockType:"resource",provider:"aws",displayName:"EFS File System",description:"Provides an Elastic File System (EFS) File System resource.",icon:"Amazon-EFS",model:"DefaultModel",url:"https://aws.amazon.com/efs/?nc1=h_ls",categories:["AWS","Storage"],tags:[],definedAttributes:[{name:"arn",displayName:"ARN",description:"Amazon Resource Name (ARN) of the file system.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#arn"},{name:"availability_zone_name",displayName:"Availability zone name",description:"The AWS Availability Zone in which to create the file system.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#availability_zone_name"},{name:"availability_zone_id",displayName:"Availability zone ID",description:"The identifier of the Availability Zone in which the file system's One Zone storage classes exist.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#availability_zone_id"},{name:"creation_token",displayName:"Creation token",description:"A unique name used as reference when creating the Elastic File System to ensure idempotent file system creation.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#creation_token",rules:{max:"64",min:"1"}},{name:"encrypted",displayName:"Encrypted",description:"If true, the disk will be encrypted.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#encrypted"},{name:"kms_key_id",displayName:"Encrypted",description:"Amazon Resource Name (ARN) for the Key Management Service (KMS) encryption key.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#kms_key_id"},{name:"lifecycle_policy",displayName:"Lifecycle policy",description:"A file system lifecycle policy",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#lifecycle_policy",definedAttributes:[{name:"transition_to_ia",displayName:"Transition to IA",description:"Indicates how long it takes to transition files to the IA storage class.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#transition_to_ia",rules:{values:["AFTER_1_DAY","AFTER_7_DAYS","AFTER_14_DAYS","AFTER_30_DAYS","AFTER_60_DAYS","AFTER_90_DAYS"]}},{name:"transition_to_primary_storage_class",displayName:"Transition to primary storage class",description:"Describes the policy used to transition a file from infrequent access storage to primary storage.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#transition_to_primary_storage_class",rules:{values:["AFTER_1_ACCESS"]}}]},{name:"performance_mode",displayName:"Performance mode",description:"The file system performance mode.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#performance_mode",rules:{values:["generalPurpose","maxIO"]}},{name:"provisioned_throughput_in_mibps",displayName:"Provisioned throughput in Mibps",description:"The throughput, measured in MiB/s, that you want to provision for the file system.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#provisioned_throughput_in_mibps"},{name:"throughput_mode",displayName:"Throughput mode",description:"Throughput mode for the file system.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#throughput_mode",rules:{values:["bursting","provisioned","elastic"]}},{name:"size_in_bytes",displayName:"Size in bytes",description:"Current byte count used by the file system.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/efs_file_system#size_in_bytes"},q(q({},k),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#tags"})]},{type:"aws_efs_mount_target",blockType:"resource",provider:"aws",displayName:"EFS Mount Target",description:"Provide an Elastic File System (EFS) mount target.",icon:"Amazon-EFS",model:"DefaultModel",url:"https://docs.aws.amazon.com/efs/latest/ug/accessing-fs.html",categories:["AWS","Storage"],tags:[],definedAttributes:[{name:"file_system_id",displayName:"File system ID",description:"The ID of the file system for which the mount target is intended.",linkRef:"aws_efs_file_system",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_mount_target#file_system_id"},q(q({},S),{},{description:"The ID of the subnet to add the mount target in.",required:!0,url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_mount_target#subnet_id"}),{name:"ip_address",displayName:"IP address",description:"The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_mount_target#ip_address"},q(q({},T),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_mount_target#security_groups"})]}];function Y(t){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Y(t)}function $(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function X(t){for(var e=1;eMust not overlap with maintenance_window.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#backup_window"},{name:"character_set_name",displayName:"Character set name",description:"Specifies the character set to associate with the DB instance.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#character_set_name"},{name:"copy_tags_to_snapshot",displayName:"Copy tags to snapshot",description:"Whether to copy all Instance tags to snapshots, or not.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#copy_tags_to_snapshot"},{name:"delete_automated_snapshots",displayName:"Delete automated snapshots",description:"Whether to remove automated backups when the DB instance is deleted.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#delete_automated_snapshots"},{name:"deletion_protection",displayName:"Deletion protection",description:"If 'Deletion protection' is set to true, the DB instance cannot be deleted. Otherwise, it can.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#deletion_protection"},{name:"final_snapshot_identifier",displayName:"Final snapshot identifier",description:"The name of the final DB snapshot when this DB instance is deleted.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#final_snapshot_identifier"},{name:"iam_database_authentication_enabled",displayName:"IAM database authentication enabled",description:"Specifies whether mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#iam_database_authentication_enabled"},{name:"identifier",displayName:"Identifier",description:"The name of the Relational Database Service instance.
Conflicts with identifier_prefix.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#identifier"},{name:"identifier_prefix",displayName:"Identifier prefix",description:"Creates a unique identifier beginning with the specified prefix.
Conflicts with identifier.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#identifier_prefix"},{name:"iops",displayName:"IOPS",description:"The amount of provisioned IOPS.
Can only be set when storage_type is io1 or p3.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#iops"},{name:"maintenance_window",displayName:"Maintenance window",description:"The window to perform maintenance in.
Format: ddd:hh24:mi-ddd:hh24:mi.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#maintenance_window"},{name:"max_allocated_storage",displayName:"Max allocated storage",description:"The upper limit to which Amazon RDS can automatically scale the storage of the DB instance.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#max_allocated_storage"},{name:"monitoring_interval",displayName:"Monitoring interval",description:"The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#monitoring_interval",rules:{values:["0","1","5","10","15","30","60"]}},{name:"multi_az",displayName:"Multi AZ",description:"Specifies if the Relational Database Service instance is on multiple Availability Zones.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#multi_az"},{name:"network_type",displayName:"Network type",description:"The type of network connection to use for connecting to an Amazon Relational Database Service instance.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#network_type",rules:{values:["IPV4","DUAL"]}},{name:"option_group_name",displayName:"Option group name",description:"The name of the option group to associate.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#option_group_name"},{name:"parameter_group_name",displayName:"Parameter group name",description:"The name of the DB parameter group to associate.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#parameter_group_name"},{name:"performance_insights_enabled",displayName:"Performance insights enabled",description:"Specifies whether Performance Insights are enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#performance_insights_enabled"},{name:"performance_insights_retention_period",displayName:"Performance insights retention period",description:"The amount of time in days to retain Performance Insights data.
Must be a multiple of 31.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#performance_insights_retention_period"},X(X({},E),{},{description:"The port on which the DB accepts connections.",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#port"}),{name:"replica_mode",displayName:"Replica mode",description:"Specifies whether the replica is in either mounted or open-read-only mode.
This attribute is only supported by Oracle instances.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#replica_mode",rules:{values:["mounted","open-read-only"]}},{name:"restore_to_point_in_time",displayName:"Restore to point in time",description:"Restore from a point in time.
Must be specified if restore is set to true.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#restore_to_point_in_time",definedAttributes:[{name:"restore_time",displayName:"Restore time",description:"The date and time to restore from.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#restore_time"},{name:"source_db_instance_identifier",displayName:"Source DB instance identifier",description:"The identifier of the source DB instance from which to restore.",linkRef:"aws_db_instance",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_db_instance_identifier"},{name:"use_latest_restorable_time",displayName:"Use latest restorable time",description:"Specifies whether to restore the DB instance to the latest restorable backup time.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#use_latest_restorable_time"},{name:"source_db_instance_automated_backups_arn",displayName:"Source DB instance automated backups ARN",description:"The ARN of the automated backup from which to restore.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_db_instance_automated_backups_arn"},{name:"source_dbi_resource_id",displayName:"Source DBI resource ID",description:"The resource ID of the source DB instance from which to restore.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_dbi_resource_id"}]},{name:"s3_import",displayName:"S3 import",description:"Import from an S3 bucket.
Must be specified if import is set to true.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#s3_import",definedAttributes:[{name:"bucket_name",displayName:"Bucket name",description:"The name of the S3 bucket where the backup is stored.",linkRef:"aws_s3_bucket",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#bucket_name"},{name:"bucket_prefix",displayName:"Bucket prefix",description:"The path to the backup.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#bucket_prefix"},{name:"ingestion_role",displayName:"Ingestion role",description:"Role applied to load the data.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#ingestion_role"},{name:"source_engine",displayName:"Source engine",description:"Source engine for the backup.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_engine"},{name:"source_engine_version",displayName:"Source engine version",description:"Version of the source engine used for the backup.",linkRef:"aws_rds_engine_version",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_engine_version"}]},{name:"storage_encrypted",displayName:"Storage encrypted",description:"Specifies whether the DB instance is encrypted.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#storage_encrypted"},{name:"storage_type",displayName:"Storage type",description:"The type of storage for the DB.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#storage_type",rules:{values:["standard","gp2","gp3","io1"]}},{name:"storage_throughput",displayName:"Storage throughput",description:"The storage throughput value for the DB instance.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#storage_throughput"},{name:"timezone",displayName:"Timezone",description:"The timezone of the DB instance.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#timezone"},{name:"customer_owned_ip_enabled",displayName:"Customer owned IP enabled",description:"Specifies whether the DB instance is a customer-owned IP address (CoIP) enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#customer_owned_ip_enabled"},X(X({},k),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#tags"})]}];function Q(t){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q(t)}function tt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function et(t){for(var e=1;eIf not specified, Terraform will autogenerate a name beginning with tf-lb.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#name",rules:{regex:"^([a-zA-Z0-9]+-)*[a-zA-Z0-9]+$"}},{name:"internal",displayName:"Internal LB",description:"If true, the LB will be internal.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#internal"},{name:"load_balancer_type",displayName:"Load balancer type",description:"The type of load balancer to create.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#load_balancer_type",rules:{values:["application","gateway","network"]}},{name:"access_logs",displayName:"Access logs",description:"An Access Logs block.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb",definedAttributes:[{name:"bucket",displayName:"Bucket",description:"The S3 bucket name to store the logs in.",linkRef:"aws_s3_bucket",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#bucket"},{name:"enabled",displayName:"Enabled",description:"Boolean to enable / disable access_logs. Defaults to false, even when bucket is specified.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enabled"},{name:"prefix",displayName:"Prefix",description:"The S3 bucket prefix. Logs are stored in the root if not configured.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#prefix"}]},{name:"customer_owned_ipv4_pool",displayName:"Customer owned ivp4 pool",description:"The ID of the customer owned ipv4 pool to use for this load balancer.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#customer_owned_ipv4_pool"},{name:"desync_mitigation_mode",displayName:"Customer owned ivp4 pool",description:"Determines how the load balancer handles requests that might pose a security risk to an application due to HTTP desync.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#desync_mitigation_mode",rules:{values:["defensive","monitor","strictest"]}},{name:"drop_invalid_header_fields",displayName:"Drop invalid header fields",description:"Indicates whether HTTP headers with header fields that are not valid are removed by the load balancer (true) or routed to targets (false).
The default is false. Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens. Only valid for Load Balancers of type.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#drop_invalid_header_fields"},{name:"enable_cross_zone_load_balancing",displayName:"Enable cross zone load balancing",description:"If true, cross-zone load balancing of the load balancer will be enabled. For network and gateway type load balancers, this feature is disabled by default (false).
For application load balancer this feature is always enabled (true) and cannot be disabled. Defaults to false.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enable_cross_zone_load_balancing"},{name:"enable_deletion_protection",displayName:"Enable deletion protection",description:"If true, deletion of the load balancer will be disabled via the AWS API. This will prevent Terraform from deleting the load balancer. Defaults to false.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enable_deletion_protection"},{name:"enable_http2",displayName:"Enable http2",description:"Indicates whether HTTP/2 is enabled in application load balancers. Defaults to true.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enable_http2"},{name:"enable_waf_fail_open",displayName:"Enable WAF fail open",description:"Indicates whether to allow a WAF-enabled load balancer to route requests to targets
if it is unable to forward the request to AWS WAF. Defaults to false.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enable_waf_fail_open"},{name:"idle_timeout",displayName:"Idle timeout",description:"The time in seconds that the connection is allowed to be idle.
Only valid for Load Balancers of type application. Default: 60.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#idle_timeout"},{name:"ip_address_type",displayName:"IP address type",description:"The type of IP addresses used by the subnets for your load balancer.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#ip_address_type",rules:{values:["ipv4","dualstack"]}},et(et({},T),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#security_groups"}),{name:"preserve_host_header",displayName:"Preserve host header",description:"Indicates whether the Application Load Balancer should preserve the Host header in the HTTP request
and send it to the target without any change. Defaults to false.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#preserve_host_header"},{name:"subnet_mapping",displayName:"Subnet mapping",description:"A subnet mapping block.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#subnet_mapping",definedAttributes:[et(et({},S),{},{description:"ID of the subnet of which to attach to the load balancer. You can specify only one subnet per Availability Zone.",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#subnet_id"}),{name:"allocation_id",displayName:"Allocation ID",description:"The allocation ID of the Elastic IP address for an internet-facing load balancer.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#allocation_id"},et(et({},{name:"ipv6_address",displayName:"IPv6 address",description:"The IPv6 address.",type:"String"}),{},{description:"The IPv6 address. You associate IPv6 CIDR blocks with your VPC and choose the subnets
where you launch both internet-facing and internal Application Load Balancers or Network Load Balancers.",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#ipv6_address"}),{name:"private_ipv4_address",displayName:"Private IPv4 address",description:"The private IPv4 address for an internal load balancer.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#private_ipv4_address"}]},{name:"subnets",displayName:"Subnets",description:"A list of subnet IDs to attach to the LB. Subnets cannot be updated for Load Balancers of type network.
Changing this value for load balancers of type network will force a recreation of the resource.",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#subnets"},{name:"name_prefix",displayName:"Name prefix",description:"Creates a unique name beginning with the specified prefix. Conflicts with name.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#name_prefix"},et(et({},k),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#tags"})]},{type:"aws_lb_target_group",blockType:"resource",provider:"aws",displayName:"Load balancer target group",description:"Target groups route requests to one or more registered targets, using the protocol and port number that you specify.
You can register a target with multiple target groups",icon:"Aws_Application-Load-Balancer-Target-Group",model:"DefaultModel",url:"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html",categories:["AWS","Load Balancing"],tags:[],definedAttributes:[{name:"connection_termination",displayName:"Connection termination",description:"Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#connection_termination"},{name:"deregistration_delay",displayName:"Deregistration delay",description:"Amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#deregistration_delay"},{name:"lambda_multi_value_headers_enabled",displayName:"Lambda multi value headers enabled",description:"Whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#lambda_multi_value_headers_enabled"},{name:"load_balancing_algorithm_type",displayName:"Load balancing algorithm type",description:"Determines how the load balancer selects targets when routing requests.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#load_balancing_algorithm_type",rules:{values:["round_robin","least_outstanding_requests"]}},{name:"name",displayName:"Name",description:"Name of the target group. If omitted, Terraform will assign a random, unique name.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#name"},{name:"name_prefix",displayName:"Name prefix",description:"Creates a unique name beginning with the specified prefix.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#name_prefix"},et(et({},E),{},{description:"Port on which targets receive traffic, unless overridden when registering a specific target.",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#port"}),{name:"preserve_client_ip",displayName:"Preserve client IP",description:"Whether client IP preservation is enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#preserve_client_ip"},{name:"protocol",displayName:"Protocol",description:"Protocol to use for routing traffic to the targets.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#protocol",rules:{values:["GENEVE","HTTP","HTTPS","TCP","TCP_UDP","TLS","UDP"]}},{name:"protocol_version",displayName:"Protocol version",description:"Only applicable when protocol is HTTP or HTTPS. The protocol version.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#protocol_version"},{name:"proxy_protocol_v2",displayName:"Proxy protocol v2",description:"Whether to enable support for proxy protocol v2 on Network Load Balancers.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#proxy_protocol_v2"},{name:"slow_start",displayName:"Slow start",description:"Amount time for targets to warm up before the load balancer sends them a full share of requests.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#slow_start"},{name:"target_type",displayName:"Target type",description:'Type of target that you must specify when registering targets with this target group. The default is "instance".',type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#target_type"},{name:"ip_address_type",displayName:"IP address type",description:"The type of IP addresses used by the target group, only supported when target type is set to ip.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#ip_address_type",rules:{values:["ipv4","ipv6"]}},et(et({},w),{},{description:"Identifier of the VPC in which to create the target group.",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#vpc_id"}),{name:"health_check",displayName:"Health check",description:"Health Check configuration block.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#health_check",definedAttributes:[{name:"enabled",displayName:"Enabled",description:"Whether health checks are enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#enabled"},{name:"healthy_threshold",displayName:"Healthy threshold",description:"Number of consecutive health check successes required before considering a target healthy.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#healthy_threshold"},{name:"interval",displayName:"Interval",description:"Approximate amount of time, in seconds, between health checks of an individual target.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#interval"},{name:"matcher",displayName:"Matcher",description:"Response codes to use when checking for a healthy responses from a target.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#matcher"},{name:"path",displayName:"Path",description:"Destination for the health check request.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#path"},et(et({},E),{},{description:"The port the load balancer uses when performing health checks on targets.",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#port"}),{name:"protocol",displayName:"Protocol",description:"The port the load balancer uses when performing health checks on targets.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#protocol",rules:{values:["TCP","HTTP","HTTPS"]}},{name:"timeout",displayName:"Timeout",description:"Amount of time, in seconds, during which no response from a target means a failed health check.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#timeout"},{name:"unhealthy_threshold",displayName:"Unhealthy threshold",description:"Number of consecutive health check failures required before considering a target unhealthy.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#unhealthy_threshold"}]},{name:"stickiness",displayName:"Stickiness",description:"Stickiness configuration block.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#stickiness",definedAttributes:[{name:"cookie_duration",displayName:"Cookie duration",description:"The time period, in seconds, during which requests from a client should be routed to the same target.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#cookie_duration"},{name:"cookie_name",displayName:"Cookie name",description:"Name of the application based cookie.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#cookie_name"},{name:"enabled",displayName:"Enable stickiness",description:"Boolean to enable/disable stickiness.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#enabled"},{name:"type",displayName:"Type",description:"The type of sticky sessions.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#type",rules:{values:["lb_cookie","app_cookie","source_ip","source_ip_dest_ip","source_ip_dest_ip_proto"]}}]},k,{name:"target_failover",displayName:"Target failover",description:"Target failover block.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#target_failover",definedAttributes:[{name:"on_deregistration",displayName:"On deregistration",description:"Indicates how the Gateway Load Balancer (GWLB) handles existing flows when a target is deregistered.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#on_deregistration",rules:{values:["rebalance","no_rebalance"]}},{name:"on_unhealthy",displayName:"On unhealthy",description:"Indicates how the Gateway Load Balancer (GWLB) handles existing flows when a target is unhealthy.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#on_unhealthy",rules:{values:["rebalance","no_rebalance"]}}]}]},{type:"aws_lb_listener",blockType:"resource",provider:"aws",displayName:"Load Balancer Listener",description:"Provides a Load Balancer Listener resource.",icon:"Aws_Elastic-Load-Balancing_Network-Load-Balancer",model:"DefaultModel",url:"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html",categories:["AWS","Load Balancing"],tags:[],definedAttributes:[{name:"load_balancer_arn",displayName:"Load balancer ARN",description:"ARN of the load balancer.",linkRef:"aws_lb",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#load_balancer_arn"},{name:"default_action",displayName:"Default action",description:"Configuration block for the default action.",required:!0,type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#default_action",definedAttributes:[{name:"type",displayName:"Type",description:"Type of routing action.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#type",rules:{values:["forward","authenticate-oidc","authenticate-cognito","redirect","fixed-response"]}},{name:"target_group_arn",displayName:"Target group ARN",description:"ARN of the target group to which to route traffic.",linkRef:"aws_lb_target_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#target_group_arn"}]},{name:"certificate_arn",displayName:"Certificate ARN",description:"ARN of the default SSL server certificate.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#certificate_arn"},et(et({},E),{},{description:"Port on which the load balancer is listening.",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#port"}),{name:"protocol",displayName:"Protocol",description:"Protocol for connections from clients to the load balancer.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#protocol",rules:{values:["HTTP","HTTPS","TCP","TLS","UDP","TCP_UDP"]}},{name:"alpn_policy",displayName:"ALPN policy",description:"Name of the Application-Layer Protocol Negotiation (ALPN) policy.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#alpn_policy",rules:{values:["HTTP1Only","HTTP2Only","HTTP2Optional","HTTP2Preferred","None"]}},{name:"ssl_policy",displayName:"SSL policy",description:"Name of the SSL Policy for the listener.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#ssl_policy"},et(et({},k),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#tags"})]}];function it(t){return function(t){if(Array.isArray(t))return ot(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ot(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ot(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ot(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);nt.length)&&(e=t.length);for(var n=0,r=Array(e);nthat provides the information required to launch an instance.",icon:"Aws_EC2_AMI",model:"DefaultModel",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html",categories:["AWS","Data Sources"],tags:[],definedAttributes:[{name:"owners",displayName:"Owners",description:"List of AMI owners to limit search.",type:"Array",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html"},{name:"most_recent",displayName:"Most recent",description:"If more than one result is returned, use the most recent AMI.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami#most_recent"},{name:"executable_users",displayName:"Executable users",description:"Limit search to users with explicit launch permission on the image.",type:"Array",url:"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html"},{name:"include_deprecated",displayName:"Include deprecated",description:"If true, all deprecated AMIs are included in the response.",type:"Boolean",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html"},{name:"name_regex",displayName:"Name regex",description:"Regex string to apply to the AMI list returned by AWS.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami#name_regex"}]},{type:"aws_rds_engine_version",blockType:"data",displayName:"Relational Database Service engine version",description:"Information about a Relational Database Service engine version.

Amazon Relational Database Service (Amazon RDS) is a web service
that makes it easier to set up, operate, and scale a relational database in the AWS Cloud.",icon:"Aws_RDS",model:"DefaultModel",url:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html",categories:["AWS","Data Sources"],tags:[],definedAttributes:[{name:"engine",displayName:"Engine",description:"A DB engine is the specific relational database software that runs on your DB instance.",required:!0,type:"String",url:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html#Welcome.Concepts.DBInstance.engine",rules:{values:["aurora","aurora-mysql","aurora-postgresql","docdb","mariadb","mysql","neptune","oracle-ee","oracle-se","oracle-se1","oracle-se2","postgres","sqlserver-ee","sqlserver-ex","sqlserver-se","sqlserver-web"]}},{name:"default_only",displayName:"Default only",description:"When set to true, the default version for the specified engine or combination of engine and major version will be returned.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#default_only"},{name:"version",displayName:"Version",description:"Version of the DB engine.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#version"},{name:"preferred_versions",displayName:"Preferred versions",description:"Ordered list of preferred engine versions.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#preferred_versions"},{name:"include_all",displayName:"Include all",description:"When set to true, the specified version or member of prefered versions will be returned even if it is deprecated.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#include_all"},{name:"parameter_group_family",displayName:"Parameter group family",description:"Name of a specific DB parameter group family.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#parameter_group_family"}]},{type:"aws_availability_zones",blockType:"data",displayName:"Availability Zones",description:"The Availability Zones data source allows access to the list of AWS Availability Zones
which can be accessed by an AWS account within the region configured in the provider.

This is different from the Availability Zone (singular).",icon:"Aws_Local-Zones",model:"DefaultModel",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html",categories:["AWS","Data Sources"],tags:[],definedAttributes:[{name:"all_availability_zones",displayName:"All Availability Zones",description:"Set to true to include all Availability Zones and Local Zones regardless of your opt in status.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones#all_availability_zones"},{name:"exclude_names",displayName:"Exclude names",description:"List of Availability Zone names to exclude.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones#exclude_names"},{name:"exclude_zone_ids",displayName:"Exclude zone IDs",description:"List of Availability Zone IDs to exclude.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones#exclude_zone_ids"},{name:"state",displayName:"State",description:"Allows to filter list of Availability Zones based on their current state.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones#state",rules:{values:["available","impaired","information","unavailable"]}}]}]),it(R),it(j),it(V),it(G),it(J),it(rt),it([{type:"aws_route53_zone",blockType:"resource",displayName:"AWS route 53 zone",description:"A collection of records",icon:"Aws_Route-53-Hosted-Zone",isContainer:!0,model:"DefaultContainer",url:"https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-working-with.html",categories:["AWS","DNS and Routing"],tags:[],definedAttributes:[{name:"name",displayName:"Name",description:"This is the name of the hosted zone.",required:!0,type:"String",containerRef:"aws_route53_zone",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_zone#name"},{name:"records",displayName:"Records",type:"Link",linkModel:"defaultLink",linkAttribute:"name",linkRef:"aws_route53_record",linkType:"Default"}]},{type:"aws_route53_record",blockType:"resource",displayName:"AWS route 53 record",description:"Create records to tell the DNS how to route traffic for that domain.",icon:"Aws_Route-53_Route-Table",model:"DefaultModel",url:"https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/rrsets-working-with.html",categories:["AWS","DNS and Routing"],tags:[],definedAttributes:[{name:"zone_id",displayName:"Zone ID",description:"The ID of the hosted zone to contain this record.",containerRef:"aws_route53_zone",required:!0,type:"Reference",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record#zone_id"},{name:"records",displayName:"Records",description:"A string list of records.",linkRef:"aws_route53_record",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record#records"}]}]),it([{type:"aws_cloudwatch_metric_alarm",blockType:"resource",provider:"aws",displayName:"Cloudwatch metric alarm",description:"Watches a single metric over a specified time period, and performs one or more specified actions, based on the value of the metric relative to a threshold over time.",icon:"Amazon-CloudWatch_Alarm",model:"DefaultModel",url:"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#CloudWatchAlarms",categories:["AWS","Monitoring and Logging"],tags:[],definedAttributes:[{name:"alarm_name",displayName:"Alarm name",description:"The descriptive name for the alarm. This name must be unique within the user's AWS account",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#alarm_name"},{name:"comparison_operator",displayName:"Comparison operator",description:"The arithmetic operation to use when comparing the specified Statistic and Threshold.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#comparison_operator",rules:{values:["GreaterThanOrEqualToThreshold","GreaterThanThreshold","LessThanThreshold","LessThanOrEqualToThreshold","LessThanLowerOrGreaterThanUpperThreshold","LessThanLowerThreshold","GreaterThanUpperThreshold"]}},{name:"evaluation_periods",displayName:"Evaluation periods",description:"The number of periods over which data is compared to the specified threshold.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#evaluation_periods"},{name:"metric_name",displayName:"Metric name",description:"The name for the alarm's associated metric.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#metric_name"},{name:"namespace",displayName:"Namespace",description:"The namespace for the alarm's associated metric.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#namespace"},{name:"period",displayName:"Period",description:"The period in seconds over which the specified statistic is applied.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#period"},{name:"statistic",displayName:"Statistic",description:"The statistic to apply to the alarm's associated metric.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#statistic",rules:{values:["SampleCount","Average","Sum","Minimum","Maximum"]}},{name:"threshold",displayName:"Threshold",description:"The value against which the specified statistic is compared.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#threshold"},{name:"dimensions",displayName:"Dimensions",description:"The dimensions for the alarm's associated metric.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#dimensions",definedAttributes:[{name:"AutoScalingGroupName",displayName:"Auto Scaling group name",description:"Amazon EC2 Auto Scaling",linkRef:"aws_autoscaling_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html"}]},{name:"actions_enabled",displayName:"Actions enabled",description:"Indicates whether or not actions should be executed during any changes to the alarm's state.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#actions_enabled"},{name:"alarm_description",displayName:"Alarm description",description:"The description for the alarm.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#alarm_description"},{name:"datapoints_to_alarm",displayName:"Datapoints to alarm",description:"The number of datapoints that must be breaching to trigger the alarm.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#datapoints_to_alarm"},{name:"alarm_actions",displayName:"Alarm actions",description:"The list of actions to execute when this alarm transitions into an ALARM state from any other state.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#alarm_actions",rules:{max:5,min:1}},{name:"insufficient_data_actions",displayName:"Insufficient data actions",description:"The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#insufficient_data_actions",rules:{max:5,min:1}},{name:"ok_actions",displayName:"OK actions",description:"The list of actions to execute when this alarm transitions into an OK state from any other state.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#ok_actions",rules:{max:5,min:1}},{name:"unit",displayName:"Unit",description:"The unit for the alarm's associated metric.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#unit",rules:{values:["Seconds","Microseconds","Milliseconds","Bytes","Kilobytes","Megabytes","Gigabytes","Terabytes","Bits","Kilobits","Megabits","Gigabits","Terabits","Percent","Count","Bytes/Second","Kilobytes/Second","Megabytes/Second","Gigabytes/Second","Terabytes/Second","Bits/Second","Kilobits/Second","Megabits/Second","Gigabits/Second","Terabits/Second","Count/Second","None"]}},{name:"extended_statistic",displayName:"Extended statistic",description:"The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#extended_statistic"},{name:"treat_missing_data",displayName:"Treat missing data",description:"Sets how this alarm is to handle missing data points.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#treat_missing_data",rules:{values:["breaching","notBreaching","ignore","missing"]}},{name:"evaluate_low_sample_count_percentiles",displayName:"Evaluate low sample count percentiles",description:"Used only for alarms based on percentiles.
If ignore, the alarm state does not change during periods with too few data points to be statistically significant.
If evaluate or omit, the alarm is always evaluated and possibly changes state no matter how many data points are available.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#evaluate_low_sample_count_percentiles",rules:{values:["evaluate","ignore"]}},{name:"metric_query",displayName:"Metric query",description:"Enable to create an alarm based on a metric math expression.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#metric_query",definedAttributes:[{name:"id",displayName:"ID",description:"A short name used to tie this object to the results in the response.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#id"},{name:"account_id",displayName:"Account ID",description:"The account ID to use when searching for the metric.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#account_id"},{name:"expression",displayName:"Expression",description:"The math expression to be performed on the returned data, if this object is performing a math expression.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#expression"},{name:"label",displayName:"Label",description:"A human-readable label for this metric or expression.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#label"},{name:"return_data",displayName:"Return data",description:"Specify exactly one metric_query to be true to use that metric_query result as the alarm.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#return_data"}]}]}]),it([{type:"random_string",blockType:"resource",provider:"aws",displayName:"Random String",description:"Generates a random permutation of alphanumeric characters and optionally special characters.",icon:"variable",model:"DefaultModel",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string",categories:["AWS","Miscellaneous"],tags:[],definedAttributes:[{name:"length",displayName:"Length",description:"The length of the string desired.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#length",rules:{min:1}},{name:"special",displayName:"Special",description:"Include special characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#special"},{name:"min_special",displayName:"Min special",description:"Minimum number of special characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_special"},{name:"lower",displayName:"Lower",description:"Include lowercase alphabet characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#lower"},{name:"min_lower",displayName:"Min lower",description:"Minimum number of lowercase characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_lower"},{name:"upper",displayName:"Upper",description:"Include uppercase alphabet characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#upper"},{name:"min_upper",displayName:"Min upper",description:"Minimum number of uppercase characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_upper"},{name:"numeric",displayName:"Numeric",description:"Include numeric characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#numeric"},{name:"min_numeric",displayName:"Min numeric",description:"Minimum number of numeric characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#min_numeric"},{name:"override_special",displayName:"Override special",description:"Supply your own list of special characters to use for string generation.",type:"String"}]},{type:"random_password",blockType:"resource",provider:"aws",displayName:"Random Password",description:"Identical to random_string with the exception that the result is treated as sensitive and, thus, not displayed in console output.",icon:"variable",model:"DefaultModel",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password",categories:["AWS","Miscellaneous"],tags:[],definedAttributes:[{name:"length",displayName:"Length",description:"The length of the string desired.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#length",rules:{min:1}},{name:"special",displayName:"Special",description:"Include special characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#special"},{name:"min_special",displayName:"Min special",description:"Minimum number of special characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_special"},{name:"lower",displayName:"Lower",description:"Include lowercase alphabet characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#lower"},{name:"min_lower",displayName:"Min lower",description:"Minimum number of lowercase characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_lower"},{name:"upper",displayName:"Upper",description:"Include uppercase alphabet characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#upper"},{name:"min_upper",displayName:"Min upper",description:"Minimum number of uppercase characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_upper"},{name:"numeric",displayName:"Numeric",description:"Include numeric characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#numeric"},{name:"min_numeric",displayName:"Min numeric",description:"Minimum number of numeric characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#min_numeric"},{name:"override_special",displayName:"Override special",description:"Supply your own list of special characters to use for string generation.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#override_special"}]}]),it([{type:"server",blockType:"module",provider:"aws",displayName:"Server",icon:"Aws_Servers",model:"DefaultModel",categories:["AWS","Modules"],tags:[],definedAttributes:[]}]),it([{type:"image_id",blockType:"variable",provider:"aws",icon:"variable",model:"DefaultModel",categories:["AWS","Variables"],tags:[],definedAttributes:[]}])));function ct(t){return ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ct(t)}function ut(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n0})).reduce((function(t,e){return e.parentTypes.forEach((function(n){t[n]=[].concat(function(t){return function(t){if(Array.isArray(t))return ut(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ut(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ut(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t[n]||[]),[e.type])})),t}),{});t.filter((function(t){return e[t.type]})).forEach((function(t){t.childrenTypes=e[t.type]}))}}])}(t.DefaultMetadata);const _t=bt;var wt={763:()=>{}},xt={};function kt(t){var e=xt[t];if(void 0!==e)return e.exports;var n=xt[t]={exports:{}};return wt[t](n,n.exports,kt),n.exports}kt.d=(t,e)=>{for(var n in e)kt.o(e,n)&&!kt.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},kt.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Tt={};kt.d(Tt,{MG:()=>ye,fr:()=>$e,sR:()=>qn,Zo:()=>Gn,iH:()=>Jn,rt:()=>tn,jB:()=>nr,M8:()=>Cn,$t:()=>Hn,aq:()=>zn,pG:()=>Xe,eP:()=>Fn,KU:()=>Bn,zW:()=>Yn,IX:()=>zt,mY:()=>Vt,a7:()=>me,JG:()=>sn,ay:()=>vn,X2:()=>kn,WU:()=>In,Uw:()=>Mn,gw:()=>Dn,iX:()=>ir,re:()=>Sn,Pg:()=>ar,tD:()=>En,R$:()=>xn,Dj:()=>rn,m7:()=>oe,NZ:()=>te,xo:()=>ee,ou:()=>St,qC:()=>cr,mD:()=>Pt,Ay:()=>pr});class St{constructor(){this.source=null,this.type=null,this.channel=null,this.start=null,this.stop=null,this.tokenIndex=null,this.line=null,this.column=null,this._text=null}getTokenSource(){return this.source[0]}getInputStream(){return this.source[1]}get text(){return this._text}set text(t){this._text=t}}function Et(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n>>16)*c&65535)<<16)&4294967295,i=i<<15|i>>>17,i=(65535&i)*u+(((i>>>16)*u&65535)<<16)&4294967295,a^=i,a=a<<13|a>>>19,r=5*(65535&a)+((5*(a>>>16)&65535)<<16)&4294967295,a=27492+(65535&r)+((58964+(r>>>16)&65535)<<16);switch(i=0,o){case 3:i^=(255&n.charCodeAt(l+2))<<16;case 2:i^=(255&n.charCodeAt(l+1))<<8;case 1:i^=255&n.charCodeAt(l),i=(65535&i)*c+(((i>>>16)*c&65535)<<16)&4294967295,i=i<<15|i>>>17,i=(65535&i)*u+(((i>>>16)*u&65535)<<16)&4294967295,a^=i}return a^=n.length,a^=a>>>16,a=2246822507*(65535&a)+((2246822507*(a>>>16)&65535)<<16)&4294967295,a^=a>>>13,a=3266489909*(65535&a)+((3266489909*(a>>>16)&65535)<<16)&4294967295,a^=a>>>16,a>>>0}class Nt{constructor(){this.count=0,this.hash=0}update(){for(let t=0;t>>17,t*=461845907,this.count=this.count+1;let n=this.hash^t;n=n<<13|n>>>19,n=5*n+3864292196,this.hash=n}}}finish(){let t=this.hash^4*this.count;return t^=t>>>16,t*=2246822507,t^=t>>>13,t*=3266489909,t^=t>>>16,t}static hashStuff(){const t=new Nt;return t.update.apply(t,arguments),t.finish()}}function Ct(t){return t?"string"==typeof t?Ot(t):t.hashCode():-1}function Lt(t,e){return t&&t.equals?t.equals(e):t===e}function Rt(t){return null===t?"null":t}function Pt(t){return Array.isArray(t)?"["+t.map(Rt).join(", ")+"]":"null"}class It{constructor(t,e){this.buckets=new Array(16),this.threshold=Math.floor(12),this.itemCount=0,this.hashFunction=t||Ct,this.equalsFunction=e||Lt}get(t){if(null==t)return t;const e=this._getBucket(t);if(!e)return null;for(const n of e)if(this.equalsFunction(n,t))return n;return null}add(t){return this.getOrAdd(t)===t}getOrAdd(t){this._expand();const e=this._getSlot(t);let n=this.buckets[e];if(!n)return n=[t],this.buckets[e]=n,this.itemCount++,t;for(const e of n)if(this.equalsFunction(e,t))return e;return n.push(t),this.itemCount++,t}has(t){return null!=this.get(t)}values(){return this.buckets.filter((t=>null!=t)).flat(1)}toString(){return Pt(this.values())}get length(){return this.itemCount}_getSlot(t){return this.hashFunction(t)&this.buckets.length-1}_getBucket(t){return this.buckets[this._getSlot(t)]}_expand(){if(this.itemCount<=this.threshold)return;const t=this.buckets,e=2*this.buckets.length;this.buckets=new Array(e),this.threshold=Math.floor(.75*e);for(const e of t)if(e)for(const t of e){const e=this._getSlot(t);let n=this.buckets[e];n||(n=[],this.buckets[e]=n),n.push(t)}}}class Mt{hashCode(){const t=new Nt;return this.updateHashCode(t),t.finish()}evaluate(t,e){}evalPrecedence(t,e){return this}static andContext(t,e){if(null===t||t===Mt.NONE)return e;if(null===e||e===Mt.NONE)return t;const n=new Dt(t,e);return 1===n.opnds.length?n.opnds[0]:n}static orContext(t,e){if(null===t)return e;if(null===e)return t;if(t===Mt.NONE||e===Mt.NONE)return Mt.NONE;const n=new jt(t,e);return 1===n.opnds.length?n.opnds[0]:n}}class Dt extends Mt{constructor(t,e){super();const n=new It;t instanceof Dt?t.opnds.map((function(t){n.add(t)})):n.add(t),e instanceof Dt?e.opnds.map((function(t){n.add(t)})):n.add(e);const r=Bt(n);if(r.length>0){let t=null;r.map((function(e){(null===t||e.precedencet.toString()));return(t.length>3?t.slice(3):t).join("&&")}}class jt extends Mt{constructor(t,e){super();const n=new It;t instanceof jt?t.opnds.map((function(t){n.add(t)})):n.add(t),e instanceof jt?e.opnds.map((function(t){n.add(t)})):n.add(e);const r=Bt(n);if(r.length>0){const t=r.sort((function(t,e){return t.compareTo(e)})),e=t[t.length-1];n.add(e)}this.opnds=Array.from(n.values())}equals(t){return this===t||t instanceof jt&&Et(this.opnds,t.opnds)}updateHashCode(t){t.update(this.opnds,"OR")}evaluate(t,e){for(let n=0;nt.toString()));return(t.length>3?t.slice(3):t).join("||")}}function Bt(t){const e=[];return t.values().map((function(t){t instanceof Mt.PrecedencePredicate&&e.push(t)})),e}function Ft(t,e){if(null===t){const t={state:null,alt:null,context:null,semanticContext:null};return e&&(t.reachesIntoOuterContext=0),t}{const n={};return n.state=t.state||null,n.alt=void 0===t.alt?null:t.alt,n.context=t.context||null,n.semanticContext=t.semanticContext||null,e&&(n.reachesIntoOuterContext=t.reachesIntoOuterContext||0,n.precedenceFilterSuppressed=t.precedenceFilterSuppressed||!1),n}}class Ut{constructor(t,e){this.checkContext(t,e),t=Ft(t),e=Ft(e,!0),this.state=null!==t.state?t.state:e.state,this.alt=null!==t.alt?t.alt:e.alt,this.context=null!==t.context?t.context:e.context,this.semanticContext=null!==t.semanticContext?t.semanticContext:null!==e.semanticContext?e.semanticContext:Mt.NONE,this.reachesIntoOuterContext=e.reachesIntoOuterContext,this.precedenceFilterSuppressed=e.precedenceFilterSuppressed}checkContext(t,e){null!==t.context&&void 0!==t.context||null!==e&&null!==e.context&&void 0!==e.context||(this.context=null)}hashCode(){const t=new Nt;return this.updateHashCode(t),t.finish()}updateHashCode(t){t.update(this.state.stateNumber,this.alt,this.context,this.semanticContext)}equals(t){return this===t||t instanceof Ut&&this.state.stateNumber===t.state.stateNumber&&this.alt===t.alt&&(null===this.context?null===t.context:this.context.equals(t.context))&&this.semanticContext.equals(t.semanticContext)&&this.precedenceFilterSuppressed===t.precedenceFilterSuppressed}hashCodeForConfigSet(){const t=new Nt;return t.update(this.state.stateNumber,this.alt,this.semanticContext),t.finish()}equalsForConfigSet(t){return this===t||t instanceof Ut&&this.state.stateNumber===t.state.stateNumber&&this.alt===t.alt&&this.semanticContext.equals(t.semanticContext)}toString(){return"("+this.state+","+this.alt+(null!==this.context?",["+this.context.toString()+"]":"")+(this.semanticContext!==Mt.NONE?","+this.semanticContext.toString():"")+(this.reachesIntoOuterContext>0?",up="+this.reachesIntoOuterContext:"")+")"}}class zt{constructor(t,e){this.start=t,this.stop=e}clone(){return new zt(this.start,this.stop)}contains(t){return t>=this.start&&tthis.addInterval(t)),this),this}reduce(t){if(t=n.stop?(this.intervals.splice(t+1,1),this.reduce(t)):e.stop>=n.start&&(this.intervals[t]=new zt(e.start,n.stop),this.intervals.splice(t+1,1))}}complement(t,e){const n=new Vt;return n.addInterval(new zt(t,e+1)),null!==this.intervals&&this.intervals.forEach((t=>n.removeRange(t))),n}contains(t){if(null===this.intervals)return!1;for(let e=0;en.start&&t.stop=n.stop?(this.intervals.splice(e,1),e-=1):t.start"):t.push("'"+String.fromCharCode(n.start)+"'"):t.push("'"+String.fromCharCode(n.start)+"'..'"+String.fromCharCode(n.stop-1)+"'")}return t.length>1?"{"+t.join(", ")+"}":t[0]}toIndexString(){const t=[];for(let e=0;e"):t.push(n.start.toString()):t.push(n.start.toString()+".."+(n.stop-1).toString())}return t.length>1?"{"+t.join(", ")+"}":t[0]}toTokenString(t,e){const n=[];for(let r=0;r1?"{"+n.join(", ")+"}":n[0]}elementName(t,e,n){return n===St.EOF?"":n===St.EPSILON?"":t[n]||e[n]}get length(){return this.intervals.map((t=>t.length)).reduce(((t,e)=>t+e))}}class Kt{constructor(){this.atn=null,this.stateNumber=Kt.INVALID_STATE_NUMBER,this.stateType=null,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.nextTokenWithinRule=null}toString(){return this.stateNumber}equals(t){return t instanceof Kt&&this.stateNumber===t.stateNumber}isNonGreedyExitState(){return!1}addTransition(t,e){void 0===e&&(e=-1),0===this.transitions.length?this.epsilonOnlyTransitions=t.isEpsilon:this.epsilonOnlyTransitions!==t.isEpsilon&&(this.epsilonOnlyTransitions=!1),-1===e?this.transitions.push(t):this.transitions.splice(e,1,t)}}Kt.INVALID_TYPE=0,Kt.BASIC=1,Kt.RULE_START=2,Kt.BLOCK_START=3,Kt.PLUS_BLOCK_START=4,Kt.STAR_BLOCK_START=5,Kt.TOKEN_START=6,Kt.RULE_STOP=7,Kt.BLOCK_END=8,Kt.STAR_LOOP_BACK=9,Kt.STAR_LOOP_ENTRY=10,Kt.PLUS_LOOP_BACK=11,Kt.LOOP_END=12,Kt.serializationNames=["INVALID","BASIC","RULE_START","BLOCK_START","PLUS_BLOCK_START","STAR_BLOCK_START","TOKEN_START","RULE_STOP","BLOCK_END","STAR_LOOP_BACK","STAR_LOOP_ENTRY","PLUS_LOOP_BACK","LOOP_END"],Kt.INVALID_STATE_NUMBER=-1;class Ht extends Kt{constructor(){return super(),this.stateType=Kt.RULE_STOP,this}}class qt{constructor(t){if(null==t)throw"target cannot be null.";this.target=t,this.isEpsilon=!1,this.label=null}}qt.EPSILON=1,qt.RANGE=2,qt.RULE=3,qt.PREDICATE=4,qt.ATOM=5,qt.ACTION=6,qt.SET=7,qt.NOT_SET=8,qt.WILDCARD=9,qt.PRECEDENCE=10,qt.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],qt.serializationTypes={EpsilonTransition:qt.EPSILON,RangeTransition:qt.RANGE,RuleTransition:qt.RULE,PredicateTransition:qt.PREDICATE,AtomTransition:qt.ATOM,ActionTransition:qt.ACTION,SetTransition:qt.SET,NotSetTransition:qt.NOT_SET,WildcardTransition:qt.WILDCARD,PrecedencePredicateTransition:qt.PRECEDENCE};class Wt extends qt{constructor(t,e,n,r){super(t),this.ruleIndex=e,this.precedence=n,this.followState=r,this.serializationType=qt.RULE,this.isEpsilon=!0}matches(t,e,n){return!1}}class Gt extends qt{constructor(t,e){super(t),this.serializationType=qt.SET,null!=e?this.label=e:(this.label=new Vt,this.label.addOne(St.INVALID_TYPE))}matches(t,e,n){return this.label.contains(t)}toString(){return this.label.toString()}}class Yt extends Gt{constructor(t,e){super(t,e),this.serializationType=qt.NOT_SET}matches(t,e,n){return t>=e&&t<=n&&!super.matches(t,e,n)}toString(){return"~"+super.toString()}}class $t extends qt{constructor(t){super(t),this.serializationType=qt.WILDCARD}matches(t,e,n){return t>=e&&t<=n}toString(){return"."}}class Xt extends qt{constructor(t){super(t)}}class Zt{}class Jt extends Zt{}class Qt extends Jt{}class te extends Qt{get ruleContext(){throw new Error("missing interface implementation")}}class ee extends Qt{}class ne extends ee{}const re={toStringTree:function(t,e,n){e=e||null,null!==(n=n||null)&&(e=n.ruleNames);let r=re.getNodeText(t,e);r=function(t){return t.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}(r);const i=t.getChildCount();if(0===i)return r;let o="("+r+" ";i>0&&(r=re.toStringTree(t.getChild(0),e),o=o.concat(r));for(let n=1;n=0&&e0&&(t+=", "),this.returnStates[e]!==se.EMPTY_RETURN_STATE?(t+=this.returnStates[e],null!==this.parents[e]?t=t+" "+this.parents[e]:t+="null"):t+="$";return t+"]"}}get length(){return this.returnStates.length}}class ce extends se{constructor(t,e){let n=0;const r=new Nt;null!==t?r.update(t,e):r.update(1),n=r.finish(),super(n),this.parentCtx=t,this.returnState=e}getParent(t){return this.parentCtx}getReturnState(t){return this.returnState}equals(t){return this===t||t instanceof ce&&this.hashCode()===t.hashCode()&&this.returnState===t.returnState&&(null==this.parentCtx?null==t.parentCtx:this.parentCtx.equals(t.parentCtx))}toString(){const t=null===this.parentCtx?"":this.parentCtx.toString();return 0===t.length?this.returnState===se.EMPTY_RETURN_STATE?"$":""+this.returnState:this.returnState+" "+t}get length(){return 1}static create(t,e){return e===se.EMPTY_RETURN_STATE&&null===t?se.EMPTY:new ce(t,e)}}class ue extends ce{constructor(){super(null,se.EMPTY_RETURN_STATE)}isEmpty(){return!0}getParent(t){return null}getReturnState(t){return this.returnState}equals(t){return this===t}toString(){return"$"}}se.EMPTY=new ue;class le{constructor(t,e){this.buckets=new Array(16),this.threshold=Math.floor(12),this.itemCount=0,this.hashFunction=t||Ct,this.equalsFunction=e||Lt}set(t,e){this._expand();const n=this._getSlot(t);let r=this.buckets[n];if(!r)return r=[[t,e]],this.buckets[n]=r,this.itemCount++,e;const i=r.find((e=>this.equalsFunction(e[0],t)),this);if(i){const t=i[1];return i[1]=e,t}return r.push([t,e]),this.itemCount++,e}containsKey(t){const e=this._getBucket(t);return!!e&&!!e.find((e=>this.equalsFunction(e[0],t)),this)}get(t){const e=this._getBucket(t);if(!e)return null;const n=e.find((e=>this.equalsFunction(e[0],t)),this);return n?n[1]:null}entries(){return this.buckets.filter((t=>null!=t)).flat(1)}getKeys(){return this.entries().map((t=>t[0]))}getValues(){return this.entries().map((t=>t[1]))}toString(){return"["+this.entries().map((t=>"{"+t[0]+":"+t[1]+"}")).join(", ")+"]"}get length(){return this.itemCount}_getSlot(t){return this.hashFunction(t)&this.buckets.length-1}_getBucket(t){return this.buckets[this._getSlot(t)]}_expand(){if(this.itemCount<=this.threshold)return;const t=this.buckets,e=2*this.buckets.length;this.buckets=new Array(e),this.threshold=Math.floor(.75*e);for(const e of t)if(e)for(const t of e){const e=this._getSlot(t[0]);let n=this.buckets[e];n||(n=[],this.buckets[e]=n),n.push(t)}}}function he(t,e){if(null==e&&(e=oe.EMPTY),null===e.parentCtx||e===oe.EMPTY)return se.EMPTY;const n=he(t,e.parentCtx),r=t.states[e.invokingState].transitions[0];return ce.create(n,r.followState.stateNumber)}function fe(t,e,n){if(t.isEmpty())return t;let r=n.get(t)||null;if(null!==r)return r;if(r=e.get(t),null!==r)return n.set(t,r),r;let i=!1,o=[];for(let r=0;re.returnState&&(i[0]=e.returnState,i[1]=t.returnState);const o=new ae([n,n],i);return null!==r&&r.set(t,e,o),o}const i=[t.returnState,e.returnState];let o=[t.parentCtx,e.parentCtx];t.returnState>e.returnState&&(i[0]=e.returnState,i[1]=t.returnState,o=[e.parentCtx,t.parentCtx]);const s=new ae(o,i);return null!==r&&r.set(t,e,s),s}}(t,e,n,r);if(n){if(t instanceof ue)return t;if(e instanceof ue)return e}return t instanceof ce&&(t=new ae([t.getParent()],[t.returnState])),e instanceof ce&&(e=new ae([e.getParent()],[e.returnState])),function(t,e,n,r){if(null!==r){let n=r.get(t,e);if(null!==n)return se.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),n;if(n=r.get(e,t),null!==n)return se.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),n}let i=0,o=0,s=0,a=new Array(t.returnStates.length+e.returnStates.length).fill(0),c=new Array(t.returnStates.length+e.returnStates.length).fill(null);for(;i a"),t):u.equals(e)?(null!==r&&r.set(t,e,e),se.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> b"),e):(function(t){const e=new le;for(let n=0;n "+u),u)}(t,e,n,r)}class de{constructor(){this.data=new Uint32Array(1)}set(t){de._checkIndex(t),this._resize(t),this.data[t>>>5]|=1<>>5;return!(e>=this.data.length||!(this.data[e]&1<>>5;e>=1;return n+32*t}}return 0}hashCode(){return Nt.hashStuff(this.values())}equals(t){return t instanceof de&&Et(this.data,t.data)}toString(){return"{"+this.values().join(", ")+"}"}get length(){return this.data.map((t=>de._bitCount(t))).reduce(((t,e)=>t+e),0)}_resize(t){const e=t+32>>>5;if(e<=this.data.length)return;const n=new Uint32Array(e);n.set(this.data),n.fill(0,this.data.length),this.data=n}static _checkIndex(t){if(t<0)throw new RangeError("index cannot be negative")}static _bitCount(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,0+(t+=t>>16)&63}}class me{constructor(t){this.atn=t}getDecisionLookahead(t){if(null===t)return null;const e=t.transitions.length,n=[];for(let r=0;r=this.states.length)throw"Invalid state number.";const n=this.states[t];let r=this.nextTokens(n);if(!r.contains(St.EPSILON))return r;const i=new Vt;for(i.addSet(r),i.removeOne(St.EPSILON);null!==e&&e.invokingState>=0&&r.contains(St.EPSILON);){const t=this.states[e.invokingState].transitions[0];r=this.nextTokens(t.followState),i.addSet(r),i.removeOne(St.EPSILON),e=e.parentCtx}return r.contains(St.EPSILON)&&i.addOne(St.EOF),i}}ye.INVALID_ALT_NUMBER=0;class ge extends Kt{constructor(){super(),this.stateType=Kt.BASIC}}class ve extends Kt{constructor(){return super(),this.decision=-1,this.nonGreedy=!1,this}}class be extends ve{constructor(){return super(),this.endState=null,this}}class _e extends Kt{constructor(){return super(),this.stateType=Kt.BLOCK_END,this.startState=null,this}}class we extends Kt{constructor(){return super(),this.stateType=Kt.LOOP_END,this.loopBackState=null,this}}class xe extends Kt{constructor(){return super(),this.stateType=Kt.RULE_START,this.stopState=null,this.isPrecedenceRule=!1,this}}class ke extends ve{constructor(){return super(),this.stateType=Kt.TOKEN_START,this}}class Te extends ve{constructor(){return super(),this.stateType=Kt.PLUS_LOOP_BACK,this}}class Se extends Kt{constructor(){return super(),this.stateType=Kt.STAR_LOOP_BACK,this}}class Ee extends ve{constructor(){return super(),this.stateType=Kt.STAR_LOOP_ENTRY,this.loopBackState=null,this.isPrecedenceDecision=null,this}}class Ae extends be{constructor(){return super(),this.stateType=Kt.PLUS_BLOCK_START,this.loopBackState=null,this}}class Oe extends be{constructor(){return super(),this.stateType=Kt.STAR_BLOCK_START,this}}class Ne extends be{constructor(){return super(),this.stateType=Kt.BLOCK_START,this}}class Ce extends qt{constructor(t,e){super(t),this.label_=e,this.label=this.makeLabel(),this.serializationType=qt.ATOM}makeLabel(){const t=new Vt;return t.addOne(this.label_),t}matches(t,e,n){return this.label_===t}toString(){return this.label_}}class Le extends qt{constructor(t,e,n){super(t),this.serializationType=qt.RANGE,this.start=e,this.stop=n,this.label=this.makeLabel()}makeLabel(){const t=new Vt;return t.addRange(this.start,this.stop),t}matches(t,e,n){return t>=this.start&&t<=this.stop}toString(){return"'"+String.fromCharCode(this.start)+"'..'"+String.fromCharCode(this.stop)+"'"}}class Re extends qt{constructor(t,e,n,r){super(t),this.serializationType=qt.ACTION,this.ruleIndex=e,this.actionIndex=void 0===n?-1:n,this.isCtxDependent=void 0!==r&&r,this.isEpsilon=!0}matches(t,e,n){return!1}toString(){return"action_"+this.ruleIndex+":"+this.actionIndex}}class Pe extends qt{constructor(t,e){super(t),this.serializationType=qt.EPSILON,this.isEpsilon=!0,this.outermostPrecedenceReturn=e}matches(t,e,n){return!1}toString(){return"epsilon"}}class Ie extends Mt{constructor(t,e,n){super(),this.ruleIndex=void 0===t?-1:t,this.predIndex=void 0===e?-1:e,this.isCtxDependent=void 0!==n&&n}evaluate(t,e){const n=this.isCtxDependent?e:null;return t.sempred(n,this.ruleIndex,this.predIndex)}updateHashCode(t){t.update(this.ruleIndex,this.predIndex,this.isCtxDependent)}equals(t){return this===t||t instanceof Ie&&this.ruleIndex===t.ruleIndex&&this.predIndex===t.predIndex&&this.isCtxDependent===t.isCtxDependent}toString(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}}Mt.NONE=new Ie;class Me extends Xt{constructor(t,e,n,r){super(t),this.serializationType=qt.PREDICATE,this.ruleIndex=e,this.predIndex=n,this.isCtxDependent=r,this.isEpsilon=!0}matches(t,e,n){return!1}getPredicate(){return new Ie(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return"pred_"+this.ruleIndex+":"+this.predIndex}}class De extends Mt{constructor(t){super(),this.precedence=void 0===t?0:t}evaluate(t,e){return t.precpred(e,this.precedence)}evalPrecedence(t,e){return t.precpred(e,this.precedence)?Mt.NONE:null}compareTo(t){return this.precedence-t.precedence}updateHashCode(t){t.update(this.precedence)}equals(t){return this===t||t instanceof De&&this.precedence===t.precedence}toString(){return"{"+this.precedence+">=prec}?"}}Mt.PrecedencePredicate=De;class je extends Xt{constructor(t,e){super(t),this.serializationType=qt.PRECEDENCE,this.precedence=e,this.isEpsilon=!0}matches(t,e,n){return!1}getPredicate(){return new De(this.precedence)}toString(){return this.precedence+" >= _p"}}class Be{constructor(t){void 0===t&&(t=null),this.readOnly=!1,this.verifyATN=null===t||t.verifyATN,this.generateRuleBypassTransitions=null!==t&&t.generateRuleBypassTransitions}}Be.defaultOptions=new Be,Be.defaultOptions.readOnly=!0;class Fe{constructor(t){this.actionType=t,this.isPositionDependent=!1}hashCode(){const t=new Nt;return this.updateHashCode(t),t.finish()}updateHashCode(t){t.update(this.actionType)}equals(t){return this===t}}class Ue extends Fe{constructor(){super(6)}execute(t){t.skip()}toString(){return"skip"}}Ue.INSTANCE=new Ue;class ze extends Fe{constructor(t){super(0),this.channel=t}execute(t){t._channel=this.channel}updateHashCode(t){t.update(this.actionType,this.channel)}equals(t){return this===t||t instanceof ze&&this.channel===t.channel}toString(){return"channel("+this.channel+")"}}class Ve extends Fe{constructor(t,e){super(1),this.ruleIndex=t,this.actionIndex=e,this.isPositionDependent=!0}execute(t){t.action(null,this.ruleIndex,this.actionIndex)}updateHashCode(t){t.update(this.actionType,this.ruleIndex,this.actionIndex)}equals(t){return this===t||t instanceof Ve&&this.ruleIndex===t.ruleIndex&&this.actionIndex===t.actionIndex}}class Ke extends Fe{constructor(){super(3)}execute(t){t.more()}toString(){return"more"}}Ke.INSTANCE=new Ke;class He extends Fe{constructor(t){super(7),this.type=t}execute(t){t.type=this.type}updateHashCode(t){t.update(this.actionType,this.type)}equals(t){return this===t||t instanceof He&&this.type===t.type}toString(){return"type("+this.type+")"}}class qe extends Fe{constructor(t){super(5),this.mode=t}execute(t){t.pushMode(this.mode)}updateHashCode(t){t.update(this.actionType,this.mode)}equals(t){return this===t||t instanceof qe&&this.mode===t.mode}toString(){return"pushMode("+this.mode+")"}}class We extends Fe{constructor(){super(4)}execute(t){t.popMode()}toString(){return"popMode"}}We.INSTANCE=new We;class Ge extends Fe{constructor(t){super(2),this.mode=t}execute(t){t.setMode(this.mode)}updateHashCode(t){t.update(this.actionType,this.mode)}equals(t){return this===t||t instanceof Ge&&this.mode===t.mode}toString(){return"mode("+this.mode+")"}}function Ye(t,e){const n=[];return n[t-1]=e,n.map((function(t){return e}))}class $e{constructor(t){null==t&&(t=Be.defaultOptions),this.deserializationOptions=t,this.stateFactories=null,this.actionFactories=null}deserialize(t){const e=this.reset(t);this.checkVersion(e),e&&this.skipUUID();const n=this.readATN();this.readStates(n,e),this.readRules(n,e),this.readModes(n);const r=[];return this.readSets(n,r,this.readInt.bind(this)),e&&this.readSets(n,r,this.readInt32.bind(this)),this.readEdges(n,r),this.readDecisions(n),this.readLexerActions(n,e),this.markPrecedenceDecisions(n),this.verifyATN(n),this.deserializationOptions.generateRuleBypassTransitions&&1===n.grammarType&&(this.generateRuleBypassTransitions(n),this.verifyATN(n)),n}reset(t){if(3===(t.charCodeAt?t.charCodeAt(0):t[0])){const e=function(t){const e=t.charCodeAt(0);return e>1?e-2:e+65534},n=t.split("").map(e);return n[0]=t.charCodeAt(0),this.data=n,this.pos=0,!0}return this.data=t,this.pos=0,!1}skipUUID(){let t=0;for(;t++<8;)this.readInt()}checkVersion(t){const e=this.readInt();if(!t&&4!==e)throw"Could not deserialize ATN with version "+e+" (expected 4)."}readATN(){const t=this.readInt(),e=this.readInt();return new ye(t,e)}readStates(t,e){let n,r,i;const o=[],s=[],a=this.readInt();for(let n=0;n0;)i.addTransition(c.transitions[u-1]),c.transitions=c.transitions.slice(-1);t.ruleToStartState[e].addTransition(new Pe(i)),o.addTransition(new Pe(a));const l=new ge;t.addState(l),l.addTransition(new Ce(o,t.ruleToTokenType[e])),i.addTransition(new Pe(l))}stateIsEndStateFor(t,e){if(t.ruleIndex!==e)return null;if(!(t instanceof Ee))return null;const n=t.transitions[t.transitions.length-1].target;return n instanceof we&&n.epsilonOnlyTransitions&&n.transitions[0].target instanceof Ht?t:null}markPrecedenceDecisions(t){for(let e=0;e=0):this.checkCondition(n.transitions.length<=1||n instanceof Ht)}}checkCondition(t,e){if(!t)throw null==e&&(e="IllegalState"),e}readInt(){return this.data[this.pos++]}readInt32(){return this.readInt()|this.readInt()<<16}edgeFactory(t,e,n,r,i,o,s,a){const c=t.states[r];switch(e){case qt.EPSILON:return new Pe(c);case qt.RANGE:return new Le(c,0!==s?St.EOF:i,o);case qt.RULE:return new Wt(t.states[i],o,s,c);case qt.PREDICATE:return new Me(c,i,o,0!==s);case qt.PRECEDENCE:return new je(c,i);case qt.ATOM:return new Ce(c,0!==s?St.EOF:i);case qt.ACTION:return new Re(c,i,o,0!==s);case qt.SET:return new Gt(c,a[i]);case qt.NOT_SET:return new Yt(c,a[i]);case qt.WILDCARD:return new $t(c);default:throw"The specified transition type: "+e+" is not valid."}}stateFactory(t,e){if(null===this.stateFactories){const t=[];t[Kt.INVALID_TYPE]=null,t[Kt.BASIC]=()=>new ge,t[Kt.RULE_START]=()=>new xe,t[Kt.BLOCK_START]=()=>new Ne,t[Kt.PLUS_BLOCK_START]=()=>new Ae,t[Kt.STAR_BLOCK_START]=()=>new Oe,t[Kt.TOKEN_START]=()=>new ke,t[Kt.RULE_STOP]=()=>new Ht,t[Kt.BLOCK_END]=()=>new _e,t[Kt.STAR_LOOP_BACK]=()=>new Se,t[Kt.STAR_LOOP_ENTRY]=()=>new Ee,t[Kt.PLUS_LOOP_BACK]=()=>new Te,t[Kt.LOOP_END]=()=>new we,this.stateFactories=t}if(t>this.stateFactories.length||null===this.stateFactories[t])throw"The specified state type "+t+" is not valid.";{const n=this.stateFactories[t]();if(null!==n)return n.ruleIndex=e,n}}lexerActionFactory(t,e,n){if(null===this.actionFactories){const t=[];t[0]=(t,e)=>new ze(t),t[1]=(t,e)=>new Ve(t,e),t[2]=(t,e)=>new Ge(t),t[3]=(t,e)=>Ke.INSTANCE,t[4]=(t,e)=>We.INSTANCE,t[5]=(t,e)=>new qe(t),t[6]=(t,e)=>Ue.INSTANCE,t[7]=(t,e)=>new He(t),this.actionFactories=t}if(t>this.actionFactories.length||null===this.actionFactories[t])throw"The specified lexer action type "+t+" is not valid.";return this.actionFactories[t](e,n)}}class Xe{syntaxError(t,e,n,r,i,o){}reportAmbiguity(t,e,n,r,i,o,s){}reportAttemptingFullContext(t,e,n,r,i,o){}reportContextSensitivity(t,e,n,r,i,o){}}class Ze extends Xe{constructor(){super()}syntaxError(t,e,n,r,i,o){console.error("line "+n+":"+r+" "+i)}}Ze.INSTANCE=new Ze;class Je extends Xe{constructor(t){if(super(),null===t)throw"delegates";return this.delegates=t,this}syntaxError(t,e,n,r,i,o){this.delegates.map((s=>s.syntaxError(t,e,n,r,i,o)))}reportAmbiguity(t,e,n,r,i,o,s){this.delegates.map((a=>a.reportAmbiguity(t,e,n,r,i,o,s)))}reportAttemptingFullContext(t,e,n,r,i,o){this.delegates.map((s=>s.reportAttemptingFullContext(t,e,n,r,i,o)))}reportContextSensitivity(t,e,n,r,i,o){this.delegates.map((s=>s.reportContextSensitivity(t,e,n,r,i,o)))}}class Qe{constructor(){this._listeners=[Ze.INSTANCE],this._interp=null,this._stateNumber=-1}checkVersion(t){const e="4.13.2";e!==t&&console.log("ANTLR runtime and generated code versions disagree: "+e+"!="+t)}addErrorListener(t){this._listeners.push(t)}removeErrorListeners(){this._listeners=[]}getLiteralNames(){return Object.getPrototypeOf(this).constructor.literalNames||[]}getSymbolicNames(){return Object.getPrototypeOf(this).constructor.symbolicNames||[]}getTokenNames(){if(!this.tokenNames){const t=this.getLiteralNames(),e=this.getSymbolicNames(),n=t.length>e.length?t.length:e.length;this.tokenNames=[];for(let r=0;r";let e=t.text;return null===e&&(e=t.type===St.EOF?"":"<"+t.type+">"),e=e.replace("\n","\\n").replace("\r","\\r").replace("\t","\\t"),"'"+e+"'"}getErrorListenerDispatch(){return console.warn("Calling deprecated method in Recognizer class: getErrorListenerDispatch()"),this.getErrorListener()}getErrorListener(){return new Je(this._listeners)}sempred(t,e,n){return!0}precpred(t,e){return!0}get atn(){return this._interp.atn}get state(){return this._stateNumber}set state(t){this._stateNumber=t}}Qe.tokenTypeMapCache={},Qe.ruleIndexMapCache={};class tn extends St{constructor(t,e,n,r,i){super(),this.source=void 0!==t?t:tn.EMPTY_SOURCE,this.type=void 0!==e?e:null,this.channel=void 0!==n?n:St.DEFAULT_CHANNEL,this.start=void 0!==r?r:-1,this.stop=void 0!==i?i:-1,this.tokenIndex=-1,null!==this.source[0]?(this.line=t[0].line,this.column=t[0].column):this.column=-1}clone(){const t=new tn(this.source,this.type,this.channel,this.start,this.stop);return t.tokenIndex=this.tokenIndex,t.line=this.line,t.column=this.column,t.text=this.text,t}cloneWithType(t){const e=new tn(this.source,t,this.channel,this.start,this.stop);return e.tokenIndex=this.tokenIndex,e.line=this.line,e.column=this.column,t===St.EOF&&(e.text=""),e}toString(){let t=this.text;return t=null!==t?t.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"):"","[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+t+"',<"+this.type+">"+(this.channel>0?",channel="+this.channel:"")+","+this.line+":"+this.column+"]"}get text(){if(null!==this._text)return this._text;const t=this.getInputStream();if(null===t)return null;const e=t.size;return this.start"}set text(t){this._text=t}}tn.EMPTY_SOURCE=[null,null];class en{}class nn extends en{constructor(t){super(),this.copyText=void 0!==t&&t}create(t,e,n,r,i,o,s,a){const c=new tn(t,e,r,i,o);return c.line=s,c.column=a,null!==n?c.text=n:this.copyText&&null!==t[1]&&(c.text=t[1].getText(i,o)),c}createThin(t,e){const n=new tn(null,t);return n.text=e,n}}nn.DEFAULT=new nn;class rn extends Error{constructor(t){super(t.message),Error.captureStackTrace&&Error.captureStackTrace(this,rn),this.message=t.message,this.recognizer=t.recognizer,this.input=t.input,this.ctx=t.ctx,this.offendingToken=null,this.offendingState=-1,null!==this.recognizer&&(this.offendingState=this.recognizer.state)}getExpectedTokens(){return null!==this.recognizer?this.recognizer.atn.getExpectedTokens(this.offendingState,this.ctx):null}toString(){return this.message}}class on extends rn{constructor(t,e,n,r){super({message:"",recognizer:t,input:e,ctx:null}),this.startIndex=n,this.deadEndConfigs=r}toString(){let t="";return this.startIndex>=0&&this.startIndex":"\n"===t?"\\n":"\t"===t?"\\t":"\r"===t?"\\r":t}getCharErrorDisplay(t){return"'"+this.getErrorDisplayForChar(t)+"'"}recover(t){this._input.LA(1)!==St.EOF&&(t instanceof on?this._interp.consume(this._input):this._input.consume())}get inputStream(){return this._input}set inputStream(t){this._input=null,this._tokenFactorySourcePair=[this,this._input],this.reset(),this._input=t,this._tokenFactorySourcePair=[this,this._input]}get sourceName(){return this._input.sourceName}get type(){return this._type}set type(t){this._type=t}get line(){return this._interp.line}set line(t){this._interp.line=t}get column(){return this._interp.column}set column(t){this._interp.column=t}get text(){return null!==this._text?this._text:this._interp.getText(this._input)}set text(t){this._text=t}}function an(t){return t.hashCodeForConfigSet()}function cn(t,e){return t===e||null!==t&&null!==e&&t.equalsForConfigSet(e)}sn.DEFAULT_MODE=0,sn.MORE=-2,sn.SKIP=-3,sn.DEFAULT_TOKEN_CHANNEL=St.DEFAULT_CHANNEL,sn.HIDDEN=St.HIDDEN_CHANNEL,sn.MIN_CHAR_VALUE=0,sn.MAX_CHAR_VALUE=1114111;class un{constructor(t){this.configLookup=new It(an,cn),this.fullCtx=void 0===t||t,this.readOnly=!1,this.configs=[],this.uniqueAlt=0,this.conflictingAlts=null,this.hasSemanticContext=!1,this.dipsIntoOuterContext=!1,this.cachedHashCode=-1}add(t,e){if(void 0===e&&(e=null),this.readOnly)throw"This set is readonly";t.semanticContext!==Mt.NONE&&(this.hasSemanticContext=!0),t.reachesIntoOuterContext>0&&(this.dipsIntoOuterContext=!0);const n=this.configLookup.getOrAdd(t);if(n===t)return this.cachedHashCode=-1,this.configs.push(t),!0;const r=!this.fullCtx,i=pe(n.context,t.context,r,e);return n.reachesIntoOuterContext=Math.max(n.reachesIntoOuterContext,t.reachesIntoOuterContext),t.precedenceFilterSuppressed&&(n.precedenceFilterSuppressed=!0),n.context=i,!0}getStates(){const t=new It;for(let e=0;evn.MAX_DFA_EDGE)return null;let n=t.edges[e-vn.MIN_DFA_EDGE];return void 0===n&&(n=null),vn.debug&&null!==n&&console.log("reuse state "+t.stateNumber+" edge to "+n.stateNumber),n}computeTargetState(t,e,n){const r=new fn;return this.getReachableConfigSet(t,e.configs,r,n),0===r.items.length?(r.hasSemanticContext||this.addDFAEdge(e,n,hn.ERROR),hn.ERROR):this.addDFAEdge(e,n,null,r)}failOrAccept(t,e,n,r){if(null!==this.prevAccept.dfaState){const n=t.dfaState.lexerActionExecutor;return this.accept(e,n,this.startIndex,t.index,t.line,t.column),t.dfaState.prediction}if(r===St.EOF&&e.index===this.startIndex)return St.EOF;throw new on(this.recog,e,this.startIndex,n)}getReachableConfigSet(t,e,n,r){let i=ye.INVALID_ALT_NUMBER;for(let o=0;ovn.MAX_DFA_EDGE||(vn.debug&&console.log("EDGE "+t+" -> "+n+" upon "+e),null===t.edges&&(t.edges=[]),t.edges[e-vn.MIN_DFA_EDGE]=n),n}addDFAState(t){const e=new ln(null,t);let n=null;for(let e=0;et.startsWith("k-"))).map((t=>this.data[t]),this)}}const wn={SLL:0,LL:1,LL_EXACT_AMBIG_DETECTION:2,hasSLLConflictTerminatingPrediction:function(t,e){if(wn.allConfigsInRuleStopStates(e))return!0;if(t===wn.SLL&&e.hasSemanticContext){const t=new un;for(let n=0;n1)return!0;return!1},allSubsetsEqual:function(t){let e=null;for(let n=0;n "+o),0===o.items.length?null:o}removeAllConfigsNotInRuleStopState(t,e){if(xn.allConfigsInRuleStopStates(t))return t;const n=new un(t.fullCtx);for(let r=0;r0&&(o=this.getAltThatFinishedDecisionEntryRule(i),o!==ye.INVALID_ALT_NUMBER)?o:ye.INVALID_ALT_NUMBER}getAltThatFinishedDecisionEntryRule(t){const e=[];for(let n=0;n0||r.state instanceof Ht&&r.context.hasEmptyPath())&&e.indexOf(r.alt)<0&&e.push(r.alt)}return 0===e.length?ye.INVALID_ALT_NUMBER:Math.min.apply(null,e)}splitAccordingToSemanticValidity(t,e){const n=new un(t.fullCtx),r=new un(t.fullCtx);for(let i=0;i=0&&(r+=1)}this.closureCheckingStopState(h,e,n,l,i,r,s)}}}canDropLoopEntryEdgeInLeftRecursiveRule(t){const e=t.state;if(e.stateType!==Kt.STAR_LOOP_ENTRY)return!1;if(e.stateType!==Kt.STAR_LOOP_ENTRY||!e.isPrecedenceDecision||t.context.isEmpty()||t.context.hasEmptyPath())return!1;const n=t.context.length;for(let r=0;r=0?this.parser.ruleNames[t]:""}getEpsilonTarget(t,e,n,r,i,o){switch(e.serializationType){case qt.RULE:return this.ruleTransition(t,e);case qt.PRECEDENCE:return this.precedenceTransition(t,e,n,r,i);case qt.PREDICATE:return this.predTransition(t,e,n,r,i);case qt.ACTION:return this.actionTransition(t,e);case qt.EPSILON:return new Ut({state:e.target},t);case qt.ATOM:case qt.RANGE:case qt.SET:return o&&e.matches(St.EOF,0,1)?new Ut({state:e.target},t):null;default:return null}}actionTransition(t,e){if(this.debug){const t=-1===e.actionIndex?65535:e.actionIndex;console.log("ACTION edge "+e.ruleIndex+":"+t)}return new Ut({state:e.target},t)}precedenceTransition(t,e,n,r,i){this.debug&&(console.log("PRED (collectPredicates="+n+") "+e.precedence+">=_p, ctx dependent=true"),null!==this.parser&&console.log("context surrounding pred is "+Pt(this.parser.getRuleInvocationStack())));let o=null;if(n&&r)if(i){const n=this._input.index;this._input.seek(this._startIndex);const r=e.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(n),r&&(o=new Ut({state:e.target},t))}else{const n=Mt.andContext(t.semanticContext,e.getPredicate());o=new Ut({state:e.target,semanticContext:n},t)}else o=new Ut({state:e.target},t);return this.debug&&console.log("config from pred transition="+o),o}predTransition(t,e,n,r,i){this.debug&&(console.log("PRED (collectPredicates="+n+") "+e.ruleIndex+":"+e.predIndex+", ctx dependent="+e.isCtxDependent),null!==this.parser&&console.log("context surrounding pred is "+Pt(this.parser.getRuleInvocationStack())));let o=null;if(n&&(e.isCtxDependent&&r||!e.isCtxDependent))if(i){const n=this._input.index;this._input.seek(this._startIndex);const r=e.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(n),r&&(o=new Ut({state:e.target},t))}else{const n=Mt.andContext(t.semanticContext,e.getPredicate());o=new Ut({state:e.target,semanticContext:n},t)}else o=new Ut({state:e.target},t);return this.debug&&console.log("config from pred transition="+o),o}ruleTransition(t,e){this.debug&&console.log("CALL rule "+this.getRuleName(e.target.ruleIndex)+", ctx="+t.context);const n=e.followState,r=ce.create(t.context,n.stateNumber);return new Ut({state:e.target,context:r},t)}getConflictingAlts(t){const e=xn.getConflictingAltSubsets(t);return xn.getAlts(e)}getConflictingAltsOrUniqueAlt(t){let e=null;return t.uniqueAlt!==ye.INVALID_ALT_NUMBER?(e=new de,e.set(t.uniqueAlt)):e=t.conflictingAlts,e}getTokenName(t){if(t===St.EOF)return"EOF";if(null!==this.parser&&null!==this.parser.literalNames){if(!(t>=this.parser.literalNames.length&&t>=this.parser.symbolicNames.length))return(this.parser.literalNames[t]||this.parser.symbolicNames[t])+"<"+t+">";console.log(t+" ttype out of range: "+this.parser.literalNames),console.log(""+this.parser.getInputStream().getTokens())}return""+t}getLookaheadName(t){return this.getTokenName(t.LA(1))}dumpDeadEndConfigs(t){console.log("dead end configs: ");const e=t.getDeadEndConfigs();for(let t=0;t0){const t=n.state.transitions[0];t instanceof Ce?r="Atom "+this.getTokenName(t.label):t instanceof Gt&&(r=(t instanceof Yt?"~":"")+"Set "+t.set)}console.error(n.toString(this.parser,!0)+":"+r)}}noViableAlt(t,e,n,r){return new kn(this.parser,t,t.get(r),t.LT(1),n,e)}getUniqueAlt(t){let e=ye.INVALID_ALT_NUMBER;for(let n=0;n "+r+" upon "+this.getTokenName(n)),null===r)return null;if(r=this.addDFAState(t,r),null===e||n<-1||n>this.atn.maxTokenType)return r;if(null===e.edges&&(e.edges=[]),e.edges[n+1]=r,this.debug){const e=null===this.parser?null:this.parser.literalNames,n=null===this.parser?null:this.parser.symbolicNames;console.log("DFA=\n"+t.toString(e,n))}return r}addDFAState(t,e){if(e===hn.ERROR)return e;const n=t.states.get(e);return null!==n?(this.trace_atn_sim&&console.log("addDFAState "+e+" exists"),n):(e.stateNumber=t.states.length,e.configs.readOnly||(e.configs.optimizeConfigs(this),e.configs.setReadonly(!0)),this.trace_atn_sim&&console.log("addDFAState new "+e),t.states.add(e),this.debug&&console.log("adding new DFA state: "+e),e)}reportAttemptingFullContext(t,e,n,r,i){if(this.debug||this.retry_debug){const e=new zt(r,i+1);console.log("reportAttemptingFullContext decision="+t.decision+":"+n+", input="+this.parser.getTokenStream().getText(e))}null!==this.parser&&this.parser.getErrorListener().reportAttemptingFullContext(this.parser,t,r,i,e,n)}reportContextSensitivity(t,e,n,r,i){if(this.debug||this.retry_debug){const e=new zt(r,i+1);console.log("reportContextSensitivity decision="+t.decision+":"+n+", input="+this.parser.getTokenStream().getText(e))}null!==this.parser&&this.parser.getErrorListener().reportContextSensitivity(this.parser,t,r,i,e,n)}reportAmbiguity(t,e,n,r,i,o,s){if(this.debug||this.retry_debug){const t=new zt(n,r+1);console.log("reportAmbiguity "+o+":"+s+", input="+this.parser.getTokenStream().getText(t))}null!==this.parser&&this.parser.getErrorListener().reportAmbiguity(this.parser,t,n,r,i,o,s)}}class En{constructor(){this.cache=new le}add(t){if(t===se.EMPTY)return se.EMPTY;const e=this.cache.get(t)||null;return null!==e?e:(this.cache.set(t,t),t)}get(t){return this.cache.get(t)||null}get length(){return this.cache.length}}const An={ATN:ye,ATNDeserializer:$e,LexerATNSimulator:vn,ParserATNSimulator:Sn,PredictionMode:xn,PredictionContextCache:En};class On{constructor(t,e,n){this.dfa=t,this.literalNames=e||[],this.symbolicNames=n||[]}toString(){if(null===this.dfa.s0)return null;let t="";const e=this.dfa.sortedStates();for(let n=0;n"),t=t.concat(this.getStateString(e)),t=t.concat("\n"))}}}return 0===t.length?null:t}getEdgeLabel(t){return 0===t?"EOF":null!==this.literalNames||null!==this.symbolicNames?this.literalNames[t-1]||this.symbolicNames[t-1]:String.fromCharCode(t-1)}getStateString(t){const e=(t.isAcceptState?":":"")+"s"+t.stateNumber+(t.requiresFullContext?"^":"");return t.isAcceptState?null!==t.predicates?e+"=>"+Pt(t.predicates):e+"=>"+t.prediction.toString():e}}class Nn extends On{constructor(t){super(t,null)}getEdgeLabel(t){return"'"+String.fromCharCode(t)+"'"}}class Cn{constructor(t,e){if(void 0===e&&(e=0),this.atnStartState=t,this.decision=e,this._states=new It,this.s0=null,this.precedenceDfa=!1,t instanceof Ee&&t.isPrecedenceDecision){this.precedenceDfa=!0;const t=new ln(null,new un);t.edges=[],t.isAcceptState=!1,t.requiresFullContext=!1,this.s0=t}}getPrecedenceStartState(t){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";return t<0||t>=this.s0.edges.length?null:this.s0.edges[t]||null}setPrecedenceStartState(t,e){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";t<0||(this.s0.edges[t]=e)}setPrecedenceDfa(t){if(this.precedenceDfa!==t){if(this._states=new It,t){const t=new ln(null,new un);t.edges=[],t.isAcceptState=!1,t.requiresFullContext=!1,this.s0=t}else this.s0=null;this.precedenceDfa=t}}sortedStates(){return this._states.values().sort((function(t,e){return t.stateNumber-e.stateNumber}))}toString(t,e){return t=t||null,e=e||null,null===this.s0?"":new On(this,t,e).toString()}toLexerString(){return null===this.s0?"":new Nn(this).toString()}get states(){return this._states}}const Ln={DFA:Cn,DFASerializer:On,LexerDFASerializer:Nn,PredPrediction:bn},Rn={PredictionContext:se},Pn={Interval:zt,IntervalSet:Vt};class In{visitTerminal(t){}visitErrorNode(t){}enterEveryRule(t){}exitEveryRule(t){}}class Mn{visit(t){return Array.isArray(t)?t.map((function(t){return t.accept(this)}),this):t.accept(this)}visitChildren(t){return t.children?this.visit(t.children):null}visitTerminal(t){}visitErrorNode(t){}}class Dn{walk(t,e){if(e instanceof ne||void 0!==e.isErrorNode&&e.isErrorNode())t.visitErrorNode(e);else if(e instanceof ee)t.visitTerminal(e);else{this.enterRule(t,e);for(let n=0;n=i.length)return""+n;const o=i[r]||null;return null===o||0===o.length?""+n:`${n} (${o})`}getConflictingAlts(t,e){if(null!==t)return t;const n=new de;for(let t=0;t=0&&t.consume(),this.lastErrorIndex=t._input.index,null===this.lastErrorStates&&(this.lastErrorStates=[]),this.lastErrorStates.push(t.state);const n=this.getErrorRecoverySet(t);this.consumeUntil(t,n)}sync(t){if(this.inErrorRecoveryMode(t))return;const e=t._interp.atn.states[t.state],n=t.getTokenStream().LA(1),r=t.atn.nextTokens(e);if(r.contains(n))return this.nextTokensContext=null,void(this.nextTokenState=Kt.INVALID_STATE_NUMBER);if(r.contains(St.EPSILON))null===this.nextTokensContext&&(this.nextTokensContext=t._ctx,this.nextTokensState=t._stateNumber);else switch(e.stateType){case Kt.BLOCK_START:case Kt.STAR_BLOCK_START:case Kt.PLUS_BLOCK_START:case Kt.STAR_LOOP_ENTRY:if(null!==this.singleTokenDeletion(t))return;throw new Bn(t);case Kt.PLUS_LOOP_BACK:case Kt.STAR_LOOP_BACK:{this.reportUnwantedToken(t);const e=new Vt;e.addSet(t.getExpectedTokens());const n=e.addSet(this.getErrorRecoverySet(t));this.consumeUntil(t,n)}}}reportNoViableAlternative(t,e){const n=t.getTokenStream();let r;r=null!==n?e.startToken.type===St.EOF?"":n.getText(new zt(e.startToken.tokenIndex,e.offendingToken.tokenIndex)):"";const i="no viable alternative at input "+this.escapeWSAndQuote(r);t.notifyErrorListeners(i,e.offendingToken,e)}reportInputMismatch(t,e){const n="mismatched input "+this.getTokenErrorDisplay(e.offendingToken)+" expecting "+e.getExpectedTokens().toString(t.literalNames,t.symbolicNames);t.notifyErrorListeners(n,e.offendingToken,e)}reportFailedPredicate(t,e){const n="rule "+t.ruleNames[t._ctx.ruleIndex]+" "+e.message;t.notifyErrorListeners(n,e.offendingToken,e)}reportUnwantedToken(t){if(this.inErrorRecoveryMode(t))return;this.beginErrorCondition(t);const e=t.getCurrentToken(),n="extraneous input "+this.getTokenErrorDisplay(e)+" expecting "+this.getExpectedTokens(t).toString(t.literalNames,t.symbolicNames);t.notifyErrorListeners(n,e,null)}reportMissingToken(t){if(this.inErrorRecoveryMode(t))return;this.beginErrorCondition(t);const e=t.getCurrentToken(),n="missing "+this.getExpectedTokens(t).toString(t.literalNames,t.symbolicNames)+" at "+this.getTokenErrorDisplay(e);t.notifyErrorListeners(n,e,null)}recoverInline(t){const e=this.singleTokenDeletion(t);if(null!==e)return t.consume(),e;if(this.singleTokenInsertion(t))return this.getMissingSymbol(t);throw new Bn(t)}singleTokenInsertion(t){const e=t.getTokenStream().LA(1),n=t._interp.atn,r=n.states[t.state].transitions[0].target;return!!n.nextTokens(r,t._ctx).contains(e)&&(this.reportMissingToken(t),!0)}singleTokenDeletion(t){const e=t.getTokenStream().LA(2);if(this.getExpectedTokens(t).contains(e)){this.reportUnwantedToken(t),t.consume();const e=t.getCurrentToken();return this.reportMatch(t),e}return null}getMissingSymbol(t){const e=t.getCurrentToken(),n=this.getExpectedTokens(t).first();let r;r=n===St.EOF?"":"";let i=e;const o=t.getTokenStream().LT(-1);return i.type===St.EOF&&null!==o&&(i=o),t.getTokenFactory().create(i.source,n,r,St.DEFAULT_CHANNEL,-1,-1,i.line,i.column)}getExpectedTokens(t){return t.getExpectedTokens()}getTokenErrorDisplay(t){if(null===t)return"";let e=t.text;return null===e&&(e=t.type===St.EOF?"":"<"+t.type+">"),this.escapeWSAndQuote(e)}escapeWSAndQuote(t){return"'"+(t=(t=(t=t.replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t"))+"'"}getErrorRecoverySet(t){const e=t._interp.atn;let n=t._ctx;const r=new Vt;for(;null!==n&&n.invokingState>=0;){const t=e.states[n.invokingState].transitions[0],i=e.nextTokens(t.followState);r.addSet(i),n=n.parentCtx}return r.removeOne(St.EPSILON),r}consumeUntil(t,e){let n=t.getTokenStream().LA(1);for(;n!==St.EOF&&!e.contains(n);)t.consume(),n=t.getTokenStream().LA(1)}}class qn extends Hn{constructor(){super()}recover(t,e){let n=t._ctx;for(;null!==n;)n.exception=e,n=n.parentCtx;throw new Vn(e)}recoverInline(t){this.recover(t,new Bn(t))}sync(t){}}const Wn={RecognitionException:rn,NoViableAltException:kn,LexerNoViableAltException:on,InputMismatchException:Bn,FailedPredicateException:Fn,DiagnosticErrorListener:zn,BailErrorStrategy:qn,DefaultErrorStrategy:Hn,ErrorListener:Xe};class Gn{constructor(t,e){if(this.name="",this.strdata=t,this.decodeToUnicodeCodePoints=e||!1,this._index=0,this.data=[],this.decodeToUnicodeCodePoints)for(let t=0;t=this._size)throw"cannot consume EOF";this._index+=1}LA(t){if(0===t)return 0;t<0&&(t+=1);const e=this._index+t-1;return e<0||e>=this._size?St.EOF:this.data[e]}LT(t){return this.LA(t)}mark(){return-1}release(t){}seek(t){t<=this._index?this._index=t:this._index=Math.min(t,this._size)}getText(t,e){if(e>=this._size&&(e=this._size-1),t>=this._size)return"";if(this.decodeToUnicodeCodePoints){let n="";for(let r=t;r<=e;r++)n+=String.fromCodePoint(this.data[r]);return n}return this.strdata.slice(t,e+1)}toString(){return this.strdata}get index(){return this._index}get size(){return this._size}}class Yn extends Gn{constructor(t,e){super(t,e)}}var $n=kt(763);const Xn="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;class Zn extends Yn{static fromPath(t,e,n){if(!Xn)throw new Error("FileStream is only available when running in Node!");$n.readFile(t,e,(function(t,e){let r=null;null!==e&&(r=new Gn(e,!0)),n(t,r)}))}constructor(t,e,n){if(!Xn)throw new Error("FileStream is only available when running in Node!");super($n.readFileSync(t,e||"utf-8"),n),this.fileName=t}}const Jn={fromString:function(t){return new Gn(t,!0)},fromBlob:function(t,e,n,r){const i=new window.FileReader;i.onload=function(t){const e=new Gn(t.target.result,!0);n(e)},i.onerror=r,i.readAsText(t,e)},fromBuffer:function(t,e){return new Gn(t.toString(e),!0)},fromPath:function(t,e,n){Zn.fromPath(t,e,n)},fromPathSync:function(t,e){return new Zn(t,e)}},Qn={arrayToString:Pt,stringToCharArray:function(t){let e=new Uint16Array(t.length);for(let n=0;n=0&&(this.fetchedEOF?this.index0)||this.fetch(e)>=e}fetch(t){if(this.fetchedEOF)return 0;for(let e=0;e=this.tokens.length&&(e=this.tokens.length-1);for(let i=t;i=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[e]}adjustSeekIndex(t){return t}lazyInit(){-1===this.index&&this.setup()}setup(){this.sync(0),this.index=this.adjustSeekIndex(0)}setTokenSource(t){this.tokenSource=t,this.tokens=[],this.index=-1,this.fetchedEOF=!1}nextTokenOnChannel(t,e){if(this.sync(t),t>=this.tokens.length)return-1;let n=this.tokens[t];for(;n.channel!==e;){if(n.type===St.EOF)return-1;t+=1,this.sync(t),n=this.tokens[t]}return t}previousTokenOnChannel(t,e){for(;t>=0&&this.tokens[t].channel!==e;)t-=1;return t}getHiddenTokensToRight(t,e){if(void 0===e&&(e=-1),this.lazyInit(),t<0||t>=this.tokens.length)throw t+" not in 0.."+this.tokens.length-1;const n=this.nextTokenOnChannel(t+1,sn.DEFAULT_TOKEN_CHANNEL),r=t+1,i=-1===n?this.tokens.length-1:n;return this.filterForChannel(r,i,e)}getHiddenTokensToLeft(t,e){if(void 0===e&&(e=-1),this.lazyInit(),t<0||t>=this.tokens.length)throw t+" not in 0.."+this.tokens.length-1;const n=this.previousTokenOnChannel(t-1,sn.DEFAULT_TOKEN_CHANNEL);if(n===t-1)return null;const r=n+1,i=t-1;return this.filterForChannel(r,i,e)}filterForChannel(t,e,n){const r=[];for(let i=t;i=this.tokens.length&&(n=this.tokens.length-1);let r="";for(let t=e;t=0&&this._parseListeners.splice(e,1),0===this._parseListeners.length&&(this._parseListeners=null)}}removeParseListeners(){this._parseListeners=null}triggerEnterRuleEvent(){if(null!==this._parseListeners){const t=this._ctx;this._parseListeners.forEach((function(e){e.enterEveryRule(t),t.enterRule(e)}))}}triggerExitRuleEvent(){if(null!==this._parseListeners){const t=this._ctx;this._parseListeners.slice(0).reverse().forEach((function(e){t.exitRule(e),e.exitEveryRule(t)}))}}getTokenFactory(){return this._input.tokenSource._factory}setTokenFactory(t){this._input.tokenSource._factory=t}getATNWithBypassAlts(){const t=this.getSerializedATN();if(null===t)throw"The current parser does not support an ATN with bypass alternatives.";let e=this.bypassAltsAtnCache[t];if(null===e){const n=new Be;n.generateRuleBypassTransitions=!0,e=new $e(n).deserialize(t),this.bypassAltsAtnCache[t]=e}return e}getInputStream(){return this.getTokenStream()}setInputStream(t){this.setTokenStream(t)}getTokenStream(){return this._input}setTokenStream(t){this._input=null,this.reset(),this._input=t}get syntaxErrorsCount(){return this._syntaxErrors}getCurrentToken(){return this._input.LT(1)}notifyErrorListeners(t,e,n){n=n||null,null===(e=e||null)&&(e=this.getCurrentToken()),this._syntaxErrors+=1;const r=e.line,i=e.column;this.getErrorListener().syntaxError(this,e,r,i,t,n)}consume(){const t=this.getCurrentToken();t.type!==St.EOF&&this.getInputStream().consume();const e=null!==this._parseListeners&&this._parseListeners.length>0;if(this.buildParseTrees||e){let n;n=this._errHandler.inErrorRecoveryMode(this)?this._ctx.addErrorNode(t):this._ctx.addTokenNode(t),n.invokingState=this.state,e&&this._parseListeners.forEach((function(t){n instanceof ne||void 0!==n.isErrorNode&&n.isErrorNode()?t.visitErrorNode(n):n instanceof ee&&t.visitTerminal(n)}))}return t}addContextToParseTree(){null!==this._ctx.parentCtx&&this._ctx.parentCtx.addChild(this._ctx)}enterRule(t,e,n){this.state=e,this._ctx=t,this._ctx.start=this._input.LT(1),this.buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}exitRule(){this._ctx.stop=this._input.LT(-1),this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx.parentCtx}enterOuterAlt(t,e){t.setAltNumber(e),this.buildParseTrees&&this._ctx!==t&&null!==this._ctx.parentCtx&&(this._ctx.parentCtx.removeLastChild(),this._ctx.parentCtx.addChild(t)),this._ctx=t}getPrecedence(){return 0===this._precedenceStack.length?-1:this._precedenceStack[this._precedenceStack.length-1]}enterRecursionRule(t,e,n,r){this.state=e,this._precedenceStack.push(r),this._ctx=t,this._ctx.start=this._input.LT(1),this.triggerEnterRuleEvent()}pushNewRecursionContext(t,e,n){const r=this._ctx;r.parentCtx=t,r.invokingState=e,r.stop=this._input.LT(-1),this._ctx=t,this._ctx.start=r.start,this.buildParseTrees&&this._ctx.addChild(r),this.triggerEnterRuleEvent()}unrollRecursionContexts(t){this._precedenceStack.pop(),this._ctx.stop=this._input.LT(-1);const e=this._ctx,n=this.getParseListeners();if(null!==n&&n.length>0)for(;this._ctx!==t;)this.triggerExitRuleEvent(),this._ctx=this._ctx.parentCtx;else this._ctx=t;e.parentCtx=t,this.buildParseTrees&&null!==t&&t.addChild(e)}getInvokingContext(t){let e=this._ctx;for(;null!==e;){if(e.ruleIndex===t)return e;e=e.parentCtx}return null}precpred(t,e){return e>=this._precedenceStack[this._precedenceStack.length-1]}inContext(t){return!1}isExpectedToken(t){const e=this._interp.atn;let n=this._ctx;const r=e.states[this.state];let i=e.nextTokens(r);if(i.contains(t))return!0;if(!i.contains(St.EPSILON))return!1;for(;null!==n&&n.invokingState>=0&&i.contains(St.EPSILON);){const r=e.states[n.invokingState].transitions[0];if(i=e.nextTokens(r.followState),i.contains(t))return!0;n=n.parentCtx}return!(!i.contains(St.EPSILON)||t!==St.EOF)}getExpectedTokens(){return this._interp.atn.getExpectedTokens(this.state,this._ctx)}getExpectedTokensWithinCurrentRule(){const t=this._interp.atn,e=t.states[this.state];return t.nextTokens(e)}getRuleIndex(t){const e=this.getRuleIndexMap()[t];return null!==e?e:-1}getRuleInvocationStack(t){null===(t=t||null)&&(t=this._ctx);const e=[];for(;null!==t;){const n=t.ruleIndex;n<0?e.push("n/a"):e.push(this.ruleNames[n]),t=t.parentCtx}return e}getDFAStrings(){return this._interp.decisionToDFA.toString()}dumpDFA(){let t=!1;for(let e=0;e0&&(t&&console.log(),this.printer.println("Decision "+n.decision+":"),this.printer.print(n.toString(this.literalNames,this.symbolicNames)),t=!0)}}getSourceName(){return this._input.getSourceName()}setTrace(t){t?(null!==this._tracer&&this.removeParseListener(this._tracer),this._tracer=new rr(this),this.addParseListener(this._tracer)):(this.removeParseListener(this._tracer),this._tracer=null)}}ir.bypassAltsAtnCache={};class or extends ee{constructor(t){super(),this.parentCtx=null,this.symbol=t}getChild(t){return null}getSymbol(){return this.symbol}getParent(){return this.parentCtx}getPayload(){return this.symbol}getSourceInterval(){if(null===this.symbol)return zt.INVALID_INTERVAL;const t=this.symbol.tokenIndex;return new zt(t,t)}getChildCount(){return 0}accept(t){return t.visitTerminal(this)}getText(){return this.symbol.text}toString(){return this.symbol.type===St.EOF?"":this.symbol.text}}class sr extends or{constructor(t){super(t)}isErrorNode(){return!0}accept(t){return t.visitErrorNode(this)}}class ar extends oe{constructor(t,e){super(t,e),this.children=null,this.start=null,this.stop=null,this.exception=null}copyFrom(t){this.parentCtx=t.parentCtx,this.invokingState=t.invokingState,this.children=null,this.start=t.start,this.stop=t.stop,t.children&&(this.children=[],t.children.map((function(t){t instanceof sr&&(this.children.push(t),t.parentCtx=this)}),this))}enterRule(t){}exitRule(t){}addChild(t){return null===this.children&&(this.children=[]),this.children.push(t),t}removeLastChild(){null!==this.children&&this.children.pop()}addTokenNode(t){const e=new or(t);return this.addChild(e),e.parentCtx=this,e}addErrorNode(t){const e=new sr(t);return this.addChild(e),e.parentCtx=this,e}getChild(t,e){if(e=e||null,null===this.children||t<0||t>=this.children.length)return null;if(null===e)return this.children[t];for(let n=0;n=this.children.length)return null;for(let n=0;n2&&void 0!==arguments[2]?arguments[2]:cr.DEFAULT_PROGRAM_NAME;n="number"==typeof t?t:t.tokenIndex;let i=this.getProgram(r),o=new hr(this.tokens,n,i.length,e);i.push(o)}insertBefore(t,e){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:cr.DEFAULT_PROGRAM_NAME;n="number"==typeof t?t:t.tokenIndex;const i=this.getProgram(r),o=new lr(this.tokens,n,i.length,e);i.push(o)}replaceSingle(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:cr.DEFAULT_PROGRAM_NAME;this.replace(t,t,e,n)}replace(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:cr.DEFAULT_PROGRAM_NAME;if("number"!=typeof t&&(t=t.tokenIndex),"number"!=typeof e&&(e=e.tokenIndex),t>e||t<0||e<0||e>=this.tokens.size)throw new RangeError(`replace: range invalid: ${t}..${e}(size=${this.tokens.size})`);let i=this.getProgram(r),o=new fr(this.tokens,t,e,i.length,n);i.push(o)}delete(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:cr.DEFAULT_PROGRAM_NAME;void 0===e&&(e=t),this.replace(t,e,null,n)}getProgram(t){let e=this.programs.get(t);return null==e&&(e=this.initializeProgram(t)),e}initializeProgram(t){const e=[];return this.programs.set(t,e),e}getText(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cr.DEFAULT_PROGRAM_NAME;e=t instanceof zt?t:new zt(0,this.tokens.size-1),"string"==typeof t&&(n=t);const r=this.programs.get(n);let i=e.start,o=e.stop;if(o>this.tokens.size-1&&(o=this.tokens.size-1),i<0&&(i=0),null==r||0===r.length)return this.tokens.getText(new zt(i,o));let s=[],a=this.reduceToSingleOperationPerIndex(r),c=i;for(;c<=o&&c=this.tokens.size-1&&s.push(t.text.toString());return s.join("")}reduceToSingleOperationPerIndex(t){for(let e=0;er.index&&e.index<=r.lastIndex&&(t[e.instructionIndex]=void 0);let o=this.getKindOfOps(t,fr,e);for(let e of o){if(e.index>=r.index&&e.lastIndex<=r.lastIndex){t[e.instructionIndex]=void 0;continue}let n=e.lastIndexr.lastIndex;if(null!=e.text||null!=r.text||n){if(!n)throw new Error(`replace op boundaries of ${r} overlap with previous ${e}`)}else t[e.instructionIndex]=void 0,r.index=Math.min(e.index,r.index),r.lastIndex=Math.max(e.lastIndex,r.lastIndex)}}for(let e=0;e=n.index&&r.index<=n.lastIndex)throw new Error(`insert op ${r} within boundaries of previous ${n}`)}else n.text=this.catOpText(r.text,n.text),t[e]=void 0}let e=new Map;for(let n of t)if(null!=n){if(null!=e.get(n.index))throw new Error("should only be one op per index");e.set(n.index,n)}return e}catOpText(t,e){let n="",r="";return null!=t&&(n=t.toString()),null!=e&&(r=e.toString()),n+r}getKindOfOps(t,e,n){return t.slice(0,n).filter((t=>t&&t instanceof e))}}class ur{constructor(t,e,n,r){this.tokens=t,this.instructionIndex=n,this.index=e,this.text=void 0===r?"":r}toString(){let t=this.constructor.name;const e=t.indexOf("$");return t=t.substring(e+1,t.length),"<"+t+"@"+this.tokens.get(this.index)+':"'+this.text+'">'}}class lr extends ur{constructor(t,e,n,r){super(t,e,n,r)}execute(t){return this.text&&t.push(this.text.toString()),this.tokens.get(this.index).type!==St.EOF&&t.push(String(this.tokens.get(this.index).text)),this.index+1}}class hr extends lr{constructor(t,e,n,r){super(t,e+1,n,r)}}class fr extends ur{constructor(t,e,n,r,i){super(t,e,r,i),this.lastIndex=n}execute(t){return this.text&&t.push(this.text.toString()),this.lastIndex+1}toString(){return null==this.text?"":"'}}const pr={atn:An,dfa:Ln,context:Rn,misc:Pn,tree:jn,error:Wn,Token:St,CommonToken:tn,CharStreams:Jn,CharStream:Gn,InputStream:Yn,CommonTokenStream:nr,Lexer:sn,Parser:ir,ParserRuleContext:ar,Interval:zt,IntervalSet:Vt,LL1Analyzer:me,Utils:Qn,TokenStreamRewriter:cr};var dr=Tt.Ay;function mr(t){return mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mr(t)}function yr(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{defaultValue:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=vr(this,e,[n]);var r=n.defaultValue,i=n.description,o=n.sensitive,s=n.nullable;return t.__class="TerraformVariable",t.defaultValue=r||null,t.description=i||null,t.sensitive=o||!1,t.nullable=s||!1,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wr(t,e)}(e,t),function(t,e){return e&&yr(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"formattedName",get:function(){var t="variable"===this.category?"var":"local";return"output"===this.category?null:"".concat(t,".").concat(this.name)}}])}(t.Variable);const kr=xr;function Tr(t){return Tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tr(t)}function Sr(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{isDynamic:!1};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Ar(this,e,[n])).isDynamic=n.isDynamic||!1,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Cr(t,e)}(e,t),function(t,e){return e&&Sr(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"isVariable",get:function(){return null!==this.value&&"string"==typeof this.value&&(this.value.startsWith("var.")||this.value.startsWith("local."))}}])}(t.ComponentAttribute);const Rr=Lr;function Pr(t){return Pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pr(t)}function Ir(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[];return this.validateExternalId(t),function(t,e,n){var r=Br(Fr(t.prototype),"getErrors",n);return function(t){return r.apply(n,t)}}(n,0,this)([t])}},{key:"validateDefinition",value:function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=this.definition)&&void 0!==e&&e.isUnknown&&n.push(new t.ParserLog({componentId:this.id,severity:t.ParserLog.SEVERITY_WARNING,message:"parser.warning.noComponentDefinition"})),n}},{key:"validateExternalId",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==this.externalId&&0!==this.externalId.length||e.push(new t.ParserLog({componentId:this.id,severity:t.ParserLog.SEVERITY_ERROR,message:"terrator-plugin.parser.error.noExternalId"})),e}}])}(t.Component);const Vr=zr;function Kr(t){return Kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kr(t)}function Hr(t,e){for(var n=0;n0){var t=this.fieldsTree.pop();t.value.push(this.currentObjectField),this.currentObjectField=t}else this.currentComponent.attributes.push(this.currentObjectField),this.currentObjectField=null}},{key:"enterBlocktype",value:function(){}},{key:"exitBlocktype",value:function(){}},{key:"enterResourcetype",value:function(t){var e=this,n=Xr(t);if(this.currentComponent.definition=this.definitions.find((function(t){return t.blockType===e.currentBlockType&&t.type===n}))||this.getUnknownDefinition(n),this.currentComponent.validateDefinition().forEach((function(n){return e.addError(t,n)})),"provider"===this.currentBlockType){var r="".concat(n,".").concat(n);this.currentComponent.externalId=n,this.currentComponent.id=this.createIdFromTypeExternalId(r)}}},{key:"exitResourcetype",value:function(){}},{key:"enterName",value:function(){}},{key:"exitName",value:function(t){var e=this;if(this.currentComponent){this.currentComponent.externalId=Xr(t),this.currentComponent.validateExternalId().forEach((function(n){return e.addError(t,n)}));var n="".concat(this.currentComponent.definition.type,".").concat(this.currentComponent.externalId);this.currentComponent.id=this.createIdFromTypeExternalId(n)}else this.currentVariable&&(this.currentVariable.name=Xr(t))}},{key:"enterLabel",value:function(){}},{key:"exitLabel",value:function(){}},{key:"enterBlockbody",value:function(){}},{key:"exitBlockbody",value:function(){}},{key:"enterArgument",value:function(t){var e;if(null!==(e=t.expression())&&void 0!==e&&null!==(e=e.section())&&void 0!==e&&e.map_()){this.currentObjectField&&this.fieldsTree.push(this.currentObjectField);var n=t.identifier().getText();this.currentObjectField=new Rr({name:n,type:"Object",value:[],definition:this.getAttributeDefinition(this.currentObjectField||this.currentComponent,n)})}this.isVariable()?(this.currentVariableField=t.identifier().getText(),"default"===this.currentVariableField&&(this.currentVariableField="defaultValue")):"local"===this.currentBlockType?(this.currentVariable=new kr({category:"local",name:Xr(t.identifier())}),this.currentVariableField="value"):(this.currentField=new Rr({name:t.identifier().getText()}),this.currentField.definition=this.getAttributeDefinition(this.currentComponent,this.currentField.name))}},{key:"exitArgument",value:function(t){var e,n,r=this;if(this.isVariable()){var i=t.identifier().getText();"description"===i?this.currentVariable.description=Xr(t.expression()):"sensitive"!==i&&"nullable"!==i||(this.currentVariable[i]="true"===Xr(t.expression()))}else if("local"===this.currentBlockType)this.addVariable();else if(this.currentField)this.currentField.name=t.identifier().getText(),this.currentObjectField?(this.currentObjectField.value.push(this.currentField),this.currentField.definition=this.getAttributeDefinition(this.currentObjectField,this.currentField.name)):(this.currentComponent.attributes.push(this.currentField),this.currentField.definition=this.getAttributeDefinition(this.currentComponent,this.currentField.name));else if(this.currentObjectField.name=t.identifier().getText(),this.fieldsTree.length>0){var o=this.fieldsTree.pop();o.value.push(this.currentObjectField),this.currentObjectField=o}else this.currentComponent.attributes.push(this.currentObjectField),this.currentObjectField=null;if("Reference"===(null===(e=this.currentField)||void 0===e||null===(e=e.definition)||void 0===e?void 0:e.type)&&/([^.]+\.[^.]+)/.exec(this.currentField.value)&&(Array.isArray(this.currentField.value)?this.currentField.value=this.currentField.value.map((function(t){var e=/([^.]+\.[^.]+)\.([^.]+)/.exec(t);return r.createIdFromTypeExternalId(e[1])})):this.currentField.value=this.createIdFromTypeExternalId(this.currentField.value)),"Link"===(null===(n=this.currentField)||void 0===n||null===(n=n.definition)||void 0===n?void 0:n.type)){this.currentField.type="Array",Array.isArray(this.currentField.value)&&(this.currentField.value=this.currentField.value.map((function(t){var e=/([^.]+\.[^.]+)\.([^.]+)/.exec(t);return r.createIdFromTypeExternalId(e[1])})));var s=/([^.]+\.[^.]+)(\.([^.]+))?/.exec(this.currentField.value);s&&(this.currentField.value=[this.createIdFromTypeExternalId(s[1])])}this.currentField=null}},{key:"createIdFromTypeExternalId",value:function(t){if(this.ids.has(t))return this.ids.get(t);var e="id_".concat(this.idCounter);return this.idCounter+=1,this.ids.set(t,e),e}},{key:"enterIdentifier",value:function(){}},{key:"exitIdentifier",value:function(){}},{key:"enterIdentifierchain",value:function(){}},{key:"exitIdentifierchain",value:function(){}},{key:"enterInline_index",value:function(){}},{key:"exitInline_index",value:function(){}},{key:"enterExpression",value:function(){}},{key:"exitExpression",value:function(){}},{key:"enterForloop",value:function(){}},{key:"exitForloop",value:function(){}},{key:"enterSection",value:function(t){var e;if(!this.currentField&&!this.isVariable()&&null!==(e=t.val())&&void 0!==e&&e.identifier()){var n=Xr(t.val());this.currentField=new Rr({type:"String",value:"null"===n?null:n})}}},{key:"exitSection",value:function(){}},{key:"enterVal",value:function(){}},{key:"getFieldValueTypeFromContext",value:function(t){if(t.BOOL())return{value:"true"===t.BOOL().getText(),type:"Boolean"};if(t.signed_number())return{value:parseFloat(t.signed_number().getText()),type:"Number"};var e=Xr(t);return{value:"null"===e?null:e,type:"String"}}},{key:"exitVal",value:function(t){var e=this,n=this.getFieldValueTypeFromContext(t),r=n.value,i=n.type;if(this.isVariable()||"local"===this.currentBlockType){var o=this.attributeTypeToVariableType(i);Array.isArray(this.currentVariable[this.currentVariableField])?(this.currentVariable[this.currentVariableField].push(r),"defaultValue"!==this.currentVariableField&&"value"!==this.currentVariableField||(this.currentVariable.type="list(".concat(o,")"))):(this.currentVariable[this.currentVariableField]=r,"defaultValue"!==this.currentVariableField&&"value"!==this.currentVariableField||(this.currentVariable.type=o))}else"Array"===this.currentField.type?this.currentField.value.push(r):(this.currentField.value=r,this.currentField.type=i),this.currentField.getErrors().forEach((function(n){return e.addError(t,n)}))}},{key:"enterFunctioncall",value:function(){}},{key:"exitFunctioncall",value:function(){}},{key:"enterFunctionname",value:function(){}},{key:"exitFunctionname",value:function(){}},{key:"enterFunctionarguments",value:function(){}},{key:"exitFunctionarguments",value:function(){}},{key:"enterIndex",value:function(){}},{key:"exitIndex",value:function(){}},{key:"enterFiledecl",value:function(){}},{key:"exitFiledecl",value:function(){}},{key:"enterList_",value:function(){this.currentField?this.currentField&&(this.currentField.type="Array",this.currentField.value=[]):this.currentField=new Rr({type:"Array",value:[]}),this.isVariable()?this.currentVariable[this.currentVariableField]=[]:"local"===this.currentBlockType&&(this.currentVariable.value=[])}},{key:"exitList_",value:function(){this.currentField&&(this.currentField.type="Array")}},{key:"enterMap_",value:function(){}},{key:"exitMap_",value:function(){}},{key:"enterString",value:function(){}},{key:"exitString",value:function(){}},{key:"enterNumber",value:function(){}},{key:"exitNumber",value:function(){}},{key:"enterSigned_number",value:function(){}},{key:"exitSigned_number",value:function(){}}])}(dr.tree.ParseTreeListener);const Jr=Zr;function Qr(t){return Qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qr(t)}function ti(t,e,n){return e=ni(e),function(t,e){if(e&&("object"==Qr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ei()?Reflect.construct(e,n||[],ni(t).constructor):e.apply(t,n))}function ei(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ei=function(){return!!t})()}function ni(t){return ni=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ni(t)}function ri(t,e){return ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ri(t,e)}function ii(t,e,n){return(e=oi(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oi(t){var e=function(t){if("object"!=Qr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Qr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qr(e)?e:e+""}var si=(new dr.atn.ATNDeserializer).deserialize([4,0,49,390,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,9,1,9,1,10,1,10,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,13,1,13,1,14,1,14,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,17,1,17,1,18,1,18,1,19,1,19,1,20,1,20,1,21,1,21,1,22,1,22,1,22,1,23,1,23,1,24,1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,26,1,27,1,27,1,27,1,28,1,28,1,28,1,29,1,29,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,32,1,32,1,32,1,33,1,33,1,34,1,34,1,35,1,35,1,36,1,36,1,37,1,37,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,39,1,39,5,39,261,8,39,10,39,12,39,264,9,39,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,41,4,41,275,8,41,11,41,12,41,276,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,3,42,288,8,42,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,5,43,305,8,43,10,43,12,43,308,9,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,5,44,330,8,44,10,44,12,44,333,9,44,1,44,1,44,1,44,1,44,1,45,1,45,1,45,1,45,5,45,343,8,45,10,45,12,45,346,9,45,1,45,1,45,1,46,1,46,5,46,352,8,46,10,46,12,46,355,9,46,1,47,1,47,1,47,3,47,360,8,47,1,47,5,47,363,8,47,10,47,12,47,366,9,47,1,47,1,47,1,48,1,48,1,48,1,48,5,48,374,8,48,10,48,12,48,377,9,48,1,48,1,48,1,48,1,48,1,48,1,49,4,49,385,8,49,11,49,12,49,386,1,49,1,49,4,262,306,331,375,0,50,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,0,61,30,63,31,65,32,67,33,69,34,71,35,73,36,75,37,77,38,79,39,81,40,83,41,85,42,87,43,89,44,91,45,93,46,95,47,97,48,99,49,1,0,6,1,0,48,57,3,0,10,10,13,13,34,34,2,0,65,90,97,122,5,0,45,45,48,57,65,90,95,95,97,122,2,0,10,10,13,13,3,0,9,10,13,13,32,32,400,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,1,101,1,0,0,0,3,111,1,0,0,0,5,120,1,0,0,0,7,125,1,0,0,0,9,132,1,0,0,0,11,139,1,0,0,0,13,146,1,0,0,0,15,148,1,0,0,0,17,154,1,0,0,0,19,158,1,0,0,0,21,160,1,0,0,0,23,162,1,0,0,0,25,166,1,0,0,0,27,177,1,0,0,0,29,179,1,0,0,0,31,181,1,0,0,0,33,183,1,0,0,0,35,188,1,0,0,0,37,190,1,0,0,0,39,192,1,0,0,0,41,194,1,0,0,0,43,196,1,0,0,0,45,198,1,0,0,0,47,201,1,0,0,0,49,203,1,0,0,0,51,206,1,0,0,0,53,209,1,0,0,0,55,212,1,0,0,0,57,215,1,0,0,0,59,218,1,0,0,0,61,220,1,0,0,0,63,229,1,0,0,0,65,238,1,0,0,0,67,241,1,0,0,0,69,243,1,0,0,0,71,245,1,0,0,0,73,247,1,0,0,0,75,249,1,0,0,0,77,251,1,0,0,0,79,253,1,0,0,0,81,269,1,0,0,0,83,274,1,0,0,0,85,287,1,0,0,0,87,289,1,0,0,0,89,321,1,0,0,0,91,338,1,0,0,0,93,349,1,0,0,0,95,359,1,0,0,0,97,369,1,0,0,0,99,384,1,0,0,0,101,102,5,116,0,0,102,103,5,101,0,0,103,104,5,114,0,0,104,105,5,114,0,0,105,106,5,97,0,0,106,107,5,102,0,0,107,108,5,111,0,0,108,109,5,114,0,0,109,110,5,109,0,0,110,2,1,0,0,0,111,112,5,114,0,0,112,113,5,101,0,0,113,114,5,115,0,0,114,115,5,111,0,0,115,116,5,117,0,0,116,117,5,114,0,0,117,118,5,99,0,0,118,119,5,101,0,0,119,4,1,0,0,0,120,121,5,100,0,0,121,122,5,97,0,0,122,123,5,116,0,0,123,124,5,97,0,0,124,6,1,0,0,0,125,126,5,111,0,0,126,127,5,117,0,0,127,128,5,116,0,0,128,129,5,112,0,0,129,130,5,117,0,0,130,131,5,116,0,0,131,8,1,0,0,0,132,133,5,108,0,0,133,134,5,111,0,0,134,135,5,99,0,0,135,136,5,97,0,0,136,137,5,108,0,0,137,138,5,115,0,0,138,10,1,0,0,0,139,140,5,109,0,0,140,141,5,111,0,0,141,142,5,100,0,0,142,143,5,117,0,0,143,144,5,108,0,0,144,145,5,101,0,0,145,12,1,0,0,0,146,147,5,61,0,0,147,14,1,0,0,0,148,149,5,108,0,0,149,150,5,111,0,0,150,151,5,99,0,0,151,152,5,97,0,0,152,153,5,108,0,0,153,16,1,0,0,0,154,155,5,118,0,0,155,156,5,97,0,0,156,157,5,114,0,0,157,18,1,0,0,0,158,159,5,63,0,0,159,20,1,0,0,0,160,161,5,58,0,0,161,22,1,0,0,0,162,163,5,102,0,0,163,164,5,111,0,0,164,165,5,114,0,0,165,24,1,0,0,0,166,167,5,106,0,0,167,168,5,115,0,0,168,169,5,111,0,0,169,170,5,110,0,0,170,171,5,101,0,0,171,172,5,110,0,0,172,173,5,99,0,0,173,174,5,111,0,0,174,175,5,100,0,0,175,176,5,101,0,0,176,26,1,0,0,0,177,178,5,44,0,0,178,28,1,0,0,0,179,180,5,91,0,0,180,30,1,0,0,0,181,182,5,93,0,0,182,32,1,0,0,0,183,184,5,102,0,0,184,185,5,105,0,0,185,186,5,108,0,0,186,187,5,101,0,0,187,34,1,0,0,0,188,189,5,43,0,0,189,36,1,0,0,0,190,191,5,45,0,0,191,38,1,0,0,0,192,193,5,47,0,0,193,40,1,0,0,0,194,195,5,37,0,0,195,42,1,0,0,0,196,197,5,62,0,0,197,44,1,0,0,0,198,199,5,62,0,0,199,200,5,61,0,0,200,46,1,0,0,0,201,202,5,60,0,0,202,48,1,0,0,0,203,204,5,60,0,0,204,205,5,61,0,0,205,50,1,0,0,0,206,207,5,61,0,0,207,208,5,61,0,0,208,52,1,0,0,0,209,210,5,33,0,0,210,211,5,61,0,0,211,54,1,0,0,0,212,213,5,38,0,0,213,214,5,38,0,0,214,56,1,0,0,0,215,216,5,124,0,0,216,217,5,124,0,0,217,58,1,0,0,0,218,219,7,0,0,0,219,60,1,0,0,0,220,221,5,118,0,0,221,222,5,97,0,0,222,223,5,114,0,0,223,224,5,105,0,0,224,225,5,97,0,0,225,226,5,98,0,0,226,227,5,108,0,0,227,228,5,101,0,0,228,62,1,0,0,0,229,230,5,112,0,0,230,231,5,114,0,0,231,232,5,111,0,0,232,233,5,118,0,0,233,234,5,105,0,0,234,235,5,100,0,0,235,236,5,101,0,0,236,237,5,114,0,0,237,64,1,0,0,0,238,239,5,105,0,0,239,240,5,110,0,0,240,66,1,0,0,0,241,242,5,42,0,0,242,68,1,0,0,0,243,244,5,46,0,0,244,70,1,0,0,0,245,246,5,123,0,0,246,72,1,0,0,0,247,248,5,125,0,0,248,74,1,0,0,0,249,250,5,40,0,0,250,76,1,0,0,0,251,252,5,41,0,0,252,78,1,0,0,0,253,254,5,60,0,0,254,255,5,60,0,0,255,256,5,69,0,0,256,257,5,79,0,0,257,258,5,70,0,0,258,262,1,0,0,0,259,261,9,0,0,0,260,259,1,0,0,0,261,264,1,0,0,0,262,263,1,0,0,0,262,260,1,0,0,0,263,265,1,0,0,0,264,262,1,0,0,0,265,266,5,69,0,0,266,267,5,79,0,0,267,268,5,70,0,0,268,80,1,0,0,0,269,270,5,110,0,0,270,271,5,117,0,0,271,272,5,108,0,0,272,82,1,0,0,0,273,275,3,59,29,0,274,273,1,0,0,0,275,276,1,0,0,0,276,274,1,0,0,0,276,277,1,0,0,0,277,84,1,0,0,0,278,279,5,116,0,0,279,280,5,114,0,0,280,281,5,117,0,0,281,288,5,101,0,0,282,283,5,102,0,0,283,284,5,97,0,0,284,285,5,108,0,0,285,286,5,115,0,0,286,288,5,101,0,0,287,278,1,0,0,0,287,282,1,0,0,0,288,86,1,0,0,0,289,290,5,60,0,0,290,291,5,60,0,0,291,292,5,68,0,0,292,293,5,69,0,0,293,294,5,83,0,0,294,295,5,67,0,0,295,296,5,82,0,0,296,297,5,73,0,0,297,298,5,80,0,0,298,299,5,84,0,0,299,300,5,73,0,0,300,301,5,79,0,0,301,302,5,78,0,0,302,306,1,0,0,0,303,305,9,0,0,0,304,303,1,0,0,0,305,308,1,0,0,0,306,307,1,0,0,0,306,304,1,0,0,0,307,309,1,0,0,0,308,306,1,0,0,0,309,310,5,68,0,0,310,311,5,69,0,0,311,312,5,83,0,0,312,313,5,67,0,0,313,314,5,82,0,0,314,315,5,73,0,0,315,316,5,80,0,0,316,317,5,84,0,0,317,318,5,73,0,0,318,319,5,79,0,0,319,320,5,78,0,0,320,88,1,0,0,0,321,322,5,60,0,0,322,323,5,60,0,0,323,324,5,45,0,0,324,325,5,69,0,0,325,326,5,79,0,0,326,327,5,70,0,0,327,331,1,0,0,0,328,330,9,0,0,0,329,328,1,0,0,0,330,333,1,0,0,0,331,332,1,0,0,0,331,329,1,0,0,0,332,334,1,0,0,0,333,331,1,0,0,0,334,335,5,69,0,0,335,336,5,79,0,0,336,337,5,70,0,0,337,90,1,0,0,0,338,344,5,34,0,0,339,340,5,92,0,0,340,343,5,34,0,0,341,343,8,1,0,0,342,339,1,0,0,0,342,341,1,0,0,0,343,346,1,0,0,0,344,342,1,0,0,0,344,345,1,0,0,0,345,347,1,0,0,0,346,344,1,0,0,0,347,348,5,34,0,0,348,92,1,0,0,0,349,353,7,2,0,0,350,352,7,3,0,0,351,350,1,0,0,0,352,355,1,0,0,0,353,351,1,0,0,0,353,354,1,0,0,0,354,94,1,0,0,0,355,353,1,0,0,0,356,360,5,35,0,0,357,358,5,47,0,0,358,360,5,47,0,0,359,356,1,0,0,0,359,357,1,0,0,0,360,364,1,0,0,0,361,363,8,4,0,0,362,361,1,0,0,0,363,366,1,0,0,0,364,362,1,0,0,0,364,365,1,0,0,0,365,367,1,0,0,0,366,364,1,0,0,0,367,368,6,47,0,0,368,96,1,0,0,0,369,370,5,47,0,0,370,371,5,42,0,0,371,375,1,0,0,0,372,374,9,0,0,0,373,372,1,0,0,0,374,377,1,0,0,0,375,376,1,0,0,0,375,373,1,0,0,0,376,378,1,0,0,0,377,375,1,0,0,0,378,379,5,42,0,0,379,380,5,47,0,0,380,381,1,0,0,0,381,382,6,48,0,0,382,98,1,0,0,0,383,385,7,5,0,0,384,383,1,0,0,0,385,386,1,0,0,0,386,384,1,0,0,0,386,387,1,0,0,0,387,388,1,0,0,0,388,389,6,49,1,0,389,100,1,0,0,0,13,0,262,276,287,306,331,342,344,353,359,364,375,386,2,0,1,0,6,0,0]),ai=si.decisionToState.map((function(t,e){return new dr.dfa.DFA(t,e)})),ci=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=ti(this,e,[t]))._interp=new dr.atn.LexerATNSimulator(n,si,ai,new dr.atn.PredictionContextCache),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ri(t,e)}(e,t),function(t){return Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(dr.Lexer);function ui(t){return ui="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ui(t)}function li(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hi(t,e){for(var n=0;n'","'>='","'<'","'<='","'=='","'!='","'&&'","'||'","'variable'","'provider'","'in'","'*'","'.'","'{'","'}'","'('","')'",null,"'nul'"]),ii(ci,"symbolicNames",[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"VARIABLE","PROVIDER","IN","STAR","DOT","LCURL","RCURL","LPAREN","RPAREN","EOF_","NULL_","NATURAL_NUMBER","BOOL","DESCRIPTION","MULTILINESTRING","STRING","IDENTIFIER","COMMENT","BLOCKCOMMENT","WS"]),ii(ci,"ruleNames",["T__0","T__1","T__2","T__3","T__4","T__5","T__6","T__7","T__8","T__9","T__10","T__11","T__12","T__13","T__14","T__15","T__16","T__17","T__18","T__19","T__20","T__21","T__22","T__23","T__24","T__25","T__26","T__27","T__28","DIGIT","VARIABLE","PROVIDER","IN","STAR","DOT","LCURL","RCURL","LPAREN","RPAREN","EOF_","NULL_","NATURAL_NUMBER","BOOL","DESCRIPTION","MULTILINESTRING","STRING","IDENTIFIER","COMMENT","BLOCKCOMMENT","WS"]),ci.EOF=dr.Token.EOF,ci.T__0=1,ci.T__1=2,ci.T__2=3,ci.T__3=4,ci.T__4=5,ci.T__5=6,ci.T__6=7,ci.T__7=8,ci.T__8=9,ci.T__9=10,ci.T__10=11,ci.T__11=12,ci.T__12=13,ci.T__13=14,ci.T__14=15,ci.T__15=16,ci.T__16=17,ci.T__17=18,ci.T__18=19,ci.T__19=20,ci.T__20=21,ci.T__21=22,ci.T__22=23,ci.T__23=24,ci.T__24=25,ci.T__25=26,ci.T__26=27,ci.T__27=28,ci.T__28=29,ci.VARIABLE=30,ci.PROVIDER=31,ci.IN=32,ci.STAR=33,ci.DOT=34,ci.LCURL=35,ci.RCURL=36,ci.LPAREN=37,ci.RPAREN=38,ci.EOF_=39,ci.NULL_=40,ci.NATURAL_NUMBER=41,ci.BOOL=42,ci.DESCRIPTION=43,ci.MULTILINESTRING=44,ci.STRING=45,ci.IDENTIFIER=46,ci.COMMENT=47,ci.BLOCKCOMMENT=48,ci.WS=49;var _i=(new dr.atn.ATNDeserializer).deserialize([4,1,49,310,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,4,0,77,8,0,11,0,12,0,78,1,0,1,0,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,9,1,9,5,9,117,8,9,10,9,12,9,120,9,9,1,9,1,9,1,10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,1,14,5,14,135,8,14,10,14,12,14,138,9,14,1,14,1,14,1,15,1,15,1,15,1,15,1,16,1,16,3,16,148,8,16,1,16,1,16,1,17,1,17,3,17,154,8,17,1,17,1,17,5,17,158,8,17,10,17,12,17,161,9,17,1,17,1,17,1,17,5,17,166,8,17,10,17,12,17,169,9,17,1,17,1,17,1,17,5,17,174,8,17,10,17,12,17,177,9,17,3,17,179,8,17,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,19,3,19,190,8,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,5,19,202,8,19,10,19,12,19,205,9,19,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,21,1,21,1,21,3,21,217,8,21,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,3,22,228,8,22,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,5,23,238,8,23,10,23,12,23,241,9,23,1,23,3,23,244,8,23,1,24,1,24,1,25,1,25,1,25,1,25,5,25,252,8,25,10,25,12,25,255,9,25,3,25,257,8,25,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28,5,28,272,8,28,10,28,12,28,275,9,28,1,28,3,28,278,8,28,3,28,280,8,28,1,28,1,28,1,29,1,29,1,29,3,29,287,8,29,5,29,289,8,29,10,29,12,29,292,9,29,1,29,1,29,1,30,1,30,1,31,3,31,299,8,31,1,31,1,31,1,32,1,32,1,33,1,33,1,33,3,33,308,8,33,1,33,1,239,1,38,34,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,0,5,3,0,3,3,6,6,8,9,2,0,30,32,46,46,1,0,44,45,1,0,18,19,2,0,18,29,33,33,318,0,76,1,0,0,0,2,82,1,0,0,0,4,85,1,0,0,0,6,90,1,0,0,0,8,95,1,0,0,0,10,99,1,0,0,0,12,103,1,0,0,0,14,106,1,0,0,0,16,110,1,0,0,0,18,114,1,0,0,0,20,123,1,0,0,0,22,125,1,0,0,0,24,127,1,0,0,0,26,129,1,0,0,0,28,131,1,0,0,0,30,141,1,0,0,0,32,147,1,0,0,0,34,178,1,0,0,0,36,180,1,0,0,0,38,189,1,0,0,0,40,206,1,0,0,0,42,216,1,0,0,0,44,227,1,0,0,0,46,243,1,0,0,0,48,245,1,0,0,0,50,256,1,0,0,0,52,258,1,0,0,0,54,262,1,0,0,0,56,267,1,0,0,0,58,283,1,0,0,0,60,295,1,0,0,0,62,298,1,0,0,0,64,302,1,0,0,0,66,304,1,0,0,0,68,77,3,12,6,0,69,77,3,14,7,0,70,77,3,10,5,0,71,77,3,8,4,0,72,77,3,16,8,0,73,77,3,6,3,0,74,77,3,4,2,0,75,77,3,2,1,0,76,68,1,0,0,0,76,69,1,0,0,0,76,70,1,0,0,0,76,71,1,0,0,0,76,72,1,0,0,0,76,73,1,0,0,0,76,74,1,0,0,0,76,75,1,0,0,0,77,78,1,0,0,0,78,76,1,0,0,0,78,79,1,0,0,0,79,80,1,0,0,0,80,81,5,0,0,1,81,1,1,0,0,0,82,83,5,1,0,0,83,84,3,28,14,0,84,3,1,0,0,0,85,86,5,2,0,0,86,87,3,22,11,0,87,88,3,24,12,0,88,89,3,28,14,0,89,5,1,0,0,0,90,91,5,3,0,0,91,92,3,22,11,0,92,93,3,24,12,0,93,94,3,28,14,0,94,7,1,0,0,0,95,96,5,31,0,0,96,97,3,22,11,0,97,98,3,28,14,0,98,9,1,0,0,0,99,100,5,4,0,0,100,101,3,24,12,0,101,102,3,28,14,0,102,11,1,0,0,0,103,104,5,5,0,0,104,105,3,28,14,0,105,13,1,0,0,0,106,107,5,6,0,0,107,108,3,24,12,0,108,109,3,28,14,0,109,15,1,0,0,0,110,111,5,30,0,0,111,112,3,24,12,0,112,113,3,28,14,0,113,17,1,0,0,0,114,118,3,20,10,0,115,117,3,26,13,0,116,115,1,0,0,0,117,120,1,0,0,0,118,116,1,0,0,0,118,119,1,0,0,0,119,121,1,0,0,0,120,118,1,0,0,0,121,122,3,28,14,0,122,19,1,0,0,0,123,124,5,46,0,0,124,21,1,0,0,0,125,126,5,45,0,0,126,23,1,0,0,0,127,128,5,45,0,0,128,25,1,0,0,0,129,130,5,45,0,0,130,27,1,0,0,0,131,136,5,35,0,0,132,135,3,30,15,0,133,135,3,18,9,0,134,132,1,0,0,0,134,133,1,0,0,0,135,138,1,0,0,0,136,134,1,0,0,0,136,137,1,0,0,0,137,139,1,0,0,0,138,136,1,0,0,0,139,140,5,36,0,0,140,29,1,0,0,0,141,142,3,32,16,0,142,143,5,7,0,0,143,144,3,38,19,0,144,31,1,0,0,0,145,146,7,0,0,0,146,148,5,34,0,0,147,145,1,0,0,0,147,148,1,0,0,0,148,149,1,0,0,0,149,150,3,34,17,0,150,33,1,0,0,0,151,153,7,1,0,0,152,154,3,52,26,0,153,152,1,0,0,0,153,154,1,0,0,0,154,159,1,0,0,0,155,156,5,34,0,0,156,158,3,34,17,0,157,155,1,0,0,0,158,161,1,0,0,0,159,157,1,0,0,0,159,160,1,0,0,0,160,179,1,0,0,0,161,159,1,0,0,0,162,167,5,33,0,0,163,164,5,34,0,0,164,166,3,34,17,0,165,163,1,0,0,0,166,169,1,0,0,0,167,165,1,0,0,0,167,168,1,0,0,0,168,179,1,0,0,0,169,167,1,0,0,0,170,175,3,36,18,0,171,172,5,34,0,0,172,174,3,34,17,0,173,171,1,0,0,0,174,177,1,0,0,0,175,173,1,0,0,0,175,176,1,0,0,0,176,179,1,0,0,0,177,175,1,0,0,0,178,151,1,0,0,0,178,162,1,0,0,0,178,170,1,0,0,0,179,35,1,0,0,0,180,181,5,41,0,0,181,37,1,0,0,0,182,183,6,19,-1,0,183,190,3,42,21,0,184,185,5,37,0,0,185,186,3,38,19,0,186,187,5,38,0,0,187,190,1,0,0,0,188,190,3,40,20,0,189,182,1,0,0,0,189,184,1,0,0,0,189,188,1,0,0,0,190,203,1,0,0,0,191,192,10,4,0,0,192,193,3,64,32,0,193,194,3,38,19,5,194,202,1,0,0,0,195,196,10,2,0,0,196,197,5,10,0,0,197,198,3,38,19,0,198,199,5,11,0,0,199,200,3,38,19,3,200,202,1,0,0,0,201,191,1,0,0,0,201,195,1,0,0,0,202,205,1,0,0,0,203,201,1,0,0,0,203,204,1,0,0,0,204,39,1,0,0,0,205,203,1,0,0,0,206,207,5,12,0,0,207,208,3,32,16,0,208,209,5,32,0,0,209,210,3,38,19,0,210,211,5,11,0,0,211,212,3,38,19,0,212,41,1,0,0,0,213,217,3,56,28,0,214,217,3,58,29,0,215,217,3,44,22,0,216,213,1,0,0,0,216,214,1,0,0,0,216,215,1,0,0,0,217,43,1,0,0,0,218,228,5,40,0,0,219,228,3,62,31,0,220,228,3,60,30,0,221,228,3,32,16,0,222,228,5,42,0,0,223,228,5,43,0,0,224,228,3,54,27,0,225,228,3,46,23,0,226,228,5,39,0,0,227,218,1,0,0,0,227,219,1,0,0,0,227,220,1,0,0,0,227,221,1,0,0,0,227,222,1,0,0,0,227,223,1,0,0,0,227,224,1,0,0,0,227,225,1,0,0,0,227,226,1,0,0,0,228,45,1,0,0,0,229,230,3,48,24,0,230,231,5,37,0,0,231,232,3,50,25,0,232,233,5,38,0,0,233,244,1,0,0,0,234,235,5,13,0,0,235,239,5,37,0,0,236,238,9,0,0,0,237,236,1,0,0,0,238,241,1,0,0,0,239,240,1,0,0,0,239,237,1,0,0,0,240,242,1,0,0,0,241,239,1,0,0,0,242,244,5,38,0,0,243,229,1,0,0,0,243,234,1,0,0,0,244,47,1,0,0,0,245,246,5,46,0,0,246,49,1,0,0,0,247,257,1,0,0,0,248,253,3,38,19,0,249,250,5,14,0,0,250,252,3,38,19,0,251,249,1,0,0,0,252,255,1,0,0,0,253,251,1,0,0,0,253,254,1,0,0,0,254,257,1,0,0,0,255,253,1,0,0,0,256,247,1,0,0,0,256,248,1,0,0,0,257,51,1,0,0,0,258,259,5,15,0,0,259,260,3,38,19,0,260,261,5,16,0,0,261,53,1,0,0,0,262,263,5,17,0,0,263,264,5,37,0,0,264,265,3,38,19,0,265,266,5,38,0,0,266,55,1,0,0,0,267,279,5,15,0,0,268,273,3,38,19,0,269,270,5,14,0,0,270,272,3,38,19,0,271,269,1,0,0,0,272,275,1,0,0,0,273,271,1,0,0,0,273,274,1,0,0,0,274,277,1,0,0,0,275,273,1,0,0,0,276,278,5,14,0,0,277,276,1,0,0,0,277,278,1,0,0,0,278,280,1,0,0,0,279,268,1,0,0,0,279,280,1,0,0,0,280,281,1,0,0,0,281,282,5,16,0,0,282,57,1,0,0,0,283,290,5,35,0,0,284,286,3,30,15,0,285,287,5,14,0,0,286,285,1,0,0,0,286,287,1,0,0,0,287,289,1,0,0,0,288,284,1,0,0,0,289,292,1,0,0,0,290,288,1,0,0,0,290,291,1,0,0,0,291,293,1,0,0,0,292,290,1,0,0,0,293,294,5,36,0,0,294,59,1,0,0,0,295,296,7,2,0,0,296,61,1,0,0,0,297,299,7,3,0,0,298,297,1,0,0,0,298,299,1,0,0,0,299,300,1,0,0,0,300,301,3,66,33,0,301,63,1,0,0,0,302,303,7,4,0,0,303,65,1,0,0,0,304,307,5,41,0,0,305,306,5,34,0,0,306,308,5,41,0,0,307,305,1,0,0,0,307,308,1,0,0,0,308,67,1,0,0,0,27,76,78,118,134,136,147,153,159,167,175,178,189,201,203,216,227,239,243,253,256,273,277,279,286,290,298,307]),wi=_i.decisionToState.map((function(t,e){return new dr.dfa.DFA(t,e)})),xi=new dr.atn.PredictionContextCache,ki=function(t){function e(t){var n;return li(this,e),(n=pi(this,e,[t]))._interp=new dr.atn.ParserATNSimulator(n,_i,wi,xi),n.ruleNames=e.ruleNames,n.literalNames=e.literalNames,n.symbolicNames=e.symbolicNames,n}return yi(e,t),fi(e,[{key:"sempred",value:function(t,e,n){if(19===e)return this.expression_sempred(t,n);throw"No predicate with index:"+e}},{key:"expression_sempred",value:function(t,e){switch(e){case 0:return this.precpred(this._ctx,4);case 1:return this.precpred(this._ctx,2);default:throw"No predicate with index:"+e}}},{key:"file_",value:function(){var t=new Ti(this,this._ctx,this.state);this.enterRule(t,0,e.RULE_file_);var n=0;try{this.enterOuterAlt(t,1),this.state=76,this._errHandler.sync(this),n=this._input.LA(1);do{switch(this.state=76,this._errHandler.sync(this),this._input.LA(1)){case 5:this.state=68,this.local();break;case 6:this.state=69,this.module();break;case 4:this.state=70,this.output();break;case 31:this.state=71,this.provider();break;case 30:this.state=72,this.variable();break;case 3:this.state=73,this.data();break;case 2:this.state=74,this.resource();break;case 1:this.state=75,this.terraform();break;default:throw new dr.error.NoViableAltException(this)}this.state=78,this._errHandler.sync(this),n=this._input.LA(1)}while(!(-32&n)&&1<'","'>='","'<'","'<='","'=='","'!='","'&&'","'||'","'variable'","'provider'","'in'","'*'","'.'","'{'","'}'","'('","')'",null,"'nul'"]),vi(ki,"symbolicNames",[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"VARIABLE","PROVIDER","IN","STAR","DOT","LCURL","RCURL","LPAREN","RPAREN","EOF_","NULL_","NATURAL_NUMBER","BOOL","DESCRIPTION","MULTILINESTRING","STRING","IDENTIFIER","COMMENT","BLOCKCOMMENT","WS"]),vi(ki,"ruleNames",["file_","terraform","resource","data","provider","output","local","module","variable","block","blocktype","resourcetype","name","label","blockbody","argument","identifier","identifierchain","inline_index","expression","forloop","section","val","functioncall","functionname","functionarguments","index","filedecl","list_","map_","string","signed_number","operator_","number"]),ki.EOF=dr.Token.EOF,ki.T__0=1,ki.T__1=2,ki.T__2=3,ki.T__3=4,ki.T__4=5,ki.T__5=6,ki.T__6=7,ki.T__7=8,ki.T__8=9,ki.T__9=10,ki.T__10=11,ki.T__11=12,ki.T__12=13,ki.T__13=14,ki.T__14=15,ki.T__15=16,ki.T__16=17,ki.T__17=18,ki.T__18=19,ki.T__19=20,ki.T__20=21,ki.T__21=22,ki.T__22=23,ki.T__23=24,ki.T__24=25,ki.T__25=26,ki.T__26=27,ki.T__27=28,ki.T__28=29,ki.VARIABLE=30,ki.PROVIDER=31,ki.IN=32,ki.STAR=33,ki.DOT=34,ki.LCURL=35,ki.RCURL=36,ki.LPAREN=37,ki.RPAREN=38,ki.EOF_=39,ki.NULL_=40,ki.NATURAL_NUMBER=41,ki.BOOL=42,ki.DESCRIPTION=43,ki.MULTILINESTRING=44,ki.STRING=45,ki.IDENTIFIER=46,ki.COMMENT=47,ki.BLOCKCOMMENT=48,ki.WS=49,ki.RULE_file_=0,ki.RULE_terraform=1,ki.RULE_resource=2,ki.RULE_data=3,ki.RULE_provider=4,ki.RULE_output=5,ki.RULE_local=6,ki.RULE_module=7,ki.RULE_variable=8,ki.RULE_block=9,ki.RULE_blocktype=10,ki.RULE_resourcetype=11,ki.RULE_name=12,ki.RULE_label=13,ki.RULE_blockbody=14,ki.RULE_argument=15,ki.RULE_identifier=16,ki.RULE_identifierchain=17,ki.RULE_inline_index=18,ki.RULE_expression=19,ki.RULE_forloop=20,ki.RULE_section=21,ki.RULE_val=22,ki.RULE_functioncall=23,ki.RULE_functionname=24,ki.RULE_functionarguments=25,ki.RULE_index=26,ki.RULE_filedecl=27,ki.RULE_list_=28,ki.RULE_map_=29,ki.RULE_string=30,ki.RULE_signed_number=31,ki.RULE_operator_=32,ki.RULE_number=33;var Ti=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"local",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Ci):this.getTypedRuleContext(Ci,t)})),vi(i,"module",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Li):this.getTypedRuleContext(Li,t)})),vi(i,"output",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Ni):this.getTypedRuleContext(Ni,t)})),vi(i,"provider",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Oi):this.getTypedRuleContext(Oi,t)})),vi(i,"variable",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Ri):this.getTypedRuleContext(Ri,t)})),vi(i,"data",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Ai):this.getTypedRuleContext(Ai,t)})),vi(i,"resource",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Ei):this.getTypedRuleContext(Ei,t)})),vi(i,"terraform",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Si):this.getTypedRuleContext(Si,t)})),i.parser=t,i.ruleIndex=ki.RULE_file_,i}return yi(e,t),fi(e,[{key:"EOF",value:function(){return this.getToken(ki.EOF,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterFile_(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitFile_(this)}}])}(dr.ParserRuleContext),Si=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_terraform,i}return yi(e,t),fi(e,[{key:"blockbody",value:function(){return this.getTypedRuleContext(Bi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterTerraform(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitTerraform(this)}}])}(dr.ParserRuleContext),Ei=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_resource,i}return yi(e,t),fi(e,[{key:"resourcetype",value:function(){return this.getTypedRuleContext(Mi,0)}},{key:"name",value:function(){return this.getTypedRuleContext(Di,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(Bi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterResource(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitResource(this)}}])}(dr.ParserRuleContext),Ai=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_data,i}return yi(e,t),fi(e,[{key:"resourcetype",value:function(){return this.getTypedRuleContext(Mi,0)}},{key:"name",value:function(){return this.getTypedRuleContext(Di,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(Bi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterData(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitData(this)}}])}(dr.ParserRuleContext),Oi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_provider,i}return yi(e,t),fi(e,[{key:"PROVIDER",value:function(){return this.getToken(ki.PROVIDER,0)}},{key:"resourcetype",value:function(){return this.getTypedRuleContext(Mi,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(Bi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterProvider(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitProvider(this)}}])}(dr.ParserRuleContext),Ni=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_output,i}return yi(e,t),fi(e,[{key:"name",value:function(){return this.getTypedRuleContext(Di,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(Bi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterOutput(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitOutput(this)}}])}(dr.ParserRuleContext),Ci=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_local,i}return yi(e,t),fi(e,[{key:"blockbody",value:function(){return this.getTypedRuleContext(Bi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterLocal(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitLocal(this)}}])}(dr.ParserRuleContext),Li=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_module,i}return yi(e,t),fi(e,[{key:"name",value:function(){return this.getTypedRuleContext(Di,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(Bi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterModule(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitModule(this)}}])}(dr.ParserRuleContext),Ri=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_variable,i}return yi(e,t),fi(e,[{key:"VARIABLE",value:function(){return this.getToken(ki.VARIABLE,0)}},{key:"name",value:function(){return this.getTypedRuleContext(Di,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(Bi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterVariable(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitVariable(this)}}])}(dr.ParserRuleContext),Pi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"label",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ji):this.getTypedRuleContext(ji,t)})),i.parser=t,i.ruleIndex=ki.RULE_block,i}return yi(e,t),fi(e,[{key:"blocktype",value:function(){return this.getTypedRuleContext(Ii,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(Bi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterBlock(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitBlock(this)}}])}(dr.ParserRuleContext),Ii=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_blocktype,i}return yi(e,t),fi(e,[{key:"IDENTIFIER",value:function(){return this.getToken(ki.IDENTIFIER,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterBlocktype(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitBlocktype(this)}}])}(dr.ParserRuleContext),Mi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_resourcetype,i}return yi(e,t),fi(e,[{key:"STRING",value:function(){return this.getToken(ki.STRING,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterResourcetype(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitResourcetype(this)}}])}(dr.ParserRuleContext),Di=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_name,i}return yi(e,t),fi(e,[{key:"STRING",value:function(){return this.getToken(ki.STRING,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterName(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitName(this)}}])}(dr.ParserRuleContext),ji=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_label,i}return yi(e,t),fi(e,[{key:"STRING",value:function(){return this.getToken(ki.STRING,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterLabel(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitLabel(this)}}])}(dr.ParserRuleContext),Bi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"argument",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Fi):this.getTypedRuleContext(Fi,t)})),vi(i,"block",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Pi):this.getTypedRuleContext(Pi,t)})),i.parser=t,i.ruleIndex=ki.RULE_blockbody,i}return yi(e,t),fi(e,[{key:"LCURL",value:function(){return this.getToken(ki.LCURL,0)}},{key:"RCURL",value:function(){return this.getToken(ki.RCURL,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterBlockbody(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitBlockbody(this)}}])}(dr.ParserRuleContext),Fi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_argument,i}return yi(e,t),fi(e,[{key:"identifier",value:function(){return this.getTypedRuleContext(Ui,0)}},{key:"expression",value:function(){return this.getTypedRuleContext(Ki,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterArgument(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitArgument(this)}}])}(dr.ParserRuleContext),Ui=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_identifier,i}return yi(e,t),fi(e,[{key:"identifierchain",value:function(){return this.getTypedRuleContext(zi,0)}},{key:"DOT",value:function(){return this.getToken(ki.DOT,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterIdentifier(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitIdentifier(this)}}])}(dr.ParserRuleContext),zi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"DOT",(function(t){return void 0===t&&(t=null),null===t?this.getTokens(ki.DOT):this.getToken(ki.DOT,t)})),vi(i,"identifierchain",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(e):this.getTypedRuleContext(e,t)})),i.parser=t,i.ruleIndex=ki.RULE_identifierchain,i}return yi(e,t),fi(e,[{key:"IDENTIFIER",value:function(){return this.getToken(ki.IDENTIFIER,0)}},{key:"IN",value:function(){return this.getToken(ki.IN,0)}},{key:"VARIABLE",value:function(){return this.getToken(ki.VARIABLE,0)}},{key:"PROVIDER",value:function(){return this.getToken(ki.PROVIDER,0)}},{key:"index",value:function(){return this.getTypedRuleContext(Xi,0)}},{key:"STAR",value:function(){return this.getToken(ki.STAR,0)}},{key:"inline_index",value:function(){return this.getTypedRuleContext(Vi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterIdentifierchain(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitIdentifierchain(this)}}])}(dr.ParserRuleContext),Vi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_inline_index,i}return yi(e,t),fi(e,[{key:"NATURAL_NUMBER",value:function(){return this.getToken(ki.NATURAL_NUMBER,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterInline_index(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitInline_index(this)}}])}(dr.ParserRuleContext),Ki=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"expression",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(e):this.getTypedRuleContext(e,t)})),i.parser=t,i.ruleIndex=ki.RULE_expression,i}return yi(e,t),fi(e,[{key:"section",value:function(){return this.getTypedRuleContext(qi,0)}},{key:"LPAREN",value:function(){return this.getToken(ki.LPAREN,0)}},{key:"RPAREN",value:function(){return this.getToken(ki.RPAREN,0)}},{key:"forloop",value:function(){return this.getTypedRuleContext(Hi,0)}},{key:"operator_",value:function(){return this.getTypedRuleContext(no,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterExpression(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitExpression(this)}}])}(dr.ParserRuleContext),Hi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"expression",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Ki):this.getTypedRuleContext(Ki,t)})),i.parser=t,i.ruleIndex=ki.RULE_forloop,i}return yi(e,t),fi(e,[{key:"identifier",value:function(){return this.getTypedRuleContext(Ui,0)}},{key:"IN",value:function(){return this.getToken(ki.IN,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterForloop(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitForloop(this)}}])}(dr.ParserRuleContext),qi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_section,i}return yi(e,t),fi(e,[{key:"list_",value:function(){return this.getTypedRuleContext(Ji,0)}},{key:"map_",value:function(){return this.getTypedRuleContext(Qi,0)}},{key:"val",value:function(){return this.getTypedRuleContext(Wi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterSection(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitSection(this)}}])}(dr.ParserRuleContext),Wi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_val,i}return yi(e,t),fi(e,[{key:"NULL_",value:function(){return this.getToken(ki.NULL_,0)}},{key:"signed_number",value:function(){return this.getTypedRuleContext(eo,0)}},{key:"string",value:function(){return this.getTypedRuleContext(to,0)}},{key:"identifier",value:function(){return this.getTypedRuleContext(Ui,0)}},{key:"BOOL",value:function(){return this.getToken(ki.BOOL,0)}},{key:"DESCRIPTION",value:function(){return this.getToken(ki.DESCRIPTION,0)}},{key:"filedecl",value:function(){return this.getTypedRuleContext(Zi,0)}},{key:"functioncall",value:function(){return this.getTypedRuleContext(Gi,0)}},{key:"EOF_",value:function(){return this.getToken(ki.EOF_,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterVal(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitVal(this)}}])}(dr.ParserRuleContext),Gi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_functioncall,i}return yi(e,t),fi(e,[{key:"functionname",value:function(){return this.getTypedRuleContext(Yi,0)}},{key:"LPAREN",value:function(){return this.getToken(ki.LPAREN,0)}},{key:"functionarguments",value:function(){return this.getTypedRuleContext($i,0)}},{key:"RPAREN",value:function(){return this.getToken(ki.RPAREN,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterFunctioncall(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitFunctioncall(this)}}])}(dr.ParserRuleContext),Yi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_functionname,i}return yi(e,t),fi(e,[{key:"IDENTIFIER",value:function(){return this.getToken(ki.IDENTIFIER,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterFunctionname(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitFunctionname(this)}}])}(dr.ParserRuleContext),$i=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"expression",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Ki):this.getTypedRuleContext(Ki,t)})),i.parser=t,i.ruleIndex=ki.RULE_functionarguments,i}return yi(e,t),fi(e,[{key:"enterRule",value:function(t){t instanceof Jr&&t.enterFunctionarguments(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitFunctionarguments(this)}}])}(dr.ParserRuleContext),Xi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_index,i}return yi(e,t),fi(e,[{key:"expression",value:function(){return this.getTypedRuleContext(Ki,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterIndex(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitIndex(this)}}])}(dr.ParserRuleContext),Zi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_filedecl,i}return yi(e,t),fi(e,[{key:"LPAREN",value:function(){return this.getToken(ki.LPAREN,0)}},{key:"expression",value:function(){return this.getTypedRuleContext(Ki,0)}},{key:"RPAREN",value:function(){return this.getToken(ki.RPAREN,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterFiledecl(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitFiledecl(this)}}])}(dr.ParserRuleContext),Ji=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"expression",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Ki):this.getTypedRuleContext(Ki,t)})),i.parser=t,i.ruleIndex=ki.RULE_list_,i}return yi(e,t),fi(e,[{key:"enterRule",value:function(t){t instanceof Jr&&t.enterList_(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitList_(this)}}])}(dr.ParserRuleContext),Qi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"argument",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Fi):this.getTypedRuleContext(Fi,t)})),i.parser=t,i.ruleIndex=ki.RULE_map_,i}return yi(e,t),fi(e,[{key:"LCURL",value:function(){return this.getToken(ki.LCURL,0)}},{key:"RCURL",value:function(){return this.getToken(ki.RCURL,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterMap_(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitMap_(this)}}])}(dr.ParserRuleContext),to=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_string,i}return yi(e,t),fi(e,[{key:"STRING",value:function(){return this.getToken(ki.STRING,0)}},{key:"MULTILINESTRING",value:function(){return this.getToken(ki.MULTILINESTRING,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterString(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitString(this)}}])}(dr.ParserRuleContext),eo=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_signed_number,i}return yi(e,t),fi(e,[{key:"number",value:function(){return this.getTypedRuleContext(ro,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterSigned_number(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitSigned_number(this)}}])}(dr.ParserRuleContext),no=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_operator_,i}return yi(e,t),fi(e,[{key:"STAR",value:function(){return this.getToken(ki.STAR,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterOperator_(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitOperator_(this)}}])}(dr.ParserRuleContext),ro=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"NATURAL_NUMBER",(function(t){return void 0===t&&(t=null),null===t?this.getTokens(ki.NATURAL_NUMBER):this.getToken(ki.NATURAL_NUMBER,t)})),i.parser=t,i.ruleIndex=ki.RULE_number,i}return yi(e,t),fi(e,[{key:"DOT",value:function(){return this.getToken(ki.DOT,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterNumber(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitNumber(this)}}])}(dr.ParserRuleContext);function io(t){return io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},io(t)}function oo(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[]).filter((function(e){return t.isParsable(e)})).reduce((function(t,e){var n=e.path.split("/").slice(0,-1).join("/");return t.includes(n)||t.push(n),t}),[])}},{key:"parse",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.pluginData.components=[],this.pluginData.variables=[],this.pluginData.parseLogs=[];var i=null!=t&&t.path&&0!==t.path.length?"".concat(t.path,"/"):"",o=new RegExp("^".concat(i,"[^/]+\\.tf$")),s=new Jr(this.pluginData);n.filter((function(t){var e=t.path;return o.test(e)})).filter((function(t){var n=t.content,i=t.path;return!(!n||""===n.trim())||(e.pluginData.emitEvent({parent:r,type:"Parser",action:"read",status:"warning",files:[i],data:{code:"no_content",global:!1}}),!1)})).forEach((function(t){var n=e.pluginData.emitEvent({parent:r,type:"Parser",action:"read",status:"running",files:[t.path],data:{global:!1}});s.currentFile=t;var i=new dr.InputStream(t.content),o=new ci(i),a=new dr.CommonTokenStream(o),c=new ki(a),u=new fo(e.pluginData,t);c.removeErrorListeners(),c.addErrorListener(u),c.buildParseTrees=!0;var l=c.file_();dr.tree.ParseTreeWalker.DEFAULT.walk(s,l),e.pluginData.emitEvent({id:n,status:"success"})}))}}])}(t.DefaultParser);const xo=wo;var ko=n(326),To=n.n(ko);const So={root:"".concat("{% macro displayAttributeValue(attribute, value, level) %}\n{% if attribute.isVariable %}{{ value | dump | indent(level * 4, true) }},\n{% elif attribute.definition.type == 'Link' %}{{ attribute.definition.linkRef | indent(level * 4, true) }}.{{ getExternalId(value) }}.{{attribute.definition.linkAttribute}},\n{% elif isValueReference(value) %}{{ value | indent(level * 4, true) }},\n{% else %}{{ value | dump | indent(level * 4, true) }},\n{% endif %}\n{% endmacro %}\n",'{% include "local" ignore missing %}\n{% include "block" ignore missing %}\n{% include "variable" ignore missing %}\n{% include "output" ignore missing %}\n'),block:"{% for _block in components %}\n{{ _block.definition.blockType }} {% if ['resource','data'].includes(_block.definition.blockType) %}\"{{ _block.definition.type }}\" {% endif %}{% if ['provider', 'module'].includes(_block.definition.blockType) %}\"{{ _block.definition.type }}\"{% else %}\"{{ _block.externalId }}\"{% endif %} {\n{% for attribute in _block.attributes %}{% set level = 1 %}\n{% include \"attribute\" ignore missing %}\n{% endfor %}\n}\n\n{% endfor %}",attribute:"{% if attribute.type == 'Object' %}\n{{ attribute.name | indent(level * 4, true) }} {% if not attribute.isDynamic %}= {% endif %}{\n{% set level = level+1 %}{% for attr in attribute.value %}{% set attribute = attr %}\n{% include \"attribute\" ignore missing %}\n{% set attribute = attr %}\n{% endfor %}{% set level = level-1 %}\n{{ \"}\" | indent(level * 4, true) }}\n{% else %}\n{{ attribute.name | indent(level * 4, true) }} = {% if attribute.type == 'Array' or attribute.type == 'Link' %}[\n{% set level = level+1 %}{% for value in attribute.value %}\n{% call displayAttributeValue(attribute, value, level) -%}{%- endcall %}\n{% endfor %}{% set level = level-1 %}\n{{ \"]\" | indent(level * 4, true) }}\n{% else %}\n{% if attribute.isVariable %}{{ attribute.value }}\n{% elif attribute.definition.type == 'Reference' %}{{ attribute.definition.containerRef }}.{{ getExternalId(attribute.value) }}\n{% elif attribute.type == 'Boolean' or attribute.type == 'Number' or attribute.name == 'user_data' %}{{ attribute.value }}\n{% elif attribute.type == 'String' and isValueReference(attribute.value) %}{{ attribute.value }}\n{% else %}{{ attribute.value | dump }}\n{% endif %}\n{% endif %}\n{% endif %}\n",variable:'{% for variable in variables %}\nvariable {{ variable.name | dump }} {\n{% set level = 1 %}\n{% if variable.defaultValue %}{{ "default" | indent(level * 4, true) }} = {% if isList(variable.type) %}[\n{% set level = level+1 %}{% for val in variable.defaultValue %}\n{{ val | dump | indent(level * 4, true) }},\n{% endfor %}\n{% set level = level-1 %}{{ "]" | indent(level * 4, true) }}\n{% else %}{{ variable.defaultValue | dump }}\n{% endif %}\n{% endif %}\n{% if variable.type %}{{ "type" | indent(level * 4, true) }} = {{ variable.type }}\n{% endif %}\n{% if variable.description %}{{ "description" | indent(level * 4, true) }} = {{ variable.description | dump }}\n{% endif %}\n{% if variable.sensitive %}{{ "sensitive" | indent(level * 4, true) }} = {{ variable.sensitive }}\n{% endif %}\n{% if variable.nullable %}{{ "nullable" | indent(level * 4, true) }} = {{ variable.nullable }}\n{% endif %}\n}\n\n{% endfor %}\n',output:'{% for output in outputs %}\noutput {{ output.name | dump }} {\n{% set level = 1 %}\n{% if isList(output.type) %}\n{{ "value = [" | indent(level * 4, true) }}\n{% for val in output.value %}\n{% set level = level+1 %}\n{% set argType = getListType(output.type) %}\n{% if argType == \'number\' or argType == \'bool\' or isValueReference(val) %}\n{{ val | dump | indent(level * 4, true) }},\n{% else %}\n{{ val | dump | indent(level * 4, true) }},\n{% endif %}\n{% set level = level-1 %}\n{% endfor %}{{ "]" | indent(level * 4, true) }}\n{% else %}\n{{ "value = " | indent(level * 4, true) }}{% if output.type == \'number\' or output.type == \'bool\' or isValueReference(output.value) %}\n{{ output.value }}\n{% else %}\n{{ output.value | dump }}\n{% endif %}\n{% endif %}\n{% if output.description %}{{ "description" | indent(level * 4, true) }} = {{ output.description | dump }}\n{% endif %}\n{% if output.sensitive %}{{ "sensitive" | indent(level * 4, true) }} = {{ output.sensitive }}\n{% endif %}\n}\n\n{% endfor %}\n',local:'{% if locals.length > 0 %}\nlocals {\n{% set level = 1 %}\n{% for local in locals %}\n{% if local.value %}{{ local.name | indent(level * 4, true) }} = {% if isList(local.type) %}[\n{% set level = level+1 %}{% for val in local.value %}\n{{ val | dump | indent(level * 4, true) }},\n{% endfor %}\n{% set level = level-1 %}{{ "]" | indent(level * 4, true) }}\n{% else %}{{ local.value | dump }}\n{% endif %}\n{% endif %}\n{% endfor %}{% set level = level-1 %}\n{% set level = 0 %}}\n\n{% endif %}\n'};function Eo(t){return Eo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eo(t)}function Ao(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null,e=this.pluginData.components.reduce((function(t,e){return t.has(e.path)?t.get(e.path).push(e):t.set(e.path,[e]),t}),new Map),n=this.pluginData.variables.reduce((function(t,e){return t.has(e.path)?t.get(e.path).push(e):t.set(e.path,[e]),t}),new Map);return this.generateFiles(e,n,t)}},{key:"generateFiles",value:function(e,n,r){var i=this,o=[];return(0===e.size?n:e).forEach((function(s,a){var c=i.pluginData.emitEvent({parent:r,type:"Render",action:"write",status:"running",files:[a],data:{global:!1}}),u=(null==n?void 0:n.get(a))||[],l=(null==e?void 0:e.get(a))||[];o.push(new t.FileInput({path:a,content:"".concat(i.template.render({components:l,variables:u.filter((function(t){return"variable"===t.category})),locals:u.filter((function(t){return"local"===t.category})),outputs:u.filter((function(t){return"output"===t.category})),getExternalId:function(t){var e;return null===(e=i.pluginData.getComponentById(t))||void 0===e?void 0:e.externalId},isValueReference:function(t){return null==t?void 0:t.match(/^(data.|var.|local.|module.|aws_|random_)/)},isList:function(t){return(null==t?void 0:t.startsWith("list("))||(null==t?void 0:t.startsWith("set("))},getListType:function(t){return t.split(/\(([^)]+)\)/)[1]}}).trim(),"\n")})),i.pluginData.emitEvent({id:c,status:"success"})})),o}}])}(t.DefaultRender);const Io=Po,Mo={name:"terraform",languageSettings:{id:"terraform",extensions:[".tf"],aliases:["Terraform","terraform"],mimetypes:["string"]},languageConfiguration:{comments:{lineComment:"#",blockComment:["/*","*/"]},brackets:[["(",")"],["{","}"],["[","]"]],colorizedBracketPairs:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"(",close:")"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"'",close:"'",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:'"',close:'"'}]},tokenProvider:{keywords:["provider","resource","data","variable","output","locals","module","for_each","if","else","true","false","null"],operators:["+","+=","-","-=","*","*=","/","/=","%","%=","==","!=","<","<=",">",">=","=","||","&&","!"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d*\.\d+([eE][-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],comment:[[/[^/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"],[/#.*$/,"comment"]]}}};function Do(t){return Do="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Do(t)}function jo(t,e,n){return e=Fo(e),function(t,e){if(e&&("object"==Do(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Bo()?Reflect.construct(e,n||[],Fo(t).constructor):e.apply(t,n))}function Bo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Bo=function(){return!!t})()}function Fo(t){return Fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fo(t)}function Uo(t,e){return Uo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Uo(t,e)}var zo=function(e){function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),jo(this,n,[{editor:{syntax:Mo},tags:[new t.Tag({type:"language",value:"Terraform"}),new t.Tag({type:"category",value:"Infrastructure"})],extraResources:[{type:"markers",name:"startLinkMarker"},{type:"markers",name:"endLinkMarker"},{type:"links",name:"defaultLink"},{type:"links",name:"temporaryLink"},{type:"icons",name:"error"},{type:"icons",name:"menu"},{type:"icons",name:"resize"},{type:"icons",name:"unknown"}],container:{margin:15,gap:50},defaultFileName:"new_file.tf",defaultFileExtension:"tf",i18n:{"en-US":{parser:{error:{noExternalId:"Id can't be null."}}}}}])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Uo(t,e)}(n,e),function(t){return Object.defineProperty(t,"prototype",{writable:!1}),t}(n)}(t.DefaultConfiguration);const Vo=zo;function Ko(t){return Ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ko(t)}function Ho(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n0&&void 0!==arguments[0]?arguments[0]:{event:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=new Vo,r=new Jo(n,{name:ws.UU,version:ws.rE},t.event);return ks(this,e,[{pluginData:r,pluginDrawer:new _s(r),pluginMetadata:new _t(r),pluginParser:new xo(r),pluginRenderer:new Io(r),configuration:n}])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Es(t,e)}(e,t),function(t){return Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(t.DefaultPlugin);const Os=As})();var i=exports;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})(); \ No newline at end of file +(()=>{var t={149:(t,e)=>{(()=>{var t={326:function(t){var e;"undefined"!=typeof self&&self,e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=11)}([function(t,e,n){"use strict";var r=Array.prototype,i=Object.prototype,o={"&":"&",'"':""","'":"'","<":"<",">":">","\\":"\"},s=/[&"'<>\\]/g;function a(t,e){return i.hasOwnProperty.call(t,e)}function c(t){return o[t]}function u(t,e,n){var r,i,o;if(t instanceof Error&&(t=(i=t).name+": "+i.message),Object.setPrototypeOf?(r=new Error(t),Object.setPrototypeOf(r,u.prototype)):(r=this,Object.defineProperty(r,"message",{enumerable:!1,writable:!0,value:t})),Object.defineProperty(r,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(r,this.constructor),i){var s=Object.getOwnPropertyDescriptor(i,"stack");(o=s&&(s.get||function(){return s.value}))||(o=function(){return i.stack})}else{var a=new Error(t).stack;o=function(){return a}}return Object.defineProperty(r,"stack",{get:function(){return o.call(r)}}),Object.defineProperty(r,"cause",{value:i}),r.lineno=e,r.colno=n,r.firstUpdate=!0,r.Update=function(t){var e="("+(t||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?e+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(e+=" [Line "+this.lineno+"]")),e+="\n ",this.firstUpdate&&(e+=" "),this.message=e+(this.message||""),this.firstUpdate=!1,this},r}function l(t){return"[object Function]"===i.toString.call(t)}function h(t){return"[object Array]"===i.toString.call(t)}function f(t){return"[object String]"===i.toString.call(t)}function p(t){return"[object Object]"===i.toString.call(t)}function d(t){var e,n=(e=t)?"string"==typeof e?e.split("."):[e]:[];return function(t){for(var e=t,r=0;rt.length)s=i.slice(0,t.length),i.slice(s.length,u).forEach((function(t,n){n2?i-2:0),s=2;s0||!n)&&process.stdout.write(" ".repeat(e));var o=i===r.length-1?"":"\n";process.stdout.write(""+t+o)}))}t.exports={Node:c,Root:h,NodeList:l,Value:u,Literal:f,Symbol:p,Group:d,Array:m,Pair:y,Dict:g,Output:U,Capture:z,TemplateData:V,If:b,IfAsync:_,InlineIf:w,For:x,AsyncEach:k,AsyncAll:T,Macro:S,Caller:E,Import:A,FromImport:O,FunCall:N,Filter:C,FilterAsync:L,KeywordArgs:R,Block:P,Super:I,Extends:M,Include:D,Set:j,Switch:B,Case:F,LookupVal:v,BinOp:H,In:q,Is:W,Or:G,And:Y,Not:$,Add:X,Concat:Z,Sub:J,Mul:Q,Div:tt,FloorDiv:et,Mod:nt,Pow:rt,Neg:it,Pos:ot,Compare:st,CompareOperand:at,CallExtension:ct,CallExtensionAsync:ut,printNodes:function t(e,n){if(n=n||0,lt(e.typename+": ",n),e instanceof l)lt("\n"),e.children.forEach((function(e){t(e,n+2)}));else if(e instanceof ct)lt(e.extName+"."+e.prop+"\n"),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach((function(e){t(e,n+2)}));else{var r=[],i=null;e.iterFields((function(t,e){t instanceof c?r.push([e,t]):(i=i||{})[e]=t})),i?lt(JSON.stringify(i,null,2)+"\n",null,!0):lt("\n"),r.forEach((function(e){var r=e[0],i=e[1];lt("["+r+"] =>",n+2),t(i,n+4)}))}}}},function(t,e){},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var i=n(8),o=n(17),s=n(3),a=n(0).TemplateError,c=n(2).Frame,u=n(1).Obj,l={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},h=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n);var o=i.prototype;return o.init=function(t,e){this.templateName=t,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this._scopeClosers="",this.inBlock=!1,this.throwOnUndefined=e},o.fail=function(t,e,n){throw void 0!==e&&(e+=1),void 0!==n&&(n+=1),new a(t,e,n)},o._pushBuffer=function(){var t=this._tmpid();return this.bufferStack.push(this.buffer),this.buffer=t,this._emit("var "+this.buffer+' = "";'),t},o._popBuffer=function(){this.buffer=this.bufferStack.pop()},o._emit=function(t){this.codebuf.push(t)},o._emitLine=function(t){this._emit(t+"\n")},o._emitLines=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r0&&i._emit(","),i.compile(t,e)})),r&&this._emit(r)},o._compileExpression=function(t,e){this.assertType(t,s.Literal,s.Symbol,s.Group,s.Array,s.Dict,s.FunCall,s.Caller,s.Filter,s.LookupVal,s.Compare,s.InlineIf,s.In,s.Is,s.And,s.Or,s.Not,s.Add,s.Concat,s.Sub,s.Mul,s.Div,s.FloorDiv,s.Mod,s.Pow,s.Neg,s.Pos,s.Compare,s.NodeList),this.compile(t,e)},o.assertType=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r0&&r._emit(","),t){r._emitLine("function(cb) {"),r._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");var i=r._pushBuffer();r._withScopedSyntax((function(){r.compile(t,e),r._emitLine("cb(null, "+i+");")})),r._popBuffer(),r._emitLine("return "+i+";"),r._emitLine("}")}else r._emit("null")})),n){var c=this._tmpid();this._emitLine(", "+this._makeCallback(c)),this._emitLine(this.buffer+" += runtime.suppressValue("+c+", "+a+" && env.opts.autoescape);"),this._addScopeLevel()}else this._emit(")"),this._emit(", "+a+" && env.opts.autoescape);\n")},o.compileCallExtensionAsync=function(t,e){this.compileCallExtension(t,e,!0)},o.compileNodeList=function(t,e){this._compileChildren(t,e)},o.compileLiteral=function(t){if("string"==typeof t.value){var e=t.value.replace(/\\/g,"\\\\");e=(e=(e=(e=(e=e.replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+e+'"')}else null===t.value?this._emit("null"):this._emit(t.value.toString())},o.compileSymbol=function(t,e){var n=t.value,r=e.lookup(n);r?this._emit(r):this._emit('runtime.contextOrFrameLookup(context, frame, "'+n+'")')},o.compileGroup=function(t,e){this._compileAggregate(t,e,"(",")")},o.compileArray=function(t,e){this._compileAggregate(t,e,"[","]")},o.compileDict=function(t,e){this._compileAggregate(t,e,"{","}")},o.compilePair=function(t,e){var n=t.key,r=t.value;n instanceof s.Symbol?n=new s.Literal(n.lineno,n.colno,n.value):n instanceof s.Literal&&"string"==typeof n.value||this.fail("compilePair: Dict keys must be strings or names",n.lineno,n.colno),this.compile(n,e),this._emit(": "),this._compileExpression(r,e)},o.compileInlineIf=function(t,e){this._emit("("),this.compile(t.cond,e),this._emit("?"),this.compile(t.body,e),this._emit(":"),null!==t.else_?this.compile(t.else_,e):this._emit('""'),this._emit(")")},o.compileIn=function(t,e){this._emit("runtime.inOperator("),this.compile(t.left,e),this._emit(","),this.compile(t.right,e),this._emit(")")},o.compileIs=function(t,e){var n=t.right.name?t.right.name.value:t.right.value;this._emit('env.getTest("'+n+'").call(context, '),this.compile(t.left,e),t.right.args&&(this._emit(","),this.compile(t.right.args,e)),this._emit(") === true")},o._binOpEmitter=function(t,e,n){this.compile(t.left,e),this._emit(n),this.compile(t.right,e)},o.compileOr=function(t,e){return this._binOpEmitter(t,e," || ")},o.compileAnd=function(t,e){return this._binOpEmitter(t,e," && ")},o.compileAdd=function(t,e){return this._binOpEmitter(t,e," + ")},o.compileConcat=function(t,e){return this._binOpEmitter(t,e,' + "" + ')},o.compileSub=function(t,e){return this._binOpEmitter(t,e," - ")},o.compileMul=function(t,e){return this._binOpEmitter(t,e," * ")},o.compileDiv=function(t,e){return this._binOpEmitter(t,e," / ")},o.compileMod=function(t,e){return this._binOpEmitter(t,e," % ")},o.compileNot=function(t,e){this._emit("!"),this.compile(t.target,e)},o.compileFloorDiv=function(t,e){this._emit("Math.floor("),this.compile(t.left,e),this._emit(" / "),this.compile(t.right,e),this._emit(")")},o.compilePow=function(t,e){this._emit("Math.pow("),this.compile(t.left,e),this._emit(", "),this.compile(t.right,e),this._emit(")")},o.compileNeg=function(t,e){this._emit("-"),this.compile(t.target,e)},o.compilePos=function(t,e){this._emit("+"),this.compile(t.target,e)},o.compileCompare=function(t,e){var n=this;this.compile(t.expr,e),t.ops.forEach((function(t){n._emit(" "+l[t.type]+" "),n.compile(t.expr,e)}))},o.compileLookupVal=function(t,e){this._emit("runtime.memberLookup(("),this._compileExpression(t.target,e),this._emit("),"),this._compileExpression(t.val,e),this._emit(")")},o._getNodeName=function(t){switch(t.typename){case"Symbol":return t.value;case"FunCall":return"the return value of ("+this._getNodeName(t.name)+")";case"LookupVal":return this._getNodeName(t.target)+'["'+this._getNodeName(t.val)+'"]';case"Literal":return t.value.toString();default:return"--expression--"}},o.compileFunCall=function(t,e){this._emit("(lineno = "+t.lineno+", colno = "+t.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(t.name,e),this._emit(', "'+this._getNodeName(t.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(t.args,e,"[","])"),this._emit(")")},o.compileFilter=function(t,e){var n=t.name;this.assertType(n,s.Symbol),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(t.args,e),this._emit(")")},o.compileFilterAsync=function(t,e){var n=t.name,r=t.symbol.value;this.assertType(n,s.Symbol),e.set(r,r),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(t.args,e),this._emitLine(", "+this._makeCallback(r)),this._addScopeLevel()},o.compileKeywordArgs=function(t,e){this._emit("runtime.makeKeywordArgs("),this.compileDict(t,e),this._emit(")")},o.compileSet=function(t,e){var n=this,r=[];t.targets.forEach((function(t){var i=t.value,o=e.lookup(i);null==o&&(o=n._tmpid(),n._emitLine("var "+o+";")),r.push(o)})),t.value?(this._emit(r.join(" = ")+" = "),this._compileExpression(t.value,e),this._emitLine(";")):(this._emit(r.join(" = ")+" = "),this.compile(t.body,e),this._emitLine(";")),t.targets.forEach((function(t,e){var i=r[e],o=t.value;n._emitLine('frame.set("'+o+'", '+i+", true);"),n._emitLine("if(frame.topLevel) {"),n._emitLine('context.setVariable("'+o+'", '+i+");"),n._emitLine("}"),"_"!==o.charAt(0)&&(n._emitLine("if(frame.topLevel) {"),n._emitLine('context.addExport("'+o+'", '+i+");"),n._emitLine("}"))}))},o.compileSwitch=function(t,e){var n=this;this._emit("switch ("),this.compile(t.expr,e),this._emit(") {"),t.cases.forEach((function(t,r){n._emit("case "),n.compile(t.cond,e),n._emit(": "),n.compile(t.body,e),t.body.children.length&&n._emitLine("break;")})),t.default&&(this._emit("default:"),this.compile(t.default,e)),this._emit("}")},o.compileIf=function(t,e,n){var r=this;this._emit("if("),this._compileExpression(t.cond,e),this._emitLine(") {"),this._withScopedSyntax((function(){r.compile(t.body,e),n&&r._emit("cb()")})),t.else_?(this._emitLine("}\nelse {"),this._withScopedSyntax((function(){r.compile(t.else_,e),n&&r._emit("cb()")}))):n&&(this._emitLine("}\nelse {"),this._emit("cb()")),this._emitLine("}")},o.compileIfAsync=function(t,e){this._emit("(function(cb) {"),this.compileIf(t,e,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},o._emitLoopBindings=function(t,e,n,r){var i=this;[{name:"index",val:n+" + 1"},{name:"index0",val:n},{name:"revindex",val:r+" - "+n},{name:"revindex0",val:r+" - "+n+" - 1"},{name:"first",val:n+" === 0"},{name:"last",val:n+" === "+r+" - 1"},{name:"length",val:r}].forEach((function(t){i._emitLine('frame.set("loop.'+t.name+'", '+t.val+");")}))},o.compileFor=function(t,e){var n=this,r=this._tmpid(),i=this._tmpid(),o=this._tmpid();if(e=e.push(),this._emitLine("frame = frame.push();"),this._emit("var "+o+" = "),this._compileExpression(t.arr,e),this._emitLine(";"),this._emit("if("+o+") {"),this._emitLine(o+" = runtime.fromIterator("+o+");"),t.name instanceof s.Array){this._emitLine("var "+r+";"),this._emitLine("if(runtime.isArray("+o+")) {"),this._emitLine("var "+i+" = "+o+".length;"),this._emitLine("for("+r+"=0; "+r+" < "+o+".length; "+r+"++) {"),t.name.children.forEach((function(i,s){var a=n._tmpid();n._emitLine("var "+a+" = "+o+"["+r+"]["+s+"];"),n._emitLine('frame.set("'+i+'", '+o+"["+r+"]["+s+"]);"),e.set(t.name.children[s].value,a)})),this._emitLoopBindings(t,o,r,i),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("}"),this._emitLine("} else {");var a=t.name.children,c=a[0],u=a[1],l=this._tmpid(),h=this._tmpid();e.set(c.value,l),e.set(u.value,h),this._emitLine(r+" = -1;"),this._emitLine("var "+i+" = runtime.keys("+o+").length;"),this._emitLine("for(var "+l+" in "+o+") {"),this._emitLine(r+"++;"),this._emitLine("var "+h+" = "+o+"["+l+"];"),this._emitLine('frame.set("'+c.value+'", '+l+");"),this._emitLine('frame.set("'+u.value+'", '+h+");"),this._emitLoopBindings(t,o,r,i),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("}"),this._emitLine("}")}else{var f=this._tmpid();e.set(t.name.value,f),this._emitLine("var "+i+" = "+o+".length;"),this._emitLine("for(var "+r+"=0; "+r+" < "+o+".length; "+r+"++) {"),this._emitLine("var "+f+" = "+o+"["+r+"];"),this._emitLine('frame.set("'+t.name.value+'", '+f+");"),this._emitLoopBindings(t,o,r,i),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("}")}this._emitLine("}"),t.else_&&(this._emitLine("if (!"+i+") {"),this.compile(t.else_,e),this._emitLine("}")),this._emitLine("frame = frame.pop();")},o._compileAsyncLoop=function(t,e,n){var r=this,i=this._tmpid(),o=this._tmpid(),a=this._tmpid(),c=n?"asyncAll":"asyncEach";if(e=e.push(),this._emitLine("frame = frame.push();"),this._emit("var "+a+" = runtime.fromIterator("),this._compileExpression(t.arr,e),this._emitLine(");"),t.name instanceof s.Array){var u=t.name.children.length;this._emit("runtime."+c+"("+a+", "+u+", function("),t.name.children.forEach((function(t){r._emit(t.value+",")})),this._emit(i+","+o+",next) {"),t.name.children.forEach((function(t){var n=t.value;e.set(n,n),r._emitLine('frame.set("'+n+'", '+n+");")}))}else{var l=t.name.value;this._emitLine("runtime."+c+"("+a+", 1, function("+l+", "+i+", "+o+",next) {"),this._emitLine('frame.set("'+l+'", '+l+");"),e.set(l,l)}this._emitLoopBindings(t,a,i,o),this._withScopedSyntax((function(){var o;n&&(o=r._pushBuffer()),r.compile(t.body,e),r._emitLine("next("+i+(o?","+o:"")+");"),n&&r._popBuffer()}));var h=this._tmpid();this._emitLine("}, "+this._makeCallback(h)),this._addScopeLevel(),n&&this._emitLine(this.buffer+" += "+h+";"),t.else_&&(this._emitLine("if (!"+a+".length) {"),this.compile(t.else_,e),this._emitLine("}")),this._emitLine("frame = frame.pop();")},o.compileAsyncEach=function(t,e){this._compileAsyncLoop(t,e)},o.compileAsyncAll=function(t,e){this._compileAsyncLoop(t,e,!0)},o._compileMacro=function(t,e){var n=this,r=[],i=null,o="macro_"+this._tmpid(),a=void 0!==e;t.args.children.forEach((function(e,o){o===t.args.children.length-1&&e instanceof s.Dict?i=e:(n.assertType(e,s.Symbol),r.push(e))}));var u,l=[].concat(r.map((function(t){return"l_"+t.value})),["kwargs"]),h=r.map((function(t){return'"'+t.value+'"'})),f=(i&&i.children||[]).map((function(t){return'"'+t.key.value+'"'}));u=a?e.push(!0):new c,this._emitLines("var "+o+" = runtime.makeMacro(","["+h.join(", ")+"], ","["+f.join(", ")+"], ","function ("+l.join(", ")+") {","var callerFrame = frame;","frame = "+(a?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),r.forEach((function(t){n._emitLine('frame.set("'+t.value+'", l_'+t.value+");"),u.set(t.value,"l_"+t.value)})),i&&i.children.forEach((function(t){var e=t.key.value;n._emit('frame.set("'+e+'", '),n._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+e+'")'),n._emit(' ? kwargs["'+e+'"] : '),n._compileExpression(t.value,u),n._emit(");")}));var p=this._pushBuffer();return this._withScopedSyntax((function(){n.compile(t.body,u)})),this._emitLine("frame = "+(a?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+p+");"),this._emitLine("});"),this._popBuffer(),o},o.compileMacro=function(t,e){var n=this._compileMacro(t),r=t.name.value;e.set(r,n),e.parent?this._emitLine('frame.set("'+r+'", '+n+");"):("_"!==t.name.value.charAt(0)&&this._emitLine('context.addExport("'+r+'");'),this._emitLine('context.setVariable("'+r+'", '+n+");"))},o.compileCaller=function(t,e){this._emit("(function (){");var n=this._compileMacro(t,e);this._emit("return "+n+";})()")},o._compileGetTemplate=function(t,e,n,r){var i=this._tmpid(),o=this._templateName(),s=this._makeCallback(i),a=n?"true":"false",c=r?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(t.template,e),this._emitLine(", "+a+", "+o+", "+c+", "+s),i},o.compileImport=function(t,e){var n=t.target.value,r=this._compileGetTemplate(t,e,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(t.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),e.set(n,r),e.parent?this._emitLine('frame.set("'+n+'", '+r+");"):this._emitLine('context.setVariable("'+n+'", '+r+");")},o.compileFromImport=function(t,e){var n=this,r=this._compileGetTemplate(t,e,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(t.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),t.names.children.forEach((function(t){var i,o,a=n._tmpid();t instanceof s.Pair?(i=t.key.value,o=t.value.value):o=i=t.value,n._emitLine("if(Object.prototype.hasOwnProperty.call("+r+', "'+i+'")) {'),n._emitLine("var "+a+" = "+r+"."+i+";"),n._emitLine("} else {"),n._emitLine("cb(new Error(\"cannot import '"+i+"'\")); return;"),n._emitLine("}"),e.set(o,a),e.parent?n._emitLine('frame.set("'+o+'", '+a+");"):n._emitLine('context.setVariable("'+o+'", '+a+");")}))},o.compileBlock=function(t){var e=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+t.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(e)),this._emitLine(this.buffer+" += "+e+";"),this._addScopeLevel()},o.compileSuper=function(t,e){var n=t.blockName.value,r=t.symbol.value,i=this._makeCallback(r);this._emitLine('context.getSuper(env, "'+n+'", b_'+n+", frame, runtime, "+i),this._emitLine(r+" = runtime.markSafe("+r+");"),this._addScopeLevel(),e.set(r,r)},o.compileExtends=function(t,e){var n=this._tmpid(),r=this._compileGetTemplate(t,e,!0,!1);this._emitLine("parentTemplate = "+r),this._emitLine("for(var "+n+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+n+", parentTemplate.blocks["+n+"]);"),this._emitLine("}"),this._addScopeLevel()},o.compileInclude=function(t,e){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {");var n=this._compileGetTemplate(t,e,!1,t.ignoreMissing);this._emitLine("callback(null,"+n+");});"),this._emitLine("});");var r=this._tmpid();this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(r)),this._emitLine("callback(null,"+r+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel()},o.compileTemplateData=function(t,e){this.compileLiteral(t,e)},o.compileCapture=function(t,e){var n=this,r=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=r},o.compileOutput=function(t,e){var n=this;t.children.forEach((function(r){r instanceof s.TemplateData?r.value&&(n._emit(n.buffer+" += "),n.compileLiteral(r,e),n._emitLine(";")):(n._emit(n.buffer+" += runtime.suppressValue("),n.throwOnUndefined&&n._emit("runtime.ensureDefined("),n.compile(r,e),n.throwOnUndefined&&n._emit(","+t.lineno+","+t.colno+")"),n._emit(", env.opts.autoescape);\n"))}))},o.compileRoot=function(t,e){var n=this;e&&this.fail("compileRoot: root node can't have frame"),e=new c,this._emitFuncBegin(t,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(t,e),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0;var r=[],i=t.findAll(s.Block);i.forEach((function(t,e){var i=t.name.value;if(-1!==r.indexOf(i))throw new Error('Block "'+i+'" defined more than once.');r.push(i),n._emitFuncBegin(t,"b_"+i);var o=new c;n._emitLine("var frame = frame.push(true);"),n.compile(t.body,o),n._emitFuncEnd()})),this._emitLine("return {"),i.forEach((function(t,e){var r="b_"+t.name.value;n._emitLine(r+": "+r+",")})),this._emitLine("root: root\n};")},o.compile=function(t,e){var n=this["compile"+t.typename];n?n.call(this,t,e):this.fail("compile: Cannot compile node: "+t.typename,t.lineno,t.colno)},o.getCode=function(){return this.codebuf.join("")},i}(u);t.exports={compile:function(t,e,n,r,s){void 0===s&&(s={});var a=new h(r,s.throwOnUndefined),c=(n||[]).map((function(t){return t.preprocess})).filter((function(t){return!!t})).reduce((function(t,e){return e(t)}),t);return a.compile(o.transform(i.parse(c,n,s),e,r)),a.getCode()},Compiler:h}},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var i=n(4),o=n(1).EmitterObj;t.exports=function(t){var e,n;function o(){return t.apply(this,arguments)||this}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n);var s=o.prototype;return s.resolve=function(t,e){return i.resolve(i.dirname(t),e)},s.isRelative=function(t){return 0===t.indexOf("./")||0===t.indexOf("../")},o}(o)},function(t,e,n){"use strict";function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,i(t,e)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}var o=n(12),s=n(15),a=n(0),c=n(5),u=n(18),l=n(10),h=l.FileSystemLoader,f=l.WebLoader,p=l.PrecompiledLoader,d=n(20),m=n(21),y=n(1),g=y.Obj,v=y.EmitterObj,b=n(2),_=b.handleError,w=b.Frame,x=n(22);function k(t,e,n){o((function(){t(e,n)}))}var T={type:"code",obj:{root:function(t,e,n,r,i){try{i(null,"")}catch(t){i(_(t,null,null))}}}},S=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var n=e.prototype;return n.init=function(t,e){var n=this;e=this.opts=e||{},this.opts.dev=!!e.dev,this.opts.autoescape=null==e.autoescape||e.autoescape,this.opts.throwOnUndefined=!!e.throwOnUndefined,this.opts.trimBlocks=!!e.trimBlocks,this.opts.lstripBlocks=!!e.lstripBlocks,this.loaders=[],t?this.loaders=a.isArray(t)?t:[t]:h?this.loaders=[new h("views")]:f&&(this.loaders=[new f("/views")]),"undefined"!=typeof window&&window.nunjucksPrecompiled&&this.loaders.unshift(new p(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=m(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],a._entries(u).forEach((function(t){var e=t[0],r=t[1];return n.addFilter(e,r)})),a._entries(d).forEach((function(t){var e=t[0],r=t[1];return n.addTest(e,r)}))},n._initLoaders=function(){var t=this;this.loaders.forEach((function(e){e.cache={},"function"==typeof e.on&&(e.on("update",(function(n,r){e.cache[n]=null,t.emit("update",n,r,e)})),e.on("load",(function(n,r){t.emit("load",n,r,e)})))}))},n.invalidateCache=function(){this.loaders.forEach((function(t){t.cache={}}))},n.addExtension=function(t,e){return e.__name=t,this.extensions[t]=e,this.extensionsList.push(e),this},n.removeExtension=function(t){var e=this.getExtension(t);e&&(this.extensionsList=a.without(this.extensionsList,e),delete this.extensions[t])},n.getExtension=function(t){return this.extensions[t]},n.hasExtension=function(t){return!!this.extensions[t]},n.addGlobal=function(t,e){return this.globals[t]=e,this},n.getGlobal=function(t){if(void 0===this.globals[t])throw new Error("global not found: "+t);return this.globals[t]},n.addFilter=function(t,e,n){var r=e;return n&&this.asyncFilters.push(t),this.filters[t]=r,this},n.getFilter=function(t){if(!this.filters[t])throw new Error("filter not found: "+t);return this.filters[t]},n.addTest=function(t,e){return this.tests[t]=e,this},n.getTest=function(t){if(!this.tests[t])throw new Error("test not found: "+t);return this.tests[t]},n.resolveTemplate=function(t,e,n){return t.isRelative&&e&&t.isRelative(n)&&t.resolve?t.resolve(e,n):n},n.getTemplate=function(t,e,n,r,i){var o,s=this,c=this,u=null;if(t&&t.raw&&(t=t.raw),a.isFunction(n)&&(i=n,n=null,e=e||!1),a.isFunction(e)&&(i=e,e=!1),t instanceof A)u=t;else{if("string"!=typeof t)throw new Error("template names must be a string: "+t);for(var l=0;l0&&!this.skip(i.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",t.lineno,t.colno);var a=this.parsePrimary();if("_"===a.value.charAt(0)&&this.fail("parseFrom: names starting with an underscore cannot be imported",a.lineno,a.colno),this.skipSymbol("as")){var c=this.parsePrimary();r.addChild(new o.Pair(a.lineno,a.colno,a,c))}else r.addChild(a);n=this.parseWithContext()}return new o.FromImport(t.lineno,t.colno,e,r,n)},c.parseBlock=function(){var t=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",t.lineno,t.colno);var e=new o.Block(t.lineno,t.colno);e.name=this.parsePrimary(),e.name instanceof o.Symbol||this.fail("parseBlock: variable name expected",t.lineno,t.colno),this.advanceAfterBlockEnd(t.value),e.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(e.name.value);var n=this.peekToken();return n||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(n.value),e},c.parseExtends=function(){var t="extends",e=this.peekToken();this.skipSymbol(t)||this.fail("parseTemplateRef: expected "+t);var n=new o.Extends(e.lineno,e.colno);return n.template=this.parseExpression(),this.advanceAfterBlockEnd(e.value),n},c.parseInclude=function(){var t="include",e=this.peekToken();this.skipSymbol(t)||this.fail("parseInclude: expected "+t);var n=new o.Include(e.lineno,e.colno);return n.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(n.ignoreMissing=!0),this.advanceAfterBlockEnd(e.value),n},c.parseIf=function(){var t,e=this.peekToken();this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?t=new o.If(e.lineno,e.colno):this.skipSymbol("ifAsync")?t=new o.IfAsync(e.lineno,e.colno):this.fail("parseIf: expected if, elif, or elseif",e.lineno,e.colno),t.cond=this.parseExpression(),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("elif","elseif","else","endif");var n=this.peekToken();switch(n&&n.value){case"elseif":case"elif":t.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),t.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":t.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return t},c.parseSet=function(){var t=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",t.lineno,t.colno);for(var e,n=new o.Set(t.lineno,t.colno,[]);(e=this.parsePrimary())&&(n.targets.push(e),this.skip(i.TOKEN_COMMA)););return this.skipValue(i.TOKEN_OPERATOR,"=")?(n.value=this.parseExpression(),this.advanceAfterBlockEnd(t.value)):this.skip(i.TOKEN_BLOCK_END)?(n.body=new o.Capture(t.lineno,t.colno,this.parseUntilBlocks("endset")),n.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",t.lineno,t.colno),n},c.parseSwitch=function(){var t="switch",e="endswitch",n="case",r="default",i=this.peekToken();this.skipSymbol(t)||this.skipSymbol(n)||this.skipSymbol(r)||this.fail('parseSwitch: expected "switch," "case" or "default"',i.lineno,i.colno);var s=this.parseExpression();this.advanceAfterBlockEnd(t),this.parseUntilBlocks(n,r,e);var a,c=this.peekToken(),u=[];do{this.skipSymbol(n);var l=this.parseExpression();this.advanceAfterBlockEnd(t);var h=this.parseUntilBlocks(n,r,e);u.push(new o.Case(c.line,c.col,l,h)),c=this.peekToken()}while(c&&c.value===n);switch(c.value){case r:this.advanceAfterBlockEnd(),a=this.parseUntilBlocks(e),this.advanceAfterBlockEnd();break;case e:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new o.Switch(i.lineno,i.colno,s,u,a)},c.parseStatement=function(){var t=this.peekToken();if(t.type!==i.TOKEN_SYMBOL&&this.fail("tag name expected",t.lineno,t.colno),this.breakOnBlocks&&-1!==a.indexOf(this.breakOnBlocks,t.value))return null;switch(t.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var e=0;e0;){var c=s[0],u=s[1],l=s[2];l===t?r+=1:l===e&&(r-=1),0===r?(i+=u,this.tokens.backN(c.length-u.length)):i+=c}return new o.Output(a.lineno,a.colno,[new o.TemplateData(a.lineno,a.colno,i)])},c.parsePostfix=function(t){for(var e,n=this.peekToken();n;){if(n.type===i.TOKEN_LEFT_PAREN)t=new o.FunCall(n.lineno,n.colno,t,this.parseSignature());else if(n.type===i.TOKEN_LEFT_BRACKET)(e=this.parseAggregate()).children.length>1&&this.fail("invalid index"),t=new o.LookupVal(n.lineno,n.colno,t,e.children[0]);else{if(n.type!==i.TOKEN_OPERATOR||"."!==n.value)break;this.nextToken();var r=this.nextToken();r.type!==i.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+r.value,r.lineno,r.colno),e=new o.Literal(r.lineno,r.colno,r.value),t=new o.LookupVal(n.lineno,n.colno,t,e)}n=this.peekToken()}return t},c.parseExpression=function(){return this.parseInlineIf()},c.parseInlineIf=function(){var t=this.parseOr();if(this.skipSymbol("if")){var e=this.parseOr(),n=t;(t=new o.InlineIf(t.lineno,t.colno)).body=n,t.cond=e,this.skipSymbol("else")?t.else_=this.parseOr():t.else_=null}return t},c.parseOr=function(){for(var t=this.parseAnd();this.skipSymbol("or");){var e=this.parseAnd();t=new o.Or(t.lineno,t.colno,t,e)}return t},c.parseAnd=function(){for(var t=this.parseNot();this.skipSymbol("and");){var e=this.parseNot();t=new o.And(t.lineno,t.colno,t,e)}return t},c.parseNot=function(){var t=this.peekToken();return this.skipSymbol("not")?new o.Not(t.lineno,t.colno,this.parseNot()):this.parseIn()},c.parseIn=function(){for(var t=this.parseIs();;){var e=this.nextToken();if(!e)break;var n=e.type===i.TOKEN_SYMBOL&&"not"===e.value;if(n||this.pushToken(e),!this.skipSymbol("in")){n&&this.pushToken(e);break}var r=this.parseIs();t=new o.In(t.lineno,t.colno,t,r),n&&(t=new o.Not(t.lineno,t.colno,t))}return t},c.parseIs=function(){var t=this.parseCompare();if(this.skipSymbol("is")){var e=this.skipSymbol("not"),n=this.parseCompare();t=new o.Is(t.lineno,t.colno,t,n),e&&(t=new o.Not(t.lineno,t.colno,t))}return t},c.parseCompare=function(){for(var t=["==","===","!=","!==","<",">","<=",">="],e=this.parseConcat(),n=[];;){var r=this.nextToken();if(!r)break;if(-1===t.indexOf(r.value)){this.pushToken(r);break}n.push(new o.CompareOperand(r.lineno,r.colno,this.parseConcat(),r.value))}return n.length?new o.Compare(n[0].lineno,n[0].colno,e,n):e},c.parseConcat=function(){for(var t=this.parseAdd();this.skipValue(i.TOKEN_TILDE,"~");){var e=this.parseAdd();t=new o.Concat(t.lineno,t.colno,t,e)}return t},c.parseAdd=function(){for(var t=this.parseSub();this.skipValue(i.TOKEN_OPERATOR,"+");){var e=this.parseSub();t=new o.Add(t.lineno,t.colno,t,e)}return t},c.parseSub=function(){for(var t=this.parseMul();this.skipValue(i.TOKEN_OPERATOR,"-");){var e=this.parseMul();t=new o.Sub(t.lineno,t.colno,t,e)}return t},c.parseMul=function(){for(var t=this.parseDiv();this.skipValue(i.TOKEN_OPERATOR,"*");){var e=this.parseDiv();t=new o.Mul(t.lineno,t.colno,t,e)}return t},c.parseDiv=function(){for(var t=this.parseFloorDiv();this.skipValue(i.TOKEN_OPERATOR,"/");){var e=this.parseFloorDiv();t=new o.Div(t.lineno,t.colno,t,e)}return t},c.parseFloorDiv=function(){for(var t=this.parseMod();this.skipValue(i.TOKEN_OPERATOR,"//");){var e=this.parseMod();t=new o.FloorDiv(t.lineno,t.colno,t,e)}return t},c.parseMod=function(){for(var t=this.parsePow();this.skipValue(i.TOKEN_OPERATOR,"%");){var e=this.parsePow();t=new o.Mod(t.lineno,t.colno,t,e)}return t},c.parsePow=function(){for(var t=this.parseUnary();this.skipValue(i.TOKEN_OPERATOR,"**");){var e=this.parseUnary();t=new o.Pow(t.lineno,t.colno,t,e)}return t},c.parseUnary=function(t){var e,n=this.peekToken();return e=this.skipValue(i.TOKEN_OPERATOR,"-")?new o.Neg(n.lineno,n.colno,this.parseUnary(!0)):this.skipValue(i.TOKEN_OPERATOR,"+")?new o.Pos(n.lineno,n.colno,this.parseUnary(!0)):this.parsePrimary(),t||(e=this.parseFilter(e)),e},c.parsePrimary=function(t){var e,n=this.nextToken(),r=null;if(n?n.type===i.TOKEN_STRING?e=n.value:n.type===i.TOKEN_INT?e=parseInt(n.value,10):n.type===i.TOKEN_FLOAT?e=parseFloat(n.value):n.type===i.TOKEN_BOOLEAN?"true"===n.value?e=!0:"false"===n.value?e=!1:this.fail("invalid boolean: "+n.value,n.lineno,n.colno):n.type===i.TOKEN_NONE?e=null:n.type===i.TOKEN_REGEX&&(e=new RegExp(n.value.body,n.value.flags)):this.fail("expected expression, got end of file"),void 0!==e?r=new o.Literal(n.lineno,n.colno,e):n.type===i.TOKEN_SYMBOL?r=new o.Symbol(n.lineno,n.colno,n.value):(this.pushToken(n),r=this.parseAggregate()),t||(r=this.parsePostfix(r)),r)return r;throw this.error("unexpected token: "+n.value,n.lineno,n.colno)},c.parseFilterName=function(){for(var t=this.expect(i.TOKEN_SYMBOL),e=t.value;this.skipValue(i.TOKEN_OPERATOR,".");)e+="."+this.expect(i.TOKEN_SYMBOL).value;return new o.Symbol(t.lineno,t.colno,e)},c.parseFilterArgs=function(t){return this.peekToken().type===i.TOKEN_LEFT_PAREN?this.parsePostfix(t).args.children:[]},c.parseFilter=function(t){for(;this.skip(i.TOKEN_PIPE);){var e=this.parseFilterName();t=new o.Filter(e.lineno,e.colno,e,new o.NodeList(e.lineno,e.colno,[t].concat(this.parseFilterArgs(t))))}return t},c.parseFilterStatement=function(){var t=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var e=this.parseFilterName(),n=this.parseFilterArgs(e);this.advanceAfterBlockEnd(t.value);var r=new o.Capture(e.lineno,e.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var i=new o.Filter(e.lineno,e.colno,e,new o.NodeList(e.lineno,e.colno,[r].concat(n)));return new o.Output(e.lineno,e.colno,[i])},c.parseAggregate=function(){var t,e=this.nextToken();switch(e.type){case i.TOKEN_LEFT_PAREN:t=new o.Group(e.lineno,e.colno);break;case i.TOKEN_LEFT_BRACKET:t=new o.Array(e.lineno,e.colno);break;case i.TOKEN_LEFT_CURLY:t=new o.Dict(e.lineno,e.colno);break;default:return null}for(;;){var n=this.peekToken().type;if(n===i.TOKEN_RIGHT_PAREN||n===i.TOKEN_RIGHT_BRACKET||n===i.TOKEN_RIGHT_CURLY){this.nextToken();break}if(t.children.length>0&&(this.skip(i.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",e.lineno,e.colno)),t instanceof o.Dict){var r=this.parsePrimary();this.skip(i.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",e.lineno,e.colno);var s=this.parseExpression();t.addChild(new o.Pair(r.lineno,r.colno,r,s))}else{var a=this.parseExpression();t.addChild(a)}}return t},c.parseSignature=function(t,e){var n=this.peekToken();if(!e&&n.type!==i.TOKEN_LEFT_PAREN){if(t)return null;this.fail("expected arguments",n.lineno,n.colno)}n.type===i.TOKEN_LEFT_PAREN&&(n=this.nextToken());for(var r=new o.NodeList(n.lineno,n.colno),s=new o.KeywordArgs(n.lineno,n.colno),a=!1;;){if(n=this.peekToken(),!e&&n.type===i.TOKEN_RIGHT_PAREN){this.nextToken();break}if(e&&n.type===i.TOKEN_BLOCK_END)break;if(a&&!this.skip(i.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",n.lineno,n.colno);else{var c=this.parseExpression();this.skipValue(i.TOKEN_OPERATOR,"=")?s.addChild(new o.Pair(c.lineno,c.colno,c,this.parseExpression())):r.addChild(c)}a=!0}return s.children.length&&r.addChild(s),r},c.parseUntilBlocks=function(){for(var t=this.breakOnBlocks,e=arguments.length,n=new Array(e),r=0;r=","//","**"],j=L+this.current();switch(-1!==r.indexOf(D,j)&&(this.forward(),L=j,-1!==r.indexOf(D,j+this.current())&&(L=j+this.current(),this.forward())),L){case"(":M=d;break;case")":M=m;break;case"[":M=y;break;case"]":M=g;break;case"{":M=v;break;case"}":M=b;break;case",":M=w;break;case":":M=x;break;case"~":M=k;break;case"|":M=T;break;default:M=_}return C(M,L,e,n)}if((t=this._extractUntil(i+o)).match(/^[-+]?[0-9]+$/)){if("."===this.current()){this.forward();var B=this._extract("0123456789");return C(S,t+"."+B,e,n)}return C("int",t,e,n)}if(t.match(/^(true|false)$/))return C(E,t,e,n);if("none"===t)return C(A,t,e,n);if("null"===t)return C(A,t,e,n);if(t)return C(O,t,e,n);throw new Error("Unexpected value while parsing: "+t)}var F,U=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if((t=this._extractString(this.tags.BLOCK_START+"-"))||(t=this._extractString(this.tags.BLOCK_START)))return this.in_code=!0,C(u,t,e,n);if((t=this._extractString(this.tags.VARIABLE_START+"-"))||(t=this._extractString(this.tags.VARIABLE_START)))return this.in_code=!0,C(h,t,e,n);t="";var z=!1;for(this._matches(this.tags.COMMENT_START)&&(z=!0,t=this._extractString(this.tags.COMMENT_START));null!==(F=this._extractUntil(U));){if(t+=F,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!z){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=t.length){var V=t.slice(-this.colno);if(/^\s+$/.test(V)&&!(t=t.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!z)throw new Error("unexpected end of comment");t+=this._extractString(this.tags.COMMENT_END);break}t+=this.current(),this.forward()}if(null===F&&z)throw new Error("expected end of comment, got end of file");return C(z?p:c,t,e,n)},e._parseString=function(t){this.forward();for(var e="";!this.isFinished()&&this.current()!==t;){var n=this.current();if("\\"===n){switch(this.forward(),this.current()){case"n":e+="\n";break;case"t":e+="\t";break;case"r":e+="\r";break;default:e+=this.current()}this.forward()}else e+=n,this.forward()}return this.forward(),e},e._matches=function(t){return this.index+t.length>this.len?null:this.str.slice(this.index,this.index+t.length)===t},e._extractString=function(t){return this._matches(t)?(this.forwardN(t.length),t):null},e._extractUntil=function(t){return this._extractMatching(!0,t||"")},e._extract=function(t){return this._extractMatching(!1,t)},e._extractMatching=function(t,e){if(this.isFinished())return null;var n=e.indexOf(this.current());if(t&&-1===n||!t&&-1!==n){var r=this.current();this.forward();for(var i=e.indexOf(this.current());(t&&-1===i||!t&&-1!==i)&&!this.isFinished();)r+=this.current(),this.forward(),i=e.indexOf(this.current());return r}return""},e._extractRegex=function(t){var e=this.currentStr().match(t);return e?(this.forwardN(e[0].length),e):null},e.isFinished=function(){return this.index>=this.len},e.forwardN=function(t){for(var e=0;e1024){for(var e=0,n=i.length-o;e0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function d(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[t];if(void 0===c)return!1;if("function"==typeof c)o(c,this,e);else{var u=c.length,l=y(c,u);for(n=0;n=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1=0;r--)this.removeListener(t,e[r]);return this},a.prototype.listeners=function(t){return d(this,t,!0)},a.prototype.rawListeners=function(t){return d(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){"use strict";var r=n(3),i=n(0),o=0;function s(){return"hole_"+o++}function a(t,e){for(var n=null,r=0;r=e)return t;var n=e-t.length,s=r.repeat(" ",n/2-n%2),a=r.repeat(" ",n/2);return i.copySafeness(t,s+t+a)},e.default=function(t,e,n){return n?t||e:void 0!==t?t:e},e.dictsort=function(t,e,n){if(!r.isObject(t))throw new r.TemplateError("dictsort filter: val must be an object");var i,o=[];for(var s in t)o.push([s,t[s]]);if(void 0===n||"key"===n)i=0;else{if("value"!==n)throw new r.TemplateError("dictsort filter: You can only sort by either key or value");i=1}return o.sort((function(t,n){var o=t[i],s=n[i];return e||(r.isString(o)&&(o=o.toUpperCase()),r.isString(s)&&(s=s.toUpperCase())),o>s?1:o===s?0:-1})),o},e.dump=function(t,e){return JSON.stringify(t,null,e)},e.escape=function(t){return t instanceof i.SafeString?t:(t=null==t?"":t,i.markSafe(r.escape(t.toString())))},e.safe=function(t){return t instanceof i.SafeString?t:(t=null==t?"":t,i.markSafe(t.toString()))},e.first=function(t){return t[0]},e.forceescape=function(t){return t=null==t?"":t,i.markSafe(r.escape(t.toString()))},e.groupby=function(t,e){return r.groupBy(t,e,this.env.opts.throwOnUndefined)},e.indent=function(t,e,n){if(""===(t=o(t,"")))return"";e=e||4;var s=t.split("\n"),a=r.repeat(" ",e),c=s.map((function(t,e){return 0!==e||n?""+a+t:t})).join("\n");return i.copySafeness(t,c)},e.join=function(t,e,n){return e=e||"",n&&(t=r.map(t,(function(t){return t[n]}))),t.join(e)},e.last=function(t){return t[t.length-1]},e.length=function(t){var e=o(t,"");return void 0!==e?"function"==typeof Map&&e instanceof Map||"function"==typeof Set&&e instanceof Set?e.size:!r.isObject(e)||e instanceof i.SafeString?e.length:r.keys(e).length:0},e.list=c,e.lower=function(t){return(t=o(t,"")).toLowerCase()},e.nl2br=function(t){return null==t?"":i.copySafeness(t,t.replace(/\r\n|\n/g,"
\n"))},e.random=function(t){return t[Math.floor(Math.random()*t.length)]},e.reject=u(!1),e.rejectattr=function(t,e){return t.filter((function(t){return!t[e]}))},e.select=u(!0),e.selectattr=function(t,e){return t.filter((function(t){return!!t[e]}))},e.replace=function(t,e,n,r){var o=t;if(e instanceof RegExp)return t.replace(e,n);void 0===r&&(r=-1);var s="";if("number"==typeof e)e=""+e;else if("string"!=typeof e)return t;if("number"==typeof t&&(t=""+t),"string"!=typeof t&&!(t instanceof i.SafeString))return t;if(""===e)return s=n+t.split("").join(n)+n,i.copySafeness(t,s);var a=t.indexOf(e);if(0===r||-1===a)return t;for(var c=0,u=0;a>-1&&(-1===r||u=i&&l.push(n),o.push(l)}return o},e.sum=function(t,e,n){return void 0===n&&(n=0),e&&(t=r.map(t,(function(t){return t[e]}))),n+t.reduce((function(t,e){return t+e}),0)},e.sort=i.makeMacro(["value","reverse","case_sensitive","attribute"],[],(function(t,e,n,i){var o=this,s=r.map(t,(function(t){return t})),a=r.getAttrGetter(i);return s.sort((function(t,s){var c=i?a(t):t,u=i?a(s):s;if(o.env.opts.throwOnUndefined&&i&&(void 0===c||void 0===u))throw new TypeError('sort: attribute "'+i+'" resolved to undefined');return!n&&r.isString(c)&&r.isString(u)&&(c=c.toLowerCase(),u=u.toLowerCase()),cu?e?-1:1:0})),s})),e.string=function(t){return i.copySafeness(t,t)},e.striptags=function(t,e){var n,r=l((t=o(t,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|/gi,""));return n=e?r.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,"\n").replace(/\n\n\n+/g,"\n\n"):r.replace(/\s+/gi," "),i.copySafeness(t,n)},e.title=function(t){var e=(t=o(t,"")).split(" ").map((function(t){return a(t)}));return i.copySafeness(t,e.join(" "))},e.trim=l,e.truncate=function(t,e,n,r){var s=t;if(e=e||255,(t=o(t,"")).length<=e)return t;if(n)t=t.substring(0,e);else{var a=t.lastIndexOf(" ",e);-1===a&&(a=e),t=t.substring(0,a)}return t+=null!=r?r:"...",i.copySafeness(s,t)},e.upper=function(t){return(t=o(t,"")).toUpperCase()},e.urlencode=function(t){var e=encodeURIComponent;return r.isString(t)?e(t):(r.isArray(t)?t:r._entries(t)).map((function(t){var n=t[0],r=t[1];return e(n)+"="+e(r)})).join("&")};var h=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,f=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,p=/^https?:\/\/.*$/,d=/^www\./,m=/\.(?:org|net|com)(?:\:|\/|$)/;e.urlize=function(t,e,n){s(e)&&(e=1/0);var r=!0===n?' rel="nofollow"':"";return t.split(/(\s+)/).filter((function(t){return t&&t.length})).map((function(t){var n=t.match(h),i=n?n[1]:t,o=i.substr(0,e);return p.test(i)?'"+o+"":d.test(i)?'"+o+"":f.test(i)?''+i+"":m.test(i)?'"+o+"":t})).join("")},e.wordcount=function(t){var e=(t=o(t,""))?t.match(/\w+/g):null;return e?e.length:null},e.float=function(t,e){var n=parseFloat(t);return s(n)?e:n};var y=i.makeMacro(["value","default","base"],[],(function(t,e,n){void 0===n&&(n=10);var r=parseInt(t,n);return s(r)?e:r}));e.int=y,e.d=e.default,e.e=e.escape},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var i=function(t){var e,n;function i(e){var n;return(n=t.call(this)||this).precompiled=e||{},n}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n),i.prototype.getSource=function(t){return this.precompiled[t]?{src:{type:"code",obj:this.precompiled[t]},path:t}:null},i}(n(6));t.exports={PrecompiledLoader:i}},function(t,e,n){"use strict";var r=n(2).SafeString;e.callable=function(t){return"function"==typeof t},e.defined=function(t){return void 0!==t},e.divisibleby=function(t,e){return t%e==0},e.escaped=function(t){return t instanceof r},e.equalto=function(t,e){return t===e},e.eq=e.equalto,e.sameas=e.equalto,e.even=function(t){return t%2==0},e.falsy=function(t){return!t},e.ge=function(t,e){return t>=e},e.greaterthan=function(t,e){return t>e},e.gt=e.greaterthan,e.le=function(t,e){return t<=e},e.lessthan=function(t,e){return t0)for(var i=t;ie;o+=n)r.push(o);return r},cycler:function(){return t=Array.prototype.slice.call(arguments),e=-1,{current:null,reset:function(){e=-1,this.current=null},next:function(){return++e>=t.length&&(e=0),this.current=t[e],this.current}};var t,e},joiner:function(t){return function(t){t=t||",";var e=!0;return function(){var n=e?"":t;return e=!1,n}}(t)}}}},function(t,e,n){var r=n(4);t.exports=function(t,e){function n(t,e){if(this.name=t,this.path=t,this.defaultEngine=e.defaultEngine,this.ext=r.extname(t),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=("."!==this.defaultEngine[0]?".":"")+this.defaultEngine)}return n.prototype.render=function(e,n){t.render(this.name,e,n)},e.set("view",n),e.set("nunjucksEnv",t),t}},function(t,e,n){"use strict";var r=n(4),i=n(4),o=n(0)._prettifyError,s=n(5),a=n(7).Environment,c=n(24);function u(t,e){return!!Array.isArray(e)&&e.some((function(e){return t.match(e)}))}function l(t,e){(e=e||{}).isString=!0;var n=e.env||new a([]),r=e.wrapper||c;if(!e.name)throw new Error('the "name" option is required when compiling a string');return r([h(t,e.name,n)],e)}function h(t,e,n){var r,i=(n=n||new a([])).asyncFilters,c=n.extensionsList;e=e.replace(/\\/g,"/");try{r=s.compile(t,i,c,e,n.opts)}catch(t){throw o(e,!1,t)}return{name:e,template:r}}t.exports={precompile:function(t,e){var n=(e=e||{}).env||new a([]),o=e.wrapper||c;if(e.isString)return l(t,e);var s=r.existsSync(t)&&r.statSync(t),f=[],p=[];if(s.isFile())f.push(h(r.readFileSync(t,"utf-8"),e.name||t,n));else if(s.isDirectory()){!function n(o){r.readdirSync(o).forEach((function(s){var a=i.join(o,s),c=a.substr(i.join(t,"/").length),l=r.statSync(a);l&&l.isDirectory()?u(c+="/",e.exclude)||n(a):u(c,e.include)&&p.push(a)}))}(t);for(var d=0;dt.length||i>0&&s>=r||i<0&&s<=r);s+=i)o.push(n.memberLookup(t,s));return o}function p(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var d={pop:function(t){if(void 0===t)return this.pop();if(t>=this.length||t<0)throw new Error("KeyError");return this.splice(t,1)},append:function(t){return this.push(t)},remove:function(t){for(var e=0;e{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";r.r(i),r.d(i,{Component:()=>S,ComponentAttribute:()=>h,ComponentAttributeDefinition:()=>P,ComponentDefinition:()=>A,ComponentDrawOption:()=>g,ComponentLink:()=>U,ComponentLinkDefinition:()=>V,ComponentRenderer:()=>FO,DefaultConfiguration:()=>GN,DefaultData:()=>UN,DefaultDrawer:()=>hN,DefaultMetadata:()=>mN,DefaultParser:()=>bN,DefaultPlugin:()=>ZN,DefaultRender:()=>kN,FileInformation:()=>m,FileInput:()=>$,LinkRenderer:()=>KO,ParserLog:()=>a,Tag:()=>QN,Variable:()=>sC});var t={};function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t,e,n){return(e=o(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t){var n=function(t){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(n)?n:n+""}r.r(t),r.d(t,{Adder:()=>xt,Delaunay:()=>Vc,FormatSpecifier:()=>sh,InternMap:()=>St,InternSet:()=>Et,Node:()=>Ly,Path:()=>ia,Voronoi:()=>Dc,ZoomTransform:()=>UE,active:()=>us,arc:()=>TT,area:()=>RT,areaRadial:()=>zT,ascending:()=>X,autoType:()=>wu,axisBottom:()=>pn,axisLeft:()=>dn,axisRight:()=>fn,axisTop:()=>hn,bin:()=>se,bisect:()=>ot,bisectCenter:()=>it,bisectLeft:()=>rt,bisectRight:()=>nt,bisector:()=>J,blob:()=>ll,blur:()=>st,blur2:()=>at,blurImage:()=>ct,brush:()=>Bs,brushSelection:()=>Ms,brushX:()=>Ds,brushY:()=>js,buffer:()=>fl,chord:()=>$s,chordDirected:()=>Zs,chordTranspose:()=>Xs,cluster:()=>Ty,color:()=>oi,contourDensity:()=>pc,contours:()=>oc,count:()=>pt,create:()=>Jk,creator:()=>_r,cross:()=>gt,csv:()=>gl,csvFormat:()=>cu,csvFormatBody:()=>uu,csvFormatRow:()=>hu,csvFormatRows:()=>lu,csvFormatValue:()=>fu,csvParse:()=>su,csvParseRows:()=>au,cubehelix:()=>$a,cumsum:()=>vt,curveBasis:()=>LS,curveBasisClosed:()=>PS,curveBasisOpen:()=>MS,curveBumpX:()=>qT,curveBumpY:()=>WT,curveBundle:()=>jS,curveCardinal:()=>US,curveCardinalClosed:()=>VS,curveCardinalOpen:()=>HS,curveCatmullRom:()=>GS,curveCatmullRomClosed:()=>$S,curveCatmullRomOpen:()=>ZS,curveLinear:()=>OT,curveLinearClosed:()=>QS,curveMonotoneX:()=>aE,curveMonotoneY:()=>cE,curveNatural:()=>hE,curveStep:()=>pE,curveStepAfter:()=>mE,curveStepBefore:()=>dE,descending:()=>Z,deviation:()=>_t,difference:()=>He,disjoint:()=>qe,dispatch:()=>_n,drag:()=>$c,dragDisable:()=>Fr,dragEnable:()=>Ur,dsv:()=>yl,dsvFormat:()=>iu,easeBack:()=>il,easeBackIn:()=>nl,easeBackInOut:()=>il,easeBackOut:()=>rl,easeBounce:()=>Qu,easeBounceIn:()=>Ju,easeBounceInOut:()=>tl,easeBounceOut:()=>Qu,easeCircle:()=>zu,easeCircleIn:()=>Fu,easeCircleInOut:()=>zu,easeCircleOut:()=>Uu,easeCubic:()=>os,easeCubicIn:()=>rs,easeCubicInOut:()=>os,easeCubicOut:()=>is,easeElastic:()=>al,easeElasticIn:()=>sl,easeElasticInOut:()=>cl,easeElasticOut:()=>al,easeExp:()=>Bu,easeExpIn:()=>Du,easeExpInOut:()=>Bu,easeExpOut:()=>ju,easeLinear:()=>ku,easePoly:()=>Nu,easePolyIn:()=>Au,easePolyInOut:()=>Nu,easePolyOut:()=>Ou,easeQuad:()=>Eu,easeQuadIn:()=>Tu,easeQuadInOut:()=>Eu,easeQuadOut:()=>Su,easeSin:()=>Iu,easeSinIn:()=>Ru,easeSinInOut:()=>Iu,easeSinOut:()=>Pu,every:()=>Be,extent:()=>wt,fcumsum:()=>Tt,filter:()=>Ue,flatGroup:()=>Mt,flatRollup:()=>Dt,forceCenter:()=>El,forceCollide:()=>Fl,forceLink:()=>Vl,forceManyBody:()=>Zl,forceRadial:()=>Jl,forceSimulation:()=>Xl,forceX:()=>Ql,forceY:()=>th,format:()=>hh,formatDefaultLocale:()=>yh,formatLocale:()=>mh,formatPrefix:()=>fh,formatSpecifier:()=>oh,fsum:()=>kt,geoAlbers:()=>Fm,geoAlbersUsa:()=>Um,geoArea:()=>wf,geoAzimuthalEqualArea:()=>Hm,geoAzimuthalEqualAreaRaw:()=>Km,geoAzimuthalEquidistant:()=>Wm,geoAzimuthalEquidistantRaw:()=>qm,geoBounds:()=>np,geoCentroid:()=>dp,geoCircle:()=>Sp,geoClipAntimeridian:()=>Dp,geoClipCircle:()=>jp,geoClipExtent:()=>qp,geoClipRectangle:()=>Hp,geoConicConformal:()=>Jm,geoConicConformalRaw:()=>Zm,geoConicEqualArea:()=>Bm,geoConicEqualAreaRaw:()=>jm,geoConicEquidistant:()=>ny,geoConicEquidistantRaw:()=>ey,geoContains:()=>cd,geoDistance:()=>Qp,geoEqualEarth:()=>uy,geoEqualEarthRaw:()=>cy,geoEquirectangular:()=>ty,geoEquirectangularRaw:()=>Qm,geoGnomonic:()=>hy,geoGnomonicRaw:()=>ly,geoGraticule:()=>hd,geoGraticule10:()=>fd,geoIdentity:()=>fy,geoInterpolate:()=>pd,geoLength:()=>Xp,geoMercator:()=>Ym,geoMercatorRaw:()=>Gm,geoNaturalEarth1:()=>dy,geoNaturalEarth1Raw:()=>py,geoOrthographic:()=>yy,geoOrthographicRaw:()=>my,geoPath:()=>_m,geoProjection:()=>Im,geoProjectionMutator:()=>Mm,geoRotation:()=>xp,geoStereographic:()=>vy,geoStereographicRaw:()=>gy,geoStream:()=>Xh,geoTransform:()=>wm,geoTransverseMercator:()=>_y,geoTransverseMercatorRaw:()=>by,gray:()=>Na,greatest:()=>pe,greatestIndex:()=>Ce,group:()=>Rt,groupSort:()=>Gt,groups:()=>Pt,hcl:()=>Ba,hierarchy:()=>Ey,histogram:()=>se,hsl:()=>vi,html:()=>Tl,image:()=>bl,index:()=>Ft,indexes:()=>Ut,interpolate:()=>Hi,interpolateArray:()=>Di,interpolateBasis:()=>Ti,interpolateBasisClosed:()=>Si,interpolateBlues:()=>Sk,interpolateBrBG:()=>jx,interpolateBuGn:()=>ek,interpolateBuPu:()=>rk,interpolateCividis:()=>Dk,interpolateCool:()=>Fk,interpolateCubehelix:()=>qg,interpolateCubehelixDefault:()=>jk,interpolateCubehelixLong:()=>Wg,interpolateDate:()=>Bi,interpolateDiscrete:()=>Rg,interpolateGnBu:()=>ok,interpolateGreens:()=>Ak,interpolateGreys:()=>Nk,interpolateHcl:()=>Vg,interpolateHclLong:()=>Kg,interpolateHsl:()=>Bg,interpolateHslLong:()=>Fg,interpolateHue:()=>Pg,interpolateInferno:()=>Xk,interpolateLab:()=>Ug,interpolateMagma:()=>$k,interpolateNumber:()=>Fi,interpolateNumberArray:()=>Ii,interpolateObject:()=>Ui,interpolateOrRd:()=>ak,interpolateOranges:()=>Mk,interpolatePRGn:()=>Fx,interpolatePiYG:()=>zx,interpolatePlasma:()=>Zk,interpolatePuBu:()=>hk,interpolatePuBuGn:()=>uk,interpolatePuOr:()=>Kx,interpolatePuRd:()=>pk,interpolatePurples:()=>Lk,interpolateRainbow:()=>zk,interpolateRdBu:()=>qx,interpolateRdGy:()=>Gx,interpolateRdPu:()=>mk,interpolateRdYlBu:()=>$x,interpolateRdYlGn:()=>Zx,interpolateReds:()=>Pk,interpolateRgb:()=>Ci,interpolateRgbBasis:()=>Ri,interpolateRgbBasisClosed:()=>Pi,interpolateRound:()=>Ig,interpolateSinebow:()=>qk,interpolateSpectral:()=>Qx,interpolateString:()=>Ki,interpolateTransformCss:()=>Ro,interpolateTransformSvg:()=>Po,interpolateTurbo:()=>Wk,interpolateViridis:()=>Yk,interpolateWarm:()=>Bk,interpolateYlGn:()=>bk,interpolateYlGnBu:()=>gk,interpolateYlOrBr:()=>wk,interpolateYlOrRd:()=>kk,interpolateZoom:()=>Dg,interrupt:()=>Eo,intersection:()=>We,interval:()=>jE,isoFormat:()=>IE,isoParse:()=>DE,json:()=>wl,lab:()=>Ca,lch:()=>ja,least:()=>Oe,leastIndex:()=>Ne,line:()=>LT,lineRadial:()=>UT,link:()=>XT,linkHorizontal:()=>ZT,linkRadial:()=>QT,linkVertical:()=>JT,local:()=>tT,map:()=>ze,matcher:()=>En,max:()=>ae,maxIndex:()=>ce,mean:()=>be,median:()=>_e,medianIndex:()=>we,merge:()=>xe,min:()=>ue,minIndex:()=>le,mode:()=>ke,namespace:()=>zn,namespaces:()=>Un,nice:()=>ie,now:()=>io,pack:()=>ng,packEnclose:()=>Uy,packSiblings:()=>tg,pairs:()=>Te,partition:()=>cg,path:()=>oa,pathRound:()=>sa,permute:()=>Kt,pie:()=>MT,piecewise:()=>Gg,pointRadial:()=>VT,pointer:()=>Wi,pointers:()=>nT,polygonArea:()=>$g,polygonCentroid:()=>Xg,polygonContains:()=>ev,polygonHull:()=>tv,polygonLength:()=>nv,precisionFixed:()=>gh,precisionPrefix:()=>vh,precisionRound:()=>bh,quadtree:()=>Ll,quantile:()=>de,quantileIndex:()=>ye,quantileSorted:()=>me,quantize:()=>Yg,quickselect:()=>he,radialArea:()=>zT,radialLine:()=>UT,randomBates:()=>uv,randomBernoulli:()=>fv,randomBeta:()=>mv,randomBinomial:()=>yv,randomCauchy:()=>vv,randomExponential:()=>lv,randomGamma:()=>dv,randomGeometric:()=>pv,randomInt:()=>ov,randomIrwinHall:()=>cv,randomLcg:()=>Tv,randomLogNormal:()=>av,randomLogistic:()=>bv,randomNormal:()=>sv,randomPareto:()=>hv,randomPoisson:()=>_v,randomUniform:()=>iv,randomWeibull:()=>gv,range:()=>Ee,rank:()=>Ae,reduce:()=>Ve,reverse:()=>Ke,rgb:()=>ui,ribbon:()=>ga,ribbonArrow:()=>va,rollup:()=>jt,rollups:()=>Bt,scaleBand:()=>Nv,scaleDiverging:()=>vx,scaleDivergingLog:()=>bx,scaleDivergingPow:()=>wx,scaleDivergingSqrt:()=>xx,scaleDivergingSymlog:()=>_x,scaleIdentity:()=>Hv,scaleImplicit:()=>Av,scaleLinear:()=>Kv,scaleLog:()=>Qv,scaleOrdinal:()=>Ov,scalePoint:()=>Lv,scalePow:()=>cb,scaleQuantile:()=>fb,scaleQuantize:()=>pb,scaleRadial:()=>hb,scaleSequential:()=>hx,scaleSequentialLog:()=>fx,scaleSequentialPow:()=>dx,scaleSequentialQuantile:()=>yx,scaleSequentialSqrt:()=>mx,scaleSequentialSymlog:()=>px,scaleSqrt:()=>ub,scaleSymlog:()=>rb,scaleThreshold:()=>db,scaleTime:()=>ax,scaleUtc:()=>cx,scan:()=>Le,schemeAccent:()=>Sx,schemeBlues:()=>Tk,schemeBrBG:()=>Dx,schemeBuGn:()=>tk,schemeBuPu:()=>nk,schemeCategory10:()=>Tx,schemeDark2:()=>Ex,schemeGnBu:()=>ik,schemeGreens:()=>Ek,schemeGreys:()=>Ok,schemeObservable10:()=>Ax,schemeOrRd:()=>sk,schemeOranges:()=>Ik,schemePRGn:()=>Bx,schemePaired:()=>Ox,schemePastel1:()=>Nx,schemePastel2:()=>Cx,schemePiYG:()=>Ux,schemePuBu:()=>lk,schemePuBuGn:()=>ck,schemePuOr:()=>Vx,schemePuRd:()=>fk,schemePurples:()=>Ck,schemeRdBu:()=>Hx,schemeRdGy:()=>Wx,schemeRdPu:()=>dk,schemeRdYlBu:()=>Yx,schemeRdYlGn:()=>Xx,schemeReds:()=>Rk,schemeSet1:()=>Lx,schemeSet2:()=>Rx,schemeSet3:()=>Px,schemeSpectral:()=>Jx,schemeTableau10:()=>Ix,schemeYlGn:()=>vk,schemeYlGnBu:()=>yk,schemeYlOrBr:()=>_k,schemeYlOrRd:()=>xk,select:()=>Ir,selectAll:()=>rT,selection:()=>Pr,selector:()=>xn,selectorAll:()=>Sn,shuffle:()=>Re,shuffler:()=>Pe,some:()=>Fe,sort:()=>Ht,stack:()=>_E,stackOffsetDiverging:()=>xE,stackOffsetExpand:()=>wE,stackOffsetNone:()=>yE,stackOffsetSilhouette:()=>kE,stackOffsetWiggle:()=>TE,stackOrderAppearance:()=>SE,stackOrderAscending:()=>AE,stackOrderDescending:()=>NE,stackOrderInsideOut:()=>CE,stackOrderNone:()=>gE,stackOrderReverse:()=>LE,stratify:()=>dg,style:()=>Jn,subset:()=>Xe,sum:()=>Ie,superset:()=>Ye,svg:()=>Sl,symbol:()=>AS,symbolAsterisk:()=>eS,symbolCircle:()=>nS,symbolCross:()=>rS,symbolDiamond:()=>sS,symbolDiamond2:()=>aS,symbolPlus:()=>cS,symbolSquare:()=>uS,symbolSquare2:()=>lS,symbolStar:()=>dS,symbolTimes:()=>TS,symbolTriangle:()=>yS,symbolTriangle2:()=>vS,symbolWye:()=>kS,symbolX:()=>TS,symbols:()=>SS,symbolsFill:()=>SS,symbolsStroke:()=>ES,text:()=>dl,thresholdFreedmanDiaconis:()=>ge,thresholdScott:()=>ve,thresholdSturges:()=>oe,tickFormat:()=>zv,tickIncrement:()=>ne,tickStep:()=>re,ticks:()=>ee,timeDay:()=>Db,timeDays:()=>jb,timeFormat:()=>D_,timeFormatDefaultLocale:()=>rx,timeFormatLocale:()=>I_,timeFriday:()=>Yb,timeFridays:()=>e_,timeHour:()=>Rb,timeHours:()=>Pb,timeInterval:()=>kb,timeMillisecond:()=>Tb,timeMilliseconds:()=>Sb,timeMinute:()=>Ob,timeMinutes:()=>Nb,timeMonday:()=>Hb,timeMondays:()=>Zb,timeMonth:()=>v_,timeMonths:()=>b_,timeParse:()=>j_,timeSaturday:()=>$b,timeSaturdays:()=>n_,timeSecond:()=>Eb,timeSeconds:()=>Ab,timeSunday:()=>Kb,timeSundays:()=>Xb,timeThursday:()=>Gb,timeThursdays:()=>t_,timeTickInterval:()=>C_,timeTicks:()=>N_,timeTuesday:()=>qb,timeTuesdays:()=>Jb,timeWednesday:()=>Wb,timeWednesdays:()=>Qb,timeWeek:()=>Kb,timeWeeks:()=>Xb,timeYear:()=>x_,timeYears:()=>k_,timeout:()=>fo,timer:()=>ao,timerFlush:()=>co,transition:()=>ts,transpose:()=>Me,tree:()=>kg,treemap:()=>Og,treemapBinary:()=>Ng,treemapDice:()=>ag,treemapResquarify:()=>Lg,treemapSlice:()=>Tg,treemapSliceDice:()=>Cg,treemapSquarify:()=>Ag,tsv:()=>vl,tsvFormat:()=>yu,tsvFormatBody:()=>gu,tsvFormatRow:()=>bu,tsvFormatRows:()=>vu,tsvFormatValue:()=>_u,tsvParse:()=>du,tsvParseRows:()=>mu,union:()=>Ze,unixDay:()=>Ub,unixDays:()=>zb,utcDay:()=>Bb,utcDays:()=>Fb,utcFormat:()=>B_,utcFriday:()=>u_,utcFridays:()=>y_,utcHour:()=>Ib,utcHours:()=>Mb,utcMillisecond:()=>Tb,utcMilliseconds:()=>Sb,utcMinute:()=>Cb,utcMinutes:()=>Lb,utcMonday:()=>o_,utcMondays:()=>f_,utcMonth:()=>__,utcMonths:()=>w_,utcParse:()=>F_,utcSaturday:()=>l_,utcSaturdays:()=>g_,utcSecond:()=>Eb,utcSeconds:()=>Ab,utcSunday:()=>i_,utcSundays:()=>h_,utcThursday:()=>c_,utcThursdays:()=>m_,utcTickInterval:()=>O_,utcTicks:()=>A_,utcTuesday:()=>s_,utcTuesdays:()=>p_,utcWednesday:()=>a_,utcWednesdays:()=>d_,utcWeek:()=>i_,utcWeeks:()=>h_,utcYear:()=>T_,utcYears:()=>S_,variance:()=>bt,window:()=>Yn,xml:()=>kl,zip:()=>je,zoom:()=>ZE,zoomIdentity:()=>zE,zoomTransform:()=>VE});var s=function(t){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{path:null,severity:null,startLineNumber:null,startColumn:null,endLineNumber:null,endColumn:null,message:null,initialErrorMessage:null,componentId:null,attribute:null,extraData:""};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.path,r=e.severity,i=e.startLineNumber,o=e.startColumn,s=e.endLineNumber,a=e.endColumn,c=e.message,u=e.initialErrorMessage,l=e.componentId,h=e.attribute,f=e.extraData;this.path=null!=n?n:null,this.severity=null!=r?r:t.SEVERITY_HINT,this.startLineNumber=null!=i?i:null,this.startColumn=null!=o?o:null,this.endLineNumber=null!=s?s:null,this.endColumn=null!=a?a:null,this.message=null!=c?c:null,this.initialErrorMessage=null!=u?u:null,this.componentId=null!=l?l:null,this.attribute=null!=h?h:null,this.extraData=null!=f?f:""}));n(s,"SEVERITY_HINT",1),n(s,"SEVERITY_INFO",2),n(s,"SEVERITY_WARNING",4),n(s,"SEVERITY_ERROR",8);const a=s;function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}var l=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{name:null,value:null,type:null,definition:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.name,r=e.value,i=e.type,o=e.definition;this.name=n||null,this.value=null!=r?r:null,this.type=i||null,this.definition=o||null},e=[{key:"isVariable",get:function(){return!1}},{key:"getErrors",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return this.validateDefinitionType(e,r),this.validateType(e,r),this.validateRuleMinMax(e,r),this.validateRuleValues(e,r),this.validateRuleRegex(e,r),this.validateRequiredAttributes(e,r),n&&"Object"===(null===(t=this.definition)||void 0===t?void 0:t.type)&&Array.isArray(this.value)&&this.value.forEach((function(t){return t.getErrors(e,!0,r)})),e}},{key:"validateDefinitionType",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return null===this.definition?t:"Link"===this.definition.type&&"Array"!==this.type?(t.push(new a({componentId:e,severity:a.SEVERITY_ERROR,message:"parser.error.invalidLinkType",attribute:this.name})),t):"Reference"===this.definition.type&&"String"!==this.type?(t.push(new a({componentId:e,severity:a.SEVERITY_ERROR,message:"parser.error.invalidReferenceType",attribute:this.name})),t):("Reference"!==this.definition.type&&"Link"!==this.definition.type&&this.definition.type!==this.type&&t.push(new a({componentId:e,severity:a.SEVERITY_ERROR,message:"parser.error.not".concat(this.definition.type),attribute:this.name})),t)}},{key:"validateType",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return null===this.value?t:"Boolean"===this.type?("boolean"!=typeof this.value&&t.push(new a({componentId:e,severity:a.SEVERITY_ERROR,message:"parser.error.notBoolean",attribute:this.name})),t):"String"===this.type?("string"!=typeof this.value&&t.push(new a({componentId:e,severity:a.SEVERITY_ERROR,message:"parser.error.notString",attribute:this.name})),t):"Number"===this.type?("number"!=typeof this.value&&t.push(new a({componentId:e,severity:a.SEVERITY_ERROR,message:"parser.error.notNumber",attribute:this.name})),t):(Array.isArray(this.value)||t.push(new a({componentId:e,severity:a.SEVERITY_ERROR,message:"parser.error.not".concat(this.type),attribute:this.name})),t)}},{key:"validateRuleMinMax",value:function(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("Boolean"===this.type||"Object"===this.type||null===(t=this.definition)||void 0===t||!t.rules)return n;var i="number"==typeof this.value?this.value:(null===(e=this.value)||void 0===e?void 0:e.length)||0;return null!==this.definition.rules.min&&ithis.definition.rules.max&&n.push(new a({componentId:r,severity:a.SEVERITY_ERROR,message:"parser.error.max".concat(this.definition.type),attribute:this.name,extraData:this.definition.rules.max})),n}},{key:"validateRuleValues",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!this.definition||0===this.definition.rules.values.length)return e;var r=Array.isArray(this.value);return(r&&this.value.some((function(e){return!t.definition.rules.values.includes(e)}))||!r&&!this.definition.rules.values.includes(this.value))&&e.push(new a({componentId:n,severity:a.SEVERITY_ERROR,message:"parser.error.invalidValue",attribute:this.name,extraData:this.definition.rules.values.join(", ")})),e}},{key:"validateRuleRegex",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return null!==(t=this.definition)&&void 0!==t&&t.rules.regex&&null!==this.value?(new RegExp(this.definition.rules.regex).test(this.value)||e.push(new a({componentId:n,severity:a.SEVERITY_ERROR,message:this.definition.rules.regexMessage||"parser.error.regex",attribute:this.name})),e):e}},{key:"validateRequiredAttributes",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.definition&&"Object"===this.definition.type?(this.definition.definedAttributes.forEach((function(r){var i=t.value.find((function(t){return t.name===r.name}));!r.required||i&&null!==i.value||e.push(new a({componentId:n,severity:a.SEVERITY_ERROR,message:"parser.error.required",attribute:r.name}))})),e):e}}],e&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{path:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.path;this.path=null!=n?n:null},(e=[{key:"fileName",get:function(){return this.path?this.path.replace(/^.*[\\/]/,""):null}}])&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{x:null,y:null,width:null,height:null,hide:!1};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.x,r=e.y,i=e.width,o=e.height,s=e.hide;this.x=n||null,this.y=r||null,this.width=i||null,this.height=o||null,this.hide=s||!1}));const g=y;function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function b(t){var e=function(t){if("object"!=v(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==v(e)?e:e+""}function _(t,e,n){return e=x(e),function(t,e){if(e&&("object"==v(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,w()?Reflect.construct(e,n||[],x(t).constructor):e.apply(t,n))}function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(w=function(){return!!t})()}function x(t){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},x(t)}function k(t,e){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},k(t,e)}var T=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:null,externalId:null,name:null,definition:null,drawOption:null,attributes:[]};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=_(this,e,[n]);var r=n.id,i=n.externalId,o=n.name,s=n.definition,a=n.drawOption,c=n.attributes;return t.__class="Component",t.id=r||null,t.externalId=i||t.id,t.name=o||null,t.definition=s||null,t.drawOption=a||new g,t.attributes=c||[],t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&k(t,e)}(e,t),n=e,r=[{key:"setExternalId",value:function(t){this.externalId=t}},{key:"getConfigurationKey",value:function(){return this.id}},{key:"setReferenceAttribute",value:function(t){var e=this.definition.definedAttributes.find((function(e){return e.containerRef===t.definition.type}));if(e){var n=this.attributes.filter((function(t){var n=t.definition;return(null==n?void 0:n.name)===e.name}));n.length>0?n.forEach((function(e){e.value=t.id})):this.attributes.push(this.createAttribute({name:e.name,value:t.id,type:"String",definition:e}))}}},{key:"__createNestedAttributes",value:function(t){var e=this,n=this.attributes;return t.slice().reverse().forEach((function(t){var r=n.find((function(e){return e.definition.name===t.name}));r||(r=e.createAttribute({name:t.name,definition:t,type:"Object",value:[]}),n.push(r)),n=r.value})),n}},{key:"createAttribute",value:function(t){return new h(t)}},{key:"removeAllReferenceAttributes",value:function(t){this.attributes=t?this.attributes.filter((function(e){return!("Reference"===e.definition.type&&e.definition.containerRef===t.definition.type&&e.value===t.id)})):this.attributes.filter((function(t){return"Reference"!==t.definition.type}))}},{key:"setLinkAttribute",value:function(t){var e=[],n=this.__getLinkAttribute(e,this.definition.definedAttributes,t),r=this.__createNestedAttributes(e),i=r.find((function(t){return t.definition.name===n.name}));i||(i=this.createAttribute({name:n.name,definition:n,type:"Array",value:[]}),r.push(i)),i.value.includes(t.target)||i.value.push(t.target)}},{key:"__getLinkAttribute",value:function(t,e,n){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null;this.__removeLinkAttribute(this.attributes,t,e)}},{key:"__removeLinkAttribute",value:function(t,e,n){var r=this;t.forEach((function(t){var i;if("Object"===t.type&&r.__removeLinkAttribute(t.value,e,n),"Link"===(null===(i=t.definition)||void 0===i?void 0:i.type)&&(!n||t.name===n)){var o=t.value.findIndex((function(t){return t===e}));o>=0&&t.value.splice(o,1)}}))}},{key:"getAttributeByName",value:function(t){return this.__getAttributeByName(this.attributes,t)}},{key:"__getAttributeByName",value:function(t,e){for(var n=0;n3?i-3:0),s=3;s2?n-2:0),i=2;i0&&void 0!==arguments[0]?arguments[0]:[];return this.validateDefinition(e),this.validateRequiredAttributes(e),this.attributes.forEach((function(n){return n.getErrors(e,!0,t.id)})),e}},{key:"validateRequiredAttributes",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.definition?(this.definition.definedAttributes.forEach((function(n){var r=t.attributes.find((function(t){return t.name===n.name}));!n.required||r&&null!==r.value||e.push(new a({componentId:t.id,severity:a.SEVERITY_ERROR,message:"parser.error.required",attribute:n.name}))})),e):e}},{key:"validateDefinition",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null===this.definition&&t.push(new a({componentId:this.id,severity:a.SEVERITY_WARNING,message:"parser.warning.noComponentDefinition"})),t}},{key:"getDefinedAttributesByType",value:function(t){var e=[];return this.__setDefinedAttributesByType(e,this.definition.definedAttributes,t),e}},{key:"__setDefinedAttributesByType",value:function(t,e,n){var r=this;e.forEach((function(e){"Object"===e.type&&r.__setDefinedAttributesByType(t,e.definedAttributes,n),e.type===n&&t.push(e)}))}},{key:"canContain",value:function(t){return this.definition.isContainer&&this.definition.childrenTypes.includes(t)}}],r&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{type:null,icon:null,model:null,displayName:null,description:null,categories:[],tags:[],url:null,parentTypes:[],childrenTypes:[],definedAttributes:[],isContainer:!1,displayType:null,workflowDirection:null,linkModel:null,defaultWidth:0,defaultHeight:0,minWidth:0,minHeight:0,reservedWidth:0,reservedHeight:0,margin:10,gap:30};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.type,r=e.icon,i=e.model,o=e.displayName,s=e.description,a=e.categories,c=e.tags,u=e.url,l=e.parentTypes,h=e.childrenTypes,f=e.definedAttributes,p=e.isContainer,d=e.displayType,m=e.workflowDirection,y=e.linkModel,g=e.defaultWidth,v=e.defaultHeight,b=e.minWidth,_=e.minHeight,w=e.reservedWidth,x=e.reservedHeight,k=e.margin,T=e.gap;this.type=n||null,this.icon=r||null,this.model=i||null,this.displayName=o||null,this.description=s||null,this.categories=a||[],this.tags=c||[],this.url=u||null,this.parentTypes=l||[],this.childrenTypes=h||[],this.definedAttributes=f||[],this.isContainer=void 0!==p&&p,this.displayType=d||null,this.workflowDirection=m||"horizontal",this.linkModel=y||null,this.defaultWidth=g||0,this.defaultHeight=v||0,this.minWidth=b||0,this.minHeight=_||0,this.reservedWidth=w||0,this.reservedHeight=x||0,this.margin=k||10,this.gap=T||30}));const A=E;function O(t){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(t)}function N(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function C(t,e,n){return(e=L(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function L(t){var e=function(t){if("object"!=O(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==O(e)?e:e+""}var R=function(t){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{name:null,type:null,displayName:null,description:null,tags:[],url:null,linkType:null,linkRef:[],linkModel:null,containerRef:null,required:!1,definedAttributes:[],rules:{values:[],min:null,max:null,regex:null,regexMessage:null}};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.name,r=e.type,i=e.displayName,o=e.description,s=e.tags,a=e.url,c=e.linkType,u=e.linkRef,l=e.linkModel,h=e.containerRef,f=e.definedAttributes,p=e.required,d=e.rules;this.name=n||null,this.type=r||null,this.displayName=i||null,this.description=o||null,this.tags=s||[],this.url=a||null,this.linkType=c||null,this.linkRef=u||[],this.linkModel=l||null,this.containerRef=h||null,this.definedAttributes=f||[],this.required=p||!1,this.rules=function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{source:null,target:null,name:null,definition:null,isReverse:!1};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=M(this,e);var r=n.source,i=n.target,o=n.name,s=n.definition,a=n.isReverse;return t.__class="Link",t.source=r||null,t.target=i||null,t.name=o||null,t.definition=s||null,t.isReverse=!!a,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&B(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(m);const U=F;var z=function(t){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{attributeRef:null,sourceRef:null,targetRef:null,type:null,model:null,isTemporary:!1};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.attributeRef,r=e.sourceRef,i=e.targetRef,o=e.type,s=e.model,a=e.isTemporary;this.attributeRef=n||null,this.sourceRef=r||null,this.targetRef=i||null,this.type=o||null,this.model=s||null,this.isTemporary=!!a}));const V=z;function K(t){return K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},K(t)}function H(t,e,n){return e=W(e),function(t,e){if(e&&("object"==K(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,q()?Reflect.construct(e,n||[],W(t).constructor):e.apply(t,n))}function q(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(q=function(){return!!t})()}function W(t){return W=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},W(t)}function G(t,e){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},G(t,e)}var Y=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{path:null,name:null,content:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=H(this,e,[n]);var r=n.content;return t.content=r||null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&G(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(m);const $=Y;function X(t,e){return null==t||null==e?NaN:te?1:t>=e?0:NaN}function Z(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function J(t){let e,n,r;function i(t,r,i=0,o=t.length){if(i>>1;n(t[e],r)<0?i=e+1:o=e}while(iX(t(e),n),r=(e,n)=>t(e)-n):(e=t===X||t===Z?t:Q,n=t,r=t),{left:i,center:function(t,e,n=0,o=t.length){const s=i(t,e,n,o-1);return s>n&&r(t[s-1],e)>-r(t[s],e)?s-1:s},right:function(t,r,i=0,o=t.length){if(i>>1;n(t[e],r)<=0?i=e+1:o=e}while(i=0))throw new RangeError("invalid r");let n=t.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!e)return t;const r=ft(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const at=ut(ft),ct=ut((function(t){const e=ft(t);return(t,n,r,i,o)=>{e(t,n,0+(r<<=2),0+(i<<=2),o<<=2),e(t,n,r+1,i+1,o),e(t,n,r+2,i+2,o),e(t,n,r+3,i+3,o)}}));function ut(t){return function(e,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:s}=e;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((s=Math.floor(void 0!==s?s:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!s||!n&&!r)return e;const a=n&&t(n),c=r&&t(r),u=i.slice();return a&&c?(lt(a,u,i,o,s),lt(a,i,u,o,s),lt(a,u,i,o,s),ht(c,i,u,o,s),ht(c,u,i,o,s),ht(c,i,u,o,s)):a?(lt(a,i,u,o,s),lt(a,u,i,o,s),lt(a,i,u,o,s)):c&&(ht(c,i,u,o,s),ht(c,u,i,o,s),ht(c,i,u,o,s)),e}}function lt(t,e,n,r,i){for(let o=0,s=r*i;o{if(!((o-=s)>=i))return;let a=t*r[i];const c=s*t;for(let t=i,e=i+c;t{if(!((s-=a)>=o))return;let c=e*i[o];const u=a*e,l=u+a;for(let t=o,e=o+u;t=e&&++n;else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(i=+i)>=i&&++n}return n}function dt(t){return 0|t.length}function mt(t){return!(t>0)}function yt(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function gt(...t){const e="function"==typeof t[t.length-1]&&function(t){return e=>t(...e)}(t.pop()),n=(t=t.map(yt)).map(dt),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(mt))return o;for(;;){o.push(i.map(((e,n)=>t[n][e])));let s=r;for(;++i[s]===n[s];){if(0===s)return e?o.map(e):o;i[s--]=0}}}function vt(t,e){var n=0,r=0;return Float64Array.from(t,void 0===e?t=>n+=+t||0:i=>n+=+e(i,r++,t)||0)}function bt(t,e){let n,r=0,i=0,o=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(n=e-i,i+=n/++r,o+=n*(e-i));else{let s=-1;for(let a of t)null!=(a=e(a,++s,t))&&(a=+a)>=a&&(n=a-i,i+=n/++r,o+=n*(a-i))}if(r>1)return o/(r-1)}function _t(t,e){const n=bt(t,e);return n?Math.sqrt(n):n}function wt(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r=o&&(n=r=o):(n>o&&(n=o),r0){for(o=t[--i];i>0&&(e=o,n=t[--i],o=e+n,r=n-(o-e),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(n=2*r,e=o+n,n==e-o&&(o=e))}return o}}function kt(t,e){const n=new xt;if(void 0===e)for(let e of t)(e=+e)&&n.add(e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function Tt(t,e){const n=new xt;let r=-1;return Float64Array.from(t,void 0===e?t=>n.add(+t||0):i=>n.add(+e(i,++r,t)||0))}class St extends Map{constructor(t,e=Ct){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(At(this,t))}has(t){return super.has(At(this,t))}set(t,e){return super.set(Ot(this,t),e)}delete(t){return super.delete(Nt(this,t))}}class Et extends Set{constructor(t,e=Ct){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const e of t)this.add(e)}has(t){return super.has(At(this,t))}add(t){return super.add(Ot(this,t))}delete(t){return super.delete(Nt(this,t))}}function At({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Ot({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Nt({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Ct(t){return null!==t&&"object"==typeof t?t.valueOf():t}function Lt(t){return t}function Rt(t,...e){return Vt(t,Lt,Lt,e)}function Pt(t,...e){return Vt(t,Array.from,Lt,e)}function It(t,e){for(let n=1,r=e.length;nt.pop().map((([e,n])=>[...t,e,n]))));return t}function Mt(t,...e){return It(Pt(t,...e),e)}function Dt(t,e,...n){return It(Bt(t,e,...n),n)}function jt(t,e,...n){return Vt(t,Lt,e,n)}function Bt(t,e,...n){return Vt(t,Array.from,e,n)}function Ft(t,...e){return Vt(t,Lt,zt,e)}function Ut(t,...e){return Vt(t,Array.from,zt,e)}function zt(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function Vt(t,e,n,r){return function t(i,o){if(o>=r.length)return n(i);const s=new St,a=r[o++];let c=-1;for(const t of i){const e=a(t,++c,i),n=s.get(e);n?n.push(t):s.set(e,[t])}for(const[e,n]of s)s.set(e,t(n,o));return e(s)}(t,0)}function Kt(t,e){return Array.from(e,(e=>t[e]))}function Ht(t,...e){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&2!==n.length||e.length>1){const r=Uint32Array.from(t,((t,e)=>e));return e.length>1?(e=e.map((e=>t.map(e))),r.sort(((t,n)=>{for(const r of e){const e=Wt(r[t],r[n]);if(e)return e}}))):(n=t.map(n),r.sort(((t,e)=>Wt(n[t],n[e])))),Kt(t,r)}return t.sort(qt(n))}function qt(t=X){if(t===X)return Wt;if("function"!=typeof t)throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}function Wt(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(te?1:0)}function Gt(t,e,n){return(2!==e.length?Ht(jt(t,e,n),(([t,e],[n,r])=>X(e,r)||X(t,n))):Ht(Rt(t,n),(([t,n],[r,i])=>e(n,i)||X(t,r)))).map((([t])=>t))}var Yt=Array.prototype,$t=Yt.slice;function Xt(t){return()=>t}Yt.map;const Zt=Math.sqrt(50),Jt=Math.sqrt(10),Qt=Math.sqrt(2);function te(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=Zt?10:o>=Jt?5:o>=Qt?2:1;let a,c,u;return i<0?(u=Math.pow(10,-i)/s,a=Math.round(t*u),c=Math.round(e*u),a/ue&&--c,u=-u):(u=Math.pow(10,i)*s,a=Math.round(t/u),c=Math.round(e/u),a*ue&&--c),c0))return[];if((t=+t)==(e=+e))return[t];const r=e=i))return[];const a=o-i+1,c=new Array(a);if(r)if(s<0)for(let t=0;t0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function oe(t){return Math.max(1,Math.ceil(Math.log(pt(t))/Math.LN2)+1)}function se(){var t=Lt,e=wt,n=oe;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,s,a=r.length,c=new Array(a);for(i=0;i=h)if(t>=h&&e===wt){const t=ne(l,h,n);isFinite(t)&&(t>0?h=(Math.floor(h/t)+1)*t:t<0&&(h=(Math.ceil(h*-t)+1)/-t))}else f.pop()}for(var p=f.length,d=0,m=p;f[d]<=l;)++d;for(;f[m-1]>h;)--m;(d||m0?f[i-1]:l,y.x1=i0)for(i=0;i=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n=i)&&(n=i)}return n}function ce(t,e){let n,r=-1,i=-1;if(void 0===e)for(const e of t)++i,null!=e&&(n=e)&&(n=e,r=i);else for(let o of t)null!=(o=e(o,++i,t))&&(n=o)&&(n=o,r=i);return r}function ue(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function le(t,e){let n,r=-1,i=-1;if(void 0===e)for(const e of t)++i,null!=e&&(n>e||void 0===n&&e>=e)&&(n=e,r=i);else for(let o of t)null!=(o=e(o,++i,t))&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);return r}function he(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=void 0===i?Wt:qt(i);r>n;){if(r-n>600){const o=r-n+1,s=e-n+1,a=Math.log(o),c=.5*Math.exp(2*a/3),u=.5*Math.sqrt(a*c*(o-c)/o)*(s-o/2<0?-1:1);he(t,e,Math.max(n,Math.floor(e-s*c/o+u)),Math.min(r,Math.floor(e+(o-s)*c/o+u)),i)}const o=t[e];let s=n,a=r;for(fe(t,n,e),i(t[r],o)>0&&fe(t,n,r);s0;)--a}0===i(t[n],o)?fe(t,n,a):(++a,fe(t,a,r)),a<=e&&(n=a+1),e<=a&&(r=a-1)}return t}function fe(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function pe(t,e=X){let n,r=!1;if(1===e.length){let i;for(const o of t){const t=e(o);(r?X(t,i)>0:0===X(t,t))&&(n=o,i=t,r=!0)}}else for(const i of t)(r?e(i,n)>0:0===e(i,i))&&(n=i,r=!0);return n}function de(t,e,n){if(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}(t,n)),(r=t.length)&&!isNaN(e=+e)){if(e<=0||r<2)return ue(t);if(e>=1)return ae(t);var r,i=(r-1)*e,o=Math.floor(i),s=ae(he(t,o).subarray(0,o+1));return s+(ue(t.subarray(o+1))-s)*(i-o)}}function me(t,e,n=tt){if((r=t.length)&&!isNaN(e=+e)){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),s=+n(t[o],o,t);return s+(+n(t[o+1],o+1,t)-s)*(i-o)}}function ye(t,e,n=tt){if(!isNaN(e=+e)){if(r=Float64Array.from(t,((e,r)=>tt(n(t[r],r,t)))),e<=0)return le(r);if(e>=1)return ce(r);var r,i=Uint32Array.from(t,((t,e)=>e)),o=r.length-1,s=Math.floor(o*e);return he(i,s,0,o,((t,e)=>Wt(r[t],r[e]))),(s=pe(i.subarray(0,s+1),(t=>r[t])))>=0?s:-1}}function ge(t,e,n){const r=pt(t),i=de(t,.75)-de(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function ve(t,e,n){const r=pt(t),i=_t(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function be(t,e){let n=0,r=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(++n,r+=e);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function _e(t,e){return de(t,.5,e)}function we(t,e){return ye(t,.5,e)}function xe(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function ke(t,e){const n=new St;if(void 0===e)for(let e of t)null!=e&&e>=e&&n.set(e,(n.get(e)||0)+1);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&i>=i&&n.set(i,(n.get(i)||0)+1)}let r,i=0;for(const[t,e]of n)e>i&&(i=e,r=t);return r}function Te(t,e=Se){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function Se(t,e){return[t,e]}function Ee(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++re(n[t],n[r]);let o,s;return t=Uint32Array.from(n,((t,e)=>e)),t.sort(e===X?(t,e)=>Wt(n[t],n[e]):qt(i)),t.forEach(((t,e)=>{const n=i(t,void 0===o?t:o);n>=0?((void 0===o||n>0)&&(o=t,s=e),r[t]=s):r[t]=NaN})),r}function Oe(t,e=X){let n,r=!1;if(1===e.length){let i;for(const o of t){const t=e(o);(r?X(t,i)<0:0===X(t,t))&&(n=o,i=t,r=!0)}}else for(const i of t)(r?e(i,n)<0:0===e(i,i))&&(n=i,r=!0);return n}function Ne(t,e=X){if(1===e.length)return le(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?0===e(o,o):e(o,n)<0)&&(n=o,r=i);return r}function Ce(t,e=X){if(1===e.length)return ce(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?0===e(o,o):e(o,n)>0)&&(n=o,r=i);return r}function Le(t,e){const n=Ne(t,e);return n<0?void 0:n}const Re=Pe(Math.random);function Pe(t){return function(e,n=0,r=e.length){let i=r-(n=+n);for(;i;){const r=t()*i--|0,o=e[i+n];e[i+n]=e[r+n],e[r+n]=o}return e}}function Ie(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function Me(t){if(!(i=t.length))return[];for(var e=-1,n=ue(t,De),r=new Array(n);++ee(n,r,t)))}function Ve(t,e,n){if("function"!=typeof e)throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,s=-1;if(arguments.length<3){if(({done:i,value:n}=r.next()),i)return;++s}for(;({done:i,value:o}=r.next()),!i;)n=e(n,o,++s,t);return n}function Ke(t){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(t).reverse()}function He(t,...e){t=new Et(t);for(const n of e)for(const e of n)t.delete(e);return t}function qe(t,e){const n=e[Symbol.iterator](),r=new Et;for(const e of t){if(r.has(e))return!1;let t,i;for(;({value:t,done:i}=n.next())&&!i;){if(Object.is(e,t))return!1;r.add(t)}}return!0}function We(t,...e){t=new Et(t),e=e.map(Ge);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function Ge(t){return t instanceof Et?t:new Et(t)}function Ye(t,e){const n=t[Symbol.iterator](),r=new Set;for(const t of e){const e=$e(t);if(r.has(e))continue;let i,o;for(;({value:i,done:o}=n.next());){if(o)return!1;const t=$e(i);if(r.add(t),Object.is(e,t))break}}return!0}function $e(t){return null!==t&&"object"==typeof t?t.valueOf():t}function Xe(t,e){return Ye(e,t)}function Ze(...t){const e=new Et;for(const n of t)for(const t of n)e.add(t);return e}function Je(t){return t}var Qe=1,tn=2,en=3,nn=4,rn=1e-6;function on(t){return"translate("+t+",0)"}function sn(t){return"translate(0,"+t+")"}function an(t){return e=>+t(e)}function cn(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function un(){return!this.__axis}function ln(t,e){var n=[],r=null,i=null,o=6,s=6,a=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=t===Qe||t===nn?-1:1,l=t===nn||t===tn?"x":"y",h=t===Qe||t===en?on:sn;function f(f){var p=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):Je:i,m=Math.max(o,0)+a,y=e.range(),g=+y[0]+c,v=+y[y.length-1]+c,b=(e.bandwidth?cn:an)(e.copy(),c),_=f.selection?f.selection():f,w=_.selectAll(".domain").data([null]),x=_.selectAll(".tick").data(p,e).order(),k=x.exit(),T=x.enter().append("g").attr("class","tick"),S=x.select("line"),E=x.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(T),S=S.merge(T.append("line").attr("stroke","currentColor").attr(l+"2",u*o)),E=E.merge(T.append("text").attr("fill","currentColor").attr(l,u*m).attr("dy",t===Qe?"0em":t===en?"0.71em":"0.32em")),f!==_&&(w=w.transition(f),x=x.transition(f),S=S.transition(f),E=E.transition(f),k=k.transition(f).attr("opacity",rn).attr("transform",(function(t){return isFinite(t=b(t))?h(t+c):this.getAttribute("transform")})),T.attr("opacity",rn).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:b(t))+c)}))),k.remove(),w.attr("d",t===nn||t===tn?s?"M"+u*s+","+g+"H"+c+"V"+v+"H"+u*s:"M"+c+","+g+"V"+v:s?"M"+g+","+u*s+"V"+c+"H"+v+"V"+u*s:"M"+g+","+c+"H"+v),x.attr("opacity",1).attr("transform",(function(t){return h(b(t)+c)})),S.attr(l+"2",u*o),E.attr(l,u*m).text(d),_.filter(un).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===tn?"start":t===nn?"end":"middle"),_.each((function(){this.__axis=b}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(o=s=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(s=+t,f):s},f.tickPadding=function(t){return arguments.length?(a=+t,f):a},f.offset=function(t){return arguments.length?(c=+t,f):c},f}function hn(t){return ln(Qe,t)}function fn(t){return ln(tn,t)}function pn(t){return ln(en,t)}function dn(t){return ln(nn,t)}var mn={value:()=>{}};function yn(){for(var t,e=0,n=arguments.length,r={};e=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),s=-1,a=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++s0)for(var n,r,i=new Array(n),o=0;oe?1:t>=e?0:NaN}Pn.prototype={constructor:Pn,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Fn="http://www.w3.org/1999/xhtml";const Un={svg:"http://www.w3.org/2000/svg",xhtml:Fn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function zn(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Un.hasOwnProperty(e)?{space:Un[e],local:t}:t}function Vn(t){return function(){this.removeAttribute(t)}}function Kn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Hn(t,e){return function(){this.setAttribute(t,e)}}function qn(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Wn(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Gn(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Yn(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function $n(t){return function(){this.style.removeProperty(t)}}function Xn(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Zn(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Jn(t,e){return t.style.getPropertyValue(e)||Yn(t).getComputedStyle(t,null).getPropertyValue(e)}function Qn(t){return function(){delete this[t]}}function tr(t,e){return function(){this[t]=e}}function er(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function nr(t){return t.trim().split(/^|\s+/)}function rr(t){return t.classList||new ir(t)}function ir(t){this._node=t,this._names=nr(t.getAttribute("class")||"")}function or(t,e){for(var n=rr(t),r=-1,i=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Cr=[null];function Lr(t,e){this._groups=t,this._parents=e}function Rr(){return new Lr([[document.documentElement]],Cr)}Lr.prototype=Rr.prototype={constructor:Lr,select:function(t){"function"!=typeof t&&(t=xn(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=w&&(w=_+1);!(b=g[w])&&++w=0;)(r=i[o])&&(s&&4^r.compareDocumentPosition(s)&&s.parentNode.insertBefore(r,s),s=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Bn);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==e?$n:"function"==typeof e?Zn:Xn)(t,e,null==n?"":n)):Jn(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Qn:"function"==typeof e?er:tr)(t,e)):this.node()[t]},classed:function(t,e){var n=nr(t+"");if(arguments.length<2){for(var r=rr(this.node()),i=-1,o=n.length;++i=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),s=o.length;if(!(arguments.length<2)){for(a=e?Er:Sr,r=0;r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ai(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ai(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Xr.exec(t))?new li(e[1],e[2],e[3],1):(e=Zr.exec(t))?new li(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Jr.exec(t))?ai(e[1],e[2],e[3],e[4]):(e=Qr.exec(t))?ai(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ti.exec(t))?yi(e[1],e[2]/100,e[3]/100,1):(e=ei.exec(t))?yi(e[1],e[2]/100,e[3]/100,e[4]):ni.hasOwnProperty(t)?si(ni[t]):"transparent"===t?new li(NaN,NaN,NaN,0):null}function si(t){return new li(t>>16&255,t>>8&255,255&t,1)}function ai(t,e,n,r){return r<=0&&(t=e=n=NaN),new li(t,e,n,r)}function ci(t){return t instanceof Kr||(t=oi(t)),t?new li((t=t.rgb()).r,t.g,t.b,t.opacity):new li}function ui(t,e,n,r){return 1===arguments.length?ci(t):new li(t,e,n,null==r?1:r)}function li(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function hi(){return`#${mi(this.r)}${mi(this.g)}${mi(this.b)}`}function fi(){const t=pi(this.opacity);return`${1===t?"rgb(":"rgba("}${di(this.r)}, ${di(this.g)}, ${di(this.b)}${1===t?")":`, ${t})`}`}function pi(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function di(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function mi(t){return((t=di(t))<16?"0":"")+t.toString(16)}function yi(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new bi(t,e,n,r)}function gi(t){if(t instanceof bi)return new bi(t.h,t.s,t.l,t.opacity);if(t instanceof Kr||(t=oi(t)),!t)return new bi;if(t instanceof bi)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,c=(o+i)/2;return a?(s=e===o?(n-r)/a+6*(n0&&c<1?0:s,new bi(s,a,c,t.opacity)}function vi(t,e,n,r){return 1===arguments.length?gi(t):new bi(t,e,n,null==r?1:r)}function bi(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function _i(t){return(t=(t||0)%360)<0?t+360:t}function wi(t){return Math.max(0,Math.min(1,t||0))}function xi(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function ki(t,e,n,r,i){var o=t*t,s=o*t;return((1-3*t+3*o-s)*e+(4-6*o+3*s)*n+(1+3*t+3*o-3*s)*r+s*i)/6}function Ti(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],s=r>0?t[r-1]:2*i-o,a=r=240?t-240:t+120,i,r),xi(t,i,r),xi(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new bi(_i(this.h),wi(this.s),wi(this.l),pi(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=pi(this.opacity);return`${1===t?"hsl(":"hsla("}${_i(this.h)}, ${100*wi(this.s)}%, ${100*wi(this.l)}%${1===t?")":`, ${t})`}`}}));const Ei=t=>()=>t;function Ai(t,e){return function(n){return t+n*e}}function Oi(t,e){var n=e-t;return n?Ai(t,n>180||n<-180?n-360*Math.round(n/360):n):Ei(isNaN(t)?e:t)}function Ni(t,e){var n=e-t;return n?Ai(t,n):Ei(isNaN(t)?e:t)}const Ci=function t(e){var n=function(t){return 1==(t=+t)?Ni:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ei(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=ui(t)).r,(e=ui(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),s=Ni(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=s(e),t+""}}return r.gamma=t,r}(1);function Li(t){return function(e){var n,r,i=e.length,o=new Array(i),s=new Array(i),a=new Array(i);for(n=0;no&&(i=e.slice(o,i),a[s]?a[s]+=i:a[++s]=i),(n=n[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,c.push({i:s,x:Fi(n,r)})),o=Vi.lastIndex;return o=0&&e._call.call(void 0,t),e=e._next;--$i}function uo(){to=(Qi=no.now())+eo,$i=Xi=0;try{co()}finally{$i=0,function(){for(var t,e,n=Gi,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Gi=e);Yi=t,ho(r)}(),to=0}}function lo(){var t=no.now(),e=t-Qi;e>Ji&&(eo-=e,Qi=t)}function ho(t){$i||(Xi&&(Xi=clearTimeout(Xi)),t-to>24?(t<1/0&&(Xi=setTimeout(uo,t-no.now()-eo)),Zi&&(Zi=clearInterval(Zi))):(Zi||(Qi=no.now(),Zi=setInterval(lo,Ji)),$i=1,ro(uo)))}function fo(t,e,n){var r=new so;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}so.prototype=ao.prototype={constructor:so,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?io():+n)+(null==e?0:+e),this._next||Yi===this||(Yi?Yi._next=this:Gi=this,Yi=this),this._call=t,this._time=n,ho()},stop:function(){this._call&&(this._call=null,this._time=1/0,ho())}};var po=_n("start","end","cancel","interrupt"),mo=[],yo=0,go=1,vo=2,bo=3,_o=5,wo=6;function xo(t,e,n,r,i,o){var s=t.__transition;if(s){if(n in s)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(c){var u,l,h,f;if(n.state!==go)return a();for(u in i)if((f=i[u]).name===n.name){if(f.state===bo)return fo(o);4===f.state?(f.state=wo,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+uyo)throw new Error("too late; already scheduled");return n}function To(t,e){var n=So(t,e);if(n.state>bo)throw new Error("too late; already running");return n}function So(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Eo(t,e){var n,r,i,o=t.__transition,s=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>vo&&n.state<_o,n.state=wo,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):s=!1;s&&delete t.__transition}}var Ao,Oo=180/Math.PI,No={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Co(t,e,n,r,i,o){var s,a,c;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,c/=a),t*r180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Fi(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,s.rotate,a,c),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Fi(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,s.skewX,a,c),function(t,e,n,r,o,s){if(t!==n||e!==r){var a=o.push(i(o)+"scale(",null,",",null,")");s.push({i:a-4,x:Fi(t,n)},{i:a-2,x:Fi(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,a,c),o=s=null,function(t){for(var e,n=-1,r=c.length;++n=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?ko:To;return function(){var s=o(this,t),a=s.on;a!==r&&(i=(r=a).copy()).on(e,n),s.on=i}}(n,t,e))},attr:function(t,e){var n=zn(t),r="transform"===n?Po:jo;return this.attrTween(t,"function"==typeof e?(n.local?Ko:Vo)(n,r,Do(this,"attr."+t,e)):null==e?(n.local?Fo:Bo)(n):(n.local?zo:Uo)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=zn(t);return this.tween(n,(r.local?Ho:qo)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Ro:jo;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=Jn(this,t),s=(this.style.removeProperty(t),Jn(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}(t,r)).on("end.style."+t,Zo(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var s=Jn(this,t),a=n(this),c=a+"";return null==a&&(this.style.removeProperty(t),c=a=Jn(this,t)),s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,a))}}(t,r,Do(this,"style."+t,e))).each(function(t,e){var n,r,i,o,s="style."+e,a="end."+s;return function(){var c=To(this,t),u=c.on,l=null==c.value[s]?o||(o=Zo(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(a,i=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var s=Jn(this,t);return s===o?null:s===r?i:i=e(r=s,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,o,n)),r}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Do(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=So(this.node(),n).tween,o=0,s=i.length;ogo&&n.name===e)return new Qo([[t]],cs,e,+r);return null}const ls=t=>()=>t;function hs(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function fs(t){t.preventDefault(),t.stopImmediatePropagation()}var ps={name:"drag"},ds={name:"space"},ms={name:"handle"},ys={name:"center"};const{abs:gs,max:vs,min:bs}=Math;function _s(t){return[+t[0],+t[1]]}function ws(t){return[_s(t[0]),_s(t[1])]}var xs={name:"x",handles:["w","e"].map(Cs),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ks={name:"y",handles:["n","s"].map(Cs),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Ts={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Cs),input:function(t){return null==t?null:ws(t)},output:function(t){return t}},Ss={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Es={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},As={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Os={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Ns={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Cs(t){return{type:t}}function Ls(t){return!t.ctrlKey&&!t.button}function Rs(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Ps(){return navigator.maxTouchPoints||"ontouchstart"in this}function Is(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Ms(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function Ds(){return Fs(xs)}function js(){return Fs(ks)}function Bs(){return Fs(Ts)}function Fs(t){var e,n=Rs,r=Ls,i=Ps,o=!0,s=_n("start","brush","end"),a=6;function c(e){var n=e.property("__brush",m).selectAll(".overlay").data([Cs("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ss.overlay).merge(n).each((function(){var t=Is(this).extent;Ir(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([Cs("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Ss.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return Ss[t.type]})),e.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(i).on("touchstart.brush",f).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function u(){var t=Ir(this),e=Is(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-a/2:e[0][0]-a/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-a/2:e[0][1]-a/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+a:a})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+a:a}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new h(t,e,n):r}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function f(n){if((!e||n.touches)&&r.apply(this,arguments)){var i,s,a,c,h,f,p,d,m,y,g,v=this,b=n.target.__data__.type,_="selection"===(o&&n.metaKey?b="overlay":b)?ps:o&&n.altKey?ys:ms,w=t===ks?null:Os[b],x=t===xs?null:Ns[b],k=Is(v),T=k.extent,S=k.selection,E=T[0][0],A=T[0][1],O=T[1][0],N=T[1][1],C=0,L=0,R=w&&x&&o&&n.shiftKey,P=Array.from(n.touches||[n],(t=>{const e=t.identifier;return(t=Wi(t,v)).point0=t.slice(),t.identifier=e,t}));Eo(v);var I=l(v,arguments,!0).beforestart();if("overlay"===b){S&&(m=!0);const e=[P[0],P[1]||P[0]];k.selection=S=[[i=t===ks?E:bs(e[0][0],e[1][0]),a=t===xs?A:bs(e[0][1],e[1][1])],[h=t===ks?O:vs(e[0][0],e[1][0]),p=t===xs?N:vs(e[0][1],e[1][1])]],P.length>1&&F(n)}else i=S[0][0],a=S[0][1],h=S[1][0],p=S[1][1];s=i,c=a,f=h,d=p;var M=Ir(v).attr("pointer-events","none"),D=M.selectAll(".overlay").attr("cursor",Ss[b]);if(n.touches)I.moved=B,I.ended=U;else{var j=Ir(n.view).on("mousemove.brush",B,!0).on("mouseup.brush",U,!0);o&&j.on("keydown.brush",(function(t){switch(t.keyCode){case 16:R=w&&x;break;case 18:_===ms&&(w&&(h=f-C*w,i=s+C*w),x&&(p=d-L*x,a=c+L*x),_=ys,F(t));break;case 32:_!==ms&&_!==ys||(w<0?h=f-C:w>0&&(i=s-C),x<0?p=d-L:x>0&&(a=c-L),_=ds,D.attr("cursor",Ss.selection),F(t));break;default:return}fs(t)}),!0).on("keyup.brush",(function(t){switch(t.keyCode){case 16:R&&(y=g=R=!1,F(t));break;case 18:_===ys&&(w<0?h=f:w>0&&(i=s),x<0?p=d:x>0&&(a=c),_=ms,F(t));break;case 32:_===ds&&(t.altKey?(w&&(h=f-C*w,i=s+C*w),x&&(p=d-L*x,a=c+L*x),_=ys):(w<0?h=f:w>0&&(i=s),x<0?p=d:x>0&&(a=c),_=ms),D.attr("cursor",Ss[b]),F(t));break;default:return}fs(t)}),!0),Fr(n.view)}u.call(v),I.start(n,_.name)}function B(t){for(const e of t.changedTouches||[t])for(const t of P)t.identifier===e.identifier&&(t.cur=Wi(e,v));if(R&&!y&&!g&&1===P.length){const t=P[0];gs(t.cur[0]-t[0])>gs(t.cur[1]-t[1])?g=!0:y=!0}for(const t of P)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);m=!0,fs(t),F(t)}function F(t){const e=P[0],n=e.point0;var r;switch(C=e[0]-n[0],L=e[1]-n[1],_){case ds:case ps:w&&(C=vs(E-i,bs(O-h,C)),s=i+C,f=h+C),x&&(L=vs(A-a,bs(N-p,L)),c=a+L,d=p+L);break;case ms:P[1]?(w&&(s=vs(E,bs(O,P[0][0])),f=vs(E,bs(O,P[1][0])),w=1),x&&(c=vs(A,bs(N,P[0][1])),d=vs(A,bs(N,P[1][1])),x=1)):(w<0?(C=vs(E-i,bs(O-i,C)),s=i+C,f=h):w>0&&(C=vs(E-h,bs(O-h,C)),s=i,f=h+C),x<0?(L=vs(A-a,bs(N-a,L)),c=a+L,d=p):x>0&&(L=vs(A-p,bs(N-p,L)),c=a,d=p+L));break;case ys:w&&(s=vs(E,bs(O,i-C*w)),f=vs(E,bs(O,h+C*w))),x&&(c=vs(A,bs(N,a-L*x)),d=vs(A,bs(N,p+L*x)))}ft+n))}function $s(){return Js(!1,!1)}function Xs(){return Js(!1,!0)}function Zs(){return Js(!0,!1)}function Js(t,e){var n=0,r=null,i=null,o=null;function s(s){var a,c=s.length,u=new Array(c),l=Ys(0,c),h=new Array(c*c),f=new Array(c),p=0;s=Float64Array.from({length:c*c},e?(t,e)=>s[e%c][e/c|0]:(t,e)=>s[e/c|0][e%c]);for(let e=0;er(u[t],u[e])));for(const n of l){const r=e;if(t){const t=Ys(1+~c,c).filter((t=>t<0?s[~t*c+n]:s[n*c+t]));i&&t.sort(((t,e)=>i(t<0?-s[~t*c+n]:s[n*c+t],e<0?-s[~e*c+n]:s[n*c+e])));for(const r of t)r<0?(h[~r*c+n]||(h[~r*c+n]={source:null,target:null})).target={index:n,startAngle:e,endAngle:e+=s[~r*c+n]*p,value:s[~r*c+n]}:(h[n*c+r]||(h[n*c+r]={source:null,target:null})).source={index:n,startAngle:e,endAngle:e+=s[n*c+r]*p,value:s[n*c+r]};f[n]={index:n,startAngle:r,endAngle:e,value:u[n]}}else{const t=Ys(0,c).filter((t=>s[n*c+t]||s[t*c+n]));i&&t.sort(((t,e)=>i(s[n*c+t],s[n*c+e])));for(const r of t){let t;if(n=0))throw new Error(`invalid digits: ${t}`);if(e>15)return ra;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;eea)if(Math.abs(l*a-c*u)>ea&&i){let f=n-o,p=r-s,d=a*a+c*c,m=f*f+p*p,y=Math.sqrt(d),g=Math.sqrt(h),v=i*Math.tan((Qs-Math.acos((d+h-m)/(2*y*g)))/2),b=v/g,_=v/y;Math.abs(b-1)>ea&&this._append`L${t+b*u},${e+b*l}`,this._append`A${i},${i},0,0,${+(l*f>u*p)},${this._x1=t+_*a},${this._y1=e+_*c}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,n,r,i,o){if(t=+t,e=+e,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(r),a=n*Math.sin(r),c=t+s,u=e+a,l=1^o,h=o?r-i:i-r;null===this._x1?this._append`M${c},${u}`:(Math.abs(this._x1-c)>ea||Math.abs(this._y1-u)>ea)&&this._append`L${c},${u}`,n&&(h<0&&(h=h%ta+ta),h>na?this._append`A${n},${n},0,1,${l},${t-s},${e-a}A${n},${n},0,1,${l},${this._x1=c},${this._y1=u}`:h>ea&&this._append`A${n},${n},0,${+(h>=Qs)},${l},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function oa(){return new ia}function sa(t=3){return new ia(+t)}oa.prototype=ia.prototype;var aa=Array.prototype.slice;function ca(t){return function(){return t}}function ua(t){return t.source}function la(t){return t.target}function ha(t){return t.radius}function fa(t){return t.startAngle}function pa(t){return t.endAngle}function da(){return 0}function ma(){return 10}function ya(t){var e=ua,n=la,r=ha,i=ha,o=fa,s=pa,a=da,c=null;function u(){var u,l=e.apply(this,arguments),h=n.apply(this,arguments),f=a.apply(this,arguments)/2,p=aa.call(arguments),d=+r.apply(this,(p[0]=l,p)),m=o.apply(this,p)-Hs,y=s.apply(this,p)-Hs,g=+i.apply(this,(p[0]=h,p)),v=o.apply(this,p)-Hs,b=s.apply(this,p)-Hs;if(c||(c=u=oa()),f>Gs&&(Us(y-m)>2*f+Gs?y>m?(m+=f,y-=f):(m-=f,y+=f):m=y=(m+y)/2,Us(b-v)>2*f+Gs?b>v?(v+=f,b-=f):(v-=f,b+=f):v=b=(v+b)/2),c.moveTo(d*zs(m),d*Vs(m)),c.arc(0,0,d,m,y),m!==v||y!==b)if(t){var _=g-+t.apply(this,arguments),w=(v+b)/2;c.quadraticCurveTo(0,0,_*zs(v),_*Vs(v)),c.lineTo(g*zs(w),g*Vs(w)),c.lineTo(_*zs(b),_*Vs(b))}else c.quadraticCurveTo(0,0,g*zs(v),g*Vs(v)),c.arc(0,0,g,v,b);if(c.quadraticCurveTo(0,0,d*zs(m),d*Vs(m)),c.closePath(),u)return c=null,u+""||null}return t&&(u.headRadius=function(e){return arguments.length?(t="function"==typeof e?e:ca(+e),u):t}),u.radius=function(t){return arguments.length?(r=i="function"==typeof t?t:ca(+t),u):r},u.sourceRadius=function(t){return arguments.length?(r="function"==typeof t?t:ca(+t),u):r},u.targetRadius=function(t){return arguments.length?(i="function"==typeof t?t:ca(+t),u):i},u.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:ca(+t),u):o},u.endAngle=function(t){return arguments.length?(s="function"==typeof t?t:ca(+t),u):s},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:ca(+t),u):a},u.source=function(t){return arguments.length?(e=t,u):e},u.target=function(t){return arguments.length?(n=t,u):n},u.context=function(t){return arguments.length?(c=null==t?null:t,u):c},u}function ga(){return ya()}function va(){return ya(ma)}const ba=Math.PI/180,_a=180/Math.PI,wa=.96422,xa=1,ka=.82521,Ta=4/29,Sa=6/29,Ea=3*Sa*Sa,Aa=Sa*Sa*Sa;function Oa(t){if(t instanceof La)return new La(t.l,t.a,t.b,t.opacity);if(t instanceof Fa)return Ua(t);t instanceof li||(t=ci(t));var e,n,r=Ma(t.r),i=Ma(t.g),o=Ma(t.b),s=Ra((.2225045*r+.7168786*i+.0606169*o)/xa);return r===i&&i===o?e=n=s:(e=Ra((.4360747*r+.3850649*i+.1430804*o)/wa),n=Ra((.0139322*r+.0971045*i+.7141733*o)/ka)),new La(116*s-16,500*(e-s),200*(s-n),t.opacity)}function Na(t,e){return new La(t,0,0,null==e?1:e)}function Ca(t,e,n,r){return 1===arguments.length?Oa(t):new La(t,e,n,null==r?1:r)}function La(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Ra(t){return t>Aa?Math.pow(t,1/3):t/Ea+Ta}function Pa(t){return t>Sa?t*t*t:Ea*(t-Ta)}function Ia(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ma(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Da(t){if(t instanceof Fa)return new Fa(t.h,t.c,t.l,t.opacity);if(t instanceof La||(t=Oa(t)),0===t.a&&0===t.b)return new Fa(NaN,0()=>t;function tc(t,e){for(var n,r=-1,i=e.length;++rr!=p>r&&n<(f-u)*(r-l)/(p-l)+u&&(i=-i)}return i}function nc(t,e,n){var r,i,o,s;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],o=n[r],s=e[r],i<=o&&o<=s||s<=o&&o<=i)}function rc(){}var ic=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function oc(){var t=1,e=1,n=oe,r=a;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Ja);else{const n=wt(t,sc);for(e=ee(...ie(n[0],n[1],e),e);e[e.length-1]>=n[1];)e.pop();for(;e[1]o(t,e)))}function o(n,i){const o=null==i?NaN:+i;if(isNaN(o))throw new Error(`invalid value: ${i}`);var a=[],c=[];return function(n,r,i){var o,a,c,u,l,h,f=new Array,p=new Array;for(o=a=-1,u=ac(n[0],r),ic[u<<1].forEach(d);++o=r,ic[l<<2].forEach(d);++o0?a.push([t]):c.push(t)})),c.forEach((function(t){for(var e,n=0,r=a.length;n0&&o0&&s=0&&o>=0))throw new Error("invalid size");return t=r,e=o,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Qa(Za.call(t)):Qa(t),i):n},i.smooth=function(t){return arguments.length?(r=t?a:rc,i):r===a},i}function sc(t){return isFinite(t)?t:NaN}function ac(t,e){return null!=t&&+t>=e}function cc(t){return null==t||isNaN(t=+t)?-1/0:t}function uc(t,e,n,r){const i=r-e,o=n-e,s=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(s)?t:t+s-.5}function lc(t){return t[0]}function hc(t){return t[1]}function fc(){return 1}function pc(){var t=lc,e=hc,n=fc,r=960,i=500,o=20,s=2,a=3*o,c=r+2*a>>s,u=i+2*a>>s,l=Qa(20);function h(r){var i=new Float32Array(c*u),l=Math.pow(2,-s),h=-1;for(const o of r){var f=(t(o,++h,r)+a)*l,p=(e(o,h,r)+a)*l,d=+n(o,h,r);if(d&&f>=0&&f=0&&pt*r)))(e).map(((t,e)=>(t.value=+n[e],p(t))))}function p(t){return t.coordinates.forEach(d),t}function d(t){t.forEach(m)}function m(t){t.forEach(y)}function y(t){t[0]=t[0]*Math.pow(2,s)-a,t[1]=t[1]*Math.pow(2,s)-a}function g(){return c=r+2*(a=3*o)>>s,u=i+2*a>>s,f}return f.contours=function(t){var e=h(t),n=oc().size([c,u]),r=Math.pow(2,2*s),i=t=>{t=+t;var i=p(n.contour(e,t*r));return i.value=t,i};return Object.defineProperty(i,"max",{get:()=>ae(e)/r}),i},f.x=function(e){return arguments.length?(t="function"==typeof e?e:Qa(+e),f):t},f.y=function(t){return arguments.length?(e="function"==typeof t?t:Qa(+t),f):e},f.weight=function(t){return arguments.length?(n="function"==typeof t?t:Qa(+t),f):n},f.size=function(t){if(!arguments.length)return[r,i];var e=+t[0],n=+t[1];if(!(e>=0&&n>=0))throw new Error("invalid size");return r=e,i=n,g()},f.cellSize=function(t){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return s=Math.floor(Math.log(t)/Math.LN2),g()},f.thresholds=function(t){return arguments.length?(l="function"==typeof t?t:Array.isArray(t)?Qa(Za.call(t)):Qa(t),f):l},f.bandwidth=function(t){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*t*t+1)-1)/2,g()},f}const dc=134217729;function mc(t,e,n,r,i){let o,s,a,c,u=e[0],l=r[0],h=0,f=0;l>u==l>-u?(o=u,u=e[++h]):(o=l,l=r[++f]);let p=0;if(hu==l>-u?(s=u+o,a=o-(s-u),u=e[++h]):(s=l+o,a=o-(s-l),l=r[++f]),o=s,0!==a&&(i[p++]=a);hu==l>-u?(s=o+u,c=s-o,a=o-(s-c)+(u-c),u=e[++h]):(s=o+l,c=s-o,a=o-(s-c)+(l-c),l=r[++f]),o=s,0!==a&&(i[p++]=a);for(;h=33306690738754716e-32*u?c:-function(t,e,n,r,i,o,s){let a,c,u,l,h,f,p,d,m,y,g,v,b,_,w,x,k,T;const S=t-i,E=n-i,A=e-o,O=r-o;_=S*O,f=dc*S,p=f-(f-S),d=S-p,f=dc*O,m=f-(f-O),y=O-m,w=d*y-(_-p*m-d*m-p*y),x=A*E,f=dc*A,p=f-(f-A),d=A-p,f=dc*E,m=f-(f-E),y=E-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,gc[0]=w-(g+h)+(h-k),v=_+g,h=v-_,b=_-(v-h)+(g-h),g=b-x,h=b-g,gc[1]=b-(g+h)+(h-x),T=v+g,h=T-v,gc[2]=v-(T-h)+(g-h),gc[3]=T;let N=function(t,e){let n=e[0];for(let t=1;t<4;t++)n+=e[t];return n}(0,gc),C=22204460492503146e-32*s;if(N>=C||-N>=C)return N;if(h=t-S,a=t-(S+h)+(h-i),h=n-E,u=n-(E+h)+(h-i),h=e-A,c=e-(A+h)+(h-o),h=r-O,l=r-(O+h)+(h-o),0===a&&0===c&&0===u&&0===l)return N;if(C=11093356479670487e-47*s+33306690738754706e-32*Math.abs(N),N+=S*l+O*a-(A*u+E*c),N>=C||-N>=C)return N;_=a*O,f=dc*a,p=f-(f-a),d=a-p,f=dc*O,m=f-(f-O),y=O-m,w=d*y-(_-p*m-d*m-p*y),x=c*E,f=dc*c,p=f-(f-c),d=c-p,f=dc*E,m=f-(f-E),y=E-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,wc[0]=w-(g+h)+(h-k),v=_+g,h=v-_,b=_-(v-h)+(g-h),g=b-x,h=b-g,wc[1]=b-(g+h)+(h-x),T=v+g,h=T-v,wc[2]=v-(T-h)+(g-h),wc[3]=T;const L=mc(4,gc,4,wc,vc);_=S*l,f=dc*S,p=f-(f-S),d=S-p,f=dc*l,m=f-(f-l),y=l-m,w=d*y-(_-p*m-d*m-p*y),x=A*u,f=dc*A,p=f-(f-A),d=A-p,f=dc*u,m=f-(f-u),y=u-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,wc[0]=w-(g+h)+(h-k),v=_+g,h=v-_,b=_-(v-h)+(g-h),g=b-x,h=b-g,wc[1]=b-(g+h)+(h-x),T=v+g,h=T-v,wc[2]=v-(T-h)+(g-h),wc[3]=T;const R=mc(L,vc,4,wc,bc);_=a*l,f=dc*a,p=f-(f-a),d=a-p,f=dc*l,m=f-(f-l),y=l-m,w=d*y-(_-p*m-d*m-p*y),x=c*u,f=dc*c,p=f-(f-c),d=c-p,f=dc*u,m=f-(f-u),y=u-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,wc[0]=w-(g+h)+(h-k),v=_+g,h=v-_,b=_-(v-h)+(g-h),g=b-x,h=b-g,wc[1]=b-(g+h)+(h-x),T=v+g,h=T-v,wc[2]=v-(T-h)+(g-h),wc[3]=T;const P=mc(R,bc,4,wc,_c);return _c[P-1]}(t,e,n,r,i,o,u)}yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(8),yc(8),yc(8),yc(4),yc(8),yc(8),yc(8),yc(12),yc(192),yc(192),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(8),yc(8),yc(8),yc(8),yc(8),yc(8),yc(8),yc(8),yc(8),yc(4),yc(4),yc(4),yc(8),yc(16),yc(16),yc(16),yc(32),yc(32),yc(48),yc(64),yc(1152),yc(1152),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(4),yc(24),yc(24),yc(24),yc(24),yc(24),yc(24),yc(24),yc(24),yc(24),yc(24),yc(1152),yc(1152),yc(1152),yc(1152),yc(1152),yc(2304),yc(2304),yc(3456),yc(5760),yc(8),yc(8),yc(8),yc(16),yc(24),yc(48),yc(48),yc(96),yc(192),yc(384),yc(384),yc(384),yc(768),yc(96),yc(96),yc(96),yc(1152);const kc=Math.pow(2,-52),Tc=new Uint32Array(512);class Sc{static from(t,e=Lc,n=Rc){const r=t.length,i=new Float64Array(2*r);for(let o=0;o>1;if(e>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const n=Math.max(2*e-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(e)),this._hullPrev=new Uint32Array(e),this._hullNext=new Uint32Array(e),this._hullTri=new Uint32Array(e),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(e),this._dists=new Float64Array(e),this.update()}update(){const{coords:t,_hullPrev:e,_hullNext:n,_hullTri:r,_hullHash:i}=this,o=t.length>>1;let s=1/0,a=1/0,c=-1/0,u=-1/0;for(let e=0;ec&&(c=n),r>u&&(u=r),this._ids[e]=e}const l=(s+c)/2,h=(a+u)/2;let f,p,d;for(let e=0,n=1/0;e0&&(p=e,n=r)}let g=t[2*p],v=t[2*p+1],b=1/0;for(let e=0;er&&(e[n++]=i,r=o)}return this.hull=e.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(xc(m,y,g,v,_,w)<0){const t=p,e=g,n=v;p=d,g=_,v=w,d=t,_=e,w=n}const x=function(t,e,n,r,i,o){const s=n-t,a=r-e,c=i-t,u=o-e,l=s*s+a*a,h=c*c+u*u,f=.5/(s*u-a*c);return{x:t+(u*l-a*h)*f,y:e+(s*h-c*l)*f}}(m,y,g,v,_,w);this._cx=x.x,this._cy=x.y;for(let e=0;e0&&Math.abs(u-o)<=kc&&Math.abs(l-s)<=kc)continue;if(o=u,s=l,c===f||c===p||c===d)continue;let h=0;for(let t=0,e=this._hashKey(u,l);t=0;)if(y=m,y===h){y=-1;break}if(-1===y)continue;let g=this._addTriangle(y,c,n[y],-1,-1,r[y]);r[c]=this._legalize(g+2),r[y]=g,k++;let v=n[y];for(;m=n[v],xc(u,l,t[2*v],t[2*v+1],t[2*m],t[2*m+1])<0;)g=this._addTriangle(v,c,m,r[c],-1,r[v]),r[c]=this._legalize(g+2),n[v]=v,k--,v=m;if(y===h)for(;m=e[y],xc(u,l,t[2*m],t[2*m+1],t[2*y],t[2*y+1])<0;)g=this._addTriangle(m,c,y,-1,r[y],r[m]),this._legalize(g+2),r[m]=g,n[y]=y,k--,y=m;this._hullStart=e[c]=y,n[y]=e[v]=c,n[c]=v,i[this._hashKey(u,l)]=c,i[this._hashKey(t[2*y],t[2*y+1])]=y}this.hull=new Uint32Array(k);for(let t=0,e=this._hullStart;t0?3-n:1+n)/4}(t-this._cx,e-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:e,_halfedges:n,coords:r}=this;let i=0,o=0;for(;;){const s=n[t],a=t-t%3;if(o=a+(t+2)%3,-1===s){if(0===i)break;t=Tc[--i];continue}const c=s-s%3,u=a+(t+1)%3,l=c+(s+2)%3,h=e[o],f=e[t],p=e[u],d=e[l];if(Ac(r[2*h],r[2*h+1],r[2*f],r[2*f+1],r[2*p],r[2*p+1],r[2*d],r[2*d+1])){e[t]=d,e[s]=h;const r=n[l];if(-1===r){let e=this._hullStart;do{if(this._hullTri[e]===l){this._hullTri[e]=t;break}e=this._hullPrev[e]}while(e!==this._hullStart)}this._link(t,r),this._link(s,n[o]),this._link(o,l);const a=c+(s+1)%3;i=n&&e[t[s]]>o;)t[s+1]=t[s--];t[s+1]=r}else{let i=n+1,o=r;Cc(t,n+r>>1,i),e[t[n]]>e[t[r]]&&Cc(t,n,r),e[t[i]]>e[t[r]]&&Cc(t,i,r),e[t[n]]>e[t[i]]&&Cc(t,n,i);const s=t[i],a=e[s];for(;;){do{i++}while(e[t[i]]a);if(o=o-n?(Nc(t,e,i,r),Nc(t,e,n,o-1)):(Nc(t,e,n,o-1),Nc(t,e,i,r))}}function Cc(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Lc(t){return t[0]}function Rc(t){return t[1]}const Pc=1e-6;class Ic{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,e){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,e){this._+=`L${this._x1=+t},${this._y1=+e}`}arc(t,e,n){const r=(t=+t)+(n=+n),i=e=+e;if(n<0)throw new Error("negative radius");null===this._x1?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>Pc||Math.abs(this._y1-i)>Pc)&&(this._+="L"+r+","+i),n&&(this._+=`A${n},${n},0,1,1,${t-n},${e}A${n},${n},0,1,1,${this._x1=r},${this._y1=i}`)}rect(t,e,n,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${+n}v${+r}h${-n}Z`}value(){return this._||null}}class Mc{constructor(){this._=[]}moveTo(t,e){this._.push([t,e])}closePath(){this._.push(this._[0].slice())}lineTo(t,e){this._.push([t,e])}value(){return this._.length?this._:null}}class Dc{constructor(t,[e,n,r,i]=[0,0,960,500]){if(!((r=+r)>=(e=+e)&&(i=+i)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=r,this.xmin=e,this.ymax=i,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:e,triangles:n},vectors:r}=this;let i,o;const s=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let r,a,c=0,u=0,l=n.length;c1;)i-=2;for(let t=2;t0){if(e>=this.ymax)return null;(i=(this.ymax-e)/r)0){if(t>=this.xmax)return null;(i=(this.xmax-t)/n)this.xmax?2:0)|(ethis.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let e=0;e2&&function(t){const{triangles:e,coords:n}=t;for(let t=0;t1e-10)return!1}return!0}(t)){this.collinear=Int32Array.from({length:e.length/2},((t,e)=>e)).sort(((t,n)=>e[2*t]-e[2*n]||e[2*t+1]-e[2*n+1]));const t=this.collinear[0],n=this.collinear[this.collinear.length-1],r=[e[2*t],e[2*t+1],e[2*n],e[2*n+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let t=0,n=e.length/2;t0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],o[r[0]]=1,2===r.length&&(o[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(t){return new Dc(this,t)}*neighbors(t){const{inedges:e,hull:n,_hullIndex:r,halfedges:i,triangles:o,collinear:s}=this;if(s){const e=s.indexOf(t);return e>0&&(yield s[e-1]),void(e=0&&i!==n&&i!==r;)n=i;return i}_step(t,e,n){const{inedges:r,hull:i,_hullIndex:o,halfedges:s,triangles:a,points:c}=this;if(-1===r[t]||!c.length)return(t+1)%(c.length>>1);let u=t,l=Bc(e-c[2*t],2)+Bc(n-c[2*t+1],2);const h=r[t];let f=h;do{let r=a[f];const h=Bc(e-c[2*r],2)+Bc(n-c[2*r+1],2);if(h()=>t;function Hc(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:s,y:a,dx:c,dy:u,dispatch:l}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:l}})}function qc(t){return!t.ctrlKey&&!t.button}function Wc(){return this.parentNode}function Gc(t,e){return null==e?{x:t.x,y:t.y}:e}function Yc(){return navigator.maxTouchPoints||"ontouchstart"in this}function $c(){var t,e,n,r,i=qc,o=Wc,s=Gc,a=Yc,c={},u=_n("start","drag","end"),l=0,h=0;function f(t){t.on("mousedown.drag",p).filter(a).on("touchstart.drag",y).on("touchmove.drag",g,Mr).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(s,a){if(!r&&i.call(this,s,a)){var c=b(this,o.call(this,s,a),s,a,"mouse");c&&(Ir(s.view).on("mousemove.drag",d,Dr).on("mouseup.drag",m,Dr),Fr(s.view),jr(s),n=!1,t=s.clientX,e=s.clientY,c("start",s))}}function d(r){if(Br(r),!n){var i=r.clientX-t,o=r.clientY-e;n=i*i+o*o>h}c.mouse("drag",r)}function m(t){Ir(t.view).on("mousemove.drag mouseup.drag",null),Ur(t.view,n),Br(t),c.mouse("end",t)}function y(t,e){if(i.call(this,t,e)){var n,r,s=t.changedTouches,a=o.call(this,t,e),c=s.length;for(n=0;n=o?c=!0:(r=t.charCodeAt(s++))===Qc?u=!0:r===tu&&(u=!0,t.charCodeAt(s)===Qc&&++s),t.slice(i+1,e-1).replace(/""/g,'"')}for(;s9999?"+"+ru(e,6):ru(e,4))+"-"+ru(t.getUTCMonth()+1,2)+"-"+ru(t.getUTCDate(),2)+(o?"T"+ru(n,2)+":"+ru(r,2)+":"+ru(i,2)+"."+ru(o,3)+"Z":i?"T"+ru(n,2)+":"+ru(r,2)+":"+ru(i,2)+"Z":r||n?"T"+ru(n,2)+":"+ru(r,2)+"Z":"")}(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,o=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=eu(t);return function(r,i){return e(n(r),i,t)}}(t,e):eu(t)}));return o.columns=i||[],o},parseRows:r,format:function(e,n){return null==n&&(n=nu(e)),[n.map(s).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=nu(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:s}}var ou=iu(","),su=ou.parse,au=ou.parseRows,cu=ou.format,uu=ou.formatBody,lu=ou.formatRows,hu=ou.formatRow,fu=ou.formatValue,pu=iu("\t"),du=pu.parse,mu=pu.parseRows,yu=pu.format,gu=pu.formatBody,vu=pu.formatRows,bu=pu.formatRow,_u=pu.formatValue;function wu(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;xu&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const xu=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),ku=t=>+t;function Tu(t){return t*t}function Su(t){return t*(2-t)}function Eu(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var Au=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),Ou=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),Nu=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Cu=Math.PI,Lu=Cu/2;function Ru(t){return 1==+t?1:1-Math.cos(t*Lu)}function Pu(t){return Math.sin(t*Lu)}function Iu(t){return(1-Math.cos(Cu*t))/2}function Mu(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Du(t){return Mu(1-+t)}function ju(t){return 1-Mu(t)}function Bu(t){return((t*=2)<=1?Mu(1-t):2-Mu(t-1))/2}function Fu(t){return 1-Math.sqrt(1-t*t)}function Uu(t){return Math.sqrt(1- --t*t)}function zu(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Vu=4/11,Ku=6/11,Hu=8/11,qu=3/4,Wu=9/11,Gu=10/11,Yu=15/16,$u=21/22,Xu=63/64,Zu=1/Vu/Vu;function Ju(t){return 1-Qu(1-t)}function Qu(t){return(t=+t)dl(e,n).then((e=>(new DOMParser).parseFromString(e,t)))}const kl=xl("application/xml");var Tl=xl("text/html"),Sl=xl("image/svg+xml");function El(t,e){var n,r=1;function i(){var i,o,s=n.length,a=0,c=0;for(i=0;i=(o=(m+g)/2))?m=o:g=o,(l=n>=(s=(y+v)/2))?y=s:v=s,i=p,!(p=p[h=l<<1|u]))return i[h]=d,t;if(a=+t._x.call(null,p.data),c=+t._y.call(null,p.data),e===a&&n===c)return d.next=p,i?i[h]=d:t._root=d,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(u=e>=(o=(m+g)/2))?m=o:g=o,(l=n>=(s=(y+v)/2))?y=s:v=s}while((h=l<<1|u)==(f=(c>=s)<<1|a>=o));return i[f]=p,i[h]=d,t}function Ol(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Nl(t){return t[0]}function Cl(t){return t[1]}function Ll(t,e,n){var r=new Rl(null==e?Nl:e,null==n?Cl:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Rl(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Pl(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Il=Ll.prototype=Rl.prototype;function Ml(t){return function(){return t}}function Dl(t){return 1e-6*(t()-.5)}function jl(t){return t.x+t.vx}function Bl(t){return t.y+t.vy}function Fl(t){var e,n,r,i=1,o=1;function s(){for(var t,s,c,u,l,h,f,p=e.length,d=0;du+d||ol+d||sc.index){var m=u-a.x-a.vx,y=l-a.y-a.vy,g=m*m+y*y;gt.r&&(t.r=t[e].r)}function c(){if(e){var r,i,o=e.length;for(n=new Array(o),r=0;r[a(t,e,r),t])));for(s=0,i=new Array(u);sl&&(l=r),ih&&(h=i));if(c>l||u>h)return this;for(this.cover(c,u).cover(l,h),n=0;nt||t>=i||r>e||e>=o;)switch(a=(ef||(o=c.y0)>p||(s=c.x1)=g)<<1|t>=y)&&(c=d[d.length-1],d[d.length-1]=d[d.length-1-u],d[d.length-1-u]=c)}else{var v=t-+this._x.call(null,m.data),b=e-+this._y.call(null,m.data),_=v*v+b*b;if(_=(a=(d+y)/2))?d=a:y=a,(l=s>=(c=(m+g)/2))?m=c:g=c,e=p,!(p=p[h=l<<1|u]))return this;if(!p.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,f=h)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):e?(i?e[h]=i:delete e[h],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[f]=p:this._root=p),this):(this._root=i,this)},Il.removeAll=function(t){for(var e=0,n=t.length;e(t=(Kl*t+Hl)%ql)/ql}();function h(){f(),u.call("tick",e),n1?(null==n?a.delete(t):a.set(t,d(n)),e):a.get(t)},find:function(e,n,r){var i,o,s,a,c,u=0,l=t.length;for(null==r?r=1/0:r*=r,u=0;u1?(u.on(t,n),e):u.on(t)}}}function Zl(){var t,e,n,r,i,o=Ml(-30),s=1,a=1/0,c=.81;function u(n){var i,o=t.length,s=Ll(t,Wl,Gl).visitAfter(h);for(r=n,i=0;i=a)){(t.data!==e||t.next)&&(0===h&&(d+=(h=Dl(n))*h),0===f&&(d+=(f=Dl(n))*f),d1?r[0]+r.slice(2):r,+t.slice(n+1)]}function nh(t){return(t=eh(Math.abs(t)))?t[1]:NaN}var rh,ih=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function oh(t){if(!(e=ih.exec(t)))throw new Error("invalid format: "+t);var e;return new sh({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function sh(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function ah(t,e){var n=eh(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}oh.prototype=sh.prototype,sh.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const ch={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>ah(100*t,e),r:ah,s:function(t,e){var n=eh(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(rh=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+eh(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function uh(t){return t}var lh,hh,fh,ph=Array.prototype.map,dh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function mh(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?uh:(e=ph.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],s=0,a=e[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),o.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=e[s=(s+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",s=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?uh:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(ph.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=oh(t)).fill,n=t.align,h=t.sign,f=t.symbol,p=t.zero,d=t.width,m=t.comma,y=t.precision,g=t.trim,v=t.type;"n"===v?(m=!0,v="g"):ch[v]||(void 0===y&&(y=12),g=!0,v="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var b="$"===f?i:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",_="$"===f?o:/[%p]/.test(v)?c:"",w=ch[v],x=/[defgprs%]/.test(v);function k(t){var i,o,c,f=b,k=_;if("c"===v)k=w(t)+k,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:w(Math.abs(t),y),g&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==h&&(T=!1),f=(T?"("===h?h:u:"-"===h||"("===h?"":h)+f,k=("s"===v?dh[8+rh/3]:"")+k+(T&&"("===h?")":""),x)for(i=-1,o=t.length;++i(c=t.charCodeAt(i))||c>57){k=(46===c?s+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}m&&!p&&(t=r(t,1/0));var S=f.length+t.length+k.length,E=S>1)+f+t+k+E.slice(S);break;default:t=E+f+t+k}return a(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=oh(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(nh(e)/3))),i=Math.pow(10,-r),o=dh[8+r/3];return function(t){return n(i*t)+o}}}}function yh(t){return lh=mh(t),hh=lh.format,fh=lh.formatPrefix,lh}function gh(t){return Math.max(0,-nh(Math.abs(t)))}function vh(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(nh(e)/3)))-nh(Math.abs(t)))}function bh(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,nh(e)-nh(t))+1}yh({thousands:",",grouping:[3],currency:["$",""]});var _h=1e-6,wh=1e-12,xh=Math.PI,kh=xh/2,Th=xh/4,Sh=2*xh,Eh=180/xh,Ah=xh/180,Oh=Math.abs,Nh=Math.atan,Ch=Math.atan2,Lh=Math.cos,Rh=Math.ceil,Ph=Math.exp,Ih=(Math.floor,Math.hypot),Mh=Math.log,Dh=Math.pow,jh=Math.sin,Bh=Math.sign||function(t){return t>0?1:t<0?-1:0},Fh=Math.sqrt,Uh=Math.tan;function zh(t){return t>1?0:t<-1?xh:Math.acos(t)}function Vh(t){return t>1?kh:t<-1?-kh:Math.asin(t)}function Kh(t){return(t=jh(t/2))*t}function Hh(){}function qh(t,e){t&&Gh.hasOwnProperty(t.type)&&Gh[t.type](t,e)}var Wh={Feature:function(t,e){qh(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,o=Lh(e=(e*=Ah)/2+Th),s=jh(e),a=ef*s,c=tf*o+a*Lh(i),u=a*r*jh(i);df.add(Ch(u,c)),Qh=t,tf=o,ef=s}function wf(t){return mf=new xt,Xh(t,yf),2*mf}function xf(t){return[Ch(t[1],t[0]),Vh(t[2])]}function kf(t){var e=t[0],n=t[1],r=Lh(n);return[r*Lh(e),r*jh(e),jh(n)]}function Tf(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Sf(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Ef(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Af(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Of(t){var e=Fh(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Nf,Cf,Lf,Rf,Pf,If,Mf,Df,jf,Bf,Ff,Uf,zf,Vf,Kf,Hf,qf={point:Wf,lineStart:Yf,lineEnd:$f,polygonStart:function(){qf.point=Xf,qf.lineStart=Zf,qf.lineEnd=Jf,hf=new xt,yf.polygonStart()},polygonEnd:function(){yf.polygonEnd(),qf.point=Wf,qf.lineStart=Yf,qf.lineEnd=$f,df<0?(nf=-(of=180),rf=-(sf=90)):hf>_h?sf=90:hf<-_h&&(rf=-90),pf[0]=nf,pf[1]=of},sphere:function(){nf=-(of=180),rf=-(sf=90)}};function Wf(t,e){ff.push(pf=[nf=t,of=t]),esf&&(sf=e)}function Gf(t,e){var n=kf([t*Ah,e*Ah]);if(lf){var r=Sf(lf,n),i=Sf([r[1],-r[0],0],r);Of(i),i=xf(i);var o,s=t-af,a=s>0?1:-1,c=i[0]*Eh*a,u=Oh(s)>180;u^(a*afsf&&(sf=o):u^(a*af<(c=(c+360)%360-180)&&csf&&(sf=e)),u?tQf(nf,of)&&(of=t):Qf(t,of)>Qf(nf,of)&&(nf=t):of>=nf?(tof&&(of=t)):t>af?Qf(nf,t)>Qf(nf,of)&&(of=t):Qf(t,of)>Qf(nf,of)&&(nf=t)}else ff.push(pf=[nf=t,of=t]);esf&&(sf=e),lf=n,af=t}function Yf(){qf.point=Gf}function $f(){pf[0]=nf,pf[1]=of,qf.point=Wf,lf=null}function Xf(t,e){if(lf){var n=t-af;hf.add(Oh(n)>180?n+(n>0?360:-360):n)}else cf=t,uf=e;yf.point(t,e),Gf(t,e)}function Zf(){yf.lineStart()}function Jf(){Xf(cf,uf),yf.lineEnd(),Oh(hf)>_h&&(nf=-(of=180)),pf[0]=nf,pf[1]=of,lf=null}function Qf(t,e){return(e-=t)<0?e+360:e}function tp(t,e){return t[0]-e[0]}function ep(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eQf(r[0],r[1])&&(r[1]=i[1]),Qf(i[0],r[1])>Qf(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(s=-1/0,e=0,r=o[n=o.length-1];e<=n;r=i,++e)i=o[e],(a=Qf(r[1],i[0]))>s&&(s=a,nf=i[0],of=r[1])}return ff=pf=null,nf===1/0||rf===1/0?[[NaN,NaN],[NaN,NaN]]:[[nf,rf],[of,sf]]}var rp={sphere:Hh,point:ip,lineStart:sp,lineEnd:up,polygonStart:function(){rp.lineStart=lp,rp.lineEnd=hp},polygonEnd:function(){rp.lineStart=sp,rp.lineEnd=up}};function ip(t,e){t*=Ah;var n=Lh(e*=Ah);op(n*Lh(t),n*jh(t),jh(e))}function op(t,e,n){++Nf,Lf+=(t-Lf)/Nf,Rf+=(e-Rf)/Nf,Pf+=(n-Pf)/Nf}function sp(){rp.point=ap}function ap(t,e){t*=Ah;var n=Lh(e*=Ah);Vf=n*Lh(t),Kf=n*jh(t),Hf=jh(e),rp.point=cp,op(Vf,Kf,Hf)}function cp(t,e){t*=Ah;var n=Lh(e*=Ah),r=n*Lh(t),i=n*jh(t),o=jh(e),s=Ch(Fh((s=Kf*o-Hf*i)*s+(s=Hf*r-Vf*o)*s+(s=Vf*i-Kf*r)*s),Vf*r+Kf*i+Hf*o);Cf+=s,If+=s*(Vf+(Vf=r)),Mf+=s*(Kf+(Kf=i)),Df+=s*(Hf+(Hf=o)),op(Vf,Kf,Hf)}function up(){rp.point=ip}function lp(){rp.point=fp}function hp(){pp(Uf,zf),rp.point=ip}function fp(t,e){Uf=t,zf=e,t*=Ah,e*=Ah,rp.point=pp;var n=Lh(e);Vf=n*Lh(t),Kf=n*jh(t),Hf=jh(e),op(Vf,Kf,Hf)}function pp(t,e){t*=Ah;var n=Lh(e*=Ah),r=n*Lh(t),i=n*jh(t),o=jh(e),s=Kf*o-Hf*i,a=Hf*r-Vf*o,c=Vf*i-Kf*r,u=Ih(s,a,c),l=Vh(u),h=u&&-l/u;jf.add(h*s),Bf.add(h*a),Ff.add(h*c),Cf+=l,If+=l*(Vf+(Vf=r)),Mf+=l*(Kf+(Kf=i)),Df+=l*(Hf+(Hf=o)),op(Vf,Kf,Hf)}function dp(t){Nf=Cf=Lf=Rf=Pf=If=Mf=Df=0,jf=new xt,Bf=new xt,Ff=new xt,Xh(t,rp);var e=+jf,n=+Bf,r=+Ff,i=Ih(e,n,r);return ixh&&(t-=Math.round(t/Sh)*Sh),[t,e]}function vp(t,e,n){return(t%=Sh)?e||n?yp(_p(t),wp(e,n)):_p(t):e||n?wp(e,n):gp}function bp(t){return function(e,n){return Oh(e+=t)>xh&&(e-=Math.round(e/Sh)*Sh),[e,n]}}function _p(t){var e=bp(t);return e.invert=bp(-t),e}function wp(t,e){var n=Lh(t),r=jh(t),i=Lh(e),o=jh(e);function s(t,e){var s=Lh(e),a=Lh(t)*s,c=jh(t)*s,u=jh(e),l=u*n+a*r;return[Ch(c*i-l*o,a*n-u*r),Vh(l*i+c*o)]}return s.invert=function(t,e){var s=Lh(e),a=Lh(t)*s,c=jh(t)*s,u=jh(e),l=u*i-c*o;return[Ch(c*i+u*o,a*n+l*r),Vh(l*n-a*r)]},s}function xp(t){function e(e){return(e=t(e[0]*Ah,e[1]*Ah))[0]*=Eh,e[1]*=Eh,e}return t=vp(t[0]*Ah,t[1]*Ah,t.length>2?t[2]*Ah:0),e.invert=function(e){return(e=t.invert(e[0]*Ah,e[1]*Ah))[0]*=Eh,e[1]*=Eh,e},e}function kp(t,e,n,r,i,o){if(n){var s=Lh(e),a=jh(e),c=r*n;null==i?(i=e+r*Sh,o=e-c/2):(i=Tp(s,i),o=Tp(s,o),(r>0?io)&&(i+=r*Sh));for(var u,l=i;r>0?l>o:l1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Ap(t,e){return Oh(t[0]-e[0])<_h&&Oh(t[1]-e[1])<_h}function Op(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Np(t,e,n,r,i){var o,s,a=[],c=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],s=t[e];if(Ap(r,s)){if(!r[2]&&!s[2]){for(i.lineStart(),o=0;o=0;--o)i.point((l=u[o])[0],l[1]);else r(f.x,f.p.x,-1,i);f=f.p}u=(f=f.o).z,p=!p}while(!f.v);i.lineEnd()}}}function Cp(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r=0?1:-1,E=S*T,A=E>xh,O=y*x;if(c.add(Ch(O*S*jh(E),g*k+O*Lh(E))),s+=A?T+S*Sh:T,A^d>=n^_>=n){var N=Sf(kf(p),kf(b));Of(N);var C=Sf(o,N);Of(C);var L=(A^T>=0?-1:1)*Vh(C[2]);(r>L||r===L&&(N[0]||N[1]))&&(a+=A^T>=0?1:-1)}}return(s<-_h||s<_h&&c<-wh)^1&a}function Pp(t,e,n,r){return function(i){var o,s,a,c=e(i),u=Ep(),l=e(u),h=!1,f={point:p,lineStart:m,lineEnd:y,polygonStart:function(){f.point=g,f.lineStart=v,f.lineEnd=b,s=[],o=[]},polygonEnd:function(){f.point=p,f.lineStart=m,f.lineEnd=y,s=xe(s);var t=Rp(o,r);s.length?(h||(i.polygonStart(),h=!0),Np(s,Mp,t,n,i)):t&&(h||(i.polygonStart(),h=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),h&&(i.polygonEnd(),h=!1),s=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(e,n){t(e,n)&&i.point(e,n)}function d(t,e){c.point(t,e)}function m(){f.point=d,c.lineStart()}function y(){f.point=p,c.lineEnd()}function g(t,e){a.push([t,e]),l.point(t,e)}function v(){l.lineStart(),a=[]}function b(){g(a[0][0],a[0][1]),l.lineEnd();var t,e,n,r,c=l.clean(),f=u.result(),p=f.length;if(a.pop(),o.push(a),a=null,p)if(1&c){if((e=(n=f[0]).length-1)>0){for(h||(i.polygonStart(),h=!0),i.lineStart(),t=0;t1&&2&c&&f.push(f.pop().concat(f.shift())),s.push(f.filter(Ip))}return f}}function Ip(t){return t.length>1}function Mp(t,e){return((t=t.x)[0]<0?t[1]-kh-_h:kh-t[1])-((e=e.x)[0]<0?e[1]-kh-_h:kh-e[1])}gp.invert=gp;const Dp=Pp((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,s){var a=o>0?xh:-xh,c=Oh(o-n);Oh(c-xh)<_h?(t.point(n,r=(r+s)/2>0?kh:-kh),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(o,r),e=0):i!==a&&c>=xh&&(Oh(n-i)<_h&&(n-=i*_h),Oh(o-a)<_h&&(o-=a*_h),r=function(t,e,n,r){var i,o,s=jh(t-n);return Oh(s)>_h?Nh((jh(e)*(o=Lh(r))*jh(n)-jh(r)*(i=Lh(e))*jh(t))/(i*o*s)):(e+r)/2}(n,r,o,s),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),e=0),t.point(n=o,r=s),i=a},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*kh,r.point(-xh,i),r.point(0,i),r.point(xh,i),r.point(xh,0),r.point(xh,-i),r.point(0,-i),r.point(-xh,-i),r.point(-xh,0),r.point(-xh,i);else if(Oh(t[0]-e[0])>_h){var o=t[0]0,i=Oh(e)>_h;function o(t,n){return Lh(t)*Lh(n)>e}function s(t,n,r){var i=[1,0,0],o=Sf(kf(t),kf(n)),s=Tf(o,o),a=o[0],c=s-a*a;if(!c)return!r&&t;var u=e*s/c,l=-e*a/c,h=Sf(i,o),f=Af(i,u);Ef(f,Af(o,l));var p=h,d=Tf(f,p),m=Tf(p,p),y=d*d-m*(Tf(f,f)-1);if(!(y<0)){var g=Fh(y),v=Af(p,(-d-g)/m);if(Ef(v,f),v=xf(v),!r)return v;var b,_=t[0],w=n[0],x=t[1],k=n[1];w<_&&(b=_,_=w,w=b);var T=w-_,S=Oh(T-xh)<_h;if(!S&&k0^v[1]<(Oh(v[0]-_)<_h?x:k):x<=v[1]&&v[1]<=k:T>xh^(_<=v[0]&&v[0]<=w)){var E=Af(p,(-d+g)/m);return Ef(E,f),[v,xf(E)]}}}function a(e,n){var i=r?t:xh-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return Pp(o,(function(t){var e,n,c,u,l;return{lineStart:function(){u=c=!1,l=1},point:function(h,f){var p,d=[h,f],m=o(h,f),y=r?m?0:a(h,f):m?a(h+(h<0?xh:-xh),f):0;if(!e&&(u=c=m)&&t.lineStart(),m!==c&&(!(p=s(e,d))||Ap(e,p)||Ap(d,p))&&(d[2]=1),m!==c)l=0,m?(t.lineStart(),p=s(d,e),t.point(p[0],p[1])):(p=s(e,d),t.point(p[0],p[1],2),t.lineEnd()),e=p;else if(i&&e&&r^m){var g;y&n||!(g=s(d,e,!0))||(l=0,r?(t.lineStart(),t.point(g[0][0],g[0][1]),t.point(g[1][0],g[1][1]),t.lineEnd()):(t.point(g[1][0],g[1][1]),t.lineEnd(),t.lineStart(),t.point(g[0][0],g[0][1],3)))}!m||e&&Ap(e,d)||t.point(d[0],d[1]),e=d,c=m,n=y},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return l|(u&&c)<<1}}}),(function(e,r,i,o){kp(o,t,n,i,e,r)}),r?[0,-t]:[-xh,t-xh])}var Bp,Fp,Up,zp,Vp=1e9,Kp=-Vp;function Hp(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,a,u){var l=0,h=0;if(null==i||(l=s(i,a))!==(h=s(o,a))||c(i,o)<0^a>0)do{u.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+a+4)%4)!==h);else u.point(o[0],o[1])}function s(r,i){return Oh(r[0]-t)<_h?i>0?0:3:Oh(r[0]-n)<_h?i>0?2:1:Oh(r[1]-e)<_h?i>0?1:0:i>0?3:2}function a(t,e){return c(t.x,e.x)}function c(t,e){var n=s(t,1),r=s(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(s){var c,u,l,h,f,p,d,m,y,g,v,b=s,_=Ep(),w={point:x,lineStart:function(){w.point=k,u&&u.push(l=[]),g=!0,y=!1,d=m=NaN},lineEnd:function(){c&&(k(h,f),p&&y&&_.rejoin(),c.push(_.result())),w.point=x,y&&b.lineEnd()},polygonStart:function(){b=_,c=[],u=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;nr&&(f-o)*(r-s)>(p-s)*(t-o)&&++e:p<=r&&(f-o)*(r-s)<(p-s)*(t-o)&&--e;return e}(),n=v&&e,i=(c=xe(c)).length;(n||i)&&(s.polygonStart(),n&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),i&&Np(c,a,e,o,s),s.polygonEnd()),b=s,c=u=l=null}};function x(t,e){i(t,e)&&b.point(t,e)}function k(o,s){var a=i(o,s);if(u&&l.push([o,s]),g)h=o,f=s,p=a,g=!1,a&&(b.lineStart(),b.point(o,s));else if(a&&y)b.point(o,s);else{var c=[d=Math.max(Kp,Math.min(Vp,d)),m=Math.max(Kp,Math.min(Vp,m))],_=[o=Math.max(Kp,Math.min(Vp,o)),s=Math.max(Kp,Math.min(Vp,s))];!function(t,e,n,r,i,o){var s,a=t[0],c=t[1],u=0,l=1,h=e[0]-a,f=e[1]-c;if(s=n-a,h||!(s>0)){if(s/=h,h<0){if(s0){if(s>l)return;s>u&&(u=s)}if(s=i-a,h||!(s<0)){if(s/=h,h<0){if(s>l)return;s>u&&(u=s)}else if(h>0){if(s0)){if(s/=f,f<0){if(s0){if(s>l)return;s>u&&(u=s)}if(s=o-c,f||!(s<0)){if(s/=f,f<0){if(s>l)return;s>u&&(u=s)}else if(f>0){if(s0&&(t[0]=a+u*h,t[1]=c+u*f),l<1&&(e[0]=a+l*h,e[1]=c+l*f),!0}}}}}(c,_,t,e,n,r)?a&&(b.lineStart(),b.point(o,s),v=!1):(y||(b.lineStart(),b.point(c[0],c[1])),b.point(_[0],_[1]),a||b.lineEnd(),v=!1)}d=o,m=s,y=a}return w}}function qp(){var t,e,n,r=0,i=0,o=960,s=500;return n={stream:function(n){return t&&e===n?t:t=Hp(r,i,o,s)(e=n)},extent:function(a){return arguments.length?(r=+a[0][0],i=+a[0][1],o=+a[1][0],s=+a[1][1],t=e=null,n):[[r,i],[o,s]]}}}var Wp={sphere:Hh,point:Hh,lineStart:function(){Wp.point=Yp,Wp.lineEnd=Gp},lineEnd:Hh,polygonStart:Hh,polygonEnd:Hh};function Gp(){Wp.point=Wp.lineEnd=Hh}function Yp(t,e){Fp=t*=Ah,Up=jh(e*=Ah),zp=Lh(e),Wp.point=$p}function $p(t,e){t*=Ah;var n=jh(e*=Ah),r=Lh(e),i=Oh(t-Fp),o=Lh(i),s=r*jh(i),a=zp*n-Up*r*o,c=Up*n+zp*r*o;Bp.add(Ch(Fh(s*s+a*a),c)),Fp=t,Up=n,zp=r}function Xp(t){return Bp=new xt,Xh(t,Wp),+Bp}var Zp=[null,null],Jp={type:"LineString",coordinates:Zp};function Qp(t,e){return Zp[0]=t,Zp[1]=e,Xp(Jp)}var td={Feature:function(t,e){return nd(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r0&&(i=Qp(t[o],t[o-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))_h})).map(c)).concat(Ee(Rh(o/p)*p,i,p).filter((function(t){return Oh(t%m)>_h})).map(u))}return g.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},g.outline=function(){return{type:"Polygon",coordinates:[l(r).concat(h(s).slice(1),l(n).reverse().slice(1),h(a).reverse().slice(1))]}},g.extent=function(t){return arguments.length?g.extentMajor(t).extentMinor(t):g.extentMinor()},g.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],a=+t[0][1],s=+t[1][1],r>n&&(t=r,r=n,n=t),a>s&&(t=a,a=s,s=t),g.precision(y)):[[r,a],[n,s]]},g.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),g.precision(y)):[[e,o],[t,i]]},g.step=function(t){return arguments.length?g.stepMajor(t).stepMinor(t):g.stepMinor()},g.stepMajor=function(t){return arguments.length?(d=+t[0],m=+t[1],g):[d,m]},g.stepMinor=function(t){return arguments.length?(f=+t[0],p=+t[1],g):[f,p]},g.precision=function(f){return arguments.length?(y=+f,c=ud(o,i,90),u=ld(e,t,y),l=ud(a,s,90),h=ld(r,n,y),g):y},g.extentMajor([[-180,-90+_h],[180,90-_h]]).extentMinor([[-180,-80-_h],[180,80+_h]])}function fd(){return hd()()}function pd(t,e){var n=t[0]*Ah,r=t[1]*Ah,i=e[0]*Ah,o=e[1]*Ah,s=Lh(r),a=jh(r),c=Lh(o),u=jh(o),l=s*Lh(n),h=s*jh(n),f=c*Lh(i),p=c*jh(i),d=2*Vh(Fh(Kh(o-r)+s*c*Kh(i-n))),m=jh(d),y=d?function(t){var e=jh(t*=d)/m,n=jh(d-t)/m,r=n*l+e*f,i=n*h+e*p,o=n*a+e*u;return[Ch(i,r)*Eh,Ch(o,Fh(r*r+i*i))*Eh]}:function(){return[n*Eh,r*Eh]};return y.distance=d,y}const dd=t=>t;var md,yd,gd,vd,bd=new xt,_d=new xt,wd={point:Hh,lineStart:Hh,lineEnd:Hh,polygonStart:function(){wd.lineStart=xd,wd.lineEnd=Sd},polygonEnd:function(){wd.lineStart=wd.lineEnd=wd.point=Hh,bd.add(Oh(_d)),_d=new xt},result:function(){var t=bd/2;return bd=new xt,t}};function xd(){wd.point=kd}function kd(t,e){wd.point=Td,md=gd=t,yd=vd=e}function Td(t,e){_d.add(vd*t-gd*e),gd=t,vd=e}function Sd(){Td(md,yd)}const Ed=wd;var Ad=1/0,Od=Ad,Nd=-Ad,Cd=Nd,Ld={point:function(t,e){tNd&&(Nd=t),eCd&&(Cd=e)},lineStart:Hh,lineEnd:Hh,polygonStart:Hh,polygonEnd:Hh,result:function(){var t=[[Ad,Od],[Nd,Cd]];return Nd=Cd=-(Od=Ad=1/0),t}};const Rd=Ld;var Pd,Id,Md,Dd,jd=0,Bd=0,Fd=0,Ud=0,zd=0,Vd=0,Kd=0,Hd=0,qd=0,Wd={point:Gd,lineStart:Yd,lineEnd:Zd,polygonStart:function(){Wd.lineStart=Jd,Wd.lineEnd=Qd},polygonEnd:function(){Wd.point=Gd,Wd.lineStart=Yd,Wd.lineEnd=Zd},result:function(){var t=qd?[Kd/qd,Hd/qd]:Vd?[Ud/Vd,zd/Vd]:Fd?[jd/Fd,Bd/Fd]:[NaN,NaN];return jd=Bd=Fd=Ud=zd=Vd=Kd=Hd=qd=0,t}};function Gd(t,e){jd+=t,Bd+=e,++Fd}function Yd(){Wd.point=$d}function $d(t,e){Wd.point=Xd,Gd(Md=t,Dd=e)}function Xd(t,e){var n=t-Md,r=e-Dd,i=Fh(n*n+r*r);Ud+=i*(Md+t)/2,zd+=i*(Dd+e)/2,Vd+=i,Gd(Md=t,Dd=e)}function Zd(){Wd.point=Gd}function Jd(){Wd.point=tm}function Qd(){em(Pd,Id)}function tm(t,e){Wd.point=em,Gd(Pd=Md=t,Id=Dd=e)}function em(t,e){var n=t-Md,r=e-Dd,i=Fh(n*n+r*r);Ud+=i*(Md+t)/2,zd+=i*(Dd+e)/2,Vd+=i,Kd+=(i=Dd*t-Md*e)*(Md+t),Hd+=i*(Dd+e),qd+=3*i,Gd(Md=t,Dd=e)}const nm=Wd;function rm(t){this._context=t}rm.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Sh)}},result:Hh};var im,om,sm,am,cm,um=new xt,lm={point:Hh,lineStart:function(){lm.point=hm},lineEnd:function(){im&&fm(om,sm),lm.point=Hh},polygonStart:function(){im=!0},polygonEnd:function(){im=null},result:function(){var t=+um;return um=new xt,t}};function hm(t,e){lm.point=fm,om=am=t,sm=cm=e}function fm(t,e){am-=t,cm-=e,um.add(Fh(am*am+cm*cm)),am=t,cm=e}const pm=lm;let dm,mm,ym,gm;class vm{constructor(t){this._append=null==t?bm:function(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return bm;if(e!==dm){const t=10**e;dm=e,mm=function(e){let n=1;this._+=e[0];for(const r=e.length;n=0))throw new RangeError(`invalid digits: ${t}`);i=e}return null===e&&(r=new vm(i)),s},s.projection(t).digits(i).context(e)}function wm(t){return{stream:xm(t)}}function xm(t){return function(e){var n=new km;for(var r in t)n[r]=t[r];return n.stream=e,n}}function km(){}function Tm(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Xh(n,t.stream(Rd)),e(Rd.result()),null!=r&&t.clipExtent(r),t}function Sm(t,e,n){return Tm(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),s=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,a=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([s,a])}),n)}function Em(t,e,n){return Sm(t,[[0,0],e],n)}function Am(t,e,n){return Tm(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,s=-i*n[0][1];t.scale(150*i).translate([o,s])}),n)}function Om(t,e,n){return Tm(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],s=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,s])}),n)}km.prototype={constructor:km,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Nm=16,Cm=Lh(30*Ah);function Lm(t,e){return+e?function(t,e){function n(r,i,o,s,a,c,u,l,h,f,p,d,m,y){var g=u-r,v=l-i,b=g*g+v*v;if(b>4*e&&m--){var _=s+f,w=a+p,x=c+d,k=Fh(_*_+w*w+x*x),T=Vh(x/=k),S=Oh(Oh(x)-1)<_h||Oh(o-h)<_h?(o+h)/2:Ch(w,_),E=t(S,T),A=E[0],O=E[1],N=A-r,C=O-i,L=v*N-g*C;(L*L/b>e||Oh((g*N+v*C)/b-.5)>.3||s*f+a*p+c*d2?t[2]%360*Ah:0,N()):[y*Eh,g*Eh,v*Eh]},A.angle=function(t){return arguments.length?(b=t%360*Ah,N()):b*Eh},A.reflectX=function(t){return arguments.length?(_=t?-1:1,N()):_<0},A.reflectY=function(t){return arguments.length?(w=t?-1:1,N()):w<0},A.precision=function(t){return arguments.length?(s=Lm(a,E=t*t),C()):Fh(E)},A.fitExtent=function(t,e){return Sm(A,t,e)},A.fitSize=function(t,e){return Em(A,t,e)},A.fitWidth=function(t,e){return Am(A,t,e)},A.fitHeight=function(t,e){return Om(A,t,e)},function(){return e=t.apply(this,arguments),A.invert=e.invert&&O,N()}}function Dm(t){var e=0,n=xh/3,r=Mm(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Ah,n=t[1]*Ah):[e*Eh,n*Eh]},i}function jm(t,e){var n=jh(t),r=(n+jh(e))/2;if(Oh(r)<_h)return function(t){var e=Lh(t);function n(t,n){return[t*e,jh(n)/e]}return n.invert=function(t,n){return[t/e,Vh(n*e)]},n}(t);var i=1+n*(2*r-n),o=Fh(i)/r;function s(t,e){var n=Fh(i-2*r*jh(e))/r;return[n*jh(t*=r),o-n*Lh(t)]}return s.invert=function(t,e){var n=o-e,s=Ch(t,Oh(n))*Bh(n);return n*r<0&&(s-=xh*Bh(t)*Bh(n)),[s/r,Vh((i-(t*t+n*n)*r*r)/(2*r))]},s}function Bm(){return Dm(jm).scale(155.424).center([0,33.6442])}function Fm(){return Bm().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Um(){var t,e,n,r,i,o,s=Fm(),a=Bm().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=Bm().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){o=[t,e]}};function l(t){var e=t[0],s=t[1];return o=null,n.point(e,s),o||(r.point(e,s),o)||(i.point(e,s),o)}function h(){return t=e=null,l}return l.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:s).invert(t)},l.stream=function(n){return t&&e===n?t:(r=[s.stream(e=n),a.stream(n),c.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n0?e<-kh+_h&&(e=-kh+_h):e>kh-_h&&(e=kh-_h);var n=i/Dh(Xm(e),r);return[n*jh(r*t),i-n*Lh(r*t)]}return o.invert=function(t,e){var n=i-e,o=Bh(r)*Fh(t*t+n*n),s=Ch(t,Oh(n))*Bh(n);return n*r<0&&(s-=xh*Bh(t)*Bh(n)),[s/r,2*Nh(Dh(i/o,1/r))-kh]},o}function Jm(){return Dm(Zm).scale(109.5).parallels([30,30])}function Qm(t,e){return[t,e]}function ty(){return Im(Qm).scale(152.63)}function ey(t,e){var n=Lh(t),r=t===e?jh(t):(n-Lh(e))/(e-t),i=n/r+t;if(Oh(r)<_h)return Qm;function o(t,e){var n=i-e,o=r*t;return[n*jh(o),i-n*Lh(o)]}return o.invert=function(t,e){var n=i-e,o=Ch(t,Oh(n))*Bh(n);return n*r<0&&(o-=xh*Bh(t)*Bh(n)),[o/r,i-Bh(r)*Fh(t*t+n*n)]},o}function ny(){return Dm(ey).scale(131.154).center([0,13.9389])}qm.invert=Vm((function(t){return t})),Gm.invert=function(t,e){return[t,2*Nh(Ph(e))-kh]},Qm.invert=Qm;var ry=1.340264,iy=-.081106,oy=893e-6,sy=.003796,ay=Fh(3)/2;function cy(t,e){var n=Vh(ay*jh(e)),r=n*n,i=r*r*r;return[t*Lh(n)/(ay*(ry+3*iy*r+i*(7*oy+9*sy*r))),n*(ry+iy*r+i*(oy+sy*r))]}function uy(){return Im(cy).scale(177.158)}function ly(t,e){var n=Lh(e),r=Lh(t)*n;return[n*jh(t)/r,jh(e)/r]}function hy(){return Im(ly).scale(144.049).clipAngle(60)}function fy(){var t,e,n,r,i,o,s,a=1,c=0,u=0,l=1,h=1,f=0,p=null,d=1,m=1,y=xm({point:function(t,e){var n=b([t,e]);this.stream.point(n[0],n[1])}}),g=dd;function v(){return d=a*l,m=a*h,o=s=null,b}function b(n){var r=n[0]*d,i=n[1]*m;if(f){var o=i*t-r*e;r=r*t+i*e,i=o}return[r+c,i+u]}return b.invert=function(n){var r=n[0]-c,i=n[1]-u;if(f){var o=i*t+r*e;r=r*t-i*e,i=o}return[r/d,i/m]},b.stream=function(t){return o&&s===t?o:o=y(g(s=t))},b.postclip=function(t){return arguments.length?(g=t,p=n=r=i=null,v()):g},b.clipExtent=function(t){return arguments.length?(g=null==t?(p=n=r=i=null,dd):Hp(p=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),v()):null==p?null:[[p,n],[r,i]]},b.scale=function(t){return arguments.length?(a=+t,v()):a},b.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],v()):[c,u]},b.angle=function(n){return arguments.length?(e=jh(f=n%360*Ah),t=Lh(f),v()):f*Eh},b.reflectX=function(t){return arguments.length?(l=t?-1:1,v()):l<0},b.reflectY=function(t){return arguments.length?(h=t?-1:1,v()):h<0},b.fitExtent=function(t,e){return Sm(b,t,e)},b.fitSize=function(t,e){return Em(b,t,e)},b.fitWidth=function(t,e){return Am(b,t,e)},b.fitHeight=function(t,e){return Om(b,t,e)},b}function py(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function dy(){return Im(py).scale(175.295)}function my(t,e){return[Lh(e)*jh(t),jh(e)]}function yy(){return Im(my).scale(249.5).clipAngle(90+_h)}function gy(t,e){var n=Lh(e),r=1+Lh(t)*n;return[n*jh(t)/r,jh(e)/r]}function vy(){return Im(gy).scale(250).clipAngle(142)}function by(t,e){return[Mh(Uh((kh+e)/2)),-t]}function _y(){var t=$m(by),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function wy(t,e){return t.parent===e.parent?1:2}function xy(t,e){return t+e.x}function ky(t,e){return Math.max(t,e.y)}function Ty(){var t=wy,e=1,n=1,r=!1;function i(i){var o,s=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(xy,0)/t.length}(n),e.y=function(t){return 1+t.reduce(ky,0)}(n)):(e.x=o?s+=t(e,o):0,e.y=0,o=e)}));var a=function(t){for(var e;e=t.children;)t=e[0];return t}(i),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=a.x-t(a,c)/2,l=c.x+t(c,a)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(l-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function Sy(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function Ey(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Oy)):void 0===e&&(e=Ay);for(var n,r,i,o,s,a=new Ly(t),c=[a];n=c.pop();)if((i=e(n.data))&&(s=(i=Array.from(i)).length))for(n.children=i,o=s-1;o>=0;--o)c.push(r=i[o]=new Ly(i[o])),r.parent=n,r.depth=n.depth+1;return a.eachBefore(Cy)}function Ay(t){return t.children}function Oy(t){return Array.isArray(t)?t[1]:null}function Ny(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Cy(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Ly(t){this.data=t,this.depth=this.height=0,this.parent=null}function Ry(t){return null==t?null:Py(t)}function Py(t){if("function"!=typeof t)throw new Error;return t}function Iy(){return 0}function My(t){return function(){return t}}cy.invert=function(t,e){for(var n,r=e,i=r*r,o=i*i*i,s=0;s<12&&(o=(i=(r-=n=(r*(ry+iy*i+o*(oy+sy*i))-e)/(ry+3*iy*i+o*(7*oy+9*sy*i)))*r)*i*i,!(Oh(n)_h&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},my.invert=Vm(Vh),gy.invert=Vm((function(t){return 2*Nh(t)})),by.invert=function(t,e){return[-e,2*Nh(Ph(t))-kh]},Ly.prototype=Ey.prototype={constructor:Ly,count:function(){return this.eachAfter(Sy)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,o=this,s=[o],a=[],c=-1;o=s.pop();)if(a.push(o),n=o.children)for(r=0,i=n.length;r=0;--r)o.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return Ey(this).eachBefore(Ny)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,o=[i];do{for(t=o.reverse(),o=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n(t=(Dy*t+jy)%By)/By}function Uy(t){return zy(t,Fy())}function zy(t,e){for(var n,r,i=0,o=(t=function(t,e){let n,r,i=t.length;for(;i;)r=e()*i--|0,n=t[i],t[i]=t[r],t[r]=n;return t}(Array.from(t),e)).length,s=[];i0&&n*n>r*r+i*i}function qy(t,e){for(var n=0;n1e-6?(A+Math.sqrt(A*A-4*E*O))/(2*E):O/A);return{x:r+x+k*N,y:i+T+S*N,r:N}}function $y(t,e,n){var r,i,o,s,a=t.x-e.x,c=t.y-e.y,u=a*a+c*c;u?(i=e.r+n.r,i*=i,s=t.r+n.r,i>(s*=s)?(r=(u+s-i)/(2*u),o=Math.sqrt(Math.max(0,s/u-r*r)),n.x=t.x-r*a-o*c,n.y=t.y-r*c+o*a):(r=(u+i-s)/(2*u),o=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*a-o*c,n.y=e.y+r*c+o*a)):(n.x=e.x+n.r,n.y=e.y)}function Xy(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Zy(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function Jy(t){this._=t,this.next=null,this.previous=null}function Qy(t,e){if(!(s=(n=t,t="object"==typeof n&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,o,s,a,c,u,l,h,f,p;if((r=t[0]).x=0,r.y=0,!(s>1))return r.r;if(i=t[1],r.x=-i.r,i.x=r.r,i.y=0,!(s>2))return r.r+i.r;$y(i,r,o=t[2]),r=new Jy(r),i=new Jy(i),o=new Jy(o),r.next=o.previous=i,i.next=r.previous=o,o.next=i.previous=r;t:for(u=3;ufunction(t){let e=(t=`${t}`).length;return yg(t,e-1)&&!yg(t,e-2)&&(t=t.slice(0,-1)),"/"===t[0]?t:`/${t}`}(t(e,n,r)))),n=e.map(mg),i=new Set(e).add("");for(const t of n)i.has(t)||(i.add(t),e.push(t),n.push(mg(t)),f.push(hg));p=(t,n)=>e[n],d=(t,e)=>n[e]}for(s=0,i=f.length;s=0&&(u=f[t]).data===hg;--t)u.data=null}if(a.parent=ug,a.eachBefore((function(t){t.depth=t.parent.depth+1,--i})).eachBefore(Cy),a.parent=null,i>0)throw new Error("cycle");return a}return r.id=function(t){return arguments.length?(e=Ry(t),r):e},r.parentId=function(t){return arguments.length?(n=Ry(t),r):n},r.path=function(e){return arguments.length?(t=Ry(e),r):t},r}function mg(t){let e=t.length;if(e<2)return"";for(;--e>1&&!yg(t,e););return t.slice(0,e)}function yg(t,e){if("/"===t[e]){let n=0;for(;e>0&&"\\"===t[--e];)++n;if(!(1&n))return!0}return!1}function gg(t,e){return t.parent===e.parent?1:2}function vg(t){var e=t.children;return e?e[0]:t.t}function bg(t){var e=t.children;return e?e[e.length-1]:t.t}function _g(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function wg(t,e,n){return t.a.parent===e.parent?t.a:n}function xg(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function kg(){var t=gg,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,o,s=new xg(t,0),a=[s];e=a.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)a.push(n=e.children[i]=new xg(r[i],i)),n.parent=e;return(s.parent=new xg(null,0)).children=[s],s}(i);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(s),r)i.eachBefore(a);else{var u=i,l=i,h=i;i.eachBefore((function(t){t.xl.x&&(l=t),t.depth>h.depth&&(h=t)}));var f=u===l?1:t(u,l)/2,p=f-u.x,d=e/(l.x+f+p),m=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+p)*d,t.y=t.depth*m}))}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,s=e,a=n,c=o.parent.children[0],u=o.m,l=s.m,h=a.m,f=c.m;a=bg(a),o=vg(o),a&&o;)c=vg(c),(s=bg(s)).a=e,(i=a.z+h-o.z-u+t(a._,o._))>0&&(_g(wg(a,e,r),e,i),u+=i,l+=i),h+=a.m,u+=o.m,f+=c.m,l+=s.m;a&&!bg(s)&&(s.t=a,s.m+=h-l),o&&!vg(c)&&(c.t=o,c.m+=u-f,r=e)}return r}(e,i,e.parent.A||r[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function a(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function Tg(t,e,n,r,i){for(var o,s=t.children,a=-1,c=s.length,u=t.value&&(i-n)/t.value;++af&&(f=a),y=l*l*m,(p=Math.max(f/y,y/h))>d){l-=a;break}d=p}g.push(s={value:l,dice:c1?e:1)},n}(Sg);function Og(){var t=Ag,e=!1,n=1,r=1,i=[0],o=Iy,s=Iy,a=Iy,c=Iy,u=Iy;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(sg),t}function h(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,h=e.x1-n,f=e.y1-n;h=n-1){var l=a[e];return l.x0=i,l.y0=o,l.x1=s,void(l.y1=c)}for(var h=u[e],f=r/2+h,p=e+1,d=n-1;p>>1;u[m]c-o){var v=r?(i*g+s*y)/r:s;t(e,p,y,i,o,v,c),t(p,n,g,v,o,s,c)}else{var b=r?(o*g+c*y)/r:c;t(e,p,y,i,o,s,b),t(p,n,g,i,b,s,c)}}(0,c,t.value,e,n,r,i)}function Cg(t,e,n,r,i){(1&t.depth?Tg:ag)(t,e,n,r,i)}const Lg=function t(e){function n(t,n,r,i,o){if((s=t._squarify)&&s.ratio===e)for(var s,a,c,u,l,h=-1,f=s.length,p=t.value;++h1?e:1)},n}(Sg);function Rg(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function Pg(t,e){var n=Oi(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}}function Ig(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Mg(t){return((t=Math.exp(t))+1/t)/2}const Dg=function t(e,n,r){function i(t,i){var o,s,a=t[0],c=t[1],u=t[2],l=i[0],h=i[1],f=i[2],p=l-a,d=h-c,m=p*p+d*d;if(m<1e-12)s=Math.log(f/u)/e,o=function(t){return[a+t*p,c+t*d,u*Math.exp(e*t*s)]};else{var y=Math.sqrt(m),g=(f*f-u*u+r*m)/(2*u*n*y),v=(f*f-u*u-r*m)/(2*f*n*y),b=Math.log(Math.sqrt(g*g+1)-g),_=Math.log(Math.sqrt(v*v+1)-v);s=(_-b)/e,o=function(t){var r,i=t*s,o=Mg(b),l=u/(n*y)*(o*(r=e*i+b,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(b));return[a+l*p,c+l*d,u*o/Mg(e*i+b)]}}return o.duration=1e3*s*e/Math.SQRT2,o}return i.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},i}(Math.SQRT2,2,4);function jg(t){return function(e,n){var r=t((e=vi(e)).h,(n=vi(n)).h),i=Ni(e.s,n.s),o=Ni(e.l,n.l),s=Ni(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=o(t),e.opacity=s(t),e+""}}}const Bg=jg(Oi);var Fg=jg(Ni);function Ug(t,e){var n=Ni((t=Ca(t)).l,(e=Ca(e)).l),r=Ni(t.a,e.a),i=Ni(t.b,e.b),o=Ni(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=o(e),t+""}}function zg(t){return function(e,n){var r=t((e=Ba(e)).h,(n=Ba(n)).h),i=Ni(e.c,n.c),o=Ni(e.l,n.l),s=Ni(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=o(t),e.opacity=s(t),e+""}}}const Vg=zg(Oi);var Kg=zg(Ni);function Hg(t){return function e(n){function r(e,r){var i=t((e=$a(e)).h,(r=$a(r)).h),o=Ni(e.s,r.s),s=Ni(e.l,r.l),a=Ni(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=o(t),e.l=s(Math.pow(t,n)),e.opacity=a(t),e+""}}return n=+n,r.gamma=e,r}(1)}const qg=Hg(Oi);var Wg=Hg(Ni);function Gg(t,e){void 0===e&&(e=t,t=Hi);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n1&&Zg(t[n[i-2]],t[n[i-1]],t[r])<=0;)--i;n[i++]=r}return n.slice(0,i)}function tv(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e=0;--e)u.push(t[r[o[e]][2]]);for(e=+a;ea!=u>a&&s<(c-n)*(a-r)/(u-r)+n&&(l=!l),c=n,u=r;return l}function nv(t){for(var e,n,r=-1,i=t.length,o=t[i-1],s=o[0],a=o[1],c=0;++r1);return t+n*o*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(rv),av=function t(e){var n=sv.source(e);function r(){var t=n.apply(this,arguments);return function(){return Math.exp(t())}}return r.source=t,r}(rv),cv=function t(e){function n(t){return(t=+t)<=0?()=>0:function(){for(var n=0,r=t;r>1;--r)n+=e();return n+r*e()}}return n.source=t,n}(rv),uv=function t(e){var n=cv.source(e);function r(t){if(0==(t=+t))return e;var r=n(t);return function(){return r()/t}}return r.source=t,r}(rv),lv=function t(e){function n(t){return function(){return-Math.log1p(-e())/t}}return n.source=t,n}(rv),hv=function t(e){function n(t){if((t=+t)<0)throw new RangeError("invalid alpha");return t=1/-t,function(){return Math.pow(1-e(),t)}}return n.source=t,n}(rv),fv=function t(e){function n(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+t)}}return n.source=t,n}(rv),pv=function t(e){function n(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return 0===t?()=>1/0:1===t?()=>1:(t=Math.log1p(-t),function(){return 1+Math.floor(Math.log1p(-e())/t)})}return n.source=t,n}(rv),dv=function t(e){var n=sv.source(e)();function r(t,r){if((t=+t)<0)throw new RangeError("invalid k");if(0===t)return()=>0;if(r=null==r?1:+r,1===t)return()=>-Math.log1p(-e())*r;var i=(t<1?t+1:t)-1/3,o=1/(3*Math.sqrt(i)),s=t<1?()=>Math.pow(e(),1/t):()=>1;return function(){do{do{var t=n(),a=1+o*t}while(a<=0);a*=a*a;var c=1-e()}while(c>=1-.0331*t*t*t*t&&Math.log(c)>=.5*t*t+i*(1-a+Math.log(a)));return i*a*s()*r}}return r.source=t,r}(rv),mv=function t(e){var n=dv.source(e);function r(t,e){var r=n(t),i=n(e);return function(){var t=r();return 0===t?0:t/(t+i())}}return r.source=t,r}(rv),yv=function t(e){var n=pv.source(e),r=mv.source(e);function i(t,e){return t=+t,(e=+e)>=1?()=>t:e<=0?()=>0:function(){for(var i=0,o=t,s=e;o*s>16&&o*(1-s)>16;){var a=Math.floor((o+1)*s),c=r(a,o-a+1)();c<=s?(i+=a,o-=a,s=(s-c)/(1-c)):(o=a-1,s/=c)}for(var u=s<.5,l=n(u?s:1-s),h=l(),f=0;h<=o;++f)h+=l();return i+(u?f:o-f)}}return i.source=t,i}(rv),gv=function t(e){function n(t,n,r){var i;return 0==(t=+t)?i=t=>-Math.log(t):(t=1/t,i=e=>Math.pow(e,t)),n=null==n?0:+n,r=null==r?1:+r,function(){return n+r*i(-Math.log1p(-e()))}}return n.source=t,n}(rv),vv=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,function(){return t+n*Math.tan(Math.PI*e())}}return n.source=t,n}(rv),bv=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,function(){var r=e();return t+n*Math.log(r/(1-r))}}return n.source=t,n}(rv),_v=function t(e){var n=dv.source(e),r=yv.source(e);function i(t){return function(){for(var i=0,o=t;o>16;){var s=Math.floor(.875*o),a=n(s)();if(a>o)return i+r(s-1,o/a)();i+=s,o-=a}for(var c=-Math.log1p(-e()),u=0;c<=o;++u)c-=Math.log1p(-e());return i+u}}return i.source=t,i}(rv),wv=1664525,xv=1013904223,kv=1/4294967296;function Tv(t=Math.random()){let e=0|(0<=t&&t<1?t/kv:Math.abs(t));return()=>(e=wv*e+xv|0,kv*(e>>>0))}function Sv(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Ev(t,e){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof e?this.interpolator(e):this.range(e)}return this}const Av=Symbol("implicit");function Ov(){var t=new St,e=[],n=[],r=Av;function i(i){let o=t.get(i);if(void 0===o){if(r!==Av)return r;t.set(i,o=e.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new St;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Ov(e,n).unknown(r)},Sv.apply(i,arguments),i}function Nv(){var t,e,n=Ov().unknown(void 0),r=n.domain,i=n.range,o=0,s=1,a=!1,c=0,u=0,l=.5;function h(){var n=r().length,h=se&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(s[0],s[t-1])),r=t>2?jv:Dv,i=o=null,h}function h(e){return null==e||isNaN(e=+e)?n:(i||(i=r(s.map(t),a,c)))(t(u(e)))}return h.invert=function(n){return u(e((o||(o=r(a,s.map(t),Fi)))(n)))},h.domain=function(t){return arguments.length?(s=Array.from(t,Rv),l()):s.slice()},h.range=function(t){return arguments.length?(a=Array.from(t),l()):a.slice()},h.rangeRound=function(t){return a=Array.from(t),c=Ig,l()},h.clamp=function(t){return arguments.length?(u=!!t||Iv,l()):u!==Iv},h.interpolate=function(t){return arguments.length?(c=t,l()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}function Uv(){return Fv()(Iv,Iv)}function zv(t,e,n,r){var i,o=re(t,e,n);switch((r=oh(null==r?",f":r)).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=vh(o,s))||(r.precision=i),fh(r,s);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=bh(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=gh(o))||(r.precision=i-2*("%"===r.type))}return hh(r)}function Vv(t){var e=t.domain;return t.ticks=function(t){var n=e();return ee(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return zv(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,o=e(),s=0,a=o.length-1,c=o[s],u=o[a],l=10;for(u0;){if((i=ne(c,u,n))===r)return o[s]=c,o[a]=u,e(o);if(i>0)c=Math.floor(c/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,u=Math.floor(u*i)/i}r=i}return t},t}function Kv(){var t=Uv();return t.copy=function(){return Bv(t,Kv())},Sv.apply(t,arguments),Vv(t)}function Hv(t){var e;function n(t){return null==t||isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Array.from(e,Rv),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return Hv(t).unknown(e)},t=arguments.length?Array.from(t,Rv):[0,1],Vv(n)}function qv(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],s=t[i];return s-t(-e,n)}function Jv(t){const e=t(Wv,Gv),n=e.domain;let r,i,o=10;function s(){return r=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}(o),i=function(t){return 10===t?Xv:t===Math.E?Math.exp:e=>Math.pow(t,e)}(o),n()[0]<0?(r=Zv(r),i=Zv(i),t(Yv,$v)):t(Wv,Gv),e}return e.base=function(t){return arguments.length?(o=+t,s()):o},e.domain=function(t){return arguments.length?(n(t),s()):n()},e.ticks=t=>{const e=n();let s=e[0],a=e[e.length-1];const c=a0){for(;h<=f;++h)for(u=1;ua)break;d.push(l)}}else for(;h<=f;++h)for(u=o-1;u>=1;--u)if(l=h>0?u/i(-h):u*i(h),!(la)break;d.push(l)}2*d.length{if(null==t&&(t=10),null==n&&(n=10===o?"s":","),"function"!=typeof n&&(o%1||null!=(n=oh(n)).precision||(n.trim=!0),n=hh(n)),t===1/0)return n;const s=Math.max(1,o*t/e.ticks().length);return t=>{let e=t/i(Math.round(r(t)));return e*on(qv(n(),{floor:t=>i(Math.floor(r(t))),ceil:t=>i(Math.ceil(r(t)))})),e}function Qv(){const t=Jv(Fv()).domain([1,10]);return t.copy=()=>Bv(t,Qv()).base(t.base()),Sv.apply(t,arguments),t}function tb(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function eb(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function nb(t){var e=1,n=t(tb(e),eb(e));return n.constant=function(n){return arguments.length?t(tb(e=+n),eb(e)):e},Vv(n)}function rb(){var t=nb(Fv());return t.copy=function(){return Bv(t,rb()).constant(t.constant())},Sv.apply(t,arguments)}function ib(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function ob(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function sb(t){return t<0?-t*t:t*t}function ab(t){var e=t(Iv,Iv),n=1;return e.exponent=function(e){return arguments.length?1==(n=+e)?t(Iv,Iv):.5===n?t(ob,sb):t(ib(n),ib(1/n)):n},Vv(e)}function cb(){var t=ab(Fv());return t.copy=function(){return Bv(t,cb()).exponent(t.exponent())},Sv.apply(t,arguments),t}function ub(){return cb.apply(null,arguments).exponent(.5)}function lb(t){return Math.sign(t)*t*t}function hb(){var t,e=Uv(),n=[0,1],r=!1;function i(n){var i=function(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}(e(n));return isNaN(i)?t:r?Math.round(i):i}return i.invert=function(t){return e.invert(lb(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(t){return arguments.length?(e.range((n=Array.from(t,Rv)).map(lb)),i):n.slice()},i.rangeRound=function(t){return i.range(t).round(!0)},i.round=function(t){return arguments.length?(r=!!t,i):r},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return hb(e.domain(),n).round(r).clamp(e.clamp()).unknown(t)},Sv.apply(i,arguments),Vv(i)}function fb(){var t,e=[],n=[],r=[];function i(){var t=0,i=Math.max(1,n.length);for(r=new Array(i-1);++t0?r[i-1]:e[0],i=r?[i[r-1],n]:[i[s-1],i[s]]},s.unknown=function(e){return arguments.length?(t=e,s):s},s.thresholds=function(){return i.slice()},s.copy=function(){return pb().domain([e,n]).range(o).unknown(t)},Sv.apply(Vv(s),arguments)}function db(){var t,e=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[ot(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=Array.from(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=Array.from(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return db().domain(e).range(n).unknown(t)},Sv.apply(i,arguments)}const mb=1e3,yb=6e4,gb=36e5,vb=864e5,bb=6048e5,_b=31536e6,wb=new Date,xb=new Date;function kb(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=e=>(t(e=new Date(+e)),e),i.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),i.round=t=>{const e=i(t),n=i.ceil(t);return t-e(e(t=new Date(+t),null==n?1:Math.floor(n)),t),i.range=(n,r,o)=>{const s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n0))return s;let a;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(akb((e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),((t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})),n&&(i.count=(e,r)=>(wb.setTime(+e),xb.setTime(+r),t(wb),t(xb),Math.floor(n(wb,xb))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?e=>r(e)%t==0:e=>i.count(0,e)%t==0):i:null)),i}const Tb=kb((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));Tb.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?kb((e=>{e.setTime(Math.floor(e/t)*t)}),((e,n)=>{e.setTime(+e+n*t)}),((e,n)=>(n-e)/t)):Tb:null);const Sb=Tb.range,Eb=kb((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*mb)}),((t,e)=>(e-t)/mb),(t=>t.getUTCSeconds())),Ab=Eb.range,Ob=kb((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mb)}),((t,e)=>{t.setTime(+t+e*yb)}),((t,e)=>(e-t)/yb),(t=>t.getMinutes())),Nb=Ob.range,Cb=kb((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*yb)}),((t,e)=>(e-t)/yb),(t=>t.getUTCMinutes())),Lb=Cb.range,Rb=kb((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mb-t.getMinutes()*yb)}),((t,e)=>{t.setTime(+t+e*gb)}),((t,e)=>(e-t)/gb),(t=>t.getHours())),Pb=Rb.range,Ib=kb((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*gb)}),((t,e)=>(e-t)/gb),(t=>t.getUTCHours())),Mb=Ib.range,Db=kb((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*yb)/vb),(t=>t.getDate()-1)),jb=Db.range,Bb=kb((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/vb),(t=>t.getUTCDate()-1)),Fb=Bb.range,Ub=kb((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/vb),(t=>Math.floor(t/vb))),zb=Ub.range;function Vb(t){return kb((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*yb)/bb))}const Kb=Vb(0),Hb=Vb(1),qb=Vb(2),Wb=Vb(3),Gb=Vb(4),Yb=Vb(5),$b=Vb(6),Xb=Kb.range,Zb=Hb.range,Jb=qb.range,Qb=Wb.range,t_=Gb.range,e_=Yb.range,n_=$b.range;function r_(t){return kb((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/bb))}const i_=r_(0),o_=r_(1),s_=r_(2),a_=r_(3),c_=r_(4),u_=r_(5),l_=r_(6),h_=i_.range,f_=o_.range,p_=s_.range,d_=a_.range,m_=c_.range,y_=u_.range,g_=l_.range,v_=kb((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth())),b_=v_.range,__=kb((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth())),w_=__.range,x_=kb((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));x_.every=t=>isFinite(t=Math.floor(t))&&t>0?kb((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,n)=>{e.setFullYear(e.getFullYear()+n*t)})):null;const k_=x_.range,T_=kb((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));T_.every=t=>isFinite(t=Math.floor(t))&&t>0?kb((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null;const S_=T_.range;function E_(t,e,n,r,i,o){const s=[[Eb,1,mb],[Eb,5,5e3],[Eb,15,15e3],[Eb,30,3e4],[o,1,yb],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,gb],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,vb],[r,2,1728e5],[n,1,bb],[e,1,2592e6],[e,3,7776e6],[t,1,_b]];function a(e,n,r){const i=Math.abs(n-e)/r,o=J((([,,t])=>t)).right(s,i);if(o===s.length)return t.every(re(e/_b,n/_b,r));if(0===o)return Tb.every(Math.max(re(e,n,r),1));const[a,c]=s[i/s[o-1][2]=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ex,s:nx,S:xw,u:kw,U:Tw,V:Ew,w:Aw,W:Ow,x:null,X:null,y:Nw,Y:Lw,Z:Pw,"%":tx},_={a:function(t){return s[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Iw,e:Iw,f:Fw,g:Xw,G:Jw,H:Mw,I:Dw,j:jw,L:Bw,m:Uw,M:zw,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ex,s:nx,S:Vw,u:Kw,U:Hw,V:Ww,w:Gw,W:Yw,x:null,X:null,y:$w,Y:Zw,Z:Qw,"%":tx},w={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return T(t,e,n,r)},d:iw,e:iw,f:lw,g:tw,G:Q_,H:sw,I:sw,j:ow,L:uw,m:rw,M:aw,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=l.get(r[0].toLowerCase()),n+r[0].length):-1},q:nw,Q:fw,s:pw,S:cw,u:$_,U:X_,V:Z_,w:Y_,W:J_,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:tw,Y:Q_,Z:ew,"%":hw};function x(t,e){return function(n){var r,i,o,s=[],a=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++a53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=R_(P_(o.y,0,1))).getUTCDay(),r=i>4||0===i?o_.ceil(r):o_(r),r=Bb.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=L_(P_(o.y,0,1))).getDay(),r=i>4||0===i?Hb.ceil(r):Hb(r),r=Db.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?R_(P_(o.y,0,1)).getUTCDay():L_(P_(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,R_(o)):L_(o)}}function T(t,e,n,r){for(var i,o,s=0,a=e.length,c=n.length;s=c)return-1;if(37===(i=e.charCodeAt(s++))){if(i=e.charAt(s++),!(o=w[i in U_?e.charAt(s++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=x(n,b),b.X=x(r,b),b.c=x(e,b),_.x=x(n,_),_.X=x(r,_),_.c=x(e,_),{format:function(t){var e=x(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=x(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}var M_,D_,j_,B_,F_,U_={"-":"",_:" ",0:"0"},z_=/^\s*\d+/,V_=/^%/,K_=/[\\^$*+?|[\]().{}]/g;function H_(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o[t.toLowerCase(),e])))}function Y_(t,e,n){var r=z_.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function $_(t,e,n){var r=z_.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function X_(t,e,n){var r=z_.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Z_(t,e,n){var r=z_.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function J_(t,e,n){var r=z_.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Q_(t,e,n){var r=z_.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function tw(t,e,n){var r=z_.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ew(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function nw(t,e,n){var r=z_.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function rw(t,e,n){var r=z_.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function iw(t,e,n){var r=z_.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function ow(t,e,n){var r=z_.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function sw(t,e,n){var r=z_.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function aw(t,e,n){var r=z_.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function cw(t,e,n){var r=z_.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function uw(t,e,n){var r=z_.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function lw(t,e,n){var r=z_.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function hw(t,e,n){var r=V_.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function fw(t,e,n){var r=z_.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function pw(t,e,n){var r=z_.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function dw(t,e){return H_(t.getDate(),e,2)}function mw(t,e){return H_(t.getHours(),e,2)}function yw(t,e){return H_(t.getHours()%12||12,e,2)}function gw(t,e){return H_(1+Db.count(x_(t),t),e,3)}function vw(t,e){return H_(t.getMilliseconds(),e,3)}function bw(t,e){return vw(t,e)+"000"}function _w(t,e){return H_(t.getMonth()+1,e,2)}function ww(t,e){return H_(t.getMinutes(),e,2)}function xw(t,e){return H_(t.getSeconds(),e,2)}function kw(t){var e=t.getDay();return 0===e?7:e}function Tw(t,e){return H_(Kb.count(x_(t)-1,t),e,2)}function Sw(t){var e=t.getDay();return e>=4||0===e?Gb(t):Gb.ceil(t)}function Ew(t,e){return t=Sw(t),H_(Gb.count(x_(t),t)+(4===x_(t).getDay()),e,2)}function Aw(t){return t.getDay()}function Ow(t,e){return H_(Hb.count(x_(t)-1,t),e,2)}function Nw(t,e){return H_(t.getFullYear()%100,e,2)}function Cw(t,e){return H_((t=Sw(t)).getFullYear()%100,e,2)}function Lw(t,e){return H_(t.getFullYear()%1e4,e,4)}function Rw(t,e){var n=t.getDay();return H_((t=n>=4||0===n?Gb(t):Gb.ceil(t)).getFullYear()%1e4,e,4)}function Pw(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+H_(e/60|0,"0",2)+H_(e%60,"0",2)}function Iw(t,e){return H_(t.getUTCDate(),e,2)}function Mw(t,e){return H_(t.getUTCHours(),e,2)}function Dw(t,e){return H_(t.getUTCHours()%12||12,e,2)}function jw(t,e){return H_(1+Bb.count(T_(t),t),e,3)}function Bw(t,e){return H_(t.getUTCMilliseconds(),e,3)}function Fw(t,e){return Bw(t,e)+"000"}function Uw(t,e){return H_(t.getUTCMonth()+1,e,2)}function zw(t,e){return H_(t.getUTCMinutes(),e,2)}function Vw(t,e){return H_(t.getUTCSeconds(),e,2)}function Kw(t){var e=t.getUTCDay();return 0===e?7:e}function Hw(t,e){return H_(i_.count(T_(t)-1,t),e,2)}function qw(t){var e=t.getUTCDay();return e>=4||0===e?c_(t):c_.ceil(t)}function Ww(t,e){return t=qw(t),H_(c_.count(T_(t),t)+(4===T_(t).getUTCDay()),e,2)}function Gw(t){return t.getUTCDay()}function Yw(t,e){return H_(o_.count(T_(t)-1,t),e,2)}function $w(t,e){return H_(t.getUTCFullYear()%100,e,2)}function Xw(t,e){return H_((t=qw(t)).getUTCFullYear()%100,e,2)}function Zw(t,e){return H_(t.getUTCFullYear()%1e4,e,4)}function Jw(t,e){var n=t.getUTCDay();return H_((t=n>=4||0===n?c_(t):c_.ceil(t)).getUTCFullYear()%1e4,e,4)}function Qw(){return"+0000"}function tx(){return"%"}function ex(t){return+t}function nx(t){return Math.floor(+t/1e3)}function rx(t){return M_=I_(t),D_=M_.format,j_=M_.parse,B_=M_.utcFormat,F_=M_.utcParse,M_}function ix(t){return new Date(t)}function ox(t){return t instanceof Date?+t:+new Date(+t)}function sx(t,e,n,r,i,o,s,a,c,u){var l=Uv(),h=l.invert,f=l.domain,p=u(".%L"),d=u(":%S"),m=u("%I:%M"),y=u("%I %p"),g=u("%a %d"),v=u("%b %d"),b=u("%B"),_=u("%Y");function w(t){return(c(t)e(r/(t.length-1))))},n.quantiles=function(e){return Array.from({length:e+1},((n,r)=>de(t,r/e)))},n.copy=function(){return yx(e).domain(t)},Ev.apply(n,arguments)}function gx(){var t,e,n,r,i,o,s,a=0,c=.5,u=1,l=1,h=Iv,f=!1;function p(t){return isNaN(t=+t)?s:(t=.5+((t=+o(t))-e)*(l*tRi(t[t.length-1]);var Dx=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(kx);const jx=Mx(Dx);var Bx=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(kx);const Fx=Mx(Bx);var Ux=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(kx);const zx=Mx(Ux);var Vx=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(kx);const Kx=Mx(Vx);var Hx=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(kx);const qx=Mx(Hx);var Wx=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(kx);const Gx=Mx(Wx);var Yx=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(kx);const $x=Mx(Yx);var Xx=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(kx);const Zx=Mx(Xx);var Jx=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(kx);const Qx=Mx(Jx);var tk=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(kx);const ek=Mx(tk);var nk=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(kx);const rk=Mx(nk);var ik=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(kx);const ok=Mx(ik);var sk=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(kx);const ak=Mx(sk);var ck=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(kx);const uk=Mx(ck);var lk=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(kx);const hk=Mx(lk);var fk=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(kx);const pk=Mx(fk);var dk=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(kx);const mk=Mx(dk);var yk=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(kx);const gk=Mx(yk);var vk=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(kx);const bk=Mx(vk);var _k=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(kx);const wk=Mx(_k);var xk=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(kx);const kk=Mx(xk);var Tk=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(kx);const Sk=Mx(Tk);var Ek=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(kx);const Ak=Mx(Ek);var Ok=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(kx);const Nk=Mx(Ok);var Ck=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(kx);const Lk=Mx(Ck);var Rk=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(kx);const Pk=Mx(Rk);var Ik=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(kx);const Mk=Mx(Ik);function Dk(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"}const jk=Wg($a(300,.5,0),$a(-240,.5,1));var Bk=Wg($a(-100,.75,.35),$a(80,1.5,.8)),Fk=Wg($a(260,.75,.35),$a(80,1.5,.8)),Uk=$a();function zk(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Uk.h=360*t-100,Uk.s=1.5-1.5*e,Uk.l=.8-.9*e,Uk+""}var Vk=ui(),Kk=Math.PI/3,Hk=2*Math.PI/3;function qk(t){var e;return t=(.5-t)*Math.PI,Vk.r=255*(e=Math.sin(t))*e,Vk.g=255*(e=Math.sin(t+Kk))*e,Vk.b=255*(e=Math.sin(t+Hk))*e,Vk+""}function Wk(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"}function Gk(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const Yk=Gk(kx("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var $k=Gk(kx("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Xk=Gk(kx("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Zk=Gk(kx("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function Jk(t){return Ir(_r(t).call(document.documentElement))}var Qk=0;function tT(){return new eT}function eT(){this._="@"+(++Qk).toString(36)}function nT(t,e){return t.target&&(t=qi(t),void 0===e&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,(t=>Wi(t,e)))}function rT(t){return"string"==typeof t?new Lr([document.querySelectorAll(t)],[document.documentElement]):new Lr([kn(t)],Cr)}function iT(t){return function(){return t}}eT.prototype=tT.prototype={constructor:eT,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};const oT=Math.abs,sT=Math.atan2,aT=Math.cos,cT=Math.max,uT=Math.min,lT=Math.sin,hT=Math.sqrt,fT=1e-12,pT=Math.PI,dT=pT/2,mT=2*pT;function yT(t){return t>=1?dT:t<=-1?-dT:Math.asin(t)}function gT(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new ia(e)}function vT(t){return t.innerRadius}function bT(t){return t.outerRadius}function _T(t){return t.startAngle}function wT(t){return t.endAngle}function xT(t){return t&&t.padAngle}function kT(t,e,n,r,i,o,s){var a=t-n,c=e-r,u=(s?o:-o)/hT(a*a+c*c),l=u*c,h=-u*a,f=t+l,p=e+h,d=n+l,m=r+h,y=(f+d)/2,g=(p+m)/2,v=d-f,b=m-p,_=v*v+b*b,w=i-o,x=f*m-d*p,k=(b<0?-1:1)*hT(cT(0,w*w*_-x*x)),T=(x*b-v*k)/_,S=(-x*v-b*k)/_,E=(x*b+v*k)/_,A=(-x*v+b*k)/_,O=T-y,N=S-g,C=E-y,L=A-g;return O*O+N*N>C*C+L*L&&(T=E,S=A),{cx:T,cy:S,x01:-l,y01:-h,x11:T*(i/w-1),y11:S*(i/w-1)}}function TT(){var t=vT,e=bT,n=iT(0),r=null,i=_T,o=wT,s=xT,a=null,c=gT(u);function u(){var u,l,h,f=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-dT,m=o.apply(this,arguments)-dT,y=oT(m-d),g=m>d;if(a||(a=u=c()),pfT)if(y>mT-fT)a.moveTo(p*aT(d),p*lT(d)),a.arc(0,0,p,d,m,!g),f>fT&&(a.moveTo(f*aT(m),f*lT(m)),a.arc(0,0,f,m,d,g));else{var v,b,_=d,w=m,x=d,k=m,T=y,S=y,E=s.apply(this,arguments)/2,A=E>fT&&(r?+r.apply(this,arguments):hT(f*f+p*p)),O=uT(oT(p-f)/2,+n.apply(this,arguments)),N=O,C=O;if(A>fT){var L=yT(A/f*lT(E)),R=yT(A/p*lT(E));(T-=2*L)>fT?(x+=L*=g?1:-1,k-=L):(T=0,x=k=(d+m)/2),(S-=2*R)>fT?(_+=R*=g?1:-1,w-=R):(S=0,_=w=(d+m)/2)}var P=p*aT(_),I=p*lT(_),M=f*aT(k),D=f*lT(k);if(O>fT){var j,B=p*aT(w),F=p*lT(w),U=f*aT(x),z=f*lT(x);if(y1?0:h<-1?pT:Math.acos(h))/2),G=hT(j[0]*j[0]+j[1]*j[1]);N=uT(O,(f-G)/(W-1)),C=uT(O,(p-G)/(W+1))}else N=C=0}S>fT?C>fT?(v=kT(U,z,P,I,p,C,g),b=kT(B,F,M,D,p,C,g),a.moveTo(v.cx+v.x01,v.cy+v.y01),CfT&&T>fT?N>fT?(v=kT(M,D,B,F,f,-N,g),b=kT(P,I,U,z,f,-N,g),a.lineTo(v.cx+v.x01,v.cy+v.y01),N=h;--f)a.point(g[f],v[f]);a.lineEnd(),a.areaEnd()}y&&(g[l]=+t(p,l,u),v[l]=+e(p,l,u),a.point(r?+r(p,l,u):g[l],n?+n(p,l,u):v[l]))}if(d)return a=null,d+""||null}function l(){return LT().defined(i).curve(s).context(o)}return t="function"==typeof t?t:void 0===t?NT:iT(+t),e="function"==typeof e?e:iT(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?CT:iT(+n),u.x=function(e){return arguments.length?(t="function"==typeof e?e:iT(+e),r=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:iT(+e),u):t},u.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:iT(+t),u):r},u.y=function(t){return arguments.length?(e="function"==typeof t?t:iT(+t),n=null,u):e},u.y0=function(t){return arguments.length?(e="function"==typeof t?t:iT(+t),u):e},u.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:iT(+t),u):n},u.lineX0=u.lineY0=function(){return l().x(t).y(e)},u.lineY1=function(){return l().x(t).y(n)},u.lineX1=function(){return l().x(r).y(e)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:iT(!!t),u):i},u.curve=function(t){return arguments.length?(s=t,null!=o&&(a=s(o)),u):s},u.context=function(t){return arguments.length?(null==t?o=a=null:a=s(o=t),u):o},u}function PT(t,e){return et?1:e>=t?0:NaN}function IT(t){return t}function MT(){var t=IT,e=PT,n=null,r=iT(0),i=iT(mT),o=iT(0);function s(s){var a,c,u,l,h,f=(s=ET(s)).length,p=0,d=new Array(f),m=new Array(f),y=+r.apply(this,arguments),g=Math.min(mT,Math.max(-mT,i.apply(this,arguments)-y)),v=Math.min(Math.abs(g)/f,o.apply(this,arguments)),b=v*(g<0?-1:1);for(a=0;a0&&(p+=h);for(null!=e?d.sort((function(t,n){return e(m[t],m[n])})):null!=n&&d.sort((function(t,e){return n(s[t],s[e])})),a=0,u=p?(g-f*b)/p:0;a0?h*u:0)+b,m[c]={data:s[c],index:a,value:h,startAngle:y,endAngle:l,padAngle:v};return m}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:iT(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:iT(+t),s):r},s.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:iT(+t),s):i},s.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:iT(+t),s):o},s}AT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var DT=BT(OT);function jT(t){this._curve=t}function BT(t){function e(e){return new jT(t(e))}return e._curve=t,e}function FT(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(BT(t)):e()._curve},t}function UT(){return FT(LT().curve(DT))}function zT(){var t=RT().curve(DT),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return FT(n())},delete t.lineX0,t.lineEndAngle=function(){return FT(r())},delete t.lineX1,t.lineInnerRadius=function(){return FT(i())},delete t.lineY0,t.lineOuterRadius=function(){return FT(o())},delete t.lineY1,t.curve=function(t){return arguments.length?e(BT(t)):e()._curve},t}function VT(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}jT.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};class KT{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}class HT{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,e){if(t=+t,e=+e,0===this._point)this._point=1;else{const n=VT(this._x0,this._y0),r=VT(this._x0,this._y0=(this._y0+e)/2),i=VT(t,this._y0),o=VT(t,e);this._context.moveTo(...n),this._context.bezierCurveTo(...r,...i,...o)}this._x0=t,this._y0=e}}function qT(t){return new KT(t,!0)}function WT(t){return new KT(t,!1)}function GT(t){return new HT(t)}function YT(t){return t.source}function $T(t){return t.target}function XT(t){let e=YT,n=$T,r=NT,i=CT,o=null,s=null,a=gT(c);function c(){let c;const u=ST.call(arguments),l=e.apply(this,u),h=n.apply(this,u);if(null==o&&(s=t(c=a())),s.lineStart(),u[0]=l,s.point(+r.apply(this,u),+i.apply(this,u)),u[0]=h,s.point(+r.apply(this,u),+i.apply(this,u)),s.lineEnd(),c)return s=null,c+""||null}return c.source=function(t){return arguments.length?(e=t,c):e},c.target=function(t){return arguments.length?(n=t,c):n},c.x=function(t){return arguments.length?(r="function"==typeof t?t:iT(+t),c):r},c.y=function(t){return arguments.length?(i="function"==typeof t?t:iT(+t),c):i},c.context=function(e){return arguments.length?(null==e?o=s=null:s=t(o=e),c):o},c}function ZT(){return XT(qT)}function JT(){return XT(WT)}function QT(){const t=XT(GT);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const tS=hT(3),eS={draw(t,e){const n=.59436*hT(e+uT(e/28,.75)),r=n/2,i=r*tS;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},nS={draw(t,e){const n=hT(e/pT);t.moveTo(n,0),t.arc(0,0,n,0,mT)}},rS={draw(t,e){const n=hT(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},iS=hT(1/3),oS=2*iS,sS={draw(t,e){const n=hT(e/oS),r=n*iS;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},aS={draw(t,e){const n=.62625*hT(e);t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},cS={draw(t,e){const n=.87559*hT(e-uT(e/7,2));t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},uS={draw(t,e){const n=hT(e),r=-n/2;t.rect(r,r,n,n)}},lS={draw(t,e){const n=.4431*hT(e);t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},hS=lT(pT/10)/lT(7*pT/10),fS=lT(mT/10)*hS,pS=-aT(mT/10)*hS,dS={draw(t,e){const n=hT(.8908130915292852*e),r=fS*n,i=pS*n;t.moveTo(0,-n),t.lineTo(r,i);for(let e=1;e<5;++e){const o=mT*e/5,s=aT(o),a=lT(o);t.lineTo(a*n,-s*n),t.lineTo(s*r-a*i,a*r+s*i)}t.closePath()}},mS=hT(3),yS={draw(t,e){const n=-hT(e/(3*mS));t.moveTo(0,2*n),t.lineTo(-mS*n,-n),t.lineTo(mS*n,-n),t.closePath()}},gS=hT(3),vS={draw(t,e){const n=.6824*hT(e),r=n/2,i=n*gS/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},bS=-.5,_S=hT(3)/2,wS=1/hT(12),xS=3*(wS/2+1),kS={draw(t,e){const n=hT(e/xS),r=n/2,i=n*wS,o=r,s=n*wS+n,a=-o,c=s;t.moveTo(r,i),t.lineTo(o,s),t.lineTo(a,c),t.lineTo(bS*r-_S*i,_S*r+bS*i),t.lineTo(bS*o-_S*s,_S*o+bS*s),t.lineTo(bS*a-_S*c,_S*a+bS*c),t.lineTo(bS*r+_S*i,bS*i-_S*r),t.lineTo(bS*o+_S*s,bS*s-_S*o),t.lineTo(bS*a+_S*c,bS*c-_S*a),t.closePath()}},TS={draw(t,e){const n=.6189*hT(e-uT(e/6,1.7));t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},SS=[nS,rS,sS,uS,dS,yS,kS],ES=[nS,cS,TS,vS,eS,lS,aS];function AS(t,e){let n=null,r=gT(i);function i(){let i;if(n||(n=i=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),i)return n=null,i+""||null}return t="function"==typeof t?t:iT(t||nS),e="function"==typeof e?e:iT(void 0===e?64:+e),i.type=function(e){return arguments.length?(t="function"==typeof e?e:iT(e),i):t},i.size=function(t){return arguments.length?(e="function"==typeof t?t:iT(+t),i):e},i.context=function(t){return arguments.length?(n=null==t?null:t,i):n},i}function OS(){}function NS(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function CS(t){this._context=t}function LS(t){return new CS(t)}function RS(t){this._context=t}function PS(t){return new RS(t)}function IS(t){this._context=t}function MS(t){return new IS(t)}function DS(t,e){this._basis=new CS(t),this._beta=e}CS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:NS(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:NS(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},RS.prototype={areaStart:OS,areaEnd:OS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:NS(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},IS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:NS(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},DS.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],s=t[n]-i,a=e[n]-o,c=-1;++c<=n;)r=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*s),this._beta*e[c]+(1-this._beta)*(o+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const jS=function t(e){function n(t){return 1===e?new CS(t):new DS(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function BS(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function FS(t,e){this._context=t,this._k=(1-e)/6}FS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:BS(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:BS(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const US=function t(e){function n(t){return new FS(t,e)}return n.tension=function(e){return t(+e)},n}(0);function zS(t,e){this._context=t,this._k=(1-e)/6}zS.prototype={areaStart:OS,areaEnd:OS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:BS(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const VS=function t(e){function n(t){return new zS(t,e)}return n.tension=function(e){return t(+e)},n}(0);function KS(t,e){this._context=t,this._k=(1-e)/6}KS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:BS(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const HS=function t(e){function n(t){return new KS(t,e)}return n.tension=function(e){return t(+e)},n}(0);function qS(t,e,n){var r=t._x1,i=t._y1,o=t._x2,s=t._y2;if(t._l01_a>fT){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>fT){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/l,s=(s*u+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,s,t._x2,t._y2)}function WS(t,e){this._context=t,this._alpha=e}WS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:qS(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const GS=function t(e){function n(t){return e?new WS(t,e):new FS(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function YS(t,e){this._context=t,this._alpha=e}YS.prototype={areaStart:OS,areaEnd:OS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:qS(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const $S=function t(e){function n(t){return e?new YS(t,e):new zS(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function XS(t,e){this._context=t,this._alpha=e}XS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:qS(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ZS=function t(e){function n(t){return e?new XS(t,e):new KS(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function JS(t){this._context=t}function QS(t){return new JS(t)}function tE(t){return t<0?-1:1}function eE(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),s=(n-t._y1)/(i||r<0&&-0),a=(o*i+s*r)/(r+i);return(tE(o)+tE(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function nE(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function rE(t,e,n){var r=t._x0,i=t._y0,o=t._x1,s=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,i+a*e,o-a,s-a*n,o,s)}function iE(t){this._context=t}function oE(t){this._context=new sE(t)}function sE(t){this._context=t}function aE(t){return new iE(t)}function cE(t){return new oE(t)}function uE(t){this._context=t}function lE(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),s=new Array(r);for(i[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(s[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e1)for(var n,r,i,o=1,s=t[e[0]],a=s.length;o=0;)n[e]=e;return n}function vE(t,e){return t[e]}function bE(t){const e=[];return e.key=t,e}function _E(){var t=iT([]),e=gE,n=yE,r=vE;function i(i){var o,s,a=Array.from(t.apply(this,arguments),bE),c=a.length,u=-1;for(const t of i)for(o=0,++u;o0){for(var n,r,i,o=0,s=t[0].length;o0)for(var n,r,i,o,s,a,c=0,u=t[e[0]].length;c0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=s,r[0]=s+=i):(r[0]=0,r[1]=i)}function kE(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],o=i.length;r0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,o=0,s=1;so&&(o=e,r=n);return r}function AE(t){var e=t.map(OE);return gE(t).sort((function(t,n){return e[t]-e[n]}))}function OE(t){for(var e,n=0,r=-1,i=t.length;++r=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var RE="%Y-%m-%dT%H:%M:%S.%LZ",PE=Date.prototype.toISOString?function(t){return t.toISOString()}:B_(RE);const IE=PE;var ME=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:F_(RE);const DE=ME;function jE(t,e,n){var r=new so,i=e;return null==e?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(t,e,n){e=+e,n=null==n?io():+n,r._restart((function o(s){s+=i,r._restart(o,i+=e,n),t(s)}),e,n)},r.restart(t,e,n),r)}const BE=t=>()=>t;function FE(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function UE(t,e,n){this.k=t,this.x=e,this.y=n}UE.prototype={constructor:UE,scale:function(t){return 1===t?this:new UE(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new UE(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var zE=new UE(1,0,0);function VE(t){for(;!t.__zoom;)if(!(t=t.parentNode))return zE;return t.__zoom}function KE(t){t.stopImmediatePropagation()}function HE(t){t.preventDefault(),t.stopImmediatePropagation()}function qE(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function WE(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function GE(){return this.__zoom||zE}function YE(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function $E(){return navigator.maxTouchPoints||"ontouchstart"in this}function XE(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],s=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function ZE(){var t,e,n,r=qE,i=WE,o=XE,s=YE,a=$E,c=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],l=250,h=Dg,f=_n("start","zoom","end"),p=500,d=150,m=0,y=10;function g(t){t.property("__zoom",GE).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",S).on("dblclick.zoom",E).filter(a).on("touchstart.zoom",A).on("touchmove.zoom",O).on("touchend.zoom touchcancel.zoom",N).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(t,e){return(e=Math.max(c[0],Math.min(c[1],e)))===t.k?t:new UE(e,t.x,t.y)}function b(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new UE(t.k,r,i)}function _(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function w(t,e,n,r){t.on("start.zoom",(function(){x(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){x(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,o=arguments,s=x(t,o).event(r),a=i.apply(t,o),c=null==n?_(a):"function"==typeof n?n.apply(t,o):n,u=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),l=t.__zoom,f="function"==typeof e?e.apply(t,o):e,p=h(l.invert(c).concat(u/l.k),f.invert(c).concat(u/f.k));return function(t){if(1===t)t=f;else{var e=p(t),n=u/e[2];t=new UE(n,c[0]-e[0]*n,c[1]-e[1]*n)}s.zoom(null,t)}}))}function x(t,e,n){return!n&&t.__zooming||new k(t,e)}function k(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,e),this.taps=0}function T(t,...e){if(r.apply(this,arguments)){var n=x(this,e).event(t),i=this.__zoom,a=Math.max(c[0],Math.min(c[1],i.k*Math.pow(2,s.apply(this,arguments)))),l=Wi(t);if(n.wheel)n.mouse[0][0]===l[0]&&n.mouse[0][1]===l[1]||(n.mouse[1]=i.invert(n.mouse[0]=l)),clearTimeout(n.wheel);else{if(i.k===a)return;n.mouse=[l,i.invert(l)],Eo(this),n.start()}HE(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),d),n.zoom("mouse",o(b(v(i,a),n.mouse[0],n.mouse[1]),n.extent,u))}}function S(t,...e){if(!n&&r.apply(this,arguments)){var i=t.currentTarget,s=x(this,e,!0).event(t),a=Ir(t.view).on("mousemove.zoom",(function(t){if(HE(t),!s.moved){var e=t.clientX-l,n=t.clientY-h;s.moved=e*e+n*n>m}s.event(t).zoom("mouse",o(b(s.that.__zoom,s.mouse[0]=Wi(t,i),s.mouse[1]),s.extent,u))}),!0).on("mouseup.zoom",(function(t){a.on("mousemove.zoom mouseup.zoom",null),Ur(t.view,s.moved),HE(t),s.event(t).end()}),!0),c=Wi(t,i),l=t.clientX,h=t.clientY;Fr(t.view),KE(t),s.mouse=[c,this.__zoom.invert(c)],Eo(this),s.start()}}function E(t,...e){if(r.apply(this,arguments)){var n=this.__zoom,s=Wi(t.changedTouches?t.changedTouches[0]:t,this),a=n.invert(s),c=n.k*(t.shiftKey?.5:2),h=o(b(v(n,c),s,a),i.apply(this,e),u);HE(t),l>0?Ir(this).transition().duration(l).call(w,h,s,t):Ir(this).call(g.transform,h,s,t)}}function A(n,...i){if(r.apply(this,arguments)){var o,s,a,c,u=n.touches,l=u.length,h=x(this,i,n.changedTouches.length===l).event(n);for(KE(n),s=0;s g").attr("transform","".concat(i," ").concat(o))}},{key:"getSourcesId",value:function(t){return this.pluginData.scene.selection.includes(t.subject.datum().data.id)?this.pluginData.scene.selection:[t.subject.datum().data.id]}},{key:"getSourcePosition",value:function(t){var e=this.viewport.select(".".concat(t," .model"));return{x:parseFloat(e.attr("x")),y:parseFloat(e.attr("y"))}}},{key:"getTargetsByDepth",value:function(t){var e=this,n=t.subject.datum().data.id,r=t.sourceEvent,i=r.clientX,o=r.clientY,s=[];return this.viewport.selectAll("g.component.container:not(.".concat(n,")")).each((function(t){var n=e.viewport.select(".".concat(t.data.id," .background")).node().getBoundingClientRect(),r=n.x,a=n.y,c=n.width,u=n.height;if(i>=r&&i<=r+c&&o>=a&&o<=a+u){for(var l=parseInt(e.viewport.select(".".concat(t.data.id)).attr("depth"),10)-1;s.length<=l;)s.push([]);s[l].push(t.data.id)}})),s}},{key:"getTargetsId",value:function(t){return this.getTargetsByDepth(t).flat().reverse()}},{key:"getTargetId",value:function(t){return this.getTargetsId(t)[0]}},{key:"getTransform",value:function(t,e){var n=this.viewport.select(t).node().getBoundingClientRect(),r=n.x,i=n.y,o=this.viewport.select(e).node().getBoundingClientRect();return{dx:r-o.x,dy:i-o.y}}}],e&&function(t,e){for(var n=0;nh?p:h),r.attr("height",d>f?d:f);var m=this.viewport.select(".".concat(e.data.id," .components-background")),y=m.node().getBoundingClientRect();return h=Math.max((s-y.x)/n,e.data.definition.minWidth-e.data.definition.reservedWidth),f=Math.max((a-y.y)/n,e.data.definition.minHeight-e.data.definition.reservedHeight),p=(u-y.x)/n,d=(l-y.y)/n,m.attr("width",p>h?p:h),m.attr("height",d>f?d:f),!1}},{key:"finalize",value:function(t){var e=t.subject.datum().data.id,n=this.viewport.select(".".concat(e," .model")),r=this.pluginData.getComponentById(e);return r.drawOption.width=parseFloat(n.attr("width")),r.drawOption.height=parseFloat(n.attr("height")),this.pluginData.emitEvent({components:[e],type:"Drawer",action:"resize",status:"success"}),!0}},{key:"getMaxPosition",value:function(t){var e=this,n=this.pluginData.getComponentById(t),r=0,i=0;return this.pluginData.getChildren(t).forEach((function(t){var o=e.viewport.select(".".concat(t.id," .model")).node().getBoundingClientRect(),s=o.x,a=o.y,c=o.width,u=o.height;r=Math.max(r,s+c+n.definition.margin),i=Math.max(i,a+u+n.definition.margin)})),{x:r,y:i}}}],r&&function(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=Array(e);nt.length)&&(e=t.length);for(var n=0,r=Array(e);n0,hasWarning:r>0,numberOfErrors:n,numberOfWarnings:r,hasX:!!t.drawOption.x,hasY:!!t.drawOption.y,isSelected:this.pluginData.scene.selection.includes(t.id),getIcon:function(t){return e.pluginData.resources.icons[t]},canHaveLink:this.pluginData.canHaveLink(t.definition.type),getAttribute:function(e){return t.attributes.find((function(t){return t.name===e}))}})}}],e&&function(t,e){for(var n=0;n0&&this.pluginData.emitEvent({components:o,type:"Drawer",action:"move",status:"success"}),s.length>0&&this.pluginData.emitEvent({components:s,type:"Drawer",action:"resize",status:"success"}),!0}},{key:"getNodes",value:function(){var t=this,e={id:"root",parent:null,children:[],depth:0,type:"default",isContainer:!0,margin:this.pluginData.configuration.rootContainer.margin,gap:this.pluginData.configuration.rootContainer.gap},n=new Map(this.pluginData.components.map((function(e){return[e.id,t.createNode(e)]})));return n.set("root",e),n.forEach((function(t){if(t.parent){var e=n.get(t.parent);t.parent=e,e.children.push(t)}})),n}},{key:"createNode",value:function(t){return{id:t.id,parent:t.getContainerId()||"root",type:t.definition.displayType||"default",direction:t.definition.workflowDirection,children:[],depth:this.pluginData.getComponentDepth(t.id)+1,isContainer:t.definition.isContainer,width:t.definition.defaultWidth,height:t.definition.defaultHeight,minWidth:t.definition.minWidth,minHeight:t.definition.minHeight,reservedWidth:t.definition.reservedWidth,reservedHeight:t.definition.reservedHeight,margin:t.definition.margin,gap:t.definition.gap,x:t.drawOption.x,y:t.drawOption.y}}},{key:"generateLayout",value:function(t,e,n){var r=this;e.children.forEach((function(e){r.generateLayout(t,e,n)})),e.isContainer&&"default"===e.type?this.generateDefaultLayout(e,n):e.isContainer&&this.generateWorkflowLayout(t,e)}},{key:"generateDefaultLayout",value:function(t,e){this.text=0;var n=[],r=[],i=t.margin,o=t.gap,s=t.minWidth,a=t.minHeight,c=t.reservedWidth,u=t.reservedHeight,l=0,h=0;t.children.forEach((function(t){t.x&&t.y&&e?(n.push(t),l=Math.max(t.x+t.width,l),h=Math.max(t.y+t.height,h)):r.push(t)}));for(var f,p=0,d=0,m=this.getPoints(p,i,o);r.length>0;)f||(f=r[0]),0===m.length&&(d=0,p+=1,m=this.getPoints(p,i,o)),m.length>0&&this.canBePlaced(n,f,m[d])&&(f.x=m[d].x,f.y=m[d].y,l=Math.max(f.x+f.width,l),h=Math.max(f.y+f.height,h),n.push(f),r.shift(),f=null),(d+=1)>=m.length&&(d=0,p+=1,m=this.getPoints(p,i,o));t.width=Math.max(l+i+c,s),t.height=Math.max(h+i+u,a)}},{key:"canBePlaced",value:function(t,e,n){return t.every((function(t){var r=t.x,i=t.y,o=t.width,s=t.height,a=n.x+e.widthr+o,u=n.y+e.heighti+s;return a||c||u||l}))}},{key:"getPoints",value:function(t,e,n){if(0===t)return[{x:e,y:e}];for(var r=e+n*t,i=e+n*t,o=[],s=e,a=e;a<=r&&(a!==r||i!==s);)o.push({x:a,y:i}),a+=n,o.push({x:r,y:s}),s+=n;return o.push({x:r,y:i}),o}},{key:"generateWorkflowLayout",value:function(t,e){"vertical"===e.direction?this.generateVerticalWorkflowLayout(t,e):this.generateHorizontalWorkflowLayout(t,e)}},{key:"generateHorizontalWorkflowLayout",value:function(t,e){var n=e.margin,r=e.gap,i=e.minWidth,o=e.minHeight,s=e.reservedWidth,a=e.reservedHeight,c=n,u=0;e.children.forEach((function(t){t.x=c,t.y=n,c=t.x+t.width+r,t.height>u&&(u=t.height)})),e.width=Math.max(c-r+n+s,i),e.height=Math.max(u+2*n+a,o)}},{key:"generateVerticalWorkflowLayout",value:function(t,e){var n=e.margin,r=e.gap,i=e.minWidth,o=e.minHeight,s=e.reservedWidth,a=e.reservedHeight,c=n,u=0;e.children.forEach((function(t){t.x=n,t.y=c,c=t.y+t.height+r,t.width>u&&(u=t.width)})),e.width=Math.max(u+2*n+s,i),e.height=Math.max(c-r+n+a,o)}},{key:"resize",value:function(t){var e=this.pluginData.getComponentById(t);if(!e.definition.isContainer)return!1;var n=0,r=0;this.pluginData.getChildren(t).forEach((function(t){var e=t.drawOption.x+t.drawOption.width,i=t.drawOption.y+t.drawOption.height;e>n&&(n=e),i>r&&(r=i)}));var i=e.definition,o=i.minWidth,s=i.minHeight,a=i.reservedWidth,c=i.reservedHeight,u=i.margin,l=Math.max(n+2*u+a,o),h=Math.max(r+2*u+c,s);return l===e.drawOption.width&&h===e.drawOption.height||(e.drawOption.width=l,e.drawOption.height=h,this.pluginData.emitEvent({components:[t],type:"Drawer",action:"resize",status:"success"})),!0}}],r&&function(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=Array(e);n=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=r.call(s,"catchLoc"),u=r.call(s,"finallyLoc");if(c&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),N(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;N(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function cN(t,e,n,r,i,o,s){try{var a=t[o](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}function uN(t){var e=function(t){if("object"!=eN(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=eN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==eN(e)?e:e+""}var lN=function(){return e=function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.pluginData=n,this.componentRenderer=null,this.linkRenderer=null,this.layout=null,this.viewport=null,this.scene=null,this.d3=t,this.actions={deleteAction:null,dragComponent:null,dragScene:null,linkAction:null,menuAction:null,resizeComponent:null,toggleSelection:null,selectionAll:null,deselectionAll:null,zoom:null},this.states={linking:!1,menuOpening:!1,moving:!1,resizing:!1,selection:!1},this.readOnly=!1},n=[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.d3.select("#".concat(t)).selectAll(null).remove(),this.d3.select("#".concat(t)).html(""),this.viewport=this.d3.select("#".concat(t)),this.componentRenderer=this.initComponentRenderer(e),this.linkRenderer=this.initLinkRenderer(e),this.layout=new tN(this.pluginData,this.viewport),this.readOnly=e,this.clearActions(),this.readOnly&&(this.pluginData.scene.x=0,this.pluginData.scene.y=0,this.pluginData.scene.zoom=1),this.initActions(),this.initScene()}},{key:"initComponentRenderer",value:function(t){return new FO(this.pluginData,this.viewport,t)}},{key:"initLinkRenderer",value:function(t){return new KO(this.pluginData,this.viewport,t)}},{key:"clearActions",value:function(){this.actions.deleteAction=null,this.actions.dragComponent=null,this.actions.dragScene=null,this.actions.menuAction=null,this.actions.resizeComponent=null,this.actions.toggleSelection=null,this.actions.selectionAll=null,this.actions.deselectionAll=null,this.actions.zoom=null,this.viewport.on("wheel",null),this.d3.select("body").on("keydown",null).on("keyup",null),this.viewport.on(".drag",null)}},{key:"initActions",value:function(){var t=this;this.actions.selectionAll=new kO(this.pluginData,this.viewport,this.layout),this.actions.deleteAction=new uA(this.pluginData,this.viewport,this.layout),this.actions.dragScene=new SA(this.pluginData,this.viewport,this.layout),this.actions.menuAction=new zA(this.pluginData,this.viewport,this.layout),this.actions.link=new PA(this.pluginData,this.viewport,this.layout),this.actions.zoom=new LO(this.pluginData,this.viewport,this.layout),this.actions.dragComponent=new gA(this.pluginData,this.viewport,this.layout),this.actions.resizeComponent=new $A(this.pluginData,this.viewport,this.layout),this.actions.toggleSelection=new oO(this.pluginData,this.viewport,this.layout),this.actions.deselectionAll=new pO(this.pluginData,this.viewport,this.layout),this.viewport.on("wheel",(function(e){t.actions.zoom.execute(e)&&t.draw()})),this.readOnly||this.d3.select("body").on("keydown",(function(e){var n=!1;t.pluginData.configuration.keysBinding.selection.includes(e.key)&&(t.states.selection=!0),t.pluginData.configuration.keysBinding.deleteObject.includes(e.key)&&(n=t.actions.deleteAction.execute(e)),t.pluginData.configuration.keysBinding.selectAll.includes(e.key)&&(n=t.actions.selectionAll.execute(e)),t.pluginData.configuration.keysBinding.deselectAll.includes(e.key)&&(n=t.actions.deselectionAll.execute(e)),n&&t.draw()})).on("keyup",(function(e){var n=!1;t.pluginData.configuration.keysBinding.selection.includes(e.key)&&(t.states.selection=!1),t.pluginData.configuration.keysBinding.deleteObject.includes(e.key)&&(n=t.actions.deleteAction.finalize(e)),t.pluginData.configuration.keysBinding.selectAll.includes(e.key)&&(n=t.actions.selectionAll.finalize(e)),t.pluginData.configuration.keysBinding.deselectAll.includes(e.key)&&(n=t.actions.deselectionAll.finalize(e)),n&&t.draw()}));var e=this.d3.drag().subject((function(e){var n=e.sourceEvent.target.closest(".component");if(t.states.resizing=!!e.sourceEvent.target.closest(".resize-button"),t.states.menuOpening=!!e.sourceEvent.target.closest(".menu-button"),!n)return t.scene;var r=t.viewport.select(Array.from(n.classList).map((function(t){return".".concat(t)})).join(""));return t.states.linking=!!e.sourceEvent.target.closest(".anchor")&&t.pluginData.canHaveLink(r.datum().data.definition.type),r})).on("drag",(function(e){t.states.moving=!0;var n="scene"===e.subject.datum().data.id,r=!1;t.readOnly?t.actions.dragScene.execute(e):(n?r=t.actions.dragScene.execute(e):t.states.linking?(r=t.actions.link.execute(e),t.linkRenderer.render()):t.states.resizing?(r=t.actions.resizeComponent.execute(e),t.linkRenderer.render()):(r=t.actions.dragComponent.execute(e),t.linkRenderer.render()),r&&t.draw())})).on("end",function(){var e,n=(e=aN().mark((function e(n){var r,i,o,s,a,c,u;return aN().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.states.moving,i=t.states.selection,o=t.states.menuOpening,s=t.states.resizing,a=t.states.linking,c="scene"===n.subject.datum().data.id,u=!1,!t.readOnly){e.next=10;break}return c&&r&&t.actions.dragScene.finalize(n),e.abrupt("return");case 10:a?u=t.actions.link.finalize(n):r&&c?u=t.actions.dragScene.finalize(n):s?u=t.actions.resizeComponent.finalize(n):r&&!c?u=t.actions.dragComponent.finalize(n):!r&&o?u=t.actions.menuAction.finalize(n):r||c||!i||(u=t.actions.toggleSelection.finalize(n)),u&&t.draw(),t.states.moving=!1;case 13:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(t){cN(o,r,i,s,a,"next",t)}function a(t){cN(o,r,i,s,a,"throw",t)}s(void 0)}))});return function(t){return n.apply(this,arguments)}}());this.viewport.call(e)}},{key:"getScene",value:function(){return this.viewport.selectAll(".scene").data(this.getSceneData()).join("svg").attr("class","scene").attr("width","100%").attr("height","100%")}},{key:"initScene",value:function(){var t=this;this.viewport.append("style").text(this.pluginData.resources.style),this.scene=this.getScene(),this.scene.attr("version","1.1"),this.scene.attr("xmlns","http://www.w3.org/2000/svg"),this.scene.append("defs").html(Object.keys(this.pluginData.resources.markers).map((function(e){return t.pluginData.resources.markers[e]})).join(""));var e=this.pluginData.scene,n=e.x,r=e.y,i=e.zoom,o="translate(".concat(n," ").concat(r,") scale(").concat(i,")");this.scene.append("g").attr("class","components").attr("transform",o),this.scene.append("g").attr("class","links").attr("transform",o)}},{key:"draw",value:function(){if(this.scene=this.getScene(),this.componentRenderer.render("scene"),this.linkRenderer.render("scene"),this.readOnly){for(var t=this.viewport.node().getBoundingClientRect(),e=t.width,n=t.height,r=this.viewport.select(".scene .components").node().getBBox(),i=r.width,o=r.height,s=r.x,a=r.y,c=e/ic;)u*=.9;this.scene.attr("viewBox","".concat(s-15," ").concat(a-15," ").concat(i+s+15," ").concat(o+a+15)),this.pluginData.scene.zoom=u}}},{key:"arrangeComponentsPosition",value:function(t,e){this.layout.generateComponentsLayout(t,e)}},{key:"resize",value:function(t){this.layout.resize(t)}},{key:"getSceneData",value:function(){var t=this;return[this.d3.hierarchy(oN({id:"scene",name:"",children:nN(this.pluginData.components.filter((function(t){return null===t.getContainerId()})))},this.pluginData.scene),(function(e){return"scene"===e.id?e.children:t.pluginData.getChildren(e.id)}))]}},{key:"dropComponent",value:function(t,e){var n=e.target.closest(".component");if(t.drawOption.width=t.definition.width,t.drawOption.height=t.definition.height,!n){var r=this.viewport.select(".scene").node().getBoundingClientRect(),i=r.x,o=r.y;return t.drawOption.x=(e.clientX-i-this.pluginData.scene.x)/this.pluginData.scene.zoom-t.definition.defaultWidth/2,void(t.drawOption.y=(e.clientY-o-this.pluginData.scene.y)/this.pluginData.scene.zoom-t.definition.defaultHeight/2)}if(n.canContain(t.definition.type)){var s=this.viewport.select(".".concat(t.id,".container")).node().getBoundingClientRect(),a=s.x,c=s.y;t.drawOption.x=(e.clientX-a-this.pluginData.scene.x)/this.pluginData.scene.zoom-t.definition.defaultWidth/2,t.drawOption.y=(e.clientY-c-this.pluginData.scene.y)/this.pluginData.scene.zoom-t.definition.defaultHeight/2}}},{key:"exportSvg",value:function(t){return this.viewport.selectAll(".scene > g").attr("transform",""),document.querySelector("#".concat(t," .scene")).outerHTML}}],n&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[]).map((function(t){return t.path}))}},{key:"parseConfiguration",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.pluginData.emitEvent({parent:r,type:"Parser",action:"read",status:"running",files:[e.path],data:{global:!1}});if(null!=e.content){var o=JSON.parse(e.content);o[t.path]?o[t.path][this.pluginData.name]?(Object.keys(o[t.path][this.pluginData.name]).forEach((function(e){var r=n.pluginData.getComponentByConfigurationKey(e);r&&o[t.path][n.pluginData.name][e]&&(r.drawOption=new g(o[t.path][n.pluginData.name][e]))})),this.pluginData.emitEvent({id:i,status:"success"})):this.pluginData.emitEvent({id:i,status:"warning",data:{code:"no_plugin_content",global:!1}}):this.pluginData.emitEvent({id:i,status:"warning",data:{code:"no_diagram_content",global:!1}})}else this.pluginData.emitEvent({id:i,status:"warning",data:{code:"no_content",global:!1}})}},{key:"isParsable",value:function(t){return null!=t}}],e&&function(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(t,e){return t[e.path]="",t}),{});return this.renderFiles(t).forEach((function(t){e[t.path]=t.content})),Object.keys(e).map((function(t){return new $({path:t,content:e[t]})}))}},{key:"renderFiles",value:function(){return[]}},{key:"renderConfiguration",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.pluginData.emitEvent({parent:r,type:"Render",action:"write",status:"running",files:[e.path],data:{global:!1}}),o=JSON.parse(e.content)||{};o[t.path]||(o[t.path]={}),o[t.path][this.pluginData.name]={},this.pluginData.components.filter((function(t){return t.drawOption})).forEach((function(e){var r=e.getConfigurationKey();o[t.path][n.pluginData.name][r]=e.drawOption})),e.content=JSON.stringify(o,(function(t,e){return null===e?void 0:e}),2),this.pluginData.emitEvent({id:i,status:"success"})}}],e&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{id:null,parentId:null,files:null,components:null,links:null,type:null,action:null,status:null,data:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.id,r=e.parentId,i=e.files,o=e.components,s=e.links,a=e.type,c=e.action,u=e.status,l=e.data;this.id=n||null,this.parentId=r||null,this.startDate=null,this.endDate=null,this.files=i||null,this.components=o||null,this.links=s||null,this.type=a||null,this.action=c||null,this.status=u||null,this.data=l||null}));const SN=TN;function EN(t){return EN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},EN(t)}function AN(t,e,n){return e=NN(e),function(t,e){if(e&&("object"==EN(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ON()?Reflect.construct(e,n||[],NN(t).constructor):e.apply(t,n))}function ON(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ON=function(){return!!t})()}function NN(t){return NN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},NN(t)}function CN(t,e){return CN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},CN(t,e)}var LN=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{anchorName:null};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=AN(this,e,[n])).anchorName=n.anchorName||null,t.endX=null,t.endY=null,t.isTemporary=!0,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&CN(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(U);const RN=LN;function PN(t){return PN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},PN(t)}function IN(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n1&&void 0!==arguments[1]?arguments[1]:{name:null,version:null,components:[],variables:[],definitions:{components:[],links:[]},parseLogs:[],resources:{},scene:{x:0,y:0,zoom:1,selection:[],selectionRef:null}},m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=d.name||null,this.version=d.version||null,this.components=d.components||[],this.scene={x:(null===(n=d.scene)||void 0===n?void 0:n.x)||0,y:(null===(r=d.scene)||void 0===r?void 0:r.y)||0,zoom:(null===(i=d.scene)||void 0===i?void 0:i.zoom)||1,selection:(null===(o=d.scene)||void 0===o?void 0:o.selection)||[],selectionRef:(null===(s=d.scene)||void 0===s?void 0:s.selectionRef)||null},this.variables=d.variables||[],this.definitions={components:(null===(a=d.definitions)||void 0===a?void 0:a.components)||[],links:(null===(c=d.definitions)||void 0===c?void 0:c.links)||[]},this.parseLogs=d.parseLogs||[],this.__eventIndex=0,this.eventManager=m,this.eventLogs=[],this.configuration=e,this.resources={icons:DN({},null===(u=d.resources)||void 0===u?void 0:u.icons),markers:DN({},null===(l=d.resources)||void 0===l?void 0:l.markers),links:DN({},null===(h=d.resources)||void 0===h?void 0:h.links),models:DN({},null===(f=d.resources)||void 0===f?void 0:f.models),style:(null===(p=d.resources)||void 0===p?void 0:p.style)||""},this.temporaryLink=null},e=[{key:"coreVersion",get:function(){return"0.28.0"}},{key:"getComponentById",value:function(t){return this.components.find((function(e){return e.id===t}))||null}},{key:"getComponentDepth",value:function(t){var e=this.getComponentById(t).getContainerId();return e?this.getComponentDepth(e)+1:0}},{key:"getComponentByConfigurationKey",value:function(t){return this.getComponentById(t)}},{key:"renameComponentExternalId",value:function(t,e){this.getComponentById(t).setExternalId(e)}},{key:"getComponentsByType",value:function(t){return this.components.filter((function(e){var n=e.definition;return n&&n.type===t}))}},{key:"addComponent",value:function(t,e){var n=this.generateComponentId();return this.components.push(new S({id:n,name:n,definition:t,path:e})),n}},{key:"generateComponentId",value:function(){var t=this.components.map((function(t){return t.id})).filter((function(t){return new RegExp("".concat("id_","\\d+")).test(t)})).map((function(t){return parseInt(t.substring(3),10)})),e=0===t.length?1:Math.max.apply(Math,function(t){return function(t){if(Array.isArray(t))return IN(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return IN(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?IN(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t))+1;return"".concat("id_").concat(e)}},{key:"removeComponentById",value:function(t){var e=this;this.getChildren(t).forEach((function(t){return e.removeComponentById(t.id)})),this.components=this.components.filter((function(e){return e.id!==t})),this.components.forEach((function(e){e.removeLinkAttribute(t)}))}},{key:"removeLink",value:function(t){var e=t.source,n=t.target,r=t.definition.attributeRef;this.getComponentById(e).removeLinkAttribute(n,r)}},{key:"getLinks",value:function(){var t=this,e=[];return this.definitions.links.forEach((function(n){t.getComponentsByType(n.sourceRef).forEach((function(r){var i=r.getAttributeByName(n.attributeRef);i&&t.getLinkedComponentsIds(i).forEach((function(t){return e.push(new U({definition:n,source:r.id,target:t,isReverse:"Reverse"===i.definition.linkType}))}))}))})),this.temporaryLink&&e.push(this.temporaryLink),e.concat(this.getWorkflowLinks())}},{key:"getAttributeValue",value:function(t){return t.isVariable?this.getVariableValue(t.value):t.value}},{key:"getLinkedComponentsIds",value:function(t){var e=this.getAttributeValue(t);return null===e?[]:Array.isArray(e)?e:[e]}},{key:"getVariableValue",value:function(t){var e;return(null===(e=this.variables.find((function(e){return e.name===t})))||void 0===e?void 0:e.value)||null}},{key:"setVariableValue",value:function(t,e){var n=this.variables.find((function(e){return e.name===t}));n&&(n.value=e)}},{key:"getComponentIdFromValue",value:function(t){return t}},{key:"canHaveLink",value:function(t){return this.definitions.links.some((function(e){return e.sourceRef===t}))}},{key:"canBeLinked",value:function(t,e){return this.definitions.links.some((function(n){var r=n.sourceRef,i=n.targetRef;return r===t&&i===e}))}},{key:"createTemporaryLink",value:function(t,e){this.temporaryLink=new RN({anchorName:e,source:t,definition:this.definitions.links.find((function(t){return t.isTemporary}))})}},{key:"getWorkflowLinks",value:function(){var t=this;return this.components.filter((function(t){var e;return null===(e=t.definition.displayType)||void 0===e?void 0:e.match("workflow")})).reduce((function(e,n){var r=t.getChildren(n.id);if(r.length>1)for(var i=0;in,this.components.splice(i,0,r),this.components.splice(n+(it}))}},{key:"emitEvent",value:function(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.id;return r?(e=this.getEventLogById(r),Object.keys(n).forEach((function(t){e[t]=n[t]}))):(this.__eventIndex+=1,r=this.__eventIndex,(e=new SN(DN(DN({},n),{},{id:r}))).startDate=Date.now(),this.eventLogs.push(e)),["success","warning","error"].includes(e.status)&&(e.endDate=Date.now()),null!==(t=this.eventManager)&&void 0!==t&&t.next&&this.eventManager.next({plugin:this.name,event:DN({},e)}),r}}],e&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{editor:{syntax:null},restrictiveFolder:null,defaultFileName:null,defaultFileExtension:null,tags:[],isFolderTypeDiagram:!0,extraResources:[],rootContainer:{margin:30,gap:50},container:{margin:30,gap:50},keysBinding:{},i18n:{}};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.editor=KN({syntax:null},s.editor),this.restrictiveFolder=s.restrictiveFolder||null,this.defaultFileName=s.defaultFileName||null,this.defaultFileExtension=s.defaultFileExtension||null,this.tags=s.tags||[],this.isFolderTypeDiagram=null===(e=s.isFolderTypeDiagram)||void 0===e||e,this.extraResources=s.extraResources||[],this.rootContainer={margin:(null===(n=s.rootContainer)||void 0===n?void 0:n.margin)||30,gap:(null===(r=s.rootContainer)||void 0===r?void 0:r.gap)||50},this.container={margin:(null===(i=s.container)||void 0===i?void 0:i.margin)||30,gap:(null===(o=s.container)||void 0===o?void 0:o.gap)||50},this.keysBinding=KN({moveSceneUp:["ArrowUp"],moveSceneDown:["ArrowDown"],moveSceneLeft:["ArrowLeft"],moveSceneRight:["ArrowRight"],moveComponentUp:[],moveComponentDown:[],moveComponentLeft:[],moveComponentRight:[],zoomIn:["+"],zoomOut:["-"],deleteObject:["Delete"],editComponent:[",","?"],selection:["Shift"],selectAll:["A"],deselectAll:["D"]},s.keysBinding),this.i18n=s.i18n||{}}));const GN=WN;function YN(t){return YN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},YN(t)}function $N(t){var e=function(t){if("object"!=YN(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=YN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==YN(e)?e:e+""}var XN=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{event:null,configuration:null,pluginData:null,pluginDrawer:null,pluginMetadata:null,pluginParser:null,pluginRenderer:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.configuration=e.configuration||new GN,this.data=e.pluginData||new UN(this.configuration,{},e.event),this.__drawer=e.pluginDrawer||new hN(this.data),this.__metadata=e.pluginMetadata||new mN(this.data),this.__parser=e.pluginParser||new bN(this.data),this.__renderer=e.pluginRenderer||new kN(this.data)},e=[{key:"init",value:function(){var t=this.data.emitEvent({type:"Plugin",action:"init",status:"running"});this.__metadata.parse(t),this.data.initLinkDefinitions(t),this.data.emitEvent({id:t,status:"success"})}},{key:"initResources",value:function(t){this.data.resources=t}},{key:"initDrawer",value:function(t,e){this.__drawer.init(t,e)}},{key:"draw",value:function(){this.__drawer.draw()}},{key:"parse",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=this.data.emitEvent({type:"Parser",action:"read",status:"running",files:n.map((function(t){return t.path})).concat(null==e?void 0:e.path),data:{global:!0}});this.__parser.parse(t,n,r),this.__parser.parseConfiguration(t,e,r),this.data.emitEvent({id:r,status:"success"})}},{key:"isParsable",value:function(t){return this.__parser.isParsable(t)}},{key:"getModels",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.__parser.getModels(e.filter((function(e){return t.isParsable(e)})))}},{key:"render",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=this.data.emitEvent({type:"Render",action:"write",status:"running",files:n.map((function(t){return t.path})).concat(e.path),data:{global:!0}});this.__renderer.renderConfiguration(t,e,r);var i=this.__renderer.render(n,r).concat(e);return this.data.emitEvent({id:r,status:"success"}),i}},{key:"arrangeComponentsPosition",value:function(t,e){this.__drawer.arrangeComponentsPosition(t,e)}},{key:"resize",value:function(t){this.__drawer.resize(t)}},{key:"exportSvg",value:function(t){this.__drawer.init(t,!0),this.draw();var e=this.__drawer.exportSvg(t);return this.__drawer.init(t,!1),this.draw(),e}},{key:"getComponentPosition",value:function(t,e){var n=e.x,r=e.y,i=this.__drawer.actions.zoom,o=i.scale,s=i.translate,a=document.querySelector("#".concat(t)).getBoundingClientRect(),c=a.left,u=a.top;return{x:(n-c-s.x)/o,y:(r-u-s.y)/o}}},{key:"addComponent",value:function(t,e,n,r){var i=this.data.addComponent(e,n),o=this.data.getComponentById(i);if(t){var s=this.data.getComponentById(t);o.setReferenceAttribute(s)}return r&&this.__drawer.dropComponent(o,r),i}}],e&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{type:null,value:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.type,r=e.value;this.type=n||null,this.value=r||null}));const QN=JN;function tC(t){return tC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tC(t)}function eC(t,e,n){return e=rC(e),function(t,e){if(e&&("object"==tC(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,nC()?Reflect.construct(e,n||[],rC(t).constructor):e.apply(t,n))}function nC(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(nC=function(){return!!t})()}function rC(t){return rC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rC(t)}function iC(t,e){return iC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},iC(t,e)}var oC=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{name:null,type:null,value:null,category:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=eC(this,e,[n]);var r=n.name,i=n.type,o=n.value,s=n.category;return t.__class="Variable",t.name=r||null,t.type=i||null,t.value=o||null,t.category=s||null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&iC(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(m);const sC=oC})();var o=e;for(var s in i)o[s]=i[s];i.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})()},326:function(t){var e;"undefined"!=typeof self&&self,e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=11)}([function(t,e,n){"use strict";var r=Array.prototype,i=Object.prototype,o={"&":"&",'"':""","'":"'","<":"<",">":">","\\":"\"},s=/[&"'<>\\]/g;function a(t,e){return i.hasOwnProperty.call(t,e)}function c(t){return o[t]}function u(t,e,n){var r,i,o;if(t instanceof Error&&(t=(i=t).name+": "+i.message),Object.setPrototypeOf?(r=new Error(t),Object.setPrototypeOf(r,u.prototype)):(r=this,Object.defineProperty(r,"message",{enumerable:!1,writable:!0,value:t})),Object.defineProperty(r,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(r,this.constructor),i){var s=Object.getOwnPropertyDescriptor(i,"stack");(o=s&&(s.get||function(){return s.value}))||(o=function(){return i.stack})}else{var a=new Error(t).stack;o=function(){return a}}return Object.defineProperty(r,"stack",{get:function(){return o.call(r)}}),Object.defineProperty(r,"cause",{value:i}),r.lineno=e,r.colno=n,r.firstUpdate=!0,r.Update=function(t){var e="("+(t||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?e+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(e+=" [Line "+this.lineno+"]")),e+="\n ",this.firstUpdate&&(e+=" "),this.message=e+(this.message||""),this.firstUpdate=!1,this},r}function l(t){return"[object Function]"===i.toString.call(t)}function h(t){return"[object Array]"===i.toString.call(t)}function f(t){return"[object String]"===i.toString.call(t)}function p(t){return"[object Object]"===i.toString.call(t)}function d(t){var e,n=(e=t)?"string"==typeof e?e.split("."):[e]:[];return function(t){for(var e=t,r=0;rt.length)s=i.slice(0,t.length),i.slice(s.length,u).forEach((function(t,n){n2?i-2:0),s=2;s0||!n)&&process.stdout.write(" ".repeat(e));var o=i===r.length-1?"":"\n";process.stdout.write(""+t+o)}))}t.exports={Node:c,Root:h,NodeList:l,Value:u,Literal:f,Symbol:p,Group:d,Array:m,Pair:y,Dict:g,Output:U,Capture:z,TemplateData:V,If:b,IfAsync:_,InlineIf:w,For:x,AsyncEach:k,AsyncAll:T,Macro:S,Caller:E,Import:A,FromImport:O,FunCall:N,Filter:C,FilterAsync:L,KeywordArgs:R,Block:P,Super:I,Extends:M,Include:D,Set:j,Switch:B,Case:F,LookupVal:v,BinOp:H,In:q,Is:W,Or:G,And:Y,Not:$,Add:X,Concat:Z,Sub:J,Mul:Q,Div:tt,FloorDiv:et,Mod:nt,Pow:rt,Neg:it,Pos:ot,Compare:st,CompareOperand:at,CallExtension:ct,CallExtensionAsync:ut,printNodes:function t(e,n){if(n=n||0,lt(e.typename+": ",n),e instanceof l)lt("\n"),e.children.forEach((function(e){t(e,n+2)}));else if(e instanceof ct)lt(e.extName+"."+e.prop+"\n"),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach((function(e){t(e,n+2)}));else{var r=[],i=null;e.iterFields((function(t,e){t instanceof c?r.push([e,t]):(i=i||{})[e]=t})),i?lt(JSON.stringify(i,null,2)+"\n",null,!0):lt("\n"),r.forEach((function(e){var r=e[0],i=e[1];lt("["+r+"] =>",n+2),t(i,n+4)}))}}}},function(t,e){},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var i=n(8),o=n(17),s=n(3),a=n(0).TemplateError,c=n(2).Frame,u=n(1).Obj,l={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},h=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n);var o=i.prototype;return o.init=function(t,e){this.templateName=t,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this._scopeClosers="",this.inBlock=!1,this.throwOnUndefined=e},o.fail=function(t,e,n){throw void 0!==e&&(e+=1),void 0!==n&&(n+=1),new a(t,e,n)},o._pushBuffer=function(){var t=this._tmpid();return this.bufferStack.push(this.buffer),this.buffer=t,this._emit("var "+this.buffer+' = "";'),t},o._popBuffer=function(){this.buffer=this.bufferStack.pop()},o._emit=function(t){this.codebuf.push(t)},o._emitLine=function(t){this._emit(t+"\n")},o._emitLines=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r0&&i._emit(","),i.compile(t,e)})),r&&this._emit(r)},o._compileExpression=function(t,e){this.assertType(t,s.Literal,s.Symbol,s.Group,s.Array,s.Dict,s.FunCall,s.Caller,s.Filter,s.LookupVal,s.Compare,s.InlineIf,s.In,s.Is,s.And,s.Or,s.Not,s.Add,s.Concat,s.Sub,s.Mul,s.Div,s.FloorDiv,s.Mod,s.Pow,s.Neg,s.Pos,s.Compare,s.NodeList),this.compile(t,e)},o.assertType=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r0&&r._emit(","),t){r._emitLine("function(cb) {"),r._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");var i=r._pushBuffer();r._withScopedSyntax((function(){r.compile(t,e),r._emitLine("cb(null, "+i+");")})),r._popBuffer(),r._emitLine("return "+i+";"),r._emitLine("}")}else r._emit("null")})),n){var c=this._tmpid();this._emitLine(", "+this._makeCallback(c)),this._emitLine(this.buffer+" += runtime.suppressValue("+c+", "+a+" && env.opts.autoescape);"),this._addScopeLevel()}else this._emit(")"),this._emit(", "+a+" && env.opts.autoescape);\n")},o.compileCallExtensionAsync=function(t,e){this.compileCallExtension(t,e,!0)},o.compileNodeList=function(t,e){this._compileChildren(t,e)},o.compileLiteral=function(t){if("string"==typeof t.value){var e=t.value.replace(/\\/g,"\\\\");e=(e=(e=(e=(e=e.replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+e+'"')}else null===t.value?this._emit("null"):this._emit(t.value.toString())},o.compileSymbol=function(t,e){var n=t.value,r=e.lookup(n);r?this._emit(r):this._emit('runtime.contextOrFrameLookup(context, frame, "'+n+'")')},o.compileGroup=function(t,e){this._compileAggregate(t,e,"(",")")},o.compileArray=function(t,e){this._compileAggregate(t,e,"[","]")},o.compileDict=function(t,e){this._compileAggregate(t,e,"{","}")},o.compilePair=function(t,e){var n=t.key,r=t.value;n instanceof s.Symbol?n=new s.Literal(n.lineno,n.colno,n.value):n instanceof s.Literal&&"string"==typeof n.value||this.fail("compilePair: Dict keys must be strings or names",n.lineno,n.colno),this.compile(n,e),this._emit(": "),this._compileExpression(r,e)},o.compileInlineIf=function(t,e){this._emit("("),this.compile(t.cond,e),this._emit("?"),this.compile(t.body,e),this._emit(":"),null!==t.else_?this.compile(t.else_,e):this._emit('""'),this._emit(")")},o.compileIn=function(t,e){this._emit("runtime.inOperator("),this.compile(t.left,e),this._emit(","),this.compile(t.right,e),this._emit(")")},o.compileIs=function(t,e){var n=t.right.name?t.right.name.value:t.right.value;this._emit('env.getTest("'+n+'").call(context, '),this.compile(t.left,e),t.right.args&&(this._emit(","),this.compile(t.right.args,e)),this._emit(") === true")},o._binOpEmitter=function(t,e,n){this.compile(t.left,e),this._emit(n),this.compile(t.right,e)},o.compileOr=function(t,e){return this._binOpEmitter(t,e," || ")},o.compileAnd=function(t,e){return this._binOpEmitter(t,e," && ")},o.compileAdd=function(t,e){return this._binOpEmitter(t,e," + ")},o.compileConcat=function(t,e){return this._binOpEmitter(t,e,' + "" + ')},o.compileSub=function(t,e){return this._binOpEmitter(t,e," - ")},o.compileMul=function(t,e){return this._binOpEmitter(t,e," * ")},o.compileDiv=function(t,e){return this._binOpEmitter(t,e," / ")},o.compileMod=function(t,e){return this._binOpEmitter(t,e," % ")},o.compileNot=function(t,e){this._emit("!"),this.compile(t.target,e)},o.compileFloorDiv=function(t,e){this._emit("Math.floor("),this.compile(t.left,e),this._emit(" / "),this.compile(t.right,e),this._emit(")")},o.compilePow=function(t,e){this._emit("Math.pow("),this.compile(t.left,e),this._emit(", "),this.compile(t.right,e),this._emit(")")},o.compileNeg=function(t,e){this._emit("-"),this.compile(t.target,e)},o.compilePos=function(t,e){this._emit("+"),this.compile(t.target,e)},o.compileCompare=function(t,e){var n=this;this.compile(t.expr,e),t.ops.forEach((function(t){n._emit(" "+l[t.type]+" "),n.compile(t.expr,e)}))},o.compileLookupVal=function(t,e){this._emit("runtime.memberLookup(("),this._compileExpression(t.target,e),this._emit("),"),this._compileExpression(t.val,e),this._emit(")")},o._getNodeName=function(t){switch(t.typename){case"Symbol":return t.value;case"FunCall":return"the return value of ("+this._getNodeName(t.name)+")";case"LookupVal":return this._getNodeName(t.target)+'["'+this._getNodeName(t.val)+'"]';case"Literal":return t.value.toString();default:return"--expression--"}},o.compileFunCall=function(t,e){this._emit("(lineno = "+t.lineno+", colno = "+t.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(t.name,e),this._emit(', "'+this._getNodeName(t.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(t.args,e,"[","])"),this._emit(")")},o.compileFilter=function(t,e){var n=t.name;this.assertType(n,s.Symbol),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(t.args,e),this._emit(")")},o.compileFilterAsync=function(t,e){var n=t.name,r=t.symbol.value;this.assertType(n,s.Symbol),e.set(r,r),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(t.args,e),this._emitLine(", "+this._makeCallback(r)),this._addScopeLevel()},o.compileKeywordArgs=function(t,e){this._emit("runtime.makeKeywordArgs("),this.compileDict(t,e),this._emit(")")},o.compileSet=function(t,e){var n=this,r=[];t.targets.forEach((function(t){var i=t.value,o=e.lookup(i);null==o&&(o=n._tmpid(),n._emitLine("var "+o+";")),r.push(o)})),t.value?(this._emit(r.join(" = ")+" = "),this._compileExpression(t.value,e),this._emitLine(";")):(this._emit(r.join(" = ")+" = "),this.compile(t.body,e),this._emitLine(";")),t.targets.forEach((function(t,e){var i=r[e],o=t.value;n._emitLine('frame.set("'+o+'", '+i+", true);"),n._emitLine("if(frame.topLevel) {"),n._emitLine('context.setVariable("'+o+'", '+i+");"),n._emitLine("}"),"_"!==o.charAt(0)&&(n._emitLine("if(frame.topLevel) {"),n._emitLine('context.addExport("'+o+'", '+i+");"),n._emitLine("}"))}))},o.compileSwitch=function(t,e){var n=this;this._emit("switch ("),this.compile(t.expr,e),this._emit(") {"),t.cases.forEach((function(t,r){n._emit("case "),n.compile(t.cond,e),n._emit(": "),n.compile(t.body,e),t.body.children.length&&n._emitLine("break;")})),t.default&&(this._emit("default:"),this.compile(t.default,e)),this._emit("}")},o.compileIf=function(t,e,n){var r=this;this._emit("if("),this._compileExpression(t.cond,e),this._emitLine(") {"),this._withScopedSyntax((function(){r.compile(t.body,e),n&&r._emit("cb()")})),t.else_?(this._emitLine("}\nelse {"),this._withScopedSyntax((function(){r.compile(t.else_,e),n&&r._emit("cb()")}))):n&&(this._emitLine("}\nelse {"),this._emit("cb()")),this._emitLine("}")},o.compileIfAsync=function(t,e){this._emit("(function(cb) {"),this.compileIf(t,e,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},o._emitLoopBindings=function(t,e,n,r){var i=this;[{name:"index",val:n+" + 1"},{name:"index0",val:n},{name:"revindex",val:r+" - "+n},{name:"revindex0",val:r+" - "+n+" - 1"},{name:"first",val:n+" === 0"},{name:"last",val:n+" === "+r+" - 1"},{name:"length",val:r}].forEach((function(t){i._emitLine('frame.set("loop.'+t.name+'", '+t.val+");")}))},o.compileFor=function(t,e){var n=this,r=this._tmpid(),i=this._tmpid(),o=this._tmpid();if(e=e.push(),this._emitLine("frame = frame.push();"),this._emit("var "+o+" = "),this._compileExpression(t.arr,e),this._emitLine(";"),this._emit("if("+o+") {"),this._emitLine(o+" = runtime.fromIterator("+o+");"),t.name instanceof s.Array){this._emitLine("var "+r+";"),this._emitLine("if(runtime.isArray("+o+")) {"),this._emitLine("var "+i+" = "+o+".length;"),this._emitLine("for("+r+"=0; "+r+" < "+o+".length; "+r+"++) {"),t.name.children.forEach((function(i,s){var a=n._tmpid();n._emitLine("var "+a+" = "+o+"["+r+"]["+s+"];"),n._emitLine('frame.set("'+i+'", '+o+"["+r+"]["+s+"]);"),e.set(t.name.children[s].value,a)})),this._emitLoopBindings(t,o,r,i),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("}"),this._emitLine("} else {");var a=t.name.children,c=a[0],u=a[1],l=this._tmpid(),h=this._tmpid();e.set(c.value,l),e.set(u.value,h),this._emitLine(r+" = -1;"),this._emitLine("var "+i+" = runtime.keys("+o+").length;"),this._emitLine("for(var "+l+" in "+o+") {"),this._emitLine(r+"++;"),this._emitLine("var "+h+" = "+o+"["+l+"];"),this._emitLine('frame.set("'+c.value+'", '+l+");"),this._emitLine('frame.set("'+u.value+'", '+h+");"),this._emitLoopBindings(t,o,r,i),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("}"),this._emitLine("}")}else{var f=this._tmpid();e.set(t.name.value,f),this._emitLine("var "+i+" = "+o+".length;"),this._emitLine("for(var "+r+"=0; "+r+" < "+o+".length; "+r+"++) {"),this._emitLine("var "+f+" = "+o+"["+r+"];"),this._emitLine('frame.set("'+t.name.value+'", '+f+");"),this._emitLoopBindings(t,o,r,i),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("}")}this._emitLine("}"),t.else_&&(this._emitLine("if (!"+i+") {"),this.compile(t.else_,e),this._emitLine("}")),this._emitLine("frame = frame.pop();")},o._compileAsyncLoop=function(t,e,n){var r=this,i=this._tmpid(),o=this._tmpid(),a=this._tmpid(),c=n?"asyncAll":"asyncEach";if(e=e.push(),this._emitLine("frame = frame.push();"),this._emit("var "+a+" = runtime.fromIterator("),this._compileExpression(t.arr,e),this._emitLine(");"),t.name instanceof s.Array){var u=t.name.children.length;this._emit("runtime."+c+"("+a+", "+u+", function("),t.name.children.forEach((function(t){r._emit(t.value+",")})),this._emit(i+","+o+",next) {"),t.name.children.forEach((function(t){var n=t.value;e.set(n,n),r._emitLine('frame.set("'+n+'", '+n+");")}))}else{var l=t.name.value;this._emitLine("runtime."+c+"("+a+", 1, function("+l+", "+i+", "+o+",next) {"),this._emitLine('frame.set("'+l+'", '+l+");"),e.set(l,l)}this._emitLoopBindings(t,a,i,o),this._withScopedSyntax((function(){var o;n&&(o=r._pushBuffer()),r.compile(t.body,e),r._emitLine("next("+i+(o?","+o:"")+");"),n&&r._popBuffer()}));var h=this._tmpid();this._emitLine("}, "+this._makeCallback(h)),this._addScopeLevel(),n&&this._emitLine(this.buffer+" += "+h+";"),t.else_&&(this._emitLine("if (!"+a+".length) {"),this.compile(t.else_,e),this._emitLine("}")),this._emitLine("frame = frame.pop();")},o.compileAsyncEach=function(t,e){this._compileAsyncLoop(t,e)},o.compileAsyncAll=function(t,e){this._compileAsyncLoop(t,e,!0)},o._compileMacro=function(t,e){var n=this,r=[],i=null,o="macro_"+this._tmpid(),a=void 0!==e;t.args.children.forEach((function(e,o){o===t.args.children.length-1&&e instanceof s.Dict?i=e:(n.assertType(e,s.Symbol),r.push(e))}));var u,l=[].concat(r.map((function(t){return"l_"+t.value})),["kwargs"]),h=r.map((function(t){return'"'+t.value+'"'})),f=(i&&i.children||[]).map((function(t){return'"'+t.key.value+'"'}));u=a?e.push(!0):new c,this._emitLines("var "+o+" = runtime.makeMacro(","["+h.join(", ")+"], ","["+f.join(", ")+"], ","function ("+l.join(", ")+") {","var callerFrame = frame;","frame = "+(a?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),r.forEach((function(t){n._emitLine('frame.set("'+t.value+'", l_'+t.value+");"),u.set(t.value,"l_"+t.value)})),i&&i.children.forEach((function(t){var e=t.key.value;n._emit('frame.set("'+e+'", '),n._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+e+'")'),n._emit(' ? kwargs["'+e+'"] : '),n._compileExpression(t.value,u),n._emit(");")}));var p=this._pushBuffer();return this._withScopedSyntax((function(){n.compile(t.body,u)})),this._emitLine("frame = "+(a?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+p+");"),this._emitLine("});"),this._popBuffer(),o},o.compileMacro=function(t,e){var n=this._compileMacro(t),r=t.name.value;e.set(r,n),e.parent?this._emitLine('frame.set("'+r+'", '+n+");"):("_"!==t.name.value.charAt(0)&&this._emitLine('context.addExport("'+r+'");'),this._emitLine('context.setVariable("'+r+'", '+n+");"))},o.compileCaller=function(t,e){this._emit("(function (){");var n=this._compileMacro(t,e);this._emit("return "+n+";})()")},o._compileGetTemplate=function(t,e,n,r){var i=this._tmpid(),o=this._templateName(),s=this._makeCallback(i),a=n?"true":"false",c=r?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(t.template,e),this._emitLine(", "+a+", "+o+", "+c+", "+s),i},o.compileImport=function(t,e){var n=t.target.value,r=this._compileGetTemplate(t,e,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(t.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),e.set(n,r),e.parent?this._emitLine('frame.set("'+n+'", '+r+");"):this._emitLine('context.setVariable("'+n+'", '+r+");")},o.compileFromImport=function(t,e){var n=this,r=this._compileGetTemplate(t,e,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(t.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),t.names.children.forEach((function(t){var i,o,a=n._tmpid();t instanceof s.Pair?(i=t.key.value,o=t.value.value):o=i=t.value,n._emitLine("if(Object.prototype.hasOwnProperty.call("+r+', "'+i+'")) {'),n._emitLine("var "+a+" = "+r+"."+i+";"),n._emitLine("} else {"),n._emitLine("cb(new Error(\"cannot import '"+i+"'\")); return;"),n._emitLine("}"),e.set(o,a),e.parent?n._emitLine('frame.set("'+o+'", '+a+");"):n._emitLine('context.setVariable("'+o+'", '+a+");")}))},o.compileBlock=function(t){var e=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+t.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(e)),this._emitLine(this.buffer+" += "+e+";"),this._addScopeLevel()},o.compileSuper=function(t,e){var n=t.blockName.value,r=t.symbol.value,i=this._makeCallback(r);this._emitLine('context.getSuper(env, "'+n+'", b_'+n+", frame, runtime, "+i),this._emitLine(r+" = runtime.markSafe("+r+");"),this._addScopeLevel(),e.set(r,r)},o.compileExtends=function(t,e){var n=this._tmpid(),r=this._compileGetTemplate(t,e,!0,!1);this._emitLine("parentTemplate = "+r),this._emitLine("for(var "+n+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+n+", parentTemplate.blocks["+n+"]);"),this._emitLine("}"),this._addScopeLevel()},o.compileInclude=function(t,e){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {");var n=this._compileGetTemplate(t,e,!1,t.ignoreMissing);this._emitLine("callback(null,"+n+");});"),this._emitLine("});");var r=this._tmpid();this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(r)),this._emitLine("callback(null,"+r+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel()},o.compileTemplateData=function(t,e){this.compileLiteral(t,e)},o.compileCapture=function(t,e){var n=this,r=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=r},o.compileOutput=function(t,e){var n=this;t.children.forEach((function(r){r instanceof s.TemplateData?r.value&&(n._emit(n.buffer+" += "),n.compileLiteral(r,e),n._emitLine(";")):(n._emit(n.buffer+" += runtime.suppressValue("),n.throwOnUndefined&&n._emit("runtime.ensureDefined("),n.compile(r,e),n.throwOnUndefined&&n._emit(","+t.lineno+","+t.colno+")"),n._emit(", env.opts.autoescape);\n"))}))},o.compileRoot=function(t,e){var n=this;e&&this.fail("compileRoot: root node can't have frame"),e=new c,this._emitFuncBegin(t,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(t,e),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0;var r=[],i=t.findAll(s.Block);i.forEach((function(t,e){var i=t.name.value;if(-1!==r.indexOf(i))throw new Error('Block "'+i+'" defined more than once.');r.push(i),n._emitFuncBegin(t,"b_"+i);var o=new c;n._emitLine("var frame = frame.push(true);"),n.compile(t.body,o),n._emitFuncEnd()})),this._emitLine("return {"),i.forEach((function(t,e){var r="b_"+t.name.value;n._emitLine(r+": "+r+",")})),this._emitLine("root: root\n};")},o.compile=function(t,e){var n=this["compile"+t.typename];n?n.call(this,t,e):this.fail("compile: Cannot compile node: "+t.typename,t.lineno,t.colno)},o.getCode=function(){return this.codebuf.join("")},i}(u);t.exports={compile:function(t,e,n,r,s){void 0===s&&(s={});var a=new h(r,s.throwOnUndefined),c=(n||[]).map((function(t){return t.preprocess})).filter((function(t){return!!t})).reduce((function(t,e){return e(t)}),t);return a.compile(o.transform(i.parse(c,n,s),e,r)),a.getCode()},Compiler:h}},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var i=n(4),o=n(1).EmitterObj;t.exports=function(t){var e,n;function o(){return t.apply(this,arguments)||this}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n);var s=o.prototype;return s.resolve=function(t,e){return i.resolve(i.dirname(t),e)},s.isRelative=function(t){return 0===t.indexOf("./")||0===t.indexOf("../")},o}(o)},function(t,e,n){"use strict";function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,i(t,e)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}var o=n(12),s=n(15),a=n(0),c=n(5),u=n(18),l=n(10),h=l.FileSystemLoader,f=l.WebLoader,p=l.PrecompiledLoader,d=n(20),m=n(21),y=n(1),g=y.Obj,v=y.EmitterObj,b=n(2),_=b.handleError,w=b.Frame,x=n(22);function k(t,e,n){o((function(){t(e,n)}))}var T={type:"code",obj:{root:function(t,e,n,r,i){try{i(null,"")}catch(t){i(_(t,null,null))}}}},S=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var n=e.prototype;return n.init=function(t,e){var n=this;e=this.opts=e||{},this.opts.dev=!!e.dev,this.opts.autoescape=null==e.autoescape||e.autoescape,this.opts.throwOnUndefined=!!e.throwOnUndefined,this.opts.trimBlocks=!!e.trimBlocks,this.opts.lstripBlocks=!!e.lstripBlocks,this.loaders=[],t?this.loaders=a.isArray(t)?t:[t]:h?this.loaders=[new h("views")]:f&&(this.loaders=[new f("/views")]),"undefined"!=typeof window&&window.nunjucksPrecompiled&&this.loaders.unshift(new p(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=m(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],a._entries(u).forEach((function(t){var e=t[0],r=t[1];return n.addFilter(e,r)})),a._entries(d).forEach((function(t){var e=t[0],r=t[1];return n.addTest(e,r)}))},n._initLoaders=function(){var t=this;this.loaders.forEach((function(e){e.cache={},"function"==typeof e.on&&(e.on("update",(function(n,r){e.cache[n]=null,t.emit("update",n,r,e)})),e.on("load",(function(n,r){t.emit("load",n,r,e)})))}))},n.invalidateCache=function(){this.loaders.forEach((function(t){t.cache={}}))},n.addExtension=function(t,e){return e.__name=t,this.extensions[t]=e,this.extensionsList.push(e),this},n.removeExtension=function(t){var e=this.getExtension(t);e&&(this.extensionsList=a.without(this.extensionsList,e),delete this.extensions[t])},n.getExtension=function(t){return this.extensions[t]},n.hasExtension=function(t){return!!this.extensions[t]},n.addGlobal=function(t,e){return this.globals[t]=e,this},n.getGlobal=function(t){if(void 0===this.globals[t])throw new Error("global not found: "+t);return this.globals[t]},n.addFilter=function(t,e,n){var r=e;return n&&this.asyncFilters.push(t),this.filters[t]=r,this},n.getFilter=function(t){if(!this.filters[t])throw new Error("filter not found: "+t);return this.filters[t]},n.addTest=function(t,e){return this.tests[t]=e,this},n.getTest=function(t){if(!this.tests[t])throw new Error("test not found: "+t);return this.tests[t]},n.resolveTemplate=function(t,e,n){return t.isRelative&&e&&t.isRelative(n)&&t.resolve?t.resolve(e,n):n},n.getTemplate=function(t,e,n,r,i){var o,s=this,c=this,u=null;if(t&&t.raw&&(t=t.raw),a.isFunction(n)&&(i=n,n=null,e=e||!1),a.isFunction(e)&&(i=e,e=!1),t instanceof A)u=t;else{if("string"!=typeof t)throw new Error("template names must be a string: "+t);for(var l=0;l0&&!this.skip(i.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",t.lineno,t.colno);var a=this.parsePrimary();if("_"===a.value.charAt(0)&&this.fail("parseFrom: names starting with an underscore cannot be imported",a.lineno,a.colno),this.skipSymbol("as")){var c=this.parsePrimary();r.addChild(new o.Pair(a.lineno,a.colno,a,c))}else r.addChild(a);n=this.parseWithContext()}return new o.FromImport(t.lineno,t.colno,e,r,n)},c.parseBlock=function(){var t=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",t.lineno,t.colno);var e=new o.Block(t.lineno,t.colno);e.name=this.parsePrimary(),e.name instanceof o.Symbol||this.fail("parseBlock: variable name expected",t.lineno,t.colno),this.advanceAfterBlockEnd(t.value),e.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(e.name.value);var n=this.peekToken();return n||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(n.value),e},c.parseExtends=function(){var t="extends",e=this.peekToken();this.skipSymbol(t)||this.fail("parseTemplateRef: expected "+t);var n=new o.Extends(e.lineno,e.colno);return n.template=this.parseExpression(),this.advanceAfterBlockEnd(e.value),n},c.parseInclude=function(){var t="include",e=this.peekToken();this.skipSymbol(t)||this.fail("parseInclude: expected "+t);var n=new o.Include(e.lineno,e.colno);return n.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(n.ignoreMissing=!0),this.advanceAfterBlockEnd(e.value),n},c.parseIf=function(){var t,e=this.peekToken();this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?t=new o.If(e.lineno,e.colno):this.skipSymbol("ifAsync")?t=new o.IfAsync(e.lineno,e.colno):this.fail("parseIf: expected if, elif, or elseif",e.lineno,e.colno),t.cond=this.parseExpression(),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("elif","elseif","else","endif");var n=this.peekToken();switch(n&&n.value){case"elseif":case"elif":t.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),t.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":t.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return t},c.parseSet=function(){var t=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",t.lineno,t.colno);for(var e,n=new o.Set(t.lineno,t.colno,[]);(e=this.parsePrimary())&&(n.targets.push(e),this.skip(i.TOKEN_COMMA)););return this.skipValue(i.TOKEN_OPERATOR,"=")?(n.value=this.parseExpression(),this.advanceAfterBlockEnd(t.value)):this.skip(i.TOKEN_BLOCK_END)?(n.body=new o.Capture(t.lineno,t.colno,this.parseUntilBlocks("endset")),n.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",t.lineno,t.colno),n},c.parseSwitch=function(){var t="switch",e="endswitch",n="case",r="default",i=this.peekToken();this.skipSymbol(t)||this.skipSymbol(n)||this.skipSymbol(r)||this.fail('parseSwitch: expected "switch," "case" or "default"',i.lineno,i.colno);var s=this.parseExpression();this.advanceAfterBlockEnd(t),this.parseUntilBlocks(n,r,e);var a,c=this.peekToken(),u=[];do{this.skipSymbol(n);var l=this.parseExpression();this.advanceAfterBlockEnd(t);var h=this.parseUntilBlocks(n,r,e);u.push(new o.Case(c.line,c.col,l,h)),c=this.peekToken()}while(c&&c.value===n);switch(c.value){case r:this.advanceAfterBlockEnd(),a=this.parseUntilBlocks(e),this.advanceAfterBlockEnd();break;case e:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new o.Switch(i.lineno,i.colno,s,u,a)},c.parseStatement=function(){var t=this.peekToken();if(t.type!==i.TOKEN_SYMBOL&&this.fail("tag name expected",t.lineno,t.colno),this.breakOnBlocks&&-1!==a.indexOf(this.breakOnBlocks,t.value))return null;switch(t.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var e=0;e0;){var c=s[0],u=s[1],l=s[2];l===t?r+=1:l===e&&(r-=1),0===r?(i+=u,this.tokens.backN(c.length-u.length)):i+=c}return new o.Output(a.lineno,a.colno,[new o.TemplateData(a.lineno,a.colno,i)])},c.parsePostfix=function(t){for(var e,n=this.peekToken();n;){if(n.type===i.TOKEN_LEFT_PAREN)t=new o.FunCall(n.lineno,n.colno,t,this.parseSignature());else if(n.type===i.TOKEN_LEFT_BRACKET)(e=this.parseAggregate()).children.length>1&&this.fail("invalid index"),t=new o.LookupVal(n.lineno,n.colno,t,e.children[0]);else{if(n.type!==i.TOKEN_OPERATOR||"."!==n.value)break;this.nextToken();var r=this.nextToken();r.type!==i.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+r.value,r.lineno,r.colno),e=new o.Literal(r.lineno,r.colno,r.value),t=new o.LookupVal(n.lineno,n.colno,t,e)}n=this.peekToken()}return t},c.parseExpression=function(){return this.parseInlineIf()},c.parseInlineIf=function(){var t=this.parseOr();if(this.skipSymbol("if")){var e=this.parseOr(),n=t;(t=new o.InlineIf(t.lineno,t.colno)).body=n,t.cond=e,this.skipSymbol("else")?t.else_=this.parseOr():t.else_=null}return t},c.parseOr=function(){for(var t=this.parseAnd();this.skipSymbol("or");){var e=this.parseAnd();t=new o.Or(t.lineno,t.colno,t,e)}return t},c.parseAnd=function(){for(var t=this.parseNot();this.skipSymbol("and");){var e=this.parseNot();t=new o.And(t.lineno,t.colno,t,e)}return t},c.parseNot=function(){var t=this.peekToken();return this.skipSymbol("not")?new o.Not(t.lineno,t.colno,this.parseNot()):this.parseIn()},c.parseIn=function(){for(var t=this.parseIs();;){var e=this.nextToken();if(!e)break;var n=e.type===i.TOKEN_SYMBOL&&"not"===e.value;if(n||this.pushToken(e),!this.skipSymbol("in")){n&&this.pushToken(e);break}var r=this.parseIs();t=new o.In(t.lineno,t.colno,t,r),n&&(t=new o.Not(t.lineno,t.colno,t))}return t},c.parseIs=function(){var t=this.parseCompare();if(this.skipSymbol("is")){var e=this.skipSymbol("not"),n=this.parseCompare();t=new o.Is(t.lineno,t.colno,t,n),e&&(t=new o.Not(t.lineno,t.colno,t))}return t},c.parseCompare=function(){for(var t=["==","===","!=","!==","<",">","<=",">="],e=this.parseConcat(),n=[];;){var r=this.nextToken();if(!r)break;if(-1===t.indexOf(r.value)){this.pushToken(r);break}n.push(new o.CompareOperand(r.lineno,r.colno,this.parseConcat(),r.value))}return n.length?new o.Compare(n[0].lineno,n[0].colno,e,n):e},c.parseConcat=function(){for(var t=this.parseAdd();this.skipValue(i.TOKEN_TILDE,"~");){var e=this.parseAdd();t=new o.Concat(t.lineno,t.colno,t,e)}return t},c.parseAdd=function(){for(var t=this.parseSub();this.skipValue(i.TOKEN_OPERATOR,"+");){var e=this.parseSub();t=new o.Add(t.lineno,t.colno,t,e)}return t},c.parseSub=function(){for(var t=this.parseMul();this.skipValue(i.TOKEN_OPERATOR,"-");){var e=this.parseMul();t=new o.Sub(t.lineno,t.colno,t,e)}return t},c.parseMul=function(){for(var t=this.parseDiv();this.skipValue(i.TOKEN_OPERATOR,"*");){var e=this.parseDiv();t=new o.Mul(t.lineno,t.colno,t,e)}return t},c.parseDiv=function(){for(var t=this.parseFloorDiv();this.skipValue(i.TOKEN_OPERATOR,"/");){var e=this.parseFloorDiv();t=new o.Div(t.lineno,t.colno,t,e)}return t},c.parseFloorDiv=function(){for(var t=this.parseMod();this.skipValue(i.TOKEN_OPERATOR,"//");){var e=this.parseMod();t=new o.FloorDiv(t.lineno,t.colno,t,e)}return t},c.parseMod=function(){for(var t=this.parsePow();this.skipValue(i.TOKEN_OPERATOR,"%");){var e=this.parsePow();t=new o.Mod(t.lineno,t.colno,t,e)}return t},c.parsePow=function(){for(var t=this.parseUnary();this.skipValue(i.TOKEN_OPERATOR,"**");){var e=this.parseUnary();t=new o.Pow(t.lineno,t.colno,t,e)}return t},c.parseUnary=function(t){var e,n=this.peekToken();return e=this.skipValue(i.TOKEN_OPERATOR,"-")?new o.Neg(n.lineno,n.colno,this.parseUnary(!0)):this.skipValue(i.TOKEN_OPERATOR,"+")?new o.Pos(n.lineno,n.colno,this.parseUnary(!0)):this.parsePrimary(),t||(e=this.parseFilter(e)),e},c.parsePrimary=function(t){var e,n=this.nextToken(),r=null;if(n?n.type===i.TOKEN_STRING?e=n.value:n.type===i.TOKEN_INT?e=parseInt(n.value,10):n.type===i.TOKEN_FLOAT?e=parseFloat(n.value):n.type===i.TOKEN_BOOLEAN?"true"===n.value?e=!0:"false"===n.value?e=!1:this.fail("invalid boolean: "+n.value,n.lineno,n.colno):n.type===i.TOKEN_NONE?e=null:n.type===i.TOKEN_REGEX&&(e=new RegExp(n.value.body,n.value.flags)):this.fail("expected expression, got end of file"),void 0!==e?r=new o.Literal(n.lineno,n.colno,e):n.type===i.TOKEN_SYMBOL?r=new o.Symbol(n.lineno,n.colno,n.value):(this.pushToken(n),r=this.parseAggregate()),t||(r=this.parsePostfix(r)),r)return r;throw this.error("unexpected token: "+n.value,n.lineno,n.colno)},c.parseFilterName=function(){for(var t=this.expect(i.TOKEN_SYMBOL),e=t.value;this.skipValue(i.TOKEN_OPERATOR,".");)e+="."+this.expect(i.TOKEN_SYMBOL).value;return new o.Symbol(t.lineno,t.colno,e)},c.parseFilterArgs=function(t){return this.peekToken().type===i.TOKEN_LEFT_PAREN?this.parsePostfix(t).args.children:[]},c.parseFilter=function(t){for(;this.skip(i.TOKEN_PIPE);){var e=this.parseFilterName();t=new o.Filter(e.lineno,e.colno,e,new o.NodeList(e.lineno,e.colno,[t].concat(this.parseFilterArgs(t))))}return t},c.parseFilterStatement=function(){var t=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var e=this.parseFilterName(),n=this.parseFilterArgs(e);this.advanceAfterBlockEnd(t.value);var r=new o.Capture(e.lineno,e.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var i=new o.Filter(e.lineno,e.colno,e,new o.NodeList(e.lineno,e.colno,[r].concat(n)));return new o.Output(e.lineno,e.colno,[i])},c.parseAggregate=function(){var t,e=this.nextToken();switch(e.type){case i.TOKEN_LEFT_PAREN:t=new o.Group(e.lineno,e.colno);break;case i.TOKEN_LEFT_BRACKET:t=new o.Array(e.lineno,e.colno);break;case i.TOKEN_LEFT_CURLY:t=new o.Dict(e.lineno,e.colno);break;default:return null}for(;;){var n=this.peekToken().type;if(n===i.TOKEN_RIGHT_PAREN||n===i.TOKEN_RIGHT_BRACKET||n===i.TOKEN_RIGHT_CURLY){this.nextToken();break}if(t.children.length>0&&(this.skip(i.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",e.lineno,e.colno)),t instanceof o.Dict){var r=this.parsePrimary();this.skip(i.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",e.lineno,e.colno);var s=this.parseExpression();t.addChild(new o.Pair(r.lineno,r.colno,r,s))}else{var a=this.parseExpression();t.addChild(a)}}return t},c.parseSignature=function(t,e){var n=this.peekToken();if(!e&&n.type!==i.TOKEN_LEFT_PAREN){if(t)return null;this.fail("expected arguments",n.lineno,n.colno)}n.type===i.TOKEN_LEFT_PAREN&&(n=this.nextToken());for(var r=new o.NodeList(n.lineno,n.colno),s=new o.KeywordArgs(n.lineno,n.colno),a=!1;;){if(n=this.peekToken(),!e&&n.type===i.TOKEN_RIGHT_PAREN){this.nextToken();break}if(e&&n.type===i.TOKEN_BLOCK_END)break;if(a&&!this.skip(i.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",n.lineno,n.colno);else{var c=this.parseExpression();this.skipValue(i.TOKEN_OPERATOR,"=")?s.addChild(new o.Pair(c.lineno,c.colno,c,this.parseExpression())):r.addChild(c)}a=!0}return s.children.length&&r.addChild(s),r},c.parseUntilBlocks=function(){for(var t=this.breakOnBlocks,e=arguments.length,n=new Array(e),r=0;r=","//","**"],j=L+this.current();switch(-1!==r.indexOf(D,j)&&(this.forward(),L=j,-1!==r.indexOf(D,j+this.current())&&(L=j+this.current(),this.forward())),L){case"(":M=d;break;case")":M=m;break;case"[":M=y;break;case"]":M=g;break;case"{":M=v;break;case"}":M=b;break;case",":M=w;break;case":":M=x;break;case"~":M=k;break;case"|":M=T;break;default:M=_}return C(M,L,e,n)}if((t=this._extractUntil(i+o)).match(/^[-+]?[0-9]+$/)){if("."===this.current()){this.forward();var B=this._extract("0123456789");return C(S,t+"."+B,e,n)}return C("int",t,e,n)}if(t.match(/^(true|false)$/))return C(E,t,e,n);if("none"===t)return C(A,t,e,n);if("null"===t)return C(A,t,e,n);if(t)return C(O,t,e,n);throw new Error("Unexpected value while parsing: "+t)}var F,U=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if((t=this._extractString(this.tags.BLOCK_START+"-"))||(t=this._extractString(this.tags.BLOCK_START)))return this.in_code=!0,C(u,t,e,n);if((t=this._extractString(this.tags.VARIABLE_START+"-"))||(t=this._extractString(this.tags.VARIABLE_START)))return this.in_code=!0,C(h,t,e,n);t="";var z=!1;for(this._matches(this.tags.COMMENT_START)&&(z=!0,t=this._extractString(this.tags.COMMENT_START));null!==(F=this._extractUntil(U));){if(t+=F,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!z){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=t.length){var V=t.slice(-this.colno);if(/^\s+$/.test(V)&&!(t=t.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!z)throw new Error("unexpected end of comment");t+=this._extractString(this.tags.COMMENT_END);break}t+=this.current(),this.forward()}if(null===F&&z)throw new Error("expected end of comment, got end of file");return C(z?p:c,t,e,n)},e._parseString=function(t){this.forward();for(var e="";!this.isFinished()&&this.current()!==t;){var n=this.current();if("\\"===n){switch(this.forward(),this.current()){case"n":e+="\n";break;case"t":e+="\t";break;case"r":e+="\r";break;default:e+=this.current()}this.forward()}else e+=n,this.forward()}return this.forward(),e},e._matches=function(t){return this.index+t.length>this.len?null:this.str.slice(this.index,this.index+t.length)===t},e._extractString=function(t){return this._matches(t)?(this.forwardN(t.length),t):null},e._extractUntil=function(t){return this._extractMatching(!0,t||"")},e._extract=function(t){return this._extractMatching(!1,t)},e._extractMatching=function(t,e){if(this.isFinished())return null;var n=e.indexOf(this.current());if(t&&-1===n||!t&&-1!==n){var r=this.current();this.forward();for(var i=e.indexOf(this.current());(t&&-1===i||!t&&-1!==i)&&!this.isFinished();)r+=this.current(),this.forward(),i=e.indexOf(this.current());return r}return""},e._extractRegex=function(t){var e=this.currentStr().match(t);return e?(this.forwardN(e[0].length),e):null},e.isFinished=function(){return this.index>=this.len},e.forwardN=function(t){for(var e=0;e1024){for(var e=0,n=i.length-o;e0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function d(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[t];if(void 0===c)return!1;if("function"==typeof c)o(c,this,e);else{var u=c.length,l=y(c,u);for(n=0;n=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1=0;r--)this.removeListener(t,e[r]);return this},a.prototype.listeners=function(t){return d(this,t,!0)},a.prototype.rawListeners=function(t){return d(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){"use strict";var r=n(3),i=n(0),o=0;function s(){return"hole_"+o++}function a(t,e){for(var n=null,r=0;r=e)return t;var n=e-t.length,s=r.repeat(" ",n/2-n%2),a=r.repeat(" ",n/2);return i.copySafeness(t,s+t+a)},e.default=function(t,e,n){return n?t||e:void 0!==t?t:e},e.dictsort=function(t,e,n){if(!r.isObject(t))throw new r.TemplateError("dictsort filter: val must be an object");var i,o=[];for(var s in t)o.push([s,t[s]]);if(void 0===n||"key"===n)i=0;else{if("value"!==n)throw new r.TemplateError("dictsort filter: You can only sort by either key or value");i=1}return o.sort((function(t,n){var o=t[i],s=n[i];return e||(r.isString(o)&&(o=o.toUpperCase()),r.isString(s)&&(s=s.toUpperCase())),o>s?1:o===s?0:-1})),o},e.dump=function(t,e){return JSON.stringify(t,null,e)},e.escape=function(t){return t instanceof i.SafeString?t:(t=null==t?"":t,i.markSafe(r.escape(t.toString())))},e.safe=function(t){return t instanceof i.SafeString?t:(t=null==t?"":t,i.markSafe(t.toString()))},e.first=function(t){return t[0]},e.forceescape=function(t){return t=null==t?"":t,i.markSafe(r.escape(t.toString()))},e.groupby=function(t,e){return r.groupBy(t,e,this.env.opts.throwOnUndefined)},e.indent=function(t,e,n){if(""===(t=o(t,"")))return"";e=e||4;var s=t.split("\n"),a=r.repeat(" ",e),c=s.map((function(t,e){return 0!==e||n?""+a+t:t})).join("\n");return i.copySafeness(t,c)},e.join=function(t,e,n){return e=e||"",n&&(t=r.map(t,(function(t){return t[n]}))),t.join(e)},e.last=function(t){return t[t.length-1]},e.length=function(t){var e=o(t,"");return void 0!==e?"function"==typeof Map&&e instanceof Map||"function"==typeof Set&&e instanceof Set?e.size:!r.isObject(e)||e instanceof i.SafeString?e.length:r.keys(e).length:0},e.list=c,e.lower=function(t){return(t=o(t,"")).toLowerCase()},e.nl2br=function(t){return null==t?"":i.copySafeness(t,t.replace(/\r\n|\n/g,"
\n"))},e.random=function(t){return t[Math.floor(Math.random()*t.length)]},e.reject=u(!1),e.rejectattr=function(t,e){return t.filter((function(t){return!t[e]}))},e.select=u(!0),e.selectattr=function(t,e){return t.filter((function(t){return!!t[e]}))},e.replace=function(t,e,n,r){var o=t;if(e instanceof RegExp)return t.replace(e,n);void 0===r&&(r=-1);var s="";if("number"==typeof e)e=""+e;else if("string"!=typeof e)return t;if("number"==typeof t&&(t=""+t),"string"!=typeof t&&!(t instanceof i.SafeString))return t;if(""===e)return s=n+t.split("").join(n)+n,i.copySafeness(t,s);var a=t.indexOf(e);if(0===r||-1===a)return t;for(var c=0,u=0;a>-1&&(-1===r||u=i&&l.push(n),o.push(l)}return o},e.sum=function(t,e,n){return void 0===n&&(n=0),e&&(t=r.map(t,(function(t){return t[e]}))),n+t.reduce((function(t,e){return t+e}),0)},e.sort=i.makeMacro(["value","reverse","case_sensitive","attribute"],[],(function(t,e,n,i){var o=this,s=r.map(t,(function(t){return t})),a=r.getAttrGetter(i);return s.sort((function(t,s){var c=i?a(t):t,u=i?a(s):s;if(o.env.opts.throwOnUndefined&&i&&(void 0===c||void 0===u))throw new TypeError('sort: attribute "'+i+'" resolved to undefined');return!n&&r.isString(c)&&r.isString(u)&&(c=c.toLowerCase(),u=u.toLowerCase()),cu?e?-1:1:0})),s})),e.string=function(t){return i.copySafeness(t,t)},e.striptags=function(t,e){var n,r=l((t=o(t,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|/gi,""));return n=e?r.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,"\n").replace(/\n\n\n+/g,"\n\n"):r.replace(/\s+/gi," "),i.copySafeness(t,n)},e.title=function(t){var e=(t=o(t,"")).split(" ").map((function(t){return a(t)}));return i.copySafeness(t,e.join(" "))},e.trim=l,e.truncate=function(t,e,n,r){var s=t;if(e=e||255,(t=o(t,"")).length<=e)return t;if(n)t=t.substring(0,e);else{var a=t.lastIndexOf(" ",e);-1===a&&(a=e),t=t.substring(0,a)}return t+=null!=r?r:"...",i.copySafeness(s,t)},e.upper=function(t){return(t=o(t,"")).toUpperCase()},e.urlencode=function(t){var e=encodeURIComponent;return r.isString(t)?e(t):(r.isArray(t)?t:r._entries(t)).map((function(t){var n=t[0],r=t[1];return e(n)+"="+e(r)})).join("&")};var h=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,f=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,p=/^https?:\/\/.*$/,d=/^www\./,m=/\.(?:org|net|com)(?:\:|\/|$)/;e.urlize=function(t,e,n){s(e)&&(e=1/0);var r=!0===n?' rel="nofollow"':"";return t.split(/(\s+)/).filter((function(t){return t&&t.length})).map((function(t){var n=t.match(h),i=n?n[1]:t,o=i.substr(0,e);return p.test(i)?'"+o+"":d.test(i)?'"+o+"":f.test(i)?''+i+"":m.test(i)?'"+o+"":t})).join("")},e.wordcount=function(t){var e=(t=o(t,""))?t.match(/\w+/g):null;return e?e.length:null},e.float=function(t,e){var n=parseFloat(t);return s(n)?e:n};var y=i.makeMacro(["value","default","base"],[],(function(t,e,n){void 0===n&&(n=10);var r=parseInt(t,n);return s(r)?e:r}));e.int=y,e.d=e.default,e.e=e.escape},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var i=function(t){var e,n;function i(e){var n;return(n=t.call(this)||this).precompiled=e||{},n}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n),i.prototype.getSource=function(t){return this.precompiled[t]?{src:{type:"code",obj:this.precompiled[t]},path:t}:null},i}(n(6));t.exports={PrecompiledLoader:i}},function(t,e,n){"use strict";var r=n(2).SafeString;e.callable=function(t){return"function"==typeof t},e.defined=function(t){return void 0!==t},e.divisibleby=function(t,e){return t%e==0},e.escaped=function(t){return t instanceof r},e.equalto=function(t,e){return t===e},e.eq=e.equalto,e.sameas=e.equalto,e.even=function(t){return t%2==0},e.falsy=function(t){return!t},e.ge=function(t,e){return t>=e},e.greaterthan=function(t,e){return t>e},e.gt=e.greaterthan,e.le=function(t,e){return t<=e},e.lessthan=function(t,e){return t0)for(var i=t;ie;o+=n)r.push(o);return r},cycler:function(){return t=Array.prototype.slice.call(arguments),e=-1,{current:null,reset:function(){e=-1,this.current=null},next:function(){return++e>=t.length&&(e=0),this.current=t[e],this.current}};var t,e},joiner:function(t){return function(t){t=t||",";var e=!0;return function(){var n=e?"":t;return e=!1,n}}(t)}}}},function(t,e,n){var r=n(4);t.exports=function(t,e){function n(t,e){if(this.name=t,this.path=t,this.defaultEngine=e.defaultEngine,this.ext=r.extname(t),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=("."!==this.defaultEngine[0]?".":"")+this.defaultEngine)}return n.prototype.render=function(e,n){t.render(this.name,e,n)},e.set("view",n),e.set("nunjucksEnv",t),t}},function(t,e,n){"use strict";var r=n(4),i=n(4),o=n(0)._prettifyError,s=n(5),a=n(7).Environment,c=n(24);function u(t,e){return!!Array.isArray(e)&&e.some((function(e){return t.match(e)}))}function l(t,e){(e=e||{}).isString=!0;var n=e.env||new a([]),r=e.wrapper||c;if(!e.name)throw new Error('the "name" option is required when compiling a string');return r([h(t,e.name,n)],e)}function h(t,e,n){var r,i=(n=n||new a([])).asyncFilters,c=n.extensionsList;e=e.replace(/\\/g,"/");try{r=s.compile(t,i,c,e,n.opts)}catch(t){throw o(e,!1,t)}return{name:e,template:r}}t.exports={precompile:function(t,e){var n=(e=e||{}).env||new a([]),o=e.wrapper||c;if(e.isString)return l(t,e);var s=r.existsSync(t)&&r.statSync(t),f=[],p=[];if(s.isFile())f.push(h(r.readFileSync(t,"utf-8"),e.name||t,n));else if(s.isDirectory()){!function n(o){r.readdirSync(o).forEach((function(s){var a=i.join(o,s),c=a.substr(i.join(t,"/").length),l=r.statSync(a);l&&l.isDirectory()?u(c+="/",e.exclude)||n(a):u(c,e.include)&&p.push(a)}))}(t);for(var d=0;dt.length||i>0&&s>=r||i<0&&s<=r);s+=i)o.push(n.memberLookup(t,s));return o}function p(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var d={pop:function(t){if(void 0===t)return this.pop();if(t>=this.length||t<0)throw new Error("KeyError");return this.splice(t,1)},append:function(t){return this.push(t)},remove:function(t){for(var e=0;e{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{default:()=>Os});var t=n(149);function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{blockType:null,provider:null,isUnknown:!1};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=c(this,e,[o(o({},n),{},{defaultWidth:n.isContainer?186:96,defaultHeight:n.isContainer?160:80,minWidth:n.isContainer?186:96,minHeight:n.isContainer?140:80,reservedWidth:n.isContainer?12:0,reservedHeight:n.isContainer?80:0,margin:15,gap:50})])).blockType=n.blockType||null,t.provider=n.provider||null,t.isUnknown=n.isUnknown||!1,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(e,t),function(t){return Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(t.ComponentDefinition);const p=f;function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function m(t,e,n){return e=g(e),function(t,e){if(e&&("object"==d(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,y()?Reflect.construct(e,n||[],g(t).constructor):e.apply(t,n))}function y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(y=function(){return!!t})()}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}var b=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{linkAttribute:"id"};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=m(this,e,[n])).linkAttribute=n.linkAttribute||"id",t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(e,t),function(t){return Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(t.ComponentAttributeDefinition);const _=b;var w={name:"vpc_id",displayName:"VPC ID",containerRef:"aws_vpc",linkAttribute:"id",linkRef:"aws_vpc",linkType:"Default",linkModel:"defaultLink",type:"Link"},x={name:"vpc_id",displayName:"VPC ID",containerRef:"aws_vpc",type:"Reference"},k={name:"tags",displayName:"Tags",description:"A map of tags to assign to the resource.",type:"Object",url:"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"},T={name:"security_groups",displayName:"Security groups",description:"List of security group names to associate with.",linkAttribute:"name",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",type:"Link"},S={name:"subnet_id",displayName:"Subnet ID",linkAttribute:"id",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",type:"Link"},E={name:"port",displayName:"Port",type:"Number",rules:{max:"65535",min:"1"}};const A=[{blockType:"provider",type:"aws",displayName:"AWS provider",description:"Use the Amazon Web Services (AWS) provider to interact with the many resources supported by AWS.",icon:"aws",model:"DefaultModel",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs",categories:["AWS","Provider"],tags:[],definedAttributes:[{name:"region",displayName:"Region",description:"AWS service endpoints",required:!0,type:"String",url:"https://docs.aws.amazon.com/general/latest/gr/rande.html"},{name:"skip_region_validation",displayName:"Skip region validation",description:"Define if region validation should be skipped or not.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#skip_region_validation"},{name:"access_key",displayName:"Access key",description:"The ID of the access key to allow Terraform requests to authenticate with.",type:"String",url:"https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html"},{name:"secret_key",displayName:"Secret key",description:"The secret key to allow Terraform requests to authenticate with.",type:"String",url:"https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html"},{name:"token",displayName:"Token",description:"Used to validate session temporary credentials.",type:"String",url:"https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html"},{name:"allowed_account_ids",displayName:"Allowed Account IDs",description:"List of allowed AWS account IDs to prevent you from mistakenly
using an incorrect one (and potentially end up destroying a live environment).",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#allowed_account_ids"},{name:"forbidden_account_ids",displayName:"Forbidden Account IDs",description:"List of forbidden AWS account IDs to prevent you from mistakenly
using an incorrect one (and potentially end up destroying a live environment).",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#forbidden_account_ids"},{name:"skip_requesting_account_id",displayName:"Skip requesting account ID",description:"Whether to skip requesting the account ID or not.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#skip_requesting_account_id"},{name:"custom_ca_bundle",displayName:"Custom Certificate Authority (CA) bundle",description:"File containing custom root and intermediate certificates.",type:"String",url:"https://docs.aws.amazon.com/privateca/latest/userguide/PcaWelcome.html"},{name:"insecure",displayName:"Insecure",description:'Whether to explicitly allow the provider to perform "insecure" SSL requests or not.',type:"Boolean",url:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html"},{name:"ec2_metadata_service_endpoint",displayName:"EC2 metadata service (IMDS) endpoint",description:"Address of the EC2 metadata service (IMDS) endpoint to use.",type:"String",url:"https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-cfg-ec2-imds.html"},{name:"ec2_metadata_service_endpoint_mode",displayName:"EC2 metadata service (IMDS) endpoint mode",description:"Communication mode to use with the metadata service.",type:"String",url:"https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-cfg-ec2-imds.html",rules:{values:["IPv4","IPv6"]}},{name:"http_proxy",displayName:"HTTP proxy",description:"Address of an HTTP proxy to use when accessing the AWS API.",type:"String",url:"https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-http.html",rules:{regex:"[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)"}},{name:"max_retries",displayName:"Max retries",description:"Maximum number of times an API call is retried when AWS throttles requests or on transient failures.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#max_retries"},{name:"profile",displayName:"Profile",description:"AWS profile name as set in the shared configuration and credentials files.",type:"String",url:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html"},{name:"shared_config_files",displayName:"Shared config files",description:"List of paths to AWS shared config files.",type:"String",url:"https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html"},{name:"shared_credentials_files",displayName:"Shared credentials files",description:"List of paths to the shared credentials files.",type:"String",url:"https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html"},{name:"skip_credentials_validation",displayName:"Skip credentials validation",description:"Whether to skip credentials validation via the STS API or not.",type:"Boolean",url:"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html"},{name:"sts_region",displayName:"Security Token Service (STS) region",description:"AWS region for Security Token Service (STS)",type:"String",url:"https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html"},{name:"s3_use_path_style",displayName:"Use path-style for S3",description:"Whether to enable the request to use path-style addressing or not
i.e., https://s3.amazonaws.com/BUCKET/KEY.",type:"Boolean",url:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html"},{name:"skip_metadata_api_check",displayName:"Skip metadata API check",description:"Whether to skip the AWS Metadata API check or not.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#skip_metadata_api_check"},{name:"use_dualstack_endpoint",displayName:"Use dual-stack endpoint",description:"Force the provider to resolve endpoints with DualStack capability.",type:"Boolean",url:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/dual-stack-endpoints.html"},{name:"use_fips_endpoint",displayName:"Use FIPS endpoint",description:"Force the provider to resolve endpoints with FIPS capability.",type:"Boolean",url:"https://aws.amazon.com/compliance/fips/"},{name:"assume_role",displayName:"Assume role",description:"Set of temporary security credentials that you can use to access AWS resources.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#assume_role",definedAttributes:[{name:"duration",displayName:"Duration",description:"Duration of the assume role session.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#duration"},{name:"external_id",displayName:"External ID",description:"External identifier to use when assuming the role.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#external_id"},{name:"policy",displayName:"Policy",description:"IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#policy"},{name:"policy_arns",displayName:"Policy ARNs",description:"Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#policy_arns"},{name:"role_arn",displayName:"Role ARN",description:"ARN of the IAM Role to assume. Can also be set with the AWS_ROLE_ARN environment variable.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#role_arn"},{name:"session_name",displayName:"Session name",description:"Session name to use when assuming the role. Can also be set with the AWS_ROLE_SESSION_NAME environment variable.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#session_name"},{name:"source_identity",displayName:"Source identity",description:"Source identity specified by the principal assuming the role.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#source_identity"},k,{name:"transitive_tag_keys",displayName:"Transitive tag keys",description:"Set of assume role session tag keys to pass to any subsequent sessions.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#transitive_tag_keys"}]},{name:"assume_role_with_web_identity",displayName:"Assume role with web identity",description:"Configuration block for assuming an IAM role using a web identity.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#assume_role_with_web_identity",definedAttributes:[{name:"duration",displayName:"Duration",description:"Duration of the assume role session.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#duration"},{name:"policy",displayName:"Policy",description:"IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#policy"},{name:"policy_arns",displayName:"Policy ARNs",description:"Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#policy_arns"},{name:"role_arn",displayName:"Role ARN",description:"ARN of the IAM Role to assume. Can also be set with the AWS_ROLE_ARN environment variable.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#role_arn"},{name:"session_name",displayName:"Session name",description:"Session name to use when assuming the role. Can also be set with the AWS_ROLE_SESSION_NAME environment variable.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#session_name"},{name:"web_identity_token",displayName:"Web identity token",description:"Value of a web identity token from an OpenID Connect (OIDC) or OAuth provider. One of web_identity_token or web_identity_token_file is required.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#web_identity_token"},{name:"web_identity_token_file",displayName:"Web identity token file",description:"File containing a web identity token from an OpenID Connect (OIDC) or OAuth provider. One of web_identity_token_file or web_identity_token is required. Can also be set with the AWS_WEB_IDENTITY_TOKEN_FILE environment variable.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#web_identity_token_file"}]},{name:"default_tags",displayName:"Default tags",description:"You can assign metadata to your AWS resources in the form of tags.
Each tag is a label consisting of a user-defined key and value.
Tags can help you manage, identify, organize, search for, and filter resources.",type:"Object",url:"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html",definedAttributes:[k]},{name:"ignore_tags",displayName:"Ignore tags",description:"Configuration block with resource tag settings to ignore across all resources handled by this provider
(except any individual service tag resources such as aws_ec2_tag)
for situations where external systems are managing certain resource tags.",type:"Object",url:"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html",definedAttributes:[{name:"keys",displayName:"Keys",description:"List of exact resource tag keys to ignore across all resources handled by this provider.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#keys"},{name:"key_prefixes",displayName:"Key prefixes",description:"List of resource tag key prefixes to ignore across all resources handled by this provider.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#key_prefixes"}]},{name:"endpoints",displayName:"Endpoints",description:"Configure the Terraform AWS Provider to use customized endpoints.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/guides/custom-service-endpoints"}]}];function O(t){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(t)}function N(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function C(t){for(var e=1;eIf set to true, DNS hostnames that are addressed between linked EC2-Classic instances and instances in the VPC will resolve to private IP addresses.",type:"Boolean",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html"},{name:"assign_generated_ipv6_cidr_block",displayName:"Assign generated IPv6 CIDR block",description:"Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC.",type:"Boolean",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html"},{name:"enable_network_address_usage_metrics",displayName:"Enable network address usage metrics",description:"Enable network address usage metrics for the VPC.",type:"Boolean",url:"https://docs.aws.amazon.com/vpc/latest/userguide/network-address-usage.html"},k]},{type:"aws_subnet",blockType:"resource",provider:"aws",displayName:"Subnet",description:"A subnet is a range of IP addresses in your VPC. You can launch AWS resources into your subnets.",icon:"Aws_Mesh",model:"DefaultModel",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-subnets.html",categories:["AWS","Networking"],tags:[],definedAttributes:[C(C({},x),{},{description:"The VPC ID to create the subnet in.",required:!0,url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#vpc_id"}),{name:"gateway_id",type:"Link",linkAttribute:"id",linkRef:"aws_internet_gateway",linkType:"Default",linkModel:"defaultLink"},{name:"availability_zone",displayName:"Availability zone",description:"The Availability Zone for the subnet.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#availability_zone"},{name:"availability_zone_id",displayName:"Availability zone ID",description:"The ID of the Availability Zone for the subnet.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#availability_zone_id"},{name:"cidr_block",displayName:"CIDR block",description:"IPv4 CIDR block for the subnet",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#cidr_block",rules:{regex:"^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$"}},{name:"customer_owned_ipv4_pool",displayName:"Customer owned IPv4 pool",description:"The ID of an address pool that you own.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#customer_owned_ipv4_pool"},{name:"map_customer_owned_ip_on_launch",displayName:"Map customer owned IP on launch",description:"Specify true to indicate that network interfaces created in the subnet should be assigned a customer owned IP address.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#map_customer_owned_ip_on_launch"},{name:"map_customer_ip_on_launch",displayName:"Map customer IP on launch",description:"Specify true to indicate that instances launched into the subnet should be assigned a public IP address.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#map_public_ip_on_launch"},{name:"enable_dns64",displayName:"Enable DNS64",description:"Whether DNS queries made to the Amazon-provided DNS Resolver
in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#enable_dns64"},{name:"assign_ipv6_address_on_creation",displayName:"Assign IPv6 address on creation",description:"Specify true to indicate that network interfaces created in the specified subnet should be assigned an IPv6 address.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#assign_ipv6_address_on_creation"},{name:"ipv6_cidr_block",displayName:"IPv6 CIDR block",description:"The IPv6 network range for the subnet, in CIDR notation",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#ipv6_cidr_block",rules:{regex:"[a-fA-F0-9]{4}(:[a-fA-F0-9]{4}){7}"}},{name:"ipv6_native",displayName:"IPv6 native",description:"Whether to create an IPv6-only subnet.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#ipv6_native"},{name:"enable_resource_name_dns_a_record_on_launch",displayName:"Enable ressource name DNS A record on launch",description:"Whether to respond to DNS queries for instance hostnames with DNS A records.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#enable_resource_name_dns_a_record_on_launch"},{name:"enable_resource_name_dns_aaaa_record_on_launch",displayName:"Enable ressource name DNS AAAA record on launch",description:"Whether to respond to DNS queries for instance hostnames with DNS AAAA records.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#enable_resource_name_dns_aaaa_record_on_launch"},{name:"private_dns_hostname_type_on_launch",displayName:"Private DNS hostname type on launch",description:"The type of hostnames to assign to instances in the subnet at launch.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#private_dns_hostname_type_on_launch"},{name:"outpost_arn",displayName:"Outpost Amazon Resource Name (ARN)",description:"Amazon Resource Name (ARN) of the Outpost",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#outpost_arn"},C(C({},k),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#tags"})]},{type:"aws_db_subnet_group",blockType:"resource",provider:"aws",displayName:"AWS DB subnet group",description:"A collection of subnets that you create in a VPC and that you then designate for your DB instances.",icon:"AwsDbSubnetGroup",model:"DefaultModel",url:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html#USER_VPC.Subnets",categories:["AWS","Networking"],tags:[],definedAttributes:[{name:"subnet_ids",displayName:"Subnet IDs",description:"A list of VPC subnet IDs.",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html"}]},{type:"aws_route",blockType:"resource",provider:"aws",displayName:"AWS route",description:"Contains a set of rules, called routes, that determine where network traffic from your subnet or gateway is directed.",icon:"Aws_Route-53",model:"DefaultModel",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html",categories:["AWS","Networking"],tags:[],definedAttributes:[{name:"route_table_id",displayName:"Route table ID",description:"The ID of the routing table.",containerRef:"aws_route",required:!0,type:"Reference",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route#route_table_id"},{name:"gateway_id",displayName:"Gateway ID",description:"Identifier of a VPC internet gateway or a virtual private gateway.",linkAttribute:"id",linkRef:"aws_internet_gateway",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route#gateway_id"}]},{type:"aws_route_table",blockType:"resource",provider:"aws",displayName:"Route table",description:"A route table contains a set of rules, called routes, that determine where network traffic from your subnet or gateway is directed.",icon:"Aws_Route-53_Route-Table",model:"DefaultModel",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html",categories:["AWS","Networking"],tags:[],definedAttributes:[C(C({},x),{},{description:"The ID of the VPC for which to create the route table.",required:!0,url:"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"}),{name:"propagating_vgws",displayName:"Propagating Virtual GateWays (VGWS)",description:"List of virtual gateways for propagation",type:"Array",url:"https://docs.aws.amazon.com/directconnect/latest/UserGuide/virtualgateways.html"},k]},{type:"aws_route_table_association",blockType:"resource",provider:"aws",displayName:"Route table association",description:"Association between a route table and a subnet, internet gateway, or virtual private gateway.",icon:"Aws_Connector",model:"DefaultModel",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html",categories:["AWS","Networking"],tags:[],definedAttributes:[C(C({},x),{},{description:"The ID of the VPC for which to create the route table association.",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html"}),{name:"route_table_id",displayName:"Route table ID",description:"The ID of the route table to associate the subnet with.",linkRef:"aws_route_table",linkType:"Reverse",linkModel:"defaultLink",required:!0,type:"Link",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html"},{name:"gateway_id",displayName:"Gateway ID",description:"The ID of the gateway to associate the route table with. Conflicts with subnet_id.",linkRef:"aws_internet_gateway",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html"},C(C({},S),{},{description:"The ID of the subnet to associate the route table with. Conflicts with gateway_id.",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-subnets.html"})]},{type:"aws_internet_gateway",blockType:"resource",provider:"aws",displayName:"Internet gateway",description:"An internet gateway is a horizontally scaled, redundant, and highly available VPC component
that allows communication between your VPC and the internet.",icon:"Aws_VPC_Internet-Gateway",model:"DefaultModel",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html",categories:["AWS","Networking"],tags:[],definedAttributes:[C(C({},x),{},{description:"The VPC ID to create the gateway in.",url:"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"}),k]}];function P(t){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(t)}function I(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function M(t){for(var e=1;eConflicts with key_name.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#key_name_prefix"},M(M({},k),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#tags"})]}];function B(t){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B(t)}function F(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function U(t){for(var e=1;eWhen you create a launch configuration, you specify information for the instances.",icon:"Aws_Launch-Configuration",model:"DefaultModel",url:"https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-configurations.html",categories:["AWS","Compute"],tags:[],definedAttributes:[{name:"image_id",displayName:"Image ID",description:"The EC2 image ID to launch.",linkRef:"aws_ami",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#image_id"},{name:"instance_type",displayName:"Instance type",description:"The size of instance to launch.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#instance_type"},{name:"iam_instance_profile",displayName:"IAM instance profile",description:"The name attribute of the IAM instance profile to associate with launched instances.",type:"String",url:"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html"},{name:"associate_public_ip_address",displayName:"Associate public IP address",description:"Associate a public ip address with an instance in a VPC.",type:"Boolean",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html"},{name:"enable_monitoring",displayName:"Enable monitoring",description:"Enables/disables detailed monitoring.",type:"Boolean",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring_ec2.html"},{name:"key_name",displayName:"Key name",description:"The key name that should be used for the instance.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#key_name"},{name:"name",displayName:"Name",description:"The name of the launch configuration.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#name"},{name:"name_prefix",displayName:"Name prefix",description:"Creates a unique name beginning with the specified prefix.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#name_prefix"},U(U({},T),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#security_groups"}),{name:"placement_tenancy",displayName:"Placement tenancy",description:"The tenancy of the instance.",type:"String",url:"https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_CreateLaunchConfiguration.html",rules:{values:["enabled","disabled"]}},{name:"spot_price",displayName:"Spot price",description:"The maximum price to use for reserving spot instances.",type:"Number",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances.html"},{name:"user_data",displayName:"User data",description:'The user data to provide when launching the instance.
If you need to pass gzip-compressed data via this argument, use "user_data_base64" instead.',type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#user_data"},{name:"user_data_base64",displayName:"User data base64",description:'Can be used instead of "user_data" to pass base64-encoded binary data directly,
whenever the value is not a valid UTF-8 string.',type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#user_data_base64"},{name:"vpc_classic_link_id",displayName:"VPC ClassicLink ID",description:"The ID of a ClassicLink-enabled VPC.",linkRef:"aws_vpc",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"},{name:"vpc_classic_link_security_groups",displayName:"VPC ClassicLink security groups",description:"The IDs of one or more security groups for the specified ClassicLink-enabled VPC.",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html"},{name:"ebs_optimized",displayName:"EBS optimized",description:"If true, the launched EC2 instance will be EBS-optimized.",type:"Boolean",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html"},{name:"ebs_block_device",displayName:"EBS block device",description:"Additional EBS block devices to attach to the instance.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#ebs_block_device",definedAttributes:[{name:"device_name",displayName:"Device name",description:"The name of the device to mount.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#device_name"},{name:"snapshot_id",displayName:"Snapshot ID",description:"The Snapshot ID to mount.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#snapshot_id"},{name:"volume_size",displayName:"Volume size",description:"The size of the volume in gigabytes.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#volume_size"},{name:"volume_type",displayName:"Volume type",description:"The type of volume.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#volume_type",rules:{values:["standard","gp2","gp3","st1","sc1","io1"]}},{name:"iops",displayName:"IOPS",description:'The amount of provisioned Input/output Operations Per Second (IOPS). This must be set with a volume_type of "io1".',type:"Number",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-characteristics.html"},{name:"throughput",displayName:"Throughput",description:"The throughput (MiBps) to provision for a gp3 volume.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#throughput"},{name:"delete_on_termination",displayName:"Delete on termination",description:"Whether the volume should be destroyed on instance termination.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#delete_on_termination"},{name:"encrypted",displayName:"Encrypted",description:"Whether the volume should be encrypted or not.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#encrypted"},{name:"no_device",displayName:"No device",description:"Whether the device in the block device mapping of the AMI is suppressed.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#no_device"}]},{name:"ephemeral_block_device",displayName:"Ephemeral block device",description:'Customize Ephemeral (also known as "Instance Store") volumes on the instance.',type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#ephemeral_block_device",definedAttributes:[{name:"device_name",displayName:"Device name",description:"The name of the block device to mount on the instance.",required:"true",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#ephemeral_block_device"},{name:"no_device",displayName:"No device",description:"Whether the device in the block device mapping of the AMI is suppressed.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#ephemeral_block_device"},{name:"virtual_name",displayName:"Virtual name",description:"The Instance Store Device Name.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#virtual_name"}]},{name:"metadata_options",displayName:"Metadata options",description:"The metadata options for the instance.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#metadata_options",definedAttributes:[{name:"http_endpoint",displayName:"HTTP endpoint",description:"The state of the metadata service: enabled, disabled.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#http_endpoint",rules:{values:["enabled","disabled"]}},{name:"http_tokens",displayName:"HTTP tokens",description:"Whether the HTTP tokens are required.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#http_tokens",rules:{values:["optional","required"]}},{name:"http_put_response_hop_limit",displayName:"HTTP PUT response hop limit",description:"The desired HTTP PUT response hop limit for instance metadata requests.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#http_put_response_hop_limit"}]},{name:"root_block_device",displayName:"Root block device",description:"Customize details about the root block device of the instance.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device",definedAttributes:[{description:"Whether the volume should be destroyed on instance termination.",displayName:"Delete on termination",name:"delete_on_termination",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{description:"Whether the volume should be encrypted or not. Defaults to false.",displayName:"Encrypted",name:"encrypted",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{description:"The amount of provisioned IOPS.",displayName:"IOPS",name:"iops",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{description:"The throughput (MiBps) to provision for a gp3 volume.",displayName:"Throughput",name:"throughput",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{description:"The size of the volume in gigabytes.",displayName:"Volume",name:"volume_size",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{displayName:"Volume type",name:"volume_type",rules:{values:["standard","gp2","gp3","st1","sc1","io1"]},type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"}]}]},{type:"aws_autoscaling_group",blockType:"resource",provider:"aws",displayName:"Auto Scaling Group",description:"Provides an Auto Scaling Group resource.",icon:"Aws_Auto-Scaling",model:"DefaultModel",url:"https://docs.aws.amazon.com/autoscaling/ec2/userguide/auto-scaling-groups.html",categories:["AWS","Compute"],tags:[],definedAttributes:[{name:"name",displayName:"Name",description:"Name of the Auto Scaling Group.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#name"},{name:"min_size",displayName:"Min Size",description:"Minimum size of the Auto Scaling Group.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#min_size"},{name:"max_size",displayName:"Max Size",description:"Maximum size of the Auto Scaling Group.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#max_size"},{name:"deired_capacity",displayName:"Desired Capacity",description:"Number of Amazon EC2 instances that should be running in the group.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#desired_capacity"},{name:"health_check_type",displayName:"Health Check Type",description:"Controls how health checking is done.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#health_check_type",rules:{values:["EC2","ELB"]}},{name:"target_group_arns",displayName:"Target Group ARNs",description:"Set of aws_alb_target_group ARNs, for use with Application or Network Load Balancing.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#target_group_arns"}]},{type:"aws_autoscaling_policy",blockType:"resource",provider:"aws",displayName:"Autoscaling policy",description:"Provides an Auto Scaling policy resource.",icon:"Aws_Auto-Scaling",model:"DefaultModel",url:"https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html",categories:["AWS","Compute"],tags:[],definedAttributes:[{name:"name",displayName:"Name",description:"Name of the policy.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#name"},{name:"autoscaling_group_name",displayName:"Autoscaling group name",description:"Name of the autoscaling group.",linkRef:"aws_autoscaling_group",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#autoscaling_group_name"},{name:"adjustment_type",displayName:"Adjustment type",description:"Whether the adjustment is an absolute number or a percentage of the current capacity.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#adjustment_type",rules:{values:["ChangeInCapacity","ExactCapacity","PercentChangeInCapacity"]}},{name:"policy_type",displayName:"Policy type",description:"Policy type",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#policy_type",rules:{values:["SimpleScaling","StepScaling","TargetTrackingScaling","PredictiveScaling"]}},{name:"cooldown",displayName:"Cooldown",description:"Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
Only available for SimpleScaling policies.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#cooldown"},{name:"scaling_adjustment",displayName:"Scaling adjustment",description:"Number of instances by which to scale.
Only available for SimpleScaling policies.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#scaling_adjustment"},{name:"estimated_instance_warmup",displayName:"Estimated instance warmup",description:"Estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#estimated_instance_warmup"},{name:"enabled",displayName:"Enabled",description:"Whether the policy should be enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#enabled"},{name:"min_adjustment_magnitude",displayName:"Min adjustment magnitude",description:"Minimum value to scale by when adjustment_type is set to PercentChangeInCapacity.
Only valid when policy_type is SimpleScaling or StepScalling.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#min_adjustment_magnitude"},{name:"metric_aggregation_type",displayName:"Metric aggregation type",description:"The aggregation type for the CloudWatch metrics.
Only valid when policy_type is StepScaling.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#metric_aggregation_type",rules:{values:["Average","Minimum","Maximum"]}},{name:"step_adjustment",displayName:"Step adjustment",description:"A list of step adjustments.
Only valid when policy_type is StepScaling.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#step_adjustment",definedAttributes:[{name:"metric_interval_lower_bound",displayName:"Metric interval lower bound",description:"The lower bound for the difference between the alarm threshold and the CloudWatch metric.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#metric_interval_lower_bound"},{name:"metric_interval_upper_bound",displayName:"Metric interval upper bound",description:"The upper bound for the difference between the alarm threshold and the CloudWatch metric.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#metric_interval_upper_bound"},{name:"scaling_adjustment",displayName:"Scaling adjustment",description:"The number of members by which to scale.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#scaling_adjustment"}]}]}];function K(t){return K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},K(t)}function H(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function q(t){for(var e=1;ewhen the bucket is destroyed so that the bucket can be destroyed without error.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#force_destroy"},{name:"object_lock_enabled",displayName:"Object lock enabled",description:"Indicates whether this bucket has an Object Lock configuration enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#object_lock_enabled"},q(q({},k),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#tags"})]},{type:"aws_s3_bucket_acl",blockType:"resource",provider:"aws",displayName:"S3 bucket Access Control List (ACL)",description:"Amazon S3 access control lists (ACLs) enable you to manage access to buckets and objects.",icon:"Aws_Storage-Service_Bucket-ACL",model:"DefaultModel",url:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/acls.html",categories:["AWS","Storage"],tags:[],definedAttributes:[{name:"bucket",displayName:"Bucket",description:"The name of the bucket to put the ACL in.",linkRef:"aws_s3_bucket",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_acl#bucket"},{name:"acl",displayName:"ACL",description:"ACL to apply to the bucket
Conflicts with access_control_policy",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_acl#acl"},{name:"expected_bucket_owner",displayName:"Bucket owner",description:"Account ID of the expected bucket owner",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_acl#expected_bucket_owner"}]},{type:"aws_efs_file_system",blockType:"resource",provider:"aws",displayName:"EFS File System",description:"Provides an Elastic File System (EFS) File System resource.",icon:"Amazon-EFS",model:"DefaultModel",url:"https://aws.amazon.com/efs/?nc1=h_ls",categories:["AWS","Storage"],tags:[],definedAttributes:[{name:"arn",displayName:"ARN",description:"Amazon Resource Name (ARN) of the file system.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#arn"},{name:"availability_zone_name",displayName:"Availability zone name",description:"The AWS Availability Zone in which to create the file system.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#availability_zone_name"},{name:"availability_zone_id",displayName:"Availability zone ID",description:"The identifier of the Availability Zone in which the file system's One Zone storage classes exist.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#availability_zone_id"},{name:"creation_token",displayName:"Creation token",description:"A unique name used as reference when creating the Elastic File System to ensure idempotent file system creation.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#creation_token",rules:{max:"64",min:"1"}},{name:"encrypted",displayName:"Encrypted",description:"If true, the disk will be encrypted.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#encrypted"},{name:"kms_key_id",displayName:"Encrypted",description:"Amazon Resource Name (ARN) for the Key Management Service (KMS) encryption key.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#kms_key_id"},{name:"lifecycle_policy",displayName:"Lifecycle policy",description:"A file system lifecycle policy",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#lifecycle_policy",definedAttributes:[{name:"transition_to_ia",displayName:"Transition to IA",description:"Indicates how long it takes to transition files to the IA storage class.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#transition_to_ia",rules:{values:["AFTER_1_DAY","AFTER_7_DAYS","AFTER_14_DAYS","AFTER_30_DAYS","AFTER_60_DAYS","AFTER_90_DAYS"]}},{name:"transition_to_primary_storage_class",displayName:"Transition to primary storage class",description:"Describes the policy used to transition a file from infrequent access storage to primary storage.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#transition_to_primary_storage_class",rules:{values:["AFTER_1_ACCESS"]}}]},{name:"performance_mode",displayName:"Performance mode",description:"The file system performance mode.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#performance_mode",rules:{values:["generalPurpose","maxIO"]}},{name:"provisioned_throughput_in_mibps",displayName:"Provisioned throughput in Mibps",description:"The throughput, measured in MiB/s, that you want to provision for the file system.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#provisioned_throughput_in_mibps"},{name:"throughput_mode",displayName:"Throughput mode",description:"Throughput mode for the file system.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#throughput_mode",rules:{values:["bursting","provisioned","elastic"]}},{name:"size_in_bytes",displayName:"Size in bytes",description:"Current byte count used by the file system.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/efs_file_system#size_in_bytes"},q(q({},k),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#tags"})]},{type:"aws_efs_mount_target",blockType:"resource",provider:"aws",displayName:"EFS Mount Target",description:"Provide an Elastic File System (EFS) mount target.",icon:"Amazon-EFS",model:"DefaultModel",url:"https://docs.aws.amazon.com/efs/latest/ug/accessing-fs.html",categories:["AWS","Storage"],tags:[],definedAttributes:[{name:"file_system_id",displayName:"File system ID",description:"The ID of the file system for which the mount target is intended.",linkRef:"aws_efs_file_system",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_mount_target#file_system_id"},q(q({},S),{},{description:"The ID of the subnet to add the mount target in.",required:!0,url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_mount_target#subnet_id"}),{name:"ip_address",displayName:"IP address",description:"The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_mount_target#ip_address"},q(q({},T),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_mount_target#security_groups"})]}];function Y(t){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Y(t)}function $(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function X(t){for(var e=1;eMust not overlap with maintenance_window.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#backup_window"},{name:"character_set_name",displayName:"Character set name",description:"Specifies the character set to associate with the DB instance.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#character_set_name"},{name:"copy_tags_to_snapshot",displayName:"Copy tags to snapshot",description:"Whether to copy all Instance tags to snapshots, or not.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#copy_tags_to_snapshot"},{name:"delete_automated_snapshots",displayName:"Delete automated snapshots",description:"Whether to remove automated backups when the DB instance is deleted.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#delete_automated_snapshots"},{name:"deletion_protection",displayName:"Deletion protection",description:"If 'Deletion protection' is set to true, the DB instance cannot be deleted. Otherwise, it can.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#deletion_protection"},{name:"final_snapshot_identifier",displayName:"Final snapshot identifier",description:"The name of the final DB snapshot when this DB instance is deleted.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#final_snapshot_identifier"},{name:"iam_database_authentication_enabled",displayName:"IAM database authentication enabled",description:"Specifies whether mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#iam_database_authentication_enabled"},{name:"identifier",displayName:"Identifier",description:"The name of the Relational Database Service instance.
Conflicts with identifier_prefix.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#identifier"},{name:"identifier_prefix",displayName:"Identifier prefix",description:"Creates a unique identifier beginning with the specified prefix.
Conflicts with identifier.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#identifier_prefix"},{name:"iops",displayName:"IOPS",description:"The amount of provisioned IOPS.
Can only be set when storage_type is io1 or p3.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#iops"},{name:"maintenance_window",displayName:"Maintenance window",description:"The window to perform maintenance in.
Format: ddd:hh24:mi-ddd:hh24:mi.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#maintenance_window"},{name:"max_allocated_storage",displayName:"Max allocated storage",description:"The upper limit to which Amazon RDS can automatically scale the storage of the DB instance.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#max_allocated_storage"},{name:"monitoring_interval",displayName:"Monitoring interval",description:"The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#monitoring_interval",rules:{values:["0","1","5","10","15","30","60"]}},{name:"multi_az",displayName:"Multi AZ",description:"Specifies if the Relational Database Service instance is on multiple Availability Zones.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#multi_az"},{name:"network_type",displayName:"Network type",description:"The type of network connection to use for connecting to an Amazon Relational Database Service instance.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#network_type",rules:{values:["IPV4","DUAL"]}},{name:"option_group_name",displayName:"Option group name",description:"The name of the option group to associate.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#option_group_name"},{name:"parameter_group_name",displayName:"Parameter group name",description:"The name of the DB parameter group to associate.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#parameter_group_name"},{name:"performance_insights_enabled",displayName:"Performance insights enabled",description:"Specifies whether Performance Insights are enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#performance_insights_enabled"},{name:"performance_insights_retention_period",displayName:"Performance insights retention period",description:"The amount of time in days to retain Performance Insights data.
Must be a multiple of 31.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#performance_insights_retention_period"},X(X({},E),{},{description:"The port on which the DB accepts connections.",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#port"}),{name:"replica_mode",displayName:"Replica mode",description:"Specifies whether the replica is in either mounted or open-read-only mode.
This attribute is only supported by Oracle instances.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#replica_mode",rules:{values:["mounted","open-read-only"]}},{name:"restore_to_point_in_time",displayName:"Restore to point in time",description:"Restore from a point in time.
Must be specified if restore is set to true.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#restore_to_point_in_time",definedAttributes:[{name:"restore_time",displayName:"Restore time",description:"The date and time to restore from.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#restore_time"},{name:"source_db_instance_identifier",displayName:"Source DB instance identifier",description:"The identifier of the source DB instance from which to restore.",linkRef:"aws_db_instance",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_db_instance_identifier"},{name:"use_latest_restorable_time",displayName:"Use latest restorable time",description:"Specifies whether to restore the DB instance to the latest restorable backup time.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#use_latest_restorable_time"},{name:"source_db_instance_automated_backups_arn",displayName:"Source DB instance automated backups ARN",description:"The ARN of the automated backup from which to restore.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_db_instance_automated_backups_arn"},{name:"source_dbi_resource_id",displayName:"Source DBI resource ID",description:"The resource ID of the source DB instance from which to restore.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_dbi_resource_id"}]},{name:"s3_import",displayName:"S3 import",description:"Import from an S3 bucket.
Must be specified if import is set to true.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#s3_import",definedAttributes:[{name:"bucket_name",displayName:"Bucket name",description:"The name of the S3 bucket where the backup is stored.",linkRef:"aws_s3_bucket",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#bucket_name"},{name:"bucket_prefix",displayName:"Bucket prefix",description:"The path to the backup.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#bucket_prefix"},{name:"ingestion_role",displayName:"Ingestion role",description:"Role applied to load the data.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#ingestion_role"},{name:"source_engine",displayName:"Source engine",description:"Source engine for the backup.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_engine"},{name:"source_engine_version",displayName:"Source engine version",description:"Version of the source engine used for the backup.",linkRef:"aws_rds_engine_version",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_engine_version"}]},{name:"storage_encrypted",displayName:"Storage encrypted",description:"Specifies whether the DB instance is encrypted.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#storage_encrypted"},{name:"storage_type",displayName:"Storage type",description:"The type of storage for the DB.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#storage_type",rules:{values:["standard","gp2","gp3","io1"]}},{name:"storage_throughput",displayName:"Storage throughput",description:"The storage throughput value for the DB instance.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#storage_throughput"},{name:"timezone",displayName:"Timezone",description:"The timezone of the DB instance.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#timezone"},{name:"customer_owned_ip_enabled",displayName:"Customer owned IP enabled",description:"Specifies whether the DB instance is a customer-owned IP address (CoIP) enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#customer_owned_ip_enabled"},X(X({},k),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#tags"})]}];function Q(t){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q(t)}function tt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function et(t){for(var e=1;eIf not specified, Terraform will autogenerate a name beginning with tf-lb.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#name",rules:{regex:"^([a-zA-Z0-9]+-)*[a-zA-Z0-9]+$"}},{name:"internal",displayName:"Internal LB",description:"If true, the LB will be internal.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#internal"},{name:"load_balancer_type",displayName:"Load balancer type",description:"The type of load balancer to create.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#load_balancer_type",rules:{values:["application","gateway","network"]}},{name:"access_logs",displayName:"Access logs",description:"An Access Logs block.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb",definedAttributes:[{name:"bucket",displayName:"Bucket",description:"The S3 bucket name to store the logs in.",linkRef:"aws_s3_bucket",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#bucket"},{name:"enabled",displayName:"Enabled",description:"Boolean to enable / disable access_logs. Defaults to false, even when bucket is specified.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enabled"},{name:"prefix",displayName:"Prefix",description:"The S3 bucket prefix. Logs are stored in the root if not configured.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#prefix"}]},{name:"customer_owned_ipv4_pool",displayName:"Customer owned ivp4 pool",description:"The ID of the customer owned ipv4 pool to use for this load balancer.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#customer_owned_ipv4_pool"},{name:"desync_mitigation_mode",displayName:"Customer owned ivp4 pool",description:"Determines how the load balancer handles requests that might pose a security risk to an application due to HTTP desync.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#desync_mitigation_mode",rules:{values:["defensive","monitor","strictest"]}},{name:"drop_invalid_header_fields",displayName:"Drop invalid header fields",description:"Indicates whether HTTP headers with header fields that are not valid are removed by the load balancer (true) or routed to targets (false).
The default is false. Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens. Only valid for Load Balancers of type.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#drop_invalid_header_fields"},{name:"enable_cross_zone_load_balancing",displayName:"Enable cross zone load balancing",description:"If true, cross-zone load balancing of the load balancer will be enabled. For network and gateway type load balancers, this feature is disabled by default (false).
For application load balancer this feature is always enabled (true) and cannot be disabled. Defaults to false.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enable_cross_zone_load_balancing"},{name:"enable_deletion_protection",displayName:"Enable deletion protection",description:"If true, deletion of the load balancer will be disabled via the AWS API. This will prevent Terraform from deleting the load balancer. Defaults to false.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enable_deletion_protection"},{name:"enable_http2",displayName:"Enable http2",description:"Indicates whether HTTP/2 is enabled in application load balancers. Defaults to true.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enable_http2"},{name:"enable_waf_fail_open",displayName:"Enable WAF fail open",description:"Indicates whether to allow a WAF-enabled load balancer to route requests to targets
if it is unable to forward the request to AWS WAF. Defaults to false.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enable_waf_fail_open"},{name:"idle_timeout",displayName:"Idle timeout",description:"The time in seconds that the connection is allowed to be idle.
Only valid for Load Balancers of type application. Default: 60.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#idle_timeout"},{name:"ip_address_type",displayName:"IP address type",description:"The type of IP addresses used by the subnets for your load balancer.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#ip_address_type",rules:{values:["ipv4","dualstack"]}},et(et({},T),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#security_groups"}),{name:"preserve_host_header",displayName:"Preserve host header",description:"Indicates whether the Application Load Balancer should preserve the Host header in the HTTP request
and send it to the target without any change. Defaults to false.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#preserve_host_header"},{name:"subnet_mapping",displayName:"Subnet mapping",description:"A subnet mapping block.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#subnet_mapping",definedAttributes:[et(et({},S),{},{description:"ID of the subnet of which to attach to the load balancer. You can specify only one subnet per Availability Zone.",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#subnet_id"}),{name:"allocation_id",displayName:"Allocation ID",description:"The allocation ID of the Elastic IP address for an internet-facing load balancer.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#allocation_id"},et(et({},{name:"ipv6_address",displayName:"IPv6 address",description:"The IPv6 address.",type:"String"}),{},{description:"The IPv6 address. You associate IPv6 CIDR blocks with your VPC and choose the subnets
where you launch both internet-facing and internal Application Load Balancers or Network Load Balancers.",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#ipv6_address"}),{name:"private_ipv4_address",displayName:"Private IPv4 address",description:"The private IPv4 address for an internal load balancer.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#private_ipv4_address"}]},{name:"subnets",displayName:"Subnets",description:"A list of subnet IDs to attach to the LB. Subnets cannot be updated for Load Balancers of type network.
Changing this value for load balancers of type network will force a recreation of the resource.",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#subnets"},{name:"name_prefix",displayName:"Name prefix",description:"Creates a unique name beginning with the specified prefix. Conflicts with name.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#name_prefix"},et(et({},k),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#tags"})]},{type:"aws_lb_target_group",blockType:"resource",provider:"aws",displayName:"Load balancer target group",description:"Target groups route requests to one or more registered targets, using the protocol and port number that you specify.
You can register a target with multiple target groups",icon:"Aws_Application-Load-Balancer-Target-Group",model:"DefaultModel",url:"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html",categories:["AWS","Load Balancing"],tags:[],definedAttributes:[{name:"connection_termination",displayName:"Connection termination",description:"Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#connection_termination"},{name:"deregistration_delay",displayName:"Deregistration delay",description:"Amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#deregistration_delay"},{name:"lambda_multi_value_headers_enabled",displayName:"Lambda multi value headers enabled",description:"Whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#lambda_multi_value_headers_enabled"},{name:"load_balancing_algorithm_type",displayName:"Load balancing algorithm type",description:"Determines how the load balancer selects targets when routing requests.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#load_balancing_algorithm_type",rules:{values:["round_robin","least_outstanding_requests"]}},{name:"name",displayName:"Name",description:"Name of the target group. If omitted, Terraform will assign a random, unique name.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#name"},{name:"name_prefix",displayName:"Name prefix",description:"Creates a unique name beginning with the specified prefix.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#name_prefix"},et(et({},E),{},{description:"Port on which targets receive traffic, unless overridden when registering a specific target.",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#port"}),{name:"preserve_client_ip",displayName:"Preserve client IP",description:"Whether client IP preservation is enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#preserve_client_ip"},{name:"protocol",displayName:"Protocol",description:"Protocol to use for routing traffic to the targets.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#protocol",rules:{values:["GENEVE","HTTP","HTTPS","TCP","TCP_UDP","TLS","UDP"]}},{name:"protocol_version",displayName:"Protocol version",description:"Only applicable when protocol is HTTP or HTTPS. The protocol version.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#protocol_version"},{name:"proxy_protocol_v2",displayName:"Proxy protocol v2",description:"Whether to enable support for proxy protocol v2 on Network Load Balancers.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#proxy_protocol_v2"},{name:"slow_start",displayName:"Slow start",description:"Amount time for targets to warm up before the load balancer sends them a full share of requests.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#slow_start"},{name:"target_type",displayName:"Target type",description:'Type of target that you must specify when registering targets with this target group. The default is "instance".',type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#target_type"},{name:"ip_address_type",displayName:"IP address type",description:"The type of IP addresses used by the target group, only supported when target type is set to ip.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#ip_address_type",rules:{values:["ipv4","ipv6"]}},et(et({},w),{},{description:"Identifier of the VPC in which to create the target group.",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#vpc_id"}),{name:"health_check",displayName:"Health check",description:"Health Check configuration block.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#health_check",definedAttributes:[{name:"enabled",displayName:"Enabled",description:"Whether health checks are enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#enabled"},{name:"healthy_threshold",displayName:"Healthy threshold",description:"Number of consecutive health check successes required before considering a target healthy.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#healthy_threshold"},{name:"interval",displayName:"Interval",description:"Approximate amount of time, in seconds, between health checks of an individual target.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#interval"},{name:"matcher",displayName:"Matcher",description:"Response codes to use when checking for a healthy responses from a target.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#matcher"},{name:"path",displayName:"Path",description:"Destination for the health check request.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#path"},et(et({},E),{},{description:"The port the load balancer uses when performing health checks on targets.",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#port"}),{name:"protocol",displayName:"Protocol",description:"The port the load balancer uses when performing health checks on targets.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#protocol",rules:{values:["TCP","HTTP","HTTPS"]}},{name:"timeout",displayName:"Timeout",description:"Amount of time, in seconds, during which no response from a target means a failed health check.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#timeout"},{name:"unhealthy_threshold",displayName:"Unhealthy threshold",description:"Number of consecutive health check failures required before considering a target unhealthy.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#unhealthy_threshold"}]},{name:"stickiness",displayName:"Stickiness",description:"Stickiness configuration block.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#stickiness",definedAttributes:[{name:"cookie_duration",displayName:"Cookie duration",description:"The time period, in seconds, during which requests from a client should be routed to the same target.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#cookie_duration"},{name:"cookie_name",displayName:"Cookie name",description:"Name of the application based cookie.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#cookie_name"},{name:"enabled",displayName:"Enable stickiness",description:"Boolean to enable/disable stickiness.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#enabled"},{name:"type",displayName:"Type",description:"The type of sticky sessions.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#type",rules:{values:["lb_cookie","app_cookie","source_ip","source_ip_dest_ip","source_ip_dest_ip_proto"]}}]},k,{name:"target_failover",displayName:"Target failover",description:"Target failover block.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#target_failover",definedAttributes:[{name:"on_deregistration",displayName:"On deregistration",description:"Indicates how the Gateway Load Balancer (GWLB) handles existing flows when a target is deregistered.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#on_deregistration",rules:{values:["rebalance","no_rebalance"]}},{name:"on_unhealthy",displayName:"On unhealthy",description:"Indicates how the Gateway Load Balancer (GWLB) handles existing flows when a target is unhealthy.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#on_unhealthy",rules:{values:["rebalance","no_rebalance"]}}]}]},{type:"aws_lb_listener",blockType:"resource",provider:"aws",displayName:"Load Balancer Listener",description:"Provides a Load Balancer Listener resource.",icon:"Aws_Elastic-Load-Balancing_Network-Load-Balancer",model:"DefaultModel",url:"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html",categories:["AWS","Load Balancing"],tags:[],definedAttributes:[{name:"load_balancer_arn",displayName:"Load balancer ARN",description:"ARN of the load balancer.",linkRef:"aws_lb",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#load_balancer_arn"},{name:"default_action",displayName:"Default action",description:"Configuration block for the default action.",required:!0,type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#default_action",definedAttributes:[{name:"type",displayName:"Type",description:"Type of routing action.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#type",rules:{values:["forward","authenticate-oidc","authenticate-cognito","redirect","fixed-response"]}},{name:"target_group_arn",displayName:"Target group ARN",description:"ARN of the target group to which to route traffic.",linkRef:"aws_lb_target_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#target_group_arn"}]},{name:"certificate_arn",displayName:"Certificate ARN",description:"ARN of the default SSL server certificate.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#certificate_arn"},et(et({},E),{},{description:"Port on which the load balancer is listening.",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#port"}),{name:"protocol",displayName:"Protocol",description:"Protocol for connections from clients to the load balancer.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#protocol",rules:{values:["HTTP","HTTPS","TCP","TLS","UDP","TCP_UDP"]}},{name:"alpn_policy",displayName:"ALPN policy",description:"Name of the Application-Layer Protocol Negotiation (ALPN) policy.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#alpn_policy",rules:{values:["HTTP1Only","HTTP2Only","HTTP2Optional","HTTP2Preferred","None"]}},{name:"ssl_policy",displayName:"SSL policy",description:"Name of the SSL Policy for the listener.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#ssl_policy"},et(et({},k),{},{url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#tags"})]}];function it(t){return function(t){if(Array.isArray(t))return ot(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ot(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ot(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ot(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);nt.length)&&(e=t.length);for(var n=0,r=Array(e);nthat provides the information required to launch an instance.",icon:"Aws_EC2_AMI",model:"DefaultModel",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html",categories:["AWS","Data Sources"],tags:[],definedAttributes:[{name:"owners",displayName:"Owners",description:"List of AMI owners to limit search.",type:"Array",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html"},{name:"most_recent",displayName:"Most recent",description:"If more than one result is returned, use the most recent AMI.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami#most_recent"},{name:"executable_users",displayName:"Executable users",description:"Limit search to users with explicit launch permission on the image.",type:"Array",url:"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html"},{name:"include_deprecated",displayName:"Include deprecated",description:"If true, all deprecated AMIs are included in the response.",type:"Boolean",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html"},{name:"name_regex",displayName:"Name regex",description:"Regex string to apply to the AMI list returned by AWS.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami#name_regex"}]},{type:"aws_rds_engine_version",blockType:"data",displayName:"Relational Database Service engine version",description:"Information about a Relational Database Service engine version.

Amazon Relational Database Service (Amazon RDS) is a web service
that makes it easier to set up, operate, and scale a relational database in the AWS Cloud.",icon:"Aws_RDS",model:"DefaultModel",url:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html",categories:["AWS","Data Sources"],tags:[],definedAttributes:[{name:"engine",displayName:"Engine",description:"A DB engine is the specific relational database software that runs on your DB instance.",required:!0,type:"String",url:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html#Welcome.Concepts.DBInstance.engine",rules:{values:["aurora","aurora-mysql","aurora-postgresql","docdb","mariadb","mysql","neptune","oracle-ee","oracle-se","oracle-se1","oracle-se2","postgres","sqlserver-ee","sqlserver-ex","sqlserver-se","sqlserver-web"]}},{name:"default_only",displayName:"Default only",description:"When set to true, the default version for the specified engine or combination of engine and major version will be returned.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#default_only"},{name:"version",displayName:"Version",description:"Version of the DB engine.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#version"},{name:"preferred_versions",displayName:"Preferred versions",description:"Ordered list of preferred engine versions.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#preferred_versions"},{name:"include_all",displayName:"Include all",description:"When set to true, the specified version or member of prefered versions will be returned even if it is deprecated.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#include_all"},{name:"parameter_group_family",displayName:"Parameter group family",description:"Name of a specific DB parameter group family.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#parameter_group_family"}]},{type:"aws_availability_zones",blockType:"data",displayName:"Availability Zones",description:"The Availability Zones data source allows access to the list of AWS Availability Zones
which can be accessed by an AWS account within the region configured in the provider.

This is different from the Availability Zone (singular).",icon:"Aws_Local-Zones",model:"DefaultModel",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html",categories:["AWS","Data Sources"],tags:[],definedAttributes:[{name:"all_availability_zones",displayName:"All Availability Zones",description:"Set to true to include all Availability Zones and Local Zones regardless of your opt in status.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones#all_availability_zones"},{name:"exclude_names",displayName:"Exclude names",description:"List of Availability Zone names to exclude.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones#exclude_names"},{name:"exclude_zone_ids",displayName:"Exclude zone IDs",description:"List of Availability Zone IDs to exclude.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones#exclude_zone_ids"},{name:"state",displayName:"State",description:"Allows to filter list of Availability Zones based on their current state.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones#state",rules:{values:["available","impaired","information","unavailable"]}}]}]),it(R),it(j),it(V),it(G),it(J),it(rt),it([{type:"aws_route53_zone",blockType:"resource",displayName:"AWS route 53 zone",description:"A collection of records",icon:"Aws_Route-53-Hosted-Zone",isContainer:!0,model:"DefaultContainer",url:"https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-working-with.html",categories:["AWS","DNS and Routing"],tags:[],definedAttributes:[{name:"name",displayName:"Name",description:"This is the name of the hosted zone.",required:!0,type:"String",containerRef:"aws_route53_zone",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_zone#name"},{name:"records",displayName:"Records",type:"Link",linkModel:"defaultLink",linkAttribute:"name",linkRef:"aws_route53_record",linkType:"Default"}]},{type:"aws_route53_record",blockType:"resource",displayName:"AWS route 53 record",description:"Create records to tell the DNS how to route traffic for that domain.",icon:"Aws_Route-53_Route-Table",model:"DefaultModel",url:"https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/rrsets-working-with.html",categories:["AWS","DNS and Routing"],tags:[],definedAttributes:[{name:"zone_id",displayName:"Zone ID",description:"The ID of the hosted zone to contain this record.",containerRef:"aws_route53_zone",required:!0,type:"Reference",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record#zone_id"},{name:"records",displayName:"Records",description:"A string list of records.",linkRef:"aws_route53_record",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record#records"}]}]),it([{type:"aws_cloudwatch_metric_alarm",blockType:"resource",provider:"aws",displayName:"Cloudwatch metric alarm",description:"Watches a single metric over a specified time period, and performs one or more specified actions, based on the value of the metric relative to a threshold over time.",icon:"Amazon-CloudWatch_Alarm",model:"DefaultModel",url:"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#CloudWatchAlarms",categories:["AWS","Monitoring and Logging"],tags:[],definedAttributes:[{name:"alarm_name",displayName:"Alarm name",description:"The descriptive name for the alarm. This name must be unique within the user's AWS account",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#alarm_name"},{name:"comparison_operator",displayName:"Comparison operator",description:"The arithmetic operation to use when comparing the specified Statistic and Threshold.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#comparison_operator",rules:{values:["GreaterThanOrEqualToThreshold","GreaterThanThreshold","LessThanThreshold","LessThanOrEqualToThreshold","LessThanLowerOrGreaterThanUpperThreshold","LessThanLowerThreshold","GreaterThanUpperThreshold"]}},{name:"evaluation_periods",displayName:"Evaluation periods",description:"The number of periods over which data is compared to the specified threshold.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#evaluation_periods"},{name:"metric_name",displayName:"Metric name",description:"The name for the alarm's associated metric.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#metric_name"},{name:"namespace",displayName:"Namespace",description:"The namespace for the alarm's associated metric.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#namespace"},{name:"period",displayName:"Period",description:"The period in seconds over which the specified statistic is applied.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#period"},{name:"statistic",displayName:"Statistic",description:"The statistic to apply to the alarm's associated metric.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#statistic",rules:{values:["SampleCount","Average","Sum","Minimum","Maximum"]}},{name:"threshold",displayName:"Threshold",description:"The value against which the specified statistic is compared.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#threshold"},{name:"dimensions",displayName:"Dimensions",description:"The dimensions for the alarm's associated metric.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#dimensions",definedAttributes:[{name:"AutoScalingGroupName",displayName:"Auto Scaling group name",description:"Amazon EC2 Auto Scaling",linkRef:"aws_autoscaling_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html"}]},{name:"actions_enabled",displayName:"Actions enabled",description:"Indicates whether or not actions should be executed during any changes to the alarm's state.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#actions_enabled"},{name:"alarm_description",displayName:"Alarm description",description:"The description for the alarm.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#alarm_description"},{name:"datapoints_to_alarm",displayName:"Datapoints to alarm",description:"The number of datapoints that must be breaching to trigger the alarm.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#datapoints_to_alarm"},{name:"alarm_actions",displayName:"Alarm actions",description:"The list of actions to execute when this alarm transitions into an ALARM state from any other state.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#alarm_actions",rules:{max:5,min:1}},{name:"insufficient_data_actions",displayName:"Insufficient data actions",description:"The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#insufficient_data_actions",rules:{max:5,min:1}},{name:"ok_actions",displayName:"OK actions",description:"The list of actions to execute when this alarm transitions into an OK state from any other state.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#ok_actions",rules:{max:5,min:1}},{name:"unit",displayName:"Unit",description:"The unit for the alarm's associated metric.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#unit",rules:{values:["Seconds","Microseconds","Milliseconds","Bytes","Kilobytes","Megabytes","Gigabytes","Terabytes","Bits","Kilobits","Megabits","Gigabits","Terabits","Percent","Count","Bytes/Second","Kilobytes/Second","Megabytes/Second","Gigabytes/Second","Terabytes/Second","Bits/Second","Kilobits/Second","Megabits/Second","Gigabits/Second","Terabits/Second","Count/Second","None"]}},{name:"extended_statistic",displayName:"Extended statistic",description:"The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#extended_statistic"},{name:"treat_missing_data",displayName:"Treat missing data",description:"Sets how this alarm is to handle missing data points.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#treat_missing_data",rules:{values:["breaching","notBreaching","ignore","missing"]}},{name:"evaluate_low_sample_count_percentiles",displayName:"Evaluate low sample count percentiles",description:"Used only for alarms based on percentiles.
If ignore, the alarm state does not change during periods with too few data points to be statistically significant.
If evaluate or omit, the alarm is always evaluated and possibly changes state no matter how many data points are available.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#evaluate_low_sample_count_percentiles",rules:{values:["evaluate","ignore"]}},{name:"metric_query",displayName:"Metric query",description:"Enable to create an alarm based on a metric math expression.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#metric_query",definedAttributes:[{name:"id",displayName:"ID",description:"A short name used to tie this object to the results in the response.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#id"},{name:"account_id",displayName:"Account ID",description:"The account ID to use when searching for the metric.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#account_id"},{name:"expression",displayName:"Expression",description:"The math expression to be performed on the returned data, if this object is performing a math expression.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#expression"},{name:"label",displayName:"Label",description:"A human-readable label for this metric or expression.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#label"},{name:"return_data",displayName:"Return data",description:"Specify exactly one metric_query to be true to use that metric_query result as the alarm.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#return_data"}]}]}]),it([{type:"random_string",blockType:"resource",provider:"aws",displayName:"Random String",description:"Generates a random permutation of alphanumeric characters and optionally special characters.",icon:"variable",model:"DefaultModel",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string",categories:["AWS","Miscellaneous"],tags:[],definedAttributes:[{name:"length",displayName:"Length",description:"The length of the string desired.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#length",rules:{min:1}},{name:"special",displayName:"Special",description:"Include special characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#special"},{name:"min_special",displayName:"Min special",description:"Minimum number of special characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_special"},{name:"lower",displayName:"Lower",description:"Include lowercase alphabet characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#lower"},{name:"min_lower",displayName:"Min lower",description:"Minimum number of lowercase characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_lower"},{name:"upper",displayName:"Upper",description:"Include uppercase alphabet characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#upper"},{name:"min_upper",displayName:"Min upper",description:"Minimum number of uppercase characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_upper"},{name:"numeric",displayName:"Numeric",description:"Include numeric characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#numeric"},{name:"min_numeric",displayName:"Min numeric",description:"Minimum number of numeric characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#min_numeric"},{name:"override_special",displayName:"Override special",description:"Supply your own list of special characters to use for string generation.",type:"String"}]},{type:"random_password",blockType:"resource",provider:"aws",displayName:"Random Password",description:"Identical to random_string with the exception that the result is treated as sensitive and, thus, not displayed in console output.",icon:"variable",model:"DefaultModel",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password",categories:["AWS","Miscellaneous"],tags:[],definedAttributes:[{name:"length",displayName:"Length",description:"The length of the string desired.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#length",rules:{min:1}},{name:"special",displayName:"Special",description:"Include special characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#special"},{name:"min_special",displayName:"Min special",description:"Minimum number of special characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_special"},{name:"lower",displayName:"Lower",description:"Include lowercase alphabet characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#lower"},{name:"min_lower",displayName:"Min lower",description:"Minimum number of lowercase characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_lower"},{name:"upper",displayName:"Upper",description:"Include uppercase alphabet characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#upper"},{name:"min_upper",displayName:"Min upper",description:"Minimum number of uppercase characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_upper"},{name:"numeric",displayName:"Numeric",description:"Include numeric characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#numeric"},{name:"min_numeric",displayName:"Min numeric",description:"Minimum number of numeric characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#min_numeric"},{name:"override_special",displayName:"Override special",description:"Supply your own list of special characters to use for string generation.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#override_special"}]}]),it([{type:"server",blockType:"module",provider:"aws",displayName:"Server",icon:"Aws_Servers",model:"DefaultModel",categories:["AWS","Modules"],tags:[],definedAttributes:[]}]),it([{type:"image_id",blockType:"variable",provider:"aws",icon:"variable",model:"DefaultModel",categories:["AWS","Variables"],tags:[],definedAttributes:[]}])));function ct(t){return ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ct(t)}function ut(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n0})).reduce((function(t,e){return e.parentTypes.forEach((function(n){t[n]=[].concat(function(t){return function(t){if(Array.isArray(t))return ut(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ut(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ut(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t[n]||[]),[e.type])})),t}),{});t.filter((function(t){return e[t.type]})).forEach((function(t){t.childrenTypes=e[t.type]}))}}])}(t.DefaultMetadata);const _t=bt;var wt={763:()=>{}},xt={};function kt(t){var e=xt[t];if(void 0!==e)return e.exports;var n=xt[t]={exports:{}};return wt[t](n,n.exports,kt),n.exports}kt.d=(t,e)=>{for(var n in e)kt.o(e,n)&&!kt.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},kt.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Tt={};kt.d(Tt,{MG:()=>ye,fr:()=>$e,sR:()=>qn,Zo:()=>Gn,iH:()=>Jn,rt:()=>tn,jB:()=>nr,M8:()=>Cn,$t:()=>Hn,aq:()=>zn,pG:()=>Xe,eP:()=>Fn,KU:()=>Bn,zW:()=>Yn,IX:()=>zt,mY:()=>Vt,a7:()=>me,JG:()=>sn,ay:()=>vn,X2:()=>kn,WU:()=>In,Uw:()=>Mn,gw:()=>Dn,iX:()=>ir,re:()=>Sn,Pg:()=>ar,tD:()=>En,R$:()=>xn,Dj:()=>rn,m7:()=>oe,NZ:()=>te,xo:()=>ee,ou:()=>St,qC:()=>cr,mD:()=>Pt,Ay:()=>pr});class St{constructor(){this.source=null,this.type=null,this.channel=null,this.start=null,this.stop=null,this.tokenIndex=null,this.line=null,this.column=null,this._text=null}getTokenSource(){return this.source[0]}getInputStream(){return this.source[1]}get text(){return this._text}set text(t){this._text=t}}function Et(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n>>16)*c&65535)<<16)&4294967295,i=i<<15|i>>>17,i=(65535&i)*u+(((i>>>16)*u&65535)<<16)&4294967295,a^=i,a=a<<13|a>>>19,r=5*(65535&a)+((5*(a>>>16)&65535)<<16)&4294967295,a=27492+(65535&r)+((58964+(r>>>16)&65535)<<16);switch(i=0,o){case 3:i^=(255&n.charCodeAt(l+2))<<16;case 2:i^=(255&n.charCodeAt(l+1))<<8;case 1:i^=255&n.charCodeAt(l),i=(65535&i)*c+(((i>>>16)*c&65535)<<16)&4294967295,i=i<<15|i>>>17,i=(65535&i)*u+(((i>>>16)*u&65535)<<16)&4294967295,a^=i}return a^=n.length,a^=a>>>16,a=2246822507*(65535&a)+((2246822507*(a>>>16)&65535)<<16)&4294967295,a^=a>>>13,a=3266489909*(65535&a)+((3266489909*(a>>>16)&65535)<<16)&4294967295,a^=a>>>16,a>>>0}class Nt{constructor(){this.count=0,this.hash=0}update(){for(let t=0;t>>17,t*=461845907,this.count=this.count+1;let n=this.hash^t;n=n<<13|n>>>19,n=5*n+3864292196,this.hash=n}}}finish(){let t=this.hash^4*this.count;return t^=t>>>16,t*=2246822507,t^=t>>>13,t*=3266489909,t^=t>>>16,t}static hashStuff(){const t=new Nt;return t.update.apply(t,arguments),t.finish()}}function Ct(t){return t?"string"==typeof t?Ot(t):t.hashCode():-1}function Lt(t,e){return t&&t.equals?t.equals(e):t===e}function Rt(t){return null===t?"null":t}function Pt(t){return Array.isArray(t)?"["+t.map(Rt).join(", ")+"]":"null"}class It{constructor(t,e){this.buckets=new Array(16),this.threshold=Math.floor(12),this.itemCount=0,this.hashFunction=t||Ct,this.equalsFunction=e||Lt}get(t){if(null==t)return t;const e=this._getBucket(t);if(!e)return null;for(const n of e)if(this.equalsFunction(n,t))return n;return null}add(t){return this.getOrAdd(t)===t}getOrAdd(t){this._expand();const e=this._getSlot(t);let n=this.buckets[e];if(!n)return n=[t],this.buckets[e]=n,this.itemCount++,t;for(const e of n)if(this.equalsFunction(e,t))return e;return n.push(t),this.itemCount++,t}has(t){return null!=this.get(t)}values(){return this.buckets.filter((t=>null!=t)).flat(1)}toString(){return Pt(this.values())}get length(){return this.itemCount}_getSlot(t){return this.hashFunction(t)&this.buckets.length-1}_getBucket(t){return this.buckets[this._getSlot(t)]}_expand(){if(this.itemCount<=this.threshold)return;const t=this.buckets,e=2*this.buckets.length;this.buckets=new Array(e),this.threshold=Math.floor(.75*e);for(const e of t)if(e)for(const t of e){const e=this._getSlot(t);let n=this.buckets[e];n||(n=[],this.buckets[e]=n),n.push(t)}}}class Mt{hashCode(){const t=new Nt;return this.updateHashCode(t),t.finish()}evaluate(t,e){}evalPrecedence(t,e){return this}static andContext(t,e){if(null===t||t===Mt.NONE)return e;if(null===e||e===Mt.NONE)return t;const n=new Dt(t,e);return 1===n.opnds.length?n.opnds[0]:n}static orContext(t,e){if(null===t)return e;if(null===e)return t;if(t===Mt.NONE||e===Mt.NONE)return Mt.NONE;const n=new jt(t,e);return 1===n.opnds.length?n.opnds[0]:n}}class Dt extends Mt{constructor(t,e){super();const n=new It;t instanceof Dt?t.opnds.map((function(t){n.add(t)})):n.add(t),e instanceof Dt?e.opnds.map((function(t){n.add(t)})):n.add(e);const r=Bt(n);if(r.length>0){let t=null;r.map((function(e){(null===t||e.precedencet.toString()));return(t.length>3?t.slice(3):t).join("&&")}}class jt extends Mt{constructor(t,e){super();const n=new It;t instanceof jt?t.opnds.map((function(t){n.add(t)})):n.add(t),e instanceof jt?e.opnds.map((function(t){n.add(t)})):n.add(e);const r=Bt(n);if(r.length>0){const t=r.sort((function(t,e){return t.compareTo(e)})),e=t[t.length-1];n.add(e)}this.opnds=Array.from(n.values())}equals(t){return this===t||t instanceof jt&&Et(this.opnds,t.opnds)}updateHashCode(t){t.update(this.opnds,"OR")}evaluate(t,e){for(let n=0;nt.toString()));return(t.length>3?t.slice(3):t).join("||")}}function Bt(t){const e=[];return t.values().map((function(t){t instanceof Mt.PrecedencePredicate&&e.push(t)})),e}function Ft(t,e){if(null===t){const t={state:null,alt:null,context:null,semanticContext:null};return e&&(t.reachesIntoOuterContext=0),t}{const n={};return n.state=t.state||null,n.alt=void 0===t.alt?null:t.alt,n.context=t.context||null,n.semanticContext=t.semanticContext||null,e&&(n.reachesIntoOuterContext=t.reachesIntoOuterContext||0,n.precedenceFilterSuppressed=t.precedenceFilterSuppressed||!1),n}}class Ut{constructor(t,e){this.checkContext(t,e),t=Ft(t),e=Ft(e,!0),this.state=null!==t.state?t.state:e.state,this.alt=null!==t.alt?t.alt:e.alt,this.context=null!==t.context?t.context:e.context,this.semanticContext=null!==t.semanticContext?t.semanticContext:null!==e.semanticContext?e.semanticContext:Mt.NONE,this.reachesIntoOuterContext=e.reachesIntoOuterContext,this.precedenceFilterSuppressed=e.precedenceFilterSuppressed}checkContext(t,e){null!==t.context&&void 0!==t.context||null!==e&&null!==e.context&&void 0!==e.context||(this.context=null)}hashCode(){const t=new Nt;return this.updateHashCode(t),t.finish()}updateHashCode(t){t.update(this.state.stateNumber,this.alt,this.context,this.semanticContext)}equals(t){return this===t||t instanceof Ut&&this.state.stateNumber===t.state.stateNumber&&this.alt===t.alt&&(null===this.context?null===t.context:this.context.equals(t.context))&&this.semanticContext.equals(t.semanticContext)&&this.precedenceFilterSuppressed===t.precedenceFilterSuppressed}hashCodeForConfigSet(){const t=new Nt;return t.update(this.state.stateNumber,this.alt,this.semanticContext),t.finish()}equalsForConfigSet(t){return this===t||t instanceof Ut&&this.state.stateNumber===t.state.stateNumber&&this.alt===t.alt&&this.semanticContext.equals(t.semanticContext)}toString(){return"("+this.state+","+this.alt+(null!==this.context?",["+this.context.toString()+"]":"")+(this.semanticContext!==Mt.NONE?","+this.semanticContext.toString():"")+(this.reachesIntoOuterContext>0?",up="+this.reachesIntoOuterContext:"")+")"}}class zt{constructor(t,e){this.start=t,this.stop=e}clone(){return new zt(this.start,this.stop)}contains(t){return t>=this.start&&tthis.addInterval(t)),this),this}reduce(t){if(t=n.stop?(this.intervals.splice(t+1,1),this.reduce(t)):e.stop>=n.start&&(this.intervals[t]=new zt(e.start,n.stop),this.intervals.splice(t+1,1))}}complement(t,e){const n=new Vt;return n.addInterval(new zt(t,e+1)),null!==this.intervals&&this.intervals.forEach((t=>n.removeRange(t))),n}contains(t){if(null===this.intervals)return!1;for(let e=0;en.start&&t.stop=n.stop?(this.intervals.splice(e,1),e-=1):t.start"):t.push("'"+String.fromCharCode(n.start)+"'"):t.push("'"+String.fromCharCode(n.start)+"'..'"+String.fromCharCode(n.stop-1)+"'")}return t.length>1?"{"+t.join(", ")+"}":t[0]}toIndexString(){const t=[];for(let e=0;e"):t.push(n.start.toString()):t.push(n.start.toString()+".."+(n.stop-1).toString())}return t.length>1?"{"+t.join(", ")+"}":t[0]}toTokenString(t,e){const n=[];for(let r=0;r1?"{"+n.join(", ")+"}":n[0]}elementName(t,e,n){return n===St.EOF?"":n===St.EPSILON?"":t[n]||e[n]}get length(){return this.intervals.map((t=>t.length)).reduce(((t,e)=>t+e))}}class Kt{constructor(){this.atn=null,this.stateNumber=Kt.INVALID_STATE_NUMBER,this.stateType=null,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.nextTokenWithinRule=null}toString(){return this.stateNumber}equals(t){return t instanceof Kt&&this.stateNumber===t.stateNumber}isNonGreedyExitState(){return!1}addTransition(t,e){void 0===e&&(e=-1),0===this.transitions.length?this.epsilonOnlyTransitions=t.isEpsilon:this.epsilonOnlyTransitions!==t.isEpsilon&&(this.epsilonOnlyTransitions=!1),-1===e?this.transitions.push(t):this.transitions.splice(e,1,t)}}Kt.INVALID_TYPE=0,Kt.BASIC=1,Kt.RULE_START=2,Kt.BLOCK_START=3,Kt.PLUS_BLOCK_START=4,Kt.STAR_BLOCK_START=5,Kt.TOKEN_START=6,Kt.RULE_STOP=7,Kt.BLOCK_END=8,Kt.STAR_LOOP_BACK=9,Kt.STAR_LOOP_ENTRY=10,Kt.PLUS_LOOP_BACK=11,Kt.LOOP_END=12,Kt.serializationNames=["INVALID","BASIC","RULE_START","BLOCK_START","PLUS_BLOCK_START","STAR_BLOCK_START","TOKEN_START","RULE_STOP","BLOCK_END","STAR_LOOP_BACK","STAR_LOOP_ENTRY","PLUS_LOOP_BACK","LOOP_END"],Kt.INVALID_STATE_NUMBER=-1;class Ht extends Kt{constructor(){return super(),this.stateType=Kt.RULE_STOP,this}}class qt{constructor(t){if(null==t)throw"target cannot be null.";this.target=t,this.isEpsilon=!1,this.label=null}}qt.EPSILON=1,qt.RANGE=2,qt.RULE=3,qt.PREDICATE=4,qt.ATOM=5,qt.ACTION=6,qt.SET=7,qt.NOT_SET=8,qt.WILDCARD=9,qt.PRECEDENCE=10,qt.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],qt.serializationTypes={EpsilonTransition:qt.EPSILON,RangeTransition:qt.RANGE,RuleTransition:qt.RULE,PredicateTransition:qt.PREDICATE,AtomTransition:qt.ATOM,ActionTransition:qt.ACTION,SetTransition:qt.SET,NotSetTransition:qt.NOT_SET,WildcardTransition:qt.WILDCARD,PrecedencePredicateTransition:qt.PRECEDENCE};class Wt extends qt{constructor(t,e,n,r){super(t),this.ruleIndex=e,this.precedence=n,this.followState=r,this.serializationType=qt.RULE,this.isEpsilon=!0}matches(t,e,n){return!1}}class Gt extends qt{constructor(t,e){super(t),this.serializationType=qt.SET,null!=e?this.label=e:(this.label=new Vt,this.label.addOne(St.INVALID_TYPE))}matches(t,e,n){return this.label.contains(t)}toString(){return this.label.toString()}}class Yt extends Gt{constructor(t,e){super(t,e),this.serializationType=qt.NOT_SET}matches(t,e,n){return t>=e&&t<=n&&!super.matches(t,e,n)}toString(){return"~"+super.toString()}}class $t extends qt{constructor(t){super(t),this.serializationType=qt.WILDCARD}matches(t,e,n){return t>=e&&t<=n}toString(){return"."}}class Xt extends qt{constructor(t){super(t)}}class Zt{}class Jt extends Zt{}class Qt extends Jt{}class te extends Qt{get ruleContext(){throw new Error("missing interface implementation")}}class ee extends Qt{}class ne extends ee{}const re={toStringTree:function(t,e,n){e=e||null,null!==(n=n||null)&&(e=n.ruleNames);let r=re.getNodeText(t,e);r=function(t){return t.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}(r);const i=t.getChildCount();if(0===i)return r;let o="("+r+" ";i>0&&(r=re.toStringTree(t.getChild(0),e),o=o.concat(r));for(let n=1;n=0&&e0&&(t+=", "),this.returnStates[e]!==se.EMPTY_RETURN_STATE?(t+=this.returnStates[e],null!==this.parents[e]?t=t+" "+this.parents[e]:t+="null"):t+="$";return t+"]"}}get length(){return this.returnStates.length}}class ce extends se{constructor(t,e){let n=0;const r=new Nt;null!==t?r.update(t,e):r.update(1),n=r.finish(),super(n),this.parentCtx=t,this.returnState=e}getParent(t){return this.parentCtx}getReturnState(t){return this.returnState}equals(t){return this===t||t instanceof ce&&this.hashCode()===t.hashCode()&&this.returnState===t.returnState&&(null==this.parentCtx?null==t.parentCtx:this.parentCtx.equals(t.parentCtx))}toString(){const t=null===this.parentCtx?"":this.parentCtx.toString();return 0===t.length?this.returnState===se.EMPTY_RETURN_STATE?"$":""+this.returnState:this.returnState+" "+t}get length(){return 1}static create(t,e){return e===se.EMPTY_RETURN_STATE&&null===t?se.EMPTY:new ce(t,e)}}class ue extends ce{constructor(){super(null,se.EMPTY_RETURN_STATE)}isEmpty(){return!0}getParent(t){return null}getReturnState(t){return this.returnState}equals(t){return this===t}toString(){return"$"}}se.EMPTY=new ue;class le{constructor(t,e){this.buckets=new Array(16),this.threshold=Math.floor(12),this.itemCount=0,this.hashFunction=t||Ct,this.equalsFunction=e||Lt}set(t,e){this._expand();const n=this._getSlot(t);let r=this.buckets[n];if(!r)return r=[[t,e]],this.buckets[n]=r,this.itemCount++,e;const i=r.find((e=>this.equalsFunction(e[0],t)),this);if(i){const t=i[1];return i[1]=e,t}return r.push([t,e]),this.itemCount++,e}containsKey(t){const e=this._getBucket(t);return!!e&&!!e.find((e=>this.equalsFunction(e[0],t)),this)}get(t){const e=this._getBucket(t);if(!e)return null;const n=e.find((e=>this.equalsFunction(e[0],t)),this);return n?n[1]:null}entries(){return this.buckets.filter((t=>null!=t)).flat(1)}getKeys(){return this.entries().map((t=>t[0]))}getValues(){return this.entries().map((t=>t[1]))}toString(){return"["+this.entries().map((t=>"{"+t[0]+":"+t[1]+"}")).join(", ")+"]"}get length(){return this.itemCount}_getSlot(t){return this.hashFunction(t)&this.buckets.length-1}_getBucket(t){return this.buckets[this._getSlot(t)]}_expand(){if(this.itemCount<=this.threshold)return;const t=this.buckets,e=2*this.buckets.length;this.buckets=new Array(e),this.threshold=Math.floor(.75*e);for(const e of t)if(e)for(const t of e){const e=this._getSlot(t[0]);let n=this.buckets[e];n||(n=[],this.buckets[e]=n),n.push(t)}}}function he(t,e){if(null==e&&(e=oe.EMPTY),null===e.parentCtx||e===oe.EMPTY)return se.EMPTY;const n=he(t,e.parentCtx),r=t.states[e.invokingState].transitions[0];return ce.create(n,r.followState.stateNumber)}function fe(t,e,n){if(t.isEmpty())return t;let r=n.get(t)||null;if(null!==r)return r;if(r=e.get(t),null!==r)return n.set(t,r),r;let i=!1,o=[];for(let r=0;re.returnState&&(i[0]=e.returnState,i[1]=t.returnState);const o=new ae([n,n],i);return null!==r&&r.set(t,e,o),o}const i=[t.returnState,e.returnState];let o=[t.parentCtx,e.parentCtx];t.returnState>e.returnState&&(i[0]=e.returnState,i[1]=t.returnState,o=[e.parentCtx,t.parentCtx]);const s=new ae(o,i);return null!==r&&r.set(t,e,s),s}}(t,e,n,r);if(n){if(t instanceof ue)return t;if(e instanceof ue)return e}return t instanceof ce&&(t=new ae([t.getParent()],[t.returnState])),e instanceof ce&&(e=new ae([e.getParent()],[e.returnState])),function(t,e,n,r){if(null!==r){let n=r.get(t,e);if(null!==n)return se.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),n;if(n=r.get(e,t),null!==n)return se.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),n}let i=0,o=0,s=0,a=new Array(t.returnStates.length+e.returnStates.length).fill(0),c=new Array(t.returnStates.length+e.returnStates.length).fill(null);for(;i a"),t):u.equals(e)?(null!==r&&r.set(t,e,e),se.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> b"),e):(function(t){const e=new le;for(let n=0;n "+u),u)}(t,e,n,r)}class de{constructor(){this.data=new Uint32Array(1)}set(t){de._checkIndex(t),this._resize(t),this.data[t>>>5]|=1<>>5;return!(e>=this.data.length||!(this.data[e]&1<>>5;e>=1;return n+32*t}}return 0}hashCode(){return Nt.hashStuff(this.values())}equals(t){return t instanceof de&&Et(this.data,t.data)}toString(){return"{"+this.values().join(", ")+"}"}get length(){return this.data.map((t=>de._bitCount(t))).reduce(((t,e)=>t+e),0)}_resize(t){const e=t+32>>>5;if(e<=this.data.length)return;const n=new Uint32Array(e);n.set(this.data),n.fill(0,this.data.length),this.data=n}static _checkIndex(t){if(t<0)throw new RangeError("index cannot be negative")}static _bitCount(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,0+(t+=t>>16)&63}}class me{constructor(t){this.atn=t}getDecisionLookahead(t){if(null===t)return null;const e=t.transitions.length,n=[];for(let r=0;r=this.states.length)throw"Invalid state number.";const n=this.states[t];let r=this.nextTokens(n);if(!r.contains(St.EPSILON))return r;const i=new Vt;for(i.addSet(r),i.removeOne(St.EPSILON);null!==e&&e.invokingState>=0&&r.contains(St.EPSILON);){const t=this.states[e.invokingState].transitions[0];r=this.nextTokens(t.followState),i.addSet(r),i.removeOne(St.EPSILON),e=e.parentCtx}return r.contains(St.EPSILON)&&i.addOne(St.EOF),i}}ye.INVALID_ALT_NUMBER=0;class ge extends Kt{constructor(){super(),this.stateType=Kt.BASIC}}class ve extends Kt{constructor(){return super(),this.decision=-1,this.nonGreedy=!1,this}}class be extends ve{constructor(){return super(),this.endState=null,this}}class _e extends Kt{constructor(){return super(),this.stateType=Kt.BLOCK_END,this.startState=null,this}}class we extends Kt{constructor(){return super(),this.stateType=Kt.LOOP_END,this.loopBackState=null,this}}class xe extends Kt{constructor(){return super(),this.stateType=Kt.RULE_START,this.stopState=null,this.isPrecedenceRule=!1,this}}class ke extends ve{constructor(){return super(),this.stateType=Kt.TOKEN_START,this}}class Te extends ve{constructor(){return super(),this.stateType=Kt.PLUS_LOOP_BACK,this}}class Se extends Kt{constructor(){return super(),this.stateType=Kt.STAR_LOOP_BACK,this}}class Ee extends ve{constructor(){return super(),this.stateType=Kt.STAR_LOOP_ENTRY,this.loopBackState=null,this.isPrecedenceDecision=null,this}}class Ae extends be{constructor(){return super(),this.stateType=Kt.PLUS_BLOCK_START,this.loopBackState=null,this}}class Oe extends be{constructor(){return super(),this.stateType=Kt.STAR_BLOCK_START,this}}class Ne extends be{constructor(){return super(),this.stateType=Kt.BLOCK_START,this}}class Ce extends qt{constructor(t,e){super(t),this.label_=e,this.label=this.makeLabel(),this.serializationType=qt.ATOM}makeLabel(){const t=new Vt;return t.addOne(this.label_),t}matches(t,e,n){return this.label_===t}toString(){return this.label_}}class Le extends qt{constructor(t,e,n){super(t),this.serializationType=qt.RANGE,this.start=e,this.stop=n,this.label=this.makeLabel()}makeLabel(){const t=new Vt;return t.addRange(this.start,this.stop),t}matches(t,e,n){return t>=this.start&&t<=this.stop}toString(){return"'"+String.fromCharCode(this.start)+"'..'"+String.fromCharCode(this.stop)+"'"}}class Re extends qt{constructor(t,e,n,r){super(t),this.serializationType=qt.ACTION,this.ruleIndex=e,this.actionIndex=void 0===n?-1:n,this.isCtxDependent=void 0!==r&&r,this.isEpsilon=!0}matches(t,e,n){return!1}toString(){return"action_"+this.ruleIndex+":"+this.actionIndex}}class Pe extends qt{constructor(t,e){super(t),this.serializationType=qt.EPSILON,this.isEpsilon=!0,this.outermostPrecedenceReturn=e}matches(t,e,n){return!1}toString(){return"epsilon"}}class Ie extends Mt{constructor(t,e,n){super(),this.ruleIndex=void 0===t?-1:t,this.predIndex=void 0===e?-1:e,this.isCtxDependent=void 0!==n&&n}evaluate(t,e){const n=this.isCtxDependent?e:null;return t.sempred(n,this.ruleIndex,this.predIndex)}updateHashCode(t){t.update(this.ruleIndex,this.predIndex,this.isCtxDependent)}equals(t){return this===t||t instanceof Ie&&this.ruleIndex===t.ruleIndex&&this.predIndex===t.predIndex&&this.isCtxDependent===t.isCtxDependent}toString(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}}Mt.NONE=new Ie;class Me extends Xt{constructor(t,e,n,r){super(t),this.serializationType=qt.PREDICATE,this.ruleIndex=e,this.predIndex=n,this.isCtxDependent=r,this.isEpsilon=!0}matches(t,e,n){return!1}getPredicate(){return new Ie(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return"pred_"+this.ruleIndex+":"+this.predIndex}}class De extends Mt{constructor(t){super(),this.precedence=void 0===t?0:t}evaluate(t,e){return t.precpred(e,this.precedence)}evalPrecedence(t,e){return t.precpred(e,this.precedence)?Mt.NONE:null}compareTo(t){return this.precedence-t.precedence}updateHashCode(t){t.update(this.precedence)}equals(t){return this===t||t instanceof De&&this.precedence===t.precedence}toString(){return"{"+this.precedence+">=prec}?"}}Mt.PrecedencePredicate=De;class je extends Xt{constructor(t,e){super(t),this.serializationType=qt.PRECEDENCE,this.precedence=e,this.isEpsilon=!0}matches(t,e,n){return!1}getPredicate(){return new De(this.precedence)}toString(){return this.precedence+" >= _p"}}class Be{constructor(t){void 0===t&&(t=null),this.readOnly=!1,this.verifyATN=null===t||t.verifyATN,this.generateRuleBypassTransitions=null!==t&&t.generateRuleBypassTransitions}}Be.defaultOptions=new Be,Be.defaultOptions.readOnly=!0;class Fe{constructor(t){this.actionType=t,this.isPositionDependent=!1}hashCode(){const t=new Nt;return this.updateHashCode(t),t.finish()}updateHashCode(t){t.update(this.actionType)}equals(t){return this===t}}class Ue extends Fe{constructor(){super(6)}execute(t){t.skip()}toString(){return"skip"}}Ue.INSTANCE=new Ue;class ze extends Fe{constructor(t){super(0),this.channel=t}execute(t){t._channel=this.channel}updateHashCode(t){t.update(this.actionType,this.channel)}equals(t){return this===t||t instanceof ze&&this.channel===t.channel}toString(){return"channel("+this.channel+")"}}class Ve extends Fe{constructor(t,e){super(1),this.ruleIndex=t,this.actionIndex=e,this.isPositionDependent=!0}execute(t){t.action(null,this.ruleIndex,this.actionIndex)}updateHashCode(t){t.update(this.actionType,this.ruleIndex,this.actionIndex)}equals(t){return this===t||t instanceof Ve&&this.ruleIndex===t.ruleIndex&&this.actionIndex===t.actionIndex}}class Ke extends Fe{constructor(){super(3)}execute(t){t.more()}toString(){return"more"}}Ke.INSTANCE=new Ke;class He extends Fe{constructor(t){super(7),this.type=t}execute(t){t.type=this.type}updateHashCode(t){t.update(this.actionType,this.type)}equals(t){return this===t||t instanceof He&&this.type===t.type}toString(){return"type("+this.type+")"}}class qe extends Fe{constructor(t){super(5),this.mode=t}execute(t){t.pushMode(this.mode)}updateHashCode(t){t.update(this.actionType,this.mode)}equals(t){return this===t||t instanceof qe&&this.mode===t.mode}toString(){return"pushMode("+this.mode+")"}}class We extends Fe{constructor(){super(4)}execute(t){t.popMode()}toString(){return"popMode"}}We.INSTANCE=new We;class Ge extends Fe{constructor(t){super(2),this.mode=t}execute(t){t.setMode(this.mode)}updateHashCode(t){t.update(this.actionType,this.mode)}equals(t){return this===t||t instanceof Ge&&this.mode===t.mode}toString(){return"mode("+this.mode+")"}}function Ye(t,e){const n=[];return n[t-1]=e,n.map((function(t){return e}))}class $e{constructor(t){null==t&&(t=Be.defaultOptions),this.deserializationOptions=t,this.stateFactories=null,this.actionFactories=null}deserialize(t){const e=this.reset(t);this.checkVersion(e),e&&this.skipUUID();const n=this.readATN();this.readStates(n,e),this.readRules(n,e),this.readModes(n);const r=[];return this.readSets(n,r,this.readInt.bind(this)),e&&this.readSets(n,r,this.readInt32.bind(this)),this.readEdges(n,r),this.readDecisions(n),this.readLexerActions(n,e),this.markPrecedenceDecisions(n),this.verifyATN(n),this.deserializationOptions.generateRuleBypassTransitions&&1===n.grammarType&&(this.generateRuleBypassTransitions(n),this.verifyATN(n)),n}reset(t){if(3===(t.charCodeAt?t.charCodeAt(0):t[0])){const e=function(t){const e=t.charCodeAt(0);return e>1?e-2:e+65534},n=t.split("").map(e);return n[0]=t.charCodeAt(0),this.data=n,this.pos=0,!0}return this.data=t,this.pos=0,!1}skipUUID(){let t=0;for(;t++<8;)this.readInt()}checkVersion(t){const e=this.readInt();if(!t&&4!==e)throw"Could not deserialize ATN with version "+e+" (expected 4)."}readATN(){const t=this.readInt(),e=this.readInt();return new ye(t,e)}readStates(t,e){let n,r,i;const o=[],s=[],a=this.readInt();for(let n=0;n0;)i.addTransition(c.transitions[u-1]),c.transitions=c.transitions.slice(-1);t.ruleToStartState[e].addTransition(new Pe(i)),o.addTransition(new Pe(a));const l=new ge;t.addState(l),l.addTransition(new Ce(o,t.ruleToTokenType[e])),i.addTransition(new Pe(l))}stateIsEndStateFor(t,e){if(t.ruleIndex!==e)return null;if(!(t instanceof Ee))return null;const n=t.transitions[t.transitions.length-1].target;return n instanceof we&&n.epsilonOnlyTransitions&&n.transitions[0].target instanceof Ht?t:null}markPrecedenceDecisions(t){for(let e=0;e=0):this.checkCondition(n.transitions.length<=1||n instanceof Ht)}}checkCondition(t,e){if(!t)throw null==e&&(e="IllegalState"),e}readInt(){return this.data[this.pos++]}readInt32(){return this.readInt()|this.readInt()<<16}edgeFactory(t,e,n,r,i,o,s,a){const c=t.states[r];switch(e){case qt.EPSILON:return new Pe(c);case qt.RANGE:return new Le(c,0!==s?St.EOF:i,o);case qt.RULE:return new Wt(t.states[i],o,s,c);case qt.PREDICATE:return new Me(c,i,o,0!==s);case qt.PRECEDENCE:return new je(c,i);case qt.ATOM:return new Ce(c,0!==s?St.EOF:i);case qt.ACTION:return new Re(c,i,o,0!==s);case qt.SET:return new Gt(c,a[i]);case qt.NOT_SET:return new Yt(c,a[i]);case qt.WILDCARD:return new $t(c);default:throw"The specified transition type: "+e+" is not valid."}}stateFactory(t,e){if(null===this.stateFactories){const t=[];t[Kt.INVALID_TYPE]=null,t[Kt.BASIC]=()=>new ge,t[Kt.RULE_START]=()=>new xe,t[Kt.BLOCK_START]=()=>new Ne,t[Kt.PLUS_BLOCK_START]=()=>new Ae,t[Kt.STAR_BLOCK_START]=()=>new Oe,t[Kt.TOKEN_START]=()=>new ke,t[Kt.RULE_STOP]=()=>new Ht,t[Kt.BLOCK_END]=()=>new _e,t[Kt.STAR_LOOP_BACK]=()=>new Se,t[Kt.STAR_LOOP_ENTRY]=()=>new Ee,t[Kt.PLUS_LOOP_BACK]=()=>new Te,t[Kt.LOOP_END]=()=>new we,this.stateFactories=t}if(t>this.stateFactories.length||null===this.stateFactories[t])throw"The specified state type "+t+" is not valid.";{const n=this.stateFactories[t]();if(null!==n)return n.ruleIndex=e,n}}lexerActionFactory(t,e,n){if(null===this.actionFactories){const t=[];t[0]=(t,e)=>new ze(t),t[1]=(t,e)=>new Ve(t,e),t[2]=(t,e)=>new Ge(t),t[3]=(t,e)=>Ke.INSTANCE,t[4]=(t,e)=>We.INSTANCE,t[5]=(t,e)=>new qe(t),t[6]=(t,e)=>Ue.INSTANCE,t[7]=(t,e)=>new He(t),this.actionFactories=t}if(t>this.actionFactories.length||null===this.actionFactories[t])throw"The specified lexer action type "+t+" is not valid.";return this.actionFactories[t](e,n)}}class Xe{syntaxError(t,e,n,r,i,o){}reportAmbiguity(t,e,n,r,i,o,s){}reportAttemptingFullContext(t,e,n,r,i,o){}reportContextSensitivity(t,e,n,r,i,o){}}class Ze extends Xe{constructor(){super()}syntaxError(t,e,n,r,i,o){console.error("line "+n+":"+r+" "+i)}}Ze.INSTANCE=new Ze;class Je extends Xe{constructor(t){if(super(),null===t)throw"delegates";return this.delegates=t,this}syntaxError(t,e,n,r,i,o){this.delegates.map((s=>s.syntaxError(t,e,n,r,i,o)))}reportAmbiguity(t,e,n,r,i,o,s){this.delegates.map((a=>a.reportAmbiguity(t,e,n,r,i,o,s)))}reportAttemptingFullContext(t,e,n,r,i,o){this.delegates.map((s=>s.reportAttemptingFullContext(t,e,n,r,i,o)))}reportContextSensitivity(t,e,n,r,i,o){this.delegates.map((s=>s.reportContextSensitivity(t,e,n,r,i,o)))}}class Qe{constructor(){this._listeners=[Ze.INSTANCE],this._interp=null,this._stateNumber=-1}checkVersion(t){const e="4.13.2";e!==t&&console.log("ANTLR runtime and generated code versions disagree: "+e+"!="+t)}addErrorListener(t){this._listeners.push(t)}removeErrorListeners(){this._listeners=[]}getLiteralNames(){return Object.getPrototypeOf(this).constructor.literalNames||[]}getSymbolicNames(){return Object.getPrototypeOf(this).constructor.symbolicNames||[]}getTokenNames(){if(!this.tokenNames){const t=this.getLiteralNames(),e=this.getSymbolicNames(),n=t.length>e.length?t.length:e.length;this.tokenNames=[];for(let r=0;r";let e=t.text;return null===e&&(e=t.type===St.EOF?"":"<"+t.type+">"),e=e.replace("\n","\\n").replace("\r","\\r").replace("\t","\\t"),"'"+e+"'"}getErrorListenerDispatch(){return console.warn("Calling deprecated method in Recognizer class: getErrorListenerDispatch()"),this.getErrorListener()}getErrorListener(){return new Je(this._listeners)}sempred(t,e,n){return!0}precpred(t,e){return!0}get atn(){return this._interp.atn}get state(){return this._stateNumber}set state(t){this._stateNumber=t}}Qe.tokenTypeMapCache={},Qe.ruleIndexMapCache={};class tn extends St{constructor(t,e,n,r,i){super(),this.source=void 0!==t?t:tn.EMPTY_SOURCE,this.type=void 0!==e?e:null,this.channel=void 0!==n?n:St.DEFAULT_CHANNEL,this.start=void 0!==r?r:-1,this.stop=void 0!==i?i:-1,this.tokenIndex=-1,null!==this.source[0]?(this.line=t[0].line,this.column=t[0].column):this.column=-1}clone(){const t=new tn(this.source,this.type,this.channel,this.start,this.stop);return t.tokenIndex=this.tokenIndex,t.line=this.line,t.column=this.column,t.text=this.text,t}cloneWithType(t){const e=new tn(this.source,t,this.channel,this.start,this.stop);return e.tokenIndex=this.tokenIndex,e.line=this.line,e.column=this.column,t===St.EOF&&(e.text=""),e}toString(){let t=this.text;return t=null!==t?t.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"):"","[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+t+"',<"+this.type+">"+(this.channel>0?",channel="+this.channel:"")+","+this.line+":"+this.column+"]"}get text(){if(null!==this._text)return this._text;const t=this.getInputStream();if(null===t)return null;const e=t.size;return this.start"}set text(t){this._text=t}}tn.EMPTY_SOURCE=[null,null];class en{}class nn extends en{constructor(t){super(),this.copyText=void 0!==t&&t}create(t,e,n,r,i,o,s,a){const c=new tn(t,e,r,i,o);return c.line=s,c.column=a,null!==n?c.text=n:this.copyText&&null!==t[1]&&(c.text=t[1].getText(i,o)),c}createThin(t,e){const n=new tn(null,t);return n.text=e,n}}nn.DEFAULT=new nn;class rn extends Error{constructor(t){super(t.message),Error.captureStackTrace&&Error.captureStackTrace(this,rn),this.message=t.message,this.recognizer=t.recognizer,this.input=t.input,this.ctx=t.ctx,this.offendingToken=null,this.offendingState=-1,null!==this.recognizer&&(this.offendingState=this.recognizer.state)}getExpectedTokens(){return null!==this.recognizer?this.recognizer.atn.getExpectedTokens(this.offendingState,this.ctx):null}toString(){return this.message}}class on extends rn{constructor(t,e,n,r){super({message:"",recognizer:t,input:e,ctx:null}),this.startIndex=n,this.deadEndConfigs=r}toString(){let t="";return this.startIndex>=0&&this.startIndex":"\n"===t?"\\n":"\t"===t?"\\t":"\r"===t?"\\r":t}getCharErrorDisplay(t){return"'"+this.getErrorDisplayForChar(t)+"'"}recover(t){this._input.LA(1)!==St.EOF&&(t instanceof on?this._interp.consume(this._input):this._input.consume())}get inputStream(){return this._input}set inputStream(t){this._input=null,this._tokenFactorySourcePair=[this,this._input],this.reset(),this._input=t,this._tokenFactorySourcePair=[this,this._input]}get sourceName(){return this._input.sourceName}get type(){return this._type}set type(t){this._type=t}get line(){return this._interp.line}set line(t){this._interp.line=t}get column(){return this._interp.column}set column(t){this._interp.column=t}get text(){return null!==this._text?this._text:this._interp.getText(this._input)}set text(t){this._text=t}}function an(t){return t.hashCodeForConfigSet()}function cn(t,e){return t===e||null!==t&&null!==e&&t.equalsForConfigSet(e)}sn.DEFAULT_MODE=0,sn.MORE=-2,sn.SKIP=-3,sn.DEFAULT_TOKEN_CHANNEL=St.DEFAULT_CHANNEL,sn.HIDDEN=St.HIDDEN_CHANNEL,sn.MIN_CHAR_VALUE=0,sn.MAX_CHAR_VALUE=1114111;class un{constructor(t){this.configLookup=new It(an,cn),this.fullCtx=void 0===t||t,this.readOnly=!1,this.configs=[],this.uniqueAlt=0,this.conflictingAlts=null,this.hasSemanticContext=!1,this.dipsIntoOuterContext=!1,this.cachedHashCode=-1}add(t,e){if(void 0===e&&(e=null),this.readOnly)throw"This set is readonly";t.semanticContext!==Mt.NONE&&(this.hasSemanticContext=!0),t.reachesIntoOuterContext>0&&(this.dipsIntoOuterContext=!0);const n=this.configLookup.getOrAdd(t);if(n===t)return this.cachedHashCode=-1,this.configs.push(t),!0;const r=!this.fullCtx,i=pe(n.context,t.context,r,e);return n.reachesIntoOuterContext=Math.max(n.reachesIntoOuterContext,t.reachesIntoOuterContext),t.precedenceFilterSuppressed&&(n.precedenceFilterSuppressed=!0),n.context=i,!0}getStates(){const t=new It;for(let e=0;evn.MAX_DFA_EDGE)return null;let n=t.edges[e-vn.MIN_DFA_EDGE];return void 0===n&&(n=null),vn.debug&&null!==n&&console.log("reuse state "+t.stateNumber+" edge to "+n.stateNumber),n}computeTargetState(t,e,n){const r=new fn;return this.getReachableConfigSet(t,e.configs,r,n),0===r.items.length?(r.hasSemanticContext||this.addDFAEdge(e,n,hn.ERROR),hn.ERROR):this.addDFAEdge(e,n,null,r)}failOrAccept(t,e,n,r){if(null!==this.prevAccept.dfaState){const n=t.dfaState.lexerActionExecutor;return this.accept(e,n,this.startIndex,t.index,t.line,t.column),t.dfaState.prediction}if(r===St.EOF&&e.index===this.startIndex)return St.EOF;throw new on(this.recog,e,this.startIndex,n)}getReachableConfigSet(t,e,n,r){let i=ye.INVALID_ALT_NUMBER;for(let o=0;ovn.MAX_DFA_EDGE||(vn.debug&&console.log("EDGE "+t+" -> "+n+" upon "+e),null===t.edges&&(t.edges=[]),t.edges[e-vn.MIN_DFA_EDGE]=n),n}addDFAState(t){const e=new ln(null,t);let n=null;for(let e=0;et.startsWith("k-"))).map((t=>this.data[t]),this)}}const wn={SLL:0,LL:1,LL_EXACT_AMBIG_DETECTION:2,hasSLLConflictTerminatingPrediction:function(t,e){if(wn.allConfigsInRuleStopStates(e))return!0;if(t===wn.SLL&&e.hasSemanticContext){const t=new un;for(let n=0;n1)return!0;return!1},allSubsetsEqual:function(t){let e=null;for(let n=0;n "+o),0===o.items.length?null:o}removeAllConfigsNotInRuleStopState(t,e){if(xn.allConfigsInRuleStopStates(t))return t;const n=new un(t.fullCtx);for(let r=0;r0&&(o=this.getAltThatFinishedDecisionEntryRule(i),o!==ye.INVALID_ALT_NUMBER)?o:ye.INVALID_ALT_NUMBER}getAltThatFinishedDecisionEntryRule(t){const e=[];for(let n=0;n0||r.state instanceof Ht&&r.context.hasEmptyPath())&&e.indexOf(r.alt)<0&&e.push(r.alt)}return 0===e.length?ye.INVALID_ALT_NUMBER:Math.min.apply(null,e)}splitAccordingToSemanticValidity(t,e){const n=new un(t.fullCtx),r=new un(t.fullCtx);for(let i=0;i=0&&(r+=1)}this.closureCheckingStopState(h,e,n,l,i,r,s)}}}canDropLoopEntryEdgeInLeftRecursiveRule(t){const e=t.state;if(e.stateType!==Kt.STAR_LOOP_ENTRY)return!1;if(e.stateType!==Kt.STAR_LOOP_ENTRY||!e.isPrecedenceDecision||t.context.isEmpty()||t.context.hasEmptyPath())return!1;const n=t.context.length;for(let r=0;r=0?this.parser.ruleNames[t]:""}getEpsilonTarget(t,e,n,r,i,o){switch(e.serializationType){case qt.RULE:return this.ruleTransition(t,e);case qt.PRECEDENCE:return this.precedenceTransition(t,e,n,r,i);case qt.PREDICATE:return this.predTransition(t,e,n,r,i);case qt.ACTION:return this.actionTransition(t,e);case qt.EPSILON:return new Ut({state:e.target},t);case qt.ATOM:case qt.RANGE:case qt.SET:return o&&e.matches(St.EOF,0,1)?new Ut({state:e.target},t):null;default:return null}}actionTransition(t,e){if(this.debug){const t=-1===e.actionIndex?65535:e.actionIndex;console.log("ACTION edge "+e.ruleIndex+":"+t)}return new Ut({state:e.target},t)}precedenceTransition(t,e,n,r,i){this.debug&&(console.log("PRED (collectPredicates="+n+") "+e.precedence+">=_p, ctx dependent=true"),null!==this.parser&&console.log("context surrounding pred is "+Pt(this.parser.getRuleInvocationStack())));let o=null;if(n&&r)if(i){const n=this._input.index;this._input.seek(this._startIndex);const r=e.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(n),r&&(o=new Ut({state:e.target},t))}else{const n=Mt.andContext(t.semanticContext,e.getPredicate());o=new Ut({state:e.target,semanticContext:n},t)}else o=new Ut({state:e.target},t);return this.debug&&console.log("config from pred transition="+o),o}predTransition(t,e,n,r,i){this.debug&&(console.log("PRED (collectPredicates="+n+") "+e.ruleIndex+":"+e.predIndex+", ctx dependent="+e.isCtxDependent),null!==this.parser&&console.log("context surrounding pred is "+Pt(this.parser.getRuleInvocationStack())));let o=null;if(n&&(e.isCtxDependent&&r||!e.isCtxDependent))if(i){const n=this._input.index;this._input.seek(this._startIndex);const r=e.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(n),r&&(o=new Ut({state:e.target},t))}else{const n=Mt.andContext(t.semanticContext,e.getPredicate());o=new Ut({state:e.target,semanticContext:n},t)}else o=new Ut({state:e.target},t);return this.debug&&console.log("config from pred transition="+o),o}ruleTransition(t,e){this.debug&&console.log("CALL rule "+this.getRuleName(e.target.ruleIndex)+", ctx="+t.context);const n=e.followState,r=ce.create(t.context,n.stateNumber);return new Ut({state:e.target,context:r},t)}getConflictingAlts(t){const e=xn.getConflictingAltSubsets(t);return xn.getAlts(e)}getConflictingAltsOrUniqueAlt(t){let e=null;return t.uniqueAlt!==ye.INVALID_ALT_NUMBER?(e=new de,e.set(t.uniqueAlt)):e=t.conflictingAlts,e}getTokenName(t){if(t===St.EOF)return"EOF";if(null!==this.parser&&null!==this.parser.literalNames){if(!(t>=this.parser.literalNames.length&&t>=this.parser.symbolicNames.length))return(this.parser.literalNames[t]||this.parser.symbolicNames[t])+"<"+t+">";console.log(t+" ttype out of range: "+this.parser.literalNames),console.log(""+this.parser.getInputStream().getTokens())}return""+t}getLookaheadName(t){return this.getTokenName(t.LA(1))}dumpDeadEndConfigs(t){console.log("dead end configs: ");const e=t.getDeadEndConfigs();for(let t=0;t0){const t=n.state.transitions[0];t instanceof Ce?r="Atom "+this.getTokenName(t.label):t instanceof Gt&&(r=(t instanceof Yt?"~":"")+"Set "+t.set)}console.error(n.toString(this.parser,!0)+":"+r)}}noViableAlt(t,e,n,r){return new kn(this.parser,t,t.get(r),t.LT(1),n,e)}getUniqueAlt(t){let e=ye.INVALID_ALT_NUMBER;for(let n=0;n "+r+" upon "+this.getTokenName(n)),null===r)return null;if(r=this.addDFAState(t,r),null===e||n<-1||n>this.atn.maxTokenType)return r;if(null===e.edges&&(e.edges=[]),e.edges[n+1]=r,this.debug){const e=null===this.parser?null:this.parser.literalNames,n=null===this.parser?null:this.parser.symbolicNames;console.log("DFA=\n"+t.toString(e,n))}return r}addDFAState(t,e){if(e===hn.ERROR)return e;const n=t.states.get(e);return null!==n?(this.trace_atn_sim&&console.log("addDFAState "+e+" exists"),n):(e.stateNumber=t.states.length,e.configs.readOnly||(e.configs.optimizeConfigs(this),e.configs.setReadonly(!0)),this.trace_atn_sim&&console.log("addDFAState new "+e),t.states.add(e),this.debug&&console.log("adding new DFA state: "+e),e)}reportAttemptingFullContext(t,e,n,r,i){if(this.debug||this.retry_debug){const e=new zt(r,i+1);console.log("reportAttemptingFullContext decision="+t.decision+":"+n+", input="+this.parser.getTokenStream().getText(e))}null!==this.parser&&this.parser.getErrorListener().reportAttemptingFullContext(this.parser,t,r,i,e,n)}reportContextSensitivity(t,e,n,r,i){if(this.debug||this.retry_debug){const e=new zt(r,i+1);console.log("reportContextSensitivity decision="+t.decision+":"+n+", input="+this.parser.getTokenStream().getText(e))}null!==this.parser&&this.parser.getErrorListener().reportContextSensitivity(this.parser,t,r,i,e,n)}reportAmbiguity(t,e,n,r,i,o,s){if(this.debug||this.retry_debug){const t=new zt(n,r+1);console.log("reportAmbiguity "+o+":"+s+", input="+this.parser.getTokenStream().getText(t))}null!==this.parser&&this.parser.getErrorListener().reportAmbiguity(this.parser,t,n,r,i,o,s)}}class En{constructor(){this.cache=new le}add(t){if(t===se.EMPTY)return se.EMPTY;const e=this.cache.get(t)||null;return null!==e?e:(this.cache.set(t,t),t)}get(t){return this.cache.get(t)||null}get length(){return this.cache.length}}const An={ATN:ye,ATNDeserializer:$e,LexerATNSimulator:vn,ParserATNSimulator:Sn,PredictionMode:xn,PredictionContextCache:En};class On{constructor(t,e,n){this.dfa=t,this.literalNames=e||[],this.symbolicNames=n||[]}toString(){if(null===this.dfa.s0)return null;let t="";const e=this.dfa.sortedStates();for(let n=0;n"),t=t.concat(this.getStateString(e)),t=t.concat("\n"))}}}return 0===t.length?null:t}getEdgeLabel(t){return 0===t?"EOF":null!==this.literalNames||null!==this.symbolicNames?this.literalNames[t-1]||this.symbolicNames[t-1]:String.fromCharCode(t-1)}getStateString(t){const e=(t.isAcceptState?":":"")+"s"+t.stateNumber+(t.requiresFullContext?"^":"");return t.isAcceptState?null!==t.predicates?e+"=>"+Pt(t.predicates):e+"=>"+t.prediction.toString():e}}class Nn extends On{constructor(t){super(t,null)}getEdgeLabel(t){return"'"+String.fromCharCode(t)+"'"}}class Cn{constructor(t,e){if(void 0===e&&(e=0),this.atnStartState=t,this.decision=e,this._states=new It,this.s0=null,this.precedenceDfa=!1,t instanceof Ee&&t.isPrecedenceDecision){this.precedenceDfa=!0;const t=new ln(null,new un);t.edges=[],t.isAcceptState=!1,t.requiresFullContext=!1,this.s0=t}}getPrecedenceStartState(t){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";return t<0||t>=this.s0.edges.length?null:this.s0.edges[t]||null}setPrecedenceStartState(t,e){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";t<0||(this.s0.edges[t]=e)}setPrecedenceDfa(t){if(this.precedenceDfa!==t){if(this._states=new It,t){const t=new ln(null,new un);t.edges=[],t.isAcceptState=!1,t.requiresFullContext=!1,this.s0=t}else this.s0=null;this.precedenceDfa=t}}sortedStates(){return this._states.values().sort((function(t,e){return t.stateNumber-e.stateNumber}))}toString(t,e){return t=t||null,e=e||null,null===this.s0?"":new On(this,t,e).toString()}toLexerString(){return null===this.s0?"":new Nn(this).toString()}get states(){return this._states}}const Ln={DFA:Cn,DFASerializer:On,LexerDFASerializer:Nn,PredPrediction:bn},Rn={PredictionContext:se},Pn={Interval:zt,IntervalSet:Vt};class In{visitTerminal(t){}visitErrorNode(t){}enterEveryRule(t){}exitEveryRule(t){}}class Mn{visit(t){return Array.isArray(t)?t.map((function(t){return t.accept(this)}),this):t.accept(this)}visitChildren(t){return t.children?this.visit(t.children):null}visitTerminal(t){}visitErrorNode(t){}}class Dn{walk(t,e){if(e instanceof ne||void 0!==e.isErrorNode&&e.isErrorNode())t.visitErrorNode(e);else if(e instanceof ee)t.visitTerminal(e);else{this.enterRule(t,e);for(let n=0;n=i.length)return""+n;const o=i[r]||null;return null===o||0===o.length?""+n:`${n} (${o})`}getConflictingAlts(t,e){if(null!==t)return t;const n=new de;for(let t=0;t=0&&t.consume(),this.lastErrorIndex=t._input.index,null===this.lastErrorStates&&(this.lastErrorStates=[]),this.lastErrorStates.push(t.state);const n=this.getErrorRecoverySet(t);this.consumeUntil(t,n)}sync(t){if(this.inErrorRecoveryMode(t))return;const e=t._interp.atn.states[t.state],n=t.getTokenStream().LA(1),r=t.atn.nextTokens(e);if(r.contains(n))return this.nextTokensContext=null,void(this.nextTokenState=Kt.INVALID_STATE_NUMBER);if(r.contains(St.EPSILON))null===this.nextTokensContext&&(this.nextTokensContext=t._ctx,this.nextTokensState=t._stateNumber);else switch(e.stateType){case Kt.BLOCK_START:case Kt.STAR_BLOCK_START:case Kt.PLUS_BLOCK_START:case Kt.STAR_LOOP_ENTRY:if(null!==this.singleTokenDeletion(t))return;throw new Bn(t);case Kt.PLUS_LOOP_BACK:case Kt.STAR_LOOP_BACK:{this.reportUnwantedToken(t);const e=new Vt;e.addSet(t.getExpectedTokens());const n=e.addSet(this.getErrorRecoverySet(t));this.consumeUntil(t,n)}}}reportNoViableAlternative(t,e){const n=t.getTokenStream();let r;r=null!==n?e.startToken.type===St.EOF?"":n.getText(new zt(e.startToken.tokenIndex,e.offendingToken.tokenIndex)):"";const i="no viable alternative at input "+this.escapeWSAndQuote(r);t.notifyErrorListeners(i,e.offendingToken,e)}reportInputMismatch(t,e){const n="mismatched input "+this.getTokenErrorDisplay(e.offendingToken)+" expecting "+e.getExpectedTokens().toString(t.literalNames,t.symbolicNames);t.notifyErrorListeners(n,e.offendingToken,e)}reportFailedPredicate(t,e){const n="rule "+t.ruleNames[t._ctx.ruleIndex]+" "+e.message;t.notifyErrorListeners(n,e.offendingToken,e)}reportUnwantedToken(t){if(this.inErrorRecoveryMode(t))return;this.beginErrorCondition(t);const e=t.getCurrentToken(),n="extraneous input "+this.getTokenErrorDisplay(e)+" expecting "+this.getExpectedTokens(t).toString(t.literalNames,t.symbolicNames);t.notifyErrorListeners(n,e,null)}reportMissingToken(t){if(this.inErrorRecoveryMode(t))return;this.beginErrorCondition(t);const e=t.getCurrentToken(),n="missing "+this.getExpectedTokens(t).toString(t.literalNames,t.symbolicNames)+" at "+this.getTokenErrorDisplay(e);t.notifyErrorListeners(n,e,null)}recoverInline(t){const e=this.singleTokenDeletion(t);if(null!==e)return t.consume(),e;if(this.singleTokenInsertion(t))return this.getMissingSymbol(t);throw new Bn(t)}singleTokenInsertion(t){const e=t.getTokenStream().LA(1),n=t._interp.atn,r=n.states[t.state].transitions[0].target;return!!n.nextTokens(r,t._ctx).contains(e)&&(this.reportMissingToken(t),!0)}singleTokenDeletion(t){const e=t.getTokenStream().LA(2);if(this.getExpectedTokens(t).contains(e)){this.reportUnwantedToken(t),t.consume();const e=t.getCurrentToken();return this.reportMatch(t),e}return null}getMissingSymbol(t){const e=t.getCurrentToken(),n=this.getExpectedTokens(t).first();let r;r=n===St.EOF?"":"";let i=e;const o=t.getTokenStream().LT(-1);return i.type===St.EOF&&null!==o&&(i=o),t.getTokenFactory().create(i.source,n,r,St.DEFAULT_CHANNEL,-1,-1,i.line,i.column)}getExpectedTokens(t){return t.getExpectedTokens()}getTokenErrorDisplay(t){if(null===t)return"";let e=t.text;return null===e&&(e=t.type===St.EOF?"":"<"+t.type+">"),this.escapeWSAndQuote(e)}escapeWSAndQuote(t){return"'"+(t=(t=(t=t.replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t"))+"'"}getErrorRecoverySet(t){const e=t._interp.atn;let n=t._ctx;const r=new Vt;for(;null!==n&&n.invokingState>=0;){const t=e.states[n.invokingState].transitions[0],i=e.nextTokens(t.followState);r.addSet(i),n=n.parentCtx}return r.removeOne(St.EPSILON),r}consumeUntil(t,e){let n=t.getTokenStream().LA(1);for(;n!==St.EOF&&!e.contains(n);)t.consume(),n=t.getTokenStream().LA(1)}}class qn extends Hn{constructor(){super()}recover(t,e){let n=t._ctx;for(;null!==n;)n.exception=e,n=n.parentCtx;throw new Vn(e)}recoverInline(t){this.recover(t,new Bn(t))}sync(t){}}const Wn={RecognitionException:rn,NoViableAltException:kn,LexerNoViableAltException:on,InputMismatchException:Bn,FailedPredicateException:Fn,DiagnosticErrorListener:zn,BailErrorStrategy:qn,DefaultErrorStrategy:Hn,ErrorListener:Xe};class Gn{constructor(t,e){if(this.name="",this.strdata=t,this.decodeToUnicodeCodePoints=e||!1,this._index=0,this.data=[],this.decodeToUnicodeCodePoints)for(let t=0;t=this._size)throw"cannot consume EOF";this._index+=1}LA(t){if(0===t)return 0;t<0&&(t+=1);const e=this._index+t-1;return e<0||e>=this._size?St.EOF:this.data[e]}LT(t){return this.LA(t)}mark(){return-1}release(t){}seek(t){t<=this._index?this._index=t:this._index=Math.min(t,this._size)}getText(t,e){if(e>=this._size&&(e=this._size-1),t>=this._size)return"";if(this.decodeToUnicodeCodePoints){let n="";for(let r=t;r<=e;r++)n+=String.fromCodePoint(this.data[r]);return n}return this.strdata.slice(t,e+1)}toString(){return this.strdata}get index(){return this._index}get size(){return this._size}}class Yn extends Gn{constructor(t,e){super(t,e)}}var $n=kt(763);const Xn="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;class Zn extends Yn{static fromPath(t,e,n){if(!Xn)throw new Error("FileStream is only available when running in Node!");$n.readFile(t,e,(function(t,e){let r=null;null!==e&&(r=new Gn(e,!0)),n(t,r)}))}constructor(t,e,n){if(!Xn)throw new Error("FileStream is only available when running in Node!");super($n.readFileSync(t,e||"utf-8"),n),this.fileName=t}}const Jn={fromString:function(t){return new Gn(t,!0)},fromBlob:function(t,e,n,r){const i=new window.FileReader;i.onload=function(t){const e=new Gn(t.target.result,!0);n(e)},i.onerror=r,i.readAsText(t,e)},fromBuffer:function(t,e){return new Gn(t.toString(e),!0)},fromPath:function(t,e,n){Zn.fromPath(t,e,n)},fromPathSync:function(t,e){return new Zn(t,e)}},Qn={arrayToString:Pt,stringToCharArray:function(t){let e=new Uint16Array(t.length);for(let n=0;n=0&&(this.fetchedEOF?this.index0)||this.fetch(e)>=e}fetch(t){if(this.fetchedEOF)return 0;for(let e=0;e=this.tokens.length&&(e=this.tokens.length-1);for(let i=t;i=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[e]}adjustSeekIndex(t){return t}lazyInit(){-1===this.index&&this.setup()}setup(){this.sync(0),this.index=this.adjustSeekIndex(0)}setTokenSource(t){this.tokenSource=t,this.tokens=[],this.index=-1,this.fetchedEOF=!1}nextTokenOnChannel(t,e){if(this.sync(t),t>=this.tokens.length)return-1;let n=this.tokens[t];for(;n.channel!==e;){if(n.type===St.EOF)return-1;t+=1,this.sync(t),n=this.tokens[t]}return t}previousTokenOnChannel(t,e){for(;t>=0&&this.tokens[t].channel!==e;)t-=1;return t}getHiddenTokensToRight(t,e){if(void 0===e&&(e=-1),this.lazyInit(),t<0||t>=this.tokens.length)throw t+" not in 0.."+this.tokens.length-1;const n=this.nextTokenOnChannel(t+1,sn.DEFAULT_TOKEN_CHANNEL),r=t+1,i=-1===n?this.tokens.length-1:n;return this.filterForChannel(r,i,e)}getHiddenTokensToLeft(t,e){if(void 0===e&&(e=-1),this.lazyInit(),t<0||t>=this.tokens.length)throw t+" not in 0.."+this.tokens.length-1;const n=this.previousTokenOnChannel(t-1,sn.DEFAULT_TOKEN_CHANNEL);if(n===t-1)return null;const r=n+1,i=t-1;return this.filterForChannel(r,i,e)}filterForChannel(t,e,n){const r=[];for(let i=t;i=this.tokens.length&&(n=this.tokens.length-1);let r="";for(let t=e;t=0&&this._parseListeners.splice(e,1),0===this._parseListeners.length&&(this._parseListeners=null)}}removeParseListeners(){this._parseListeners=null}triggerEnterRuleEvent(){if(null!==this._parseListeners){const t=this._ctx;this._parseListeners.forEach((function(e){e.enterEveryRule(t),t.enterRule(e)}))}}triggerExitRuleEvent(){if(null!==this._parseListeners){const t=this._ctx;this._parseListeners.slice(0).reverse().forEach((function(e){t.exitRule(e),e.exitEveryRule(t)}))}}getTokenFactory(){return this._input.tokenSource._factory}setTokenFactory(t){this._input.tokenSource._factory=t}getATNWithBypassAlts(){const t=this.getSerializedATN();if(null===t)throw"The current parser does not support an ATN with bypass alternatives.";let e=this.bypassAltsAtnCache[t];if(null===e){const n=new Be;n.generateRuleBypassTransitions=!0,e=new $e(n).deserialize(t),this.bypassAltsAtnCache[t]=e}return e}getInputStream(){return this.getTokenStream()}setInputStream(t){this.setTokenStream(t)}getTokenStream(){return this._input}setTokenStream(t){this._input=null,this.reset(),this._input=t}get syntaxErrorsCount(){return this._syntaxErrors}getCurrentToken(){return this._input.LT(1)}notifyErrorListeners(t,e,n){n=n||null,null===(e=e||null)&&(e=this.getCurrentToken()),this._syntaxErrors+=1;const r=e.line,i=e.column;this.getErrorListener().syntaxError(this,e,r,i,t,n)}consume(){const t=this.getCurrentToken();t.type!==St.EOF&&this.getInputStream().consume();const e=null!==this._parseListeners&&this._parseListeners.length>0;if(this.buildParseTrees||e){let n;n=this._errHandler.inErrorRecoveryMode(this)?this._ctx.addErrorNode(t):this._ctx.addTokenNode(t),n.invokingState=this.state,e&&this._parseListeners.forEach((function(t){n instanceof ne||void 0!==n.isErrorNode&&n.isErrorNode()?t.visitErrorNode(n):n instanceof ee&&t.visitTerminal(n)}))}return t}addContextToParseTree(){null!==this._ctx.parentCtx&&this._ctx.parentCtx.addChild(this._ctx)}enterRule(t,e,n){this.state=e,this._ctx=t,this._ctx.start=this._input.LT(1),this.buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}exitRule(){this._ctx.stop=this._input.LT(-1),this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx.parentCtx}enterOuterAlt(t,e){t.setAltNumber(e),this.buildParseTrees&&this._ctx!==t&&null!==this._ctx.parentCtx&&(this._ctx.parentCtx.removeLastChild(),this._ctx.parentCtx.addChild(t)),this._ctx=t}getPrecedence(){return 0===this._precedenceStack.length?-1:this._precedenceStack[this._precedenceStack.length-1]}enterRecursionRule(t,e,n,r){this.state=e,this._precedenceStack.push(r),this._ctx=t,this._ctx.start=this._input.LT(1),this.triggerEnterRuleEvent()}pushNewRecursionContext(t,e,n){const r=this._ctx;r.parentCtx=t,r.invokingState=e,r.stop=this._input.LT(-1),this._ctx=t,this._ctx.start=r.start,this.buildParseTrees&&this._ctx.addChild(r),this.triggerEnterRuleEvent()}unrollRecursionContexts(t){this._precedenceStack.pop(),this._ctx.stop=this._input.LT(-1);const e=this._ctx,n=this.getParseListeners();if(null!==n&&n.length>0)for(;this._ctx!==t;)this.triggerExitRuleEvent(),this._ctx=this._ctx.parentCtx;else this._ctx=t;e.parentCtx=t,this.buildParseTrees&&null!==t&&t.addChild(e)}getInvokingContext(t){let e=this._ctx;for(;null!==e;){if(e.ruleIndex===t)return e;e=e.parentCtx}return null}precpred(t,e){return e>=this._precedenceStack[this._precedenceStack.length-1]}inContext(t){return!1}isExpectedToken(t){const e=this._interp.atn;let n=this._ctx;const r=e.states[this.state];let i=e.nextTokens(r);if(i.contains(t))return!0;if(!i.contains(St.EPSILON))return!1;for(;null!==n&&n.invokingState>=0&&i.contains(St.EPSILON);){const r=e.states[n.invokingState].transitions[0];if(i=e.nextTokens(r.followState),i.contains(t))return!0;n=n.parentCtx}return!(!i.contains(St.EPSILON)||t!==St.EOF)}getExpectedTokens(){return this._interp.atn.getExpectedTokens(this.state,this._ctx)}getExpectedTokensWithinCurrentRule(){const t=this._interp.atn,e=t.states[this.state];return t.nextTokens(e)}getRuleIndex(t){const e=this.getRuleIndexMap()[t];return null!==e?e:-1}getRuleInvocationStack(t){null===(t=t||null)&&(t=this._ctx);const e=[];for(;null!==t;){const n=t.ruleIndex;n<0?e.push("n/a"):e.push(this.ruleNames[n]),t=t.parentCtx}return e}getDFAStrings(){return this._interp.decisionToDFA.toString()}dumpDFA(){let t=!1;for(let e=0;e0&&(t&&console.log(),this.printer.println("Decision "+n.decision+":"),this.printer.print(n.toString(this.literalNames,this.symbolicNames)),t=!0)}}getSourceName(){return this._input.getSourceName()}setTrace(t){t?(null!==this._tracer&&this.removeParseListener(this._tracer),this._tracer=new rr(this),this.addParseListener(this._tracer)):(this.removeParseListener(this._tracer),this._tracer=null)}}ir.bypassAltsAtnCache={};class or extends ee{constructor(t){super(),this.parentCtx=null,this.symbol=t}getChild(t){return null}getSymbol(){return this.symbol}getParent(){return this.parentCtx}getPayload(){return this.symbol}getSourceInterval(){if(null===this.symbol)return zt.INVALID_INTERVAL;const t=this.symbol.tokenIndex;return new zt(t,t)}getChildCount(){return 0}accept(t){return t.visitTerminal(this)}getText(){return this.symbol.text}toString(){return this.symbol.type===St.EOF?"":this.symbol.text}}class sr extends or{constructor(t){super(t)}isErrorNode(){return!0}accept(t){return t.visitErrorNode(this)}}class ar extends oe{constructor(t,e){super(t,e),this.children=null,this.start=null,this.stop=null,this.exception=null}copyFrom(t){this.parentCtx=t.parentCtx,this.invokingState=t.invokingState,this.children=null,this.start=t.start,this.stop=t.stop,t.children&&(this.children=[],t.children.map((function(t){t instanceof sr&&(this.children.push(t),t.parentCtx=this)}),this))}enterRule(t){}exitRule(t){}addChild(t){return null===this.children&&(this.children=[]),this.children.push(t),t}removeLastChild(){null!==this.children&&this.children.pop()}addTokenNode(t){const e=new or(t);return this.addChild(e),e.parentCtx=this,e}addErrorNode(t){const e=new sr(t);return this.addChild(e),e.parentCtx=this,e}getChild(t,e){if(e=e||null,null===this.children||t<0||t>=this.children.length)return null;if(null===e)return this.children[t];for(let n=0;n=this.children.length)return null;for(let n=0;n2&&void 0!==arguments[2]?arguments[2]:cr.DEFAULT_PROGRAM_NAME;n="number"==typeof t?t:t.tokenIndex;let i=this.getProgram(r),o=new hr(this.tokens,n,i.length,e);i.push(o)}insertBefore(t,e){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:cr.DEFAULT_PROGRAM_NAME;n="number"==typeof t?t:t.tokenIndex;const i=this.getProgram(r),o=new lr(this.tokens,n,i.length,e);i.push(o)}replaceSingle(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:cr.DEFAULT_PROGRAM_NAME;this.replace(t,t,e,n)}replace(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:cr.DEFAULT_PROGRAM_NAME;if("number"!=typeof t&&(t=t.tokenIndex),"number"!=typeof e&&(e=e.tokenIndex),t>e||t<0||e<0||e>=this.tokens.size)throw new RangeError(`replace: range invalid: ${t}..${e}(size=${this.tokens.size})`);let i=this.getProgram(r),o=new fr(this.tokens,t,e,i.length,n);i.push(o)}delete(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:cr.DEFAULT_PROGRAM_NAME;void 0===e&&(e=t),this.replace(t,e,null,n)}getProgram(t){let e=this.programs.get(t);return null==e&&(e=this.initializeProgram(t)),e}initializeProgram(t){const e=[];return this.programs.set(t,e),e}getText(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cr.DEFAULT_PROGRAM_NAME;e=t instanceof zt?t:new zt(0,this.tokens.size-1),"string"==typeof t&&(n=t);const r=this.programs.get(n);let i=e.start,o=e.stop;if(o>this.tokens.size-1&&(o=this.tokens.size-1),i<0&&(i=0),null==r||0===r.length)return this.tokens.getText(new zt(i,o));let s=[],a=this.reduceToSingleOperationPerIndex(r),c=i;for(;c<=o&&c=this.tokens.size-1&&s.push(t.text.toString());return s.join("")}reduceToSingleOperationPerIndex(t){for(let e=0;er.index&&e.index<=r.lastIndex&&(t[e.instructionIndex]=void 0);let o=this.getKindOfOps(t,fr,e);for(let e of o){if(e.index>=r.index&&e.lastIndex<=r.lastIndex){t[e.instructionIndex]=void 0;continue}let n=e.lastIndexr.lastIndex;if(null!=e.text||null!=r.text||n){if(!n)throw new Error(`replace op boundaries of ${r} overlap with previous ${e}`)}else t[e.instructionIndex]=void 0,r.index=Math.min(e.index,r.index),r.lastIndex=Math.max(e.lastIndex,r.lastIndex)}}for(let e=0;e=n.index&&r.index<=n.lastIndex)throw new Error(`insert op ${r} within boundaries of previous ${n}`)}else n.text=this.catOpText(r.text,n.text),t[e]=void 0}let e=new Map;for(let n of t)if(null!=n){if(null!=e.get(n.index))throw new Error("should only be one op per index");e.set(n.index,n)}return e}catOpText(t,e){let n="",r="";return null!=t&&(n=t.toString()),null!=e&&(r=e.toString()),n+r}getKindOfOps(t,e,n){return t.slice(0,n).filter((t=>t&&t instanceof e))}}class ur{constructor(t,e,n,r){this.tokens=t,this.instructionIndex=n,this.index=e,this.text=void 0===r?"":r}toString(){let t=this.constructor.name;const e=t.indexOf("$");return t=t.substring(e+1,t.length),"<"+t+"@"+this.tokens.get(this.index)+':"'+this.text+'">'}}class lr extends ur{constructor(t,e,n,r){super(t,e,n,r)}execute(t){return this.text&&t.push(this.text.toString()),this.tokens.get(this.index).type!==St.EOF&&t.push(String(this.tokens.get(this.index).text)),this.index+1}}class hr extends lr{constructor(t,e,n,r){super(t,e+1,n,r)}}class fr extends ur{constructor(t,e,n,r,i){super(t,e,r,i),this.lastIndex=n}execute(t){return this.text&&t.push(this.text.toString()),this.lastIndex+1}toString(){return null==this.text?"":"'}}const pr={atn:An,dfa:Ln,context:Rn,misc:Pn,tree:jn,error:Wn,Token:St,CommonToken:tn,CharStreams:Jn,CharStream:Gn,InputStream:Yn,CommonTokenStream:nr,Lexer:sn,Parser:ir,ParserRuleContext:ar,Interval:zt,IntervalSet:Vt,LL1Analyzer:me,Utils:Qn,TokenStreamRewriter:cr};var dr=Tt.Ay;function mr(t){return mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mr(t)}function yr(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{defaultValue:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=vr(this,e,[n]);var r=n.defaultValue,i=n.description,o=n.sensitive,s=n.nullable;return t.__class="TerraformVariable",t.defaultValue=r||null,t.description=i||null,t.sensitive=o||!1,t.nullable=s||!1,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wr(t,e)}(e,t),function(t,e){return e&&yr(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"formattedName",get:function(){var t="variable"===this.category?"var":"local";return"output"===this.category?null:"".concat(t,".").concat(this.name)}}])}(t.Variable);const kr=xr;function Tr(t){return Tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tr(t)}function Sr(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{isDynamic:!1};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=Ar(this,e,[n])).isDynamic=n.isDynamic||!1,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Cr(t,e)}(e,t),function(t,e){return e&&Sr(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"isVariable",get:function(){return null!==this.value&&"string"==typeof this.value&&(this.value.startsWith("var.")||this.value.startsWith("local."))}}])}(t.ComponentAttribute);const Rr=Lr;function Pr(t){return Pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pr(t)}function Ir(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[];return this.validateExternalId(t),function(t,e,n){var r=Br(Fr(t.prototype),"getErrors",n);return function(t){return r.apply(n,t)}}(n,0,this)([t])}},{key:"validateDefinition",value:function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=this.definition)&&void 0!==e&&e.isUnknown&&n.push(new t.ParserLog({componentId:this.id,severity:t.ParserLog.SEVERITY_WARNING,message:"parser.warning.noComponentDefinition"})),n}},{key:"validateExternalId",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==this.externalId&&0!==this.externalId.length||e.push(new t.ParserLog({componentId:this.id,severity:t.ParserLog.SEVERITY_ERROR,message:"terrator-plugin.parser.error.noExternalId"})),e}}])}(t.Component);const Vr=zr;function Kr(t){return Kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kr(t)}function Hr(t,e){for(var n=0;n0){var t=this.fieldsTree.pop();t.value.push(this.currentObjectField),this.currentObjectField=t}else this.currentComponent.attributes.push(this.currentObjectField),this.currentObjectField=null}},{key:"enterBlocktype",value:function(){}},{key:"exitBlocktype",value:function(){}},{key:"enterResourcetype",value:function(t){var e=this,n=Xr(t);if(this.currentComponent.definition=this.definitions.find((function(t){return t.blockType===e.currentBlockType&&t.type===n}))||this.getUnknownDefinition(n),this.currentComponent.validateDefinition().forEach((function(n){return e.addError(t,n)})),"provider"===this.currentBlockType){var r="".concat(n,".").concat(n);this.currentComponent.externalId=n,this.currentComponent.id=this.createIdFromTypeExternalId(r)}}},{key:"exitResourcetype",value:function(){}},{key:"enterName",value:function(){}},{key:"exitName",value:function(t){var e=this;if(this.currentComponent){this.currentComponent.externalId=Xr(t),this.currentComponent.validateExternalId().forEach((function(n){return e.addError(t,n)}));var n="".concat(this.currentComponent.definition.type,".").concat(this.currentComponent.externalId);this.currentComponent.id=this.createIdFromTypeExternalId(n)}else this.currentVariable&&(this.currentVariable.name=Xr(t))}},{key:"enterLabel",value:function(){}},{key:"exitLabel",value:function(){}},{key:"enterBlockbody",value:function(){}},{key:"exitBlockbody",value:function(){}},{key:"enterArgument",value:function(t){var e,n=null;if(this.isVariable()||"local"===this.currentBlockType||(n=this.getAttributeDefinition(this.currentObjectField||this.currentComponent,t.identifier().getText())),null!==(e=t.expression())&&void 0!==e&&null!==(e=e.section())&&void 0!==e&&e.map_()){this.currentObjectField&&this.fieldsTree.push(this.currentObjectField);var r=t.identifier().getText();this.currentObjectField=new Rr({name:r,type:"Object",value:[],definition:n})}this.isVariable()?(this.currentVariableField=t.identifier().getText(),"default"===this.currentVariableField&&(this.currentVariableField="defaultValue")):"local"===this.currentBlockType?(this.currentVariable=new kr({category:"local",name:Xr(t.identifier())}),this.currentVariableField="value"):this.currentField=new Rr({name:t.identifier().getText()}),this.currentField&&(this.currentField.definition=n)}},{key:"exitArgument",value:function(t){var e,n=this;if(this.isVariable()){var r=t.identifier().getText();"description"===r?this.currentVariable.description=Xr(t.expression()):"sensitive"!==r&&"nullable"!==r||(this.currentVariable[r]="true"===Xr(t.expression()))}else if("local"===this.currentBlockType)this.addVariable();else if(this.currentField)this.currentField.name=t.identifier().getText(),this.currentObjectField?this.currentObjectField.value.push(this.currentField):this.currentComponent.attributes.push(this.currentField);else if(this.currentObjectField.name=t.identifier().getText(),this.fieldsTree.length>0){var i=this.fieldsTree.pop();i.value.push(this.currentObjectField),this.currentObjectField=i}else this.currentComponent.attributes.push(this.currentObjectField),this.currentObjectField=null;"Reference"===(null===(e=this.currentField)||void 0===e||null===(e=e.definition)||void 0===e?void 0:e.type)&&/([^.]+\.[^.]+)/.exec(this.currentField.value)&&(Array.isArray(this.currentField.value)?this.currentField.value=this.currentField.value.map((function(t){var e=/([^.]+\.[^.]+)\.([^.]+)/.exec(t);return n.createIdFromTypeExternalId(e[1])})):this.currentField.value=this.createIdFromTypeExternalId(this.currentField.value)),this.currentField=null}},{key:"createIdFromTypeExternalId",value:function(t){if(this.ids.has(t))return this.ids.get(t);var e="id_".concat(this.idCounter);return this.idCounter+=1,this.ids.set(t,e),e}},{key:"enterIdentifier",value:function(){}},{key:"exitIdentifier",value:function(){}},{key:"enterIdentifierchain",value:function(){}},{key:"exitIdentifierchain",value:function(){}},{key:"enterInline_index",value:function(){}},{key:"exitInline_index",value:function(){}},{key:"enterExpression",value:function(){}},{key:"exitExpression",value:function(){}},{key:"enterForloop",value:function(){}},{key:"exitForloop",value:function(){}},{key:"enterSection",value:function(t){var e;if(!this.currentField&&!this.isVariable()&&null!==(e=t.val())&&void 0!==e&&e.identifier()){var n=Xr(t.val());this.currentField=new Rr({type:"String",value:"null"===n?null:n})}}},{key:"exitSection",value:function(){}},{key:"enterVal",value:function(){}},{key:"getFieldValueTypeFromContext",value:function(t){if(t.BOOL())return{value:"true"===t.BOOL().getText(),type:"Boolean"};if(t.signed_number())return{value:parseFloat(t.signed_number().getText()),type:"Number"};var e=Xr(t);return{value:"null"===e?null:e,type:"String"}}},{key:"exitVal",value:function(e){var n,r=this,i=this.getFieldValueTypeFromContext(e),o=i.value,s=i.type;if(this.isVariable()||"local"===this.currentBlockType){var a=this.attributeTypeToVariableType(s);Array.isArray(this.currentVariable[this.currentVariableField])?(this.currentVariable[this.currentVariableField].push(o),"defaultValue"!==this.currentVariableField&&"value"!==this.currentVariableField||(this.currentVariable.type="list(".concat(a,")"))):(this.currentVariable[this.currentVariableField]=o,"defaultValue"!==this.currentVariableField&&"value"!==this.currentVariableField||(this.currentVariable.type=a))}else{if("Link"===(null===(n=this.currentField.definition)||void 0===n?void 0:n.type)){this.currentField.type="Array";var c=/([^.]+\.[^.]+)\.([^.]+)/.exec(o);this.currentField.value||(this.currentField.value=[]),c?this.currentField.value.push(this.createIdFromTypeExternalId(c[1])):this.addError(e,new t.ParserLog({attribute:this.currentField.name,severity:t.ParserLog.SEVERITY_ERROR,message:"terrator-plugin.parser.error.badExternalId",extraData:o}))}else"Array"===this.currentField.type?this.currentField.value.push(o):(this.currentField.value=o,this.currentField.type=s);this.currentField.getErrors().forEach((function(t){return r.addError(e,t)}))}}},{key:"enterFunctioncall",value:function(){}},{key:"exitFunctioncall",value:function(){}},{key:"enterFunctionname",value:function(){}},{key:"exitFunctionname",value:function(){}},{key:"enterFunctionarguments",value:function(){}},{key:"exitFunctionarguments",value:function(){}},{key:"enterIndex",value:function(){}},{key:"exitIndex",value:function(){}},{key:"enterFiledecl",value:function(){}},{key:"exitFiledecl",value:function(){}},{key:"enterList_",value:function(){this.currentField||(this.currentField=new Rr({type:"Array",value:[]})),this.currentField.type="Array",this.currentField.value||(this.currentField.value=[]),this.isVariable()?this.currentVariable[this.currentVariableField]=[]:"local"===this.currentBlockType&&(this.currentVariable.value=[])}},{key:"exitList_",value:function(){this.currentField&&(this.currentField.type="Array")}},{key:"enterMap_",value:function(){}},{key:"exitMap_",value:function(){}},{key:"enterString",value:function(){}},{key:"exitString",value:function(){}},{key:"enterNumber",value:function(){}},{key:"exitNumber",value:function(){}},{key:"enterSigned_number",value:function(){}},{key:"exitSigned_number",value:function(){}}])}(dr.tree.ParseTreeListener);const Jr=Zr;function Qr(t){return Qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qr(t)}function ti(t,e,n){return e=ni(e),function(t,e){if(e&&("object"==Qr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ei()?Reflect.construct(e,n||[],ni(t).constructor):e.apply(t,n))}function ei(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ei=function(){return!!t})()}function ni(t){return ni=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ni(t)}function ri(t,e){return ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ri(t,e)}function ii(t,e,n){return(e=oi(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oi(t){var e=function(t){if("object"!=Qr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Qr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qr(e)?e:e+""}var si=(new dr.atn.ATNDeserializer).deserialize([4,0,49,390,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,9,1,9,1,10,1,10,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,13,1,13,1,14,1,14,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,17,1,17,1,18,1,18,1,19,1,19,1,20,1,20,1,21,1,21,1,22,1,22,1,22,1,23,1,23,1,24,1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,26,1,27,1,27,1,27,1,28,1,28,1,28,1,29,1,29,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,32,1,32,1,32,1,33,1,33,1,34,1,34,1,35,1,35,1,36,1,36,1,37,1,37,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,39,1,39,5,39,261,8,39,10,39,12,39,264,9,39,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,41,4,41,275,8,41,11,41,12,41,276,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,3,42,288,8,42,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,5,43,305,8,43,10,43,12,43,308,9,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,5,44,330,8,44,10,44,12,44,333,9,44,1,44,1,44,1,44,1,44,1,45,1,45,1,45,1,45,5,45,343,8,45,10,45,12,45,346,9,45,1,45,1,45,1,46,1,46,5,46,352,8,46,10,46,12,46,355,9,46,1,47,1,47,1,47,3,47,360,8,47,1,47,5,47,363,8,47,10,47,12,47,366,9,47,1,47,1,47,1,48,1,48,1,48,1,48,5,48,374,8,48,10,48,12,48,377,9,48,1,48,1,48,1,48,1,48,1,48,1,49,4,49,385,8,49,11,49,12,49,386,1,49,1,49,4,262,306,331,375,0,50,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,0,61,30,63,31,65,32,67,33,69,34,71,35,73,36,75,37,77,38,79,39,81,40,83,41,85,42,87,43,89,44,91,45,93,46,95,47,97,48,99,49,1,0,6,1,0,48,57,3,0,10,10,13,13,34,34,2,0,65,90,97,122,5,0,45,45,48,57,65,90,95,95,97,122,2,0,10,10,13,13,3,0,9,10,13,13,32,32,400,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,1,101,1,0,0,0,3,111,1,0,0,0,5,120,1,0,0,0,7,125,1,0,0,0,9,132,1,0,0,0,11,139,1,0,0,0,13,146,1,0,0,0,15,148,1,0,0,0,17,154,1,0,0,0,19,158,1,0,0,0,21,160,1,0,0,0,23,162,1,0,0,0,25,166,1,0,0,0,27,177,1,0,0,0,29,179,1,0,0,0,31,181,1,0,0,0,33,183,1,0,0,0,35,188,1,0,0,0,37,190,1,0,0,0,39,192,1,0,0,0,41,194,1,0,0,0,43,196,1,0,0,0,45,198,1,0,0,0,47,201,1,0,0,0,49,203,1,0,0,0,51,206,1,0,0,0,53,209,1,0,0,0,55,212,1,0,0,0,57,215,1,0,0,0,59,218,1,0,0,0,61,220,1,0,0,0,63,229,1,0,0,0,65,238,1,0,0,0,67,241,1,0,0,0,69,243,1,0,0,0,71,245,1,0,0,0,73,247,1,0,0,0,75,249,1,0,0,0,77,251,1,0,0,0,79,253,1,0,0,0,81,269,1,0,0,0,83,274,1,0,0,0,85,287,1,0,0,0,87,289,1,0,0,0,89,321,1,0,0,0,91,338,1,0,0,0,93,349,1,0,0,0,95,359,1,0,0,0,97,369,1,0,0,0,99,384,1,0,0,0,101,102,5,116,0,0,102,103,5,101,0,0,103,104,5,114,0,0,104,105,5,114,0,0,105,106,5,97,0,0,106,107,5,102,0,0,107,108,5,111,0,0,108,109,5,114,0,0,109,110,5,109,0,0,110,2,1,0,0,0,111,112,5,114,0,0,112,113,5,101,0,0,113,114,5,115,0,0,114,115,5,111,0,0,115,116,5,117,0,0,116,117,5,114,0,0,117,118,5,99,0,0,118,119,5,101,0,0,119,4,1,0,0,0,120,121,5,100,0,0,121,122,5,97,0,0,122,123,5,116,0,0,123,124,5,97,0,0,124,6,1,0,0,0,125,126,5,111,0,0,126,127,5,117,0,0,127,128,5,116,0,0,128,129,5,112,0,0,129,130,5,117,0,0,130,131,5,116,0,0,131,8,1,0,0,0,132,133,5,108,0,0,133,134,5,111,0,0,134,135,5,99,0,0,135,136,5,97,0,0,136,137,5,108,0,0,137,138,5,115,0,0,138,10,1,0,0,0,139,140,5,109,0,0,140,141,5,111,0,0,141,142,5,100,0,0,142,143,5,117,0,0,143,144,5,108,0,0,144,145,5,101,0,0,145,12,1,0,0,0,146,147,5,61,0,0,147,14,1,0,0,0,148,149,5,108,0,0,149,150,5,111,0,0,150,151,5,99,0,0,151,152,5,97,0,0,152,153,5,108,0,0,153,16,1,0,0,0,154,155,5,118,0,0,155,156,5,97,0,0,156,157,5,114,0,0,157,18,1,0,0,0,158,159,5,63,0,0,159,20,1,0,0,0,160,161,5,58,0,0,161,22,1,0,0,0,162,163,5,102,0,0,163,164,5,111,0,0,164,165,5,114,0,0,165,24,1,0,0,0,166,167,5,106,0,0,167,168,5,115,0,0,168,169,5,111,0,0,169,170,5,110,0,0,170,171,5,101,0,0,171,172,5,110,0,0,172,173,5,99,0,0,173,174,5,111,0,0,174,175,5,100,0,0,175,176,5,101,0,0,176,26,1,0,0,0,177,178,5,44,0,0,178,28,1,0,0,0,179,180,5,91,0,0,180,30,1,0,0,0,181,182,5,93,0,0,182,32,1,0,0,0,183,184,5,102,0,0,184,185,5,105,0,0,185,186,5,108,0,0,186,187,5,101,0,0,187,34,1,0,0,0,188,189,5,43,0,0,189,36,1,0,0,0,190,191,5,45,0,0,191,38,1,0,0,0,192,193,5,47,0,0,193,40,1,0,0,0,194,195,5,37,0,0,195,42,1,0,0,0,196,197,5,62,0,0,197,44,1,0,0,0,198,199,5,62,0,0,199,200,5,61,0,0,200,46,1,0,0,0,201,202,5,60,0,0,202,48,1,0,0,0,203,204,5,60,0,0,204,205,5,61,0,0,205,50,1,0,0,0,206,207,5,61,0,0,207,208,5,61,0,0,208,52,1,0,0,0,209,210,5,33,0,0,210,211,5,61,0,0,211,54,1,0,0,0,212,213,5,38,0,0,213,214,5,38,0,0,214,56,1,0,0,0,215,216,5,124,0,0,216,217,5,124,0,0,217,58,1,0,0,0,218,219,7,0,0,0,219,60,1,0,0,0,220,221,5,118,0,0,221,222,5,97,0,0,222,223,5,114,0,0,223,224,5,105,0,0,224,225,5,97,0,0,225,226,5,98,0,0,226,227,5,108,0,0,227,228,5,101,0,0,228,62,1,0,0,0,229,230,5,112,0,0,230,231,5,114,0,0,231,232,5,111,0,0,232,233,5,118,0,0,233,234,5,105,0,0,234,235,5,100,0,0,235,236,5,101,0,0,236,237,5,114,0,0,237,64,1,0,0,0,238,239,5,105,0,0,239,240,5,110,0,0,240,66,1,0,0,0,241,242,5,42,0,0,242,68,1,0,0,0,243,244,5,46,0,0,244,70,1,0,0,0,245,246,5,123,0,0,246,72,1,0,0,0,247,248,5,125,0,0,248,74,1,0,0,0,249,250,5,40,0,0,250,76,1,0,0,0,251,252,5,41,0,0,252,78,1,0,0,0,253,254,5,60,0,0,254,255,5,60,0,0,255,256,5,69,0,0,256,257,5,79,0,0,257,258,5,70,0,0,258,262,1,0,0,0,259,261,9,0,0,0,260,259,1,0,0,0,261,264,1,0,0,0,262,263,1,0,0,0,262,260,1,0,0,0,263,265,1,0,0,0,264,262,1,0,0,0,265,266,5,69,0,0,266,267,5,79,0,0,267,268,5,70,0,0,268,80,1,0,0,0,269,270,5,110,0,0,270,271,5,117,0,0,271,272,5,108,0,0,272,82,1,0,0,0,273,275,3,59,29,0,274,273,1,0,0,0,275,276,1,0,0,0,276,274,1,0,0,0,276,277,1,0,0,0,277,84,1,0,0,0,278,279,5,116,0,0,279,280,5,114,0,0,280,281,5,117,0,0,281,288,5,101,0,0,282,283,5,102,0,0,283,284,5,97,0,0,284,285,5,108,0,0,285,286,5,115,0,0,286,288,5,101,0,0,287,278,1,0,0,0,287,282,1,0,0,0,288,86,1,0,0,0,289,290,5,60,0,0,290,291,5,60,0,0,291,292,5,68,0,0,292,293,5,69,0,0,293,294,5,83,0,0,294,295,5,67,0,0,295,296,5,82,0,0,296,297,5,73,0,0,297,298,5,80,0,0,298,299,5,84,0,0,299,300,5,73,0,0,300,301,5,79,0,0,301,302,5,78,0,0,302,306,1,0,0,0,303,305,9,0,0,0,304,303,1,0,0,0,305,308,1,0,0,0,306,307,1,0,0,0,306,304,1,0,0,0,307,309,1,0,0,0,308,306,1,0,0,0,309,310,5,68,0,0,310,311,5,69,0,0,311,312,5,83,0,0,312,313,5,67,0,0,313,314,5,82,0,0,314,315,5,73,0,0,315,316,5,80,0,0,316,317,5,84,0,0,317,318,5,73,0,0,318,319,5,79,0,0,319,320,5,78,0,0,320,88,1,0,0,0,321,322,5,60,0,0,322,323,5,60,0,0,323,324,5,45,0,0,324,325,5,69,0,0,325,326,5,79,0,0,326,327,5,70,0,0,327,331,1,0,0,0,328,330,9,0,0,0,329,328,1,0,0,0,330,333,1,0,0,0,331,332,1,0,0,0,331,329,1,0,0,0,332,334,1,0,0,0,333,331,1,0,0,0,334,335,5,69,0,0,335,336,5,79,0,0,336,337,5,70,0,0,337,90,1,0,0,0,338,344,5,34,0,0,339,340,5,92,0,0,340,343,5,34,0,0,341,343,8,1,0,0,342,339,1,0,0,0,342,341,1,0,0,0,343,346,1,0,0,0,344,342,1,0,0,0,344,345,1,0,0,0,345,347,1,0,0,0,346,344,1,0,0,0,347,348,5,34,0,0,348,92,1,0,0,0,349,353,7,2,0,0,350,352,7,3,0,0,351,350,1,0,0,0,352,355,1,0,0,0,353,351,1,0,0,0,353,354,1,0,0,0,354,94,1,0,0,0,355,353,1,0,0,0,356,360,5,35,0,0,357,358,5,47,0,0,358,360,5,47,0,0,359,356,1,0,0,0,359,357,1,0,0,0,360,364,1,0,0,0,361,363,8,4,0,0,362,361,1,0,0,0,363,366,1,0,0,0,364,362,1,0,0,0,364,365,1,0,0,0,365,367,1,0,0,0,366,364,1,0,0,0,367,368,6,47,0,0,368,96,1,0,0,0,369,370,5,47,0,0,370,371,5,42,0,0,371,375,1,0,0,0,372,374,9,0,0,0,373,372,1,0,0,0,374,377,1,0,0,0,375,376,1,0,0,0,375,373,1,0,0,0,376,378,1,0,0,0,377,375,1,0,0,0,378,379,5,42,0,0,379,380,5,47,0,0,380,381,1,0,0,0,381,382,6,48,0,0,382,98,1,0,0,0,383,385,7,5,0,0,384,383,1,0,0,0,385,386,1,0,0,0,386,384,1,0,0,0,386,387,1,0,0,0,387,388,1,0,0,0,388,389,6,49,1,0,389,100,1,0,0,0,13,0,262,276,287,306,331,342,344,353,359,364,375,386,2,0,1,0,6,0,0]),ai=si.decisionToState.map((function(t,e){return new dr.dfa.DFA(t,e)})),ci=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=ti(this,e,[t]))._interp=new dr.atn.LexerATNSimulator(n,si,ai,new dr.atn.PredictionContextCache),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ri(t,e)}(e,t),function(t){return Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(dr.Lexer);function ui(t){return ui="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ui(t)}function li(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hi(t,e){for(var n=0;n'","'>='","'<'","'<='","'=='","'!='","'&&'","'||'","'variable'","'provider'","'in'","'*'","'.'","'{'","'}'","'('","')'",null,"'nul'"]),ii(ci,"symbolicNames",[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"VARIABLE","PROVIDER","IN","STAR","DOT","LCURL","RCURL","LPAREN","RPAREN","EOF_","NULL_","NATURAL_NUMBER","BOOL","DESCRIPTION","MULTILINESTRING","STRING","IDENTIFIER","COMMENT","BLOCKCOMMENT","WS"]),ii(ci,"ruleNames",["T__0","T__1","T__2","T__3","T__4","T__5","T__6","T__7","T__8","T__9","T__10","T__11","T__12","T__13","T__14","T__15","T__16","T__17","T__18","T__19","T__20","T__21","T__22","T__23","T__24","T__25","T__26","T__27","T__28","DIGIT","VARIABLE","PROVIDER","IN","STAR","DOT","LCURL","RCURL","LPAREN","RPAREN","EOF_","NULL_","NATURAL_NUMBER","BOOL","DESCRIPTION","MULTILINESTRING","STRING","IDENTIFIER","COMMENT","BLOCKCOMMENT","WS"]),ci.EOF=dr.Token.EOF,ci.T__0=1,ci.T__1=2,ci.T__2=3,ci.T__3=4,ci.T__4=5,ci.T__5=6,ci.T__6=7,ci.T__7=8,ci.T__8=9,ci.T__9=10,ci.T__10=11,ci.T__11=12,ci.T__12=13,ci.T__13=14,ci.T__14=15,ci.T__15=16,ci.T__16=17,ci.T__17=18,ci.T__18=19,ci.T__19=20,ci.T__20=21,ci.T__21=22,ci.T__22=23,ci.T__23=24,ci.T__24=25,ci.T__25=26,ci.T__26=27,ci.T__27=28,ci.T__28=29,ci.VARIABLE=30,ci.PROVIDER=31,ci.IN=32,ci.STAR=33,ci.DOT=34,ci.LCURL=35,ci.RCURL=36,ci.LPAREN=37,ci.RPAREN=38,ci.EOF_=39,ci.NULL_=40,ci.NATURAL_NUMBER=41,ci.BOOL=42,ci.DESCRIPTION=43,ci.MULTILINESTRING=44,ci.STRING=45,ci.IDENTIFIER=46,ci.COMMENT=47,ci.BLOCKCOMMENT=48,ci.WS=49;var _i=(new dr.atn.ATNDeserializer).deserialize([4,1,49,310,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,4,0,77,8,0,11,0,12,0,78,1,0,1,0,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,9,1,9,5,9,117,8,9,10,9,12,9,120,9,9,1,9,1,9,1,10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,1,14,5,14,135,8,14,10,14,12,14,138,9,14,1,14,1,14,1,15,1,15,1,15,1,15,1,16,1,16,3,16,148,8,16,1,16,1,16,1,17,1,17,3,17,154,8,17,1,17,1,17,5,17,158,8,17,10,17,12,17,161,9,17,1,17,1,17,1,17,5,17,166,8,17,10,17,12,17,169,9,17,1,17,1,17,1,17,5,17,174,8,17,10,17,12,17,177,9,17,3,17,179,8,17,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,19,3,19,190,8,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,5,19,202,8,19,10,19,12,19,205,9,19,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,21,1,21,1,21,3,21,217,8,21,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,3,22,228,8,22,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,5,23,238,8,23,10,23,12,23,241,9,23,1,23,3,23,244,8,23,1,24,1,24,1,25,1,25,1,25,1,25,5,25,252,8,25,10,25,12,25,255,9,25,3,25,257,8,25,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28,5,28,272,8,28,10,28,12,28,275,9,28,1,28,3,28,278,8,28,3,28,280,8,28,1,28,1,28,1,29,1,29,1,29,3,29,287,8,29,5,29,289,8,29,10,29,12,29,292,9,29,1,29,1,29,1,30,1,30,1,31,3,31,299,8,31,1,31,1,31,1,32,1,32,1,33,1,33,1,33,3,33,308,8,33,1,33,1,239,1,38,34,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,0,5,3,0,3,3,6,6,8,9,2,0,30,32,46,46,1,0,44,45,1,0,18,19,2,0,18,29,33,33,318,0,76,1,0,0,0,2,82,1,0,0,0,4,85,1,0,0,0,6,90,1,0,0,0,8,95,1,0,0,0,10,99,1,0,0,0,12,103,1,0,0,0,14,106,1,0,0,0,16,110,1,0,0,0,18,114,1,0,0,0,20,123,1,0,0,0,22,125,1,0,0,0,24,127,1,0,0,0,26,129,1,0,0,0,28,131,1,0,0,0,30,141,1,0,0,0,32,147,1,0,0,0,34,178,1,0,0,0,36,180,1,0,0,0,38,189,1,0,0,0,40,206,1,0,0,0,42,216,1,0,0,0,44,227,1,0,0,0,46,243,1,0,0,0,48,245,1,0,0,0,50,256,1,0,0,0,52,258,1,0,0,0,54,262,1,0,0,0,56,267,1,0,0,0,58,283,1,0,0,0,60,295,1,0,0,0,62,298,1,0,0,0,64,302,1,0,0,0,66,304,1,0,0,0,68,77,3,12,6,0,69,77,3,14,7,0,70,77,3,10,5,0,71,77,3,8,4,0,72,77,3,16,8,0,73,77,3,6,3,0,74,77,3,4,2,0,75,77,3,2,1,0,76,68,1,0,0,0,76,69,1,0,0,0,76,70,1,0,0,0,76,71,1,0,0,0,76,72,1,0,0,0,76,73,1,0,0,0,76,74,1,0,0,0,76,75,1,0,0,0,77,78,1,0,0,0,78,76,1,0,0,0,78,79,1,0,0,0,79,80,1,0,0,0,80,81,5,0,0,1,81,1,1,0,0,0,82,83,5,1,0,0,83,84,3,28,14,0,84,3,1,0,0,0,85,86,5,2,0,0,86,87,3,22,11,0,87,88,3,24,12,0,88,89,3,28,14,0,89,5,1,0,0,0,90,91,5,3,0,0,91,92,3,22,11,0,92,93,3,24,12,0,93,94,3,28,14,0,94,7,1,0,0,0,95,96,5,31,0,0,96,97,3,22,11,0,97,98,3,28,14,0,98,9,1,0,0,0,99,100,5,4,0,0,100,101,3,24,12,0,101,102,3,28,14,0,102,11,1,0,0,0,103,104,5,5,0,0,104,105,3,28,14,0,105,13,1,0,0,0,106,107,5,6,0,0,107,108,3,24,12,0,108,109,3,28,14,0,109,15,1,0,0,0,110,111,5,30,0,0,111,112,3,24,12,0,112,113,3,28,14,0,113,17,1,0,0,0,114,118,3,20,10,0,115,117,3,26,13,0,116,115,1,0,0,0,117,120,1,0,0,0,118,116,1,0,0,0,118,119,1,0,0,0,119,121,1,0,0,0,120,118,1,0,0,0,121,122,3,28,14,0,122,19,1,0,0,0,123,124,5,46,0,0,124,21,1,0,0,0,125,126,5,45,0,0,126,23,1,0,0,0,127,128,5,45,0,0,128,25,1,0,0,0,129,130,5,45,0,0,130,27,1,0,0,0,131,136,5,35,0,0,132,135,3,30,15,0,133,135,3,18,9,0,134,132,1,0,0,0,134,133,1,0,0,0,135,138,1,0,0,0,136,134,1,0,0,0,136,137,1,0,0,0,137,139,1,0,0,0,138,136,1,0,0,0,139,140,5,36,0,0,140,29,1,0,0,0,141,142,3,32,16,0,142,143,5,7,0,0,143,144,3,38,19,0,144,31,1,0,0,0,145,146,7,0,0,0,146,148,5,34,0,0,147,145,1,0,0,0,147,148,1,0,0,0,148,149,1,0,0,0,149,150,3,34,17,0,150,33,1,0,0,0,151,153,7,1,0,0,152,154,3,52,26,0,153,152,1,0,0,0,153,154,1,0,0,0,154,159,1,0,0,0,155,156,5,34,0,0,156,158,3,34,17,0,157,155,1,0,0,0,158,161,1,0,0,0,159,157,1,0,0,0,159,160,1,0,0,0,160,179,1,0,0,0,161,159,1,0,0,0,162,167,5,33,0,0,163,164,5,34,0,0,164,166,3,34,17,0,165,163,1,0,0,0,166,169,1,0,0,0,167,165,1,0,0,0,167,168,1,0,0,0,168,179,1,0,0,0,169,167,1,0,0,0,170,175,3,36,18,0,171,172,5,34,0,0,172,174,3,34,17,0,173,171,1,0,0,0,174,177,1,0,0,0,175,173,1,0,0,0,175,176,1,0,0,0,176,179,1,0,0,0,177,175,1,0,0,0,178,151,1,0,0,0,178,162,1,0,0,0,178,170,1,0,0,0,179,35,1,0,0,0,180,181,5,41,0,0,181,37,1,0,0,0,182,183,6,19,-1,0,183,190,3,42,21,0,184,185,5,37,0,0,185,186,3,38,19,0,186,187,5,38,0,0,187,190,1,0,0,0,188,190,3,40,20,0,189,182,1,0,0,0,189,184,1,0,0,0,189,188,1,0,0,0,190,203,1,0,0,0,191,192,10,4,0,0,192,193,3,64,32,0,193,194,3,38,19,5,194,202,1,0,0,0,195,196,10,2,0,0,196,197,5,10,0,0,197,198,3,38,19,0,198,199,5,11,0,0,199,200,3,38,19,3,200,202,1,0,0,0,201,191,1,0,0,0,201,195,1,0,0,0,202,205,1,0,0,0,203,201,1,0,0,0,203,204,1,0,0,0,204,39,1,0,0,0,205,203,1,0,0,0,206,207,5,12,0,0,207,208,3,32,16,0,208,209,5,32,0,0,209,210,3,38,19,0,210,211,5,11,0,0,211,212,3,38,19,0,212,41,1,0,0,0,213,217,3,56,28,0,214,217,3,58,29,0,215,217,3,44,22,0,216,213,1,0,0,0,216,214,1,0,0,0,216,215,1,0,0,0,217,43,1,0,0,0,218,228,5,40,0,0,219,228,3,62,31,0,220,228,3,60,30,0,221,228,3,32,16,0,222,228,5,42,0,0,223,228,5,43,0,0,224,228,3,54,27,0,225,228,3,46,23,0,226,228,5,39,0,0,227,218,1,0,0,0,227,219,1,0,0,0,227,220,1,0,0,0,227,221,1,0,0,0,227,222,1,0,0,0,227,223,1,0,0,0,227,224,1,0,0,0,227,225,1,0,0,0,227,226,1,0,0,0,228,45,1,0,0,0,229,230,3,48,24,0,230,231,5,37,0,0,231,232,3,50,25,0,232,233,5,38,0,0,233,244,1,0,0,0,234,235,5,13,0,0,235,239,5,37,0,0,236,238,9,0,0,0,237,236,1,0,0,0,238,241,1,0,0,0,239,240,1,0,0,0,239,237,1,0,0,0,240,242,1,0,0,0,241,239,1,0,0,0,242,244,5,38,0,0,243,229,1,0,0,0,243,234,1,0,0,0,244,47,1,0,0,0,245,246,5,46,0,0,246,49,1,0,0,0,247,257,1,0,0,0,248,253,3,38,19,0,249,250,5,14,0,0,250,252,3,38,19,0,251,249,1,0,0,0,252,255,1,0,0,0,253,251,1,0,0,0,253,254,1,0,0,0,254,257,1,0,0,0,255,253,1,0,0,0,256,247,1,0,0,0,256,248,1,0,0,0,257,51,1,0,0,0,258,259,5,15,0,0,259,260,3,38,19,0,260,261,5,16,0,0,261,53,1,0,0,0,262,263,5,17,0,0,263,264,5,37,0,0,264,265,3,38,19,0,265,266,5,38,0,0,266,55,1,0,0,0,267,279,5,15,0,0,268,273,3,38,19,0,269,270,5,14,0,0,270,272,3,38,19,0,271,269,1,0,0,0,272,275,1,0,0,0,273,271,1,0,0,0,273,274,1,0,0,0,274,277,1,0,0,0,275,273,1,0,0,0,276,278,5,14,0,0,277,276,1,0,0,0,277,278,1,0,0,0,278,280,1,0,0,0,279,268,1,0,0,0,279,280,1,0,0,0,280,281,1,0,0,0,281,282,5,16,0,0,282,57,1,0,0,0,283,290,5,35,0,0,284,286,3,30,15,0,285,287,5,14,0,0,286,285,1,0,0,0,286,287,1,0,0,0,287,289,1,0,0,0,288,284,1,0,0,0,289,292,1,0,0,0,290,288,1,0,0,0,290,291,1,0,0,0,291,293,1,0,0,0,292,290,1,0,0,0,293,294,5,36,0,0,294,59,1,0,0,0,295,296,7,2,0,0,296,61,1,0,0,0,297,299,7,3,0,0,298,297,1,0,0,0,298,299,1,0,0,0,299,300,1,0,0,0,300,301,3,66,33,0,301,63,1,0,0,0,302,303,7,4,0,0,303,65,1,0,0,0,304,307,5,41,0,0,305,306,5,34,0,0,306,308,5,41,0,0,307,305,1,0,0,0,307,308,1,0,0,0,308,67,1,0,0,0,27,76,78,118,134,136,147,153,159,167,175,178,189,201,203,216,227,239,243,253,256,273,277,279,286,290,298,307]),wi=_i.decisionToState.map((function(t,e){return new dr.dfa.DFA(t,e)})),xi=new dr.atn.PredictionContextCache,ki=function(t){function e(t){var n;return li(this,e),(n=pi(this,e,[t]))._interp=new dr.atn.ParserATNSimulator(n,_i,wi,xi),n.ruleNames=e.ruleNames,n.literalNames=e.literalNames,n.symbolicNames=e.symbolicNames,n}return yi(e,t),fi(e,[{key:"sempred",value:function(t,e,n){if(19===e)return this.expression_sempred(t,n);throw"No predicate with index:"+e}},{key:"expression_sempred",value:function(t,e){switch(e){case 0:return this.precpred(this._ctx,4);case 1:return this.precpred(this._ctx,2);default:throw"No predicate with index:"+e}}},{key:"file_",value:function(){var t=new Ti(this,this._ctx,this.state);this.enterRule(t,0,e.RULE_file_);var n=0;try{this.enterOuterAlt(t,1),this.state=76,this._errHandler.sync(this),n=this._input.LA(1);do{switch(this.state=76,this._errHandler.sync(this),this._input.LA(1)){case 5:this.state=68,this.local();break;case 6:this.state=69,this.module();break;case 4:this.state=70,this.output();break;case 31:this.state=71,this.provider();break;case 30:this.state=72,this.variable();break;case 3:this.state=73,this.data();break;case 2:this.state=74,this.resource();break;case 1:this.state=75,this.terraform();break;default:throw new dr.error.NoViableAltException(this)}this.state=78,this._errHandler.sync(this),n=this._input.LA(1)}while(!(-32&n)&&1<'","'>='","'<'","'<='","'=='","'!='","'&&'","'||'","'variable'","'provider'","'in'","'*'","'.'","'{'","'}'","'('","')'",null,"'nul'"]),vi(ki,"symbolicNames",[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"VARIABLE","PROVIDER","IN","STAR","DOT","LCURL","RCURL","LPAREN","RPAREN","EOF_","NULL_","NATURAL_NUMBER","BOOL","DESCRIPTION","MULTILINESTRING","STRING","IDENTIFIER","COMMENT","BLOCKCOMMENT","WS"]),vi(ki,"ruleNames",["file_","terraform","resource","data","provider","output","local","module","variable","block","blocktype","resourcetype","name","label","blockbody","argument","identifier","identifierchain","inline_index","expression","forloop","section","val","functioncall","functionname","functionarguments","index","filedecl","list_","map_","string","signed_number","operator_","number"]),ki.EOF=dr.Token.EOF,ki.T__0=1,ki.T__1=2,ki.T__2=3,ki.T__3=4,ki.T__4=5,ki.T__5=6,ki.T__6=7,ki.T__7=8,ki.T__8=9,ki.T__9=10,ki.T__10=11,ki.T__11=12,ki.T__12=13,ki.T__13=14,ki.T__14=15,ki.T__15=16,ki.T__16=17,ki.T__17=18,ki.T__18=19,ki.T__19=20,ki.T__20=21,ki.T__21=22,ki.T__22=23,ki.T__23=24,ki.T__24=25,ki.T__25=26,ki.T__26=27,ki.T__27=28,ki.T__28=29,ki.VARIABLE=30,ki.PROVIDER=31,ki.IN=32,ki.STAR=33,ki.DOT=34,ki.LCURL=35,ki.RCURL=36,ki.LPAREN=37,ki.RPAREN=38,ki.EOF_=39,ki.NULL_=40,ki.NATURAL_NUMBER=41,ki.BOOL=42,ki.DESCRIPTION=43,ki.MULTILINESTRING=44,ki.STRING=45,ki.IDENTIFIER=46,ki.COMMENT=47,ki.BLOCKCOMMENT=48,ki.WS=49,ki.RULE_file_=0,ki.RULE_terraform=1,ki.RULE_resource=2,ki.RULE_data=3,ki.RULE_provider=4,ki.RULE_output=5,ki.RULE_local=6,ki.RULE_module=7,ki.RULE_variable=8,ki.RULE_block=9,ki.RULE_blocktype=10,ki.RULE_resourcetype=11,ki.RULE_name=12,ki.RULE_label=13,ki.RULE_blockbody=14,ki.RULE_argument=15,ki.RULE_identifier=16,ki.RULE_identifierchain=17,ki.RULE_inline_index=18,ki.RULE_expression=19,ki.RULE_forloop=20,ki.RULE_section=21,ki.RULE_val=22,ki.RULE_functioncall=23,ki.RULE_functionname=24,ki.RULE_functionarguments=25,ki.RULE_index=26,ki.RULE_filedecl=27,ki.RULE_list_=28,ki.RULE_map_=29,ki.RULE_string=30,ki.RULE_signed_number=31,ki.RULE_operator_=32,ki.RULE_number=33;var Ti=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"local",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Ci):this.getTypedRuleContext(Ci,t)})),vi(i,"module",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Li):this.getTypedRuleContext(Li,t)})),vi(i,"output",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Ni):this.getTypedRuleContext(Ni,t)})),vi(i,"provider",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Oi):this.getTypedRuleContext(Oi,t)})),vi(i,"variable",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Ri):this.getTypedRuleContext(Ri,t)})),vi(i,"data",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Ai):this.getTypedRuleContext(Ai,t)})),vi(i,"resource",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Ei):this.getTypedRuleContext(Ei,t)})),vi(i,"terraform",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Si):this.getTypedRuleContext(Si,t)})),i.parser=t,i.ruleIndex=ki.RULE_file_,i}return yi(e,t),fi(e,[{key:"EOF",value:function(){return this.getToken(ki.EOF,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterFile_(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitFile_(this)}}])}(dr.ParserRuleContext),Si=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_terraform,i}return yi(e,t),fi(e,[{key:"blockbody",value:function(){return this.getTypedRuleContext(Bi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterTerraform(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitTerraform(this)}}])}(dr.ParserRuleContext),Ei=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_resource,i}return yi(e,t),fi(e,[{key:"resourcetype",value:function(){return this.getTypedRuleContext(Mi,0)}},{key:"name",value:function(){return this.getTypedRuleContext(Di,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(Bi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterResource(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitResource(this)}}])}(dr.ParserRuleContext),Ai=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_data,i}return yi(e,t),fi(e,[{key:"resourcetype",value:function(){return this.getTypedRuleContext(Mi,0)}},{key:"name",value:function(){return this.getTypedRuleContext(Di,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(Bi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterData(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitData(this)}}])}(dr.ParserRuleContext),Oi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_provider,i}return yi(e,t),fi(e,[{key:"PROVIDER",value:function(){return this.getToken(ki.PROVIDER,0)}},{key:"resourcetype",value:function(){return this.getTypedRuleContext(Mi,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(Bi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterProvider(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitProvider(this)}}])}(dr.ParserRuleContext),Ni=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_output,i}return yi(e,t),fi(e,[{key:"name",value:function(){return this.getTypedRuleContext(Di,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(Bi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterOutput(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitOutput(this)}}])}(dr.ParserRuleContext),Ci=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_local,i}return yi(e,t),fi(e,[{key:"blockbody",value:function(){return this.getTypedRuleContext(Bi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterLocal(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitLocal(this)}}])}(dr.ParserRuleContext),Li=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_module,i}return yi(e,t),fi(e,[{key:"name",value:function(){return this.getTypedRuleContext(Di,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(Bi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterModule(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitModule(this)}}])}(dr.ParserRuleContext),Ri=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_variable,i}return yi(e,t),fi(e,[{key:"VARIABLE",value:function(){return this.getToken(ki.VARIABLE,0)}},{key:"name",value:function(){return this.getTypedRuleContext(Di,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(Bi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterVariable(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitVariable(this)}}])}(dr.ParserRuleContext),Pi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"label",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ji):this.getTypedRuleContext(ji,t)})),i.parser=t,i.ruleIndex=ki.RULE_block,i}return yi(e,t),fi(e,[{key:"blocktype",value:function(){return this.getTypedRuleContext(Ii,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(Bi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterBlock(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitBlock(this)}}])}(dr.ParserRuleContext),Ii=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_blocktype,i}return yi(e,t),fi(e,[{key:"IDENTIFIER",value:function(){return this.getToken(ki.IDENTIFIER,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterBlocktype(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitBlocktype(this)}}])}(dr.ParserRuleContext),Mi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_resourcetype,i}return yi(e,t),fi(e,[{key:"STRING",value:function(){return this.getToken(ki.STRING,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterResourcetype(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitResourcetype(this)}}])}(dr.ParserRuleContext),Di=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_name,i}return yi(e,t),fi(e,[{key:"STRING",value:function(){return this.getToken(ki.STRING,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterName(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitName(this)}}])}(dr.ParserRuleContext),ji=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_label,i}return yi(e,t),fi(e,[{key:"STRING",value:function(){return this.getToken(ki.STRING,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterLabel(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitLabel(this)}}])}(dr.ParserRuleContext),Bi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"argument",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Fi):this.getTypedRuleContext(Fi,t)})),vi(i,"block",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Pi):this.getTypedRuleContext(Pi,t)})),i.parser=t,i.ruleIndex=ki.RULE_blockbody,i}return yi(e,t),fi(e,[{key:"LCURL",value:function(){return this.getToken(ki.LCURL,0)}},{key:"RCURL",value:function(){return this.getToken(ki.RCURL,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterBlockbody(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitBlockbody(this)}}])}(dr.ParserRuleContext),Fi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_argument,i}return yi(e,t),fi(e,[{key:"identifier",value:function(){return this.getTypedRuleContext(Ui,0)}},{key:"expression",value:function(){return this.getTypedRuleContext(Ki,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterArgument(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitArgument(this)}}])}(dr.ParserRuleContext),Ui=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_identifier,i}return yi(e,t),fi(e,[{key:"identifierchain",value:function(){return this.getTypedRuleContext(zi,0)}},{key:"DOT",value:function(){return this.getToken(ki.DOT,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterIdentifier(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitIdentifier(this)}}])}(dr.ParserRuleContext),zi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"DOT",(function(t){return void 0===t&&(t=null),null===t?this.getTokens(ki.DOT):this.getToken(ki.DOT,t)})),vi(i,"identifierchain",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(e):this.getTypedRuleContext(e,t)})),i.parser=t,i.ruleIndex=ki.RULE_identifierchain,i}return yi(e,t),fi(e,[{key:"IDENTIFIER",value:function(){return this.getToken(ki.IDENTIFIER,0)}},{key:"IN",value:function(){return this.getToken(ki.IN,0)}},{key:"VARIABLE",value:function(){return this.getToken(ki.VARIABLE,0)}},{key:"PROVIDER",value:function(){return this.getToken(ki.PROVIDER,0)}},{key:"index",value:function(){return this.getTypedRuleContext(Xi,0)}},{key:"STAR",value:function(){return this.getToken(ki.STAR,0)}},{key:"inline_index",value:function(){return this.getTypedRuleContext(Vi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterIdentifierchain(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitIdentifierchain(this)}}])}(dr.ParserRuleContext),Vi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_inline_index,i}return yi(e,t),fi(e,[{key:"NATURAL_NUMBER",value:function(){return this.getToken(ki.NATURAL_NUMBER,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterInline_index(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitInline_index(this)}}])}(dr.ParserRuleContext),Ki=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"expression",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(e):this.getTypedRuleContext(e,t)})),i.parser=t,i.ruleIndex=ki.RULE_expression,i}return yi(e,t),fi(e,[{key:"section",value:function(){return this.getTypedRuleContext(qi,0)}},{key:"LPAREN",value:function(){return this.getToken(ki.LPAREN,0)}},{key:"RPAREN",value:function(){return this.getToken(ki.RPAREN,0)}},{key:"forloop",value:function(){return this.getTypedRuleContext(Hi,0)}},{key:"operator_",value:function(){return this.getTypedRuleContext(no,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterExpression(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitExpression(this)}}])}(dr.ParserRuleContext),Hi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"expression",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Ki):this.getTypedRuleContext(Ki,t)})),i.parser=t,i.ruleIndex=ki.RULE_forloop,i}return yi(e,t),fi(e,[{key:"identifier",value:function(){return this.getTypedRuleContext(Ui,0)}},{key:"IN",value:function(){return this.getToken(ki.IN,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterForloop(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitForloop(this)}}])}(dr.ParserRuleContext),qi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_section,i}return yi(e,t),fi(e,[{key:"list_",value:function(){return this.getTypedRuleContext(Ji,0)}},{key:"map_",value:function(){return this.getTypedRuleContext(Qi,0)}},{key:"val",value:function(){return this.getTypedRuleContext(Wi,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterSection(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitSection(this)}}])}(dr.ParserRuleContext),Wi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_val,i}return yi(e,t),fi(e,[{key:"NULL_",value:function(){return this.getToken(ki.NULL_,0)}},{key:"signed_number",value:function(){return this.getTypedRuleContext(eo,0)}},{key:"string",value:function(){return this.getTypedRuleContext(to,0)}},{key:"identifier",value:function(){return this.getTypedRuleContext(Ui,0)}},{key:"BOOL",value:function(){return this.getToken(ki.BOOL,0)}},{key:"DESCRIPTION",value:function(){return this.getToken(ki.DESCRIPTION,0)}},{key:"filedecl",value:function(){return this.getTypedRuleContext(Zi,0)}},{key:"functioncall",value:function(){return this.getTypedRuleContext(Gi,0)}},{key:"EOF_",value:function(){return this.getToken(ki.EOF_,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterVal(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitVal(this)}}])}(dr.ParserRuleContext),Gi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_functioncall,i}return yi(e,t),fi(e,[{key:"functionname",value:function(){return this.getTypedRuleContext(Yi,0)}},{key:"LPAREN",value:function(){return this.getToken(ki.LPAREN,0)}},{key:"functionarguments",value:function(){return this.getTypedRuleContext($i,0)}},{key:"RPAREN",value:function(){return this.getToken(ki.RPAREN,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterFunctioncall(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitFunctioncall(this)}}])}(dr.ParserRuleContext),Yi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_functionname,i}return yi(e,t),fi(e,[{key:"IDENTIFIER",value:function(){return this.getToken(ki.IDENTIFIER,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterFunctionname(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitFunctionname(this)}}])}(dr.ParserRuleContext),$i=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"expression",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Ki):this.getTypedRuleContext(Ki,t)})),i.parser=t,i.ruleIndex=ki.RULE_functionarguments,i}return yi(e,t),fi(e,[{key:"enterRule",value:function(t){t instanceof Jr&&t.enterFunctionarguments(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitFunctionarguments(this)}}])}(dr.ParserRuleContext),Xi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_index,i}return yi(e,t),fi(e,[{key:"expression",value:function(){return this.getTypedRuleContext(Ki,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterIndex(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitIndex(this)}}])}(dr.ParserRuleContext),Zi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_filedecl,i}return yi(e,t),fi(e,[{key:"LPAREN",value:function(){return this.getToken(ki.LPAREN,0)}},{key:"expression",value:function(){return this.getTypedRuleContext(Ki,0)}},{key:"RPAREN",value:function(){return this.getToken(ki.RPAREN,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterFiledecl(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitFiledecl(this)}}])}(dr.ParserRuleContext),Ji=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"expression",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Ki):this.getTypedRuleContext(Ki,t)})),i.parser=t,i.ruleIndex=ki.RULE_list_,i}return yi(e,t),fi(e,[{key:"enterRule",value:function(t){t instanceof Jr&&t.enterList_(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitList_(this)}}])}(dr.ParserRuleContext),Qi=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"argument",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Fi):this.getTypedRuleContext(Fi,t)})),i.parser=t,i.ruleIndex=ki.RULE_map_,i}return yi(e,t),fi(e,[{key:"LCURL",value:function(){return this.getToken(ki.LCURL,0)}},{key:"RCURL",value:function(){return this.getToken(ki.RCURL,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterMap_(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitMap_(this)}}])}(dr.ParserRuleContext),to=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_string,i}return yi(e,t),fi(e,[{key:"STRING",value:function(){return this.getToken(ki.STRING,0)}},{key:"MULTILINESTRING",value:function(){return this.getToken(ki.MULTILINESTRING,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterString(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitString(this)}}])}(dr.ParserRuleContext),eo=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_signed_number,i}return yi(e,t),fi(e,[{key:"number",value:function(){return this.getTypedRuleContext(ro,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterSigned_number(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitSigned_number(this)}}])}(dr.ParserRuleContext),no=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=pi(this,e,[n,r])).parser=t,i.ruleIndex=ki.RULE_operator_,i}return yi(e,t),fi(e,[{key:"STAR",value:function(){return this.getToken(ki.STAR,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterOperator_(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitOperator_(this)}}])}(dr.ParserRuleContext),ro=function(t){function e(t,n,r){var i;return li(this,e),void 0===n&&(n=null),null==r&&(r=-1),vi(i=pi(this,e,[n,r]),"NATURAL_NUMBER",(function(t){return void 0===t&&(t=null),null===t?this.getTokens(ki.NATURAL_NUMBER):this.getToken(ki.NATURAL_NUMBER,t)})),i.parser=t,i.ruleIndex=ki.RULE_number,i}return yi(e,t),fi(e,[{key:"DOT",value:function(){return this.getToken(ki.DOT,0)}},{key:"enterRule",value:function(t){t instanceof Jr&&t.enterNumber(this)}},{key:"exitRule",value:function(t){t instanceof Jr&&t.exitNumber(this)}}])}(dr.ParserRuleContext);function io(t){return io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},io(t)}function oo(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[]).filter((function(e){return t.isParsable(e)})).reduce((function(t,e){var n=e.path.split("/").slice(0,-1).join("/");return t.includes(n)||t.push(n),t}),[])}},{key:"parse",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.pluginData.components=[],this.pluginData.variables=[],this.pluginData.parseLogs=[];var i=null!=t&&t.path&&0!==t.path.length?"".concat(t.path,"/"):"",o=new RegExp("^".concat(i,"[^/]+\\.tf$")),s=new Jr(this.pluginData);n.filter((function(t){var e=t.path;return o.test(e)})).filter((function(t){var n=t.content,i=t.path;return!(!n||""===n.trim())||(e.pluginData.emitEvent({parent:r,type:"Parser",action:"read",status:"warning",files:[i],data:{code:"no_content",global:!1}}),!1)})).forEach((function(t){var n=e.pluginData.emitEvent({parent:r,type:"Parser",action:"read",status:"running",files:[t.path],data:{global:!1}});s.currentFile=t;var i=new dr.InputStream(t.content),o=new ci(i),a=new dr.CommonTokenStream(o),c=new ki(a),u=new fo(e.pluginData,t);c.removeErrorListeners(),c.addErrorListener(u),c.buildParseTrees=!0;var l=c.file_();dr.tree.ParseTreeWalker.DEFAULT.walk(s,l),e.pluginData.emitEvent({id:n,status:"success"})}))}}])}(t.DefaultParser);const xo=wo;var ko=n(326),To=n.n(ko);const So={root:"".concat("{% macro displayAttributeValue(attribute, value, level) %}\n{% if attribute.isVariable %}{{ value | dump | indent(level * 4, true) }},\n{% elif attribute.definition.type == 'Link' %}{{ attribute.definition.linkRef | indent(level * 4, true) }}.{{ getExternalId(value) }}.{{attribute.definition.linkAttribute}},\n{% elif isValueReference(value) %}{{ value | indent(level * 4, true) }},\n{% else %}{{ value | dump | indent(level * 4, true) }},\n{% endif %}\n{% endmacro %}\n",'{% include "local" ignore missing %}\n{% include "block" ignore missing %}\n{% include "variable" ignore missing %}\n{% include "output" ignore missing %}\n'),block:"{% for _block in components %}\n{{ _block.definition.blockType }} {% if ['resource','data'].includes(_block.definition.blockType) %}\"{{ _block.definition.type }}\" {% endif %}{% if ['provider', 'module'].includes(_block.definition.blockType) %}\"{{ _block.definition.type }}\"{% else %}\"{{ _block.externalId }}\"{% endif %} {\n{% for attribute in _block.attributes %}{% set level = 1 %}\n{% include \"attribute\" ignore missing %}\n{% endfor %}\n}\n\n{% endfor %}",attribute:"{% if attribute.type == 'Object' %}\n{{ attribute.name | indent(level * 4, true) }} {% if not attribute.isDynamic %}= {% endif %}{\n{% set level = level+1 %}{% for attr in attribute.value %}{% set attribute = attr %}\n{% include \"attribute\" ignore missing %}\n{% set attribute = attr %}\n{% endfor %}{% set level = level-1 %}\n{{ \"}\" | indent(level * 4, true) }}\n{% else %}\n{{ attribute.name | indent(level * 4, true) }} = {% if attribute.type == 'Array' or attribute.type == 'Link' %}[\n{% set level = level+1 %}{% for value in attribute.value %}\n{% call displayAttributeValue(attribute, value, level) -%}{%- endcall %}\n{% endfor %}{% set level = level-1 %}\n{{ \"]\" | indent(level * 4, true) }}\n{% else %}\n{% if attribute.isVariable %}{{ attribute.value }}\n{% elif attribute.definition.type == 'Reference' %}{{ attribute.definition.containerRef }}.{{ getExternalId(attribute.value) }}\n{% elif attribute.type == 'Boolean' or attribute.type == 'Number' or attribute.name == 'user_data' %}{{ attribute.value }}\n{% elif attribute.type == 'String' and isValueReference(attribute.value) %}{{ attribute.value }}\n{% else %}{{ attribute.value | dump }}\n{% endif %}\n{% endif %}\n{% endif %}\n",variable:'{% for variable in variables %}\nvariable {{ variable.name | dump }} {\n{% set level = 1 %}\n{% if variable.defaultValue %}{{ "default" | indent(level * 4, true) }} = {% if isList(variable.type) %}[\n{% set level = level+1 %}{% for val in variable.defaultValue %}\n{{ val | dump | indent(level * 4, true) }},\n{% endfor %}\n{% set level = level-1 %}{{ "]" | indent(level * 4, true) }}\n{% else %}{{ variable.defaultValue | dump }}\n{% endif %}\n{% endif %}\n{% if variable.type %}{{ "type" | indent(level * 4, true) }} = {{ variable.type }}\n{% endif %}\n{% if variable.description %}{{ "description" | indent(level * 4, true) }} = {{ variable.description | dump }}\n{% endif %}\n{% if variable.sensitive %}{{ "sensitive" | indent(level * 4, true) }} = {{ variable.sensitive }}\n{% endif %}\n{% if variable.nullable %}{{ "nullable" | indent(level * 4, true) }} = {{ variable.nullable }}\n{% endif %}\n}\n\n{% endfor %}\n',output:'{% for output in outputs %}\noutput {{ output.name | dump }} {\n{% set level = 1 %}\n{% if isList(output.type) %}\n{{ "value = [" | indent(level * 4, true) }}\n{% for val in output.value %}\n{% set level = level+1 %}\n{% set argType = getListType(output.type) %}\n{% if argType == \'number\' or argType == \'bool\' or isValueReference(val) %}\n{{ val | dump | indent(level * 4, true) }},\n{% else %}\n{{ val | dump | indent(level * 4, true) }},\n{% endif %}\n{% set level = level-1 %}\n{% endfor %}{{ "]" | indent(level * 4, true) }}\n{% else %}\n{{ "value = " | indent(level * 4, true) }}{% if output.type == \'number\' or output.type == \'bool\' or isValueReference(output.value) %}\n{{ output.value }}\n{% else %}\n{{ output.value | dump }}\n{% endif %}\n{% endif %}\n{% if output.description %}{{ "description" | indent(level * 4, true) }} = {{ output.description | dump }}\n{% endif %}\n{% if output.sensitive %}{{ "sensitive" | indent(level * 4, true) }} = {{ output.sensitive }}\n{% endif %}\n}\n\n{% endfor %}\n',local:'{% if locals.length > 0 %}\nlocals {\n{% set level = 1 %}\n{% for local in locals %}\n{% if local.value %}{{ local.name | indent(level * 4, true) }} = {% if isList(local.type) %}[\n{% set level = level+1 %}{% for val in local.value %}\n{{ val | dump | indent(level * 4, true) }},\n{% endfor %}\n{% set level = level-1 %}{{ "]" | indent(level * 4, true) }}\n{% else %}{{ local.value | dump }}\n{% endif %}\n{% endif %}\n{% endfor %}{% set level = level-1 %}\n{% set level = 0 %}}\n\n{% endif %}\n'};function Eo(t){return Eo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eo(t)}function Ao(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null,e=this.pluginData.components.reduce((function(t,e){return t.has(e.path)?t.get(e.path).push(e):t.set(e.path,[e]),t}),new Map),n=this.pluginData.variables.reduce((function(t,e){return t.has(e.path)?t.get(e.path).push(e):t.set(e.path,[e]),t}),new Map);return this.generateFiles(e,n,t)}},{key:"generateFiles",value:function(e,n,r){var i=this,o=[];return(0===e.size?n:e).forEach((function(s,a){var c=i.pluginData.emitEvent({parent:r,type:"Render",action:"write",status:"running",files:[a],data:{global:!1}}),u=(null==n?void 0:n.get(a))||[],l=(null==e?void 0:e.get(a))||[];o.push(new t.FileInput({path:a,content:"".concat(i.template.render({components:l,variables:u.filter((function(t){return"variable"===t.category})),locals:u.filter((function(t){return"local"===t.category})),outputs:u.filter((function(t){return"output"===t.category})),getExternalId:function(t){var e;return null===(e=i.pluginData.getComponentById(t))||void 0===e?void 0:e.externalId},isValueReference:function(t){return null==t?void 0:t.match(/^(data.|var.|local.|module.|aws_|random_)/)},isList:function(t){return(null==t?void 0:t.startsWith("list("))||(null==t?void 0:t.startsWith("set("))},getListType:function(t){return t.split(/\(([^)]+)\)/)[1]}}).trim(),"\n")})),i.pluginData.emitEvent({id:c,status:"success"})})),o}}])}(t.DefaultRender);const Io=Po,Mo={name:"terraform",languageSettings:{id:"terraform",extensions:[".tf"],aliases:["Terraform","terraform"],mimetypes:["string"]},languageConfiguration:{comments:{lineComment:"#",blockComment:["/*","*/"]},brackets:[["(",")"],["{","}"],["[","]"]],colorizedBracketPairs:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"(",close:")"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"'",close:"'",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:'"',close:'"'}]},tokenProvider:{keywords:["provider","resource","data","variable","output","locals","module","for_each","if","else","true","false","null"],operators:["+","+=","-","-=","*","*=","/","/=","%","%=","==","!=","<","<=",">",">=","=","||","&&","!"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d*\.\d+([eE][-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],comment:[[/[^/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"],[/#.*$/,"comment"]]}}};function Do(t){return Do="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Do(t)}function jo(t,e,n){return e=Fo(e),function(t,e){if(e&&("object"==Do(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Bo()?Reflect.construct(e,n||[],Fo(t).constructor):e.apply(t,n))}function Bo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Bo=function(){return!!t})()}function Fo(t){return Fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fo(t)}function Uo(t,e){return Uo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Uo(t,e)}var zo=function(e){function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),jo(this,n,[{editor:{syntax:Mo},tags:[new t.Tag({type:"language",value:"Terraform"}),new t.Tag({type:"category",value:"Infrastructure"})],extraResources:[{type:"markers",name:"startLinkMarker"},{type:"markers",name:"endLinkMarker"},{type:"links",name:"defaultLink"},{type:"links",name:"temporaryLink"},{type:"icons",name:"error"},{type:"icons",name:"menu"},{type:"icons",name:"resize"},{type:"icons",name:"unknown"}],container:{margin:15,gap:50},defaultFileName:"new_file.tf",defaultFileExtension:"tf",i18n:{"en-US":{displayName:"Terraform",parser:{error:{noExternalId:"Id can't be null.",badExternalId:"Invalid id."}}}}}])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Uo(t,e)}(n,e),function(t){return Object.defineProperty(t,"prototype",{writable:!1}),t}(n)}(t.DefaultConfiguration);const Vo=zo;function Ko(t){return Ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ko(t)}function Ho(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n0&&void 0!==arguments[0]?arguments[0]:{event:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=new Vo,r=new Jo(n,{name:ws.UU,version:ws.rE},t.event);return ks(this,e,[{pluginData:r,pluginDrawer:new _s(r),pluginMetadata:new _t(r),pluginParser:new xo(r),pluginRenderer:new Io(r),configuration:n}])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Es(t,e)}(e,t),function(t){return Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(t.DefaultPlugin);const Os=As})();var i=exports;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})(); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index d5b8f13..3a50fb8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ditrit/terrator-plugin", - "version": "0.12.0", + "version": "0.12.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ditrit/terrator-plugin", - "version": "0.12.0", + "version": "0.12.1", "license": "MPL-2.0", "dependencies": { "antlr4": "=4.13.2", diff --git a/package.json b/package.json index 6542734..896ed64 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ditrit/terrator-plugin", - "version": "0.12.0", + "version": "0.12.1", "description": "Terraform plugin for Leto-Modelizer.", "main": "dist/terrator-plugin.js", "exports": {