From c7af8a6deed59028431c6f581265dd04c9601c92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Moitti=C3=A9?= Date: Thu, 11 Jul 2024 09:39:16 +0200 Subject: [PATCH] Release version 0.10.0 --- changelog.md | 3 ++- dist/terrator-plugin.js | 2 +- package-lock.json | 2 +- package.json | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/changelog.md b/changelog.md index 6fa8398..934e484 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.10.0] - 2024/07/11 ### Added @@ -243,6 +243,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.10.0]: https://github.com/ditrit/terrator-plugin/blob/0.10.0/changelog.md [0.9.0]: https://github.com/ditrit/terrator-plugin/blob/0.9.0/changelog.md [0.8.1]: https://github.com/ditrit/terrator-plugin/blob/0.8.1/changelog.md [0.8.0]: https://github.com/ditrit/terrator-plugin/blob/0.8.0/changelog.md diff --git a/dist/terrator-plugin.js b/dist/terrator-plugin.js index fda6007..8180b60 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={916:(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:_,IfAsync:b,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,_=n(2),b=_.handleError,w=_.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(b(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=_;break;case",":M=w;break;case":":M=x;break;case"~":M=k;break;case"|":M=T;break;default:M=b}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:()=>b,ComponentAttribute:()=>s,ComponentAttributeDefinition:()=>O,ComponentDefinition:()=>x,ComponentDrawOption:()=>f,ComponentLink:()=>M,ComponentLinkDefinition:()=>j,ComponentRenderer:()=>PO,DefaultConfiguration:()=>YN,DefaultData:()=>zN,DefaultDrawer:()=>oN,DefaultMetadata:()=>uN,DefaultParser:()=>pN,DefaultPlugin:()=>JN,DefaultRender:()=>gN,FileInformation:()=>l,FileInput:()=>H,LinkRenderer:()=>jO,ParseError:()=>TN,Tag:()=>tC,Variable:()=>aC});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){var n=function(t,n){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,"string");if("object"!=e(i))return i;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:()=>gt,Delaunay:()=>jc,FormatSpecifier:()=>eh,InternMap:()=>bt,InternSet:()=>wt,Node:()=>Ey,Path:()=>Qs,Voronoi:()=>Lc,ZoomTransform:()=>IE,active:()=>is,arc:()=>vT,area:()=>ET,areaRadial:()=>MT,ascending:()=>q,autoType:()=>yu,axisBottom:()=>cn,axisLeft:()=>un,axisRight:()=>an,axisTop:()=>sn,bin:()=>ee,bisect:()=>tt,bisectCenter:()=>Q,bisectLeft:()=>J,bisectRight:()=>Z,bisector:()=>G,blob:()=>ol,blur:()=>et,blur2:()=>nt,blurImage:()=>rt,brush:()=>Ps,brushSelection:()=>Cs,brushX:()=>Ls,brushY:()=>Rs,buffer:()=>al,chord:()=>Hs,chordDirected:()=>Ws,chordTranspose:()=>qs,cluster:()=>_y,color:()=>ti,contourDensity:()=>cc,contours:()=>tc,count:()=>ct,create:()=>Wk,creator:()=>mr,cross:()=>ft,csv:()=>fl,csvFormat:()=>ru,csvFormatBody:()=>iu,csvFormatRow:()=>su,csvFormatRows:()=>ou,csvFormatValue:()=>au,csvParse:()=>eu,csvParseRows:()=>nu,cubehelix:()=>Ha,cumsum:()=>pt,curveBasis:()=>SS,curveBasisClosed:()=>AS,curveBasisOpen:()=>NS,curveBumpX:()=>FT,curveBumpY:()=>UT,curveBundle:()=>LS,curveCardinal:()=>IS,curveCardinalClosed:()=>DS,curveCardinalOpen:()=>BS,curveCatmullRom:()=>zS,curveCatmullRomClosed:()=>KS,curveCatmullRomOpen:()=>qS,curveLinear:()=>xT,curveLinearClosed:()=>GS,curveMonotoneX:()=>eE,curveMonotoneY:()=>nE,curveNatural:()=>oE,curveStep:()=>aE,curveStepAfter:()=>uE,curveStepBefore:()=>cE,descending:()=>W,deviation:()=>mt,difference:()=>Fe,disjoint:()=>Ue,dispatch:()=>mn,drag:()=>Hc,dragDisable:()=>Ir,dragEnable:()=>Mr,dsv:()=>hl,dsvFormat:()=>Qc,easeBack:()=>Qu,easeBackIn:()=>Zu,easeBackInOut:()=>Qu,easeBackOut:()=>Ju,easeBounce:()=>Yu,easeBounceIn:()=>Gu,easeBounceInOut:()=>$u,easeBounceOut:()=>Yu,easeCircle:()=>Du,easeCircleIn:()=>Iu,easeCircleInOut:()=>Du,easeCircleOut:()=>Mu,easeCubic:()=>ts,easeCubicIn:()=>Jo,easeCubicInOut:()=>ts,easeCubicOut:()=>Qo,easeElastic:()=>nl,easeElasticIn:()=>el,easeElasticInOut:()=>rl,easeElasticOut:()=>nl,easeExp:()=>Pu,easeExpIn:()=>Lu,easeExpInOut:()=>Pu,easeExpOut:()=>Ru,easeLinear:()=>vu,easePoly:()=>Tu,easePolyIn:()=>xu,easePolyInOut:()=>Tu,easePolyOut:()=>ku,easeQuad:()=>wu,easeQuadIn:()=>_u,easeQuadInOut:()=>wu,easeQuadOut:()=>bu,easeSin:()=>Nu,easeSinIn:()=>Au,easeSinInOut:()=>Nu,easeSinOut:()=>Ou,every:()=>Pe,extent:()=>yt,fcumsum:()=>_t,filter:()=>Me,flatGroup:()=>Ct,flatRollup:()=>Lt,forceCenter:()=>wl,forceCollide:()=>Il,forceLink:()=>jl,forceManyBody:()=>Wl,forceRadial:()=>Gl,forceSimulation:()=>ql,forceX:()=>Yl,forceY:()=>$l,format:()=>sh,formatDefaultLocale:()=>hh,formatLocale:()=>lh,formatPrefix:()=>ah,formatSpecifier:()=>th,fsum:()=>vt,geoAlbers:()=>Im,geoAlbersUsa:()=>Mm,geoArea:()=>yf,geoAzimuthalEqualArea:()=>Fm,geoAzimuthalEqualAreaRaw:()=>Bm,geoAzimuthalEquidistant:()=>zm,geoAzimuthalEquidistantRaw:()=>Um,geoBounds:()=>Zf,geoCentroid:()=>up,geoCircle:()=>bp,geoClipAntimeridian:()=>Lp,geoClipCircle:()=>Rp,geoClipExtent:()=>Up,geoClipRectangle:()=>Fp,geoConicConformal:()=>Gm,geoConicConformalRaw:()=>Wm,geoConicEqualArea:()=>Pm,geoConicEqualAreaRaw:()=>Rm,geoConicEquidistant:()=>Zm,geoConicEquidistantRaw:()=>Xm,geoContains:()=>rd,geoDistance:()=>Yp,geoEqualEarth:()=>iy,geoEqualEarthRaw:()=>ry,geoEquirectangular:()=>$m,geoEquirectangularRaw:()=>Ym,geoGnomonic:()=>sy,geoGnomonicRaw:()=>oy,geoGraticule:()=>sd,geoGraticule10:()=>ad,geoIdentity:()=>ay,geoInterpolate:()=>cd,geoLength:()=>qp,geoMercator:()=>Km,geoMercatorRaw:()=>Vm,geoNaturalEarth1:()=>uy,geoNaturalEarth1Raw:()=>cy,geoOrthographic:()=>hy,geoOrthographicRaw:()=>ly,geoPath:()=>mm,geoProjection:()=>Nm,geoProjectionMutator:()=>Cm,geoRotation:()=>gp,geoStereographic:()=>py,geoStereographicRaw:()=>fy,geoStream:()=>qh,geoTransform:()=>ym,geoTransverseMercator:()=>my,geoTransverseMercatorRaw:()=>dy,gray:()=>Ta,greatest:()=>ce,greatestIndex:()=>Se,group:()=>At,groupSort:()=>Vt,groups:()=>Ot,hcl:()=>Pa,hierarchy:()=>wy,histogram:()=>ee,hsl:()=>pi,html:()=>_l,image:()=>dl,index:()=>It,indexes:()=>Mt,interpolate:()=>Fi,interpolateArray:()=>Li,interpolateBasis:()=>_i,interpolateBasisClosed:()=>bi,interpolateBlues:()=>_k,interpolateBrBG:()=>Lx,interpolateBuGn:()=>$x,interpolateBuPu:()=>Zx,interpolateCividis:()=>Ck,interpolateCool:()=>Pk,interpolateCubehelix:()=>Ug,interpolateCubehelixDefault:()=>Lk,interpolateCubehelixLong:()=>zg,interpolateDate:()=>Pi,interpolateDiscrete:()=>Ag,interpolateGnBu:()=>Qx,interpolateGreens:()=>wk,interpolateGreys:()=>kk,interpolateHcl:()=>jg,interpolateHclLong:()=>Bg,interpolateHsl:()=>Pg,interpolateHslLong:()=>Ig,interpolateHue:()=>Og,interpolateInferno:()=>Hk,interpolateLab:()=>Mg,interpolateMagma:()=>Kk,interpolateNumber:()=>Ii,interpolateNumberArray:()=>Ni,interpolateObject:()=>Mi,interpolateOrRd:()=>ek,interpolateOranges:()=>Nk,interpolatePRGn:()=>Px,interpolatePiYG:()=>Mx,interpolatePlasma:()=>qk,interpolatePuBu:()=>ok,interpolatePuBuGn:()=>rk,interpolatePuOr:()=>jx,interpolatePuRd:()=>ak,interpolatePurples:()=>Sk,interpolateRainbow:()=>Mk,interpolateRdBu:()=>Fx,interpolateRdGy:()=>zx,interpolateRdPu:()=>uk,interpolateRdYlBu:()=>Kx,interpolateRdYlGn:()=>qx,interpolateReds:()=>Ak,interpolateRgb:()=>Si,interpolateRgbBasis:()=>Ai,interpolateRgbBasisClosed:()=>Oi,interpolateRound:()=>Ng,interpolateSinebow:()=>Fk,interpolateSpectral:()=>Gx,interpolateString:()=>Bi,interpolateTransformCss:()=>Ao,interpolateTransformSvg:()=>Oo,interpolateTurbo:()=>Uk,interpolateViridis:()=>Vk,interpolateWarm:()=>Rk,interpolateYlGn:()=>pk,interpolateYlGnBu:()=>hk,interpolateYlOrBr:()=>mk,interpolateYlOrRd:()=>gk,interpolateZoom:()=>Lg,interrupt:()=>wo,intersection:()=>ze,interval:()=>LE,isoFormat:()=>OE,isoParse:()=>CE,json:()=>yl,lab:()=>Sa,lch:()=>Ra,least:()=>ke,leastIndex:()=>Te,line:()=>ST,lineRadial:()=>IT,link:()=>HT,linkHorizontal:()=>qT,linkRadial:()=>GT,linkVertical:()=>WT,local:()=>Yk,map:()=>De,matcher:()=>wn,max:()=>ne,maxIndex:()=>re,mean:()=>de,median:()=>me,medianIndex:()=>ye,merge:()=>ge,min:()=>ie,minIndex:()=>oe,mode:()=>ve,namespace:()=>Dn,namespaces:()=>Mn,nice:()=>Qt,now:()=>Qi,pack:()=>Zy,packEnclose:()=>My,packSiblings:()=>$y,pairs:()=>_e,partition:()=>rg,path:()=>ta,pathRound:()=>ea,permute:()=>Bt,pie:()=>NT,piecewise:()=>Vg,pointRadial:()=>DT,pointer:()=>zi,pointers:()=>Xk,polygonArea:()=>Hg,polygonCentroid:()=>qg,polygonContains:()=>Xg,polygonHull:()=>$g,polygonLength:()=>Zg,precisionFixed:()=>fh,precisionPrefix:()=>ph,precisionRound:()=>dh,quadtree:()=>El,quantile:()=>ue,quantileIndex:()=>he,quantileSorted:()=>le,quantize:()=>Kg,quickselect:()=>se,radialArea:()=>MT,radialLine:()=>IT,randomBates:()=>iv,randomBernoulli:()=>av,randomBeta:()=>lv,randomBinomial:()=>hv,randomCauchy:()=>pv,randomExponential:()=>ov,randomGamma:()=>uv,randomGeometric:()=>cv,randomInt:()=>tv,randomIrwinHall:()=>rv,randomLcg:()=>_v,randomLogNormal:()=>nv,randomLogistic:()=>dv,randomNormal:()=>ev,randomPareto:()=>sv,randomPoisson:()=>mv,randomUniform:()=>Qg,randomWeibull:()=>fv,range:()=>we,rank:()=>xe,reduce:()=>je,reverse:()=>Be,rgb:()=>ii,ribbon:()=>fa,ribbonArrow:()=>pa,rollup:()=>Rt,rollups:()=>Pt,scaleBand:()=>Tv,scaleDiverging:()=>px,scaleDivergingLog:()=>dx,scaleDivergingPow:()=>yx,scaleDivergingSqrt:()=>gx,scaleDivergingSymlog:()=>mx,scaleIdentity:()=>Fv,scaleImplicit:()=>xv,scaleLinear:()=>Bv,scaleLog:()=>Yv,scaleOrdinal:()=>kv,scalePoint:()=>Ev,scalePow:()=>r_,scaleQuantile:()=>a_,scaleQuantize:()=>c_,scaleRadial:()=>s_,scaleSequential:()=>sx,scaleSequentialLog:()=>ax,scaleSequentialPow:()=>ux,scaleSequentialQuantile:()=>hx,scaleSequentialSqrt:()=>lx,scaleSequentialSymlog:()=>cx,scaleSqrt:()=>i_,scaleSymlog:()=>Jv,scaleThreshold:()=>u_,scaleTime:()=>nx,scaleUtc:()=>rx,scan:()=>Ee,schemeAccent:()=>bx,schemeBlues:()=>vk,schemeBrBG:()=>Cx,schemeBuGn:()=>Yx,schemeBuPu:()=>Xx,schemeCategory10:()=>_x,schemeDark2:()=>wx,schemeGnBu:()=>Jx,schemeGreens:()=>bk,schemeGreys:()=>xk,schemeOrRd:()=>tk,schemeOranges:()=>Ok,schemePRGn:()=>Rx,schemePaired:()=>xx,schemePastel1:()=>kx,schemePastel2:()=>Tx,schemePiYG:()=>Ix,schemePuBu:()=>ik,schemePuBuGn:()=>nk,schemePuOr:()=>Dx,schemePuRd:()=>sk,schemePurples:()=>Tk,schemeRdBu:()=>Bx,schemeRdGy:()=>Ux,schemeRdPu:()=>ck,schemeRdYlBu:()=>Vx,schemeRdYlGn:()=>Hx,schemeReds:()=>Ek,schemeSet1:()=>Sx,schemeSet2:()=>Ex,schemeSet3:()=>Ax,schemeSpectral:()=>Wx,schemeTableau10:()=>Ox,schemeYlGn:()=>fk,schemeYlGnBu:()=>lk,schemeYlOrBr:()=>dk,schemeYlOrRd:()=>yk,select:()=>Nr,selectAll:()=>Zk,selection:()=>Or,selector:()=>gn,selectorAll:()=>bn,shuffle:()=>Ae,shuffler:()=>Oe,some:()=>Ie,sort:()=>Ft,stack:()=>dE,stackOffsetDiverging:()=>yE,stackOffsetExpand:()=>mE,stackOffsetNone:()=>lE,stackOffsetSilhouette:()=>gE,stackOffsetWiggle:()=>vE,stackOrderAppearance:()=>_E,stackOrderAscending:()=>wE,stackOrderDescending:()=>kE,stackOrderInsideOut:()=>TE,stackOrderNone:()=>hE,stackOrderReverse:()=>SE,stratify:()=>ug,style:()=>Gn,subset:()=>qe,sum:()=>Ne,superset:()=>Ke,svg:()=>bl,symbol:()=>wS,symbolAsterisk:()=>$T,symbolCircle:()=>XT,symbolCross:()=>ZT,symbolDiamond:()=>tS,symbolDiamond2:()=>eS,symbolPlus:()=>nS,symbolSquare:()=>rS,symbolSquare2:()=>iS,symbolStar:()=>cS,symbolTimes:()=>vS,symbolTriangle:()=>lS,symbolTriangle2:()=>fS,symbolWye:()=>gS,symbolX:()=>vS,symbols:()=>_S,symbolsFill:()=>_S,symbolsStroke:()=>bS,text:()=>ul,thresholdFreedmanDiaconis:()=>fe,thresholdScott:()=>pe,thresholdSturges:()=>te,tickFormat:()=>Dv,tickIncrement:()=>Zt,tickStep:()=>Jt,ticks:()=>Xt,timeDay:()=>L_,timeDays:()=>R_,timeFormat:()=>Lb,timeFormatDefaultLocale:()=>Jw,timeFormatLocale:()=>Nb,timeFriday:()=>K_,timeFridays:()=>X_,timeHour:()=>A_,timeHours:()=>O_,timeInterval:()=>v_,timeMillisecond:()=>__,timeMilliseconds:()=>b_,timeMinute:()=>k_,timeMinutes:()=>T_,timeMonday:()=>F_,timeMondays:()=>W_,timeMonth:()=>pb,timeMonths:()=>db,timeParse:()=>Rb,timeSaturday:()=>H_,timeSaturdays:()=>Z_,timeSecond:()=>w_,timeSeconds:()=>x_,timeSunday:()=>B_,timeSundays:()=>q_,timeThursday:()=>V_,timeThursdays:()=>$_,timeTickInterval:()=>Sb,timeTicks:()=>Tb,timeTuesday:()=>U_,timeTuesdays:()=>G_,timeWednesday:()=>z_,timeWednesdays:()=>Y_,timeWeek:()=>B_,timeWeeks:()=>q_,timeYear:()=>gb,timeYears:()=>vb,timeout:()=>ao,timer:()=>no,timerFlush:()=>ro,transition:()=>$o,transpose:()=>Ce,tree:()=>vg,treemap:()=>kg,treemapBinary:()=>Tg,treemapDice:()=>ng,treemapResquarify:()=>Eg,treemapSlice:()=>_g,treemapSliceDice:()=>Sg,treemapSquarify:()=>xg,tsv:()=>pl,tsvFormat:()=>hu,tsvFormatBody:()=>fu,tsvFormatRow:()=>du,tsvFormatRows:()=>pu,tsvFormatValue:()=>mu,tsvParse:()=>uu,tsvParseRows:()=>lu,union:()=>We,unixDay:()=>M_,unixDays:()=>D_,utcDay:()=>P_,utcDays:()=>I_,utcFormat:()=>Pb,utcFriday:()=>ib,utcFridays:()=>hb,utcHour:()=>N_,utcHours:()=>C_,utcMillisecond:()=>__,utcMilliseconds:()=>b_,utcMinute:()=>S_,utcMinutes:()=>E_,utcMonday:()=>tb,utcMondays:()=>ab,utcMonth:()=>mb,utcMonths:()=>yb,utcParse:()=>Ib,utcSaturday:()=>ob,utcSaturdays:()=>fb,utcSecond:()=>w_,utcSeconds:()=>x_,utcSunday:()=>Q_,utcSundays:()=>sb,utcThursday:()=>rb,utcThursdays:()=>lb,utcTickInterval:()=>kb,utcTicks:()=>xb,utcTuesday:()=>eb,utcTuesdays:()=>cb,utcWednesday:()=>nb,utcWednesdays:()=>ub,utcWeek:()=>Q_,utcWeeks:()=>sb,utcYear:()=>_b,utcYears:()=>bb,variance:()=>dt,window:()=>Kn,xml:()=>vl,zip:()=>Re,zoom:()=>qE,zoomIdentity:()=>ME,zoomTransform:()=>DE});var o=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},r=[{key:"isVariable",get:function(){return!1}},{key:"hasError",value:function(){return null===this.definition?null===this.value||("array"===this.type.toLowerCase()?!Array.isArray(this.value):e(this.value)!==this.type.toLowerCase()):null!==this.value&&void 0!==this.value&&(this.__typeOfValueValidation()||this.__ruleValueValidation()||this.__ruleMinAndMaxValidation()||this.__ruleRegexValidation())}},{key:"__typeOfValueValidation",value:function(){var t=this.type.toLowerCase();return"Link"===this.definition.type?!Array.isArray(this.value)||this.value.some((function(t){return"string"!=typeof t})):"array"===t?!Array.isArray(this.value):e(this.value)!==t}},{key:"__ruleValueValidation",value:function(){var t=this;return this.definition.rules.values&&Array.isArray(this.value)?!this.value.every((function(e){return t.definition.rules.values.includes(e)})):this.definition.rules.values&&!this.definition.rules.values.includes(this.value)}},{key:"__ruleMinAndMaxValidation",value:function(){var t="number"==typeof this.value?this.value:this.value.length;return null!==this.definition.rules.min&&tthis.definition.rules.max}},{key:"__ruleRegexValidation",value:function(){return null!==this.definition.rules.regex&&!new RegExp(this.definition.rules.regex).test(this.value)}}],r&&function(t,e){for(var r=0;r0&&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 f=h;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 d(t){var e=function(t,e){if("object"!=p(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==p(e)?e:e+""}function m(t,e,n){return e=g(e),function(t,e){if(e&&("object"==p(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 _=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=m(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 f,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&&v(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 s(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]:{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,_=e.minWidth,b=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=_||0,this.minHeight=b||0,this.reservedWidth=w||0,this.reservedHeight=x||0,this.margin=k||10,this.gap=T||30}));const x=w;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 T(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 S(t,e,n){return(e=E(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function E(t){var e=function(t,e){if("object"!=k(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==k(e)?e:e+""}var A=function(t,e,n){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:null,min:null,max:null,regex: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=C(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&&P(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(l);const M=I;var D=function(t,e,n){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 j=D;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,n){return e=z(e),function(t,e){if(e&&("object"==B(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,U()?Reflect.construct(e,n||[],z(t).constructor):e.apply(t,n))}function U(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(U=function(){return!!t})()}function z(t){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},z(t)}function V(t,e){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},V(t,e)}var K=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=F(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&&V(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(l);const H=K;function q(t,e){return null==t||null==e?NaN:te?1:t>=e?0:NaN}function W(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function G(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(iq(t(e),n),r=(e,n)=>t(e)-n):(e=t===q||t===W?t:Y,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=at(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 nt=it(at),rt=it((function(t){const e=at(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 it(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?(ot(a,u,i,o,s),ot(a,i,u,o,s),ot(a,u,i,o,s),st(c,i,u,o,s),st(c,u,i,o,s),st(c,i,u,o,s)):a?(ot(a,i,u,o,s),ot(a,u,i,o,s),ot(a,i,u,o,s)):c&&(st(c,i,u,o,s),st(c,u,i,o,s),st(c,i,u,o,s)),e}}function ot(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 ut(t){return 0|t.length}function lt(t){return!(t>0)}function ht(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function ft(...t){const e="function"==typeof t[t.length-1]&&function(t){return e=>t(...e)}(t.pop()),n=(t=t.map(ht)).map(ut),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(lt))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 pt(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 dt(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 mt(t,e){const n=dt(t,e);return n?Math.sqrt(n):n}function yt(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 vt(t,e){const n=new gt;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 _t(t,e){const n=new gt;let r=-1;return Float64Array.from(t,void 0===e?t=>n.add(+t||0):i=>n.add(+e(i,++r,t)||0))}class bt extends Map{constructor(t,e=St){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(xt(this,t))}has(t){return super.has(xt(this,t))}set(t,e){return super.set(kt(this,t),e)}delete(t){return super.delete(Tt(this,t))}}class wt extends Set{constructor(t,e=St){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(xt(this,t))}add(t){return super.add(kt(this,t))}delete(t){return super.delete(Tt(this,t))}}function xt({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function kt({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Tt({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function St(t){return null!==t&&"object"==typeof t?t.valueOf():t}function Et(t){return t}function At(t,...e){return jt(t,Et,Et,e)}function Ot(t,...e){return jt(t,Array.from,Et,e)}function Nt(t,e){for(let n=1,r=e.length;nt.pop().map((([e,n])=>[...t,e,n]))));return t}function Ct(t,...e){return Nt(Ot(t,...e),e)}function Lt(t,e,...n){return Nt(Pt(t,e,...n),n)}function Rt(t,e,...n){return jt(t,Et,e,n)}function Pt(t,e,...n){return jt(t,Array.from,e,n)}function It(t,...e){return jt(t,Et,Dt,e)}function Mt(t,...e){return jt(t,Array.from,Dt,e)}function Dt(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function jt(t,e,n,r){return function t(i,o){if(o>=r.length)return n(i);const s=new bt,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 Bt(t,e){return Array.from(e,(e=>t[e]))}function Ft(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=zt(r[t],r[n]);if(e)return e}}))):(n=t.map(n),r.sort(((t,e)=>zt(n[t],n[e])))),Bt(t,r)}return t.sort(Ut(n))}function Ut(t=q){if(t===q)return zt;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 zt(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(te?1:0)}function Vt(t,e,n){return(2!==e.length?Ft(Rt(t,e,n),(([t,e],[n,r])=>q(e,r)||q(t,n))):Ft(At(t,n),(([t,n],[r,i])=>e(n,i)||q(t,r)))).map((([t])=>t))}var Kt=Array.prototype,Ht=Kt.slice;function qt(t){return()=>t}Kt.map;const Wt=Math.sqrt(50),Gt=Math.sqrt(10),Yt=Math.sqrt(2);function $t(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>=Wt?10:o>=Gt?5:o>=Yt?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 te(t){return Math.max(1,Math.ceil(Math.log(ct(t))/Math.LN2)+1)}function ee(){var t=Et,e=yt,n=te;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===yt){const t=Zt(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 re(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 ie(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 oe(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 se(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?zt:Ut(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);se(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(ae(t,n,e),i(t[r],o)>0&&ae(t,n,r);s0;)--a}0===i(t[n],o)?ae(t,n,a):(++a,ae(t,a,r)),a<=e&&(n=a+1),e<=a&&(r=a-1)}return t}function ae(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function ce(t,e=q){let n,r=!1;if(1===e.length){let i;for(const o of t){const t=e(o);(r?q(t,i)>0:0===q(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 ue(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 ie(t);if(e>=1)return ne(t);var r,i=(r-1)*e,o=Math.floor(i),s=ne(se(t,o).subarray(0,o+1));return s+(ie(t.subarray(o+1))-s)*(i-o)}}function le(t,e,n=$){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 he(t,e,n=$){if(!isNaN(e=+e)){if(r=Float64Array.from(t,((e,r)=>$(n(t[r],r,t)))),e<=0)return oe(r);if(e>=1)return re(r);var r,i=Uint32Array.from(t,((t,e)=>e)),o=r.length-1,s=Math.floor(o*e);return se(i,s,0,o,((t,e)=>zt(r[t],r[e]))),(s=ce(i.subarray(0,s+1),(t=>r[t])))>=0?s:-1}}function fe(t,e,n){const r=ct(t),i=ue(t,.75)-ue(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function pe(t,e,n){const r=ct(t),i=mt(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function de(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 me(t,e){return ue(t,.5,e)}function ye(t,e){return he(t,.5,e)}function ge(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function ve(t,e){const n=new bt;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 _e(t,e=be){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function be(t,e){return[t,e]}function we(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===q?(t,e)=>zt(n[t],n[e]):Ut(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 ke(t,e=q){let n,r=!1;if(1===e.length){let i;for(const o of t){const t=e(o);(r?q(t,i)<0:0===q(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 Te(t,e=q){if(1===e.length)return oe(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 Se(t,e=q){if(1===e.length)return re(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 Ee(t,e){const n=Te(t,e);return n<0?void 0:n}const Ae=Oe(Math.random);function Oe(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 Ne(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 Ce(t){if(!(i=t.length))return[];for(var e=-1,n=ie(t,Le),r=new Array(n);++ee(n,r,t)))}function je(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 Be(t){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(t).reverse()}function Fe(t,...e){t=new wt(t);for(const n of e)for(const e of n)t.delete(e);return t}function Ue(t,e){const n=e[Symbol.iterator](),r=new wt;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 ze(t,...e){t=new wt(t),e=e.map(Ve);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function Ve(t){return t instanceof wt?t:new wt(t)}function Ke(t,e){const n=t[Symbol.iterator](),r=new Set;for(const t of e){const e=He(t);if(r.has(e))continue;let i,o;for(;({value:i,done:o}=n.next());){if(o)return!1;const t=He(i);if(r.add(t),Object.is(e,t))break}}return!0}function He(t){return null!==t&&"object"==typeof t?t.valueOf():t}function qe(t,e){return Ke(e,t)}function We(...t){const e=new wt;for(const n of t)for(const t of n)e.add(t);return e}function Ge(t){return t}var Ye=1,$e=2,Xe=3,Ze=4,Je=1e-6;function Qe(t){return"translate("+t+",0)"}function tn(t){return"translate(0,"+t+")"}function en(t){return e=>+t(e)}function nn(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function rn(){return!this.__axis}function on(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===Ye||t===Ze?-1:1,l=t===Ze||t===$e?"x":"y",h=t===Ye||t===Xe?Qe:tn;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):Ge:i,m=Math.max(o,0)+a,y=e.range(),g=+y[0]+c,v=+y[y.length-1]+c,_=(e.bandwidth?nn:en)(e.copy(),c),b=f.selection?f.selection():f,w=b.selectAll(".domain").data([null]),x=b.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===Ye?"0em":t===Xe?"0.71em":"0.32em")),f!==b&&(w=w.transition(f),x=x.transition(f),S=S.transition(f),E=E.transition(f),k=k.transition(f).attr("opacity",Je).attr("transform",(function(t){return isFinite(t=_(t))?h(t+c):this.getAttribute("transform")})),T.attr("opacity",Je).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:_(t))+c)}))),k.remove(),w.attr("d",t===Ze||t===$e?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(_(t)+c)})),S.attr(l+"2",u*o),E.attr(l,u*m).text(d),b.filter(rn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===$e?"start":t===Ze?"end":"middle"),b.each((function(){this.__axis=_}))}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 sn(t){return on(Ye,t)}function an(t){return on($e,t)}function cn(t){return on(Xe,t)}function un(t){return on(Ze,t)}var ln={value:()=>{}};function hn(){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}On.prototype={constructor:On,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 In="http://www.w3.org/1999/xhtml";const Mn={svg:"http://www.w3.org/2000/svg",xhtml:In,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Dn(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Mn.hasOwnProperty(e)?{space:Mn[e],local:t}:t}function jn(t){return function(){this.removeAttribute(t)}}function Bn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Fn(t,e){return function(){this.setAttribute(t,e)}}function Un(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function zn(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Vn(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 Kn(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Hn(t){return function(){this.style.removeProperty(t)}}function qn(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Wn(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Gn(t,e){return t.style.getPropertyValue(e)||Kn(t).getComputedStyle(t,null).getPropertyValue(e)}function Yn(t){return function(){delete this[t]}}function $n(t,e){return function(){this[t]=e}}function Xn(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Zn(t){return t.trim().split(/^|\s+/)}function Jn(t){return t.classList||new Qn(t)}function Qn(t){this._node=t,this._names=Zn(t.getAttribute("class")||"")}function tr(t,e){for(var n=Jn(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 Sr=[null];function Er(t,e){this._groups=t,this._parents=e}function Ar(){return new Er([[document.documentElement]],Sr)}Er.prototype=Ar.prototype={constructor:Er,select:function(t){"function"!=typeof t&&(t=gn(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=w&&(w=b+1);!(_=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=Pn);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==e?Hn:"function"==typeof e?Wn:qn)(t,e,null==n?"":n)):Gn(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Yn:"function"==typeof e?Xn:$n)(t,e)):this.node()[t]},classed:function(t,e){var n=Zn(t+"");if(arguments.length<2){for(var r=Jn(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?wr:br,r=0;r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ni(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ni(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=qr.exec(t))?new oi(e[1],e[2],e[3],1):(e=Wr.exec(t))?new oi(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Gr.exec(t))?ni(e[1],e[2],e[3],e[4]):(e=Yr.exec(t))?ni(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=$r.exec(t))?hi(e[1],e[2]/100,e[3]/100,1):(e=Xr.exec(t))?hi(e[1],e[2]/100,e[3]/100,e[4]):Zr.hasOwnProperty(t)?ei(Zr[t]):"transparent"===t?new oi(NaN,NaN,NaN,0):null}function ei(t){return new oi(t>>16&255,t>>8&255,255&t,1)}function ni(t,e,n,r){return r<=0&&(t=e=n=NaN),new oi(t,e,n,r)}function ri(t){return t instanceof Br||(t=ti(t)),t?new oi((t=t.rgb()).r,t.g,t.b,t.opacity):new oi}function ii(t,e,n,r){return 1===arguments.length?ri(t):new oi(t,e,n,null==r?1:r)}function oi(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function si(){return`#${li(this.r)}${li(this.g)}${li(this.b)}`}function ai(){const t=ci(this.opacity);return`${1===t?"rgb(":"rgba("}${ui(this.r)}, ${ui(this.g)}, ${ui(this.b)}${1===t?")":`, ${t})`}`}function ci(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ui(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function li(t){return((t=ui(t))<16?"0":"")+t.toString(16)}function hi(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new di(t,e,n,r)}function fi(t){if(t instanceof di)return new di(t.h,t.s,t.l,t.opacity);if(t instanceof Br||(t=ti(t)),!t)return new di;if(t instanceof di)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 di(s,a,c,t.opacity)}function pi(t,e,n,r){return 1===arguments.length?fi(t):new di(t,e,n,null==r?1:r)}function di(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function mi(t){return(t=(t||0)%360)<0?t+360:t}function yi(t){return Math.max(0,Math.min(1,t||0))}function gi(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 vi(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 _i(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),gi(t,i,r),gi(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new di(mi(this.h),yi(this.s),yi(this.l),ci(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=ci(this.opacity);return`${1===t?"hsl(":"hsla("}${mi(this.h)}, ${100*yi(this.s)}%, ${100*yi(this.l)}%${1===t?")":`, ${t})`}`}}));const wi=t=>()=>t;function xi(t,e){return function(n){return t+n*e}}function ki(t,e){var n=e-t;return n?xi(t,n>180||n<-180?n-360*Math.round(n/360):n):wi(isNaN(t)?e:t)}function Ti(t,e){var n=e-t;return n?xi(t,n):wi(isNaN(t)?e:t)}const Si=function t(e){var n=function(t){return 1==(t=+t)?Ti: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):wi(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=ii(t)).r,(e=ii(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),s=Ti(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 Ei(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:Ii(n,r)})),o=ji.lastIndex;return o=0&&e._call.call(void 0,t),e=e._next;--Hi}function io(){$i=(Yi=Zi.now())+Xi,Hi=qi=0;try{ro()}finally{Hi=0,function(){for(var t,e,n=Vi,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:Vi=e);Ki=t,so(r)}(),$i=0}}function oo(){var t=Zi.now(),e=t-Yi;e>Gi&&(Xi-=e,Yi=t)}function so(t){Hi||(qi&&(qi=clearTimeout(qi)),t-$i>24?(t<1/0&&(qi=setTimeout(io,t-Zi.now()-Xi)),Wi&&(Wi=clearInterval(Wi))):(Wi||(Yi=Zi.now(),Wi=setInterval(oo,Gi)),Hi=1,Ji(io)))}function ao(t,e,n){var r=new eo;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}eo.prototype=no.prototype={constructor:eo,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Qi():+n)+(null==e?0:+e),this._next||Ki===this||(Ki?Ki._next=this:Vi=this,Ki=this),this._call=t,this._time=n,so()},stop:function(){this._call&&(this._call=null,this._time=1/0,so())}};var co=mn("start","end","cancel","interrupt"),uo=[],lo=0,ho=1,fo=2,po=3,mo=5,yo=6;function go(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!==ho)return a();for(u in i)if((f=i[u]).name===n.name){if(f.state===po)return ao(o);4===f.state?(f.state=yo,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+ulo)throw new Error("too late; already scheduled");return n}function _o(t,e){var n=bo(t,e);if(n.state>po)throw new Error("too late; already running");return n}function bo(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function wo(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>fo&&n.state180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Ii(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:Ii(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:Ii(t,n)},{i:a-2,x:Ii(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)?vo:_o;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=Dn(t),r="transform"===n?Oo:Ro;return this.attrTween(t,"function"==typeof e?(n.local?Bo:jo)(n,r,Lo(this,"attr."+t,e)):null==e?(n.local?Io:Po)(n):(n.local?Do:Mo)(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=Dn(t);return this.tween(n,(r.local?Fo:Uo)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Ao:Ro;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=Gn(this,t),s=(this.style.removeProperty(t),Gn(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}(t,r)).on("end.style."+t,Wo(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var s=Gn(this,t),a=n(this),c=a+"";return null==a&&(this.style.removeProperty(t),c=a=Gn(this,t)),s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,a))}}(t,r,Lo(this,"style."+t,e))).each(function(t,e){var n,r,i,o,s="style."+e,a="end."+s;return function(){var c=_o(this,t),u=c.on,l=null==c.value[s]?o||(o=Wo(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=Gn(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}}(Lo(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=bo(this.node(),n).tween,o=0,s=i.length;oho&&n.name===e)return new Yo([[t]],rs,e,+r);return null}const os=t=>()=>t;function ss(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 as(t){t.preventDefault(),t.stopImmediatePropagation()}var cs={name:"drag"},us={name:"space"},ls={name:"handle"},hs={name:"center"};const{abs:fs,max:ps,min:ds}=Math;function ms(t){return[+t[0],+t[1]]}function ys(t){return[ms(t[0]),ms(t[1])]}var gs={name:"x",handles:["w","e"].map(Ss),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]]}},vs={name:"y",handles:["n","s"].map(Ss),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]]}},_s={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Ss),input:function(t){return null==t?null:ys(t)},output:function(t){return t}},bs={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"},ws={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},xs={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},ks={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Ts={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Ss(t){return{type:t}}function Es(t){return!t.ctrlKey&&!t.button}function As(){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 Os(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ns(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Cs(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function Ls(){return Is(gs)}function Rs(){return Is(vs)}function Ps(){return Is(_s)}function Is(t){var e,n=As,r=Es,i=Os,o=!0,s=mn("start","brush","end"),a=6;function c(e){var n=e.property("__brush",m).selectAll(".overlay").data([Ss("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",bs.overlay).merge(n).each((function(){var t=Ns(this).extent;Nr(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([Ss("selection")]).enter().append("rect").attr("class","selection").attr("cursor",bs.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 bs[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=Nr(this),e=Ns(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,_=n.target.__data__.type,b="selection"===(o&&n.metaKey?_="overlay":_)?cs:o&&n.altKey?hs:ls,w=t===vs?null:ks[_],x=t===gs?null:Ts[_],k=Ns(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=zi(t,v)).point0=t.slice(),t.identifier=e,t}));wo(v);var I=l(v,arguments,!0).beforestart();if("overlay"===_){S&&(m=!0);const e=[P[0],P[1]||P[0]];k.selection=S=[[i=t===vs?E:ds(e[0][0],e[1][0]),a=t===gs?A:ds(e[0][1],e[1][1])],[h=t===vs?O:ps(e[0][0],e[1][0]),p=t===gs?N:ps(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=Nr(v).attr("pointer-events","none"),D=M.selectAll(".overlay").attr("cursor",bs[_]);if(n.touches)I.moved=B,I.ended=U;else{var j=Nr(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:b===ls&&(w&&(h=f-C*w,i=s+C*w),x&&(p=d-L*x,a=c+L*x),b=hs,F(t));break;case 32:b!==ls&&b!==hs||(w<0?h=f-C:w>0&&(i=s-C),x<0?p=d-L:x>0&&(a=c-L),b=us,D.attr("cursor",bs.selection),F(t));break;default:return}as(t)}),!0).on("keyup.brush",(function(t){switch(t.keyCode){case 16:R&&(y=g=R=!1,F(t));break;case 18:b===hs&&(w<0?h=f:w>0&&(i=s),x<0?p=d:x>0&&(a=c),b=ls,F(t));break;case 32:b===us&&(t.altKey?(w&&(h=f-C*w,i=s+C*w),x&&(p=d-L*x,a=c+L*x),b=hs):(w<0?h=f:w>0&&(i=s),x<0?p=d:x>0&&(a=c),b=ls),D.attr("cursor",bs[_]),F(t));break;default:return}as(t)}),!0),Ir(n.view)}u.call(v),I.start(n,b.name)}function B(t){for(const e of t.changedTouches||[t])for(const t of P)t.identifier===e.identifier&&(t.cur=zi(e,v));if(R&&!y&&!g&&1===P.length){const t=P[0];fs(t.cur[0]-t[0])>fs(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,as(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],b){case us:case cs:w&&(C=ps(E-i,ds(O-h,C)),s=i+C,f=h+C),x&&(L=ps(A-a,ds(N-p,L)),c=a+L,d=p+L);break;case ls:P[1]?(w&&(s=ps(E,ds(O,P[0][0])),f=ps(E,ds(O,P[1][0])),w=1),x&&(c=ps(A,ds(N,P[0][1])),d=ps(A,ds(N,P[1][1])),x=1)):(w<0?(C=ps(E-i,ds(O-i,C)),s=i+C,f=h):w>0&&(C=ps(E-h,ds(O-h,C)),s=i,f=h+C),x<0?(L=ps(A-a,ds(N-a,L)),c=a+L,d=p):x>0&&(L=ps(A-p,ds(N-p,L)),c=a,d=p+L));break;case hs:w&&(s=ps(E,ds(O,i-C*w)),f=ps(E,ds(O,h+C*w))),x&&(c=ps(A,ds(N,a-L*x)),d=ps(A,ds(N,p+L*x)))}ft+n))}function Hs(){return Gs(!1,!1)}function qs(){return Gs(!1,!0)}function Ws(){return Gs(!0,!1)}function Gs(t,e){var n=0,r=null,i=null,o=null;function s(s){var a,c=s.length,u=new Array(c),l=Ks(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=Ks(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=Ks(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 Js;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;eXs)if(Math.abs(l*a-c*u)>Xs&&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((Ys-Math.acos((d+h-m)/(2*y*g)))/2),_=v/g,b=v/y;Math.abs(_-1)>Xs&&this._append`L${t+_*u},${e+_*l}`,this._append`A${i},${i},0,0,${+(l*f>u*p)},${this._x1=t+b*a},${this._y1=e+b*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)>Xs||Math.abs(this._y1-u)>Xs)&&this._append`L${c},${u}`,n&&(h<0&&(h=h%$s+$s),h>Zs?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>Xs&&this._append`A${n},${n},0,${+(h>=Ys)},${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 ta(){return new Qs}function ea(t=3){return new Qs(+t)}ta.prototype=Qs.prototype;var na=Array.prototype.slice;function ra(t){return function(){return t}}function ia(t){return t.source}function oa(t){return t.target}function sa(t){return t.radius}function aa(t){return t.startAngle}function ca(t){return t.endAngle}function ua(){return 0}function la(){return 10}function ha(t){var e=ia,n=oa,r=sa,i=sa,o=aa,s=ca,a=ua,c=null;function u(){var u,l=e.apply(this,arguments),h=n.apply(this,arguments),f=a.apply(this,arguments)/2,p=na.call(arguments),d=+r.apply(this,(p[0]=l,p)),m=o.apply(this,p)-Fs,y=s.apply(this,p)-Fs,g=+i.apply(this,(p[0]=h,p)),v=o.apply(this,p)-Fs,_=s.apply(this,p)-Fs;if(c||(c=u=ta()),f>Vs&&(Ms(y-m)>2*f+Vs?y>m?(m+=f,y-=f):(m-=f,y+=f):m=y=(m+y)/2,Ms(_-v)>2*f+Vs?_>v?(v+=f,_-=f):(v-=f,_+=f):v=_=(v+_)/2),c.moveTo(d*Ds(m),d*js(m)),c.arc(0,0,d,m,y),m!==v||y!==_)if(t){var b=g-+t.apply(this,arguments),w=(v+_)/2;c.quadraticCurveTo(0,0,b*Ds(v),b*js(v)),c.lineTo(g*Ds(w),g*js(w)),c.lineTo(b*Ds(_),b*js(_))}else c.quadraticCurveTo(0,0,g*Ds(v),g*js(v)),c.arc(0,0,g,v,_);if(c.quadraticCurveTo(0,0,d*Ds(m),d*js(m)),c.closePath(),u)return c=null,u+""||null}return t&&(u.headRadius=function(e){return arguments.length?(t="function"==typeof e?e:ra(+e),u):t}),u.radius=function(t){return arguments.length?(r=i="function"==typeof t?t:ra(+t),u):r},u.sourceRadius=function(t){return arguments.length?(r="function"==typeof t?t:ra(+t),u):r},u.targetRadius=function(t){return arguments.length?(i="function"==typeof t?t:ra(+t),u):i},u.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:ra(+t),u):o},u.endAngle=function(t){return arguments.length?(s="function"==typeof t?t:ra(+t),u):s},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:ra(+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 fa(){return ha()}function pa(){return ha(la)}const da=Math.PI/180,ma=180/Math.PI,ya=.96422,ga=1,va=.82521,_a=4/29,ba=6/29,wa=3*ba*ba,xa=ba*ba*ba;function ka(t){if(t instanceof Ea)return new Ea(t.l,t.a,t.b,t.opacity);if(t instanceof Ia)return Ma(t);t instanceof oi||(t=ri(t));var e,n,r=Ca(t.r),i=Ca(t.g),o=Ca(t.b),s=Aa((.2225045*r+.7168786*i+.0606169*o)/ga);return r===i&&i===o?e=n=s:(e=Aa((.4360747*r+.3850649*i+.1430804*o)/ya),n=Aa((.0139322*r+.0971045*i+.7141733*o)/va)),new Ea(116*s-16,500*(e-s),200*(s-n),t.opacity)}function Ta(t,e){return new Ea(t,0,0,null==e?1:e)}function Sa(t,e,n,r){return 1===arguments.length?ka(t):new Ea(t,e,n,null==r?1:r)}function Ea(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Aa(t){return t>xa?Math.pow(t,1/3):t/wa+_a}function Oa(t){return t>ba?t*t*t:wa*(t-_a)}function Na(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ca(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function La(t){if(t instanceof Ia)return new Ia(t.h,t.c,t.l,t.opacity);if(t instanceof Ea||(t=ka(t)),0===t.a&&0===t.b)return new Ia(NaN,0()=>t;function $a(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 Za(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 Ja(){}var Qa=[[],[[[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 tc(){var t=1,e=1,n=te,r=a;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Ga);else{const n=yt(t,ec);for(e=Xt(...Qt(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=nc(n[0],r),Qa[u<<1].forEach(d);++o=r,Qa[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)?Ya(Wa.call(t)):Ya(t),i):n},i.smooth=function(t){return arguments.length?(r=t?a:Ja,i):r===a},i}function ec(t){return isFinite(t)?t:NaN}function nc(t,e){return null!=t&&+t>=e}function rc(t){return null==t||isNaN(t=+t)?-1/0:t}function ic(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 oc(t){return t[0]}function sc(t){return t[1]}function ac(){return 1}function cc(){var t=oc,e=sc,n=ac,r=960,i=500,o=20,s=2,a=3*o,c=r+2*a>>s,u=i+2*a>>s,l=Ya(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=tc().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:()=>ne(e)/r}),i},f.x=function(e){return arguments.length?(t="function"==typeof e?e:Ya(+e),f):t},f.y=function(t){return arguments.length?(e="function"==typeof t?t:Ya(+t),f):e},f.weight=function(t){return arguments.length?(n="function"==typeof t?t:Ya(+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)?Ya(Wa.call(t)):Ya(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 uc=134217729;function lc(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;b=S*O,f=uc*S,p=f-(f-S),d=S-p,f=uc*O,m=f-(f-O),y=O-m,w=d*y-(b-p*m-d*m-p*y),x=A*E,f=uc*A,p=f-(f-A),d=A-p,f=uc*E,m=f-(f-E),y=E-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,fc[0]=w-(g+h)+(h-k),v=b+g,h=v-b,_=b-(v-h)+(g-h),g=_-x,h=_-g,fc[1]=_-(g+h)+(h-x),T=v+g,h=T-v,fc[2]=v-(T-h)+(g-h),fc[3]=T;let N=function(t,e){let n=e[0];for(let t=1;t<4;t++)n+=e[t];return n}(0,fc),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;b=a*O,f=uc*a,p=f-(f-a),d=a-p,f=uc*O,m=f-(f-O),y=O-m,w=d*y-(b-p*m-d*m-p*y),x=c*E,f=uc*c,p=f-(f-c),d=c-p,f=uc*E,m=f-(f-E),y=E-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,yc[0]=w-(g+h)+(h-k),v=b+g,h=v-b,_=b-(v-h)+(g-h),g=_-x,h=_-g,yc[1]=_-(g+h)+(h-x),T=v+g,h=T-v,yc[2]=v-(T-h)+(g-h),yc[3]=T;const L=lc(4,fc,4,yc,pc);b=S*l,f=uc*S,p=f-(f-S),d=S-p,f=uc*l,m=f-(f-l),y=l-m,w=d*y-(b-p*m-d*m-p*y),x=A*u,f=uc*A,p=f-(f-A),d=A-p,f=uc*u,m=f-(f-u),y=u-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,yc[0]=w-(g+h)+(h-k),v=b+g,h=v-b,_=b-(v-h)+(g-h),g=_-x,h=_-g,yc[1]=_-(g+h)+(h-x),T=v+g,h=T-v,yc[2]=v-(T-h)+(g-h),yc[3]=T;const R=lc(L,pc,4,yc,dc);b=a*l,f=uc*a,p=f-(f-a),d=a-p,f=uc*l,m=f-(f-l),y=l-m,w=d*y-(b-p*m-d*m-p*y),x=c*u,f=uc*c,p=f-(f-c),d=c-p,f=uc*u,m=f-(f-u),y=u-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,yc[0]=w-(g+h)+(h-k),v=b+g,h=v-b,_=b-(v-h)+(g-h),g=_-x,h=_-g,yc[1]=_-(g+h)+(h-x),T=v+g,h=T-v,yc[2]=v-(T-h)+(g-h),yc[3]=T;const P=lc(R,dc,4,yc,mc);return mc[P-1]}(t,e,n,r,i,o,u)}hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(8),hc(8),hc(8),hc(4),hc(8),hc(8),hc(8),hc(12),hc(192),hc(192),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(8),hc(8),hc(8),hc(8),hc(8),hc(8),hc(8),hc(8),hc(8),hc(4),hc(4),hc(4),hc(8),hc(16),hc(16),hc(16),hc(32),hc(32),hc(48),hc(64),hc(1152),hc(1152),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(24),hc(24),hc(24),hc(24),hc(24),hc(24),hc(24),hc(24),hc(24),hc(24),hc(1152),hc(1152),hc(1152),hc(1152),hc(1152),hc(2304),hc(2304),hc(3456),hc(5760),hc(8),hc(8),hc(8),hc(16),hc(24),hc(48),hc(48),hc(96),hc(192),hc(384),hc(384),hc(384),hc(768),hc(96),hc(96),hc(96),hc(1152);const vc=Math.pow(2,-52),_c=new Uint32Array(512);class bc{static from(t,e=Ec,n=Ac){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).fill(-1),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,m=1/0;for(let e=0;e0&&(p=e,m=n)}let v=t[2*p],_=t[2*p+1],b=1/0;for(let e=0;er&&(e[n++]=i,r=this._dists[i])}return this.hull=e.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(gc(y,g,v,_,w,x)<0){const t=p,e=v,n=_;p=d,v=w,_=x,d=t,w=e,x=n}const k=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}}(y,g,v,_,w,x);this._cx=k.x,this._cy=k.y;for(let e=0;e0&&Math.abs(u-o)<=vc&&Math.abs(l-s)<=vc)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,T++;let v=n[y];for(;m=n[v],gc(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,T--,v=m;if(y===h)for(;m=e[y],gc(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,T--,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(T);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=_c[--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(xc(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<_c.length&&(_c[i++]=a)}else{if(0===i)break;t=_c[--i]}}return o}_link(t,e){this._halfedges[t]=e,-1!==e&&(this._halfedges[e]=t)}_addTriangle(t,e,n,r,i,o){const s=this.trianglesLen;return this._triangles[s]=t,this._triangles[s+1]=e,this._triangles[s+2]=n,this._link(s,r),this._link(s+1,i),this._link(s+2,o),this.trianglesLen+=3,s}}function wc(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function xc(t,e,n,r,i,o,s,a){const c=t-s,u=e-a,l=n-s,h=r-a,f=i-s,p=o-a,d=l*l+h*h,m=f*f+p*p;return c*(h*m-d*p)-u*(l*m-d*f)+(c*c+u*u)*(l*p-h*f)<0}function kc(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),p=(u*l-a*h)*f,d=(s*h-c*l)*f;return p*p+d*d}function Tc(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const r=t[i],o=e[r];let s=i-1;for(;s>=n&&e[t[s]]>o;)t[s+1]=t[s--];t[s+1]=r}else{let i=n+1,o=r;Sc(t,n+r>>1,i),e[t[n]]>e[t[r]]&&Sc(t,n,r),e[t[i]]>e[t[r]]&&Sc(t,i,r),e[t[n]]>e[t[i]]&&Sc(t,n,i);const s=t[i],a=e[s];for(;;){do{i++}while(e[t[i]]a);if(o=o-n?(Tc(t,e,i,r),Tc(t,e,n,o-1)):(Tc(t,e,n,o-1),Tc(t,e,i,r))}}function Sc(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Ec(t){return t[0]}function Ac(t){return t[1]}const Oc=1e-6;class Nc{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)>Oc||Math.abs(this._y1-i)>Oc)&&(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 Cc{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 Lc{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 Lc(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=Pc(e-c[2*t],2)+Pc(n-c[2*t+1],2);const h=r[t];let f=h;do{let r=a[f];const h=Pc(e-c[2*r],2)+Pc(n-c[2*r+1],2);if(h()=>t;function Fc(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 Uc(t){return!t.ctrlKey&&!t.button}function zc(){return this.parentNode}function Vc(t,e){return null==e?{x:t.x,y:t.y}:e}function Kc(){return navigator.maxTouchPoints||"ontouchstart"in this}function Hc(){var t,e,n,r,i=Uc,o=zc,s=Vc,a=Kc,c={},u=mn("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,Cr).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=_(this,o.call(this,s,a),s,a,"mouse");c&&(Nr(s.view).on("mousemove.drag",d,Lr).on("mouseup.drag",m,Lr),Ir(s.view),Rr(s),n=!1,t=s.clientX,e=s.clientY,c("start",s))}}function d(r){if(Pr(r),!n){var i=r.clientX-t,o=r.clientY-e;n=i*i+o*o>h}c.mouse("drag",r)}function m(t){Nr(t.view).on("mousemove.drag mouseup.drag",null),Mr(t.view,n),Pr(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++))===Yc?u=!0:r===$c&&(u=!0,t.charCodeAt(s)===Yc&&++s),t.slice(i+1,e-1).replace(/""/g,'"')}for(;s9999?"+"+Jc(e,6):Jc(e,4))+"-"+Jc(t.getUTCMonth()+1,2)+"-"+Jc(t.getUTCDate(),2)+(o?"T"+Jc(n,2)+":"+Jc(r,2)+":"+Jc(i,2)+"."+Jc(o,3)+"Z":i?"T"+Jc(n,2)+":"+Jc(r,2)+":"+Jc(i,2)+"Z":r||n?"T"+Jc(n,2)+":"+Jc(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=Xc(t);return function(r,i){return e(n(r),i,t)}}(t,e):Xc(t)}));return o.columns=i||[],o},parseRows:r,format:function(e,n){return null==n&&(n=Zc(e)),[n.map(s).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=Zc(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:s}}var tu=Qc(","),eu=tu.parse,nu=tu.parseRows,ru=tu.format,iu=tu.formatBody,ou=tu.formatRows,su=tu.formatRow,au=tu.formatValue,cu=Qc("\t"),uu=cu.parse,lu=cu.parseRows,hu=cu.format,fu=cu.formatBody,pu=cu.formatRows,du=cu.formatRow,mu=cu.formatValue;function yu(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;gu&&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 gu=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),vu=t=>+t;function _u(t){return t*t}function bu(t){return t*(2-t)}function wu(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var xu=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),ku=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),Tu=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),Su=Math.PI,Eu=Su/2;function Au(t){return 1==+t?1:1-Math.cos(t*Eu)}function Ou(t){return Math.sin(t*Eu)}function Nu(t){return(1-Math.cos(Su*t))/2}function Cu(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Lu(t){return Cu(1-+t)}function Ru(t){return 1-Cu(t)}function Pu(t){return((t*=2)<=1?Cu(1-t):2-Cu(t-1))/2}function Iu(t){return 1-Math.sqrt(1-t*t)}function Mu(t){return Math.sqrt(1- --t*t)}function Du(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var ju=4/11,Bu=6/11,Fu=8/11,Uu=3/4,zu=9/11,Vu=10/11,Ku=15/16,Hu=21/22,qu=63/64,Wu=1/ju/ju;function Gu(t){return 1-Yu(1-t)}function Yu(t){return(t=+t)ul(e,n).then((e=>(new DOMParser).parseFromString(e,t)))}const vl=gl("application/xml");var _l=gl("text/html"),bl=gl("image/svg+xml");function wl(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 kl(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Tl(t){return t[0]}function Sl(t){return t[1]}function El(t,e,n){var r=new Al(null==e?Tl:e,null==n?Sl:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Al(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 Ol(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Nl=El.prototype=Al.prototype;function Cl(t){return function(){return t}}function Ll(t){return 1e-6*(t()-.5)}function Rl(t){return t.x+t.vx}function Pl(t){return t.y+t.vy}function Il(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),_=e-+this._y.call(null,m.data),b=v*v+_*_;if(b=(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)},Nl.removeAll=function(t){for(var e=0,n=t.length;e(t=(Bl*t+Fl)%Ul)/Ul}();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 Wl(){var t,e,n,r,i,o=Cl(-30),s=1,a=1/0,c=.81;function u(n){var i,o=t.length,s=El(t,zl,Vl).visitAfter(h);for(r=n,i=0;i=a)){(t.data!==e||t.next)&&(0===h&&(d+=(h=Ll(n))*h),0===f&&(d+=(f=Ll(n))*f),d1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Zl(t){return(t=Xl(Math.abs(t)))?t[1]:NaN}var Jl,Ql=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function th(t){if(!(e=Ql.exec(t)))throw new Error("invalid format: "+t);var e;return new eh({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 eh(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 nh(t,e){var n=Xl(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")}th.prototype=eh.prototype,eh.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 rh={"%":(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)=>nh(100*t,e),r:nh,s:function(t,e){var n=Xl(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Jl=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")+Xl(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function ih(t){return t}var oh,sh,ah,ch=Array.prototype.map,uh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function lh(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?ih:(e=ch.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?ih:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(ch.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=th(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"):rh[v]||(void 0===y&&(y=12),g=!0,v="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var _="$"===f?i:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",b="$"===f?o:/[%p]/.test(v)?c:"",w=rh[v],x=/[defgprs%]/.test(v);function k(t){var i,o,c,f=_,k=b;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?uh[8+Jl/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=th(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Zl(e)/3))),i=Math.pow(10,-r),o=uh[8+r/3];return function(t){return n(i*t)+o}}}}function hh(t){return oh=lh(t),sh=oh.format,ah=oh.formatPrefix,oh}function fh(t){return Math.max(0,-Zl(Math.abs(t)))}function ph(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Zl(e)/3)))-Zl(Math.abs(t)))}function dh(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Zl(e)-Zl(t))+1}hh({thousands:",",grouping:[3],currency:["$",""]});var mh=1e-6,yh=1e-12,gh=Math.PI,vh=gh/2,_h=gh/4,bh=2*gh,wh=180/gh,xh=gh/180,kh=Math.abs,Th=Math.atan,Sh=Math.atan2,Eh=Math.cos,Ah=Math.ceil,Oh=Math.exp,Nh=(Math.floor,Math.hypot),Ch=Math.log,Lh=Math.pow,Rh=Math.sin,Ph=Math.sign||function(t){return t>0?1:t<0?-1:0},Ih=Math.sqrt,Mh=Math.tan;function Dh(t){return t>1?0:t<-1?gh:Math.acos(t)}function jh(t){return t>1?vh:t<-1?-vh:Math.asin(t)}function Bh(t){return(t=Rh(t/2))*t}function Fh(){}function Uh(t,e){t&&Vh.hasOwnProperty(t.type)&&Vh[t.type](t,e)}var zh={Feature:function(t,e){Uh(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=Eh(e=(e*=xh)/2+_h),s=Rh(e),a=Xh*s,c=$h*o+a*Eh(i),u=a*r*Rh(i);uf.add(Sh(u,c)),Yh=t,$h=o,Xh=s}function yf(t){return lf=new gt,qh(t,hf),2*lf}function gf(t){return[Sh(t[1],t[0]),jh(t[2])]}function vf(t){var e=t[0],n=t[1],r=Eh(n);return[r*Eh(e),r*Rh(e),Rh(n)]}function _f(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function bf(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 wf(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function xf(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function kf(t){var e=Ih(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Tf,Sf,Ef,Af,Of,Nf,Cf,Lf,Rf,Pf,If,Mf,Df,jf,Bf,Ff,Uf={point:zf,lineStart:Kf,lineEnd:Hf,polygonStart:function(){Uf.point=qf,Uf.lineStart=Wf,Uf.lineEnd=Gf,sf=new gt,hf.polygonStart()},polygonEnd:function(){hf.polygonEnd(),Uf.point=zf,Uf.lineStart=Kf,Uf.lineEnd=Hf,uf<0?(Zh=-(Qh=180),Jh=-(tf=90)):sf>mh?tf=90:sf<-mh&&(Jh=-90),cf[0]=Zh,cf[1]=Qh},sphere:function(){Zh=-(Qh=180),Jh=-(tf=90)}};function zf(t,e){af.push(cf=[Zh=t,Qh=t]),etf&&(tf=e)}function Vf(t,e){var n=vf([t*xh,e*xh]);if(of){var r=bf(of,n),i=bf([r[1],-r[0],0],r);kf(i),i=gf(i);var o,s=t-ef,a=s>0?1:-1,c=i[0]*wh*a,u=kh(s)>180;u^(a*eftf&&(tf=o):u^(a*ef<(c=(c+360)%360-180)&&ctf&&(tf=e)),u?tYf(Zh,Qh)&&(Qh=t):Yf(t,Qh)>Yf(Zh,Qh)&&(Zh=t):Qh>=Zh?(tQh&&(Qh=t)):t>ef?Yf(Zh,t)>Yf(Zh,Qh)&&(Qh=t):Yf(t,Qh)>Yf(Zh,Qh)&&(Zh=t)}else af.push(cf=[Zh=t,Qh=t]);etf&&(tf=e),of=n,ef=t}function Kf(){Uf.point=Vf}function Hf(){cf[0]=Zh,cf[1]=Qh,Uf.point=zf,of=null}function qf(t,e){if(of){var n=t-ef;sf.add(kh(n)>180?n+(n>0?360:-360):n)}else nf=t,rf=e;hf.point(t,e),Vf(t,e)}function Wf(){hf.lineStart()}function Gf(){qf(nf,rf),hf.lineEnd(),kh(sf)>mh&&(Zh=-(Qh=180)),cf[0]=Zh,cf[1]=Qh,of=null}function Yf(t,e){return(e-=t)<0?e+360:e}function $f(t,e){return t[0]-e[0]}function Xf(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eYf(r[0],r[1])&&(r[1]=i[1]),Yf(i[0],r[1])>Yf(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=Yf(r[1],i[0]))>s&&(s=a,Zh=i[0],Qh=r[1])}return af=cf=null,Zh===1/0||Jh===1/0?[[NaN,NaN],[NaN,NaN]]:[[Zh,Jh],[Qh,tf]]}var Jf={sphere:Fh,point:Qf,lineStart:ep,lineEnd:ip,polygonStart:function(){Jf.lineStart=op,Jf.lineEnd=sp},polygonEnd:function(){Jf.lineStart=ep,Jf.lineEnd=ip}};function Qf(t,e){t*=xh;var n=Eh(e*=xh);tp(n*Eh(t),n*Rh(t),Rh(e))}function tp(t,e,n){++Tf,Ef+=(t-Ef)/Tf,Af+=(e-Af)/Tf,Of+=(n-Of)/Tf}function ep(){Jf.point=np}function np(t,e){t*=xh;var n=Eh(e*=xh);jf=n*Eh(t),Bf=n*Rh(t),Ff=Rh(e),Jf.point=rp,tp(jf,Bf,Ff)}function rp(t,e){t*=xh;var n=Eh(e*=xh),r=n*Eh(t),i=n*Rh(t),o=Rh(e),s=Sh(Ih((s=Bf*o-Ff*i)*s+(s=Ff*r-jf*o)*s+(s=jf*i-Bf*r)*s),jf*r+Bf*i+Ff*o);Sf+=s,Nf+=s*(jf+(jf=r)),Cf+=s*(Bf+(Bf=i)),Lf+=s*(Ff+(Ff=o)),tp(jf,Bf,Ff)}function ip(){Jf.point=Qf}function op(){Jf.point=ap}function sp(){cp(Mf,Df),Jf.point=Qf}function ap(t,e){Mf=t,Df=e,t*=xh,e*=xh,Jf.point=cp;var n=Eh(e);jf=n*Eh(t),Bf=n*Rh(t),Ff=Rh(e),tp(jf,Bf,Ff)}function cp(t,e){t*=xh;var n=Eh(e*=xh),r=n*Eh(t),i=n*Rh(t),o=Rh(e),s=Bf*o-Ff*i,a=Ff*r-jf*o,c=jf*i-Bf*r,u=Nh(s,a,c),l=jh(u),h=u&&-l/u;Rf.add(h*s),Pf.add(h*a),If.add(h*c),Sf+=l,Nf+=l*(jf+(jf=r)),Cf+=l*(Bf+(Bf=i)),Lf+=l*(Ff+(Ff=o)),tp(jf,Bf,Ff)}function up(t){Tf=Sf=Ef=Af=Of=Nf=Cf=Lf=0,Rf=new gt,Pf=new gt,If=new gt,qh(t,Jf);var e=+Rf,n=+Pf,r=+If,i=Nh(e,n,r);return igh&&(t-=Math.round(t/bh)*bh),[t,e]}function pp(t,e,n){return(t%=bh)?e||n?hp(mp(t),yp(e,n)):mp(t):e||n?yp(e,n):fp}function dp(t){return function(e,n){return kh(e+=t)>gh&&(e-=Math.round(e/bh)*bh),[e,n]}}function mp(t){var e=dp(t);return e.invert=dp(-t),e}function yp(t,e){var n=Eh(t),r=Rh(t),i=Eh(e),o=Rh(e);function s(t,e){var s=Eh(e),a=Eh(t)*s,c=Rh(t)*s,u=Rh(e),l=u*n+a*r;return[Sh(c*i-l*o,a*n-u*r),jh(l*i+c*o)]}return s.invert=function(t,e){var s=Eh(e),a=Eh(t)*s,c=Rh(t)*s,u=Rh(e),l=u*i-c*o;return[Sh(c*i+u*o,a*n+l*r),jh(l*n-a*r)]},s}function gp(t){function e(e){return(e=t(e[0]*xh,e[1]*xh))[0]*=wh,e[1]*=wh,e}return t=pp(t[0]*xh,t[1]*xh,t.length>2?t[2]*xh:0),e.invert=function(e){return(e=t.invert(e[0]*xh,e[1]*xh))[0]*=wh,e[1]*=wh,e},e}function vp(t,e,n,r,i,o){if(n){var s=Eh(e),a=Rh(e),c=r*n;null==i?(i=e+r*bh,o=e-c/2):(i=_p(s,i),o=_p(s,o),(r>0?io)&&(i+=r*bh));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 xp(t,e){return kh(t[0]-e[0])=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 Sp(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r=0?1:-1,E=S*T,A=E>gh,O=y*x;if(c.add(Sh(O*S*Rh(E),g*k+O*Eh(E))),s+=A?T+S*bh:T,A^d>=n^b>=n){var N=bf(vf(p),vf(_));kf(N);var C=bf(o,N);kf(C);var L=(A^T>=0?-1:1)*jh(C[2]);(r>L||r===L&&(N[0]||N[1]))&&(a+=A^T>=0?1:-1)}}return(s<-mh||s0){for(h||(i.polygonStart(),h=!0),i.lineStart(),t=0;t1&&2&c&&f.push(f.pop().concat(f.shift())),s.push(f.filter(Np))}return f}}function Np(t){return t.length>1}function Cp(t,e){return((t=t.x)[0]<0?t[1]-vh-mh:vh-t[1])-((e=e.x)[0]<0?e[1]-vh-mh:vh-e[1])}fp.invert=fp;const Lp=Op((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?gh:-gh,c=kh(o-n);kh(c-gh)0?vh:-vh),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(o,r),e=0):i!==a&&c>=gh&&(kh(n-i)mh?Th((Rh(e)*(o=Eh(r))*Rh(n)-Rh(r)*(i=Eh(e))*Rh(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*vh,r.point(-gh,i),r.point(0,i),r.point(gh,i),r.point(gh,0),r.point(gh,-i),r.point(0,-i),r.point(-gh,-i),r.point(-gh,0),r.point(-gh,i);else if(kh(t[0]-e[0])>mh){var o=t[0]0,i=kh(e)>mh;function o(t,n){return Eh(t)*Eh(n)>e}function s(t,n,r){var i=[1,0,0],o=bf(vf(t),vf(n)),s=_f(o,o),a=o[0],c=s-a*a;if(!c)return!r&&t;var u=e*s/c,l=-e*a/c,h=bf(i,o),f=xf(i,u);wf(f,xf(o,l));var p=h,d=_f(f,p),m=_f(p,p),y=d*d-m*(_f(f,f)-1);if(!(y<0)){var g=Ih(y),v=xf(p,(-d-g)/m);if(wf(v,f),v=gf(v),!r)return v;var _,b=t[0],w=n[0],x=t[1],k=n[1];w0^v[1]<(kh(v[0]-b)gh^(b<=v[0]&&v[0]<=w)){var E=xf(p,(-d+g)/m);return wf(E,f),[v,gf(E)]}}}function a(e,n){var i=r?t:gh-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return Op(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?gh:-gh),f):0;if(!e&&(u=c=m)&&t.lineStart(),m!==c&&(!(p=s(e,d))||xp(e,p)||xp(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&&xp(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){vp(o,t,n,i,e,r)}),r?[0,-t]:[-gh,t-gh])}var Pp,Ip,Mp,Dp,jp=1e9,Bp=-jp;function Fp(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 kh(r[0]-t)0?0:3:kh(r[0]-n)0?2:1:kh(r[1]-e)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,_=s,b=wp(),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&&b.rejoin(),c.push(b.result())),w.point=x,y&&_.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=ge(c)).length;(n||i)&&(s.polygonStart(),n&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),i&&Tp(c,a,e,o,s),s.polygonEnd()),_=s,c=u=l=null}};function x(t,e){i(t,e)&&_.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&&(_.lineStart(),_.point(o,s));else if(a&&y)_.point(o,s);else{var c=[d=Math.max(Bp,Math.min(jp,d)),m=Math.max(Bp,Math.min(jp,m))],b=[o=Math.max(Bp,Math.min(jp,o)),s=Math.max(Bp,Math.min(jp,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,b,t,e,n,r)?a&&(_.lineStart(),_.point(o,s),v=!1):(y||(_.lineStart(),_.point(c[0],c[1])),_.point(b[0],b[1]),a||_.lineEnd(),v=!1)}d=o,m=s,y=a}return w}}function Up(){var t,e,n,r=0,i=0,o=960,s=500;return n={stream:function(n){return t&&e===n?t:t=Fp(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 zp={sphere:Fh,point:Fh,lineStart:function(){zp.point=Kp,zp.lineEnd=Vp},lineEnd:Fh,polygonStart:Fh,polygonEnd:Fh};function Vp(){zp.point=zp.lineEnd=Fh}function Kp(t,e){Ip=t*=xh,Mp=Rh(e*=xh),Dp=Eh(e),zp.point=Hp}function Hp(t,e){t*=xh;var n=Rh(e*=xh),r=Eh(e),i=kh(t-Ip),o=Eh(i),s=r*Rh(i),a=Dp*n-Mp*r*o,c=Mp*n+Dp*r*o;Pp.add(Sh(Ih(s*s+a*a),c)),Ip=t,Mp=n,Dp=r}function qp(t){return Pp=new gt,qh(t,zp),+Pp}var Wp=[null,null],Gp={type:"LineString",coordinates:Wp};function Yp(t,e){return Wp[0]=t,Wp[1]=e,qp(Gp)}var $p={Feature:function(t,e){return Zp(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r0&&(i=Yp(t[o],t[o-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))mh})).map(c)).concat(we(Ah(o/p)*p,i,p).filter((function(t){return kh(t%m)>mh})).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=id(o,i,90),u=od(e,t,y),l=id(a,s,90),h=od(r,n,y),g):y},g.extentMajor([[-180,-90+mh],[180,90-mh]]).extentMinor([[-180,-80-mh],[180,80+mh]])}function ad(){return sd()()}function cd(t,e){var n=t[0]*xh,r=t[1]*xh,i=e[0]*xh,o=e[1]*xh,s=Eh(r),a=Rh(r),c=Eh(o),u=Rh(o),l=s*Eh(n),h=s*Rh(n),f=c*Eh(i),p=c*Rh(i),d=2*jh(Ih(Bh(o-r)+s*c*Bh(i-n))),m=Rh(d),y=d?function(t){var e=Rh(t*=d)/m,n=Rh(d-t)/m,r=n*l+e*f,i=n*h+e*p,o=n*a+e*u;return[Sh(i,r)*wh,Sh(o,Ih(r*r+i*i))*wh]}:function(){return[n*wh,r*wh]};return y.distance=d,y}const ud=t=>t;var ld,hd,fd,pd,dd=new gt,md=new gt,yd={point:Fh,lineStart:Fh,lineEnd:Fh,polygonStart:function(){yd.lineStart=gd,yd.lineEnd=bd},polygonEnd:function(){yd.lineStart=yd.lineEnd=yd.point=Fh,dd.add(kh(md)),md=new gt},result:function(){var t=dd/2;return dd=new gt,t}};function gd(){yd.point=vd}function vd(t,e){yd.point=_d,ld=fd=t,hd=pd=e}function _d(t,e){md.add(pd*t-fd*e),fd=t,pd=e}function bd(){_d(ld,hd)}const wd=yd;var xd=1/0,kd=xd,Td=-xd,Sd=Td,Ed={point:function(t,e){tTd&&(Td=t),eSd&&(Sd=e)},lineStart:Fh,lineEnd:Fh,polygonStart:Fh,polygonEnd:Fh,result:function(){var t=[[xd,kd],[Td,Sd]];return Td=Sd=-(kd=xd=1/0),t}};const Ad=Ed;var Od,Nd,Cd,Ld,Rd=0,Pd=0,Id=0,Md=0,Dd=0,jd=0,Bd=0,Fd=0,Ud=0,zd={point:Vd,lineStart:Kd,lineEnd:Wd,polygonStart:function(){zd.lineStart=Gd,zd.lineEnd=Yd},polygonEnd:function(){zd.point=Vd,zd.lineStart=Kd,zd.lineEnd=Wd},result:function(){var t=Ud?[Bd/Ud,Fd/Ud]:jd?[Md/jd,Dd/jd]:Id?[Rd/Id,Pd/Id]:[NaN,NaN];return Rd=Pd=Id=Md=Dd=jd=Bd=Fd=Ud=0,t}};function Vd(t,e){Rd+=t,Pd+=e,++Id}function Kd(){zd.point=Hd}function Hd(t,e){zd.point=qd,Vd(Cd=t,Ld=e)}function qd(t,e){var n=t-Cd,r=e-Ld,i=Ih(n*n+r*r);Md+=i*(Cd+t)/2,Dd+=i*(Ld+e)/2,jd+=i,Vd(Cd=t,Ld=e)}function Wd(){zd.point=Vd}function Gd(){zd.point=$d}function Yd(){Xd(Od,Nd)}function $d(t,e){zd.point=Xd,Vd(Od=Cd=t,Nd=Ld=e)}function Xd(t,e){var n=t-Cd,r=e-Ld,i=Ih(n*n+r*r);Md+=i*(Cd+t)/2,Dd+=i*(Ld+e)/2,jd+=i,Bd+=(i=Ld*t-Cd*e)*(Cd+t),Fd+=i*(Ld+e),Ud+=3*i,Vd(Cd=t,Ld=e)}const Zd=zd;function Jd(t){this._context=t}Jd.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,bh)}},result:Fh};var Qd,tm,em,nm,rm,im=new gt,om={point:Fh,lineStart:function(){om.point=sm},lineEnd:function(){Qd&&am(tm,em),om.point=Fh},polygonStart:function(){Qd=!0},polygonEnd:function(){Qd=null},result:function(){var t=+im;return im=new gt,t}};function sm(t,e){om.point=am,tm=nm=t,em=rm=e}function am(t,e){nm-=t,rm-=e,im.add(Ih(nm*nm+rm*rm)),nm=t,rm=e}const cm=om;let um,lm,hm,fm;class pm{constructor(t){this._append=null==t?dm:function(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return dm;if(e!==um){const t=10**e;um=e,lm=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 pm(i)),s},s.projection(t).digits(i).context(e)}function ym(t){return{stream:gm(t)}}function gm(t){return function(e){var n=new vm;for(var r in t)n[r]=t[r];return n.stream=e,n}}function vm(){}function _m(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),qh(n,t.stream(Ad)),e(Ad.result()),null!=r&&t.clipExtent(r),t}function bm(t,e,n){return _m(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 wm(t,e,n){return bm(t,[[0,0],e],n)}function xm(t,e,n){return _m(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 km(t,e,n){return _m(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)}vm.prototype={constructor:vm,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 Tm=16,Sm=Eh(30*xh);function Em(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,_=g*g+v*v;if(_>4*e&&m--){var b=s+f,w=a+p,x=c+d,k=Ih(b*b+w*w+x*x),T=jh(x/=k),S=kh(kh(x)-1)e||kh((g*N+v*C)/_-.5)>.3||s*f+a*p+c*d2?t[2]%360*xh:0,N()):[y*wh,g*wh,v*wh]},A.angle=function(t){return arguments.length?(_=t%360*xh,N()):_*wh},A.reflectX=function(t){return arguments.length?(b=t?-1:1,N()):b<0},A.reflectY=function(t){return arguments.length?(w=t?-1:1,N()):w<0},A.precision=function(t){return arguments.length?(s=Em(a,E=t*t),C()):Ih(E)},A.fitExtent=function(t,e){return bm(A,t,e)},A.fitSize=function(t,e){return wm(A,t,e)},A.fitWidth=function(t,e){return xm(A,t,e)},A.fitHeight=function(t,e){return km(A,t,e)},function(){return e=t.apply(this,arguments),A.invert=e.invert&&O,N()}}function Lm(t){var e=0,n=gh/3,r=Cm(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*xh,n=t[1]*xh):[e*wh,n*wh]},i}function Rm(t,e){var n=Rh(t),r=(n+Rh(e))/2;if(kh(r)=.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<-vh+mh&&(e=-vh+mh):e>vh-mh&&(e=vh-mh);var n=i/Lh(qm(e),r);return[n*Rh(r*t),i-n*Eh(r*t)]}return o.invert=function(t,e){var n=i-e,o=Ph(r)*Ih(t*t+n*n),s=Sh(t,kh(n))*Ph(n);return n*r<0&&(s-=gh*Ph(t)*Ph(n)),[s/r,2*Th(Lh(i/o,1/r))-vh]},o}function Gm(){return Lm(Wm).scale(109.5).parallels([30,30])}function Ym(t,e){return[t,e]}function $m(){return Nm(Ym).scale(152.63)}function Xm(t,e){var n=Eh(t),r=t===e?Rh(t):(n-Eh(e))/(e-t),i=n/r+t;if(kh(r)2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function yy(t,e){return t.parent===e.parent?1:2}function gy(t,e){return t+e.x}function vy(t,e){return Math.max(t,e.y)}function _y(){var t=yy,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(gy,0)/t.length}(n),e.y=function(t){return 1+t.reduce(vy,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 by(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 wy(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=ky)):void 0===e&&(e=xy);for(var n,r,i,o,s,a=new Ey(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 Ey(i[o])),r.parent=n,r.depth=n.depth+1;return a.eachBefore(Sy)}function xy(t){return t.children}function ky(t){return Array.isArray(t)?t[1]:null}function Ty(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Sy(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Ey(t){this.data=t,this.depth=this.height=0,this.parent=null}function Ay(t){return null==t?null:Oy(t)}function Oy(t){if("function"!=typeof t)throw new Error;return t}function Ny(){return 0}function Cy(t){return function(){return t}}ry.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*(Jm+Qm*i+o*(ty+ey*i))-e)/(Jm+3*Qm*i+o*(7*ty+9*ey*i)))*r)*i*i,!(kh(n)mh&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},ly.invert=jm(jh),fy.invert=jm((function(t){return 2*Th(t)})),dy.invert=function(t,e){return[-e,2*Th(Oh(t))-vh]},Ey.prototype=wy.prototype={constructor:Ey,count:function(){return this.eachAfter(by)},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 wy(this).eachBefore(Ty)},[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=(Ly*t+Ry)%Py)/Py}function My(t){return Dy(t,Iy())}function Dy(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 Uy(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 Hy(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 qy(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 Wy(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 Gy(t){this._=t,this.next=null,this.previous=null}function Yy(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;Hy(i,r,o=t[2]),r=new Gy(r),i=new Gy(i),o=new Gy(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 hg(t,e-1)&&!hg(t,e-2)&&(t=t.slice(0,-1)),"/"===t[0]?t:`/${t}`}(t(e,n,r)))),n=e.map(lg),i=new Set(e).add("");for(const t of n)i.has(t)||(i.add(t),e.push(t),n.push(lg(t)),f.push(sg));p=(t,n)=>e[n],d=(t,e)=>n[e]}for(s=0,i=f.length;s=0&&(u=f[t]).data===sg;--t)u.data=null}if(a.parent=ig,a.eachBefore((function(t){t.depth=t.parent.depth+1,--i})).eachBefore(Sy),a.parent=null,i>0)throw new Error("cycle");return a}return r.id=function(t){return arguments.length?(e=Ay(t),r):e},r.parentId=function(t){return arguments.length?(n=Ay(t),r):n},r.path=function(e){return arguments.length?(t=Ay(e),r):t},r}function lg(t){let e=t.length;if(e<2)return"";for(;--e>1&&!hg(t,e););return t.slice(0,e)}function hg(t,e){if("/"===t[e]){let n=0;for(;e>0&&"\\"===t[--e];)++n;if(!(1&n))return!0}return!1}function fg(t,e){return t.parent===e.parent?1:2}function pg(t){var e=t.children;return e?e[0]:t.t}function dg(t){var e=t.children;return e?e[e.length-1]:t.t}function mg(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 yg(t,e,n){return t.a.parent===e.parent?t.a:n}function gg(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 vg(){var t=fg,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,o,s=new gg(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 gg(r[i],i)),n.parent=e;return(s.parent=new gg(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=dg(a),o=pg(o),a&&o;)c=pg(c),(s=dg(s)).a=e,(i=a.z+h-o.z-u+t(a._,o._))>0&&(mg(yg(a,e,r),e,i),u+=i,l+=i),h+=a.m,u+=o.m,f+=c.m,l+=s.m;a&&!dg(s)&&(s.t=a,s.m+=h-l),o&&!pg(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 _g(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}(bg);function kg(){var t=xg,e=!1,n=1,r=1,i=[0],o=Ny,s=Ny,a=Ny,c=Ny,u=Ny;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(eg),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 _=r?(o*g+c*y)/r:c;t(e,p,y,i,o,s,_),t(p,n,g,i,_,s,c)}}(0,c,t.value,e,n,r,i)}function Sg(t,e,n,r,i){(1&t.depth?_g:ng)(t,e,n,r,i)}const Eg=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}(bg);function Ag(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function Og(t,e){var n=ki(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}}function Ng(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Cg(t){return((t=Math.exp(t))+1/t)/2}const Lg=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),_=Math.log(Math.sqrt(g*g+1)-g),b=Math.log(Math.sqrt(v*v+1)-v);s=(b-_)/e,o=function(t){var r,i=t*s,o=Cg(_),l=u/(n*y)*(o*(r=e*i+_,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(_));return[a+l*p,c+l*d,u*o/Cg(e*i+_)]}}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 Rg(t){return function(e,n){var r=t((e=pi(e)).h,(n=pi(n)).h),i=Ti(e.s,n.s),o=Ti(e.l,n.l),s=Ti(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 Pg=Rg(ki);var Ig=Rg(Ti);function Mg(t,e){var n=Ti((t=Sa(t)).l,(e=Sa(e)).l),r=Ti(t.a,e.a),i=Ti(t.b,e.b),o=Ti(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 Dg(t){return function(e,n){var r=t((e=Pa(e)).h,(n=Pa(n)).h),i=Ti(e.c,n.c),o=Ti(e.l,n.l),s=Ti(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 jg=Dg(ki);var Bg=Dg(Ti);function Fg(t){return function e(n){function r(e,r){var i=t((e=Ha(e)).h,(r=Ha(r)).h),o=Ti(e.s,r.s),s=Ti(e.l,r.l),a=Ti(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 Ug=Fg(ki);var zg=Fg(Ti);function Vg(t,e){void 0===e&&(e=t,t=Fi);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n1&&Wg(t[n[i-2]],t[n[i-1]],t[r])<=0;)--i;n[i++]=r}return n.slice(0,i)}function $g(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 Zg(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}(Jg),nv=function t(e){var n=ev.source(e);function r(){var t=n.apply(this,arguments);return function(){return Math.exp(t())}}return r.source=t,r}(Jg),rv=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}(Jg),iv=function t(e){var n=rv.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}(Jg),ov=function t(e){function n(t){return function(){return-Math.log1p(-e())/t}}return n.source=t,n}(Jg),sv=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}(Jg),av=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}(Jg),cv=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}(Jg),uv=function t(e){var n=ev.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}(Jg),lv=function t(e){var n=uv.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}(Jg),hv=function t(e){var n=cv.source(e),r=lv.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}(Jg),fv=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}(Jg),pv=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}(Jg),dv=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}(Jg),mv=function t(e){var n=uv.source(e),r=hv.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}(Jg),yv=1664525,gv=1013904223,vv=1/4294967296;function _v(t=Math.random()){let e=0|(0<=t&&t<1?t/vv:Math.abs(t));return()=>(e=yv*e+gv|0,vv*(e>>>0))}function bv(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function wv(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 xv=Symbol("implicit");function kv(){var t=new bt,e=[],n=[],r=xv;function i(i){let o=t.get(i);if(void 0===o){if(r!==xv)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 bt;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 kv(e,n).unknown(r)},bv.apply(i,arguments),i}function Tv(){var t,e,n=kv().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?Rv:Lv,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),Ii)))(n)))},h.domain=function(t){return arguments.length?(s=Array.from(t,Av),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=Ng,l()},h.clamp=function(t){return arguments.length?(u=!!t||Nv,l()):u!==Nv},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 Mv(){return Iv()(Nv,Nv)}function Dv(t,e,n,r){var i,o=Jt(t,e,n);switch((r=th(null==r?",f":r)).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=ph(o,s))||(r.precision=i),ah(r,s);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=dh(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=fh(o))||(r.precision=i-2*("%"===r.type))}return sh(r)}function jv(t){var e=t.domain;return t.ticks=function(t){var n=e();return Xt(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Dv(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=Zt(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 Bv(){var t=Mv();return t.copy=function(){return Pv(t,Bv())},bv.apply(t,arguments),jv(t)}function Fv(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,Av),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return Fv(t).unknown(e)},t=arguments.length?Array.from(t,Av):[0,1],jv(n)}function Uv(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],s=t[i];return s-t(-e,n)}function Gv(t){const e=t(zv,Vv),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?qv:t===Math.E?Math.exp:e=>Math.pow(t,e)}(o),n()[0]<0?(r=Wv(r),i=Wv(i),t(Kv,Hv)):t(zv,Vv),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=th(n)).precision||(n.trim=!0),n=sh(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(Uv(n(),{floor:t=>i(Math.floor(r(t))),ceil:t=>i(Math.ceil(r(t)))})),e}function Yv(){const t=Gv(Iv()).domain([1,10]);return t.copy=()=>Pv(t,Yv()).base(t.base()),bv.apply(t,arguments),t}function $v(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Xv(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Zv(t){var e=1,n=t($v(e),Xv(e));return n.constant=function(n){return arguments.length?t($v(e=+n),Xv(e)):e},jv(n)}function Jv(){var t=Zv(Iv());return t.copy=function(){return Pv(t,Jv()).constant(t.constant())},bv.apply(t,arguments)}function Qv(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function t_(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function e_(t){return t<0?-t*t:t*t}function n_(t){var e=t(Nv,Nv),n=1;return e.exponent=function(e){return arguments.length?1==(n=+e)?t(Nv,Nv):.5===n?t(t_,e_):t(Qv(n),Qv(1/n)):n},jv(e)}function r_(){var t=n_(Iv());return t.copy=function(){return Pv(t,r_()).exponent(t.exponent())},bv.apply(t,arguments),t}function i_(){return r_.apply(null,arguments).exponent(.5)}function o_(t){return Math.sign(t)*t*t}function s_(){var t,e=Mv(),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(o_(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,Av)).map(o_)),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 s_(e.domain(),n).round(r).clamp(e.clamp()).unknown(t)},bv.apply(i,arguments),jv(i)}function a_(){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 c_().domain([e,n]).range(o).unknown(t)},bv.apply(jv(s),arguments)}function u_(){var t,e=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[tt(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 u_().domain(e).range(n).unknown(t)},bv.apply(i,arguments)}const l_=1e3,h_=6e4,f_=36e5,p_=864e5,d_=6048e5,m_=31536e6,y_=new Date,g_=new Date;function v_(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(av_((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)=>(y_.setTime(+e),g_.setTime(+r),t(y_),t(g_),Math.floor(n(y_,g_))),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 __=v_((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));__.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?v_((e=>{e.setTime(Math.floor(e/t)*t)}),((e,n)=>{e.setTime(+e+n*t)}),((e,n)=>(n-e)/t)):__:null);const b_=__.range,w_=v_((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*l_)}),((t,e)=>(e-t)/l_),(t=>t.getUTCSeconds())),x_=w_.range,k_=v_((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*l_)}),((t,e)=>{t.setTime(+t+e*h_)}),((t,e)=>(e-t)/h_),(t=>t.getMinutes())),T_=k_.range,S_=v_((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*h_)}),((t,e)=>(e-t)/h_),(t=>t.getUTCMinutes())),E_=S_.range,A_=v_((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*l_-t.getMinutes()*h_)}),((t,e)=>{t.setTime(+t+e*f_)}),((t,e)=>(e-t)/f_),(t=>t.getHours())),O_=A_.range,N_=v_((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*f_)}),((t,e)=>(e-t)/f_),(t=>t.getUTCHours())),C_=N_.range,L_=v_((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*h_)/p_),(t=>t.getDate()-1)),R_=L_.range,P_=v_((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/p_),(t=>t.getUTCDate()-1)),I_=P_.range,M_=v_((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/p_),(t=>Math.floor(t/p_))),D_=M_.range;function j_(t){return v_((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())*h_)/d_))}const B_=j_(0),F_=j_(1),U_=j_(2),z_=j_(3),V_=j_(4),K_=j_(5),H_=j_(6),q_=B_.range,W_=F_.range,G_=U_.range,Y_=z_.range,$_=V_.range,X_=K_.range,Z_=H_.range;function J_(t){return v_((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)/d_))}const Q_=J_(0),tb=J_(1),eb=J_(2),nb=J_(3),rb=J_(4),ib=J_(5),ob=J_(6),sb=Q_.range,ab=tb.range,cb=eb.range,ub=nb.range,lb=rb.range,hb=ib.range,fb=ob.range,pb=v_((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())),db=pb.range,mb=v_((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())),yb=mb.range,gb=v_((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()));gb.every=t=>isFinite(t=Math.floor(t))&&t>0?v_((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 vb=gb.range,_b=v_((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()));_b.every=t=>isFinite(t=Math.floor(t))&&t>0?v_((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 bb=_b.range;function wb(t,e,n,r,i,o){const s=[[w_,1,l_],[w_,5,5e3],[w_,15,15e3],[w_,30,3e4],[o,1,h_],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,f_],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,p_],[r,2,1728e5],[n,1,d_],[e,1,2592e6],[e,3,7776e6],[t,1,m_]];function a(e,n,r){const i=Math.abs(n-e)/r,o=G((([,,t])=>t)).right(s,i);if(o===s.length)return t.every(Jt(e/m_,n/m_,r));if(0===o)return __.every(Math.max(Jt(e,n,r),1));const[a,c]=s[i/s[o-1][2]=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Xw,s:Zw,S:gw,u:vw,U:_w,V:ww,w:xw,W:kw,x:null,X:null,y:Tw,Y:Ew,Z:Ow,"%":$w},b={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:Nw,e:Nw,f:Iw,g:qw,G:Gw,H:Cw,I:Lw,j:Rw,L:Pw,m:Mw,M:Dw,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Xw,s:Zw,S:jw,u:Bw,U:Fw,V:zw,w:Vw,W:Kw,x:null,X:null,y:Hw,Y:Ww,Z:Yw,"%":$w},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:Qb,e:Qb,f:ow,g:$b,G:Yb,H:ew,I:ew,j:tw,L:iw,m:Jb,M:nw,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:Zb,Q:aw,s:cw,S:rw,u:Hb,U:qb,V:Wb,w:Kb,W:Gb,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:$b,Y:Yb,Z:Xb,"%":sw};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=Ab(Ob(o.y,0,1))).getUTCDay(),r=i>4||0===i?tb.ceil(r):tb(r),r=P_.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Eb(Ob(o.y,0,1))).getDay(),r=i>4||0===i?F_.ceil(r):F_(r),r=L_.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?Ab(Ob(o.y,0,1)).getUTCDay():Eb(Ob(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,Ab(o)):Eb(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 Mb?e.charAt(s++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return _.x=x(n,_),_.X=x(r,_),_.c=x(e,_),b.x=x(n,b),b.X=x(r,b),b.c=x(e,b),{format:function(t){var e=x(t+="",_);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+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}var Cb,Lb,Rb,Pb,Ib,Mb={"-":"",_:" ",0:"0"},Db=/^\s*\d+/,jb=/^%/,Bb=/[\\^$*+?|[\]().{}]/g;function Fb(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o[t.toLowerCase(),e])))}function Kb(t,e,n){var r=Db.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Hb(t,e,n){var r=Db.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function qb(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Wb(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Gb(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Yb(t,e,n){var r=Db.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function $b(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Xb(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 Zb(t,e,n){var r=Db.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Jb(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Qb(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function tw(t,e,n){var r=Db.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ew(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function nw(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function rw(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function iw(t,e,n){var r=Db.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function ow(t,e,n){var r=Db.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function sw(t,e,n){var r=jb.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function aw(t,e,n){var r=Db.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function cw(t,e,n){var r=Db.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function uw(t,e){return Fb(t.getDate(),e,2)}function lw(t,e){return Fb(t.getHours(),e,2)}function hw(t,e){return Fb(t.getHours()%12||12,e,2)}function fw(t,e){return Fb(1+L_.count(gb(t),t),e,3)}function pw(t,e){return Fb(t.getMilliseconds(),e,3)}function dw(t,e){return pw(t,e)+"000"}function mw(t,e){return Fb(t.getMonth()+1,e,2)}function yw(t,e){return Fb(t.getMinutes(),e,2)}function gw(t,e){return Fb(t.getSeconds(),e,2)}function vw(t){var e=t.getDay();return 0===e?7:e}function _w(t,e){return Fb(B_.count(gb(t)-1,t),e,2)}function bw(t){var e=t.getDay();return e>=4||0===e?V_(t):V_.ceil(t)}function ww(t,e){return t=bw(t),Fb(V_.count(gb(t),t)+(4===gb(t).getDay()),e,2)}function xw(t){return t.getDay()}function kw(t,e){return Fb(F_.count(gb(t)-1,t),e,2)}function Tw(t,e){return Fb(t.getFullYear()%100,e,2)}function Sw(t,e){return Fb((t=bw(t)).getFullYear()%100,e,2)}function Ew(t,e){return Fb(t.getFullYear()%1e4,e,4)}function Aw(t,e){var n=t.getDay();return Fb((t=n>=4||0===n?V_(t):V_.ceil(t)).getFullYear()%1e4,e,4)}function Ow(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Fb(e/60|0,"0",2)+Fb(e%60,"0",2)}function Nw(t,e){return Fb(t.getUTCDate(),e,2)}function Cw(t,e){return Fb(t.getUTCHours(),e,2)}function Lw(t,e){return Fb(t.getUTCHours()%12||12,e,2)}function Rw(t,e){return Fb(1+P_.count(_b(t),t),e,3)}function Pw(t,e){return Fb(t.getUTCMilliseconds(),e,3)}function Iw(t,e){return Pw(t,e)+"000"}function Mw(t,e){return Fb(t.getUTCMonth()+1,e,2)}function Dw(t,e){return Fb(t.getUTCMinutes(),e,2)}function jw(t,e){return Fb(t.getUTCSeconds(),e,2)}function Bw(t){var e=t.getUTCDay();return 0===e?7:e}function Fw(t,e){return Fb(Q_.count(_b(t)-1,t),e,2)}function Uw(t){var e=t.getUTCDay();return e>=4||0===e?rb(t):rb.ceil(t)}function zw(t,e){return t=Uw(t),Fb(rb.count(_b(t),t)+(4===_b(t).getUTCDay()),e,2)}function Vw(t){return t.getUTCDay()}function Kw(t,e){return Fb(tb.count(_b(t)-1,t),e,2)}function Hw(t,e){return Fb(t.getUTCFullYear()%100,e,2)}function qw(t,e){return Fb((t=Uw(t)).getUTCFullYear()%100,e,2)}function Ww(t,e){return Fb(t.getUTCFullYear()%1e4,e,4)}function Gw(t,e){var n=t.getUTCDay();return Fb((t=n>=4||0===n?rb(t):rb.ceil(t)).getUTCFullYear()%1e4,e,4)}function Yw(){return"+0000"}function $w(){return"%"}function Xw(t){return+t}function Zw(t){return Math.floor(+t/1e3)}function Jw(t){return Cb=Nb(t),Lb=Cb.format,Rb=Cb.parse,Pb=Cb.utcFormat,Ib=Cb.utcParse,Cb}function Qw(t){return new Date(t)}function tx(t){return t instanceof Date?+t:+new Date(+t)}function ex(t,e,n,r,i,o,s,a,c,u){var l=Mv(),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"),_=u("%B"),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)=>ue(t,r/e)))},n.copy=function(){return hx(e).domain(t)},wv.apply(n,arguments)}function fx(){var t,e,n,r,i,o,s,a=0,c=.5,u=1,l=1,h=Nv,f=!1;function p(t){return isNaN(t=+t)?s:(t=.5+((t=+o(t))-e)*(l*tAi(t[t.length-1]);var Cx=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(vx);const Lx=Nx(Cx);var Rx=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(vx);const Px=Nx(Rx);var Ix=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(vx);const Mx=Nx(Ix);var Dx=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(vx);const jx=Nx(Dx);var Bx=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(vx);const Fx=Nx(Bx);var Ux=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(vx);const zx=Nx(Ux);var Vx=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(vx);const Kx=Nx(Vx);var Hx=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(vx);const qx=Nx(Hx);var Wx=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(vx);const Gx=Nx(Wx);var Yx=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(vx);const $x=Nx(Yx);var Xx=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(vx);const Zx=Nx(Xx);var Jx=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(vx);const Qx=Nx(Jx);var tk=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(vx);const ek=Nx(tk);var nk=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(vx);const rk=Nx(nk);var ik=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(vx);const ok=Nx(ik);var sk=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(vx);const ak=Nx(sk);var ck=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(vx);const uk=Nx(ck);var lk=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(vx);const hk=Nx(lk);var fk=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(vx);const pk=Nx(fk);var dk=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(vx);const mk=Nx(dk);var yk=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(vx);const gk=Nx(yk);var vk=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(vx);const _k=Nx(vk);var bk=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(vx);const wk=Nx(bk);var xk=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(vx);const kk=Nx(xk);var Tk=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(vx);const Sk=Nx(Tk);var Ek=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(vx);const Ak=Nx(Ek);var Ok=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(vx);const Nk=Nx(Ok);function Ck(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 Lk=zg(Ha(300,.5,0),Ha(-240,.5,1));var Rk=zg(Ha(-100,.75,.35),Ha(80,1.5,.8)),Pk=zg(Ha(260,.75,.35),Ha(80,1.5,.8)),Ik=Ha();function Mk(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Ik.h=360*t-100,Ik.s=1.5-1.5*e,Ik.l=.8-.9*e,Ik+""}var Dk=ii(),jk=Math.PI/3,Bk=2*Math.PI/3;function Fk(t){var e;return t=(.5-t)*Math.PI,Dk.r=255*(e=Math.sin(t))*e,Dk.g=255*(e=Math.sin(t+jk))*e,Dk.b=255*(e=Math.sin(t+Bk))*e,Dk+""}function Uk(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 zk(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const Vk=zk(vx("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var Kk=zk(vx("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Hk=zk(vx("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),qk=zk(vx("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function Wk(t){return Nr(mr(t).call(document.documentElement))}var Gk=0;function Yk(){return new $k}function $k(){this._="@"+(++Gk).toString(36)}function Xk(t,e){return t.target&&(t=Ui(t),void 0===e&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,(t=>zi(t,e)))}function Zk(t){return"string"==typeof t?new Er([document.querySelectorAll(t)],[document.documentElement]):new Er([vn(t)],Sr)}function Jk(t){return function(){return t}}$k.prototype=Yk.prototype={constructor:$k,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 Qk=Math.abs,tT=Math.atan2,eT=Math.cos,nT=Math.max,rT=Math.min,iT=Math.sin,oT=Math.sqrt,sT=1e-12,aT=Math.PI,cT=aT/2,uT=2*aT;function lT(t){return t>=1?cT:t<=-1?-cT:Math.asin(t)}function hT(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 Qs(e)}function fT(t){return t.innerRadius}function pT(t){return t.outerRadius}function dT(t){return t.startAngle}function mT(t){return t.endAngle}function yT(t){return t&&t.padAngle}function gT(t,e,n,r,i,o,s){var a=t-n,c=e-r,u=(s?o:-o)/oT(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,_=m-p,b=v*v+_*_,w=i-o,x=f*m-d*p,k=(_<0?-1:1)*oT(nT(0,w*w*b-x*x)),T=(x*_-v*k)/b,S=(-x*v-_*k)/b,E=(x*_+v*k)/b,A=(-x*v+_*k)/b,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 vT(){var t=fT,e=pT,n=Jk(0),r=null,i=dT,o=mT,s=yT,a=null,c=hT(u);function u(){var u,l,h,f=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-cT,m=o.apply(this,arguments)-cT,y=Qk(m-d),g=m>d;if(a||(a=u=c()),psT)if(y>uT-sT)a.moveTo(p*eT(d),p*iT(d)),a.arc(0,0,p,d,m,!g),f>sT&&(a.moveTo(f*eT(m),f*iT(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>sT&&(r?+r.apply(this,arguments):oT(f*f+p*p)),O=rT(Qk(p-f)/2,+n.apply(this,arguments)),N=O,C=O;if(A>sT){var L=lT(A/f*iT(E)),R=lT(A/p*iT(E));(T-=2*L)>sT?(x+=L*=g?1:-1,k-=L):(T=0,x=k=(d+m)/2),(S-=2*R)>sT?(b+=R*=g?1:-1,w-=R):(S=0,b=w=(d+m)/2)}var P=p*eT(b),I=p*iT(b),M=f*eT(k),D=f*iT(k);if(O>sT){var j,B=p*eT(w),F=p*iT(w),U=f*eT(x),z=f*iT(x);if(y1?0:h<-1?aT:Math.acos(h))/2),G=oT(j[0]*j[0]+j[1]*j[1]);N=rT(O,(f-G)/(W-1)),C=rT(O,(p-G)/(W+1))}else N=C=0}S>sT?C>sT?(v=gT(U,z,P,I,p,C,g),_=gT(B,F,M,D,p,C,g),a.moveTo(v.cx+v.x01,v.cy+v.y01),CsT&&T>sT?N>sT?(v=gT(M,D,B,F,f,-N,g),_=gT(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 ST().defined(i).curve(s).context(o)}return t="function"==typeof t?t:void 0===t?kT:Jk(+t),e="function"==typeof e?e:Jk(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?TT:Jk(+n),u.x=function(e){return arguments.length?(t="function"==typeof e?e:Jk(+e),r=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:Jk(+e),u):t},u.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Jk(+t),u):r},u.y=function(t){return arguments.length?(e="function"==typeof t?t:Jk(+t),n=null,u):e},u.y0=function(t){return arguments.length?(e="function"==typeof t?t:Jk(+t),u):e},u.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Jk(+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:Jk(!!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 AT(t,e){return et?1:e>=t?0:NaN}function OT(t){return t}function NT(){var t=OT,e=AT,n=null,r=Jk(0),i=Jk(uT),o=Jk(0);function s(s){var a,c,u,l,h,f=(s=bT(s)).length,p=0,d=new Array(f),m=new Array(f),y=+r.apply(this,arguments),g=Math.min(uT,Math.max(-uT,i.apply(this,arguments)-y)),v=Math.min(Math.abs(g)/f,o.apply(this,arguments)),_=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*_)/p:0;a0?h*u:0)+_,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:Jk(+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:Jk(+t),s):r},s.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Jk(+t),s):i},s.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Jk(+t),s):o},s}wT.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 CT=RT(xT);function LT(t){this._curve=t}function RT(t){function e(e){return new LT(t(e))}return e._curve=t,e}function PT(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(RT(t)):e()._curve},t}function IT(){return PT(ST().curve(CT))}function MT(){var t=ET().curve(CT),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 PT(n())},delete t.lineX0,t.lineEndAngle=function(){return PT(r())},delete t.lineX1,t.lineInnerRadius=function(){return PT(i())},delete t.lineY0,t.lineOuterRadius=function(){return PT(o())},delete t.lineY1,t.curve=function(t){return arguments.length?e(RT(t)):e()._curve},t}function DT(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}LT.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 jT{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 BT{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=DT(this._x0,this._y0),r=DT(this._x0,this._y0=(this._y0+e)/2),i=DT(t,this._y0),o=DT(t,e);this._context.moveTo(...n),this._context.bezierCurveTo(...r,...i,...o)}this._x0=t,this._y0=e}}function FT(t){return new jT(t,!0)}function UT(t){return new jT(t,!1)}function zT(t){return new BT(t)}function VT(t){return t.source}function KT(t){return t.target}function HT(t){let e=VT,n=KT,r=kT,i=TT,o=null,s=null,a=hT(c);function c(){let c;const u=_T.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:Jk(+t),c):r},c.y=function(t){return arguments.length?(i="function"==typeof t?t:Jk(+t),c):i},c.context=function(e){return arguments.length?(null==e?o=s=null:s=t(o=e),c):o},c}function qT(){return HT(FT)}function WT(){return HT(UT)}function GT(){const t=HT(zT);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const YT=oT(3),$T={draw(t,e){const n=.59436*oT(e+rT(e/28,.75)),r=n/2,i=r*YT;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},XT={draw(t,e){const n=oT(e/aT);t.moveTo(n,0),t.arc(0,0,n,0,uT)}},ZT={draw(t,e){const n=oT(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()}},JT=oT(1/3),QT=2*JT,tS={draw(t,e){const n=oT(e/QT),r=n*JT;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},eS={draw(t,e){const n=.62625*oT(e);t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},nS={draw(t,e){const n=.87559*oT(e-rT(e/7,2));t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},rS={draw(t,e){const n=oT(e),r=-n/2;t.rect(r,r,n,n)}},iS={draw(t,e){const n=.4431*oT(e);t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},oS=iT(aT/10)/iT(7*aT/10),sS=iT(uT/10)*oS,aS=-eT(uT/10)*oS,cS={draw(t,e){const n=oT(.8908130915292852*e),r=sS*n,i=aS*n;t.moveTo(0,-n),t.lineTo(r,i);for(let e=1;e<5;++e){const o=uT*e/5,s=eT(o),a=iT(o);t.lineTo(a*n,-s*n),t.lineTo(s*r-a*i,a*r+s*i)}t.closePath()}},uS=oT(3),lS={draw(t,e){const n=-oT(e/(3*uS));t.moveTo(0,2*n),t.lineTo(-uS*n,-n),t.lineTo(uS*n,-n),t.closePath()}},hS=oT(3),fS={draw(t,e){const n=.6824*oT(e),r=n/2,i=n*hS/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},pS=-.5,dS=oT(3)/2,mS=1/oT(12),yS=3*(mS/2+1),gS={draw(t,e){const n=oT(e/yS),r=n/2,i=n*mS,o=r,s=n*mS+n,a=-o,c=s;t.moveTo(r,i),t.lineTo(o,s),t.lineTo(a,c),t.lineTo(pS*r-dS*i,dS*r+pS*i),t.lineTo(pS*o-dS*s,dS*o+pS*s),t.lineTo(pS*a-dS*c,dS*a+pS*c),t.lineTo(pS*r+dS*i,pS*i-dS*r),t.lineTo(pS*o+dS*s,pS*s-dS*o),t.lineTo(pS*a+dS*c,pS*c-dS*a),t.closePath()}},vS={draw(t,e){const n=.6189*oT(e-rT(e/6,1.7));t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},_S=[XT,ZT,tS,rS,cS,lS,gS],bS=[XT,nS,vS,fS,$T,iS,eS];function wS(t,e){let n=null,r=hT(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:Jk(t||XT),e="function"==typeof e?e:Jk(void 0===e?64:+e),i.type=function(e){return arguments.length?(t="function"==typeof e?e:Jk(e),i):t},i.size=function(t){return arguments.length?(e="function"==typeof t?t:Jk(+t),i):e},i.context=function(t){return arguments.length?(n=null==t?null:t,i):n},i}function xS(){}function kS(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 TS(t){this._context=t}function SS(t){return new TS(t)}function ES(t){this._context=t}function AS(t){return new ES(t)}function OS(t){this._context=t}function NS(t){return new OS(t)}function CS(t,e){this._basis=new TS(t),this._beta=e}TS.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:kS(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:kS(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ES.prototype={areaStart:xS,areaEnd:xS,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:kS(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},OS.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:kS(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},CS.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 LS=function t(e){function n(t){return 1===e?new TS(t):new CS(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function RS(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 PS(t,e){this._context=t,this._k=(1-e)/6}PS.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:RS(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:RS(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 IS=function t(e){function n(t){return new PS(t,e)}return n.tension=function(e){return t(+e)},n}(0);function MS(t,e){this._context=t,this._k=(1-e)/6}MS.prototype={areaStart:xS,areaEnd:xS,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:RS(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 DS=function t(e){function n(t){return new MS(t,e)}return n.tension=function(e){return t(+e)},n}(0);function jS(t,e){this._context=t,this._k=(1-e)/6}jS.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:RS(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 BS=function t(e){function n(t){return new jS(t,e)}return n.tension=function(e){return t(+e)},n}(0);function FS(t,e,n){var r=t._x1,i=t._y1,o=t._x2,s=t._y2;if(t._l01_a>sT){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>sT){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 US(t,e){this._context=t,this._alpha=e}US.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:FS(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 US(t,e):new PS(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function VS(t,e){this._context=t,this._alpha=e}VS.prototype={areaStart:xS,areaEnd:xS,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:FS(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 KS=function t(e){function n(t){return e?new VS(t,e):new MS(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function HS(t,e){this._context=t,this._alpha=e}HS.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:FS(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 qS=function t(e){function n(t){return e?new HS(t,e):new jS(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function WS(t){this._context=t}function GS(t){return new WS(t)}function YS(t){return t<0?-1:1}function $S(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(YS(o)+YS(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function XS(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function ZS(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 JS(t){this._context=t}function QS(t){this._context=new tE(t)}function tE(t){this._context=t}function eE(t){return new JS(t)}function nE(t){return new QS(t)}function rE(t){this._context=t}function iE(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 fE(t,e){return t[e]}function pE(t){const e=[];return e.key=t,e}function dE(){var t=Jk([]),e=hE,n=lE,r=fE;function i(i){var o,s,a=Array.from(t.apply(this,arguments),pE),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 gE(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 wE(t){var e=t.map(xE);return hE(t).sort((function(t,n){return e[t]-e[n]}))}function xE(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 EE="%Y-%m-%dT%H:%M:%S.%LZ",AE=Date.prototype.toISOString?function(t){return t.toISOString()}:Pb(EE);const OE=AE;var NE=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:Ib(EE);const CE=NE;function LE(t,e,n){var r=new eo,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?Qi():+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 RE=t=>()=>t;function PE(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 IE(t,e,n){this.k=t,this.x=e,this.y=n}IE.prototype={constructor:IE,scale:function(t){return 1===t?this:new IE(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new IE(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 ME=new IE(1,0,0);function DE(t){for(;!t.__zoom;)if(!(t=t.parentNode))return ME;return t.__zoom}function jE(t){t.stopImmediatePropagation()}function BE(t){t.preventDefault(),t.stopImmediatePropagation()}function FE(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function UE(){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 zE(){return this.__zoom||ME}function VE(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function KE(){return navigator.maxTouchPoints||"ontouchstart"in this}function HE(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 qE(){var t,e,n,r=FE,i=UE,o=HE,s=VE,a=KE,c=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],l=250,h=Lg,f=mn("start","zoom","end"),p=500,d=150,m=0,y=10;function g(t){t.property("__zoom",zE).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 IE(e,t.x,t.y)}function _(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 IE(t.k,r,i)}function b(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?b(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 IE(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=zi(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)],wo(this),n.start()}BE(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),d),n.zoom("mouse",o(_(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=Nr(t.view).on("mousemove.zoom",(function(t){if(BE(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(_(s.that.__zoom,s.mouse[0]=zi(t,i),s.mouse[1]),s.extent,u))}),!0).on("mouseup.zoom",(function(t){a.on("mousemove.zoom mouseup.zoom",null),Mr(t.view,s.moved),BE(t),s.event(t).end()}),!0),c=zi(t,i),l=t.clientX,h=t.clientY;Ir(t.view),jE(t),s.mouse=[c,this.__zoom.invert(c)],wo(this),s.start()}}function E(t,...e){if(r.apply(this,arguments)){var n=this.__zoom,s=zi(t.changedTouches?t.changedTouches[0]:t,this),a=n.invert(s),c=n.k*(t.shiftKey?.5:2),h=o(_(v(n,c),s,a),i.apply(this,e),u);BE(t),l>0?Nr(this).transition().duration(l).call(w,h,s,t):Nr(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(jE(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&&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 nN(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 rN(t){var e=function(t,e){if("object"!=$O(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=$O(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$O(e)?e:e+""}var iN=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 YO(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 PO(this.pluginData,this.viewport,t)}},{key:"initLinkRenderer",value:function(t){return new jO(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 gO(this.pluginData,this.viewport,this.layout),this.actions.deleteAction=new rA(this.pluginData,this.viewport,this.layout),this.actions.dragScene=new _A(this.pluginData,this.viewport,this.layout),this.actions.menuAction=new MA(this.pluginData,this.viewport,this.layout),this.actions.link=new AA(this.pluginData,this.viewport,this.layout),this.actions.zoom=new SO(this.pluginData,this.viewport,this.layout),this.actions.dragComponent=new hA(this.pluginData,this.viewport,this.layout),this.actions.resizeComponent=new KA(this.pluginData,this.viewport,this.layout),this.actions.toggleSelection=new QA(this.pluginData,this.viewport,this.layout),this.actions.deselectionAll=new aO(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=eN().mark((function e(n){var r,i,o,s,a,c,u;return eN().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){nN(o,r,i,s,a,"next",t)}function a(t){nN(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(QO({id:"scene",name:"",children:XO(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(){return this.viewport.selectAll(".scene > g").attr("transform",""),document.querySelector("#view-port .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 f(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 H({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]:"Error happened when trying to parse.",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"Error";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=xN(e),function(t,e){if(e&&("object"==vN(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,bN()?Reflect.construct(e,n||[],xN(t).constructor):e.apply(t,n))}(this,e,[n||"Error happened when trying to parse."])).name="ParseError",t.startLine=r||0,t.startColumn=i||0,t.endLine=o||0,t.endColumn=s||0,t.severity=a||"Error",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&&wN(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(_N(Error));const TN=kN;var SN=function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){var e=arguments.length>0&&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 EN=SN;function AN(t){return AN="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},AN(t)}function ON(t,e,n){return e=CN(e),function(t,e){if(e&&("object"==AN(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,NN()?Reflect.construct(e,n||[],CN(t).constructor):e.apply(t,n))}function NN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(NN=function(){return!!t})()}function CN(t){return CN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},CN(t)}function LN(t,e){return LN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},LN(t,e)}var RN=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=ON(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&&LN(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(M);const PN=RN;function IN(t){return IN="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},IN(t)}function MN(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:[]},parseErrors:[],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.parseErrors=d.parseErrors||[],this.__eventIndex=0,this.eventManager=m,this.eventLogs=[],this.configuration=e,this.resources={icons:jN({},null===(u=d.resources)||void 0===u?void 0:u.icons),markers:jN({},null===(l=d.resources)||void 0===l?void 0:l.markers),links:jN({},null===(h=d.resources)||void 0===h?void 0:h.links),models:jN({},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.25.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 b({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 MN(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 MN(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)?MN(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 M({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 PN({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 EN(jN(jN({},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:jN({},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:{}};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.editor=HN({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=HN({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)}));const YN=GN;function $N(t){return $N="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},$N(t)}function XN(t){var e=function(t,e){if("object"!=$N(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=$N(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$N(e)?e:e+""}var ZN=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 YN,this.data=e.pluginData||new zN(this.configuration,{},e.event),this.__drawer=e.pluginDrawer||new oN(this.data),this.__metadata=e.pluginMetadata||new uN(this.data),this.__parser=e.pluginParser||new pN(this.data),this.__renderer=e.pluginRenderer||new gN(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();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 tC=QN;function eC(t){return eC="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},eC(t)}function nC(t,e,n){return e=iC(e),function(t,e){if(e&&("object"==eC(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,rC()?Reflect.construct(e,n||[],iC(t).constructor):e.apply(t,n))}function rC(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(rC=function(){return!!t})()}function iC(t){return iC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},iC(t)}function oC(t,e){return oC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},oC(t,e)}var sC=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=nC(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&&oC(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(l);const aC=sC})();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:_,IfAsync:b,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,_=n(2),b=_.handleError,w=_.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(b(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=_;break;case",":M=w;break;case":":M=x;break;case"~":M=k;break;case"|":M=T;break;default:M=b}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:()=>Gn});var t=n(916);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};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}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,e,n){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 _=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,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(t.ComponentAttributeDefinition);const b=_;function w(t){return function(t){if(Array.isArray(t))return x(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 x(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)?x(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 x(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);nusing 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"},{name:"tags",displayName:"Tags",description:"Map of assume role session tags.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#tags"},{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:[{name:"tags",displayName:"Tags",description:"Key-value map of tags to apply to all resources.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#tags"}]},{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"}]}]),w([{type:"aws_ami",blockType:"data",displayName:"Amazon Machine Image (AMI)",description:"An Amazon Machine Image (AMI) is a supported and maintained image provided by AWS
that 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"]}}]}]),w([{type:"aws_vpc",blockType:"resource",provider:"aws",displayName:"Virtual Private Cloud (VPC)",description:"Amazon Virtual Private Cloud (Amazon VPC) enables you to launch AWS resources into a virtual network that you've defined.",icon:"Aws_Virtual-Private-Cloud",isContainer:!0,model:"DefaultContainer",url:"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html",categories:["AWS","Networking"],tags:[],definedAttributes:[{name:"cidr_block",displayName:"CIDR block",description:"IPv4 CIDR block of the desired VPC.",type:"String",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html",rules:{regex:"^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$"}},{name:"ipv4_ipam_pool_id",displayName:"IPv4 IPAM pool ID",description:"ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR.",type:"String",url:"https://docs.aws.amazon.com/vpc/latest/ipam/what-it-is-ipam.html"},{name:"ipv4_netmask_length",displayName:"IPv4 netmask length",description:"Netmask length of the IPv4 CIDR you want to allocate to this VPC.",type:"Number",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html",rules:{max:32,min:1}},{name:"ipv6_cidr_block",displayName:"IPv6 CIDR block",description:"IPv6 CIDR block to request from an IPAM Pool.",type:"String",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html",rules:{regex:"[a-fA-F0-9]{4}(:[a-fA-F0-9]{4}){7}"}},{name:"ipv6_ipam_pool_id",displayName:"IPv6 IPAM pool ID",description:"IPAM Pool ID for a IPv6 pool",type:"String",url:"https://docs.aws.amazon.com/vpc/latest/ipam/what-it-is-ipam.html"},{name:"ipv6_netmask_length",displayName:"IPv6 netmask length",description:"Netmask length to request from IPAM Pool.",type:"Number",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html",rules:{values:[56]}},{name:"ipv6_cidr_block_network_border_group",displayName:"IPv6 CIDR block network border group",description:"Restrict advertisement of public addresses to specific Network Border Groups such as LocalZones.",type:"String",url:"https://docs.aws.amazon.com/vpc/latest/userguide/Extend_VPCs.html"},{name:"instance_tenancy",displayName:"Instance tenancy",description:"Allowed tenancy of instances launched into the selected VPC.",type:"String",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html",rules:{values:["default","dedicated"]}},{name:"enable_dns_support",displayName:"Enable DNS support",description:"Enable DNS support in the VPC.",type:"Boolean",url:"https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html"},{name:"enable_dns_hostnames",displayName:"Enable DNS hostnames",description:"Enable DNS hostnames in the VPC.",type:"Boolean",url:"https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html"},{name:"enable_classiclink",displayName:"Enable ClassicLink",description:"Enable ClassicLink for the VPC, allowing you to link EC2-Classic instances to the VPC.",type:"Boolean",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html"},{name:"enable_classiclink_dns_support",displayName:"Enable ClassicLink DNS support",description:"Enable ClassicLink DNS Support for the VPC.
If 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"},{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"}]},{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:[{name:"vpc_id",displayName:"VPC ID",description:"The VPC ID to create the subnet in.",containerRef:"aws_vpc",required:!0,type:"Reference",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"},{name:"tags",displayName:"Tags",description:"A map of tags to assign to the resource.",type:"Object",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:[{name:"vpc_id",displayName:"VPC ID",description:"The ID of the VPC for which to create the route table.",containerRef:"aws_vpc",required:!0,type:"Reference",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"},{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"}]},{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:[{name:"vpc_id",displayName:"VPC ID",description:"The ID of the VPC for which to create the route table association.",containerRef:"aws_vpc",type:"Reference",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"},{name:"subnet_id",displayName:"Subnet ID",description:"The ID of the subnet to associate the route table with. Conflicts with gateway_id.",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",type:"Link",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:[{name:"vpc_id",displayName:"VPC ID",description:"The VPC ID to create the gateway in.",containerRef:"aws_vpc",type:"Reference",url:"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"},{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"}]}]),w([{type:"aws_security_group",blockType:"resource",provider:"aws",displayName:"Security group",description:"A security group controls the traffic that is allowed to reach and leave the resources that it is associated with.",icon:"AwsSecurityGroup",model:"DefaultModel",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html",categories:["AWS","Security"],tags:[],definedAttributes:[{name:"description",displayName:"Description",description:"Description of the security group.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#description"},{name:"name",displayName:"Name",description:"Name of the security group.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_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/security_group#name_prefix"},{name:"revoke_rules_on_delete",displayName:"Revoke rules on delete",description:"Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#revoke_rules_on_delete"},{name:"vpc_id",displayName:"VPC ID",description:"The ID of the VPC for which to create the security group.",containerRef:"aws_vpc",linkAttribute:"id",linkRef:"aws_vpc",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#vpc_id"},{name:"egress",displayName:"Egress",description:"Configuration block for egress rules",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#egress",definedAttributes:[{name:"from_port",displayName:"From port",description:"Start port (or ICMP type number if protocol is icmp).",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#from_port"},{name:"to_port",displayName:"To port",description:"End port (or ICMP code if protocol is icmp).",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#to_port"},{name:"protocol",displayName:"Protocol",description:"The protocol. If not icmp, tcp, udp, or all use the -1 protocol number.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#protocol"},{name:"cidr_blocks",displayName:"CIDR blocks",description:"List of CIDR blocks.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#cidr_blocks"},{name:"ipv6_cidr_blocks",displayName:"IPv6 CIDR blocks",description:"List of IPv6 CIDR blocks.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#ipv6_cidr_blocks"}]},{name:"ingress",displayName:"Ingress",description:"Configuration block for Ingress rules",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#ingress",definedAttributes:[{name:"from_port",displayName:"From port",description:"Start port (or ICMP type number if protocol is icmp).",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#from_port"},{name:"to_port",displayName:"To port",description:"End port (or ICMP code if protocol is icmp).",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#to_port"},{name:"protocol",displayName:"Protocol",description:"The protocol. If not icmp, tcp, udp, or all use the -1 protocol number.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#protocol"},{name:"cidr_blocks",displayName:"CIDR blocks",description:"List of CIDR blocks.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#cidr_blocks"},{name:"ipv6_cidr_blocks",displayName:"IPv6 CIDR blocks",description:"List of IPv6 CIDR blocks.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#ipv6_cidr_blocks"}]},{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"}]},{type:"aws_key_pair",blockType:"resource",provider:"aws",displayName:"AWS key pair",description:"A set of security credentials to prove your identity when connecting to an Amazon EC2 instance.",icon:"Aws_Identity-Access-Management_Long-Term-Security-Credential",model:"DefaultModel",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html",categories:["AWS","Security"],tags:[],definedAttributes:[{name:"key_name",displayName:"Key name",description:"The name for the key pair.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#key_name"},{name:"public_key",displayName:"Public key",description:"The public key material.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#public_key"},{name:"key_name_prefix",displayName:"Key name prefix",description:"Creates a unique name beginning with the specified prefix.
Conflicts with key_name.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#key_name_prefix"},{name:"tags",displayName:"Tags",description:"A mapping of tags to assign to the resource.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#tags"}]}]),w([{type:"aws_instance",blockType:"resource",provider:"aws",displayName:"EC2 Instance",description:"Provides an EC2 instance resource.",icon:"Aws_EC2-Instance",model:"DefaultModel",url:"https://docs.aws.amazon.com/ec2/index.html",categories:["AWS","Compute"],tags:[],definedAttributes:[{name:"security_groups",displayName:"Security groups",description:"List of security group names to associate with.",linkAttribute:"name",linkRef:"aws_security_group",linkType:"Reverse",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#security_groups"},{name:"vpc_security_group_ids",displayName:"VPC security group IDs",description:"List of security group IDs to associate with.",linkAttribute:"id",linkRef:"aws_security_group",linkType:"Reverse",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#vpc_security_group_ids"},{name:"subnet_id",displayName:"Subnet ID",description:"The VPC Subnet ID to launch in.",linkAttribute:"id",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#subnet_id"}]},{type:"aws_launch_configuration",blockType:"resource",provider:"aws",displayName:"Launch configuration",description:"A launch configuration is an instance configuration template that an Auto Scaling group uses to launch EC2 instances.
When 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"},{name:"security_groups",displayName:"Security groups",description:"A list of associated security group IDS.",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",type:"Link",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"}]}]}]),w([{type:"aws_ebs_volume",blockType:"resource",provider:"aws",displayName:"EBS Volume",description:"A durable, block-level storage device that you can attach to your instances.",icon:"Aws_Elastic-Block-Store_Volume",model:"DefaultModel",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes.html",categories:["AWS","Storage"],tags:[],definedAttributes:[{name:"availability_zone",displayName:"Availability zone",description:"The Availability Zone where the EBS volume will exist.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ebs_volume#availability_zone"}]},{type:"aws_volume_attachment",blockType:"resource",provider:"aws",displayName:"AWS volume attachment",description:"Attach an EBS volume to one or more instances",icon:"Aws_Elastic-Block-Store_Volume",model:"DefaultModel",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html",categories:["AWS","Storage"],tags:[],definedAttributes:[{name:"device_name",displayName:"Device name",description:"The device name to expose to the instance (for example, /dev/sdh or xvdh).",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/volume_attachment#device_name"},{name:"volume_id",displayName:"Volume ID",description:"The ID of the Volume to attach to.",linkAttribute:"id",linkRef:"aws_ebs_volume",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/volume_attachment#volume_id"},{name:"instance_id",displayName:"Instance ID",description:"The ID of the Instance to attach to.",linkAttribute:"id",linkRef:"aws_instance",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/volume_attachment#instance_id"}]},{type:"aws_s3_bucket",blockType:"resource",provider:"aws",displayName:"S3 bucket",description:"Amazon Simple Storage Service (Amazon S3) is an object storage service.",icon:"Aws_Storage-Service_Bucket",model:"DefaultModel",url:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html",categories:["AWS","Storage"],tags:[],definedAttributes:[{name:"bucket",displayName:"Bucket name",description:"The name of the bucket.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#bucket",rules:{max:63,min:1}},{name:"bucket_prefix",displayName:"Bucket prefix",description:"Creates a unique bucket name beginning with the specified prefix.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#bucket_prefix",rules:{max:63,min:1}},{name:"force_destroy",displayName:"Force destroy",description:"Indicates if all objects (including any locked objects) should be deleted from the bucket
when 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"},{name:"tags",displayName:"Tags",description:"A map of tags to assign to the resource.",type:"Object",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"},{name:"tags",displayName:"Tags",description:"A mapping of tags to assign to the file system.",type:"Object",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"},{name:"subnet_id",displayName:"Subnet ID",description:"The ID of the subnet to add the mount target in.",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",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"},{name:"security_groups",displayName:"Security groups",description:"A list of up to 5 VPC security group IDs (that must be for the same VPC as subnet specified) in effect for the mount target.",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_mount_target#security_groups"}]}]),w([{type:"aws_db_instance",blockType:"resource",provider:"aws",displayName:"AWS DB instance",description:"An isolated database environment.",icon:"Aws_EC2_DB-Instance",model:"DefaultModel",url:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.html",categories:["AWS","Databases"],tags:[],definedAttributes:[{name:"allocated_storage",displayName:"Allocated storage",description:"The allocated storage in gigabytes.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#allocated_storage"},{name:"db_name",displayName:"Database name",description:"The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#db_name"},{name:"engine",displayName:"Database engine",description:"The database engine to use.",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#engine"},{name:"vpc_security_group_ids",displayName:"VPC security groups",description:"A list of VPC security groups to associate.",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#vpc_security_group_ids"},{name:"instance_class",displayName:"Instance class",description:"The instance type of the Relational Database Service instance.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#instance_class"},{name:"db_subnet_group_name",displayName:"Subnet group name",description:"Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group.",linkAttribute:"name",linkRef:"aws_db_subnet_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#db_subnet_group_name"},{name:"username",displayName:"Username",description:"Username for the master DB user.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#username"},{name:"password",displayName:"Password",description:"Password for the master DB user.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#password"},{name:"skip_final_snapshot",displayName:"Skip final snapshot",description:"Determines whether a final DB snapshot is created before the DB instance is deleted.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#skip_final_snapshot"},{name:"publicly_accessible",displayName:"Publicly accessible",description:"Controls if instance is publicly accessible.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#publicly_accessible"},{name:"allow_major_version_upgrade",displayName:"Allow major version upgrade",description:"Indicates that major version upgrades are allowed.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#allow_major_version_upgrade"},{name:"apply_immediately",displayName:"Apply immediately",description:"Specifies whether any database modifications are applied immediately, or during the next maintenance window.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#apply_immediately"},{name:"auto_minor_version_upgrade",displayName:"Auto minor version upgrade",description:"Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#auto_minor_version_upgrade"},{name:"availability_zone",displayName:"Availability zone",description:"The Availability Zone for the Relational Database Service instance.",linkAttribute:"id",linkRef:"aws_availability_zones",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#availability_zone"},{name:"backup_retention_period",displayName:"Backup retention period",description:"The days to retain backups for.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#backup_retention_period",rules:{max:"35",min:"0"}},{name:"backup_window",displayName:"Backup window",description:"The daily time range (in UTC) during which automated backups are created if they are enabled.
Must 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"},{name:"port",displayName:"Port",description:"The port on which the DB accepts connections.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#port",rules:{max:"65535",min:"1"}},{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"},{name:"tags",displayName:"Tags",description:"A mapping of tags to assign to the DB instance.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#tags"}]}]),w([{type:"aws_elb",blockType:"resource",provider:"aws",displayName:"AWS ELB",description:"Automatically distributes incoming application traffic across multiple targets and virtual appliances in one or more Availability Zones.",icon:"Aws_Elastic-Load-Balancing_Network-Load-Balancer",model:"DefaultModel",url:"https://aws.amazon.com/elasticloadbalancing/",categories:["AWS","Load Balancing"],tags:[],definedAttributes:[{name:"listener",displayName:"Listener",description:"A list of listener blocks. Each listener block supports fields documented below.",required:!0,type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#listener",definedAttributes:[{name:"instance_port",displayName:"Instance port",description:"The port on the instance to route to.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#instance_port"},{name:"lb_port",displayName:"LB port",description:"The port to listen on for the load balancer.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#lb_port"},{name:"lb_protocol",displayName:"LB protocol",description:"The protocol to listen on. Valid values are HTTP, HTTPS, TCP, or SSL.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#lb_protocol"},{name:"instance_protocol",displayName:"Instance protocol",description:"The protocol to use to the instance. Valid values are HTTP, HTTPS, TCP, or SSL.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#instance_protocol"}]},{name:"subnets",displayName:"Subnets",description:"A list of subnet IDs to attach to the ELB.",linkAttribute:"id",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#subnets"},{name:"security_groups",displayName:"Security groups",description:"A list of security group IDs to assign to the ELB.",linkAttribute:"id",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#security_groups"},{name:"instances",displayName:"Instances",description:"A list of instance ids to place in the ELB pool.",linkAttribute:"id",linkRef:"aws_instance",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#instances"}]},{type:"aws_lb",blockType:"resource",provider:"aws",displayName:"Application Load Balancer (LB)",description:"A load balancer serves as the single point of contact for clients. The load balancer distributes incoming application traffic across multiple targets, in multiple Availability Zones.",icon:"Aws_Application-Load-Balancer",model:"DefaultModel",url:"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html",categories:["AWS","Load Balancing"],tags:[],definedAttributes:[{name:"vpc_id",displayName:"VPC ID",description:"The ID of the VPC to create the ALB in.",containerRef:"aws_vpc",type:"Reference",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#vpc_id"},{name:"name",displayName:"Name",description:"The name of the LB. This name must be unique within your AWS account.
If 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"]}},{name:"security_groups",displayName:"Security groups",description:"A list of security group IDs to assign to the LB. Only valid for Load Balancers of type application.",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",type:"Link",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:[{name:"subnet_id",displayName:"Subnet ID",description:"ID of the subnet of which to attach to the load balancer. You can specify only one subnet per Availability Zone.",type:"String",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"},{name:"ipv6_address",displayName:"IPv6 address",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.",type:"String",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"},{name:"tags",displayName:"Tags",description:"A map of tags to assign to the resource. If configured with a provider default_tags configuration block present,
tags with matching keys will overwrite those defined at the provider-level.",type:"Object",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"},{name:"port",displayName:"Port",description:"Port on which targets receive traffic, unless overridden when registering a specific target.",type:"Number",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"]}},{name:"vpc_id",displayName:"VPC ID",description:"Identifier of the VPC in which to create the target group.",linkRef:"aws_vpc",linkType:"Default",linkModel:"defaultLink",type:"Link",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"},{name:"port",displayName:"Port",description:"The port the load balancer uses when performing health checks on targets.",type:"Number",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"]}}]},{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"},{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:"Cerificate 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"},{name:"port",displayName:"Port",description:"Port on which the load balancer is listening.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#port",rules:{max:65535,min:1}},{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"},{name:"tags",displayName:"Tags",description:"A mapping of tags to assign to the resource.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#tags"}]}]),w([{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"}]}]),w([{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"}]}]}]),w([{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"}]}]),w([{type:"server",blockType:"module",provider:"aws",displayName:"Server",icon:"Aws_Servers",model:"DefaultModel",categories:["AWS","Modules"],tags:[],definedAttributes:[]}]),w([{type:"image_id",blockType:"variable",provider:"aws",icon:"variable",model:"DefaultModel",categories:["AWS","Variables"],tags:[],definedAttributes:[]}])))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(S)||function(t,e){if(t){if("string"==typeof t)return k(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)?k(t,e):void 0}}(S)||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.")}();var S;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 A(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 A(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 A(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)?A(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 B=j;var F={92:()=>{}},U={};function z(t){var e=U[t];if(void 0!==e)return e.exports;var n=U[t]={exports:{}};return F[t](n,n.exports,z),n.exports}z.d=(t,e)=>{for(var n in e)z.o(e,n)&&!z.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},z.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var V={};(()=>{z.d(V,{dx:()=>$,q2:()=>Ot,FO:()=>ke,xf:()=>Ee,Gy:()=>Ce,s4:()=>Pt,c7:()=>Ie,_7:()=>ce,gp:()=>_e,cK:()=>Nt,zs:()=>ge,AV:()=>Ee,Xp:()=>g,VS:()=>v,ul:()=>Y,hW:()=>Bt,x1:()=>Xt,z5:()=>ee,oN:()=>fe,TB:()=>pe,u1:()=>de,_b:()=>De,$F:()=>re,_T:()=>Fe,db:()=>ie,Zx:()=>te,_x:()=>Dt,r8:()=>M,JI:()=>C,TP:()=>L,WU:()=>t,Nj:()=>c,ZP:()=>qe});class t{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 e(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)*u&65535)<<16)&4294967295,o=o<<15|o>>>17,o=(65535&o)*l+(((o>>>16)*l&65535)<<16)&4294967295,c^=o,c=c<<13|c>>>19,i=5*(65535&c)+((5*(c>>>16)&65535)<<16)&4294967295,c=27492+(65535&i)+((58964+(i>>>16)&65535)<<16);switch(o=0,s){case 3:o^=(255&r.charCodeAt(h+2))<<16;case 2:o^=(255&r.charCodeAt(h+1))<<8;case 1:o^=255&r.charCodeAt(h),o=(65535&o)*u+(((o>>>16)*u&65535)<<16)&4294967295,o=o<<15|o>>>17,o=(65535&o)*l+(((o>>>16)*l&65535)<<16)&4294967295,c^=o}return c^=r.length,c^=c>>>16,c=2246822507*(65535&c)+((2246822507*(c>>>16)&65535)<<16)&4294967295,c^=c>>>13,c=3266489909*(65535&c)+((3266489909*(c>>>16)&65535)<<16)&4294967295,c^=c>>>16,c>>>0}class i{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 i;return t.update.apply(t,arguments),t.finish()}}function o(t){return t?"string"==typeof t?r(t):t.hashCode():-1}function s(t,e){return t?t.equals(e):t===e}function a(t){return null===t?"null":t}function c(t){return Array.isArray(t)?"["+t.map(a).join(", ")+"]":"null"}const u="h-";class l{constructor(t,e){this.data={},this.hashFunction=t||o,this.equalsFunction=e||s}add(t){const e=u+this.hashFunction(t);if(e in this.data){const n=this.data[e];for(let e=0;et.startsWith(u))).flatMap((t=>this.data[t]),this)}toString(){return c(this.values())}get length(){return Object.keys(this.data).filter((t=>t.startsWith(u))).map((t=>this.data[t].length),this).reduce(((t,e)=>t+e),0)}}class h{hashCode(){const t=new i;return this.updateHashCode(t),t.finish()}evaluate(t,e){}evalPrecedence(t,e){return this}static andContext(t,e){if(null===t||t===h.NONE)return e;if(null===e||e===h.NONE)return t;const n=new f(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===h.NONE||e===h.NONE)return h.NONE;const n=new p(t,e);return 1===n.opnds.length?n.opnds[0]:n}}class f extends h{constructor(t,e){super();const n=new l;t instanceof f?t.opnds.map((function(t){n.add(t)})):n.add(t),e instanceof f?e.opnds.map((function(t){n.add(t)})):n.add(e);const r=d(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 p extends h{constructor(t,e){super();const n=new l;t instanceof p?t.opnds.map((function(t){n.add(t)})):n.add(t),e instanceof p?e.opnds.map((function(t){n.add(t)})):n.add(e);const r=d(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 p&&e(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 d(t){const e=[];return t.values().map((function(t){t instanceof h.PrecedencePredicate&&e.push(t)})),e}function m(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 y{constructor(t,e){this.checkContext(t,e),t=m(t),e=m(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:h.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 i;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 y&&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 i;return t.update(this.state.stateNumber,this.alt,this.semanticContext),t.finish()}equalsForConfigSet(t){return this===t||t instanceof y&&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!==h.NONE?","+this.semanticContext.toString():"")+(this.reachesIntoOuterContext>0?",up="+this.reachesIntoOuterContext:"")+")"}}class g{constructor(t,e){this.start=t,this.stop=e}clone(){return new g(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 g(e.start,n.stop),this.intervals.splice(t+1,1))}}complement(t,e){const n=new v;return n.addInterval(new g(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"):e.push("'"+String.fromCharCode(r.start)+"'"):e.push("'"+String.fromCharCode(r.start)+"'..'"+String.fromCharCode(r.stop-1)+"'")}return e.length>1?"{"+e.join(", ")+"}":e[0]}toIndexString(){const e=[];for(let n=0;n"):e.push(r.start.toString()):e.push(r.start.toString()+".."+(r.stop-1).toString())}return e.length>1?"{"+e.join(", ")+"}":e[0]}toTokenString(t,e){const n=[];for(let r=0;r1?"{"+n.join(", ")+"}":n[0]}elementName(e,n,r){return r===t.EOF?"":r===t.EPSILON?"":e[r]||n[r]}get length(){return this.intervals.map((t=>t.length)).reduce(((t,e)=>t+e))}}class _{constructor(){this.atn=null,this.stateNumber=_.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 _&&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)}}_.INVALID_TYPE=0,_.BASIC=1,_.RULE_START=2,_.BLOCK_START=3,_.PLUS_BLOCK_START=4,_.STAR_BLOCK_START=5,_.TOKEN_START=6,_.RULE_STOP=7,_.BLOCK_END=8,_.STAR_LOOP_BACK=9,_.STAR_LOOP_ENTRY=10,_.PLUS_LOOP_BACK=11,_.LOOP_END=12,_.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"],_.INVALID_STATE_NUMBER=-1;class b extends _{constructor(){return super(),this.stateType=_.RULE_STOP,this}}class w{constructor(t){if(null==t)throw"target cannot be null.";this.target=t,this.isEpsilon=!1,this.label=null}}w.EPSILON=1,w.RANGE=2,w.RULE=3,w.PREDICATE=4,w.ATOM=5,w.ACTION=6,w.SET=7,w.NOT_SET=8,w.WILDCARD=9,w.PRECEDENCE=10,w.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],w.serializationTypes={EpsilonTransition:w.EPSILON,RangeTransition:w.RANGE,RuleTransition:w.RULE,PredicateTransition:w.PREDICATE,AtomTransition:w.ATOM,ActionTransition:w.ACTION,SetTransition:w.SET,NotSetTransition:w.NOT_SET,WildcardTransition:w.WILDCARD,PrecedencePredicateTransition:w.PRECEDENCE};class x extends w{constructor(t,e,n,r){super(t),this.ruleIndex=e,this.precedence=n,this.followState=r,this.serializationType=w.RULE,this.isEpsilon=!0}matches(t,e,n){return!1}}class k extends w{constructor(e,n){super(e),this.serializationType=w.SET,null!=n?this.label=n:(this.label=new v,this.label.addOne(t.INVALID_TYPE))}matches(t,e,n){return this.label.contains(t)}toString(){return this.label.toString()}}class T extends k{constructor(t,e){super(t,e),this.serializationType=w.NOT_SET}matches(t,e,n){return t>=e&&t<=n&&!super.matches(t,e,n)}toString(){return"~"+super.toString()}}class S extends w{constructor(t){super(t),this.serializationType=w.WILDCARD}matches(t,e,n){return t>=e&&t<=n}toString(){return"."}}class E extends w{constructor(t){super(t)}}class A{}class O extends A{}class N extends O{}class C extends N{get ruleContext(){throw new Error("missing interface implementation")}}class L extends N{}class R extends L{}const P={toStringTree:function(t,e,n){e=e||null,null!==(n=n||null)&&(e=n.ruleNames);let r=P.getNodeText(t,e);r=function(t,e){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=P.toStringTree(t.getChild(0),e),o=o.concat(r));for(let n=1;n=0&&e0&&(t+=", "),this.returnStates[e]!==D.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 B extends D{constructor(t,e){let n=0;const r=new i;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 B&&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===D.EMPTY_RETURN_STATE?"$":""+this.returnState:this.returnState+" "+t}get length(){return 1}static create(t,e){return e===D.EMPTY_RETURN_STATE&&null===t?D.EMPTY:new B(t,e)}}class F extends B{constructor(){super(null,D.EMPTY_RETURN_STATE)}isEmpty(){return!0}getParent(t){return null}getReturnState(t){return this.returnState}equals(t){return this===t}toString(){return"$"}}D.EMPTY=new F;const U="h-";class K{constructor(t,e){this.data={},this.hashFunction=t||o,this.equalsFunction=e||s}set(t,e){const n=U+this.hashFunction(t);if(n in this.data){const r=this.data[n];for(let n=0;nt.startsWith(U))).flatMap((t=>this.data[t]),this)}getKeys(){return this.entries().map((t=>t.key))}getValues(){return this.entries().map((t=>t.value))}toString(){return"["+this.entries().map((t=>"{"+t.key+":"+t.value+"}")).join(", ")+"]"}get length(){return Object.keys(this.data).filter((t=>t.startsWith(U))).map((t=>this.data[t].length),this).reduce(((t,e)=>t+e),0)}}function H(t,e){if(null==e&&(e=M.EMPTY),null===e.parentCtx||e===M.EMPTY)return D.EMPTY;const n=H(t,e.parentCtx),r=t.states[e.invokingState].transitions[0];return B.create(n,r.followState.stateNumber)}function q(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 j([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 j(o,i);return null!==r&&r.set(t,e,s),s}}(t,e,n,r);if(n){if(t instanceof F)return t;if(e instanceof F)return e}return t instanceof B&&(t=new j([t.getParent()],[t.returnState])),e instanceof B&&(e=new j([e.getParent()],[e.returnState])),function(t,e,n,r){if(null!==r){let n=r.get(t,e);if(null!==n)return D.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),n;if(n=r.get(e,t),null!==n)return D.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),D.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> b"),e):(function(t){const e=new K;for(let n=0;n "+u),u)}(t,e,n,r)}class G{constructor(){this.data=[]}add(t){this.data[t]=!0}or(t){Object.keys(t.data).map((t=>this.add(t)),this)}remove(t){delete this.data[t]}has(t){return!0===this.data[t]}values(){return Object.keys(this.data)}minValue(){return Math.min.apply(null,this.values())}hashCode(){return i.hashStuff(this.values())}equals(t){return t instanceof G&&e(this.data,t.data)}toString(){return"{"+this.values().join(", ")+"}"}get length(){return this.values().length}}class Y{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 r=this.states[e];let i=this.nextTokens(r);if(!i.contains(t.EPSILON))return i;const o=new v;for(o.addSet(i),o.removeOne(t.EPSILON);null!==n&&n.invokingState>=0&&i.contains(t.EPSILON);){const e=this.states[n.invokingState].transitions[0];i=this.nextTokens(e.followState),o.addSet(i),o.removeOne(t.EPSILON),n=n.parentCtx}return i.contains(t.EPSILON)&&o.addOne(t.EOF),o}}$.INVALID_ALT_NUMBER=0;class X extends _{constructor(){super(),this.stateType=_.BASIC}}class Z extends _{constructor(){return super(),this.decision=-1,this.nonGreedy=!1,this}}class J extends Z{constructor(){return super(),this.endState=null,this}}class Q extends _{constructor(){return super(),this.stateType=_.BLOCK_END,this.startState=null,this}}class tt extends _{constructor(){return super(),this.stateType=_.LOOP_END,this.loopBackState=null,this}}class et extends _{constructor(){return super(),this.stateType=_.RULE_START,this.stopState=null,this.isPrecedenceRule=!1,this}}class nt extends Z{constructor(){return super(),this.stateType=_.TOKEN_START,this}}class rt extends Z{constructor(){return super(),this.stateType=_.PLUS_LOOP_BACK,this}}class it extends _{constructor(){return super(),this.stateType=_.STAR_LOOP_BACK,this}}class ot extends Z{constructor(){return super(),this.stateType=_.STAR_LOOP_ENTRY,this.loopBackState=null,this.isPrecedenceDecision=null,this}}class st extends J{constructor(){return super(),this.stateType=_.PLUS_BLOCK_START,this.loopBackState=null,this}}class at extends J{constructor(){return super(),this.stateType=_.STAR_BLOCK_START,this}}class ct extends J{constructor(){return super(),this.stateType=_.BLOCK_START,this}}class ut extends w{constructor(t,e){super(t),this.label_=e,this.label=this.makeLabel(),this.serializationType=w.ATOM}makeLabel(){const t=new v;return t.addOne(this.label_),t}matches(t,e,n){return this.label_===t}toString(){return this.label_}}class lt extends w{constructor(t,e,n){super(t),this.serializationType=w.RANGE,this.start=e,this.stop=n,this.label=this.makeLabel()}makeLabel(){const t=new v;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 ht extends w{constructor(t,e,n,r){super(t),this.serializationType=w.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 ft extends w{constructor(t,e){super(t),this.serializationType=w.EPSILON,this.isEpsilon=!0,this.outermostPrecedenceReturn=e}matches(t,e,n){return!1}toString(){return"epsilon"}}class pt extends h{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 pt&&this.ruleIndex===t.ruleIndex&&this.predIndex===t.predIndex&&this.isCtxDependent===t.isCtxDependent}toString(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}}h.NONE=new pt;class dt extends E{constructor(t,e,n,r){super(t),this.serializationType=w.PREDICATE,this.ruleIndex=e,this.predIndex=n,this.isCtxDependent=r,this.isEpsilon=!0}matches(t,e,n){return!1}getPredicate(){return new pt(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return"pred_"+this.ruleIndex+":"+this.predIndex}}class mt extends h{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)?h.NONE:null}compareTo(t){return this.precedence-t.precedence}updateHashCode(t){t.update(this.precedence)}equals(t){return this===t||t instanceof mt&&this.precedence===t.precedence}toString(){return"{"+this.precedence+">=prec}?"}}h.PrecedencePredicate=mt;class yt extends E{constructor(t,e){super(t),this.serializationType=w.PRECEDENCE,this.precedence=e,this.isEpsilon=!0}matches(t,e,n){return!1}getPredicate(){return new mt(this.precedence)}toString(){return this.precedence+" >= _p"}}class gt{constructor(t){void 0===t&&(t=null),this.readOnly=!1,this.verifyATN=null===t||t.verifyATN,this.generateRuleBypassTransitions=null!==t&&t.generateRuleBypassTransitions}}gt.defaultOptions=new gt,gt.defaultOptions.readOnly=!0;class vt{constructor(t){this.actionType=t,this.isPositionDependent=!1}hashCode(){const t=new i;return this.updateHashCode(t),t.finish()}updateHashCode(t){t.update(this.actionType)}equals(t){return this===t}}class _t extends vt{constructor(){super(6)}execute(t){t.skip()}toString(){return"skip"}}_t.INSTANCE=new _t;class bt extends vt{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 bt&&this.channel===t.channel}toString(){return"channel("+this.channel+")"}}class wt extends vt{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 wt&&this.ruleIndex===t.ruleIndex&&this.actionIndex===t.actionIndex}}class xt extends vt{constructor(){super(3)}execute(t){t.more()}toString(){return"more"}}xt.INSTANCE=new xt;class kt extends vt{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 kt&&this.type===t.type}toString(){return"type("+this.type+")"}}class Tt extends vt{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 Tt&&this.mode===t.mode}toString(){return"pushMode("+this.mode+")"}}class St extends vt{constructor(){super(4)}execute(t){t.popMode()}toString(){return"popMode"}}St.INSTANCE=new St;class Et extends vt{constructor(t){super(2),this.mode=t}execute(t){t.mode(this.mode)}updateHashCode(t){t.update(this.actionType,this.mode)}equals(t){return this===t||t instanceof Et&&this.mode===t.mode}toString(){return"mode("+this.mode+")"}}function At(t,e){const n=[];return n[t-1]=e,n.map((function(t){return e}))}class Ot{constructor(t){null==t&&(t=gt.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 $(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 ft(i)),o.addTransition(new ft(a));const l=new X;t.addState(l),l.addTransition(new ut(o,t.ruleToTokenType[e])),i.addTransition(new ft(l))}stateIsEndStateFor(t,e){if(t.ruleIndex!==e)return null;if(!(t instanceof ot))return null;const n=t.transitions[t.transitions.length-1].target;return n instanceof tt&&n.epsilonOnlyTransitions&&n.transitions[0].target instanceof b?t:null}markPrecedenceDecisions(t){for(let e=0;e=0):this.checkCondition(n.transitions.length<=1||n instanceof b)}}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(e,n,r,i,o,s,a,c){const u=e.states[i];switch(n){case w.EPSILON:return new ft(u);case w.RANGE:return new lt(u,0!==a?t.EOF:o,s);case w.RULE:return new x(e.states[o],s,a,u);case w.PREDICATE:return new dt(u,o,s,0!==a);case w.PRECEDENCE:return new yt(u,o);case w.ATOM:return new ut(u,0!==a?t.EOF:o);case w.ACTION:return new ht(u,o,s,0!==a);case w.SET:return new k(u,c[o]);case w.NOT_SET:return new T(u,c[o]);case w.WILDCARD:return new S(u);default:throw"The specified transition type: "+n+" is not valid."}}stateFactory(t,e){if(null===this.stateFactories){const t=[];t[_.INVALID_TYPE]=null,t[_.BASIC]=()=>new X,t[_.RULE_START]=()=>new et,t[_.BLOCK_START]=()=>new ct,t[_.PLUS_BLOCK_START]=()=>new st,t[_.STAR_BLOCK_START]=()=>new at,t[_.TOKEN_START]=()=>new nt,t[_.RULE_STOP]=()=>new b,t[_.BLOCK_END]=()=>new Q,t[_.STAR_LOOP_BACK]=()=>new it,t[_.STAR_LOOP_ENTRY]=()=>new ot,t[_.PLUS_LOOP_BACK]=()=>new rt,t[_.LOOP_END]=()=>new tt,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 bt(t),t[1]=(t,e)=>new wt(t,e),t[2]=(t,e)=>new Et(t),t[3]=(t,e)=>xt.INSTANCE,t[4]=(t,e)=>St.INSTANCE,t[5]=(t,e)=>new Tt(t),t[6]=(t,e)=>_t.INSTANCE,t[7]=(t,e)=>new kt(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 Nt{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 Ct extends Nt{constructor(){super()}syntaxError(t,e,n,r,i,o){console.error("line "+n+":"+r+" "+i)}}Ct.INSTANCE=new Ct;class Lt extends Nt{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 Rt{constructor(){this._listeners=[Ct.INSTANCE],this._interp=null,this._stateNumber=-1}checkVersion(t){const e="4.13.1";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 n=e.text;return null===n&&(n=e.type===t.EOF?"":"<"+e.type+">"),n=n.replace("\n","\\n").replace("\r","\\r").replace("\t","\\t"),"'"+n+"'"}getErrorListenerDispatch(){return new Lt(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}}Rt.tokenTypeMapCache={},Rt.ruleIndexMapCache={};class Pt extends t{constructor(e,n,r,i,o){super(),this.source=void 0!==e?e:Pt.EMPTY_SOURCE,this.type=void 0!==n?n:null,this.channel=void 0!==r?r:t.DEFAULT_CHANNEL,this.start=void 0!==i?i:-1,this.stop=void 0!==o?o:-1,this.tokenIndex=-1,null!==this.source[0]?(this.line=e[0].line,this.column=e[0].column):this.column=-1}clone(){const t=new Pt(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(e){const n=new Pt(this.source,e,this.channel,this.start,this.stop);return n.tokenIndex=this.tokenIndex,n.line=this.line,n.column=this.column,e===t.EOF&&(n.text=""),n}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}}Pt.EMPTY_SOURCE=[null,null];class It{}class Mt extends It{constructor(t){super(),this.copyText=void 0!==t&&t}create(t,e,n,r,i,o,s,a){const c=new Pt(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 Pt(null,t);return n.text=e,n}}Mt.DEFAULT=new Mt;class Dt extends Error{constructor(t){super(t.message),Error.captureStackTrace&&Error.captureStackTrace(this,Dt),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 jt extends Dt{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"===e?"\\n":"\t"===e?"\\t":"\r"===e?"\\r":e}getCharErrorDisplay(t){return"'"+this.getErrorDisplayForChar(t)+"'"}recover(e){this._input.LA(1)!==t.EOF&&(e instanceof jt?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 Ft(t){return t.hashCodeForConfigSet()}function Ut(t,e){return t===e||null!==t&&null!==e&&t.equalsForConfigSet(e)}Bt.DEFAULT_MODE=0,Bt.MORE=-2,Bt.SKIP=-3,Bt.DEFAULT_TOKEN_CHANNEL=t.DEFAULT_CHANNEL,Bt.HIDDEN=t.HIDDEN_CHANNEL,Bt.MIN_CHAR_VALUE=0,Bt.MAX_CHAR_VALUE=1114111;class zt{constructor(t){this.configLookup=new l(Ft,Ut),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!==h.NONE&&(this.hasSemanticContext=!0),t.reachesIntoOuterContext>0&&(this.dipsIntoOuterContext=!0);const n=this.configLookup.add(t);if(n===t)return this.cachedHashCode=-1,this.configs.push(t),!0;const r=!this.fullCtx,i=W(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 l;for(let e=0;eXt.MAX_DFA_EDGE)return null;let n=t.edges[e-Xt.MIN_DFA_EDGE];return void 0===n&&(n=null),Xt.debug&&null!==n&&console.log("reuse state "+t.stateNumber+" edge to "+n.stateNumber),n}computeTargetState(t,e,n){const r=new Ht;return this.getReachableConfigSet(t,e.configs,r,n),0===r.items.length?(r.hasSemanticContext||this.addDFAEdge(e,n,Kt.ERROR),Kt.ERROR):this.addDFAEdge(e,n,null,r)}failOrAccept(e,n,r,i){if(null!==this.prevAccept.dfaState){const t=e.dfaState.lexerActionExecutor;return this.accept(n,t,this.startIndex,e.index,e.line,e.column),e.dfaState.prediction}if(i===t.EOF&&n.index===this.startIndex)return t.EOF;throw new jt(this.recog,n,this.startIndex,r)}getReachableConfigSet(e,n,r,i){let o=$.INVALID_ALT_NUMBER;for(let s=0;sXt.MAX_DFA_EDGE||(Xt.debug&&console.log("EDGE "+t+" -> "+n+" upon "+e),null===t.edges&&(t.edges=[]),t.edges[e-Xt.MIN_DFA_EDGE]=n),n}addDFAState(t){const e=new Vt(null,t);let n=null;for(let e=0;et.startsWith("k-"))).map((t=>this.data[t]),this)}}const Qt={SLL:0,LL:1,LL_EXACT_AMBIG_DETECTION:2,hasSLLConflictTerminatingPrediction:function(t,e){if(Qt.allConfigsInRuleStopStates(e))return!0;if(t===Qt.SLL&&e.hasSemanticContext){const t=new zt;for(let n=0;n1)return!0;return!1},allSubsetsEqual:function(t){let e=null;for(let n=0;n "+s),0===s.items.length?null:s}removeAllConfigsNotInRuleStopState(e,n){if(te.allConfigsInRuleStopStates(e))return e;const r=new zt(e.fullCtx);for(let i=0;i0&&(o=this.getAltThatFinishedDecisionEntryRule(i),o!==$.INVALID_ALT_NUMBER)?o:$.INVALID_ALT_NUMBER}getAltThatFinishedDecisionEntryRule(t){const e=[];for(let n=0;n0||r.state instanceof b&&r.context.hasEmptyPath())&&e.indexOf(r.alt)<0&&e.push(r.alt)}return 0===e.length?$.INVALID_ALT_NUMBER:Math.min.apply(null,e)}splitAccordingToSemanticValidity(t,e){const n=new zt(t.fullCtx),r=new zt(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!==_.STAR_LOOP_ENTRY)return!1;if(e.stateType!==_.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(e,n,r,i,o,s){switch(n.serializationType){case w.RULE:return this.ruleTransition(e,n);case w.PRECEDENCE:return this.precedenceTransition(e,n,r,i,o);case w.PREDICATE:return this.predTransition(e,n,r,i,o);case w.ACTION:return this.actionTransition(e,n);case w.EPSILON:return new y({state:n.target},e);case w.ATOM:case w.RANGE:case w.SET:return s&&n.matches(t.EOF,0,1)?new y({state:n.target},e):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 y({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 "+c(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 y({state:e.target},t))}else{const n=h.andContext(t.semanticContext,e.getPredicate());o=new y({state:e.target,semanticContext:n},t)}else o=new y({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 "+c(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 y({state:e.target},t))}else{const n=h.andContext(t.semanticContext,e.getPredicate());o=new y({state:e.target,semanticContext:n},t)}else o=new y({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=B.create(t.context,n.stateNumber);return new y({state:e.target,context:r},t)}getConflictingAlts(t){const e=te.getConflictingAltSubsets(t);return te.getAlts(e)}getConflictingAltsOrUniqueAlt(t){let e=null;return t.uniqueAlt!==$.INVALID_ALT_NUMBER?(e=new G,e.add(t.uniqueAlt)):e=t.conflictingAlts,e}getTokenName(e){if(e===t.EOF)return"EOF";if(null!==this.parser&&null!==this.parser.literalNames){if(!(e>=this.parser.literalNames.length&&e>=this.parser.symbolicNames.length))return(this.parser.literalNames[e]||this.parser.symbolicNames[e])+"<"+e+">";console.log(e+" ttype out of range: "+this.parser.literalNames),console.log(""+this.parser.getInputStream().getTokens())}return""+e}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 ut?r="Atom "+this.getTokenName(t.label):t instanceof k&&(r=(t instanceof T?"~":"")+"Set "+t.set)}console.error(n.toString(this.parser,!0)+":"+r)}}noViableAlt(t,e,n,r){return new ee(this.parser,t,t.get(r),t.LT(1),n,e)}getUniqueAlt(t){let e=$.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===Kt.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 g(r,i+1);console.log("reportAttemptingFullContext decision="+t.decision+":"+n+", input="+this.parser.getTokenStream().getText(e))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportAttemptingFullContext(this.parser,t,r,i,e,n)}reportContextSensitivity(t,e,n,r,i){if(this.debug||this.retry_debug){const e=new g(r,i+1);console.log("reportContextSensitivity decision="+t.decision+":"+n+", input="+this.parser.getTokenStream().getText(e))}null!==this.parser&&this.parser.getErrorListenerDispatch().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 g(n,r+1);console.log("reportAmbiguity "+o+":"+s+", input="+this.parser.getTokenStream().getText(t))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportAmbiguity(this.parser,t,n,r,i,o,s)}}class ie{constructor(){this.cache=new K}add(t){if(t===D.EMPTY)return D.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 oe={ATN:$,ATNDeserializer:Ot,LexerATNSimulator:Xt,ParserATNSimulator:re,PredictionMode:te,PredictionContextCache:ie};class se{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+"=>"+c(t.predicates):e+"=>"+t.prediction.toString():e}}class ae extends se{constructor(t){super(t,null)}getEdgeLabel(t){return"'"+String.fromCharCode(t)+"'"}}class ce{constructor(t,e){if(void 0===e&&(e=0),this.atnStartState=t,this.decision=e,this._states=new l,this.s0=null,this.precedenceDfa=!1,t instanceof ot&&t.isPrecedenceDecision){this.precedenceDfa=!0;const t=new Vt(null,new zt);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 l,t){const t=new Vt(null,new zt);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 se(this,t,e).toString()}toLexerString(){return null===this.s0?"":new ae(this).toString()}get states(){return this._states}}const ue={DFA:ce,DFASerializer:se,LexerDFASerializer:ae,PredPrediction:Zt},le={PredictionContext:D},he={Interval:g,IntervalSet:v};class fe{visitTerminal(t){}visitErrorNode(t){}enterEveryRule(t){}exitEveryRule(t){}}class pe{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 de{walk(t,e){if(e instanceof R||void 0!==e.isErrorNode&&e.isErrorNode())t.visitErrorNode(e);else if(e instanceof L)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 G;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(e){if(this.inErrorRecoveryMode(e))return;const n=e._interp.atn.states[e.state],r=e.getTokenStream().LA(1),i=e.atn.nextTokens(n);if(i.contains(r))return this.nextTokensContext=null,void(this.nextTokenState=_.INVALID_STATE_NUMBER);if(i.contains(t.EPSILON))null===this.nextTokensContext&&(this.nextTokensContext=e._ctx,this.nextTokensState=e._stateNumber);else switch(n.stateType){case _.BLOCK_START:case _.STAR_BLOCK_START:case _.PLUS_BLOCK_START:case _.STAR_LOOP_ENTRY:if(null!==this.singleTokenDeletion(e))return;throw new ye(e);case _.PLUS_LOOP_BACK:case _.STAR_LOOP_BACK:{this.reportUnwantedToken(e);const t=new v;t.addSet(e.getExpectedTokens());const n=t.addSet(this.getErrorRecoverySet(e));this.consumeUntil(e,n)}}}reportNoViableAlternative(e,n){const r=e.getTokenStream();let i;i=null!==r?n.startToken.type===t.EOF?"":r.getText(new g(n.startToken.tokenIndex,n.offendingToken.tokenIndex)):"";const o="no viable alternative at input "+this.escapeWSAndQuote(i);e.notifyErrorListeners(o,n.offendingToken,n)}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 ye(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(e){const n=e.getCurrentToken(),r=this.getExpectedTokens(e).first();let i;i=r===t.EOF?"":"";let o=n;const s=e.getTokenStream().LT(-1);return o.type===t.EOF&&null!==s&&(o=s),e.getTokenFactory().create(o.source,r,i,t.DEFAULT_CHANNEL,-1,-1,o.line,o.column)}getExpectedTokens(t){return t.getExpectedTokens()}getTokenErrorDisplay(e){if(null===e)return"";let n=e.text;return null===n&&(n=e.type===t.EOF?"":"<"+e.type+">"),this.escapeWSAndQuote(n)}escapeWSAndQuote(t){return"'"+(t=(t=(t=t.replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t"))+"'"}getErrorRecoverySet(e){const n=e._interp.atn;let r=e._ctx;const i=new v;for(;null!==r&&r.invokingState>=0;){const t=n.states[r.invokingState].transitions[0],e=n.nextTokens(t.followState);i.addSet(e),r=r.parentCtx}return i.removeOne(t.EPSILON),i}consumeUntil(e,n){let r=e.getTokenStream().LA(1);for(;r!==t.EOF&&!n.contains(r);)e.consume(),r=e.getTokenStream().LA(1)}}class ke extends xe{constructor(){super()}recover(t,e){let n=t._ctx;for(;null!==n;)n.exception=e,n=n.parentCtx;throw new be(e)}recoverInline(t){this.recover(t,new ye(t))}sync(t){}}const Te={RecognitionException:Dt,NoViableAltException:ee,LexerNoViableAltException:jt,InputMismatchException:ye,FailedPredicateException:ge,DiagnosticErrorListener:_e,BailErrorStrategy:ke,DefaultErrorStrategy:xe,ErrorListener:Nt};class Se{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(e){if(0===e)return 0;e<0&&(e+=1);const n=this._index+e-1;return n<0||n>=this._size?t.EOF:this.data[n]}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 Ee extends Se{constructor(t,e){super(t,e)}}var Ae=z(92);const Oe="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;class Ne extends Ee{static fromPath(t,e,n){if(!Oe)throw new Error("FileStream is only available when running in Node!");Ae.readFile(t,e,(function(t,e){let r=null;null!==e&&(r=new Se(e,!0)),n(t,r)}))}constructor(t,e,n){if(!Oe)throw new Error("FileStream is only available when running in Node!");super(Ae.readFileSync(t,e||"utf-8"),n),this.fileName=t}}const Ce={fromString:function(t){return new Se(t,!0)},fromBlob:function(t,e,n,r){const i=new window.FileReader;i.onload=function(t){const e=new Se(t.target.result,!0);n(e)},i.onerror=r,i.readAsText(t,e)},fromBuffer:function(t,e){return new Se(t.toString(e),!0)},fromPath:function(t,e,n){Ne.fromPath(t,e,n)},fromPathSync:function(t,e){return new Ne(t,e)}},Le={arrayToString:c,stringToCharArray:function(t){let e=new Uint16Array(t.length);for(let n=0;n=0&&(this.fetchedEOF?this.index0)||this.fetch(e)>=e}fetch(e){if(this.fetchedEOF)return 0;for(let n=0;n=this.tokens.length&&(n=this.tokens.length-1);for(let o=e;o=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(e,n){if(this.sync(e),e>=this.tokens.length)return-1;let r=this.tokens[e];for(;r.channel!==this.channel;){if(r.type===t.EOF)return-1;e+=1,this.sync(e),r=this.tokens[e]}return e}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,Bt.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,Bt.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&&(r=this.tokens.length-1);let i="";for(let e=n;e=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 gt;n.generateRuleBypassTransitions=!0,e=new Ot(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.getErrorListenerDispatch().syntaxError(this,e,r,i,t,n)}consume(){const e=this.getCurrentToken();e.type!==t.EOF&&this.getInputStream().consume();const n=null!==this._parseListeners&&this._parseListeners.length>0;if(this.buildParseTrees||n){let t;t=this._errHandler.inErrorRecoveryMode(this)?this._ctx.addErrorNode(e):this._ctx.addTokenNode(e),t.invokingState=this.state,n&&this._parseListeners.forEach((function(e){t instanceof R||void 0!==t.isErrorNode&&t.isErrorNode()?e.visitErrorNode(t):t instanceof L&&e.visitTerminal(t)}))}return e}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(e){const n=this._interp.atn;let r=this._ctx;const i=n.states[this.state];let o=n.nextTokens(i);if(o.contains(e))return!0;if(!o.contains(t.EPSILON))return!1;for(;null!==r&&r.invokingState>=0&&o.contains(t.EPSILON);){const t=n.states[r.invokingState].transitions[0];if(o=n.nextTokens(t.followState),o.contains(e))return!0;r=r.parentCtx}return!(!o.contains(t.EPSILON)||e!==t.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.sourceName}setTrace(t){t?(null!==this._tracer&&this.removeParseListener(this._tracer),this._tracer=new Me(this),this.addParseListener(this._tracer)):(this.removeParseListener(this._tracer),this._tracer=null)}}De.bypassAltsAtnCache={};class je extends L{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 g.INVALID_INTERVAL;const t=this.symbol.tokenIndex;return new g(t,t)}getChildCount(){return 0}accept(t){return t.visitTerminal(this)}getText(){return this.symbol.text}toString(){return this.symbol.type===t.EOF?"":this.symbol.text}}class Be extends je{constructor(t){super(t)}isErrorNode(){return!0}accept(t){return t.visitErrorNode(this)}}class Fe extends M{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 Be&&(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 je(t);return this.addChild(e),e.parentCtx=this,e}addErrorNode(t){const e=new Be(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]:Ue.DEFAULT_PROGRAM_NAME;n="number"==typeof t?t:t.tokenIndex;let i=this.getProgram(r),o=new Ke(this.tokens,n,i.length,e);i.push(o)}insertBefore(t,e){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ue.DEFAULT_PROGRAM_NAME;n="number"==typeof t?t:t.tokenIndex;const i=this.getProgram(r),o=new Ve(this.tokens,n,i.length,e);i.push(o)}replaceSingle(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ue.DEFAULT_PROGRAM_NAME;this.replace(t,t,e,n)}replace(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ue.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 He(this.tokens,t,e,i.length,n);i.push(o)}delete(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ue.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(e){let n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ue.DEFAULT_PROGRAM_NAME;n=e instanceof g?e:new g(0,this.tokens.size-1),"string"==typeof e&&(r=e);const i=this.programs.get(r);let o=n.start,s=n.stop;if(s>this.tokens.size-1&&(s=this.tokens.size-1),o<0&&(o=0),null==i||0===i.length)return this.tokens.getText(new g(o,s));let a=[],c=this.reduceToSingleOperationPerIndex(i),u=o;for(;u<=s&&u=this.tokens.size-1&&a.push(t.text.toString());return a.join("")}reduceToSingleOperationPerIndex(t){for(let e=0;er.index&&e.index<=r.lastIndex&&(t[e.instructionIndex]=void 0);let o=this.getKindOfOps(t,He,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 ze{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 Ve extends ze{constructor(t,e,n,r){super(t,e,n,r)}execute(e){return this.text&&e.push(this.text.toString()),this.tokens.get(this.index).type!==t.EOF&&e.push(String(this.tokens.get(this.index).text)),this.index+1}}class Ke extends Ve{constructor(t,e,n,r){super(t,e+1,n,r)}}class He extends ze{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 qe={atn:oe,dfa:ue,context:le,misc:he,tree:me,error:Te,Token:t,CommonToken:Pt,CharStreams:Ce,CharStream:Ee,InputStream:Ee,CommonTokenStream:Ie,Lexer:Bt,Parser:De,ParserRuleContext:Fe,Interval:g,IntervalSet:v,LL1Analyzer:Y,Utils:Le,TokenStreamRewriter:Ue}})();var K=V.ZP;function H(t){return H="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},H(t)}function q(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=G(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&&X(t,e)}(e,t),function(t,e,n){return e&&q(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 J=Z;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){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=nt(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&&ot(t,e)}(e,t),function(t,e,n){return e&&tt(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 at=st;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){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=Tt(t);if(this.currentComponent.definition=this.definitions.find((function(t){return t.blockType===e.currentBlockType&&t.type===n}))||this.getUnknownDefinition(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){this.currentComponent?this.currentComponent.externalId=Tt(t):this.currentVariable&&(this.currentVariable.name=Tt(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 at({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 J({category:"local",name:Tt(t.identifier())}),this.currentVariableField="value"):this.currentField=new at}},{key:"exitArgument",value:function(t){var e,n,r=this;if(this.isVariable()){var i=t.identifier().getText();"description"===i?this.currentVariable.description=Tt(t.expression()):"sensitive"!==i&&"nullable"!==i||(this.currentVariable[i]="true"===Tt(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=Tt(t.val());this.currentField=new at({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=Tt(t);return{value:"null"===e?null:e,type:"String"}}},{key:"exitVal",value:function(t){var e=this.getFieldValueTypeFromContext(t),n=e.value,r=e.type;if(this.isVariable()||"local"===this.currentBlockType){var i=this.attributeTypeToVariableType(r);Array.isArray(this.currentVariable[this.currentVariableField])?(this.currentVariable[this.currentVariableField].push(n),"defaultValue"!==this.currentVariableField&&"value"!==this.currentVariableField||(this.currentVariable.type="list(".concat(i,")"))):(this.currentVariable[this.currentVariableField]=n,"defaultValue"!==this.currentVariableField&&"value"!==this.currentVariableField||(this.currentVariable.type=i))}else"Array"===this.currentField.type?this.currentField.value.push(n):(this.currentField.value=n,this.currentField.type=r)}},{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 at({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(){}}])}(K.tree.ParseTreeListener);const Et=St;function At(t){return At="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},At(t)}function Ot(t,e,n){return e=Ct(e),function(t,e){if(e&&("object"==At(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,Nt()?Reflect.construct(e,n||[],Ct(t).constructor):e.apply(t,n))}function Nt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Nt=function(){return!!t})()}function Ct(t){return Ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ct(t)}function Lt(t,e){return Lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lt(t,e)}function Rt(t,e,n){return(e=Pt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pt(t){var e=function(t,e){if("object"!=At(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=At(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==At(e)?e:e+""}var It=(new K.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]),Mt=It.decisionToState.map((function(t,e){return new K.dfa.DFA(t,e)})),Dt=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=Ot(this,e,[t]))._interp=new K.atn.LexerATNSimulator(n,It,Mt,new K.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&&Lt(t,e)}(e,t),function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(K.Lexer);function jt(t){return jt="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},jt(t)}function Bt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ft(t,e){for(var n=0;n'","'>='","'<'","'<='","'=='","'!='","'&&'","'||'","'variable'","'provider'","'in'","'*'","'.'","'{'","'}'","'('","')'",null,"'nul'"]),Rt(Dt,"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"]),Rt(Dt,"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"]),Dt.EOF=K.Token.EOF,Dt.T__0=1,Dt.T__1=2,Dt.T__2=3,Dt.T__3=4,Dt.T__4=5,Dt.T__5=6,Dt.T__6=7,Dt.T__7=8,Dt.T__8=9,Dt.T__9=10,Dt.T__10=11,Dt.T__11=12,Dt.T__12=13,Dt.T__13=14,Dt.T__14=15,Dt.T__15=16,Dt.T__16=17,Dt.T__17=18,Dt.T__18=19,Dt.T__19=20,Dt.T__20=21,Dt.T__21=22,Dt.T__22=23,Dt.T__23=24,Dt.T__24=25,Dt.T__25=26,Dt.T__26=27,Dt.T__27=28,Dt.T__28=29,Dt.VARIABLE=30,Dt.PROVIDER=31,Dt.IN=32,Dt.STAR=33,Dt.DOT=34,Dt.LCURL=35,Dt.RCURL=36,Dt.LPAREN=37,Dt.RPAREN=38,Dt.EOF_=39,Dt.NULL_=40,Dt.NATURAL_NUMBER=41,Dt.BOOL=42,Dt.DESCRIPTION=43,Dt.MULTILINESTRING=44,Dt.STRING=45,Dt.IDENTIFIER=46,Dt.COMMENT=47,Dt.BLOCKCOMMENT=48,Dt.WS=49;var Yt=(new K.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]),$t=Yt.decisionToState.map((function(t,e){return new K.dfa.DFA(t,e)})),Xt=new K.atn.PredictionContextCache,Zt=function(t){function e(t){var n;return Bt(this,e),(n=zt(this,e,[t]))._interp=new K.atn.ParserATNSimulator(n,Yt,$t,Xt),n.ruleNames=e.ruleNames,n.literalNames=e.literalNames,n.symbolicNames=e.symbolicNames,n}return Ht(e,t),Ut(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 Jt(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 K.error.NoViableAltException(this)}this.state=78,this._errHandler.sync(this),n=this._input.LA(1)}while(!(-32&n)&&1<'","'>='","'<'","'<='","'=='","'!='","'&&'","'||'","'variable'","'provider'","'in'","'*'","'.'","'{'","'}'","'('","')'",null,"'nul'"]),Wt(Zt,"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"]),Wt(Zt,"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"]),Zt.EOF=K.Token.EOF,Zt.T__0=1,Zt.T__1=2,Zt.T__2=3,Zt.T__3=4,Zt.T__4=5,Zt.T__5=6,Zt.T__6=7,Zt.T__7=8,Zt.T__8=9,Zt.T__9=10,Zt.T__10=11,Zt.T__11=12,Zt.T__12=13,Zt.T__13=14,Zt.T__14=15,Zt.T__15=16,Zt.T__16=17,Zt.T__17=18,Zt.T__18=19,Zt.T__19=20,Zt.T__20=21,Zt.T__21=22,Zt.T__22=23,Zt.T__23=24,Zt.T__24=25,Zt.T__25=26,Zt.T__26=27,Zt.T__27=28,Zt.T__28=29,Zt.VARIABLE=30,Zt.PROVIDER=31,Zt.IN=32,Zt.STAR=33,Zt.DOT=34,Zt.LCURL=35,Zt.RCURL=36,Zt.LPAREN=37,Zt.RPAREN=38,Zt.EOF_=39,Zt.NULL_=40,Zt.NATURAL_NUMBER=41,Zt.BOOL=42,Zt.DESCRIPTION=43,Zt.MULTILINESTRING=44,Zt.STRING=45,Zt.IDENTIFIER=46,Zt.COMMENT=47,Zt.BLOCKCOMMENT=48,Zt.WS=49,Zt.RULE_file_=0,Zt.RULE_terraform=1,Zt.RULE_resource=2,Zt.RULE_data=3,Zt.RULE_provider=4,Zt.RULE_output=5,Zt.RULE_local=6,Zt.RULE_module=7,Zt.RULE_variable=8,Zt.RULE_block=9,Zt.RULE_blocktype=10,Zt.RULE_resourcetype=11,Zt.RULE_name=12,Zt.RULE_label=13,Zt.RULE_blockbody=14,Zt.RULE_argument=15,Zt.RULE_identifier=16,Zt.RULE_identifierchain=17,Zt.RULE_inline_index=18,Zt.RULE_expression=19,Zt.RULE_forloop=20,Zt.RULE_section=21,Zt.RULE_val=22,Zt.RULE_functioncall=23,Zt.RULE_functionname=24,Zt.RULE_functionarguments=25,Zt.RULE_index=26,Zt.RULE_filedecl=27,Zt.RULE_list_=28,Zt.RULE_map_=29,Zt.RULE_string=30,Zt.RULE_signed_number=31,Zt.RULE_operator_=32,Zt.RULE_number=33;var Jt=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"local",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ie):this.getTypedRuleContext(ie,t)})),Wt(i,"module",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(oe):this.getTypedRuleContext(oe,t)})),Wt(i,"output",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(re):this.getTypedRuleContext(re,t)})),Wt(i,"provider",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ne):this.getTypedRuleContext(ne,t)})),Wt(i,"variable",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(se):this.getTypedRuleContext(se,t)})),Wt(i,"data",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ee):this.getTypedRuleContext(ee,t)})),Wt(i,"resource",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(te):this.getTypedRuleContext(te,t)})),Wt(i,"terraform",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Qt):this.getTypedRuleContext(Qt,t)})),i.parser=t,i.ruleIndex=Zt.RULE_file_,i}return Ht(e,t),Ut(e,[{key:"EOF",value:function(){return this.getToken(Zt.EOF,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterFile_(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitFile_(this)}}])}(K.ParserRuleContext),Qt=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_terraform,i}return Ht(e,t),Ut(e,[{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterTerraform(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitTerraform(this)}}])}(K.ParserRuleContext),te=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_resource,i}return Ht(e,t),Ut(e,[{key:"resourcetype",value:function(){return this.getTypedRuleContext(ue,0)}},{key:"name",value:function(){return this.getTypedRuleContext(le,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterResource(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitResource(this)}}])}(K.ParserRuleContext),ee=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_data,i}return Ht(e,t),Ut(e,[{key:"resourcetype",value:function(){return this.getTypedRuleContext(ue,0)}},{key:"name",value:function(){return this.getTypedRuleContext(le,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterData(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitData(this)}}])}(K.ParserRuleContext),ne=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_provider,i}return Ht(e,t),Ut(e,[{key:"PROVIDER",value:function(){return this.getToken(Zt.PROVIDER,0)}},{key:"resourcetype",value:function(){return this.getTypedRuleContext(ue,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterProvider(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitProvider(this)}}])}(K.ParserRuleContext),re=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_output,i}return Ht(e,t),Ut(e,[{key:"name",value:function(){return this.getTypedRuleContext(le,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterOutput(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitOutput(this)}}])}(K.ParserRuleContext),ie=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_local,i}return Ht(e,t),Ut(e,[{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterLocal(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitLocal(this)}}])}(K.ParserRuleContext),oe=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_module,i}return Ht(e,t),Ut(e,[{key:"name",value:function(){return this.getTypedRuleContext(le,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterModule(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitModule(this)}}])}(K.ParserRuleContext),se=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_variable,i}return Ht(e,t),Ut(e,[{key:"VARIABLE",value:function(){return this.getToken(Zt.VARIABLE,0)}},{key:"name",value:function(){return this.getTypedRuleContext(le,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterVariable(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitVariable(this)}}])}(K.ParserRuleContext),ae=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"label",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(he):this.getTypedRuleContext(he,t)})),i.parser=t,i.ruleIndex=Zt.RULE_block,i}return Ht(e,t),Ut(e,[{key:"blocktype",value:function(){return this.getTypedRuleContext(ce,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterBlock(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitBlock(this)}}])}(K.ParserRuleContext),ce=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_blocktype,i}return Ht(e,t),Ut(e,[{key:"IDENTIFIER",value:function(){return this.getToken(Zt.IDENTIFIER,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterBlocktype(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitBlocktype(this)}}])}(K.ParserRuleContext),ue=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_resourcetype,i}return Ht(e,t),Ut(e,[{key:"STRING",value:function(){return this.getToken(Zt.STRING,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterResourcetype(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitResourcetype(this)}}])}(K.ParserRuleContext),le=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_name,i}return Ht(e,t),Ut(e,[{key:"STRING",value:function(){return this.getToken(Zt.STRING,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterName(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitName(this)}}])}(K.ParserRuleContext),he=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_label,i}return Ht(e,t),Ut(e,[{key:"STRING",value:function(){return this.getToken(Zt.STRING,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterLabel(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitLabel(this)}}])}(K.ParserRuleContext),fe=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"argument",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(pe):this.getTypedRuleContext(pe,t)})),Wt(i,"block",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ae):this.getTypedRuleContext(ae,t)})),i.parser=t,i.ruleIndex=Zt.RULE_blockbody,i}return Ht(e,t),Ut(e,[{key:"LCURL",value:function(){return this.getToken(Zt.LCURL,0)}},{key:"RCURL",value:function(){return this.getToken(Zt.RCURL,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterBlockbody(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitBlockbody(this)}}])}(K.ParserRuleContext),pe=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_argument,i}return Ht(e,t),Ut(e,[{key:"identifier",value:function(){return this.getTypedRuleContext(de,0)}},{key:"expression",value:function(){return this.getTypedRuleContext(ge,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterArgument(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitArgument(this)}}])}(K.ParserRuleContext),de=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_identifier,i}return Ht(e,t),Ut(e,[{key:"identifierchain",value:function(){return this.getTypedRuleContext(me,0)}},{key:"DOT",value:function(){return this.getToken(Zt.DOT,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterIdentifier(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitIdentifier(this)}}])}(K.ParserRuleContext),me=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"DOT",(function(t){return void 0===t&&(t=null),null===t?this.getTokens(Zt.DOT):this.getToken(Zt.DOT,t)})),Wt(i,"identifierchain",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(e):this.getTypedRuleContext(e,t)})),i.parser=t,i.ruleIndex=Zt.RULE_identifierchain,i}return Ht(e,t),Ut(e,[{key:"IDENTIFIER",value:function(){return this.getToken(Zt.IDENTIFIER,0)}},{key:"IN",value:function(){return this.getToken(Zt.IN,0)}},{key:"VARIABLE",value:function(){return this.getToken(Zt.VARIABLE,0)}},{key:"PROVIDER",value:function(){return this.getToken(Zt.PROVIDER,0)}},{key:"index",value:function(){return this.getTypedRuleContext(Te,0)}},{key:"STAR",value:function(){return this.getToken(Zt.STAR,0)}},{key:"inline_index",value:function(){return this.getTypedRuleContext(ye,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterIdentifierchain(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitIdentifierchain(this)}}])}(K.ParserRuleContext),ye=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_inline_index,i}return Ht(e,t),Ut(e,[{key:"NATURAL_NUMBER",value:function(){return this.getToken(Zt.NATURAL_NUMBER,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterInline_index(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitInline_index(this)}}])}(K.ParserRuleContext),ge=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(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=Zt.RULE_expression,i}return Ht(e,t),Ut(e,[{key:"section",value:function(){return this.getTypedRuleContext(_e,0)}},{key:"LPAREN",value:function(){return this.getToken(Zt.LPAREN,0)}},{key:"RPAREN",value:function(){return this.getToken(Zt.RPAREN,0)}},{key:"forloop",value:function(){return this.getTypedRuleContext(ve,0)}},{key:"operator_",value:function(){return this.getTypedRuleContext(Ce,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterExpression(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitExpression(this)}}])}(K.ParserRuleContext),ve=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"expression",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ge):this.getTypedRuleContext(ge,t)})),i.parser=t,i.ruleIndex=Zt.RULE_forloop,i}return Ht(e,t),Ut(e,[{key:"identifier",value:function(){return this.getTypedRuleContext(de,0)}},{key:"IN",value:function(){return this.getToken(Zt.IN,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterForloop(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitForloop(this)}}])}(K.ParserRuleContext),_e=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_section,i}return Ht(e,t),Ut(e,[{key:"list_",value:function(){return this.getTypedRuleContext(Ee,0)}},{key:"map_",value:function(){return this.getTypedRuleContext(Ae,0)}},{key:"val",value:function(){return this.getTypedRuleContext(be,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterSection(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitSection(this)}}])}(K.ParserRuleContext),be=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_val,i}return Ht(e,t),Ut(e,[{key:"NULL_",value:function(){return this.getToken(Zt.NULL_,0)}},{key:"signed_number",value:function(){return this.getTypedRuleContext(Ne,0)}},{key:"string",value:function(){return this.getTypedRuleContext(Oe,0)}},{key:"identifier",value:function(){return this.getTypedRuleContext(de,0)}},{key:"BOOL",value:function(){return this.getToken(Zt.BOOL,0)}},{key:"DESCRIPTION",value:function(){return this.getToken(Zt.DESCRIPTION,0)}},{key:"filedecl",value:function(){return this.getTypedRuleContext(Se,0)}},{key:"functioncall",value:function(){return this.getTypedRuleContext(we,0)}},{key:"EOF_",value:function(){return this.getToken(Zt.EOF_,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterVal(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitVal(this)}}])}(K.ParserRuleContext),we=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_functioncall,i}return Ht(e,t),Ut(e,[{key:"functionname",value:function(){return this.getTypedRuleContext(xe,0)}},{key:"LPAREN",value:function(){return this.getToken(Zt.LPAREN,0)}},{key:"functionarguments",value:function(){return this.getTypedRuleContext(ke,0)}},{key:"RPAREN",value:function(){return this.getToken(Zt.RPAREN,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterFunctioncall(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitFunctioncall(this)}}])}(K.ParserRuleContext),xe=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_functionname,i}return Ht(e,t),Ut(e,[{key:"IDENTIFIER",value:function(){return this.getToken(Zt.IDENTIFIER,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterFunctionname(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitFunctionname(this)}}])}(K.ParserRuleContext),ke=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"expression",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ge):this.getTypedRuleContext(ge,t)})),i.parser=t,i.ruleIndex=Zt.RULE_functionarguments,i}return Ht(e,t),Ut(e,[{key:"enterRule",value:function(t){t instanceof Et&&t.enterFunctionarguments(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitFunctionarguments(this)}}])}(K.ParserRuleContext),Te=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_index,i}return Ht(e,t),Ut(e,[{key:"expression",value:function(){return this.getTypedRuleContext(ge,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterIndex(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitIndex(this)}}])}(K.ParserRuleContext),Se=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_filedecl,i}return Ht(e,t),Ut(e,[{key:"LPAREN",value:function(){return this.getToken(Zt.LPAREN,0)}},{key:"expression",value:function(){return this.getTypedRuleContext(ge,0)}},{key:"RPAREN",value:function(){return this.getToken(Zt.RPAREN,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterFiledecl(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitFiledecl(this)}}])}(K.ParserRuleContext),Ee=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"expression",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ge):this.getTypedRuleContext(ge,t)})),i.parser=t,i.ruleIndex=Zt.RULE_list_,i}return Ht(e,t),Ut(e,[{key:"enterRule",value:function(t){t instanceof Et&&t.enterList_(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitList_(this)}}])}(K.ParserRuleContext),Ae=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"argument",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(pe):this.getTypedRuleContext(pe,t)})),i.parser=t,i.ruleIndex=Zt.RULE_map_,i}return Ht(e,t),Ut(e,[{key:"LCURL",value:function(){return this.getToken(Zt.LCURL,0)}},{key:"RCURL",value:function(){return this.getToken(Zt.RCURL,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterMap_(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitMap_(this)}}])}(K.ParserRuleContext),Oe=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_string,i}return Ht(e,t),Ut(e,[{key:"STRING",value:function(){return this.getToken(Zt.STRING,0)}},{key:"MULTILINESTRING",value:function(){return this.getToken(Zt.MULTILINESTRING,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterString(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitString(this)}}])}(K.ParserRuleContext),Ne=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_signed_number,i}return Ht(e,t),Ut(e,[{key:"number",value:function(){return this.getTypedRuleContext(Le,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterSigned_number(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitSigned_number(this)}}])}(K.ParserRuleContext),Ce=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_operator_,i}return Ht(e,t),Ut(e,[{key:"STAR",value:function(){return this.getToken(Zt.STAR,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterOperator_(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitOperator_(this)}}])}(K.ParserRuleContext),Le=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"NATURAL_NUMBER",(function(t){return void 0===t&&(t=null),null===t?this.getTokens(Zt.NATURAL_NUMBER):this.getToken(Zt.NATURAL_NUMBER,t)})),i.parser=t,i.ruleIndex=Zt.RULE_number,i}return Ht(e,t),Ut(e,[{key:"DOT",value:function(){return this.getToken(Zt.DOT,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterNumber(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitNumber(this)}}])}(K.ParserRuleContext);function Re(t){return Re="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},Re(t)}function Pe(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=[];var i=new Et(this.pluginData),o=null!=t&&t.path&&0!==t.path.length?"".concat(t.path,"/"):"",s=new RegExp("^".concat(o,"[^/]+\\.tf$"));n.filter((function(t){var e=t.path;return s.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}});i.currentFile=t;var o=new K.InputStream(t.content),s=new Dt(o),a=new K.CommonTokenStream(s),c=new Zt(a);c.buildParseTrees=!0;var u=c.file_();K.tree.ParseTreeWalker.DEFAULT.walk(i,u),e.pluginData.emitEvent({id:n,status:"success"})}))}}])}(t.DefaultParser);const Ue=Fe;var ze=n(326),Ve=n.n(ze);const Ke={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 He(t){return He="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},He(t)}function qe(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 Je=Ze,Qe={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 tn(t){return tn="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},tn(t)}function en(t,e,n){return e=rn(e),function(t,e){if(e&&("object"==tn(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,nn()?Reflect.construct(e,n||[],rn(t).constructor):e.apply(t,n))}function nn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(nn=function(){return!!t})()}function rn(t){return rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rn(t)}function on(t,e){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},on(t,e)}var sn=function(e){function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),en(this,n,[{editor:{syntax:Qe},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"}],container:{margin:15,gap:50},defaultFileName:"new_file.tf",defaultFileExtension:"tf"}])}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&&on(t,e)}(n,e),function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}(n)}(t.DefaultConfiguration);const an=sn;function cn(t){return cn="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},cn(t)}function un(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 an,r=new gn(n,{name:Un.UU,version:Un.rE},t.event);return Vn(this,e,[{pluginData:r,pluginDrawer:new Fn(r),pluginMetadata:new B(r),pluginParser:new Ue(r),pluginRenderer:new Je(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&&qn(t,e)}(e,t),function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(t.DefaultPlugin);const Gn=Wn})();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={916:(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:_,IfAsync:b,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,_=n(2),b=_.handleError,w=_.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(b(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=_;break;case",":M=w;break;case":":M=x;break;case"~":M=k;break;case"|":M=T;break;default:M=b}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:()=>b,ComponentAttribute:()=>s,ComponentAttributeDefinition:()=>O,ComponentDefinition:()=>x,ComponentDrawOption:()=>f,ComponentLink:()=>M,ComponentLinkDefinition:()=>j,ComponentRenderer:()=>PO,DefaultConfiguration:()=>YN,DefaultData:()=>zN,DefaultDrawer:()=>oN,DefaultMetadata:()=>uN,DefaultParser:()=>pN,DefaultPlugin:()=>JN,DefaultRender:()=>gN,FileInformation:()=>l,FileInput:()=>H,LinkRenderer:()=>jO,ParseError:()=>TN,Tag:()=>tC,Variable:()=>aC});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){var n=function(t,n){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,"string");if("object"!=e(i))return i;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:()=>gt,Delaunay:()=>jc,FormatSpecifier:()=>eh,InternMap:()=>bt,InternSet:()=>wt,Node:()=>Ey,Path:()=>Qs,Voronoi:()=>Lc,ZoomTransform:()=>IE,active:()=>is,arc:()=>vT,area:()=>ET,areaRadial:()=>MT,ascending:()=>q,autoType:()=>yu,axisBottom:()=>cn,axisLeft:()=>un,axisRight:()=>an,axisTop:()=>sn,bin:()=>ee,bisect:()=>tt,bisectCenter:()=>Q,bisectLeft:()=>J,bisectRight:()=>Z,bisector:()=>G,blob:()=>ol,blur:()=>et,blur2:()=>nt,blurImage:()=>rt,brush:()=>Ps,brushSelection:()=>Cs,brushX:()=>Ls,brushY:()=>Rs,buffer:()=>al,chord:()=>Hs,chordDirected:()=>Ws,chordTranspose:()=>qs,cluster:()=>_y,color:()=>ti,contourDensity:()=>cc,contours:()=>tc,count:()=>ct,create:()=>Wk,creator:()=>mr,cross:()=>ft,csv:()=>fl,csvFormat:()=>ru,csvFormatBody:()=>iu,csvFormatRow:()=>su,csvFormatRows:()=>ou,csvFormatValue:()=>au,csvParse:()=>eu,csvParseRows:()=>nu,cubehelix:()=>Ha,cumsum:()=>pt,curveBasis:()=>SS,curveBasisClosed:()=>AS,curveBasisOpen:()=>NS,curveBumpX:()=>FT,curveBumpY:()=>UT,curveBundle:()=>LS,curveCardinal:()=>IS,curveCardinalClosed:()=>DS,curveCardinalOpen:()=>BS,curveCatmullRom:()=>zS,curveCatmullRomClosed:()=>KS,curveCatmullRomOpen:()=>qS,curveLinear:()=>xT,curveLinearClosed:()=>GS,curveMonotoneX:()=>eE,curveMonotoneY:()=>nE,curveNatural:()=>oE,curveStep:()=>aE,curveStepAfter:()=>uE,curveStepBefore:()=>cE,descending:()=>W,deviation:()=>mt,difference:()=>Fe,disjoint:()=>Ue,dispatch:()=>mn,drag:()=>Hc,dragDisable:()=>Ir,dragEnable:()=>Mr,dsv:()=>hl,dsvFormat:()=>Qc,easeBack:()=>Qu,easeBackIn:()=>Zu,easeBackInOut:()=>Qu,easeBackOut:()=>Ju,easeBounce:()=>Yu,easeBounceIn:()=>Gu,easeBounceInOut:()=>$u,easeBounceOut:()=>Yu,easeCircle:()=>Du,easeCircleIn:()=>Iu,easeCircleInOut:()=>Du,easeCircleOut:()=>Mu,easeCubic:()=>ts,easeCubicIn:()=>Jo,easeCubicInOut:()=>ts,easeCubicOut:()=>Qo,easeElastic:()=>nl,easeElasticIn:()=>el,easeElasticInOut:()=>rl,easeElasticOut:()=>nl,easeExp:()=>Pu,easeExpIn:()=>Lu,easeExpInOut:()=>Pu,easeExpOut:()=>Ru,easeLinear:()=>vu,easePoly:()=>Tu,easePolyIn:()=>xu,easePolyInOut:()=>Tu,easePolyOut:()=>ku,easeQuad:()=>wu,easeQuadIn:()=>_u,easeQuadInOut:()=>wu,easeQuadOut:()=>bu,easeSin:()=>Nu,easeSinIn:()=>Au,easeSinInOut:()=>Nu,easeSinOut:()=>Ou,every:()=>Pe,extent:()=>yt,fcumsum:()=>_t,filter:()=>Me,flatGroup:()=>Ct,flatRollup:()=>Lt,forceCenter:()=>wl,forceCollide:()=>Il,forceLink:()=>jl,forceManyBody:()=>Wl,forceRadial:()=>Gl,forceSimulation:()=>ql,forceX:()=>Yl,forceY:()=>$l,format:()=>sh,formatDefaultLocale:()=>hh,formatLocale:()=>lh,formatPrefix:()=>ah,formatSpecifier:()=>th,fsum:()=>vt,geoAlbers:()=>Im,geoAlbersUsa:()=>Mm,geoArea:()=>yf,geoAzimuthalEqualArea:()=>Fm,geoAzimuthalEqualAreaRaw:()=>Bm,geoAzimuthalEquidistant:()=>zm,geoAzimuthalEquidistantRaw:()=>Um,geoBounds:()=>Zf,geoCentroid:()=>up,geoCircle:()=>bp,geoClipAntimeridian:()=>Lp,geoClipCircle:()=>Rp,geoClipExtent:()=>Up,geoClipRectangle:()=>Fp,geoConicConformal:()=>Gm,geoConicConformalRaw:()=>Wm,geoConicEqualArea:()=>Pm,geoConicEqualAreaRaw:()=>Rm,geoConicEquidistant:()=>Zm,geoConicEquidistantRaw:()=>Xm,geoContains:()=>rd,geoDistance:()=>Yp,geoEqualEarth:()=>iy,geoEqualEarthRaw:()=>ry,geoEquirectangular:()=>$m,geoEquirectangularRaw:()=>Ym,geoGnomonic:()=>sy,geoGnomonicRaw:()=>oy,geoGraticule:()=>sd,geoGraticule10:()=>ad,geoIdentity:()=>ay,geoInterpolate:()=>cd,geoLength:()=>qp,geoMercator:()=>Km,geoMercatorRaw:()=>Vm,geoNaturalEarth1:()=>uy,geoNaturalEarth1Raw:()=>cy,geoOrthographic:()=>hy,geoOrthographicRaw:()=>ly,geoPath:()=>mm,geoProjection:()=>Nm,geoProjectionMutator:()=>Cm,geoRotation:()=>gp,geoStereographic:()=>py,geoStereographicRaw:()=>fy,geoStream:()=>qh,geoTransform:()=>ym,geoTransverseMercator:()=>my,geoTransverseMercatorRaw:()=>dy,gray:()=>Ta,greatest:()=>ce,greatestIndex:()=>Se,group:()=>At,groupSort:()=>Vt,groups:()=>Ot,hcl:()=>Pa,hierarchy:()=>wy,histogram:()=>ee,hsl:()=>pi,html:()=>_l,image:()=>dl,index:()=>It,indexes:()=>Mt,interpolate:()=>Fi,interpolateArray:()=>Li,interpolateBasis:()=>_i,interpolateBasisClosed:()=>bi,interpolateBlues:()=>_k,interpolateBrBG:()=>Lx,interpolateBuGn:()=>$x,interpolateBuPu:()=>Zx,interpolateCividis:()=>Ck,interpolateCool:()=>Pk,interpolateCubehelix:()=>Ug,interpolateCubehelixDefault:()=>Lk,interpolateCubehelixLong:()=>zg,interpolateDate:()=>Pi,interpolateDiscrete:()=>Ag,interpolateGnBu:()=>Qx,interpolateGreens:()=>wk,interpolateGreys:()=>kk,interpolateHcl:()=>jg,interpolateHclLong:()=>Bg,interpolateHsl:()=>Pg,interpolateHslLong:()=>Ig,interpolateHue:()=>Og,interpolateInferno:()=>Hk,interpolateLab:()=>Mg,interpolateMagma:()=>Kk,interpolateNumber:()=>Ii,interpolateNumberArray:()=>Ni,interpolateObject:()=>Mi,interpolateOrRd:()=>ek,interpolateOranges:()=>Nk,interpolatePRGn:()=>Px,interpolatePiYG:()=>Mx,interpolatePlasma:()=>qk,interpolatePuBu:()=>ok,interpolatePuBuGn:()=>rk,interpolatePuOr:()=>jx,interpolatePuRd:()=>ak,interpolatePurples:()=>Sk,interpolateRainbow:()=>Mk,interpolateRdBu:()=>Fx,interpolateRdGy:()=>zx,interpolateRdPu:()=>uk,interpolateRdYlBu:()=>Kx,interpolateRdYlGn:()=>qx,interpolateReds:()=>Ak,interpolateRgb:()=>Si,interpolateRgbBasis:()=>Ai,interpolateRgbBasisClosed:()=>Oi,interpolateRound:()=>Ng,interpolateSinebow:()=>Fk,interpolateSpectral:()=>Gx,interpolateString:()=>Bi,interpolateTransformCss:()=>Ao,interpolateTransformSvg:()=>Oo,interpolateTurbo:()=>Uk,interpolateViridis:()=>Vk,interpolateWarm:()=>Rk,interpolateYlGn:()=>pk,interpolateYlGnBu:()=>hk,interpolateYlOrBr:()=>mk,interpolateYlOrRd:()=>gk,interpolateZoom:()=>Lg,interrupt:()=>wo,intersection:()=>ze,interval:()=>LE,isoFormat:()=>OE,isoParse:()=>CE,json:()=>yl,lab:()=>Sa,lch:()=>Ra,least:()=>ke,leastIndex:()=>Te,line:()=>ST,lineRadial:()=>IT,link:()=>HT,linkHorizontal:()=>qT,linkRadial:()=>GT,linkVertical:()=>WT,local:()=>Yk,map:()=>De,matcher:()=>wn,max:()=>ne,maxIndex:()=>re,mean:()=>de,median:()=>me,medianIndex:()=>ye,merge:()=>ge,min:()=>ie,minIndex:()=>oe,mode:()=>ve,namespace:()=>Dn,namespaces:()=>Mn,nice:()=>Qt,now:()=>Qi,pack:()=>Zy,packEnclose:()=>My,packSiblings:()=>$y,pairs:()=>_e,partition:()=>rg,path:()=>ta,pathRound:()=>ea,permute:()=>Bt,pie:()=>NT,piecewise:()=>Vg,pointRadial:()=>DT,pointer:()=>zi,pointers:()=>Xk,polygonArea:()=>Hg,polygonCentroid:()=>qg,polygonContains:()=>Xg,polygonHull:()=>$g,polygonLength:()=>Zg,precisionFixed:()=>fh,precisionPrefix:()=>ph,precisionRound:()=>dh,quadtree:()=>El,quantile:()=>ue,quantileIndex:()=>he,quantileSorted:()=>le,quantize:()=>Kg,quickselect:()=>se,radialArea:()=>MT,radialLine:()=>IT,randomBates:()=>iv,randomBernoulli:()=>av,randomBeta:()=>lv,randomBinomial:()=>hv,randomCauchy:()=>pv,randomExponential:()=>ov,randomGamma:()=>uv,randomGeometric:()=>cv,randomInt:()=>tv,randomIrwinHall:()=>rv,randomLcg:()=>_v,randomLogNormal:()=>nv,randomLogistic:()=>dv,randomNormal:()=>ev,randomPareto:()=>sv,randomPoisson:()=>mv,randomUniform:()=>Qg,randomWeibull:()=>fv,range:()=>we,rank:()=>xe,reduce:()=>je,reverse:()=>Be,rgb:()=>ii,ribbon:()=>fa,ribbonArrow:()=>pa,rollup:()=>Rt,rollups:()=>Pt,scaleBand:()=>Tv,scaleDiverging:()=>px,scaleDivergingLog:()=>dx,scaleDivergingPow:()=>yx,scaleDivergingSqrt:()=>gx,scaleDivergingSymlog:()=>mx,scaleIdentity:()=>Fv,scaleImplicit:()=>xv,scaleLinear:()=>Bv,scaleLog:()=>Yv,scaleOrdinal:()=>kv,scalePoint:()=>Ev,scalePow:()=>r_,scaleQuantile:()=>a_,scaleQuantize:()=>c_,scaleRadial:()=>s_,scaleSequential:()=>sx,scaleSequentialLog:()=>ax,scaleSequentialPow:()=>ux,scaleSequentialQuantile:()=>hx,scaleSequentialSqrt:()=>lx,scaleSequentialSymlog:()=>cx,scaleSqrt:()=>i_,scaleSymlog:()=>Jv,scaleThreshold:()=>u_,scaleTime:()=>nx,scaleUtc:()=>rx,scan:()=>Ee,schemeAccent:()=>bx,schemeBlues:()=>vk,schemeBrBG:()=>Cx,schemeBuGn:()=>Yx,schemeBuPu:()=>Xx,schemeCategory10:()=>_x,schemeDark2:()=>wx,schemeGnBu:()=>Jx,schemeGreens:()=>bk,schemeGreys:()=>xk,schemeOrRd:()=>tk,schemeOranges:()=>Ok,schemePRGn:()=>Rx,schemePaired:()=>xx,schemePastel1:()=>kx,schemePastel2:()=>Tx,schemePiYG:()=>Ix,schemePuBu:()=>ik,schemePuBuGn:()=>nk,schemePuOr:()=>Dx,schemePuRd:()=>sk,schemePurples:()=>Tk,schemeRdBu:()=>Bx,schemeRdGy:()=>Ux,schemeRdPu:()=>ck,schemeRdYlBu:()=>Vx,schemeRdYlGn:()=>Hx,schemeReds:()=>Ek,schemeSet1:()=>Sx,schemeSet2:()=>Ex,schemeSet3:()=>Ax,schemeSpectral:()=>Wx,schemeTableau10:()=>Ox,schemeYlGn:()=>fk,schemeYlGnBu:()=>lk,schemeYlOrBr:()=>dk,schemeYlOrRd:()=>yk,select:()=>Nr,selectAll:()=>Zk,selection:()=>Or,selector:()=>gn,selectorAll:()=>bn,shuffle:()=>Ae,shuffler:()=>Oe,some:()=>Ie,sort:()=>Ft,stack:()=>dE,stackOffsetDiverging:()=>yE,stackOffsetExpand:()=>mE,stackOffsetNone:()=>lE,stackOffsetSilhouette:()=>gE,stackOffsetWiggle:()=>vE,stackOrderAppearance:()=>_E,stackOrderAscending:()=>wE,stackOrderDescending:()=>kE,stackOrderInsideOut:()=>TE,stackOrderNone:()=>hE,stackOrderReverse:()=>SE,stratify:()=>ug,style:()=>Gn,subset:()=>qe,sum:()=>Ne,superset:()=>Ke,svg:()=>bl,symbol:()=>wS,symbolAsterisk:()=>$T,symbolCircle:()=>XT,symbolCross:()=>ZT,symbolDiamond:()=>tS,symbolDiamond2:()=>eS,symbolPlus:()=>nS,symbolSquare:()=>rS,symbolSquare2:()=>iS,symbolStar:()=>cS,symbolTimes:()=>vS,symbolTriangle:()=>lS,symbolTriangle2:()=>fS,symbolWye:()=>gS,symbolX:()=>vS,symbols:()=>_S,symbolsFill:()=>_S,symbolsStroke:()=>bS,text:()=>ul,thresholdFreedmanDiaconis:()=>fe,thresholdScott:()=>pe,thresholdSturges:()=>te,tickFormat:()=>Dv,tickIncrement:()=>Zt,tickStep:()=>Jt,ticks:()=>Xt,timeDay:()=>L_,timeDays:()=>R_,timeFormat:()=>Lb,timeFormatDefaultLocale:()=>Jw,timeFormatLocale:()=>Nb,timeFriday:()=>K_,timeFridays:()=>X_,timeHour:()=>A_,timeHours:()=>O_,timeInterval:()=>v_,timeMillisecond:()=>__,timeMilliseconds:()=>b_,timeMinute:()=>k_,timeMinutes:()=>T_,timeMonday:()=>F_,timeMondays:()=>W_,timeMonth:()=>pb,timeMonths:()=>db,timeParse:()=>Rb,timeSaturday:()=>H_,timeSaturdays:()=>Z_,timeSecond:()=>w_,timeSeconds:()=>x_,timeSunday:()=>B_,timeSundays:()=>q_,timeThursday:()=>V_,timeThursdays:()=>$_,timeTickInterval:()=>Sb,timeTicks:()=>Tb,timeTuesday:()=>U_,timeTuesdays:()=>G_,timeWednesday:()=>z_,timeWednesdays:()=>Y_,timeWeek:()=>B_,timeWeeks:()=>q_,timeYear:()=>gb,timeYears:()=>vb,timeout:()=>ao,timer:()=>no,timerFlush:()=>ro,transition:()=>$o,transpose:()=>Ce,tree:()=>vg,treemap:()=>kg,treemapBinary:()=>Tg,treemapDice:()=>ng,treemapResquarify:()=>Eg,treemapSlice:()=>_g,treemapSliceDice:()=>Sg,treemapSquarify:()=>xg,tsv:()=>pl,tsvFormat:()=>hu,tsvFormatBody:()=>fu,tsvFormatRow:()=>du,tsvFormatRows:()=>pu,tsvFormatValue:()=>mu,tsvParse:()=>uu,tsvParseRows:()=>lu,union:()=>We,unixDay:()=>M_,unixDays:()=>D_,utcDay:()=>P_,utcDays:()=>I_,utcFormat:()=>Pb,utcFriday:()=>ib,utcFridays:()=>hb,utcHour:()=>N_,utcHours:()=>C_,utcMillisecond:()=>__,utcMilliseconds:()=>b_,utcMinute:()=>S_,utcMinutes:()=>E_,utcMonday:()=>tb,utcMondays:()=>ab,utcMonth:()=>mb,utcMonths:()=>yb,utcParse:()=>Ib,utcSaturday:()=>ob,utcSaturdays:()=>fb,utcSecond:()=>w_,utcSeconds:()=>x_,utcSunday:()=>Q_,utcSundays:()=>sb,utcThursday:()=>rb,utcThursdays:()=>lb,utcTickInterval:()=>kb,utcTicks:()=>xb,utcTuesday:()=>eb,utcTuesdays:()=>cb,utcWednesday:()=>nb,utcWednesdays:()=>ub,utcWeek:()=>Q_,utcWeeks:()=>sb,utcYear:()=>_b,utcYears:()=>bb,variance:()=>dt,window:()=>Kn,xml:()=>vl,zip:()=>Re,zoom:()=>qE,zoomIdentity:()=>ME,zoomTransform:()=>DE});var o=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},r=[{key:"isVariable",get:function(){return!1}},{key:"hasError",value:function(){return null===this.definition?null===this.value||("array"===this.type.toLowerCase()?!Array.isArray(this.value):e(this.value)!==this.type.toLowerCase()):null!==this.value&&void 0!==this.value&&(this.__typeOfValueValidation()||this.__ruleValueValidation()||this.__ruleMinAndMaxValidation()||this.__ruleRegexValidation())}},{key:"__typeOfValueValidation",value:function(){var t=this.type.toLowerCase();return"Link"===this.definition.type?!Array.isArray(this.value)||this.value.some((function(t){return"string"!=typeof t})):"array"===t?!Array.isArray(this.value):e(this.value)!==t}},{key:"__ruleValueValidation",value:function(){var t=this;return this.definition.rules.values&&Array.isArray(this.value)?!this.value.every((function(e){return t.definition.rules.values.includes(e)})):this.definition.rules.values&&!this.definition.rules.values.includes(this.value)}},{key:"__ruleMinAndMaxValidation",value:function(){var t="number"==typeof this.value?this.value:this.value.length;return null!==this.definition.rules.min&&tthis.definition.rules.max}},{key:"__ruleRegexValidation",value:function(){return null!==this.definition.rules.regex&&!new RegExp(this.definition.rules.regex).test(this.value)}}],r&&function(t,e){for(var r=0;r0&&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 f=h;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 d(t){var e=function(t,e){if("object"!=p(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==p(e)?e:e+""}function m(t,e,n){return e=g(e),function(t,e){if(e&&("object"==p(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 _=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=m(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 f,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&&v(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 s(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]:{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,_=e.minWidth,b=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=_||0,this.minHeight=b||0,this.reservedWidth=w||0,this.reservedHeight=x||0,this.margin=k||10,this.gap=T||30}));const x=w;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 T(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 S(t,e,n){return(e=E(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function E(t){var e=function(t,e){if("object"!=k(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==k(e)?e:e+""}var A=function(t,e,n){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:null,min:null,max:null,regex: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=C(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&&P(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(l);const M=I;var D=function(t,e,n){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 j=D;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,n){return e=z(e),function(t,e){if(e&&("object"==B(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,U()?Reflect.construct(e,n||[],z(t).constructor):e.apply(t,n))}function U(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(U=function(){return!!t})()}function z(t){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},z(t)}function V(t,e){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},V(t,e)}var K=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=F(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&&V(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(l);const H=K;function q(t,e){return null==t||null==e?NaN:te?1:t>=e?0:NaN}function W(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function G(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(iq(t(e),n),r=(e,n)=>t(e)-n):(e=t===q||t===W?t:Y,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=at(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 nt=it(at),rt=it((function(t){const e=at(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 it(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?(ot(a,u,i,o,s),ot(a,i,u,o,s),ot(a,u,i,o,s),st(c,i,u,o,s),st(c,u,i,o,s),st(c,i,u,o,s)):a?(ot(a,i,u,o,s),ot(a,u,i,o,s),ot(a,i,u,o,s)):c&&(st(c,i,u,o,s),st(c,u,i,o,s),st(c,i,u,o,s)),e}}function ot(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 ut(t){return 0|t.length}function lt(t){return!(t>0)}function ht(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function ft(...t){const e="function"==typeof t[t.length-1]&&function(t){return e=>t(...e)}(t.pop()),n=(t=t.map(ht)).map(ut),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(lt))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 pt(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 dt(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 mt(t,e){const n=dt(t,e);return n?Math.sqrt(n):n}function yt(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 vt(t,e){const n=new gt;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 _t(t,e){const n=new gt;let r=-1;return Float64Array.from(t,void 0===e?t=>n.add(+t||0):i=>n.add(+e(i,++r,t)||0))}class bt extends Map{constructor(t,e=St){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(xt(this,t))}has(t){return super.has(xt(this,t))}set(t,e){return super.set(kt(this,t),e)}delete(t){return super.delete(Tt(this,t))}}class wt extends Set{constructor(t,e=St){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(xt(this,t))}add(t){return super.add(kt(this,t))}delete(t){return super.delete(Tt(this,t))}}function xt({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function kt({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Tt({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function St(t){return null!==t&&"object"==typeof t?t.valueOf():t}function Et(t){return t}function At(t,...e){return jt(t,Et,Et,e)}function Ot(t,...e){return jt(t,Array.from,Et,e)}function Nt(t,e){for(let n=1,r=e.length;nt.pop().map((([e,n])=>[...t,e,n]))));return t}function Ct(t,...e){return Nt(Ot(t,...e),e)}function Lt(t,e,...n){return Nt(Pt(t,e,...n),n)}function Rt(t,e,...n){return jt(t,Et,e,n)}function Pt(t,e,...n){return jt(t,Array.from,e,n)}function It(t,...e){return jt(t,Et,Dt,e)}function Mt(t,...e){return jt(t,Array.from,Dt,e)}function Dt(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function jt(t,e,n,r){return function t(i,o){if(o>=r.length)return n(i);const s=new bt,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 Bt(t,e){return Array.from(e,(e=>t[e]))}function Ft(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=zt(r[t],r[n]);if(e)return e}}))):(n=t.map(n),r.sort(((t,e)=>zt(n[t],n[e])))),Bt(t,r)}return t.sort(Ut(n))}function Ut(t=q){if(t===q)return zt;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 zt(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(te?1:0)}function Vt(t,e,n){return(2!==e.length?Ft(Rt(t,e,n),(([t,e],[n,r])=>q(e,r)||q(t,n))):Ft(At(t,n),(([t,n],[r,i])=>e(n,i)||q(t,r)))).map((([t])=>t))}var Kt=Array.prototype,Ht=Kt.slice;function qt(t){return()=>t}Kt.map;const Wt=Math.sqrt(50),Gt=Math.sqrt(10),Yt=Math.sqrt(2);function $t(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>=Wt?10:o>=Gt?5:o>=Yt?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 te(t){return Math.max(1,Math.ceil(Math.log(ct(t))/Math.LN2)+1)}function ee(){var t=Et,e=yt,n=te;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===yt){const t=Zt(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 re(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 ie(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 oe(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 se(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?zt:Ut(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);se(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(ae(t,n,e),i(t[r],o)>0&&ae(t,n,r);s0;)--a}0===i(t[n],o)?ae(t,n,a):(++a,ae(t,a,r)),a<=e&&(n=a+1),e<=a&&(r=a-1)}return t}function ae(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function ce(t,e=q){let n,r=!1;if(1===e.length){let i;for(const o of t){const t=e(o);(r?q(t,i)>0:0===q(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 ue(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 ie(t);if(e>=1)return ne(t);var r,i=(r-1)*e,o=Math.floor(i),s=ne(se(t,o).subarray(0,o+1));return s+(ie(t.subarray(o+1))-s)*(i-o)}}function le(t,e,n=$){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 he(t,e,n=$){if(!isNaN(e=+e)){if(r=Float64Array.from(t,((e,r)=>$(n(t[r],r,t)))),e<=0)return oe(r);if(e>=1)return re(r);var r,i=Uint32Array.from(t,((t,e)=>e)),o=r.length-1,s=Math.floor(o*e);return se(i,s,0,o,((t,e)=>zt(r[t],r[e]))),(s=ce(i.subarray(0,s+1),(t=>r[t])))>=0?s:-1}}function fe(t,e,n){const r=ct(t),i=ue(t,.75)-ue(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function pe(t,e,n){const r=ct(t),i=mt(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function de(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 me(t,e){return ue(t,.5,e)}function ye(t,e){return he(t,.5,e)}function ge(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function ve(t,e){const n=new bt;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 _e(t,e=be){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function be(t,e){return[t,e]}function we(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===q?(t,e)=>zt(n[t],n[e]):Ut(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 ke(t,e=q){let n,r=!1;if(1===e.length){let i;for(const o of t){const t=e(o);(r?q(t,i)<0:0===q(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 Te(t,e=q){if(1===e.length)return oe(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 Se(t,e=q){if(1===e.length)return re(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 Ee(t,e){const n=Te(t,e);return n<0?void 0:n}const Ae=Oe(Math.random);function Oe(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 Ne(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 Ce(t){if(!(i=t.length))return[];for(var e=-1,n=ie(t,Le),r=new Array(n);++ee(n,r,t)))}function je(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 Be(t){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(t).reverse()}function Fe(t,...e){t=new wt(t);for(const n of e)for(const e of n)t.delete(e);return t}function Ue(t,e){const n=e[Symbol.iterator](),r=new wt;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 ze(t,...e){t=new wt(t),e=e.map(Ve);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function Ve(t){return t instanceof wt?t:new wt(t)}function Ke(t,e){const n=t[Symbol.iterator](),r=new Set;for(const t of e){const e=He(t);if(r.has(e))continue;let i,o;for(;({value:i,done:o}=n.next());){if(o)return!1;const t=He(i);if(r.add(t),Object.is(e,t))break}}return!0}function He(t){return null!==t&&"object"==typeof t?t.valueOf():t}function qe(t,e){return Ke(e,t)}function We(...t){const e=new wt;for(const n of t)for(const t of n)e.add(t);return e}function Ge(t){return t}var Ye=1,$e=2,Xe=3,Ze=4,Je=1e-6;function Qe(t){return"translate("+t+",0)"}function tn(t){return"translate(0,"+t+")"}function en(t){return e=>+t(e)}function nn(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function rn(){return!this.__axis}function on(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===Ye||t===Ze?-1:1,l=t===Ze||t===$e?"x":"y",h=t===Ye||t===Xe?Qe:tn;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):Ge:i,m=Math.max(o,0)+a,y=e.range(),g=+y[0]+c,v=+y[y.length-1]+c,_=(e.bandwidth?nn:en)(e.copy(),c),b=f.selection?f.selection():f,w=b.selectAll(".domain").data([null]),x=b.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===Ye?"0em":t===Xe?"0.71em":"0.32em")),f!==b&&(w=w.transition(f),x=x.transition(f),S=S.transition(f),E=E.transition(f),k=k.transition(f).attr("opacity",Je).attr("transform",(function(t){return isFinite(t=_(t))?h(t+c):this.getAttribute("transform")})),T.attr("opacity",Je).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:_(t))+c)}))),k.remove(),w.attr("d",t===Ze||t===$e?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(_(t)+c)})),S.attr(l+"2",u*o),E.attr(l,u*m).text(d),b.filter(rn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===$e?"start":t===Ze?"end":"middle"),b.each((function(){this.__axis=_}))}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 sn(t){return on(Ye,t)}function an(t){return on($e,t)}function cn(t){return on(Xe,t)}function un(t){return on(Ze,t)}var ln={value:()=>{}};function hn(){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}On.prototype={constructor:On,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 In="http://www.w3.org/1999/xhtml";const Mn={svg:"http://www.w3.org/2000/svg",xhtml:In,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Dn(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Mn.hasOwnProperty(e)?{space:Mn[e],local:t}:t}function jn(t){return function(){this.removeAttribute(t)}}function Bn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Fn(t,e){return function(){this.setAttribute(t,e)}}function Un(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function zn(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Vn(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 Kn(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Hn(t){return function(){this.style.removeProperty(t)}}function qn(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Wn(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Gn(t,e){return t.style.getPropertyValue(e)||Kn(t).getComputedStyle(t,null).getPropertyValue(e)}function Yn(t){return function(){delete this[t]}}function $n(t,e){return function(){this[t]=e}}function Xn(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Zn(t){return t.trim().split(/^|\s+/)}function Jn(t){return t.classList||new Qn(t)}function Qn(t){this._node=t,this._names=Zn(t.getAttribute("class")||"")}function tr(t,e){for(var n=Jn(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 Sr=[null];function Er(t,e){this._groups=t,this._parents=e}function Ar(){return new Er([[document.documentElement]],Sr)}Er.prototype=Ar.prototype={constructor:Er,select:function(t){"function"!=typeof t&&(t=gn(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=w&&(w=b+1);!(_=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=Pn);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==e?Hn:"function"==typeof e?Wn:qn)(t,e,null==n?"":n)):Gn(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Yn:"function"==typeof e?Xn:$n)(t,e)):this.node()[t]},classed:function(t,e){var n=Zn(t+"");if(arguments.length<2){for(var r=Jn(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?wr:br,r=0;r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ni(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ni(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=qr.exec(t))?new oi(e[1],e[2],e[3],1):(e=Wr.exec(t))?new oi(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Gr.exec(t))?ni(e[1],e[2],e[3],e[4]):(e=Yr.exec(t))?ni(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=$r.exec(t))?hi(e[1],e[2]/100,e[3]/100,1):(e=Xr.exec(t))?hi(e[1],e[2]/100,e[3]/100,e[4]):Zr.hasOwnProperty(t)?ei(Zr[t]):"transparent"===t?new oi(NaN,NaN,NaN,0):null}function ei(t){return new oi(t>>16&255,t>>8&255,255&t,1)}function ni(t,e,n,r){return r<=0&&(t=e=n=NaN),new oi(t,e,n,r)}function ri(t){return t instanceof Br||(t=ti(t)),t?new oi((t=t.rgb()).r,t.g,t.b,t.opacity):new oi}function ii(t,e,n,r){return 1===arguments.length?ri(t):new oi(t,e,n,null==r?1:r)}function oi(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function si(){return`#${li(this.r)}${li(this.g)}${li(this.b)}`}function ai(){const t=ci(this.opacity);return`${1===t?"rgb(":"rgba("}${ui(this.r)}, ${ui(this.g)}, ${ui(this.b)}${1===t?")":`, ${t})`}`}function ci(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ui(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function li(t){return((t=ui(t))<16?"0":"")+t.toString(16)}function hi(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new di(t,e,n,r)}function fi(t){if(t instanceof di)return new di(t.h,t.s,t.l,t.opacity);if(t instanceof Br||(t=ti(t)),!t)return new di;if(t instanceof di)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 di(s,a,c,t.opacity)}function pi(t,e,n,r){return 1===arguments.length?fi(t):new di(t,e,n,null==r?1:r)}function di(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function mi(t){return(t=(t||0)%360)<0?t+360:t}function yi(t){return Math.max(0,Math.min(1,t||0))}function gi(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 vi(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 _i(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),gi(t,i,r),gi(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new di(mi(this.h),yi(this.s),yi(this.l),ci(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=ci(this.opacity);return`${1===t?"hsl(":"hsla("}${mi(this.h)}, ${100*yi(this.s)}%, ${100*yi(this.l)}%${1===t?")":`, ${t})`}`}}));const wi=t=>()=>t;function xi(t,e){return function(n){return t+n*e}}function ki(t,e){var n=e-t;return n?xi(t,n>180||n<-180?n-360*Math.round(n/360):n):wi(isNaN(t)?e:t)}function Ti(t,e){var n=e-t;return n?xi(t,n):wi(isNaN(t)?e:t)}const Si=function t(e){var n=function(t){return 1==(t=+t)?Ti: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):wi(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=ii(t)).r,(e=ii(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),s=Ti(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 Ei(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:Ii(n,r)})),o=ji.lastIndex;return o=0&&e._call.call(void 0,t),e=e._next;--Hi}function io(){$i=(Yi=Zi.now())+Xi,Hi=qi=0;try{ro()}finally{Hi=0,function(){for(var t,e,n=Vi,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:Vi=e);Ki=t,so(r)}(),$i=0}}function oo(){var t=Zi.now(),e=t-Yi;e>Gi&&(Xi-=e,Yi=t)}function so(t){Hi||(qi&&(qi=clearTimeout(qi)),t-$i>24?(t<1/0&&(qi=setTimeout(io,t-Zi.now()-Xi)),Wi&&(Wi=clearInterval(Wi))):(Wi||(Yi=Zi.now(),Wi=setInterval(oo,Gi)),Hi=1,Ji(io)))}function ao(t,e,n){var r=new eo;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}eo.prototype=no.prototype={constructor:eo,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Qi():+n)+(null==e?0:+e),this._next||Ki===this||(Ki?Ki._next=this:Vi=this,Ki=this),this._call=t,this._time=n,so()},stop:function(){this._call&&(this._call=null,this._time=1/0,so())}};var co=mn("start","end","cancel","interrupt"),uo=[],lo=0,ho=1,fo=2,po=3,mo=5,yo=6;function go(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!==ho)return a();for(u in i)if((f=i[u]).name===n.name){if(f.state===po)return ao(o);4===f.state?(f.state=yo,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+ulo)throw new Error("too late; already scheduled");return n}function _o(t,e){var n=bo(t,e);if(n.state>po)throw new Error("too late; already running");return n}function bo(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function wo(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>fo&&n.state180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Ii(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:Ii(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:Ii(t,n)},{i:a-2,x:Ii(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)?vo:_o;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=Dn(t),r="transform"===n?Oo:Ro;return this.attrTween(t,"function"==typeof e?(n.local?Bo:jo)(n,r,Lo(this,"attr."+t,e)):null==e?(n.local?Io:Po)(n):(n.local?Do:Mo)(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=Dn(t);return this.tween(n,(r.local?Fo:Uo)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Ao:Ro;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=Gn(this,t),s=(this.style.removeProperty(t),Gn(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}(t,r)).on("end.style."+t,Wo(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var s=Gn(this,t),a=n(this),c=a+"";return null==a&&(this.style.removeProperty(t),c=a=Gn(this,t)),s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,a))}}(t,r,Lo(this,"style."+t,e))).each(function(t,e){var n,r,i,o,s="style."+e,a="end."+s;return function(){var c=_o(this,t),u=c.on,l=null==c.value[s]?o||(o=Wo(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=Gn(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}}(Lo(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=bo(this.node(),n).tween,o=0,s=i.length;oho&&n.name===e)return new Yo([[t]],rs,e,+r);return null}const os=t=>()=>t;function ss(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 as(t){t.preventDefault(),t.stopImmediatePropagation()}var cs={name:"drag"},us={name:"space"},ls={name:"handle"},hs={name:"center"};const{abs:fs,max:ps,min:ds}=Math;function ms(t){return[+t[0],+t[1]]}function ys(t){return[ms(t[0]),ms(t[1])]}var gs={name:"x",handles:["w","e"].map(Ss),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]]}},vs={name:"y",handles:["n","s"].map(Ss),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]]}},_s={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Ss),input:function(t){return null==t?null:ys(t)},output:function(t){return t}},bs={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"},ws={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},xs={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},ks={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Ts={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Ss(t){return{type:t}}function Es(t){return!t.ctrlKey&&!t.button}function As(){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 Os(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ns(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Cs(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function Ls(){return Is(gs)}function Rs(){return Is(vs)}function Ps(){return Is(_s)}function Is(t){var e,n=As,r=Es,i=Os,o=!0,s=mn("start","brush","end"),a=6;function c(e){var n=e.property("__brush",m).selectAll(".overlay").data([Ss("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",bs.overlay).merge(n).each((function(){var t=Ns(this).extent;Nr(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([Ss("selection")]).enter().append("rect").attr("class","selection").attr("cursor",bs.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 bs[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=Nr(this),e=Ns(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,_=n.target.__data__.type,b="selection"===(o&&n.metaKey?_="overlay":_)?cs:o&&n.altKey?hs:ls,w=t===vs?null:ks[_],x=t===gs?null:Ts[_],k=Ns(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=zi(t,v)).point0=t.slice(),t.identifier=e,t}));wo(v);var I=l(v,arguments,!0).beforestart();if("overlay"===_){S&&(m=!0);const e=[P[0],P[1]||P[0]];k.selection=S=[[i=t===vs?E:ds(e[0][0],e[1][0]),a=t===gs?A:ds(e[0][1],e[1][1])],[h=t===vs?O:ps(e[0][0],e[1][0]),p=t===gs?N:ps(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=Nr(v).attr("pointer-events","none"),D=M.selectAll(".overlay").attr("cursor",bs[_]);if(n.touches)I.moved=B,I.ended=U;else{var j=Nr(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:b===ls&&(w&&(h=f-C*w,i=s+C*w),x&&(p=d-L*x,a=c+L*x),b=hs,F(t));break;case 32:b!==ls&&b!==hs||(w<0?h=f-C:w>0&&(i=s-C),x<0?p=d-L:x>0&&(a=c-L),b=us,D.attr("cursor",bs.selection),F(t));break;default:return}as(t)}),!0).on("keyup.brush",(function(t){switch(t.keyCode){case 16:R&&(y=g=R=!1,F(t));break;case 18:b===hs&&(w<0?h=f:w>0&&(i=s),x<0?p=d:x>0&&(a=c),b=ls,F(t));break;case 32:b===us&&(t.altKey?(w&&(h=f-C*w,i=s+C*w),x&&(p=d-L*x,a=c+L*x),b=hs):(w<0?h=f:w>0&&(i=s),x<0?p=d:x>0&&(a=c),b=ls),D.attr("cursor",bs[_]),F(t));break;default:return}as(t)}),!0),Ir(n.view)}u.call(v),I.start(n,b.name)}function B(t){for(const e of t.changedTouches||[t])for(const t of P)t.identifier===e.identifier&&(t.cur=zi(e,v));if(R&&!y&&!g&&1===P.length){const t=P[0];fs(t.cur[0]-t[0])>fs(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,as(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],b){case us:case cs:w&&(C=ps(E-i,ds(O-h,C)),s=i+C,f=h+C),x&&(L=ps(A-a,ds(N-p,L)),c=a+L,d=p+L);break;case ls:P[1]?(w&&(s=ps(E,ds(O,P[0][0])),f=ps(E,ds(O,P[1][0])),w=1),x&&(c=ps(A,ds(N,P[0][1])),d=ps(A,ds(N,P[1][1])),x=1)):(w<0?(C=ps(E-i,ds(O-i,C)),s=i+C,f=h):w>0&&(C=ps(E-h,ds(O-h,C)),s=i,f=h+C),x<0?(L=ps(A-a,ds(N-a,L)),c=a+L,d=p):x>0&&(L=ps(A-p,ds(N-p,L)),c=a,d=p+L));break;case hs:w&&(s=ps(E,ds(O,i-C*w)),f=ps(E,ds(O,h+C*w))),x&&(c=ps(A,ds(N,a-L*x)),d=ps(A,ds(N,p+L*x)))}ft+n))}function Hs(){return Gs(!1,!1)}function qs(){return Gs(!1,!0)}function Ws(){return Gs(!0,!1)}function Gs(t,e){var n=0,r=null,i=null,o=null;function s(s){var a,c=s.length,u=new Array(c),l=Ks(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=Ks(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=Ks(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 Js;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;eXs)if(Math.abs(l*a-c*u)>Xs&&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((Ys-Math.acos((d+h-m)/(2*y*g)))/2),_=v/g,b=v/y;Math.abs(_-1)>Xs&&this._append`L${t+_*u},${e+_*l}`,this._append`A${i},${i},0,0,${+(l*f>u*p)},${this._x1=t+b*a},${this._y1=e+b*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)>Xs||Math.abs(this._y1-u)>Xs)&&this._append`L${c},${u}`,n&&(h<0&&(h=h%$s+$s),h>Zs?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>Xs&&this._append`A${n},${n},0,${+(h>=Ys)},${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 ta(){return new Qs}function ea(t=3){return new Qs(+t)}ta.prototype=Qs.prototype;var na=Array.prototype.slice;function ra(t){return function(){return t}}function ia(t){return t.source}function oa(t){return t.target}function sa(t){return t.radius}function aa(t){return t.startAngle}function ca(t){return t.endAngle}function ua(){return 0}function la(){return 10}function ha(t){var e=ia,n=oa,r=sa,i=sa,o=aa,s=ca,a=ua,c=null;function u(){var u,l=e.apply(this,arguments),h=n.apply(this,arguments),f=a.apply(this,arguments)/2,p=na.call(arguments),d=+r.apply(this,(p[0]=l,p)),m=o.apply(this,p)-Fs,y=s.apply(this,p)-Fs,g=+i.apply(this,(p[0]=h,p)),v=o.apply(this,p)-Fs,_=s.apply(this,p)-Fs;if(c||(c=u=ta()),f>Vs&&(Ms(y-m)>2*f+Vs?y>m?(m+=f,y-=f):(m-=f,y+=f):m=y=(m+y)/2,Ms(_-v)>2*f+Vs?_>v?(v+=f,_-=f):(v-=f,_+=f):v=_=(v+_)/2),c.moveTo(d*Ds(m),d*js(m)),c.arc(0,0,d,m,y),m!==v||y!==_)if(t){var b=g-+t.apply(this,arguments),w=(v+_)/2;c.quadraticCurveTo(0,0,b*Ds(v),b*js(v)),c.lineTo(g*Ds(w),g*js(w)),c.lineTo(b*Ds(_),b*js(_))}else c.quadraticCurveTo(0,0,g*Ds(v),g*js(v)),c.arc(0,0,g,v,_);if(c.quadraticCurveTo(0,0,d*Ds(m),d*js(m)),c.closePath(),u)return c=null,u+""||null}return t&&(u.headRadius=function(e){return arguments.length?(t="function"==typeof e?e:ra(+e),u):t}),u.radius=function(t){return arguments.length?(r=i="function"==typeof t?t:ra(+t),u):r},u.sourceRadius=function(t){return arguments.length?(r="function"==typeof t?t:ra(+t),u):r},u.targetRadius=function(t){return arguments.length?(i="function"==typeof t?t:ra(+t),u):i},u.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:ra(+t),u):o},u.endAngle=function(t){return arguments.length?(s="function"==typeof t?t:ra(+t),u):s},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:ra(+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 fa(){return ha()}function pa(){return ha(la)}const da=Math.PI/180,ma=180/Math.PI,ya=.96422,ga=1,va=.82521,_a=4/29,ba=6/29,wa=3*ba*ba,xa=ba*ba*ba;function ka(t){if(t instanceof Ea)return new Ea(t.l,t.a,t.b,t.opacity);if(t instanceof Ia)return Ma(t);t instanceof oi||(t=ri(t));var e,n,r=Ca(t.r),i=Ca(t.g),o=Ca(t.b),s=Aa((.2225045*r+.7168786*i+.0606169*o)/ga);return r===i&&i===o?e=n=s:(e=Aa((.4360747*r+.3850649*i+.1430804*o)/ya),n=Aa((.0139322*r+.0971045*i+.7141733*o)/va)),new Ea(116*s-16,500*(e-s),200*(s-n),t.opacity)}function Ta(t,e){return new Ea(t,0,0,null==e?1:e)}function Sa(t,e,n,r){return 1===arguments.length?ka(t):new Ea(t,e,n,null==r?1:r)}function Ea(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Aa(t){return t>xa?Math.pow(t,1/3):t/wa+_a}function Oa(t){return t>ba?t*t*t:wa*(t-_a)}function Na(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ca(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function La(t){if(t instanceof Ia)return new Ia(t.h,t.c,t.l,t.opacity);if(t instanceof Ea||(t=ka(t)),0===t.a&&0===t.b)return new Ia(NaN,0()=>t;function $a(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 Za(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 Ja(){}var Qa=[[],[[[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 tc(){var t=1,e=1,n=te,r=a;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Ga);else{const n=yt(t,ec);for(e=Xt(...Qt(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=nc(n[0],r),Qa[u<<1].forEach(d);++o=r,Qa[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)?Ya(Wa.call(t)):Ya(t),i):n},i.smooth=function(t){return arguments.length?(r=t?a:Ja,i):r===a},i}function ec(t){return isFinite(t)?t:NaN}function nc(t,e){return null!=t&&+t>=e}function rc(t){return null==t||isNaN(t=+t)?-1/0:t}function ic(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 oc(t){return t[0]}function sc(t){return t[1]}function ac(){return 1}function cc(){var t=oc,e=sc,n=ac,r=960,i=500,o=20,s=2,a=3*o,c=r+2*a>>s,u=i+2*a>>s,l=Ya(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=tc().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:()=>ne(e)/r}),i},f.x=function(e){return arguments.length?(t="function"==typeof e?e:Ya(+e),f):t},f.y=function(t){return arguments.length?(e="function"==typeof t?t:Ya(+t),f):e},f.weight=function(t){return arguments.length?(n="function"==typeof t?t:Ya(+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)?Ya(Wa.call(t)):Ya(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 uc=134217729;function lc(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;b=S*O,f=uc*S,p=f-(f-S),d=S-p,f=uc*O,m=f-(f-O),y=O-m,w=d*y-(b-p*m-d*m-p*y),x=A*E,f=uc*A,p=f-(f-A),d=A-p,f=uc*E,m=f-(f-E),y=E-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,fc[0]=w-(g+h)+(h-k),v=b+g,h=v-b,_=b-(v-h)+(g-h),g=_-x,h=_-g,fc[1]=_-(g+h)+(h-x),T=v+g,h=T-v,fc[2]=v-(T-h)+(g-h),fc[3]=T;let N=function(t,e){let n=e[0];for(let t=1;t<4;t++)n+=e[t];return n}(0,fc),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;b=a*O,f=uc*a,p=f-(f-a),d=a-p,f=uc*O,m=f-(f-O),y=O-m,w=d*y-(b-p*m-d*m-p*y),x=c*E,f=uc*c,p=f-(f-c),d=c-p,f=uc*E,m=f-(f-E),y=E-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,yc[0]=w-(g+h)+(h-k),v=b+g,h=v-b,_=b-(v-h)+(g-h),g=_-x,h=_-g,yc[1]=_-(g+h)+(h-x),T=v+g,h=T-v,yc[2]=v-(T-h)+(g-h),yc[3]=T;const L=lc(4,fc,4,yc,pc);b=S*l,f=uc*S,p=f-(f-S),d=S-p,f=uc*l,m=f-(f-l),y=l-m,w=d*y-(b-p*m-d*m-p*y),x=A*u,f=uc*A,p=f-(f-A),d=A-p,f=uc*u,m=f-(f-u),y=u-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,yc[0]=w-(g+h)+(h-k),v=b+g,h=v-b,_=b-(v-h)+(g-h),g=_-x,h=_-g,yc[1]=_-(g+h)+(h-x),T=v+g,h=T-v,yc[2]=v-(T-h)+(g-h),yc[3]=T;const R=lc(L,pc,4,yc,dc);b=a*l,f=uc*a,p=f-(f-a),d=a-p,f=uc*l,m=f-(f-l),y=l-m,w=d*y-(b-p*m-d*m-p*y),x=c*u,f=uc*c,p=f-(f-c),d=c-p,f=uc*u,m=f-(f-u),y=u-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,yc[0]=w-(g+h)+(h-k),v=b+g,h=v-b,_=b-(v-h)+(g-h),g=_-x,h=_-g,yc[1]=_-(g+h)+(h-x),T=v+g,h=T-v,yc[2]=v-(T-h)+(g-h),yc[3]=T;const P=lc(R,dc,4,yc,mc);return mc[P-1]}(t,e,n,r,i,o,u)}hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(8),hc(8),hc(8),hc(4),hc(8),hc(8),hc(8),hc(12),hc(192),hc(192),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(8),hc(8),hc(8),hc(8),hc(8),hc(8),hc(8),hc(8),hc(8),hc(4),hc(4),hc(4),hc(8),hc(16),hc(16),hc(16),hc(32),hc(32),hc(48),hc(64),hc(1152),hc(1152),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(24),hc(24),hc(24),hc(24),hc(24),hc(24),hc(24),hc(24),hc(24),hc(24),hc(1152),hc(1152),hc(1152),hc(1152),hc(1152),hc(2304),hc(2304),hc(3456),hc(5760),hc(8),hc(8),hc(8),hc(16),hc(24),hc(48),hc(48),hc(96),hc(192),hc(384),hc(384),hc(384),hc(768),hc(96),hc(96),hc(96),hc(1152);const vc=Math.pow(2,-52),_c=new Uint32Array(512);class bc{static from(t,e=Ec,n=Ac){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).fill(-1),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,m=1/0;for(let e=0;e0&&(p=e,m=n)}let v=t[2*p],_=t[2*p+1],b=1/0;for(let e=0;er&&(e[n++]=i,r=this._dists[i])}return this.hull=e.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(gc(y,g,v,_,w,x)<0){const t=p,e=v,n=_;p=d,v=w,_=x,d=t,w=e,x=n}const k=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}}(y,g,v,_,w,x);this._cx=k.x,this._cy=k.y;for(let e=0;e0&&Math.abs(u-o)<=vc&&Math.abs(l-s)<=vc)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,T++;let v=n[y];for(;m=n[v],gc(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,T--,v=m;if(y===h)for(;m=e[y],gc(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,T--,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(T);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=_c[--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(xc(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<_c.length&&(_c[i++]=a)}else{if(0===i)break;t=_c[--i]}}return o}_link(t,e){this._halfedges[t]=e,-1!==e&&(this._halfedges[e]=t)}_addTriangle(t,e,n,r,i,o){const s=this.trianglesLen;return this._triangles[s]=t,this._triangles[s+1]=e,this._triangles[s+2]=n,this._link(s,r),this._link(s+1,i),this._link(s+2,o),this.trianglesLen+=3,s}}function wc(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function xc(t,e,n,r,i,o,s,a){const c=t-s,u=e-a,l=n-s,h=r-a,f=i-s,p=o-a,d=l*l+h*h,m=f*f+p*p;return c*(h*m-d*p)-u*(l*m-d*f)+(c*c+u*u)*(l*p-h*f)<0}function kc(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),p=(u*l-a*h)*f,d=(s*h-c*l)*f;return p*p+d*d}function Tc(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const r=t[i],o=e[r];let s=i-1;for(;s>=n&&e[t[s]]>o;)t[s+1]=t[s--];t[s+1]=r}else{let i=n+1,o=r;Sc(t,n+r>>1,i),e[t[n]]>e[t[r]]&&Sc(t,n,r),e[t[i]]>e[t[r]]&&Sc(t,i,r),e[t[n]]>e[t[i]]&&Sc(t,n,i);const s=t[i],a=e[s];for(;;){do{i++}while(e[t[i]]a);if(o=o-n?(Tc(t,e,i,r),Tc(t,e,n,o-1)):(Tc(t,e,n,o-1),Tc(t,e,i,r))}}function Sc(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Ec(t){return t[0]}function Ac(t){return t[1]}const Oc=1e-6;class Nc{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)>Oc||Math.abs(this._y1-i)>Oc)&&(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 Cc{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 Lc{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 Lc(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=Pc(e-c[2*t],2)+Pc(n-c[2*t+1],2);const h=r[t];let f=h;do{let r=a[f];const h=Pc(e-c[2*r],2)+Pc(n-c[2*r+1],2);if(h()=>t;function Fc(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 Uc(t){return!t.ctrlKey&&!t.button}function zc(){return this.parentNode}function Vc(t,e){return null==e?{x:t.x,y:t.y}:e}function Kc(){return navigator.maxTouchPoints||"ontouchstart"in this}function Hc(){var t,e,n,r,i=Uc,o=zc,s=Vc,a=Kc,c={},u=mn("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,Cr).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=_(this,o.call(this,s,a),s,a,"mouse");c&&(Nr(s.view).on("mousemove.drag",d,Lr).on("mouseup.drag",m,Lr),Ir(s.view),Rr(s),n=!1,t=s.clientX,e=s.clientY,c("start",s))}}function d(r){if(Pr(r),!n){var i=r.clientX-t,o=r.clientY-e;n=i*i+o*o>h}c.mouse("drag",r)}function m(t){Nr(t.view).on("mousemove.drag mouseup.drag",null),Mr(t.view,n),Pr(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++))===Yc?u=!0:r===$c&&(u=!0,t.charCodeAt(s)===Yc&&++s),t.slice(i+1,e-1).replace(/""/g,'"')}for(;s9999?"+"+Jc(e,6):Jc(e,4))+"-"+Jc(t.getUTCMonth()+1,2)+"-"+Jc(t.getUTCDate(),2)+(o?"T"+Jc(n,2)+":"+Jc(r,2)+":"+Jc(i,2)+"."+Jc(o,3)+"Z":i?"T"+Jc(n,2)+":"+Jc(r,2)+":"+Jc(i,2)+"Z":r||n?"T"+Jc(n,2)+":"+Jc(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=Xc(t);return function(r,i){return e(n(r),i,t)}}(t,e):Xc(t)}));return o.columns=i||[],o},parseRows:r,format:function(e,n){return null==n&&(n=Zc(e)),[n.map(s).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=Zc(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:s}}var tu=Qc(","),eu=tu.parse,nu=tu.parseRows,ru=tu.format,iu=tu.formatBody,ou=tu.formatRows,su=tu.formatRow,au=tu.formatValue,cu=Qc("\t"),uu=cu.parse,lu=cu.parseRows,hu=cu.format,fu=cu.formatBody,pu=cu.formatRows,du=cu.formatRow,mu=cu.formatValue;function yu(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;gu&&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 gu=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),vu=t=>+t;function _u(t){return t*t}function bu(t){return t*(2-t)}function wu(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var xu=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),ku=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),Tu=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),Su=Math.PI,Eu=Su/2;function Au(t){return 1==+t?1:1-Math.cos(t*Eu)}function Ou(t){return Math.sin(t*Eu)}function Nu(t){return(1-Math.cos(Su*t))/2}function Cu(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Lu(t){return Cu(1-+t)}function Ru(t){return 1-Cu(t)}function Pu(t){return((t*=2)<=1?Cu(1-t):2-Cu(t-1))/2}function Iu(t){return 1-Math.sqrt(1-t*t)}function Mu(t){return Math.sqrt(1- --t*t)}function Du(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var ju=4/11,Bu=6/11,Fu=8/11,Uu=3/4,zu=9/11,Vu=10/11,Ku=15/16,Hu=21/22,qu=63/64,Wu=1/ju/ju;function Gu(t){return 1-Yu(1-t)}function Yu(t){return(t=+t)ul(e,n).then((e=>(new DOMParser).parseFromString(e,t)))}const vl=gl("application/xml");var _l=gl("text/html"),bl=gl("image/svg+xml");function wl(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 kl(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Tl(t){return t[0]}function Sl(t){return t[1]}function El(t,e,n){var r=new Al(null==e?Tl:e,null==n?Sl:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Al(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 Ol(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Nl=El.prototype=Al.prototype;function Cl(t){return function(){return t}}function Ll(t){return 1e-6*(t()-.5)}function Rl(t){return t.x+t.vx}function Pl(t){return t.y+t.vy}function Il(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),_=e-+this._y.call(null,m.data),b=v*v+_*_;if(b=(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)},Nl.removeAll=function(t){for(var e=0,n=t.length;e(t=(Bl*t+Fl)%Ul)/Ul}();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 Wl(){var t,e,n,r,i,o=Cl(-30),s=1,a=1/0,c=.81;function u(n){var i,o=t.length,s=El(t,zl,Vl).visitAfter(h);for(r=n,i=0;i=a)){(t.data!==e||t.next)&&(0===h&&(d+=(h=Ll(n))*h),0===f&&(d+=(f=Ll(n))*f),d1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Zl(t){return(t=Xl(Math.abs(t)))?t[1]:NaN}var Jl,Ql=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function th(t){if(!(e=Ql.exec(t)))throw new Error("invalid format: "+t);var e;return new eh({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 eh(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 nh(t,e){var n=Xl(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")}th.prototype=eh.prototype,eh.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 rh={"%":(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)=>nh(100*t,e),r:nh,s:function(t,e){var n=Xl(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Jl=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")+Xl(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function ih(t){return t}var oh,sh,ah,ch=Array.prototype.map,uh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function lh(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?ih:(e=ch.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?ih:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(ch.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=th(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"):rh[v]||(void 0===y&&(y=12),g=!0,v="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var _="$"===f?i:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",b="$"===f?o:/[%p]/.test(v)?c:"",w=rh[v],x=/[defgprs%]/.test(v);function k(t){var i,o,c,f=_,k=b;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?uh[8+Jl/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=th(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Zl(e)/3))),i=Math.pow(10,-r),o=uh[8+r/3];return function(t){return n(i*t)+o}}}}function hh(t){return oh=lh(t),sh=oh.format,ah=oh.formatPrefix,oh}function fh(t){return Math.max(0,-Zl(Math.abs(t)))}function ph(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Zl(e)/3)))-Zl(Math.abs(t)))}function dh(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Zl(e)-Zl(t))+1}hh({thousands:",",grouping:[3],currency:["$",""]});var mh=1e-6,yh=1e-12,gh=Math.PI,vh=gh/2,_h=gh/4,bh=2*gh,wh=180/gh,xh=gh/180,kh=Math.abs,Th=Math.atan,Sh=Math.atan2,Eh=Math.cos,Ah=Math.ceil,Oh=Math.exp,Nh=(Math.floor,Math.hypot),Ch=Math.log,Lh=Math.pow,Rh=Math.sin,Ph=Math.sign||function(t){return t>0?1:t<0?-1:0},Ih=Math.sqrt,Mh=Math.tan;function Dh(t){return t>1?0:t<-1?gh:Math.acos(t)}function jh(t){return t>1?vh:t<-1?-vh:Math.asin(t)}function Bh(t){return(t=Rh(t/2))*t}function Fh(){}function Uh(t,e){t&&Vh.hasOwnProperty(t.type)&&Vh[t.type](t,e)}var zh={Feature:function(t,e){Uh(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=Eh(e=(e*=xh)/2+_h),s=Rh(e),a=Xh*s,c=$h*o+a*Eh(i),u=a*r*Rh(i);uf.add(Sh(u,c)),Yh=t,$h=o,Xh=s}function yf(t){return lf=new gt,qh(t,hf),2*lf}function gf(t){return[Sh(t[1],t[0]),jh(t[2])]}function vf(t){var e=t[0],n=t[1],r=Eh(n);return[r*Eh(e),r*Rh(e),Rh(n)]}function _f(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function bf(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 wf(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function xf(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function kf(t){var e=Ih(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Tf,Sf,Ef,Af,Of,Nf,Cf,Lf,Rf,Pf,If,Mf,Df,jf,Bf,Ff,Uf={point:zf,lineStart:Kf,lineEnd:Hf,polygonStart:function(){Uf.point=qf,Uf.lineStart=Wf,Uf.lineEnd=Gf,sf=new gt,hf.polygonStart()},polygonEnd:function(){hf.polygonEnd(),Uf.point=zf,Uf.lineStart=Kf,Uf.lineEnd=Hf,uf<0?(Zh=-(Qh=180),Jh=-(tf=90)):sf>mh?tf=90:sf<-mh&&(Jh=-90),cf[0]=Zh,cf[1]=Qh},sphere:function(){Zh=-(Qh=180),Jh=-(tf=90)}};function zf(t,e){af.push(cf=[Zh=t,Qh=t]),etf&&(tf=e)}function Vf(t,e){var n=vf([t*xh,e*xh]);if(of){var r=bf(of,n),i=bf([r[1],-r[0],0],r);kf(i),i=gf(i);var o,s=t-ef,a=s>0?1:-1,c=i[0]*wh*a,u=kh(s)>180;u^(a*eftf&&(tf=o):u^(a*ef<(c=(c+360)%360-180)&&ctf&&(tf=e)),u?tYf(Zh,Qh)&&(Qh=t):Yf(t,Qh)>Yf(Zh,Qh)&&(Zh=t):Qh>=Zh?(tQh&&(Qh=t)):t>ef?Yf(Zh,t)>Yf(Zh,Qh)&&(Qh=t):Yf(t,Qh)>Yf(Zh,Qh)&&(Zh=t)}else af.push(cf=[Zh=t,Qh=t]);etf&&(tf=e),of=n,ef=t}function Kf(){Uf.point=Vf}function Hf(){cf[0]=Zh,cf[1]=Qh,Uf.point=zf,of=null}function qf(t,e){if(of){var n=t-ef;sf.add(kh(n)>180?n+(n>0?360:-360):n)}else nf=t,rf=e;hf.point(t,e),Vf(t,e)}function Wf(){hf.lineStart()}function Gf(){qf(nf,rf),hf.lineEnd(),kh(sf)>mh&&(Zh=-(Qh=180)),cf[0]=Zh,cf[1]=Qh,of=null}function Yf(t,e){return(e-=t)<0?e+360:e}function $f(t,e){return t[0]-e[0]}function Xf(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eYf(r[0],r[1])&&(r[1]=i[1]),Yf(i[0],r[1])>Yf(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=Yf(r[1],i[0]))>s&&(s=a,Zh=i[0],Qh=r[1])}return af=cf=null,Zh===1/0||Jh===1/0?[[NaN,NaN],[NaN,NaN]]:[[Zh,Jh],[Qh,tf]]}var Jf={sphere:Fh,point:Qf,lineStart:ep,lineEnd:ip,polygonStart:function(){Jf.lineStart=op,Jf.lineEnd=sp},polygonEnd:function(){Jf.lineStart=ep,Jf.lineEnd=ip}};function Qf(t,e){t*=xh;var n=Eh(e*=xh);tp(n*Eh(t),n*Rh(t),Rh(e))}function tp(t,e,n){++Tf,Ef+=(t-Ef)/Tf,Af+=(e-Af)/Tf,Of+=(n-Of)/Tf}function ep(){Jf.point=np}function np(t,e){t*=xh;var n=Eh(e*=xh);jf=n*Eh(t),Bf=n*Rh(t),Ff=Rh(e),Jf.point=rp,tp(jf,Bf,Ff)}function rp(t,e){t*=xh;var n=Eh(e*=xh),r=n*Eh(t),i=n*Rh(t),o=Rh(e),s=Sh(Ih((s=Bf*o-Ff*i)*s+(s=Ff*r-jf*o)*s+(s=jf*i-Bf*r)*s),jf*r+Bf*i+Ff*o);Sf+=s,Nf+=s*(jf+(jf=r)),Cf+=s*(Bf+(Bf=i)),Lf+=s*(Ff+(Ff=o)),tp(jf,Bf,Ff)}function ip(){Jf.point=Qf}function op(){Jf.point=ap}function sp(){cp(Mf,Df),Jf.point=Qf}function ap(t,e){Mf=t,Df=e,t*=xh,e*=xh,Jf.point=cp;var n=Eh(e);jf=n*Eh(t),Bf=n*Rh(t),Ff=Rh(e),tp(jf,Bf,Ff)}function cp(t,e){t*=xh;var n=Eh(e*=xh),r=n*Eh(t),i=n*Rh(t),o=Rh(e),s=Bf*o-Ff*i,a=Ff*r-jf*o,c=jf*i-Bf*r,u=Nh(s,a,c),l=jh(u),h=u&&-l/u;Rf.add(h*s),Pf.add(h*a),If.add(h*c),Sf+=l,Nf+=l*(jf+(jf=r)),Cf+=l*(Bf+(Bf=i)),Lf+=l*(Ff+(Ff=o)),tp(jf,Bf,Ff)}function up(t){Tf=Sf=Ef=Af=Of=Nf=Cf=Lf=0,Rf=new gt,Pf=new gt,If=new gt,qh(t,Jf);var e=+Rf,n=+Pf,r=+If,i=Nh(e,n,r);return igh&&(t-=Math.round(t/bh)*bh),[t,e]}function pp(t,e,n){return(t%=bh)?e||n?hp(mp(t),yp(e,n)):mp(t):e||n?yp(e,n):fp}function dp(t){return function(e,n){return kh(e+=t)>gh&&(e-=Math.round(e/bh)*bh),[e,n]}}function mp(t){var e=dp(t);return e.invert=dp(-t),e}function yp(t,e){var n=Eh(t),r=Rh(t),i=Eh(e),o=Rh(e);function s(t,e){var s=Eh(e),a=Eh(t)*s,c=Rh(t)*s,u=Rh(e),l=u*n+a*r;return[Sh(c*i-l*o,a*n-u*r),jh(l*i+c*o)]}return s.invert=function(t,e){var s=Eh(e),a=Eh(t)*s,c=Rh(t)*s,u=Rh(e),l=u*i-c*o;return[Sh(c*i+u*o,a*n+l*r),jh(l*n-a*r)]},s}function gp(t){function e(e){return(e=t(e[0]*xh,e[1]*xh))[0]*=wh,e[1]*=wh,e}return t=pp(t[0]*xh,t[1]*xh,t.length>2?t[2]*xh:0),e.invert=function(e){return(e=t.invert(e[0]*xh,e[1]*xh))[0]*=wh,e[1]*=wh,e},e}function vp(t,e,n,r,i,o){if(n){var s=Eh(e),a=Rh(e),c=r*n;null==i?(i=e+r*bh,o=e-c/2):(i=_p(s,i),o=_p(s,o),(r>0?io)&&(i+=r*bh));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 xp(t,e){return kh(t[0]-e[0])=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 Sp(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r=0?1:-1,E=S*T,A=E>gh,O=y*x;if(c.add(Sh(O*S*Rh(E),g*k+O*Eh(E))),s+=A?T+S*bh:T,A^d>=n^b>=n){var N=bf(vf(p),vf(_));kf(N);var C=bf(o,N);kf(C);var L=(A^T>=0?-1:1)*jh(C[2]);(r>L||r===L&&(N[0]||N[1]))&&(a+=A^T>=0?1:-1)}}return(s<-mh||s0){for(h||(i.polygonStart(),h=!0),i.lineStart(),t=0;t1&&2&c&&f.push(f.pop().concat(f.shift())),s.push(f.filter(Np))}return f}}function Np(t){return t.length>1}function Cp(t,e){return((t=t.x)[0]<0?t[1]-vh-mh:vh-t[1])-((e=e.x)[0]<0?e[1]-vh-mh:vh-e[1])}fp.invert=fp;const Lp=Op((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?gh:-gh,c=kh(o-n);kh(c-gh)0?vh:-vh),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(o,r),e=0):i!==a&&c>=gh&&(kh(n-i)mh?Th((Rh(e)*(o=Eh(r))*Rh(n)-Rh(r)*(i=Eh(e))*Rh(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*vh,r.point(-gh,i),r.point(0,i),r.point(gh,i),r.point(gh,0),r.point(gh,-i),r.point(0,-i),r.point(-gh,-i),r.point(-gh,0),r.point(-gh,i);else if(kh(t[0]-e[0])>mh){var o=t[0]0,i=kh(e)>mh;function o(t,n){return Eh(t)*Eh(n)>e}function s(t,n,r){var i=[1,0,0],o=bf(vf(t),vf(n)),s=_f(o,o),a=o[0],c=s-a*a;if(!c)return!r&&t;var u=e*s/c,l=-e*a/c,h=bf(i,o),f=xf(i,u);wf(f,xf(o,l));var p=h,d=_f(f,p),m=_f(p,p),y=d*d-m*(_f(f,f)-1);if(!(y<0)){var g=Ih(y),v=xf(p,(-d-g)/m);if(wf(v,f),v=gf(v),!r)return v;var _,b=t[0],w=n[0],x=t[1],k=n[1];w0^v[1]<(kh(v[0]-b)gh^(b<=v[0]&&v[0]<=w)){var E=xf(p,(-d+g)/m);return wf(E,f),[v,gf(E)]}}}function a(e,n){var i=r?t:gh-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return Op(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?gh:-gh),f):0;if(!e&&(u=c=m)&&t.lineStart(),m!==c&&(!(p=s(e,d))||xp(e,p)||xp(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&&xp(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){vp(o,t,n,i,e,r)}),r?[0,-t]:[-gh,t-gh])}var Pp,Ip,Mp,Dp,jp=1e9,Bp=-jp;function Fp(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 kh(r[0]-t)0?0:3:kh(r[0]-n)0?2:1:kh(r[1]-e)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,_=s,b=wp(),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&&b.rejoin(),c.push(b.result())),w.point=x,y&&_.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=ge(c)).length;(n||i)&&(s.polygonStart(),n&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),i&&Tp(c,a,e,o,s),s.polygonEnd()),_=s,c=u=l=null}};function x(t,e){i(t,e)&&_.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&&(_.lineStart(),_.point(o,s));else if(a&&y)_.point(o,s);else{var c=[d=Math.max(Bp,Math.min(jp,d)),m=Math.max(Bp,Math.min(jp,m))],b=[o=Math.max(Bp,Math.min(jp,o)),s=Math.max(Bp,Math.min(jp,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,b,t,e,n,r)?a&&(_.lineStart(),_.point(o,s),v=!1):(y||(_.lineStart(),_.point(c[0],c[1])),_.point(b[0],b[1]),a||_.lineEnd(),v=!1)}d=o,m=s,y=a}return w}}function Up(){var t,e,n,r=0,i=0,o=960,s=500;return n={stream:function(n){return t&&e===n?t:t=Fp(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 zp={sphere:Fh,point:Fh,lineStart:function(){zp.point=Kp,zp.lineEnd=Vp},lineEnd:Fh,polygonStart:Fh,polygonEnd:Fh};function Vp(){zp.point=zp.lineEnd=Fh}function Kp(t,e){Ip=t*=xh,Mp=Rh(e*=xh),Dp=Eh(e),zp.point=Hp}function Hp(t,e){t*=xh;var n=Rh(e*=xh),r=Eh(e),i=kh(t-Ip),o=Eh(i),s=r*Rh(i),a=Dp*n-Mp*r*o,c=Mp*n+Dp*r*o;Pp.add(Sh(Ih(s*s+a*a),c)),Ip=t,Mp=n,Dp=r}function qp(t){return Pp=new gt,qh(t,zp),+Pp}var Wp=[null,null],Gp={type:"LineString",coordinates:Wp};function Yp(t,e){return Wp[0]=t,Wp[1]=e,qp(Gp)}var $p={Feature:function(t,e){return Zp(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r0&&(i=Yp(t[o],t[o-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))mh})).map(c)).concat(we(Ah(o/p)*p,i,p).filter((function(t){return kh(t%m)>mh})).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=id(o,i,90),u=od(e,t,y),l=id(a,s,90),h=od(r,n,y),g):y},g.extentMajor([[-180,-90+mh],[180,90-mh]]).extentMinor([[-180,-80-mh],[180,80+mh]])}function ad(){return sd()()}function cd(t,e){var n=t[0]*xh,r=t[1]*xh,i=e[0]*xh,o=e[1]*xh,s=Eh(r),a=Rh(r),c=Eh(o),u=Rh(o),l=s*Eh(n),h=s*Rh(n),f=c*Eh(i),p=c*Rh(i),d=2*jh(Ih(Bh(o-r)+s*c*Bh(i-n))),m=Rh(d),y=d?function(t){var e=Rh(t*=d)/m,n=Rh(d-t)/m,r=n*l+e*f,i=n*h+e*p,o=n*a+e*u;return[Sh(i,r)*wh,Sh(o,Ih(r*r+i*i))*wh]}:function(){return[n*wh,r*wh]};return y.distance=d,y}const ud=t=>t;var ld,hd,fd,pd,dd=new gt,md=new gt,yd={point:Fh,lineStart:Fh,lineEnd:Fh,polygonStart:function(){yd.lineStart=gd,yd.lineEnd=bd},polygonEnd:function(){yd.lineStart=yd.lineEnd=yd.point=Fh,dd.add(kh(md)),md=new gt},result:function(){var t=dd/2;return dd=new gt,t}};function gd(){yd.point=vd}function vd(t,e){yd.point=_d,ld=fd=t,hd=pd=e}function _d(t,e){md.add(pd*t-fd*e),fd=t,pd=e}function bd(){_d(ld,hd)}const wd=yd;var xd=1/0,kd=xd,Td=-xd,Sd=Td,Ed={point:function(t,e){tTd&&(Td=t),eSd&&(Sd=e)},lineStart:Fh,lineEnd:Fh,polygonStart:Fh,polygonEnd:Fh,result:function(){var t=[[xd,kd],[Td,Sd]];return Td=Sd=-(kd=xd=1/0),t}};const Ad=Ed;var Od,Nd,Cd,Ld,Rd=0,Pd=0,Id=0,Md=0,Dd=0,jd=0,Bd=0,Fd=0,Ud=0,zd={point:Vd,lineStart:Kd,lineEnd:Wd,polygonStart:function(){zd.lineStart=Gd,zd.lineEnd=Yd},polygonEnd:function(){zd.point=Vd,zd.lineStart=Kd,zd.lineEnd=Wd},result:function(){var t=Ud?[Bd/Ud,Fd/Ud]:jd?[Md/jd,Dd/jd]:Id?[Rd/Id,Pd/Id]:[NaN,NaN];return Rd=Pd=Id=Md=Dd=jd=Bd=Fd=Ud=0,t}};function Vd(t,e){Rd+=t,Pd+=e,++Id}function Kd(){zd.point=Hd}function Hd(t,e){zd.point=qd,Vd(Cd=t,Ld=e)}function qd(t,e){var n=t-Cd,r=e-Ld,i=Ih(n*n+r*r);Md+=i*(Cd+t)/2,Dd+=i*(Ld+e)/2,jd+=i,Vd(Cd=t,Ld=e)}function Wd(){zd.point=Vd}function Gd(){zd.point=$d}function Yd(){Xd(Od,Nd)}function $d(t,e){zd.point=Xd,Vd(Od=Cd=t,Nd=Ld=e)}function Xd(t,e){var n=t-Cd,r=e-Ld,i=Ih(n*n+r*r);Md+=i*(Cd+t)/2,Dd+=i*(Ld+e)/2,jd+=i,Bd+=(i=Ld*t-Cd*e)*(Cd+t),Fd+=i*(Ld+e),Ud+=3*i,Vd(Cd=t,Ld=e)}const Zd=zd;function Jd(t){this._context=t}Jd.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,bh)}},result:Fh};var Qd,tm,em,nm,rm,im=new gt,om={point:Fh,lineStart:function(){om.point=sm},lineEnd:function(){Qd&&am(tm,em),om.point=Fh},polygonStart:function(){Qd=!0},polygonEnd:function(){Qd=null},result:function(){var t=+im;return im=new gt,t}};function sm(t,e){om.point=am,tm=nm=t,em=rm=e}function am(t,e){nm-=t,rm-=e,im.add(Ih(nm*nm+rm*rm)),nm=t,rm=e}const cm=om;let um,lm,hm,fm;class pm{constructor(t){this._append=null==t?dm:function(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return dm;if(e!==um){const t=10**e;um=e,lm=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 pm(i)),s},s.projection(t).digits(i).context(e)}function ym(t){return{stream:gm(t)}}function gm(t){return function(e){var n=new vm;for(var r in t)n[r]=t[r];return n.stream=e,n}}function vm(){}function _m(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),qh(n,t.stream(Ad)),e(Ad.result()),null!=r&&t.clipExtent(r),t}function bm(t,e,n){return _m(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 wm(t,e,n){return bm(t,[[0,0],e],n)}function xm(t,e,n){return _m(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 km(t,e,n){return _m(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)}vm.prototype={constructor:vm,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 Tm=16,Sm=Eh(30*xh);function Em(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,_=g*g+v*v;if(_>4*e&&m--){var b=s+f,w=a+p,x=c+d,k=Ih(b*b+w*w+x*x),T=jh(x/=k),S=kh(kh(x)-1)e||kh((g*N+v*C)/_-.5)>.3||s*f+a*p+c*d2?t[2]%360*xh:0,N()):[y*wh,g*wh,v*wh]},A.angle=function(t){return arguments.length?(_=t%360*xh,N()):_*wh},A.reflectX=function(t){return arguments.length?(b=t?-1:1,N()):b<0},A.reflectY=function(t){return arguments.length?(w=t?-1:1,N()):w<0},A.precision=function(t){return arguments.length?(s=Em(a,E=t*t),C()):Ih(E)},A.fitExtent=function(t,e){return bm(A,t,e)},A.fitSize=function(t,e){return wm(A,t,e)},A.fitWidth=function(t,e){return xm(A,t,e)},A.fitHeight=function(t,e){return km(A,t,e)},function(){return e=t.apply(this,arguments),A.invert=e.invert&&O,N()}}function Lm(t){var e=0,n=gh/3,r=Cm(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*xh,n=t[1]*xh):[e*wh,n*wh]},i}function Rm(t,e){var n=Rh(t),r=(n+Rh(e))/2;if(kh(r)=.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<-vh+mh&&(e=-vh+mh):e>vh-mh&&(e=vh-mh);var n=i/Lh(qm(e),r);return[n*Rh(r*t),i-n*Eh(r*t)]}return o.invert=function(t,e){var n=i-e,o=Ph(r)*Ih(t*t+n*n),s=Sh(t,kh(n))*Ph(n);return n*r<0&&(s-=gh*Ph(t)*Ph(n)),[s/r,2*Th(Lh(i/o,1/r))-vh]},o}function Gm(){return Lm(Wm).scale(109.5).parallels([30,30])}function Ym(t,e){return[t,e]}function $m(){return Nm(Ym).scale(152.63)}function Xm(t,e){var n=Eh(t),r=t===e?Rh(t):(n-Eh(e))/(e-t),i=n/r+t;if(kh(r)2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function yy(t,e){return t.parent===e.parent?1:2}function gy(t,e){return t+e.x}function vy(t,e){return Math.max(t,e.y)}function _y(){var t=yy,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(gy,0)/t.length}(n),e.y=function(t){return 1+t.reduce(vy,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 by(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 wy(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=ky)):void 0===e&&(e=xy);for(var n,r,i,o,s,a=new Ey(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 Ey(i[o])),r.parent=n,r.depth=n.depth+1;return a.eachBefore(Sy)}function xy(t){return t.children}function ky(t){return Array.isArray(t)?t[1]:null}function Ty(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Sy(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Ey(t){this.data=t,this.depth=this.height=0,this.parent=null}function Ay(t){return null==t?null:Oy(t)}function Oy(t){if("function"!=typeof t)throw new Error;return t}function Ny(){return 0}function Cy(t){return function(){return t}}ry.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*(Jm+Qm*i+o*(ty+ey*i))-e)/(Jm+3*Qm*i+o*(7*ty+9*ey*i)))*r)*i*i,!(kh(n)mh&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},ly.invert=jm(jh),fy.invert=jm((function(t){return 2*Th(t)})),dy.invert=function(t,e){return[-e,2*Th(Oh(t))-vh]},Ey.prototype=wy.prototype={constructor:Ey,count:function(){return this.eachAfter(by)},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 wy(this).eachBefore(Ty)},[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=(Ly*t+Ry)%Py)/Py}function My(t){return Dy(t,Iy())}function Dy(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 Uy(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 Hy(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 qy(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 Wy(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 Gy(t){this._=t,this.next=null,this.previous=null}function Yy(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;Hy(i,r,o=t[2]),r=new Gy(r),i=new Gy(i),o=new Gy(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 hg(t,e-1)&&!hg(t,e-2)&&(t=t.slice(0,-1)),"/"===t[0]?t:`/${t}`}(t(e,n,r)))),n=e.map(lg),i=new Set(e).add("");for(const t of n)i.has(t)||(i.add(t),e.push(t),n.push(lg(t)),f.push(sg));p=(t,n)=>e[n],d=(t,e)=>n[e]}for(s=0,i=f.length;s=0&&(u=f[t]).data===sg;--t)u.data=null}if(a.parent=ig,a.eachBefore((function(t){t.depth=t.parent.depth+1,--i})).eachBefore(Sy),a.parent=null,i>0)throw new Error("cycle");return a}return r.id=function(t){return arguments.length?(e=Ay(t),r):e},r.parentId=function(t){return arguments.length?(n=Ay(t),r):n},r.path=function(e){return arguments.length?(t=Ay(e),r):t},r}function lg(t){let e=t.length;if(e<2)return"";for(;--e>1&&!hg(t,e););return t.slice(0,e)}function hg(t,e){if("/"===t[e]){let n=0;for(;e>0&&"\\"===t[--e];)++n;if(!(1&n))return!0}return!1}function fg(t,e){return t.parent===e.parent?1:2}function pg(t){var e=t.children;return e?e[0]:t.t}function dg(t){var e=t.children;return e?e[e.length-1]:t.t}function mg(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 yg(t,e,n){return t.a.parent===e.parent?t.a:n}function gg(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 vg(){var t=fg,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,o,s=new gg(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 gg(r[i],i)),n.parent=e;return(s.parent=new gg(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=dg(a),o=pg(o),a&&o;)c=pg(c),(s=dg(s)).a=e,(i=a.z+h-o.z-u+t(a._,o._))>0&&(mg(yg(a,e,r),e,i),u+=i,l+=i),h+=a.m,u+=o.m,f+=c.m,l+=s.m;a&&!dg(s)&&(s.t=a,s.m+=h-l),o&&!pg(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 _g(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}(bg);function kg(){var t=xg,e=!1,n=1,r=1,i=[0],o=Ny,s=Ny,a=Ny,c=Ny,u=Ny;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(eg),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 _=r?(o*g+c*y)/r:c;t(e,p,y,i,o,s,_),t(p,n,g,i,_,s,c)}}(0,c,t.value,e,n,r,i)}function Sg(t,e,n,r,i){(1&t.depth?_g:ng)(t,e,n,r,i)}const Eg=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}(bg);function Ag(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function Og(t,e){var n=ki(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}}function Ng(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Cg(t){return((t=Math.exp(t))+1/t)/2}const Lg=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),_=Math.log(Math.sqrt(g*g+1)-g),b=Math.log(Math.sqrt(v*v+1)-v);s=(b-_)/e,o=function(t){var r,i=t*s,o=Cg(_),l=u/(n*y)*(o*(r=e*i+_,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(_));return[a+l*p,c+l*d,u*o/Cg(e*i+_)]}}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 Rg(t){return function(e,n){var r=t((e=pi(e)).h,(n=pi(n)).h),i=Ti(e.s,n.s),o=Ti(e.l,n.l),s=Ti(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 Pg=Rg(ki);var Ig=Rg(Ti);function Mg(t,e){var n=Ti((t=Sa(t)).l,(e=Sa(e)).l),r=Ti(t.a,e.a),i=Ti(t.b,e.b),o=Ti(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 Dg(t){return function(e,n){var r=t((e=Pa(e)).h,(n=Pa(n)).h),i=Ti(e.c,n.c),o=Ti(e.l,n.l),s=Ti(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 jg=Dg(ki);var Bg=Dg(Ti);function Fg(t){return function e(n){function r(e,r){var i=t((e=Ha(e)).h,(r=Ha(r)).h),o=Ti(e.s,r.s),s=Ti(e.l,r.l),a=Ti(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 Ug=Fg(ki);var zg=Fg(Ti);function Vg(t,e){void 0===e&&(e=t,t=Fi);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n1&&Wg(t[n[i-2]],t[n[i-1]],t[r])<=0;)--i;n[i++]=r}return n.slice(0,i)}function $g(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 Zg(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}(Jg),nv=function t(e){var n=ev.source(e);function r(){var t=n.apply(this,arguments);return function(){return Math.exp(t())}}return r.source=t,r}(Jg),rv=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}(Jg),iv=function t(e){var n=rv.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}(Jg),ov=function t(e){function n(t){return function(){return-Math.log1p(-e())/t}}return n.source=t,n}(Jg),sv=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}(Jg),av=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}(Jg),cv=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}(Jg),uv=function t(e){var n=ev.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}(Jg),lv=function t(e){var n=uv.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}(Jg),hv=function t(e){var n=cv.source(e),r=lv.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}(Jg),fv=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}(Jg),pv=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}(Jg),dv=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}(Jg),mv=function t(e){var n=uv.source(e),r=hv.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}(Jg),yv=1664525,gv=1013904223,vv=1/4294967296;function _v(t=Math.random()){let e=0|(0<=t&&t<1?t/vv:Math.abs(t));return()=>(e=yv*e+gv|0,vv*(e>>>0))}function bv(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function wv(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 xv=Symbol("implicit");function kv(){var t=new bt,e=[],n=[],r=xv;function i(i){let o=t.get(i);if(void 0===o){if(r!==xv)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 bt;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 kv(e,n).unknown(r)},bv.apply(i,arguments),i}function Tv(){var t,e,n=kv().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?Rv:Lv,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),Ii)))(n)))},h.domain=function(t){return arguments.length?(s=Array.from(t,Av),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=Ng,l()},h.clamp=function(t){return arguments.length?(u=!!t||Nv,l()):u!==Nv},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 Mv(){return Iv()(Nv,Nv)}function Dv(t,e,n,r){var i,o=Jt(t,e,n);switch((r=th(null==r?",f":r)).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=ph(o,s))||(r.precision=i),ah(r,s);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=dh(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=fh(o))||(r.precision=i-2*("%"===r.type))}return sh(r)}function jv(t){var e=t.domain;return t.ticks=function(t){var n=e();return Xt(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Dv(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=Zt(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 Bv(){var t=Mv();return t.copy=function(){return Pv(t,Bv())},bv.apply(t,arguments),jv(t)}function Fv(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,Av),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return Fv(t).unknown(e)},t=arguments.length?Array.from(t,Av):[0,1],jv(n)}function Uv(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],s=t[i];return s-t(-e,n)}function Gv(t){const e=t(zv,Vv),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?qv:t===Math.E?Math.exp:e=>Math.pow(t,e)}(o),n()[0]<0?(r=Wv(r),i=Wv(i),t(Kv,Hv)):t(zv,Vv),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=th(n)).precision||(n.trim=!0),n=sh(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(Uv(n(),{floor:t=>i(Math.floor(r(t))),ceil:t=>i(Math.ceil(r(t)))})),e}function Yv(){const t=Gv(Iv()).domain([1,10]);return t.copy=()=>Pv(t,Yv()).base(t.base()),bv.apply(t,arguments),t}function $v(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Xv(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Zv(t){var e=1,n=t($v(e),Xv(e));return n.constant=function(n){return arguments.length?t($v(e=+n),Xv(e)):e},jv(n)}function Jv(){var t=Zv(Iv());return t.copy=function(){return Pv(t,Jv()).constant(t.constant())},bv.apply(t,arguments)}function Qv(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function t_(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function e_(t){return t<0?-t*t:t*t}function n_(t){var e=t(Nv,Nv),n=1;return e.exponent=function(e){return arguments.length?1==(n=+e)?t(Nv,Nv):.5===n?t(t_,e_):t(Qv(n),Qv(1/n)):n},jv(e)}function r_(){var t=n_(Iv());return t.copy=function(){return Pv(t,r_()).exponent(t.exponent())},bv.apply(t,arguments),t}function i_(){return r_.apply(null,arguments).exponent(.5)}function o_(t){return Math.sign(t)*t*t}function s_(){var t,e=Mv(),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(o_(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,Av)).map(o_)),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 s_(e.domain(),n).round(r).clamp(e.clamp()).unknown(t)},bv.apply(i,arguments),jv(i)}function a_(){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 c_().domain([e,n]).range(o).unknown(t)},bv.apply(jv(s),arguments)}function u_(){var t,e=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[tt(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 u_().domain(e).range(n).unknown(t)},bv.apply(i,arguments)}const l_=1e3,h_=6e4,f_=36e5,p_=864e5,d_=6048e5,m_=31536e6,y_=new Date,g_=new Date;function v_(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(av_((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)=>(y_.setTime(+e),g_.setTime(+r),t(y_),t(g_),Math.floor(n(y_,g_))),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 __=v_((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));__.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?v_((e=>{e.setTime(Math.floor(e/t)*t)}),((e,n)=>{e.setTime(+e+n*t)}),((e,n)=>(n-e)/t)):__:null);const b_=__.range,w_=v_((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*l_)}),((t,e)=>(e-t)/l_),(t=>t.getUTCSeconds())),x_=w_.range,k_=v_((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*l_)}),((t,e)=>{t.setTime(+t+e*h_)}),((t,e)=>(e-t)/h_),(t=>t.getMinutes())),T_=k_.range,S_=v_((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*h_)}),((t,e)=>(e-t)/h_),(t=>t.getUTCMinutes())),E_=S_.range,A_=v_((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*l_-t.getMinutes()*h_)}),((t,e)=>{t.setTime(+t+e*f_)}),((t,e)=>(e-t)/f_),(t=>t.getHours())),O_=A_.range,N_=v_((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*f_)}),((t,e)=>(e-t)/f_),(t=>t.getUTCHours())),C_=N_.range,L_=v_((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*h_)/p_),(t=>t.getDate()-1)),R_=L_.range,P_=v_((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/p_),(t=>t.getUTCDate()-1)),I_=P_.range,M_=v_((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/p_),(t=>Math.floor(t/p_))),D_=M_.range;function j_(t){return v_((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())*h_)/d_))}const B_=j_(0),F_=j_(1),U_=j_(2),z_=j_(3),V_=j_(4),K_=j_(5),H_=j_(6),q_=B_.range,W_=F_.range,G_=U_.range,Y_=z_.range,$_=V_.range,X_=K_.range,Z_=H_.range;function J_(t){return v_((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)/d_))}const Q_=J_(0),tb=J_(1),eb=J_(2),nb=J_(3),rb=J_(4),ib=J_(5),ob=J_(6),sb=Q_.range,ab=tb.range,cb=eb.range,ub=nb.range,lb=rb.range,hb=ib.range,fb=ob.range,pb=v_((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())),db=pb.range,mb=v_((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())),yb=mb.range,gb=v_((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()));gb.every=t=>isFinite(t=Math.floor(t))&&t>0?v_((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 vb=gb.range,_b=v_((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()));_b.every=t=>isFinite(t=Math.floor(t))&&t>0?v_((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 bb=_b.range;function wb(t,e,n,r,i,o){const s=[[w_,1,l_],[w_,5,5e3],[w_,15,15e3],[w_,30,3e4],[o,1,h_],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,f_],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,p_],[r,2,1728e5],[n,1,d_],[e,1,2592e6],[e,3,7776e6],[t,1,m_]];function a(e,n,r){const i=Math.abs(n-e)/r,o=G((([,,t])=>t)).right(s,i);if(o===s.length)return t.every(Jt(e/m_,n/m_,r));if(0===o)return __.every(Math.max(Jt(e,n,r),1));const[a,c]=s[i/s[o-1][2]=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Xw,s:Zw,S:gw,u:vw,U:_w,V:ww,w:xw,W:kw,x:null,X:null,y:Tw,Y:Ew,Z:Ow,"%":$w},b={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:Nw,e:Nw,f:Iw,g:qw,G:Gw,H:Cw,I:Lw,j:Rw,L:Pw,m:Mw,M:Dw,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Xw,s:Zw,S:jw,u:Bw,U:Fw,V:zw,w:Vw,W:Kw,x:null,X:null,y:Hw,Y:Ww,Z:Yw,"%":$w},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:Qb,e:Qb,f:ow,g:$b,G:Yb,H:ew,I:ew,j:tw,L:iw,m:Jb,M:nw,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:Zb,Q:aw,s:cw,S:rw,u:Hb,U:qb,V:Wb,w:Kb,W:Gb,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:$b,Y:Yb,Z:Xb,"%":sw};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=Ab(Ob(o.y,0,1))).getUTCDay(),r=i>4||0===i?tb.ceil(r):tb(r),r=P_.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Eb(Ob(o.y,0,1))).getDay(),r=i>4||0===i?F_.ceil(r):F_(r),r=L_.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?Ab(Ob(o.y,0,1)).getUTCDay():Eb(Ob(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,Ab(o)):Eb(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 Mb?e.charAt(s++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return _.x=x(n,_),_.X=x(r,_),_.c=x(e,_),b.x=x(n,b),b.X=x(r,b),b.c=x(e,b),{format:function(t){var e=x(t+="",_);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+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}var Cb,Lb,Rb,Pb,Ib,Mb={"-":"",_:" ",0:"0"},Db=/^\s*\d+/,jb=/^%/,Bb=/[\\^$*+?|[\]().{}]/g;function Fb(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o[t.toLowerCase(),e])))}function Kb(t,e,n){var r=Db.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Hb(t,e,n){var r=Db.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function qb(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Wb(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Gb(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Yb(t,e,n){var r=Db.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function $b(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Xb(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 Zb(t,e,n){var r=Db.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Jb(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Qb(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function tw(t,e,n){var r=Db.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ew(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function nw(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function rw(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function iw(t,e,n){var r=Db.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function ow(t,e,n){var r=Db.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function sw(t,e,n){var r=jb.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function aw(t,e,n){var r=Db.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function cw(t,e,n){var r=Db.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function uw(t,e){return Fb(t.getDate(),e,2)}function lw(t,e){return Fb(t.getHours(),e,2)}function hw(t,e){return Fb(t.getHours()%12||12,e,2)}function fw(t,e){return Fb(1+L_.count(gb(t),t),e,3)}function pw(t,e){return Fb(t.getMilliseconds(),e,3)}function dw(t,e){return pw(t,e)+"000"}function mw(t,e){return Fb(t.getMonth()+1,e,2)}function yw(t,e){return Fb(t.getMinutes(),e,2)}function gw(t,e){return Fb(t.getSeconds(),e,2)}function vw(t){var e=t.getDay();return 0===e?7:e}function _w(t,e){return Fb(B_.count(gb(t)-1,t),e,2)}function bw(t){var e=t.getDay();return e>=4||0===e?V_(t):V_.ceil(t)}function ww(t,e){return t=bw(t),Fb(V_.count(gb(t),t)+(4===gb(t).getDay()),e,2)}function xw(t){return t.getDay()}function kw(t,e){return Fb(F_.count(gb(t)-1,t),e,2)}function Tw(t,e){return Fb(t.getFullYear()%100,e,2)}function Sw(t,e){return Fb((t=bw(t)).getFullYear()%100,e,2)}function Ew(t,e){return Fb(t.getFullYear()%1e4,e,4)}function Aw(t,e){var n=t.getDay();return Fb((t=n>=4||0===n?V_(t):V_.ceil(t)).getFullYear()%1e4,e,4)}function Ow(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Fb(e/60|0,"0",2)+Fb(e%60,"0",2)}function Nw(t,e){return Fb(t.getUTCDate(),e,2)}function Cw(t,e){return Fb(t.getUTCHours(),e,2)}function Lw(t,e){return Fb(t.getUTCHours()%12||12,e,2)}function Rw(t,e){return Fb(1+P_.count(_b(t),t),e,3)}function Pw(t,e){return Fb(t.getUTCMilliseconds(),e,3)}function Iw(t,e){return Pw(t,e)+"000"}function Mw(t,e){return Fb(t.getUTCMonth()+1,e,2)}function Dw(t,e){return Fb(t.getUTCMinutes(),e,2)}function jw(t,e){return Fb(t.getUTCSeconds(),e,2)}function Bw(t){var e=t.getUTCDay();return 0===e?7:e}function Fw(t,e){return Fb(Q_.count(_b(t)-1,t),e,2)}function Uw(t){var e=t.getUTCDay();return e>=4||0===e?rb(t):rb.ceil(t)}function zw(t,e){return t=Uw(t),Fb(rb.count(_b(t),t)+(4===_b(t).getUTCDay()),e,2)}function Vw(t){return t.getUTCDay()}function Kw(t,e){return Fb(tb.count(_b(t)-1,t),e,2)}function Hw(t,e){return Fb(t.getUTCFullYear()%100,e,2)}function qw(t,e){return Fb((t=Uw(t)).getUTCFullYear()%100,e,2)}function Ww(t,e){return Fb(t.getUTCFullYear()%1e4,e,4)}function Gw(t,e){var n=t.getUTCDay();return Fb((t=n>=4||0===n?rb(t):rb.ceil(t)).getUTCFullYear()%1e4,e,4)}function Yw(){return"+0000"}function $w(){return"%"}function Xw(t){return+t}function Zw(t){return Math.floor(+t/1e3)}function Jw(t){return Cb=Nb(t),Lb=Cb.format,Rb=Cb.parse,Pb=Cb.utcFormat,Ib=Cb.utcParse,Cb}function Qw(t){return new Date(t)}function tx(t){return t instanceof Date?+t:+new Date(+t)}function ex(t,e,n,r,i,o,s,a,c,u){var l=Mv(),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"),_=u("%B"),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)=>ue(t,r/e)))},n.copy=function(){return hx(e).domain(t)},wv.apply(n,arguments)}function fx(){var t,e,n,r,i,o,s,a=0,c=.5,u=1,l=1,h=Nv,f=!1;function p(t){return isNaN(t=+t)?s:(t=.5+((t=+o(t))-e)*(l*tAi(t[t.length-1]);var Cx=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(vx);const Lx=Nx(Cx);var Rx=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(vx);const Px=Nx(Rx);var Ix=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(vx);const Mx=Nx(Ix);var Dx=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(vx);const jx=Nx(Dx);var Bx=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(vx);const Fx=Nx(Bx);var Ux=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(vx);const zx=Nx(Ux);var Vx=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(vx);const Kx=Nx(Vx);var Hx=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(vx);const qx=Nx(Hx);var Wx=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(vx);const Gx=Nx(Wx);var Yx=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(vx);const $x=Nx(Yx);var Xx=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(vx);const Zx=Nx(Xx);var Jx=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(vx);const Qx=Nx(Jx);var tk=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(vx);const ek=Nx(tk);var nk=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(vx);const rk=Nx(nk);var ik=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(vx);const ok=Nx(ik);var sk=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(vx);const ak=Nx(sk);var ck=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(vx);const uk=Nx(ck);var lk=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(vx);const hk=Nx(lk);var fk=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(vx);const pk=Nx(fk);var dk=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(vx);const mk=Nx(dk);var yk=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(vx);const gk=Nx(yk);var vk=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(vx);const _k=Nx(vk);var bk=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(vx);const wk=Nx(bk);var xk=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(vx);const kk=Nx(xk);var Tk=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(vx);const Sk=Nx(Tk);var Ek=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(vx);const Ak=Nx(Ek);var Ok=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(vx);const Nk=Nx(Ok);function Ck(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 Lk=zg(Ha(300,.5,0),Ha(-240,.5,1));var Rk=zg(Ha(-100,.75,.35),Ha(80,1.5,.8)),Pk=zg(Ha(260,.75,.35),Ha(80,1.5,.8)),Ik=Ha();function Mk(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Ik.h=360*t-100,Ik.s=1.5-1.5*e,Ik.l=.8-.9*e,Ik+""}var Dk=ii(),jk=Math.PI/3,Bk=2*Math.PI/3;function Fk(t){var e;return t=(.5-t)*Math.PI,Dk.r=255*(e=Math.sin(t))*e,Dk.g=255*(e=Math.sin(t+jk))*e,Dk.b=255*(e=Math.sin(t+Bk))*e,Dk+""}function Uk(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 zk(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const Vk=zk(vx("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var Kk=zk(vx("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Hk=zk(vx("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),qk=zk(vx("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function Wk(t){return Nr(mr(t).call(document.documentElement))}var Gk=0;function Yk(){return new $k}function $k(){this._="@"+(++Gk).toString(36)}function Xk(t,e){return t.target&&(t=Ui(t),void 0===e&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,(t=>zi(t,e)))}function Zk(t){return"string"==typeof t?new Er([document.querySelectorAll(t)],[document.documentElement]):new Er([vn(t)],Sr)}function Jk(t){return function(){return t}}$k.prototype=Yk.prototype={constructor:$k,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 Qk=Math.abs,tT=Math.atan2,eT=Math.cos,nT=Math.max,rT=Math.min,iT=Math.sin,oT=Math.sqrt,sT=1e-12,aT=Math.PI,cT=aT/2,uT=2*aT;function lT(t){return t>=1?cT:t<=-1?-cT:Math.asin(t)}function hT(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 Qs(e)}function fT(t){return t.innerRadius}function pT(t){return t.outerRadius}function dT(t){return t.startAngle}function mT(t){return t.endAngle}function yT(t){return t&&t.padAngle}function gT(t,e,n,r,i,o,s){var a=t-n,c=e-r,u=(s?o:-o)/oT(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,_=m-p,b=v*v+_*_,w=i-o,x=f*m-d*p,k=(_<0?-1:1)*oT(nT(0,w*w*b-x*x)),T=(x*_-v*k)/b,S=(-x*v-_*k)/b,E=(x*_+v*k)/b,A=(-x*v+_*k)/b,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 vT(){var t=fT,e=pT,n=Jk(0),r=null,i=dT,o=mT,s=yT,a=null,c=hT(u);function u(){var u,l,h,f=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-cT,m=o.apply(this,arguments)-cT,y=Qk(m-d),g=m>d;if(a||(a=u=c()),psT)if(y>uT-sT)a.moveTo(p*eT(d),p*iT(d)),a.arc(0,0,p,d,m,!g),f>sT&&(a.moveTo(f*eT(m),f*iT(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>sT&&(r?+r.apply(this,arguments):oT(f*f+p*p)),O=rT(Qk(p-f)/2,+n.apply(this,arguments)),N=O,C=O;if(A>sT){var L=lT(A/f*iT(E)),R=lT(A/p*iT(E));(T-=2*L)>sT?(x+=L*=g?1:-1,k-=L):(T=0,x=k=(d+m)/2),(S-=2*R)>sT?(b+=R*=g?1:-1,w-=R):(S=0,b=w=(d+m)/2)}var P=p*eT(b),I=p*iT(b),M=f*eT(k),D=f*iT(k);if(O>sT){var j,B=p*eT(w),F=p*iT(w),U=f*eT(x),z=f*iT(x);if(y1?0:h<-1?aT:Math.acos(h))/2),G=oT(j[0]*j[0]+j[1]*j[1]);N=rT(O,(f-G)/(W-1)),C=rT(O,(p-G)/(W+1))}else N=C=0}S>sT?C>sT?(v=gT(U,z,P,I,p,C,g),_=gT(B,F,M,D,p,C,g),a.moveTo(v.cx+v.x01,v.cy+v.y01),CsT&&T>sT?N>sT?(v=gT(M,D,B,F,f,-N,g),_=gT(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 ST().defined(i).curve(s).context(o)}return t="function"==typeof t?t:void 0===t?kT:Jk(+t),e="function"==typeof e?e:Jk(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?TT:Jk(+n),u.x=function(e){return arguments.length?(t="function"==typeof e?e:Jk(+e),r=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:Jk(+e),u):t},u.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Jk(+t),u):r},u.y=function(t){return arguments.length?(e="function"==typeof t?t:Jk(+t),n=null,u):e},u.y0=function(t){return arguments.length?(e="function"==typeof t?t:Jk(+t),u):e},u.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Jk(+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:Jk(!!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 AT(t,e){return et?1:e>=t?0:NaN}function OT(t){return t}function NT(){var t=OT,e=AT,n=null,r=Jk(0),i=Jk(uT),o=Jk(0);function s(s){var a,c,u,l,h,f=(s=bT(s)).length,p=0,d=new Array(f),m=new Array(f),y=+r.apply(this,arguments),g=Math.min(uT,Math.max(-uT,i.apply(this,arguments)-y)),v=Math.min(Math.abs(g)/f,o.apply(this,arguments)),_=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*_)/p:0;a0?h*u:0)+_,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:Jk(+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:Jk(+t),s):r},s.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Jk(+t),s):i},s.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Jk(+t),s):o},s}wT.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 CT=RT(xT);function LT(t){this._curve=t}function RT(t){function e(e){return new LT(t(e))}return e._curve=t,e}function PT(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(RT(t)):e()._curve},t}function IT(){return PT(ST().curve(CT))}function MT(){var t=ET().curve(CT),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 PT(n())},delete t.lineX0,t.lineEndAngle=function(){return PT(r())},delete t.lineX1,t.lineInnerRadius=function(){return PT(i())},delete t.lineY0,t.lineOuterRadius=function(){return PT(o())},delete t.lineY1,t.curve=function(t){return arguments.length?e(RT(t)):e()._curve},t}function DT(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}LT.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 jT{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 BT{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=DT(this._x0,this._y0),r=DT(this._x0,this._y0=(this._y0+e)/2),i=DT(t,this._y0),o=DT(t,e);this._context.moveTo(...n),this._context.bezierCurveTo(...r,...i,...o)}this._x0=t,this._y0=e}}function FT(t){return new jT(t,!0)}function UT(t){return new jT(t,!1)}function zT(t){return new BT(t)}function VT(t){return t.source}function KT(t){return t.target}function HT(t){let e=VT,n=KT,r=kT,i=TT,o=null,s=null,a=hT(c);function c(){let c;const u=_T.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:Jk(+t),c):r},c.y=function(t){return arguments.length?(i="function"==typeof t?t:Jk(+t),c):i},c.context=function(e){return arguments.length?(null==e?o=s=null:s=t(o=e),c):o},c}function qT(){return HT(FT)}function WT(){return HT(UT)}function GT(){const t=HT(zT);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const YT=oT(3),$T={draw(t,e){const n=.59436*oT(e+rT(e/28,.75)),r=n/2,i=r*YT;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},XT={draw(t,e){const n=oT(e/aT);t.moveTo(n,0),t.arc(0,0,n,0,uT)}},ZT={draw(t,e){const n=oT(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()}},JT=oT(1/3),QT=2*JT,tS={draw(t,e){const n=oT(e/QT),r=n*JT;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},eS={draw(t,e){const n=.62625*oT(e);t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},nS={draw(t,e){const n=.87559*oT(e-rT(e/7,2));t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},rS={draw(t,e){const n=oT(e),r=-n/2;t.rect(r,r,n,n)}},iS={draw(t,e){const n=.4431*oT(e);t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},oS=iT(aT/10)/iT(7*aT/10),sS=iT(uT/10)*oS,aS=-eT(uT/10)*oS,cS={draw(t,e){const n=oT(.8908130915292852*e),r=sS*n,i=aS*n;t.moveTo(0,-n),t.lineTo(r,i);for(let e=1;e<5;++e){const o=uT*e/5,s=eT(o),a=iT(o);t.lineTo(a*n,-s*n),t.lineTo(s*r-a*i,a*r+s*i)}t.closePath()}},uS=oT(3),lS={draw(t,e){const n=-oT(e/(3*uS));t.moveTo(0,2*n),t.lineTo(-uS*n,-n),t.lineTo(uS*n,-n),t.closePath()}},hS=oT(3),fS={draw(t,e){const n=.6824*oT(e),r=n/2,i=n*hS/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},pS=-.5,dS=oT(3)/2,mS=1/oT(12),yS=3*(mS/2+1),gS={draw(t,e){const n=oT(e/yS),r=n/2,i=n*mS,o=r,s=n*mS+n,a=-o,c=s;t.moveTo(r,i),t.lineTo(o,s),t.lineTo(a,c),t.lineTo(pS*r-dS*i,dS*r+pS*i),t.lineTo(pS*o-dS*s,dS*o+pS*s),t.lineTo(pS*a-dS*c,dS*a+pS*c),t.lineTo(pS*r+dS*i,pS*i-dS*r),t.lineTo(pS*o+dS*s,pS*s-dS*o),t.lineTo(pS*a+dS*c,pS*c-dS*a),t.closePath()}},vS={draw(t,e){const n=.6189*oT(e-rT(e/6,1.7));t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},_S=[XT,ZT,tS,rS,cS,lS,gS],bS=[XT,nS,vS,fS,$T,iS,eS];function wS(t,e){let n=null,r=hT(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:Jk(t||XT),e="function"==typeof e?e:Jk(void 0===e?64:+e),i.type=function(e){return arguments.length?(t="function"==typeof e?e:Jk(e),i):t},i.size=function(t){return arguments.length?(e="function"==typeof t?t:Jk(+t),i):e},i.context=function(t){return arguments.length?(n=null==t?null:t,i):n},i}function xS(){}function kS(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 TS(t){this._context=t}function SS(t){return new TS(t)}function ES(t){this._context=t}function AS(t){return new ES(t)}function OS(t){this._context=t}function NS(t){return new OS(t)}function CS(t,e){this._basis=new TS(t),this._beta=e}TS.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:kS(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:kS(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ES.prototype={areaStart:xS,areaEnd:xS,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:kS(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},OS.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:kS(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},CS.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 LS=function t(e){function n(t){return 1===e?new TS(t):new CS(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function RS(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 PS(t,e){this._context=t,this._k=(1-e)/6}PS.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:RS(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:RS(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 IS=function t(e){function n(t){return new PS(t,e)}return n.tension=function(e){return t(+e)},n}(0);function MS(t,e){this._context=t,this._k=(1-e)/6}MS.prototype={areaStart:xS,areaEnd:xS,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:RS(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 DS=function t(e){function n(t){return new MS(t,e)}return n.tension=function(e){return t(+e)},n}(0);function jS(t,e){this._context=t,this._k=(1-e)/6}jS.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:RS(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 BS=function t(e){function n(t){return new jS(t,e)}return n.tension=function(e){return t(+e)},n}(0);function FS(t,e,n){var r=t._x1,i=t._y1,o=t._x2,s=t._y2;if(t._l01_a>sT){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>sT){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 US(t,e){this._context=t,this._alpha=e}US.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:FS(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 US(t,e):new PS(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function VS(t,e){this._context=t,this._alpha=e}VS.prototype={areaStart:xS,areaEnd:xS,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:FS(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 KS=function t(e){function n(t){return e?new VS(t,e):new MS(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function HS(t,e){this._context=t,this._alpha=e}HS.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:FS(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 qS=function t(e){function n(t){return e?new HS(t,e):new jS(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function WS(t){this._context=t}function GS(t){return new WS(t)}function YS(t){return t<0?-1:1}function $S(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(YS(o)+YS(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function XS(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function ZS(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 JS(t){this._context=t}function QS(t){this._context=new tE(t)}function tE(t){this._context=t}function eE(t){return new JS(t)}function nE(t){return new QS(t)}function rE(t){this._context=t}function iE(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 fE(t,e){return t[e]}function pE(t){const e=[];return e.key=t,e}function dE(){var t=Jk([]),e=hE,n=lE,r=fE;function i(i){var o,s,a=Array.from(t.apply(this,arguments),pE),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 gE(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 wE(t){var e=t.map(xE);return hE(t).sort((function(t,n){return e[t]-e[n]}))}function xE(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 EE="%Y-%m-%dT%H:%M:%S.%LZ",AE=Date.prototype.toISOString?function(t){return t.toISOString()}:Pb(EE);const OE=AE;var NE=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:Ib(EE);const CE=NE;function LE(t,e,n){var r=new eo,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?Qi():+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 RE=t=>()=>t;function PE(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 IE(t,e,n){this.k=t,this.x=e,this.y=n}IE.prototype={constructor:IE,scale:function(t){return 1===t?this:new IE(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new IE(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 ME=new IE(1,0,0);function DE(t){for(;!t.__zoom;)if(!(t=t.parentNode))return ME;return t.__zoom}function jE(t){t.stopImmediatePropagation()}function BE(t){t.preventDefault(),t.stopImmediatePropagation()}function FE(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function UE(){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 zE(){return this.__zoom||ME}function VE(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function KE(){return navigator.maxTouchPoints||"ontouchstart"in this}function HE(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 qE(){var t,e,n,r=FE,i=UE,o=HE,s=VE,a=KE,c=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],l=250,h=Lg,f=mn("start","zoom","end"),p=500,d=150,m=0,y=10;function g(t){t.property("__zoom",zE).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 IE(e,t.x,t.y)}function _(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 IE(t.k,r,i)}function b(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?b(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 IE(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=zi(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)],wo(this),n.start()}BE(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),d),n.zoom("mouse",o(_(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=Nr(t.view).on("mousemove.zoom",(function(t){if(BE(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(_(s.that.__zoom,s.mouse[0]=zi(t,i),s.mouse[1]),s.extent,u))}),!0).on("mouseup.zoom",(function(t){a.on("mousemove.zoom mouseup.zoom",null),Mr(t.view,s.moved),BE(t),s.event(t).end()}),!0),c=zi(t,i),l=t.clientX,h=t.clientY;Ir(t.view),jE(t),s.mouse=[c,this.__zoom.invert(c)],wo(this),s.start()}}function E(t,...e){if(r.apply(this,arguments)){var n=this.__zoom,s=zi(t.changedTouches?t.changedTouches[0]:t,this),a=n.invert(s),c=n.k*(t.shiftKey?.5:2),h=o(_(v(n,c),s,a),i.apply(this,e),u);BE(t),l>0?Nr(this).transition().duration(l).call(w,h,s,t):Nr(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(jE(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&&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 nN(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 rN(t){var e=function(t,e){if("object"!=$O(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=$O(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$O(e)?e:e+""}var iN=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 YO(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 PO(this.pluginData,this.viewport,t)}},{key:"initLinkRenderer",value:function(t){return new jO(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 gO(this.pluginData,this.viewport,this.layout),this.actions.deleteAction=new rA(this.pluginData,this.viewport,this.layout),this.actions.dragScene=new _A(this.pluginData,this.viewport,this.layout),this.actions.menuAction=new MA(this.pluginData,this.viewport,this.layout),this.actions.link=new AA(this.pluginData,this.viewport,this.layout),this.actions.zoom=new SO(this.pluginData,this.viewport,this.layout),this.actions.dragComponent=new hA(this.pluginData,this.viewport,this.layout),this.actions.resizeComponent=new KA(this.pluginData,this.viewport,this.layout),this.actions.toggleSelection=new QA(this.pluginData,this.viewport,this.layout),this.actions.deselectionAll=new aO(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=eN().mark((function e(n){var r,i,o,s,a,c,u;return eN().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){nN(o,r,i,s,a,"next",t)}function a(t){nN(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(QO({id:"scene",name:"",children:XO(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(){return this.viewport.selectAll(".scene > g").attr("transform",""),document.querySelector("#view-port .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 f(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 H({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]:"Error happened when trying to parse.",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"Error";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=xN(e),function(t,e){if(e&&("object"==vN(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,bN()?Reflect.construct(e,n||[],xN(t).constructor):e.apply(t,n))}(this,e,[n||"Error happened when trying to parse."])).name="ParseError",t.startLine=r||0,t.startColumn=i||0,t.endLine=o||0,t.endColumn=s||0,t.severity=a||"Error",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&&wN(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(_N(Error));const TN=kN;var SN=function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){var e=arguments.length>0&&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 EN=SN;function AN(t){return AN="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},AN(t)}function ON(t,e,n){return e=CN(e),function(t,e){if(e&&("object"==AN(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,NN()?Reflect.construct(e,n||[],CN(t).constructor):e.apply(t,n))}function NN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(NN=function(){return!!t})()}function CN(t){return CN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},CN(t)}function LN(t,e){return LN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},LN(t,e)}var RN=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=ON(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&&LN(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(M);const PN=RN;function IN(t){return IN="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},IN(t)}function MN(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:[]},parseErrors:[],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.parseErrors=d.parseErrors||[],this.__eventIndex=0,this.eventManager=m,this.eventLogs=[],this.configuration=e,this.resources={icons:jN({},null===(u=d.resources)||void 0===u?void 0:u.icons),markers:jN({},null===(l=d.resources)||void 0===l?void 0:l.markers),links:jN({},null===(h=d.resources)||void 0===h?void 0:h.links),models:jN({},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.25.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 b({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 MN(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 MN(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)?MN(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 M({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 PN({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 EN(jN(jN({},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:jN({},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:{}};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.editor=HN({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=HN({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)}));const YN=GN;function $N(t){return $N="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},$N(t)}function XN(t){var e=function(t,e){if("object"!=$N(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=$N(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$N(e)?e:e+""}var ZN=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 YN,this.data=e.pluginData||new zN(this.configuration,{},e.event),this.__drawer=e.pluginDrawer||new oN(this.data),this.__metadata=e.pluginMetadata||new uN(this.data),this.__parser=e.pluginParser||new pN(this.data),this.__renderer=e.pluginRenderer||new gN(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();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 tC=QN;function eC(t){return eC="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},eC(t)}function nC(t,e,n){return e=iC(e),function(t,e){if(e&&("object"==eC(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,rC()?Reflect.construct(e,n||[],iC(t).constructor):e.apply(t,n))}function rC(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(rC=function(){return!!t})()}function iC(t){return iC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},iC(t)}function oC(t,e){return oC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},oC(t,e)}var sC=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=nC(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&&oC(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(l);const aC=sC})();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:_,IfAsync:b,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,_=n(2),b=_.handleError,w=_.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(b(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=_;break;case",":M=w;break;case":":M=x;break;case"~":M=k;break;case"|":M=T;break;default:M=b}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:()=>Gn});var t=n(916);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};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}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,e,n){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 _=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,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(t.ComponentAttributeDefinition);const b=_;function w(t){return function(t){if(Array.isArray(t))return x(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 x(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)?x(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 x(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);nusing 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"},{name:"tags",displayName:"Tags",description:"Map of assume role session tags.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#tags"},{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:[{name:"tags",displayName:"Tags",description:"Key-value map of tags to apply to all resources.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#tags"}]},{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"}]}]),w([{type:"aws_ami",blockType:"data",displayName:"Amazon Machine Image (AMI)",description:"An Amazon Machine Image (AMI) is a supported and maintained image provided by AWS
that 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"]}}]}]),w([{type:"aws_vpc",blockType:"resource",provider:"aws",displayName:"Virtual Private Cloud (VPC)",description:"Amazon Virtual Private Cloud (Amazon VPC) enables you to launch AWS resources into a virtual network that you've defined.",icon:"Aws_Virtual-Private-Cloud",isContainer:!0,model:"DefaultContainer",url:"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html",categories:["AWS","Networking"],tags:[],definedAttributes:[{name:"cidr_block",displayName:"CIDR block",description:"IPv4 CIDR block of the desired VPC.",type:"String",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html",rules:{regex:"^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$"}},{name:"ipv4_ipam_pool_id",displayName:"IPv4 IPAM pool ID",description:"ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR.",type:"String",url:"https://docs.aws.amazon.com/vpc/latest/ipam/what-it-is-ipam.html"},{name:"ipv4_netmask_length",displayName:"IPv4 netmask length",description:"Netmask length of the IPv4 CIDR you want to allocate to this VPC.",type:"Number",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html",rules:{max:32,min:1}},{name:"ipv6_cidr_block",displayName:"IPv6 CIDR block",description:"IPv6 CIDR block to request from an IPAM Pool.",type:"String",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html",rules:{regex:"[a-fA-F0-9]{4}(:[a-fA-F0-9]{4}){7}"}},{name:"ipv6_ipam_pool_id",displayName:"IPv6 IPAM pool ID",description:"IPAM Pool ID for a IPv6 pool",type:"String",url:"https://docs.aws.amazon.com/vpc/latest/ipam/what-it-is-ipam.html"},{name:"ipv6_netmask_length",displayName:"IPv6 netmask length",description:"Netmask length to request from IPAM Pool.",type:"Number",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html",rules:{values:[56]}},{name:"ipv6_cidr_block_network_border_group",displayName:"IPv6 CIDR block network border group",description:"Restrict advertisement of public addresses to specific Network Border Groups such as LocalZones.",type:"String",url:"https://docs.aws.amazon.com/vpc/latest/userguide/Extend_VPCs.html"},{name:"instance_tenancy",displayName:"Instance tenancy",description:"Allowed tenancy of instances launched into the selected VPC.",type:"String",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html",rules:{values:["default","dedicated"]}},{name:"enable_dns_support",displayName:"Enable DNS support",description:"Enable DNS support in the VPC.",type:"Boolean",url:"https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html"},{name:"enable_dns_hostnames",displayName:"Enable DNS hostnames",description:"Enable DNS hostnames in the VPC.",type:"Boolean",url:"https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html"},{name:"enable_classiclink",displayName:"Enable ClassicLink",description:"Enable ClassicLink for the VPC, allowing you to link EC2-Classic instances to the VPC.",type:"Boolean",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html"},{name:"enable_classiclink_dns_support",displayName:"Enable ClassicLink DNS support",description:"Enable ClassicLink DNS Support for the VPC.
If 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"},{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"}]},{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:[{name:"vpc_id",displayName:"VPC ID",description:"The VPC ID to create the subnet in.",containerRef:"aws_vpc",required:!0,type:"Reference",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"},{name:"tags",displayName:"Tags",description:"A map of tags to assign to the resource.",type:"Object",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:[{name:"vpc_id",displayName:"VPC ID",description:"The ID of the VPC for which to create the route table.",containerRef:"aws_vpc",required:!0,type:"Reference",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"},{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"}]},{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:[{name:"vpc_id",displayName:"VPC ID",description:"The ID of the VPC for which to create the route table association.",containerRef:"aws_vpc",type:"Reference",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"},{name:"subnet_id",displayName:"Subnet ID",description:"The ID of the subnet to associate the route table with. Conflicts with gateway_id.",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",type:"Link",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:[{name:"vpc_id",displayName:"VPC ID",description:"The VPC ID to create the gateway in.",containerRef:"aws_vpc",type:"Reference",url:"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"},{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"}]}]),w([{type:"aws_security_group",blockType:"resource",provider:"aws",displayName:"Security group",description:"A security group controls the traffic that is allowed to reach and leave the resources that it is associated with.",icon:"AwsSecurityGroup",model:"DefaultModel",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html",categories:["AWS","Security"],tags:[],definedAttributes:[{name:"description",displayName:"Description",description:"Description of the security group.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#description"},{name:"name",displayName:"Name",description:"Name of the security group.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_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/security_group#name_prefix"},{name:"revoke_rules_on_delete",displayName:"Revoke rules on delete",description:"Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#revoke_rules_on_delete"},{name:"vpc_id",displayName:"VPC ID",description:"The ID of the VPC for which to create the security group.",containerRef:"aws_vpc",linkAttribute:"id",linkRef:"aws_vpc",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#vpc_id"},{name:"egress",displayName:"Egress",description:"Configuration block for egress rules",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#egress",definedAttributes:[{name:"from_port",displayName:"From port",description:"Start port (or ICMP type number if protocol is icmp).",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#from_port"},{name:"to_port",displayName:"To port",description:"End port (or ICMP code if protocol is icmp).",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#to_port"},{name:"protocol",displayName:"Protocol",description:"The protocol. If not icmp, tcp, udp, or all use the -1 protocol number.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#protocol"},{name:"cidr_blocks",displayName:"CIDR blocks",description:"List of CIDR blocks.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#cidr_blocks"},{name:"ipv6_cidr_blocks",displayName:"IPv6 CIDR blocks",description:"List of IPv6 CIDR blocks.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#ipv6_cidr_blocks"}]},{name:"ingress",displayName:"Ingress",description:"Configuration block for Ingress rules",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#ingress",definedAttributes:[{name:"from_port",displayName:"From port",description:"Start port (or ICMP type number if protocol is icmp).",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#from_port"},{name:"to_port",displayName:"To port",description:"End port (or ICMP code if protocol is icmp).",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#to_port"},{name:"protocol",displayName:"Protocol",description:"The protocol. If not icmp, tcp, udp, or all use the -1 protocol number.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#protocol"},{name:"cidr_blocks",displayName:"CIDR blocks",description:"List of CIDR blocks.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#cidr_blocks"},{name:"ipv6_cidr_blocks",displayName:"IPv6 CIDR blocks",description:"List of IPv6 CIDR blocks.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#ipv6_cidr_blocks"}]},{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"}]},{type:"aws_key_pair",blockType:"resource",provider:"aws",displayName:"AWS key pair",description:"A set of security credentials to prove your identity when connecting to an Amazon EC2 instance.",icon:"Aws_Identity-Access-Management_Long-Term-Security-Credential",model:"DefaultModel",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html",categories:["AWS","Security"],tags:[],definedAttributes:[{name:"key_name",displayName:"Key name",description:"The name for the key pair.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#key_name"},{name:"public_key",displayName:"Public key",description:"The public key material.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#public_key"},{name:"key_name_prefix",displayName:"Key name prefix",description:"Creates a unique name beginning with the specified prefix.
Conflicts with key_name.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#key_name_prefix"},{name:"tags",displayName:"Tags",description:"A mapping of tags to assign to the resource.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#tags"}]}]),w([{type:"aws_instance",blockType:"resource",provider:"aws",displayName:"EC2 Instance",description:"Provides an EC2 instance resource.",icon:"Aws_EC2-Instance",model:"DefaultModel",url:"https://docs.aws.amazon.com/ec2/index.html",categories:["AWS","Compute"],tags:[],definedAttributes:[{name:"security_groups",displayName:"Security groups",description:"List of security group names to associate with.",linkAttribute:"name",linkRef:"aws_security_group",linkType:"Reverse",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#security_groups"},{name:"vpc_security_group_ids",displayName:"VPC security group IDs",description:"List of security group IDs to associate with.",linkAttribute:"id",linkRef:"aws_security_group",linkType:"Reverse",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#vpc_security_group_ids"},{name:"subnet_id",displayName:"Subnet ID",description:"The VPC Subnet ID to launch in.",linkAttribute:"id",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#subnet_id"}]},{type:"aws_launch_configuration",blockType:"resource",provider:"aws",displayName:"Launch configuration",description:"A launch configuration is an instance configuration template that an Auto Scaling group uses to launch EC2 instances.
When 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"},{name:"security_groups",displayName:"Security groups",description:"A list of associated security group IDS.",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",type:"Link",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"}]}]}]),w([{type:"aws_ebs_volume",blockType:"resource",provider:"aws",displayName:"EBS Volume",description:"A durable, block-level storage device that you can attach to your instances.",icon:"Aws_Elastic-Block-Store_Volume",model:"DefaultModel",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes.html",categories:["AWS","Storage"],tags:[],definedAttributes:[{name:"availability_zone",displayName:"Availability zone",description:"The Availability Zone where the EBS volume will exist.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ebs_volume#availability_zone"}]},{type:"aws_volume_attachment",blockType:"resource",provider:"aws",displayName:"AWS volume attachment",description:"Attach an EBS volume to one or more instances",icon:"Aws_Elastic-Block-Store_Volume",model:"DefaultModel",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html",categories:["AWS","Storage"],tags:[],definedAttributes:[{name:"device_name",displayName:"Device name",description:"The device name to expose to the instance (for example, /dev/sdh or xvdh).",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/volume_attachment#device_name"},{name:"volume_id",displayName:"Volume ID",description:"The ID of the Volume to attach to.",linkAttribute:"id",linkRef:"aws_ebs_volume",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/volume_attachment#volume_id"},{name:"instance_id",displayName:"Instance ID",description:"The ID of the Instance to attach to.",linkAttribute:"id",linkRef:"aws_instance",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/volume_attachment#instance_id"}]},{type:"aws_s3_bucket",blockType:"resource",provider:"aws",displayName:"S3 bucket",description:"Amazon Simple Storage Service (Amazon S3) is an object storage service.",icon:"Aws_Storage-Service_Bucket",model:"DefaultModel",url:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html",categories:["AWS","Storage"],tags:[],definedAttributes:[{name:"bucket",displayName:"Bucket name",description:"The name of the bucket.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#bucket",rules:{max:63,min:1}},{name:"bucket_prefix",displayName:"Bucket prefix",description:"Creates a unique bucket name beginning with the specified prefix.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#bucket_prefix",rules:{max:63,min:1}},{name:"force_destroy",displayName:"Force destroy",description:"Indicates if all objects (including any locked objects) should be deleted from the bucket
when 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"},{name:"tags",displayName:"Tags",description:"A map of tags to assign to the resource.",type:"Object",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"},{name:"tags",displayName:"Tags",description:"A mapping of tags to assign to the file system.",type:"Object",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"},{name:"subnet_id",displayName:"Subnet ID",description:"The ID of the subnet to add the mount target in.",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",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"},{name:"security_groups",displayName:"Security groups",description:"A list of up to 5 VPC security group IDs (that must be for the same VPC as subnet specified) in effect for the mount target.",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_mount_target#security_groups"}]}]),w([{type:"aws_db_instance",blockType:"resource",provider:"aws",displayName:"AWS DB instance",description:"An isolated database environment.",icon:"Aws_EC2_DB-Instance",model:"DefaultModel",url:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.html",categories:["AWS","Databases"],tags:[],definedAttributes:[{name:"allocated_storage",displayName:"Allocated storage",description:"The allocated storage in gigabytes.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#allocated_storage"},{name:"db_name",displayName:"Database name",description:"The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#db_name"},{name:"engine",displayName:"Database engine",description:"The database engine to use.",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#engine"},{name:"vpc_security_group_ids",displayName:"VPC security groups",description:"A list of VPC security groups to associate.",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#vpc_security_group_ids"},{name:"instance_class",displayName:"Instance class",description:"The instance type of the Relational Database Service instance.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#instance_class"},{name:"db_subnet_group_name",displayName:"Subnet group name",description:"Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group.",linkAttribute:"name",linkRef:"aws_db_subnet_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#db_subnet_group_name"},{name:"username",displayName:"Username",description:"Username for the master DB user.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#username"},{name:"password",displayName:"Password",description:"Password for the master DB user.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#password"},{name:"skip_final_snapshot",displayName:"Skip final snapshot",description:"Determines whether a final DB snapshot is created before the DB instance is deleted.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#skip_final_snapshot"},{name:"publicly_accessible",displayName:"Publicly accessible",description:"Controls if instance is publicly accessible.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#publicly_accessible"},{name:"allow_major_version_upgrade",displayName:"Allow major version upgrade",description:"Indicates that major version upgrades are allowed.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#allow_major_version_upgrade"},{name:"apply_immediately",displayName:"Apply immediately",description:"Specifies whether any database modifications are applied immediately, or during the next maintenance window.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#apply_immediately"},{name:"auto_minor_version_upgrade",displayName:"Auto minor version upgrade",description:"Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#auto_minor_version_upgrade"},{name:"availability_zone",displayName:"Availability zone",description:"The Availability Zone for the Relational Database Service instance.",linkAttribute:"id",linkRef:"aws_availability_zones",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#availability_zone"},{name:"backup_retention_period",displayName:"Backup retention period",description:"The days to retain backups for.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#backup_retention_period",rules:{max:"35",min:"0"}},{name:"backup_window",displayName:"Backup window",description:"The daily time range (in UTC) during which automated backups are created if they are enabled.
Must 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"},{name:"port",displayName:"Port",description:"The port on which the DB accepts connections.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#port",rules:{max:"65535",min:"1"}},{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"},{name:"tags",displayName:"Tags",description:"A mapping of tags to assign to the DB instance.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#tags"}]}]),w([{type:"aws_elb",blockType:"resource",provider:"aws",displayName:"AWS ELB",description:"Automatically distributes incoming application traffic across multiple targets and virtual appliances in one or more Availability Zones.",icon:"Aws_Elastic-Load-Balancing_Network-Load-Balancer",model:"DefaultModel",url:"https://aws.amazon.com/elasticloadbalancing/",categories:["AWS","Load Balancing"],tags:[],definedAttributes:[{name:"listener",displayName:"Listener",description:"A list of listener blocks. Each listener block supports fields documented below.",required:!0,type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#listener",definedAttributes:[{name:"instance_port",displayName:"Instance port",description:"The port on the instance to route to.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#instance_port"},{name:"lb_port",displayName:"LB port",description:"The port to listen on for the load balancer.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#lb_port"},{name:"lb_protocol",displayName:"LB protocol",description:"The protocol to listen on. Valid values are HTTP, HTTPS, TCP, or SSL.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#lb_protocol"},{name:"instance_protocol",displayName:"Instance protocol",description:"The protocol to use to the instance. Valid values are HTTP, HTTPS, TCP, or SSL.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#instance_protocol"}]},{name:"subnets",displayName:"Subnets",description:"A list of subnet IDs to attach to the ELB.",linkAttribute:"id",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#subnets"},{name:"security_groups",displayName:"Security groups",description:"A list of security group IDs to assign to the ELB.",linkAttribute:"id",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#security_groups"},{name:"instances",displayName:"Instances",description:"A list of instance ids to place in the ELB pool.",linkAttribute:"id",linkRef:"aws_instance",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#instances"}]},{type:"aws_lb",blockType:"resource",provider:"aws",displayName:"Application Load Balancer (LB)",description:"A load balancer serves as the single point of contact for clients. The load balancer distributes incoming application traffic across multiple targets, in multiple Availability Zones.",icon:"Aws_Application-Load-Balancer",model:"DefaultModel",url:"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html",categories:["AWS","Load Balancing"],tags:[],definedAttributes:[{name:"vpc_id",displayName:"VPC ID",description:"The ID of the VPC to create the ALB in.",containerRef:"aws_vpc",type:"Reference",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#vpc_id"},{name:"name",displayName:"Name",description:"The name of the LB. This name must be unique within your AWS account.
If 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"]}},{name:"security_groups",displayName:"Security groups",description:"A list of security group IDs to assign to the LB. Only valid for Load Balancers of type application.",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",type:"Link",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:[{name:"subnet_id",displayName:"Subnet ID",description:"ID of the subnet of which to attach to the load balancer. You can specify only one subnet per Availability Zone.",type:"String",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"},{name:"ipv6_address",displayName:"IPv6 address",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.",type:"String",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"},{name:"tags",displayName:"Tags",description:"A map of tags to assign to the resource. If configured with a provider default_tags configuration block present,
tags with matching keys will overwrite those defined at the provider-level.",type:"Object",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"},{name:"port",displayName:"Port",description:"Port on which targets receive traffic, unless overridden when registering a specific target.",type:"Number",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"]}},{name:"vpc_id",displayName:"VPC ID",description:"Identifier of the VPC in which to create the target group.",linkRef:"aws_vpc",linkType:"Default",linkModel:"defaultLink",type:"Link",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"},{name:"port",displayName:"Port",description:"The port the load balancer uses when performing health checks on targets.",type:"Number",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"]}}]},{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"},{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:"Cerificate 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"},{name:"port",displayName:"Port",description:"Port on which the load balancer is listening.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#port",rules:{max:65535,min:1}},{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"},{name:"tags",displayName:"Tags",description:"A mapping of tags to assign to the resource.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#tags"}]}]),w([{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"}]}]),w([{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"}]}]}]),w([{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"}]}]),w([{type:"server",blockType:"module",provider:"aws",displayName:"Server",icon:"Aws_Servers",model:"DefaultModel",categories:["AWS","Modules"],tags:[],definedAttributes:[]}]),w([{type:"image_id",blockType:"variable",provider:"aws",icon:"variable",model:"DefaultModel",categories:["AWS","Variables"],tags:[],definedAttributes:[]}])))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(S)||function(t,e){if(t){if("string"==typeof t)return k(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)?k(t,e):void 0}}(S)||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.")}();var S;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 A(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 A(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 A(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)?A(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 B=j;var F={92:()=>{}},U={};function z(t){var e=U[t];if(void 0!==e)return e.exports;var n=U[t]={exports:{}};return F[t](n,n.exports,z),n.exports}z.d=(t,e)=>{for(var n in e)z.o(e,n)&&!z.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},z.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var V={};(()=>{z.d(V,{dx:()=>$,q2:()=>Ot,FO:()=>ke,xf:()=>Ee,Gy:()=>Ce,s4:()=>Pt,c7:()=>Ie,_7:()=>ce,gp:()=>_e,cK:()=>Nt,zs:()=>ge,AV:()=>Ee,Xp:()=>g,VS:()=>v,ul:()=>Y,hW:()=>Bt,x1:()=>Xt,z5:()=>ee,oN:()=>fe,TB:()=>pe,u1:()=>de,_b:()=>De,$F:()=>re,_T:()=>Fe,db:()=>ie,Zx:()=>te,_x:()=>Dt,r8:()=>M,JI:()=>C,TP:()=>L,WU:()=>t,Nj:()=>c,ZP:()=>qe});class t{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 e(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)*u&65535)<<16)&4294967295,o=o<<15|o>>>17,o=(65535&o)*l+(((o>>>16)*l&65535)<<16)&4294967295,c^=o,c=c<<13|c>>>19,i=5*(65535&c)+((5*(c>>>16)&65535)<<16)&4294967295,c=27492+(65535&i)+((58964+(i>>>16)&65535)<<16);switch(o=0,s){case 3:o^=(255&r.charCodeAt(h+2))<<16;case 2:o^=(255&r.charCodeAt(h+1))<<8;case 1:o^=255&r.charCodeAt(h),o=(65535&o)*u+(((o>>>16)*u&65535)<<16)&4294967295,o=o<<15|o>>>17,o=(65535&o)*l+(((o>>>16)*l&65535)<<16)&4294967295,c^=o}return c^=r.length,c^=c>>>16,c=2246822507*(65535&c)+((2246822507*(c>>>16)&65535)<<16)&4294967295,c^=c>>>13,c=3266489909*(65535&c)+((3266489909*(c>>>16)&65535)<<16)&4294967295,c^=c>>>16,c>>>0}class i{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 i;return t.update.apply(t,arguments),t.finish()}}function o(t){return t?"string"==typeof t?r(t):t.hashCode():-1}function s(t,e){return t?t.equals(e):t===e}function a(t){return null===t?"null":t}function c(t){return Array.isArray(t)?"["+t.map(a).join(", ")+"]":"null"}const u="h-";class l{constructor(t,e){this.data={},this.hashFunction=t||o,this.equalsFunction=e||s}add(t){const e=u+this.hashFunction(t);if(e in this.data){const n=this.data[e];for(let e=0;et.startsWith(u))).flatMap((t=>this.data[t]),this)}toString(){return c(this.values())}get length(){return Object.keys(this.data).filter((t=>t.startsWith(u))).map((t=>this.data[t].length),this).reduce(((t,e)=>t+e),0)}}class h{hashCode(){const t=new i;return this.updateHashCode(t),t.finish()}evaluate(t,e){}evalPrecedence(t,e){return this}static andContext(t,e){if(null===t||t===h.NONE)return e;if(null===e||e===h.NONE)return t;const n=new f(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===h.NONE||e===h.NONE)return h.NONE;const n=new p(t,e);return 1===n.opnds.length?n.opnds[0]:n}}class f extends h{constructor(t,e){super();const n=new l;t instanceof f?t.opnds.map((function(t){n.add(t)})):n.add(t),e instanceof f?e.opnds.map((function(t){n.add(t)})):n.add(e);const r=d(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 p extends h{constructor(t,e){super();const n=new l;t instanceof p?t.opnds.map((function(t){n.add(t)})):n.add(t),e instanceof p?e.opnds.map((function(t){n.add(t)})):n.add(e);const r=d(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 p&&e(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 d(t){const e=[];return t.values().map((function(t){t instanceof h.PrecedencePredicate&&e.push(t)})),e}function m(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 y{constructor(t,e){this.checkContext(t,e),t=m(t),e=m(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:h.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 i;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 y&&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 i;return t.update(this.state.stateNumber,this.alt,this.semanticContext),t.finish()}equalsForConfigSet(t){return this===t||t instanceof y&&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!==h.NONE?","+this.semanticContext.toString():"")+(this.reachesIntoOuterContext>0?",up="+this.reachesIntoOuterContext:"")+")"}}class g{constructor(t,e){this.start=t,this.stop=e}clone(){return new g(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 g(e.start,n.stop),this.intervals.splice(t+1,1))}}complement(t,e){const n=new v;return n.addInterval(new g(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"):e.push("'"+String.fromCharCode(r.start)+"'"):e.push("'"+String.fromCharCode(r.start)+"'..'"+String.fromCharCode(r.stop-1)+"'")}return e.length>1?"{"+e.join(", ")+"}":e[0]}toIndexString(){const e=[];for(let n=0;n"):e.push(r.start.toString()):e.push(r.start.toString()+".."+(r.stop-1).toString())}return e.length>1?"{"+e.join(", ")+"}":e[0]}toTokenString(t,e){const n=[];for(let r=0;r1?"{"+n.join(", ")+"}":n[0]}elementName(e,n,r){return r===t.EOF?"":r===t.EPSILON?"":e[r]||n[r]}get length(){return this.intervals.map((t=>t.length)).reduce(((t,e)=>t+e))}}class _{constructor(){this.atn=null,this.stateNumber=_.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 _&&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)}}_.INVALID_TYPE=0,_.BASIC=1,_.RULE_START=2,_.BLOCK_START=3,_.PLUS_BLOCK_START=4,_.STAR_BLOCK_START=5,_.TOKEN_START=6,_.RULE_STOP=7,_.BLOCK_END=8,_.STAR_LOOP_BACK=9,_.STAR_LOOP_ENTRY=10,_.PLUS_LOOP_BACK=11,_.LOOP_END=12,_.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"],_.INVALID_STATE_NUMBER=-1;class b extends _{constructor(){return super(),this.stateType=_.RULE_STOP,this}}class w{constructor(t){if(null==t)throw"target cannot be null.";this.target=t,this.isEpsilon=!1,this.label=null}}w.EPSILON=1,w.RANGE=2,w.RULE=3,w.PREDICATE=4,w.ATOM=5,w.ACTION=6,w.SET=7,w.NOT_SET=8,w.WILDCARD=9,w.PRECEDENCE=10,w.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],w.serializationTypes={EpsilonTransition:w.EPSILON,RangeTransition:w.RANGE,RuleTransition:w.RULE,PredicateTransition:w.PREDICATE,AtomTransition:w.ATOM,ActionTransition:w.ACTION,SetTransition:w.SET,NotSetTransition:w.NOT_SET,WildcardTransition:w.WILDCARD,PrecedencePredicateTransition:w.PRECEDENCE};class x extends w{constructor(t,e,n,r){super(t),this.ruleIndex=e,this.precedence=n,this.followState=r,this.serializationType=w.RULE,this.isEpsilon=!0}matches(t,e,n){return!1}}class k extends w{constructor(e,n){super(e),this.serializationType=w.SET,null!=n?this.label=n:(this.label=new v,this.label.addOne(t.INVALID_TYPE))}matches(t,e,n){return this.label.contains(t)}toString(){return this.label.toString()}}class T extends k{constructor(t,e){super(t,e),this.serializationType=w.NOT_SET}matches(t,e,n){return t>=e&&t<=n&&!super.matches(t,e,n)}toString(){return"~"+super.toString()}}class S extends w{constructor(t){super(t),this.serializationType=w.WILDCARD}matches(t,e,n){return t>=e&&t<=n}toString(){return"."}}class E extends w{constructor(t){super(t)}}class A{}class O extends A{}class N extends O{}class C extends N{get ruleContext(){throw new Error("missing interface implementation")}}class L extends N{}class R extends L{}const P={toStringTree:function(t,e,n){e=e||null,null!==(n=n||null)&&(e=n.ruleNames);let r=P.getNodeText(t,e);r=function(t,e){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=P.toStringTree(t.getChild(0),e),o=o.concat(r));for(let n=1;n=0&&e0&&(t+=", "),this.returnStates[e]!==D.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 B extends D{constructor(t,e){let n=0;const r=new i;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 B&&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===D.EMPTY_RETURN_STATE?"$":""+this.returnState:this.returnState+" "+t}get length(){return 1}static create(t,e){return e===D.EMPTY_RETURN_STATE&&null===t?D.EMPTY:new B(t,e)}}class F extends B{constructor(){super(null,D.EMPTY_RETURN_STATE)}isEmpty(){return!0}getParent(t){return null}getReturnState(t){return this.returnState}equals(t){return this===t}toString(){return"$"}}D.EMPTY=new F;const U="h-";class K{constructor(t,e){this.data={},this.hashFunction=t||o,this.equalsFunction=e||s}set(t,e){const n=U+this.hashFunction(t);if(n in this.data){const r=this.data[n];for(let n=0;nt.startsWith(U))).flatMap((t=>this.data[t]),this)}getKeys(){return this.entries().map((t=>t.key))}getValues(){return this.entries().map((t=>t.value))}toString(){return"["+this.entries().map((t=>"{"+t.key+":"+t.value+"}")).join(", ")+"]"}get length(){return Object.keys(this.data).filter((t=>t.startsWith(U))).map((t=>this.data[t].length),this).reduce(((t,e)=>t+e),0)}}function H(t,e){if(null==e&&(e=M.EMPTY),null===e.parentCtx||e===M.EMPTY)return D.EMPTY;const n=H(t,e.parentCtx),r=t.states[e.invokingState].transitions[0];return B.create(n,r.followState.stateNumber)}function q(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 j([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 j(o,i);return null!==r&&r.set(t,e,s),s}}(t,e,n,r);if(n){if(t instanceof F)return t;if(e instanceof F)return e}return t instanceof B&&(t=new j([t.getParent()],[t.returnState])),e instanceof B&&(e=new j([e.getParent()],[e.returnState])),function(t,e,n,r){if(null!==r){let n=r.get(t,e);if(null!==n)return D.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),n;if(n=r.get(e,t),null!==n)return D.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),D.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> b"),e):(function(t){const e=new K;for(let n=0;n "+u),u)}(t,e,n,r)}class G{constructor(){this.data=[]}add(t){this.data[t]=!0}or(t){Object.keys(t.data).map((t=>this.add(t)),this)}remove(t){delete this.data[t]}has(t){return!0===this.data[t]}values(){return Object.keys(this.data)}minValue(){return Math.min.apply(null,this.values())}hashCode(){return i.hashStuff(this.values())}equals(t){return t instanceof G&&e(this.data,t.data)}toString(){return"{"+this.values().join(", ")+"}"}get length(){return this.values().length}}class Y{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 r=this.states[e];let i=this.nextTokens(r);if(!i.contains(t.EPSILON))return i;const o=new v;for(o.addSet(i),o.removeOne(t.EPSILON);null!==n&&n.invokingState>=0&&i.contains(t.EPSILON);){const e=this.states[n.invokingState].transitions[0];i=this.nextTokens(e.followState),o.addSet(i),o.removeOne(t.EPSILON),n=n.parentCtx}return i.contains(t.EPSILON)&&o.addOne(t.EOF),o}}$.INVALID_ALT_NUMBER=0;class X extends _{constructor(){super(),this.stateType=_.BASIC}}class Z extends _{constructor(){return super(),this.decision=-1,this.nonGreedy=!1,this}}class J extends Z{constructor(){return super(),this.endState=null,this}}class Q extends _{constructor(){return super(),this.stateType=_.BLOCK_END,this.startState=null,this}}class tt extends _{constructor(){return super(),this.stateType=_.LOOP_END,this.loopBackState=null,this}}class et extends _{constructor(){return super(),this.stateType=_.RULE_START,this.stopState=null,this.isPrecedenceRule=!1,this}}class nt extends Z{constructor(){return super(),this.stateType=_.TOKEN_START,this}}class rt extends Z{constructor(){return super(),this.stateType=_.PLUS_LOOP_BACK,this}}class it extends _{constructor(){return super(),this.stateType=_.STAR_LOOP_BACK,this}}class ot extends Z{constructor(){return super(),this.stateType=_.STAR_LOOP_ENTRY,this.loopBackState=null,this.isPrecedenceDecision=null,this}}class st extends J{constructor(){return super(),this.stateType=_.PLUS_BLOCK_START,this.loopBackState=null,this}}class at extends J{constructor(){return super(),this.stateType=_.STAR_BLOCK_START,this}}class ct extends J{constructor(){return super(),this.stateType=_.BLOCK_START,this}}class ut extends w{constructor(t,e){super(t),this.label_=e,this.label=this.makeLabel(),this.serializationType=w.ATOM}makeLabel(){const t=new v;return t.addOne(this.label_),t}matches(t,e,n){return this.label_===t}toString(){return this.label_}}class lt extends w{constructor(t,e,n){super(t),this.serializationType=w.RANGE,this.start=e,this.stop=n,this.label=this.makeLabel()}makeLabel(){const t=new v;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 ht extends w{constructor(t,e,n,r){super(t),this.serializationType=w.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 ft extends w{constructor(t,e){super(t),this.serializationType=w.EPSILON,this.isEpsilon=!0,this.outermostPrecedenceReturn=e}matches(t,e,n){return!1}toString(){return"epsilon"}}class pt extends h{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 pt&&this.ruleIndex===t.ruleIndex&&this.predIndex===t.predIndex&&this.isCtxDependent===t.isCtxDependent}toString(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}}h.NONE=new pt;class dt extends E{constructor(t,e,n,r){super(t),this.serializationType=w.PREDICATE,this.ruleIndex=e,this.predIndex=n,this.isCtxDependent=r,this.isEpsilon=!0}matches(t,e,n){return!1}getPredicate(){return new pt(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return"pred_"+this.ruleIndex+":"+this.predIndex}}class mt extends h{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)?h.NONE:null}compareTo(t){return this.precedence-t.precedence}updateHashCode(t){t.update(this.precedence)}equals(t){return this===t||t instanceof mt&&this.precedence===t.precedence}toString(){return"{"+this.precedence+">=prec}?"}}h.PrecedencePredicate=mt;class yt extends E{constructor(t,e){super(t),this.serializationType=w.PRECEDENCE,this.precedence=e,this.isEpsilon=!0}matches(t,e,n){return!1}getPredicate(){return new mt(this.precedence)}toString(){return this.precedence+" >= _p"}}class gt{constructor(t){void 0===t&&(t=null),this.readOnly=!1,this.verifyATN=null===t||t.verifyATN,this.generateRuleBypassTransitions=null!==t&&t.generateRuleBypassTransitions}}gt.defaultOptions=new gt,gt.defaultOptions.readOnly=!0;class vt{constructor(t){this.actionType=t,this.isPositionDependent=!1}hashCode(){const t=new i;return this.updateHashCode(t),t.finish()}updateHashCode(t){t.update(this.actionType)}equals(t){return this===t}}class _t extends vt{constructor(){super(6)}execute(t){t.skip()}toString(){return"skip"}}_t.INSTANCE=new _t;class bt extends vt{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 bt&&this.channel===t.channel}toString(){return"channel("+this.channel+")"}}class wt extends vt{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 wt&&this.ruleIndex===t.ruleIndex&&this.actionIndex===t.actionIndex}}class xt extends vt{constructor(){super(3)}execute(t){t.more()}toString(){return"more"}}xt.INSTANCE=new xt;class kt extends vt{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 kt&&this.type===t.type}toString(){return"type("+this.type+")"}}class Tt extends vt{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 Tt&&this.mode===t.mode}toString(){return"pushMode("+this.mode+")"}}class St extends vt{constructor(){super(4)}execute(t){t.popMode()}toString(){return"popMode"}}St.INSTANCE=new St;class Et extends vt{constructor(t){super(2),this.mode=t}execute(t){t.mode(this.mode)}updateHashCode(t){t.update(this.actionType,this.mode)}equals(t){return this===t||t instanceof Et&&this.mode===t.mode}toString(){return"mode("+this.mode+")"}}function At(t,e){const n=[];return n[t-1]=e,n.map((function(t){return e}))}class Ot{constructor(t){null==t&&(t=gt.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 $(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 ft(i)),o.addTransition(new ft(a));const l=new X;t.addState(l),l.addTransition(new ut(o,t.ruleToTokenType[e])),i.addTransition(new ft(l))}stateIsEndStateFor(t,e){if(t.ruleIndex!==e)return null;if(!(t instanceof ot))return null;const n=t.transitions[t.transitions.length-1].target;return n instanceof tt&&n.epsilonOnlyTransitions&&n.transitions[0].target instanceof b?t:null}markPrecedenceDecisions(t){for(let e=0;e=0):this.checkCondition(n.transitions.length<=1||n instanceof b)}}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(e,n,r,i,o,s,a,c){const u=e.states[i];switch(n){case w.EPSILON:return new ft(u);case w.RANGE:return new lt(u,0!==a?t.EOF:o,s);case w.RULE:return new x(e.states[o],s,a,u);case w.PREDICATE:return new dt(u,o,s,0!==a);case w.PRECEDENCE:return new yt(u,o);case w.ATOM:return new ut(u,0!==a?t.EOF:o);case w.ACTION:return new ht(u,o,s,0!==a);case w.SET:return new k(u,c[o]);case w.NOT_SET:return new T(u,c[o]);case w.WILDCARD:return new S(u);default:throw"The specified transition type: "+n+" is not valid."}}stateFactory(t,e){if(null===this.stateFactories){const t=[];t[_.INVALID_TYPE]=null,t[_.BASIC]=()=>new X,t[_.RULE_START]=()=>new et,t[_.BLOCK_START]=()=>new ct,t[_.PLUS_BLOCK_START]=()=>new st,t[_.STAR_BLOCK_START]=()=>new at,t[_.TOKEN_START]=()=>new nt,t[_.RULE_STOP]=()=>new b,t[_.BLOCK_END]=()=>new Q,t[_.STAR_LOOP_BACK]=()=>new it,t[_.STAR_LOOP_ENTRY]=()=>new ot,t[_.PLUS_LOOP_BACK]=()=>new rt,t[_.LOOP_END]=()=>new tt,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 bt(t),t[1]=(t,e)=>new wt(t,e),t[2]=(t,e)=>new Et(t),t[3]=(t,e)=>xt.INSTANCE,t[4]=(t,e)=>St.INSTANCE,t[5]=(t,e)=>new Tt(t),t[6]=(t,e)=>_t.INSTANCE,t[7]=(t,e)=>new kt(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 Nt{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 Ct extends Nt{constructor(){super()}syntaxError(t,e,n,r,i,o){console.error("line "+n+":"+r+" "+i)}}Ct.INSTANCE=new Ct;class Lt extends Nt{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 Rt{constructor(){this._listeners=[Ct.INSTANCE],this._interp=null,this._stateNumber=-1}checkVersion(t){const e="4.13.1";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 n=e.text;return null===n&&(n=e.type===t.EOF?"":"<"+e.type+">"),n=n.replace("\n","\\n").replace("\r","\\r").replace("\t","\\t"),"'"+n+"'"}getErrorListenerDispatch(){return new Lt(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}}Rt.tokenTypeMapCache={},Rt.ruleIndexMapCache={};class Pt extends t{constructor(e,n,r,i,o){super(),this.source=void 0!==e?e:Pt.EMPTY_SOURCE,this.type=void 0!==n?n:null,this.channel=void 0!==r?r:t.DEFAULT_CHANNEL,this.start=void 0!==i?i:-1,this.stop=void 0!==o?o:-1,this.tokenIndex=-1,null!==this.source[0]?(this.line=e[0].line,this.column=e[0].column):this.column=-1}clone(){const t=new Pt(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(e){const n=new Pt(this.source,e,this.channel,this.start,this.stop);return n.tokenIndex=this.tokenIndex,n.line=this.line,n.column=this.column,e===t.EOF&&(n.text=""),n}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}}Pt.EMPTY_SOURCE=[null,null];class It{}class Mt extends It{constructor(t){super(),this.copyText=void 0!==t&&t}create(t,e,n,r,i,o,s,a){const c=new Pt(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 Pt(null,t);return n.text=e,n}}Mt.DEFAULT=new Mt;class Dt extends Error{constructor(t){super(t.message),Error.captureStackTrace&&Error.captureStackTrace(this,Dt),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 jt extends Dt{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"===e?"\\n":"\t"===e?"\\t":"\r"===e?"\\r":e}getCharErrorDisplay(t){return"'"+this.getErrorDisplayForChar(t)+"'"}recover(e){this._input.LA(1)!==t.EOF&&(e instanceof jt?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 Ft(t){return t.hashCodeForConfigSet()}function Ut(t,e){return t===e||null!==t&&null!==e&&t.equalsForConfigSet(e)}Bt.DEFAULT_MODE=0,Bt.MORE=-2,Bt.SKIP=-3,Bt.DEFAULT_TOKEN_CHANNEL=t.DEFAULT_CHANNEL,Bt.HIDDEN=t.HIDDEN_CHANNEL,Bt.MIN_CHAR_VALUE=0,Bt.MAX_CHAR_VALUE=1114111;class zt{constructor(t){this.configLookup=new l(Ft,Ut),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!==h.NONE&&(this.hasSemanticContext=!0),t.reachesIntoOuterContext>0&&(this.dipsIntoOuterContext=!0);const n=this.configLookup.add(t);if(n===t)return this.cachedHashCode=-1,this.configs.push(t),!0;const r=!this.fullCtx,i=W(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 l;for(let e=0;eXt.MAX_DFA_EDGE)return null;let n=t.edges[e-Xt.MIN_DFA_EDGE];return void 0===n&&(n=null),Xt.debug&&null!==n&&console.log("reuse state "+t.stateNumber+" edge to "+n.stateNumber),n}computeTargetState(t,e,n){const r=new Ht;return this.getReachableConfigSet(t,e.configs,r,n),0===r.items.length?(r.hasSemanticContext||this.addDFAEdge(e,n,Kt.ERROR),Kt.ERROR):this.addDFAEdge(e,n,null,r)}failOrAccept(e,n,r,i){if(null!==this.prevAccept.dfaState){const t=e.dfaState.lexerActionExecutor;return this.accept(n,t,this.startIndex,e.index,e.line,e.column),e.dfaState.prediction}if(i===t.EOF&&n.index===this.startIndex)return t.EOF;throw new jt(this.recog,n,this.startIndex,r)}getReachableConfigSet(e,n,r,i){let o=$.INVALID_ALT_NUMBER;for(let s=0;sXt.MAX_DFA_EDGE||(Xt.debug&&console.log("EDGE "+t+" -> "+n+" upon "+e),null===t.edges&&(t.edges=[]),t.edges[e-Xt.MIN_DFA_EDGE]=n),n}addDFAState(t){const e=new Vt(null,t);let n=null;for(let e=0;et.startsWith("k-"))).map((t=>this.data[t]),this)}}const Qt={SLL:0,LL:1,LL_EXACT_AMBIG_DETECTION:2,hasSLLConflictTerminatingPrediction:function(t,e){if(Qt.allConfigsInRuleStopStates(e))return!0;if(t===Qt.SLL&&e.hasSemanticContext){const t=new zt;for(let n=0;n1)return!0;return!1},allSubsetsEqual:function(t){let e=null;for(let n=0;n "+s),0===s.items.length?null:s}removeAllConfigsNotInRuleStopState(e,n){if(te.allConfigsInRuleStopStates(e))return e;const r=new zt(e.fullCtx);for(let i=0;i0&&(o=this.getAltThatFinishedDecisionEntryRule(i),o!==$.INVALID_ALT_NUMBER)?o:$.INVALID_ALT_NUMBER}getAltThatFinishedDecisionEntryRule(t){const e=[];for(let n=0;n0||r.state instanceof b&&r.context.hasEmptyPath())&&e.indexOf(r.alt)<0&&e.push(r.alt)}return 0===e.length?$.INVALID_ALT_NUMBER:Math.min.apply(null,e)}splitAccordingToSemanticValidity(t,e){const n=new zt(t.fullCtx),r=new zt(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!==_.STAR_LOOP_ENTRY)return!1;if(e.stateType!==_.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(e,n,r,i,o,s){switch(n.serializationType){case w.RULE:return this.ruleTransition(e,n);case w.PRECEDENCE:return this.precedenceTransition(e,n,r,i,o);case w.PREDICATE:return this.predTransition(e,n,r,i,o);case w.ACTION:return this.actionTransition(e,n);case w.EPSILON:return new y({state:n.target},e);case w.ATOM:case w.RANGE:case w.SET:return s&&n.matches(t.EOF,0,1)?new y({state:n.target},e):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 y({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 "+c(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 y({state:e.target},t))}else{const n=h.andContext(t.semanticContext,e.getPredicate());o=new y({state:e.target,semanticContext:n},t)}else o=new y({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 "+c(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 y({state:e.target},t))}else{const n=h.andContext(t.semanticContext,e.getPredicate());o=new y({state:e.target,semanticContext:n},t)}else o=new y({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=B.create(t.context,n.stateNumber);return new y({state:e.target,context:r},t)}getConflictingAlts(t){const e=te.getConflictingAltSubsets(t);return te.getAlts(e)}getConflictingAltsOrUniqueAlt(t){let e=null;return t.uniqueAlt!==$.INVALID_ALT_NUMBER?(e=new G,e.add(t.uniqueAlt)):e=t.conflictingAlts,e}getTokenName(e){if(e===t.EOF)return"EOF";if(null!==this.parser&&null!==this.parser.literalNames){if(!(e>=this.parser.literalNames.length&&e>=this.parser.symbolicNames.length))return(this.parser.literalNames[e]||this.parser.symbolicNames[e])+"<"+e+">";console.log(e+" ttype out of range: "+this.parser.literalNames),console.log(""+this.parser.getInputStream().getTokens())}return""+e}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 ut?r="Atom "+this.getTokenName(t.label):t instanceof k&&(r=(t instanceof T?"~":"")+"Set "+t.set)}console.error(n.toString(this.parser,!0)+":"+r)}}noViableAlt(t,e,n,r){return new ee(this.parser,t,t.get(r),t.LT(1),n,e)}getUniqueAlt(t){let e=$.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===Kt.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 g(r,i+1);console.log("reportAttemptingFullContext decision="+t.decision+":"+n+", input="+this.parser.getTokenStream().getText(e))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportAttemptingFullContext(this.parser,t,r,i,e,n)}reportContextSensitivity(t,e,n,r,i){if(this.debug||this.retry_debug){const e=new g(r,i+1);console.log("reportContextSensitivity decision="+t.decision+":"+n+", input="+this.parser.getTokenStream().getText(e))}null!==this.parser&&this.parser.getErrorListenerDispatch().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 g(n,r+1);console.log("reportAmbiguity "+o+":"+s+", input="+this.parser.getTokenStream().getText(t))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportAmbiguity(this.parser,t,n,r,i,o,s)}}class ie{constructor(){this.cache=new K}add(t){if(t===D.EMPTY)return D.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 oe={ATN:$,ATNDeserializer:Ot,LexerATNSimulator:Xt,ParserATNSimulator:re,PredictionMode:te,PredictionContextCache:ie};class se{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+"=>"+c(t.predicates):e+"=>"+t.prediction.toString():e}}class ae extends se{constructor(t){super(t,null)}getEdgeLabel(t){return"'"+String.fromCharCode(t)+"'"}}class ce{constructor(t,e){if(void 0===e&&(e=0),this.atnStartState=t,this.decision=e,this._states=new l,this.s0=null,this.precedenceDfa=!1,t instanceof ot&&t.isPrecedenceDecision){this.precedenceDfa=!0;const t=new Vt(null,new zt);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 l,t){const t=new Vt(null,new zt);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 se(this,t,e).toString()}toLexerString(){return null===this.s0?"":new ae(this).toString()}get states(){return this._states}}const ue={DFA:ce,DFASerializer:se,LexerDFASerializer:ae,PredPrediction:Zt},le={PredictionContext:D},he={Interval:g,IntervalSet:v};class fe{visitTerminal(t){}visitErrorNode(t){}enterEveryRule(t){}exitEveryRule(t){}}class pe{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 de{walk(t,e){if(e instanceof R||void 0!==e.isErrorNode&&e.isErrorNode())t.visitErrorNode(e);else if(e instanceof L)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 G;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(e){if(this.inErrorRecoveryMode(e))return;const n=e._interp.atn.states[e.state],r=e.getTokenStream().LA(1),i=e.atn.nextTokens(n);if(i.contains(r))return this.nextTokensContext=null,void(this.nextTokenState=_.INVALID_STATE_NUMBER);if(i.contains(t.EPSILON))null===this.nextTokensContext&&(this.nextTokensContext=e._ctx,this.nextTokensState=e._stateNumber);else switch(n.stateType){case _.BLOCK_START:case _.STAR_BLOCK_START:case _.PLUS_BLOCK_START:case _.STAR_LOOP_ENTRY:if(null!==this.singleTokenDeletion(e))return;throw new ye(e);case _.PLUS_LOOP_BACK:case _.STAR_LOOP_BACK:{this.reportUnwantedToken(e);const t=new v;t.addSet(e.getExpectedTokens());const n=t.addSet(this.getErrorRecoverySet(e));this.consumeUntil(e,n)}}}reportNoViableAlternative(e,n){const r=e.getTokenStream();let i;i=null!==r?n.startToken.type===t.EOF?"":r.getText(new g(n.startToken.tokenIndex,n.offendingToken.tokenIndex)):"";const o="no viable alternative at input "+this.escapeWSAndQuote(i);e.notifyErrorListeners(o,n.offendingToken,n)}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 ye(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(e){const n=e.getCurrentToken(),r=this.getExpectedTokens(e).first();let i;i=r===t.EOF?"":"";let o=n;const s=e.getTokenStream().LT(-1);return o.type===t.EOF&&null!==s&&(o=s),e.getTokenFactory().create(o.source,r,i,t.DEFAULT_CHANNEL,-1,-1,o.line,o.column)}getExpectedTokens(t){return t.getExpectedTokens()}getTokenErrorDisplay(e){if(null===e)return"";let n=e.text;return null===n&&(n=e.type===t.EOF?"":"<"+e.type+">"),this.escapeWSAndQuote(n)}escapeWSAndQuote(t){return"'"+(t=(t=(t=t.replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t"))+"'"}getErrorRecoverySet(e){const n=e._interp.atn;let r=e._ctx;const i=new v;for(;null!==r&&r.invokingState>=0;){const t=n.states[r.invokingState].transitions[0],e=n.nextTokens(t.followState);i.addSet(e),r=r.parentCtx}return i.removeOne(t.EPSILON),i}consumeUntil(e,n){let r=e.getTokenStream().LA(1);for(;r!==t.EOF&&!n.contains(r);)e.consume(),r=e.getTokenStream().LA(1)}}class ke extends xe{constructor(){super()}recover(t,e){let n=t._ctx;for(;null!==n;)n.exception=e,n=n.parentCtx;throw new be(e)}recoverInline(t){this.recover(t,new ye(t))}sync(t){}}const Te={RecognitionException:Dt,NoViableAltException:ee,LexerNoViableAltException:jt,InputMismatchException:ye,FailedPredicateException:ge,DiagnosticErrorListener:_e,BailErrorStrategy:ke,DefaultErrorStrategy:xe,ErrorListener:Nt};class Se{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(e){if(0===e)return 0;e<0&&(e+=1);const n=this._index+e-1;return n<0||n>=this._size?t.EOF:this.data[n]}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 Ee extends Se{constructor(t,e){super(t,e)}}var Ae=z(92);const Oe="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;class Ne extends Ee{static fromPath(t,e,n){if(!Oe)throw new Error("FileStream is only available when running in Node!");Ae.readFile(t,e,(function(t,e){let r=null;null!==e&&(r=new Se(e,!0)),n(t,r)}))}constructor(t,e,n){if(!Oe)throw new Error("FileStream is only available when running in Node!");super(Ae.readFileSync(t,e||"utf-8"),n),this.fileName=t}}const Ce={fromString:function(t){return new Se(t,!0)},fromBlob:function(t,e,n,r){const i=new window.FileReader;i.onload=function(t){const e=new Se(t.target.result,!0);n(e)},i.onerror=r,i.readAsText(t,e)},fromBuffer:function(t,e){return new Se(t.toString(e),!0)},fromPath:function(t,e,n){Ne.fromPath(t,e,n)},fromPathSync:function(t,e){return new Ne(t,e)}},Le={arrayToString:c,stringToCharArray:function(t){let e=new Uint16Array(t.length);for(let n=0;n=0&&(this.fetchedEOF?this.index0)||this.fetch(e)>=e}fetch(e){if(this.fetchedEOF)return 0;for(let n=0;n=this.tokens.length&&(n=this.tokens.length-1);for(let o=e;o=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(e,n){if(this.sync(e),e>=this.tokens.length)return-1;let r=this.tokens[e];for(;r.channel!==this.channel;){if(r.type===t.EOF)return-1;e+=1,this.sync(e),r=this.tokens[e]}return e}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,Bt.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,Bt.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&&(r=this.tokens.length-1);let i="";for(let e=n;e=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 gt;n.generateRuleBypassTransitions=!0,e=new Ot(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.getErrorListenerDispatch().syntaxError(this,e,r,i,t,n)}consume(){const e=this.getCurrentToken();e.type!==t.EOF&&this.getInputStream().consume();const n=null!==this._parseListeners&&this._parseListeners.length>0;if(this.buildParseTrees||n){let t;t=this._errHandler.inErrorRecoveryMode(this)?this._ctx.addErrorNode(e):this._ctx.addTokenNode(e),t.invokingState=this.state,n&&this._parseListeners.forEach((function(e){t instanceof R||void 0!==t.isErrorNode&&t.isErrorNode()?e.visitErrorNode(t):t instanceof L&&e.visitTerminal(t)}))}return e}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(e){const n=this._interp.atn;let r=this._ctx;const i=n.states[this.state];let o=n.nextTokens(i);if(o.contains(e))return!0;if(!o.contains(t.EPSILON))return!1;for(;null!==r&&r.invokingState>=0&&o.contains(t.EPSILON);){const t=n.states[r.invokingState].transitions[0];if(o=n.nextTokens(t.followState),o.contains(e))return!0;r=r.parentCtx}return!(!o.contains(t.EPSILON)||e!==t.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.sourceName}setTrace(t){t?(null!==this._tracer&&this.removeParseListener(this._tracer),this._tracer=new Me(this),this.addParseListener(this._tracer)):(this.removeParseListener(this._tracer),this._tracer=null)}}De.bypassAltsAtnCache={};class je extends L{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 g.INVALID_INTERVAL;const t=this.symbol.tokenIndex;return new g(t,t)}getChildCount(){return 0}accept(t){return t.visitTerminal(this)}getText(){return this.symbol.text}toString(){return this.symbol.type===t.EOF?"":this.symbol.text}}class Be extends je{constructor(t){super(t)}isErrorNode(){return!0}accept(t){return t.visitErrorNode(this)}}class Fe extends M{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 Be&&(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 je(t);return this.addChild(e),e.parentCtx=this,e}addErrorNode(t){const e=new Be(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]:Ue.DEFAULT_PROGRAM_NAME;n="number"==typeof t?t:t.tokenIndex;let i=this.getProgram(r),o=new Ke(this.tokens,n,i.length,e);i.push(o)}insertBefore(t,e){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ue.DEFAULT_PROGRAM_NAME;n="number"==typeof t?t:t.tokenIndex;const i=this.getProgram(r),o=new Ve(this.tokens,n,i.length,e);i.push(o)}replaceSingle(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ue.DEFAULT_PROGRAM_NAME;this.replace(t,t,e,n)}replace(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ue.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 He(this.tokens,t,e,i.length,n);i.push(o)}delete(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ue.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(e){let n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ue.DEFAULT_PROGRAM_NAME;n=e instanceof g?e:new g(0,this.tokens.size-1),"string"==typeof e&&(r=e);const i=this.programs.get(r);let o=n.start,s=n.stop;if(s>this.tokens.size-1&&(s=this.tokens.size-1),o<0&&(o=0),null==i||0===i.length)return this.tokens.getText(new g(o,s));let a=[],c=this.reduceToSingleOperationPerIndex(i),u=o;for(;u<=s&&u=this.tokens.size-1&&a.push(t.text.toString());return a.join("")}reduceToSingleOperationPerIndex(t){for(let e=0;er.index&&e.index<=r.lastIndex&&(t[e.instructionIndex]=void 0);let o=this.getKindOfOps(t,He,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 ze{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 Ve extends ze{constructor(t,e,n,r){super(t,e,n,r)}execute(e){return this.text&&e.push(this.text.toString()),this.tokens.get(this.index).type!==t.EOF&&e.push(String(this.tokens.get(this.index).text)),this.index+1}}class Ke extends Ve{constructor(t,e,n,r){super(t,e+1,n,r)}}class He extends ze{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 qe={atn:oe,dfa:ue,context:le,misc:he,tree:me,error:Te,Token:t,CommonToken:Pt,CharStreams:Ce,CharStream:Ee,InputStream:Ee,CommonTokenStream:Ie,Lexer:Bt,Parser:De,ParserRuleContext:Fe,Interval:g,IntervalSet:v,LL1Analyzer:Y,Utils:Le,TokenStreamRewriter:Ue}})();var K=V.ZP;function H(t){return H="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},H(t)}function q(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=G(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&&X(t,e)}(e,t),function(t,e,n){return e&&q(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 J=Z;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){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=nt(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&&ot(t,e)}(e,t),function(t,e,n){return e&&tt(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 at=st;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){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=Tt(t);if(this.currentComponent.definition=this.definitions.find((function(t){return t.blockType===e.currentBlockType&&t.type===n}))||this.getUnknownDefinition(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){this.currentComponent?this.currentComponent.externalId=Tt(t):this.currentVariable&&(this.currentVariable.name=Tt(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 at({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 J({category:"local",name:Tt(t.identifier())}),this.currentVariableField="value"):this.currentField=new at}},{key:"exitArgument",value:function(t){var e,n,r=this;if(this.isVariable()){var i=t.identifier().getText();"description"===i?this.currentVariable.description=Tt(t.expression()):"sensitive"!==i&&"nullable"!==i||(this.currentVariable[i]="true"===Tt(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=Tt(t.val());this.currentField=new at({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=Tt(t);return{value:"null"===e?null:e,type:"String"}}},{key:"exitVal",value:function(t){var e=this.getFieldValueTypeFromContext(t),n=e.value,r=e.type;if(this.isVariable()||"local"===this.currentBlockType){var i=this.attributeTypeToVariableType(r);Array.isArray(this.currentVariable[this.currentVariableField])?(this.currentVariable[this.currentVariableField].push(n),"defaultValue"!==this.currentVariableField&&"value"!==this.currentVariableField||(this.currentVariable.type="list(".concat(i,")"))):(this.currentVariable[this.currentVariableField]=n,"defaultValue"!==this.currentVariableField&&"value"!==this.currentVariableField||(this.currentVariable.type=i))}else"Array"===this.currentField.type?this.currentField.value.push(n):(this.currentField.value=n,this.currentField.type=r)}},{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 at({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(){}}])}(K.tree.ParseTreeListener);const Et=St;function At(t){return At="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},At(t)}function Ot(t,e,n){return e=Ct(e),function(t,e){if(e&&("object"==At(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,Nt()?Reflect.construct(e,n||[],Ct(t).constructor):e.apply(t,n))}function Nt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Nt=function(){return!!t})()}function Ct(t){return Ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ct(t)}function Lt(t,e){return Lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lt(t,e)}function Rt(t,e,n){return(e=Pt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pt(t){var e=function(t,e){if("object"!=At(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=At(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==At(e)?e:e+""}var It=(new K.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]),Mt=It.decisionToState.map((function(t,e){return new K.dfa.DFA(t,e)})),Dt=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=Ot(this,e,[t]))._interp=new K.atn.LexerATNSimulator(n,It,Mt,new K.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&&Lt(t,e)}(e,t),function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(K.Lexer);function jt(t){return jt="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},jt(t)}function Bt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ft(t,e){for(var n=0;n'","'>='","'<'","'<='","'=='","'!='","'&&'","'||'","'variable'","'provider'","'in'","'*'","'.'","'{'","'}'","'('","')'",null,"'nul'"]),Rt(Dt,"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"]),Rt(Dt,"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"]),Dt.EOF=K.Token.EOF,Dt.T__0=1,Dt.T__1=2,Dt.T__2=3,Dt.T__3=4,Dt.T__4=5,Dt.T__5=6,Dt.T__6=7,Dt.T__7=8,Dt.T__8=9,Dt.T__9=10,Dt.T__10=11,Dt.T__11=12,Dt.T__12=13,Dt.T__13=14,Dt.T__14=15,Dt.T__15=16,Dt.T__16=17,Dt.T__17=18,Dt.T__18=19,Dt.T__19=20,Dt.T__20=21,Dt.T__21=22,Dt.T__22=23,Dt.T__23=24,Dt.T__24=25,Dt.T__25=26,Dt.T__26=27,Dt.T__27=28,Dt.T__28=29,Dt.VARIABLE=30,Dt.PROVIDER=31,Dt.IN=32,Dt.STAR=33,Dt.DOT=34,Dt.LCURL=35,Dt.RCURL=36,Dt.LPAREN=37,Dt.RPAREN=38,Dt.EOF_=39,Dt.NULL_=40,Dt.NATURAL_NUMBER=41,Dt.BOOL=42,Dt.DESCRIPTION=43,Dt.MULTILINESTRING=44,Dt.STRING=45,Dt.IDENTIFIER=46,Dt.COMMENT=47,Dt.BLOCKCOMMENT=48,Dt.WS=49;var Yt=(new K.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]),$t=Yt.decisionToState.map((function(t,e){return new K.dfa.DFA(t,e)})),Xt=new K.atn.PredictionContextCache,Zt=function(t){function e(t){var n;return Bt(this,e),(n=zt(this,e,[t]))._interp=new K.atn.ParserATNSimulator(n,Yt,$t,Xt),n.ruleNames=e.ruleNames,n.literalNames=e.literalNames,n.symbolicNames=e.symbolicNames,n}return Ht(e,t),Ut(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 Jt(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 K.error.NoViableAltException(this)}this.state=78,this._errHandler.sync(this),n=this._input.LA(1)}while(!(-32&n)&&1<'","'>='","'<'","'<='","'=='","'!='","'&&'","'||'","'variable'","'provider'","'in'","'*'","'.'","'{'","'}'","'('","')'",null,"'nul'"]),Wt(Zt,"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"]),Wt(Zt,"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"]),Zt.EOF=K.Token.EOF,Zt.T__0=1,Zt.T__1=2,Zt.T__2=3,Zt.T__3=4,Zt.T__4=5,Zt.T__5=6,Zt.T__6=7,Zt.T__7=8,Zt.T__8=9,Zt.T__9=10,Zt.T__10=11,Zt.T__11=12,Zt.T__12=13,Zt.T__13=14,Zt.T__14=15,Zt.T__15=16,Zt.T__16=17,Zt.T__17=18,Zt.T__18=19,Zt.T__19=20,Zt.T__20=21,Zt.T__21=22,Zt.T__22=23,Zt.T__23=24,Zt.T__24=25,Zt.T__25=26,Zt.T__26=27,Zt.T__27=28,Zt.T__28=29,Zt.VARIABLE=30,Zt.PROVIDER=31,Zt.IN=32,Zt.STAR=33,Zt.DOT=34,Zt.LCURL=35,Zt.RCURL=36,Zt.LPAREN=37,Zt.RPAREN=38,Zt.EOF_=39,Zt.NULL_=40,Zt.NATURAL_NUMBER=41,Zt.BOOL=42,Zt.DESCRIPTION=43,Zt.MULTILINESTRING=44,Zt.STRING=45,Zt.IDENTIFIER=46,Zt.COMMENT=47,Zt.BLOCKCOMMENT=48,Zt.WS=49,Zt.RULE_file_=0,Zt.RULE_terraform=1,Zt.RULE_resource=2,Zt.RULE_data=3,Zt.RULE_provider=4,Zt.RULE_output=5,Zt.RULE_local=6,Zt.RULE_module=7,Zt.RULE_variable=8,Zt.RULE_block=9,Zt.RULE_blocktype=10,Zt.RULE_resourcetype=11,Zt.RULE_name=12,Zt.RULE_label=13,Zt.RULE_blockbody=14,Zt.RULE_argument=15,Zt.RULE_identifier=16,Zt.RULE_identifierchain=17,Zt.RULE_inline_index=18,Zt.RULE_expression=19,Zt.RULE_forloop=20,Zt.RULE_section=21,Zt.RULE_val=22,Zt.RULE_functioncall=23,Zt.RULE_functionname=24,Zt.RULE_functionarguments=25,Zt.RULE_index=26,Zt.RULE_filedecl=27,Zt.RULE_list_=28,Zt.RULE_map_=29,Zt.RULE_string=30,Zt.RULE_signed_number=31,Zt.RULE_operator_=32,Zt.RULE_number=33;var Jt=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"local",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ie):this.getTypedRuleContext(ie,t)})),Wt(i,"module",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(oe):this.getTypedRuleContext(oe,t)})),Wt(i,"output",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(re):this.getTypedRuleContext(re,t)})),Wt(i,"provider",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ne):this.getTypedRuleContext(ne,t)})),Wt(i,"variable",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(se):this.getTypedRuleContext(se,t)})),Wt(i,"data",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ee):this.getTypedRuleContext(ee,t)})),Wt(i,"resource",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(te):this.getTypedRuleContext(te,t)})),Wt(i,"terraform",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Qt):this.getTypedRuleContext(Qt,t)})),i.parser=t,i.ruleIndex=Zt.RULE_file_,i}return Ht(e,t),Ut(e,[{key:"EOF",value:function(){return this.getToken(Zt.EOF,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterFile_(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitFile_(this)}}])}(K.ParserRuleContext),Qt=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_terraform,i}return Ht(e,t),Ut(e,[{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterTerraform(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitTerraform(this)}}])}(K.ParserRuleContext),te=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_resource,i}return Ht(e,t),Ut(e,[{key:"resourcetype",value:function(){return this.getTypedRuleContext(ue,0)}},{key:"name",value:function(){return this.getTypedRuleContext(le,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterResource(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitResource(this)}}])}(K.ParserRuleContext),ee=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_data,i}return Ht(e,t),Ut(e,[{key:"resourcetype",value:function(){return this.getTypedRuleContext(ue,0)}},{key:"name",value:function(){return this.getTypedRuleContext(le,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterData(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitData(this)}}])}(K.ParserRuleContext),ne=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_provider,i}return Ht(e,t),Ut(e,[{key:"PROVIDER",value:function(){return this.getToken(Zt.PROVIDER,0)}},{key:"resourcetype",value:function(){return this.getTypedRuleContext(ue,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterProvider(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitProvider(this)}}])}(K.ParserRuleContext),re=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_output,i}return Ht(e,t),Ut(e,[{key:"name",value:function(){return this.getTypedRuleContext(le,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterOutput(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitOutput(this)}}])}(K.ParserRuleContext),ie=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_local,i}return Ht(e,t),Ut(e,[{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterLocal(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitLocal(this)}}])}(K.ParserRuleContext),oe=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_module,i}return Ht(e,t),Ut(e,[{key:"name",value:function(){return this.getTypedRuleContext(le,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterModule(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitModule(this)}}])}(K.ParserRuleContext),se=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_variable,i}return Ht(e,t),Ut(e,[{key:"VARIABLE",value:function(){return this.getToken(Zt.VARIABLE,0)}},{key:"name",value:function(){return this.getTypedRuleContext(le,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterVariable(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitVariable(this)}}])}(K.ParserRuleContext),ae=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"label",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(he):this.getTypedRuleContext(he,t)})),i.parser=t,i.ruleIndex=Zt.RULE_block,i}return Ht(e,t),Ut(e,[{key:"blocktype",value:function(){return this.getTypedRuleContext(ce,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterBlock(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitBlock(this)}}])}(K.ParserRuleContext),ce=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_blocktype,i}return Ht(e,t),Ut(e,[{key:"IDENTIFIER",value:function(){return this.getToken(Zt.IDENTIFIER,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterBlocktype(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitBlocktype(this)}}])}(K.ParserRuleContext),ue=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_resourcetype,i}return Ht(e,t),Ut(e,[{key:"STRING",value:function(){return this.getToken(Zt.STRING,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterResourcetype(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitResourcetype(this)}}])}(K.ParserRuleContext),le=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_name,i}return Ht(e,t),Ut(e,[{key:"STRING",value:function(){return this.getToken(Zt.STRING,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterName(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitName(this)}}])}(K.ParserRuleContext),he=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_label,i}return Ht(e,t),Ut(e,[{key:"STRING",value:function(){return this.getToken(Zt.STRING,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterLabel(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitLabel(this)}}])}(K.ParserRuleContext),fe=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"argument",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(pe):this.getTypedRuleContext(pe,t)})),Wt(i,"block",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ae):this.getTypedRuleContext(ae,t)})),i.parser=t,i.ruleIndex=Zt.RULE_blockbody,i}return Ht(e,t),Ut(e,[{key:"LCURL",value:function(){return this.getToken(Zt.LCURL,0)}},{key:"RCURL",value:function(){return this.getToken(Zt.RCURL,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterBlockbody(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitBlockbody(this)}}])}(K.ParserRuleContext),pe=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_argument,i}return Ht(e,t),Ut(e,[{key:"identifier",value:function(){return this.getTypedRuleContext(de,0)}},{key:"expression",value:function(){return this.getTypedRuleContext(ge,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterArgument(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitArgument(this)}}])}(K.ParserRuleContext),de=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_identifier,i}return Ht(e,t),Ut(e,[{key:"identifierchain",value:function(){return this.getTypedRuleContext(me,0)}},{key:"DOT",value:function(){return this.getToken(Zt.DOT,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterIdentifier(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitIdentifier(this)}}])}(K.ParserRuleContext),me=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"DOT",(function(t){return void 0===t&&(t=null),null===t?this.getTokens(Zt.DOT):this.getToken(Zt.DOT,t)})),Wt(i,"identifierchain",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(e):this.getTypedRuleContext(e,t)})),i.parser=t,i.ruleIndex=Zt.RULE_identifierchain,i}return Ht(e,t),Ut(e,[{key:"IDENTIFIER",value:function(){return this.getToken(Zt.IDENTIFIER,0)}},{key:"IN",value:function(){return this.getToken(Zt.IN,0)}},{key:"VARIABLE",value:function(){return this.getToken(Zt.VARIABLE,0)}},{key:"PROVIDER",value:function(){return this.getToken(Zt.PROVIDER,0)}},{key:"index",value:function(){return this.getTypedRuleContext(Te,0)}},{key:"STAR",value:function(){return this.getToken(Zt.STAR,0)}},{key:"inline_index",value:function(){return this.getTypedRuleContext(ye,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterIdentifierchain(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitIdentifierchain(this)}}])}(K.ParserRuleContext),ye=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_inline_index,i}return Ht(e,t),Ut(e,[{key:"NATURAL_NUMBER",value:function(){return this.getToken(Zt.NATURAL_NUMBER,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterInline_index(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitInline_index(this)}}])}(K.ParserRuleContext),ge=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(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=Zt.RULE_expression,i}return Ht(e,t),Ut(e,[{key:"section",value:function(){return this.getTypedRuleContext(_e,0)}},{key:"LPAREN",value:function(){return this.getToken(Zt.LPAREN,0)}},{key:"RPAREN",value:function(){return this.getToken(Zt.RPAREN,0)}},{key:"forloop",value:function(){return this.getTypedRuleContext(ve,0)}},{key:"operator_",value:function(){return this.getTypedRuleContext(Ce,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterExpression(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitExpression(this)}}])}(K.ParserRuleContext),ve=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"expression",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ge):this.getTypedRuleContext(ge,t)})),i.parser=t,i.ruleIndex=Zt.RULE_forloop,i}return Ht(e,t),Ut(e,[{key:"identifier",value:function(){return this.getTypedRuleContext(de,0)}},{key:"IN",value:function(){return this.getToken(Zt.IN,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterForloop(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitForloop(this)}}])}(K.ParserRuleContext),_e=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_section,i}return Ht(e,t),Ut(e,[{key:"list_",value:function(){return this.getTypedRuleContext(Ee,0)}},{key:"map_",value:function(){return this.getTypedRuleContext(Ae,0)}},{key:"val",value:function(){return this.getTypedRuleContext(be,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterSection(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitSection(this)}}])}(K.ParserRuleContext),be=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_val,i}return Ht(e,t),Ut(e,[{key:"NULL_",value:function(){return this.getToken(Zt.NULL_,0)}},{key:"signed_number",value:function(){return this.getTypedRuleContext(Ne,0)}},{key:"string",value:function(){return this.getTypedRuleContext(Oe,0)}},{key:"identifier",value:function(){return this.getTypedRuleContext(de,0)}},{key:"BOOL",value:function(){return this.getToken(Zt.BOOL,0)}},{key:"DESCRIPTION",value:function(){return this.getToken(Zt.DESCRIPTION,0)}},{key:"filedecl",value:function(){return this.getTypedRuleContext(Se,0)}},{key:"functioncall",value:function(){return this.getTypedRuleContext(we,0)}},{key:"EOF_",value:function(){return this.getToken(Zt.EOF_,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterVal(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitVal(this)}}])}(K.ParserRuleContext),we=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_functioncall,i}return Ht(e,t),Ut(e,[{key:"functionname",value:function(){return this.getTypedRuleContext(xe,0)}},{key:"LPAREN",value:function(){return this.getToken(Zt.LPAREN,0)}},{key:"functionarguments",value:function(){return this.getTypedRuleContext(ke,0)}},{key:"RPAREN",value:function(){return this.getToken(Zt.RPAREN,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterFunctioncall(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitFunctioncall(this)}}])}(K.ParserRuleContext),xe=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_functionname,i}return Ht(e,t),Ut(e,[{key:"IDENTIFIER",value:function(){return this.getToken(Zt.IDENTIFIER,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterFunctionname(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitFunctionname(this)}}])}(K.ParserRuleContext),ke=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"expression",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ge):this.getTypedRuleContext(ge,t)})),i.parser=t,i.ruleIndex=Zt.RULE_functionarguments,i}return Ht(e,t),Ut(e,[{key:"enterRule",value:function(t){t instanceof Et&&t.enterFunctionarguments(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitFunctionarguments(this)}}])}(K.ParserRuleContext),Te=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_index,i}return Ht(e,t),Ut(e,[{key:"expression",value:function(){return this.getTypedRuleContext(ge,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterIndex(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitIndex(this)}}])}(K.ParserRuleContext),Se=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_filedecl,i}return Ht(e,t),Ut(e,[{key:"LPAREN",value:function(){return this.getToken(Zt.LPAREN,0)}},{key:"expression",value:function(){return this.getTypedRuleContext(ge,0)}},{key:"RPAREN",value:function(){return this.getToken(Zt.RPAREN,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterFiledecl(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitFiledecl(this)}}])}(K.ParserRuleContext),Ee=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"expression",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ge):this.getTypedRuleContext(ge,t)})),i.parser=t,i.ruleIndex=Zt.RULE_list_,i}return Ht(e,t),Ut(e,[{key:"enterRule",value:function(t){t instanceof Et&&t.enterList_(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitList_(this)}}])}(K.ParserRuleContext),Ae=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"argument",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(pe):this.getTypedRuleContext(pe,t)})),i.parser=t,i.ruleIndex=Zt.RULE_map_,i}return Ht(e,t),Ut(e,[{key:"LCURL",value:function(){return this.getToken(Zt.LCURL,0)}},{key:"RCURL",value:function(){return this.getToken(Zt.RCURL,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterMap_(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitMap_(this)}}])}(K.ParserRuleContext),Oe=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_string,i}return Ht(e,t),Ut(e,[{key:"STRING",value:function(){return this.getToken(Zt.STRING,0)}},{key:"MULTILINESTRING",value:function(){return this.getToken(Zt.MULTILINESTRING,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterString(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitString(this)}}])}(K.ParserRuleContext),Ne=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_signed_number,i}return Ht(e,t),Ut(e,[{key:"number",value:function(){return this.getTypedRuleContext(Le,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterSigned_number(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitSigned_number(this)}}])}(K.ParserRuleContext),Ce=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_operator_,i}return Ht(e,t),Ut(e,[{key:"STAR",value:function(){return this.getToken(Zt.STAR,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterOperator_(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitOperator_(this)}}])}(K.ParserRuleContext),Le=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"NATURAL_NUMBER",(function(t){return void 0===t&&(t=null),null===t?this.getTokens(Zt.NATURAL_NUMBER):this.getToken(Zt.NATURAL_NUMBER,t)})),i.parser=t,i.ruleIndex=Zt.RULE_number,i}return Ht(e,t),Ut(e,[{key:"DOT",value:function(){return this.getToken(Zt.DOT,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterNumber(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitNumber(this)}}])}(K.ParserRuleContext);function Re(t){return Re="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},Re(t)}function Pe(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=[];var i=new Et(this.pluginData),o=null!=t&&t.path&&0!==t.path.length?"".concat(t.path,"/"):"",s=new RegExp("^".concat(o,"[^/]+\\.tf$"));n.filter((function(t){var e=t.path;return s.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}});i.currentFile=t;var o=new K.InputStream(t.content),s=new Dt(o),a=new K.CommonTokenStream(s),c=new Zt(a);c.buildParseTrees=!0;var u=c.file_();K.tree.ParseTreeWalker.DEFAULT.walk(i,u),e.pluginData.emitEvent({id:n,status:"success"})}))}}])}(t.DefaultParser);const Ue=Fe;var ze=n(326),Ve=n.n(ze);const Ke={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 He(t){return He="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},He(t)}function qe(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 Je=Ze,Qe={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 tn(t){return tn="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},tn(t)}function en(t,e,n){return e=rn(e),function(t,e){if(e&&("object"==tn(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,nn()?Reflect.construct(e,n||[],rn(t).constructor):e.apply(t,n))}function nn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(nn=function(){return!!t})()}function rn(t){return rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rn(t)}function on(t,e){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},on(t,e)}var sn=function(e){function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),en(this,n,[{editor:{syntax:Qe},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"}])}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&&on(t,e)}(n,e),function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}(n)}(t.DefaultConfiguration);const an=sn;function cn(t){return cn="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},cn(t)}function un(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 an,r=new gn(n,{name:Un.UU,version:Un.rE},t.event);return Vn(this,e,[{pluginData:r,pluginDrawer:new Fn(r),pluginMetadata:new B(r),pluginParser:new Ue(r),pluginRenderer:new Je(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&&qn(t,e)}(e,t),function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(t.DefaultPlugin);const Gn=Wn})();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 5622d4b..44b31bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "terrator-plugin", - "version": "0.9.0", + "version": "0.10.0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index baf308b..c892e08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "terrator-plugin", - "version": "0.9.0", + "version": "0.10.0", "description": "Terraform plugin for Leto-Modelizer.", "main": "dist/terrator-plugin.js", "exports": "./dist/terrator-plugin.js",