From 25d41328aeb78b861b06d8a7ff9b0fe4722472ef Mon Sep 17 00:00:00 2001 From: Jerome Simeon Date: Fri, 23 Apr 2021 14:02:25 -0400 Subject: [PATCH 1/2] chore(doc) Add missing JSDoc for utcOffset option Signed-off-by: Jerome Simeon --- packages/concerto-core/api.txt | 4 ++-- packages/concerto-core/changelog.txt | 4 ++-- packages/concerto-core/lib/modelloader.js | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/concerto-core/api.txt b/packages/concerto-core/api.txt index c841f3f7fa..a45325e90f 100644 --- a/packages/concerto-core/api.txt +++ b/packages/concerto-core/api.txt @@ -191,8 +191,8 @@ class ValidatedResource extends Resource { + void validate() throws Error } class ModelLoader { - + object loadModelManager(string[],object,boolean) - + object loadModelManagerFromModelFiles(object[],undefined,object,boolean) + + object loadModelManager(string[],object,boolean,number) + + object loadModelManagerFromModelFiles(object[],undefined,object,boolean,number) } class ModelManager { + void constructor(object) diff --git a/packages/concerto-core/changelog.txt b/packages/concerto-core/changelog.txt index 1620c082a4..06d8757898 100644 --- a/packages/concerto-core/changelog.txt +++ b/packages/concerto-core/changelog.txt @@ -24,8 +24,8 @@ # Note that the latest public API is documented using JSDocs and is available in api.txt. # -Version 1.0.0-alpha.8 {63957095b410cd581a8b1896659ad170} 2021-04-22 -- Add datetimeutil +Version 1.0.0-alpha.8 {e282ac1f06ae25ddd4f644bba3d133b4} 2021-04-22 +- Add datetimeutil & Consolidate UTC offset support Version 1.0.0-alpha.7 {e791f955bbe9bdac6bcd8944d6111e1a} 2021-04-17 - Remove unused systemtime options in modelfile API diff --git a/packages/concerto-core/lib/modelloader.js b/packages/concerto-core/lib/modelloader.js index 58794632f3..8df4399410 100644 --- a/packages/concerto-core/lib/modelloader.js +++ b/packages/concerto-core/lib/modelloader.js @@ -58,6 +58,7 @@ class ModelLoader { * @param {string[]} ctoFiles - the CTO files (can be local file paths or URLs) * @param {object} options - optional parameters * @param {boolean} [options.offline] - do not resolve external models + * @param {number} [options.utcOffset] - UTC Offset for this execution * @return {object} the model manager */ static async loadModelManager(ctoFiles, options = { offline: false }) { @@ -86,6 +87,7 @@ class ModelLoader { * @param {string[]} [fileNames] - An optional array of file names to associate with the model files * @param {object} options - optional parameters * @param {boolean} [options.offline] - do not resolve external models + * @param {number} [options.utcOffset] - UTC Offset for this execution * @return {object} the model manager */ static async loadModelManagerFromModelFiles(modelFiles, fileNames, options = { offline: false }) { From 55267262c5414efeda5badbb6ed17fd16c68af62 Mon Sep 17 00:00:00 2001 From: Jerome Simeon Date: Fri, 23 Apr 2021 14:44:39 -0400 Subject: [PATCH 2/2] fix(core) Replace Concerto.instanceOf by ModelManager.derivesFrom Signed-off-by: Jerome Simeon --- packages/concerto-core/api.txt | 2 +- packages/concerto-core/changelog.txt | 5 +- packages/concerto-core/lib/concerto.js | 25 --------- packages/concerto-core/lib/modelmanager.js | 19 +++++++ packages/concerto-core/test/concerto.js | 60 --------------------- packages/concerto-core/test/modelmanager.js | 40 ++++++++++++++ packages/concerto-core/umd/concerto.js | 51 ++++++++++++++++++ 7 files changed, 114 insertions(+), 88 deletions(-) create mode 100644 packages/concerto-core/umd/concerto.js diff --git a/packages/concerto-core/api.txt b/packages/concerto-core/api.txt index a45325e90f..f59eb0d476 100644 --- a/packages/concerto-core/api.txt +++ b/packages/concerto-core/api.txt @@ -22,7 +22,6 @@ class Concerto { + void fromURI(string) throws Error + string getType() + string getNamespace() - + boolean instanceOf(String) } + object setCurrentTime() class Factory { @@ -217,6 +216,7 @@ class ModelManager { + Serializer getSerializer() + DecoratorFactory[] getDecoratorFactories() + void addDecoratorFactory(DecoratorFactory) + + boolean derivesFrom(String,String) + boolean hasInstance(object) } class SecurityException extends BaseException { diff --git a/packages/concerto-core/changelog.txt b/packages/concerto-core/changelog.txt index 06d8757898..94822fcb79 100644 --- a/packages/concerto-core/changelog.txt +++ b/packages/concerto-core/changelog.txt @@ -24,10 +24,11 @@ # Note that the latest public API is documented using JSDocs and is available in api.txt. # -Version 1.0.0-alpha.8 {e282ac1f06ae25ddd4f644bba3d133b4} 2021-04-22 +Version 1.0.0-alpha.8 {08b0c809336354e7d1b17a2e44fca8b0} 2021-04-22 - Add datetimeutil & Consolidate UTC offset support +- Delete Concerto.instanceOf replace by ModelManager.derivesFrom -Version 1.0.0-alpha.7 {e791f955bbe9bdac6bcd8944d6111e1a} 2021-04-17 +Version 1.0.0-alpha.7 {aec0f0d4e25be4dab03d6b94be60767b} 2021-04-17 - Remove unused systemtime options in modelfile API - Fixes to the validation option targeting the ergo ES6 runtime diff --git a/packages/concerto-core/lib/concerto.js b/packages/concerto-core/lib/concerto.js index e6d3a274ba..50d6311e70 100644 --- a/packages/concerto-core/lib/concerto.js +++ b/packages/concerto-core/lib/concerto.js @@ -205,31 +205,6 @@ class Concerto { getNamespace(obj) { return this.getTypeDeclaration(obj).getNamespace(); } - - /** - * Check to see if this instance is an instance of the specified fully qualified - * type name. - * @param {*} obj the input object - * @param {String} fqt The fully qualified type name. - * @returns {boolean} True if this instance is an instance of the specified fully - * qualified type name, false otherwise. - */ - instanceOf(obj, fqt) { - // Check to see if this is an exact instance of the specified type. - const classDeclaration = this.getTypeDeclaration(obj); - if (classDeclaration.getFullyQualifiedName() === fqt) { - return true; - } - // Now walk the class hierachy looking to see if it's an instance of the specified type. - let superTypeDeclaration = classDeclaration.getSuperTypeDeclaration(); - while (superTypeDeclaration) { - if (superTypeDeclaration.getFullyQualifiedName() === fqt) { - return true; - } - superTypeDeclaration = superTypeDeclaration.getSuperTypeDeclaration(); - } - return false; - } } module.exports = Concerto; diff --git a/packages/concerto-core/lib/modelmanager.js b/packages/concerto-core/lib/modelmanager.js index 6116886e5b..c89adbfab0 100644 --- a/packages/concerto-core/lib/modelmanager.js +++ b/packages/concerto-core/lib/modelmanager.js @@ -603,6 +603,25 @@ abstract concept Event {} this.decoratorFactories.push(factory); } + /** + * Checks if this fully qualified type name is derived from another. + * @param {String} fqt1 The fully qualified type name to check. + * @param {String} fqt2 The fully qualified type name it is may be derived from. + * @returns {boolean} True if this instance is an instance of the specified fully + * qualified type name, false otherwise. + */ + derivesFrom(fqt1, fqt2) { + // Check to see if this is an exact instance of the specified type. + let typeDeclaration = this.getType(fqt1); + while (typeDeclaration) { + if (typeDeclaration.getFullyQualifiedName() === fqt2) { + return true; + } + typeDeclaration = typeDeclaration.getSuperTypeDeclaration(); + } + return false; + } + /** * Alternative instanceof that is reliable across different module instances * @see https://github.com/hyperledger/composer-concerto/issues/47 diff --git a/packages/concerto-core/test/concerto.js b/packages/concerto-core/test/concerto.js index bd6d474b2d..f7cb14a7ad 100644 --- a/packages/concerto-core/test/concerto.js +++ b/packages/concerto-core/test/concerto.js @@ -17,7 +17,6 @@ const fs = require('fs'); const chai = require('chai'); -const expect = chai.expect; // eslint-disable-next-line no-unused-vars const should = chai.should(); chai.use(require('chai-things')); @@ -229,65 +228,6 @@ describe('concerto', () => { }); }); - describe('#instanceOf', () => { - - it('should get instanceOf for sub type', () => { - const obj = { - $class : 'org.accordproject.test.Customer', - ssn: '123456789', - customerId: '001', - name: 'Dan Selman' - }; - - const result = concerto.instanceOf(obj, 'org.accordproject.test.Person'); - result.should.be.true; - }); - - it('should get instanceOf for sub-sub type', () => { - const obj = { - $class : 'org.accordproject.test.Manager', - ssn: '123456789', - customerId: '001', - name: 'Dan Selman' - }; - - const result = concerto.instanceOf(obj, 'org.accordproject.test.Person'); - result.should.be.true; - }); - - it('should get instanceOf for type', () => { - const obj = { - $class : 'org.accordproject.test.Customer', - ssn: '123456789', - customerId: '001', - name: 'Dan Selman' - }; - - const result = concerto.instanceOf(obj, 'org.accordproject.test.Customer'); - result.should.be.true; - }); - - it('should not get instanceOf for derived type', () => { - const obj = { - $class : 'org.accordproject.test.Person', - ssn: '123456789' - }; - - const result = concerto.instanceOf(obj, 'org.accordproject.test.Customer'); - expect(result).to.be.false; - }); - - it('all types should be an instance of concerto.Concept', () => { - const obj = { - $class : 'org.accordproject.test.Person', - ssn: '123456789' - }; - - const result = concerto.instanceOf(obj, 'concerto.Concept'); - expect(result).to.be.true; - }); - }); - describe('#validate', () => { it('should validate data that conforms to model', () => { diff --git a/packages/concerto-core/test/modelmanager.js b/packages/concerto-core/test/modelmanager.js index 3f6f0d36d4..b461a0a26a 100644 --- a/packages/concerto-core/test/modelmanager.js +++ b/packages/concerto-core/test/modelmanager.js @@ -45,6 +45,7 @@ describe('ModelManager', () => { let composerModel = fs.readFileSync('./test/data/model/composer.cto', 'utf8'); let invalidModel = fs.readFileSync('./test/data/model/invalid.cto', 'utf8'); let invalidModel2 = fs.readFileSync('./test/data/model/invalid2.cto', 'utf8'); + let concertoModel = fs.readFileSync('./test/data/model/concerto.cto', 'utf8'); let modelManager; let sandbox; @@ -958,4 +959,43 @@ concept Bar { }); }); + describe('#derivesFrom', () => { + + it('should get derivesFrom for sub type', () => { + modelManager.addModelFile(concertoModel); + const result = modelManager.derivesFrom('org.accordproject.test.Customer', 'org.accordproject.test.Person'); + result.should.be.true; + }); + + it('should get derivesFrom for sub-sub type', () => { + modelManager.addModelFile(concertoModel); + const result = modelManager.derivesFrom('org.accordproject.test.Manager', 'org.accordproject.test.Person'); + result.should.be.true; + }); + + it('should get derivesFrom for type', () => { + modelManager.addModelFile(concertoModel); + const result = modelManager.derivesFrom('org.accordproject.test.Customer', 'org.accordproject.test.Customer'); + result.should.be.true; + }); + + it('should not get derivesFrom for derived type', () => { + modelManager.addModelFile(concertoModel); + const result = modelManager.derivesFrom('org.accordproject.test.Person', 'org.accordproject.test.Customer'); + result.should.be.false; + }); + + it('should be an instance of concerto.Participant', () => { + modelManager.addModelFile(concertoModel); + const result = modelManager.derivesFrom('org.accordproject.test.Person', 'concerto.Participant'); + result.should.be.true; + }); + + it('all types should be an instance of concerto.Concept', () => { + modelManager.addModelFile(concertoModel); + const result = modelManager.derivesFrom('org.accordproject.test.Person', 'concerto.Concept'); + result.should.be.true; + }); + }); + }); diff --git a/packages/concerto-core/umd/concerto.js b/packages/concerto-core/umd/concerto.js new file mode 100644 index 0000000000..90a43378dd --- /dev/null +++ b/packages/concerto-core/umd/concerto.js @@ -0,0 +1,51 @@ +/*! + * Concerto v0.82.12-20210119205342 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("concerto",[],t):"object"==typeof exports?exports.concerto=t():e.concerto=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=62)}([function(e,t,r){"use strict";const n=r(2);class i{static getShortName(e){let t=e,r=e.lastIndexOf(".");return r>-1&&(t=e.substr(r+1)),t}static isWildcardName(e){return"*"===i.getShortName(e)}static isRecursiveWildcardName(e){return"**"===i.getShortName(e)}static isMatchingType(e,t){if(e.instanceOf(t))return!0;let r=i.getNamespace(t),n=e.getNamespace();if(i.isWildcardName(t)&&n===r);else if(i.isRecursiveWildcardName(t)&&(n+".").startsWith(r+"."));else if(!i.isRecursiveWildcardName(t)||r)return!1;return!0}static getNamespace(e){if(!e)throw new Error(n.formatMessage("modelutil-getnamespace-nofnq"));let t="",r=e.lastIndexOf(".");return r>-1&&(t=e.substr(0,r)),t}static isPrimitiveType(e){return["Boolean","String","DateTime","Double","Integer","Long"].indexOf(e)>=0}static isAssignableTo(e,t,r){const n=r.getFullyQualifiedTypeName(),o=t===n;if(o||i.isPrimitiveType(t)||i.isPrimitiveType(n))return o;const s=e.getType(t);if(!s)throw new Error("Cannot find type "+t);return s.getAllSuperTypeDeclarations().some(e=>e.getFullyQualifiedName()===n)}static capitalizeFirstLetter(e){return e.charAt(0).toUpperCase()+e.slice(1)}static isEnum(e){const t=e.getParent().getModelFile().getType(e.getType());return null!==t&&t.isEnum()}static getFullyQualifiedName(e,t){return e?`${e}.${t}`:t}}e.exports=i},function(e,t,r){"use strict";var n=r(52),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var r=0,n=e.length;r{const t=e.getSuperType();if(t){const r=n.get(t)||new Set;r.add(e),n.set(t,r)}});const i=t=>{t.forEach(t=>{e.add(t);const r=t.getFullyQualifiedName(),o=n.get(r);o&&i(o)})};return i([this]),Array.from(e)}getAllSuperTypeDeclarations(){const e=[];for(let t=this;t=t.getSuperTypeDeclaration();)e.push(t);return e}getProperty(e){let t=this.getOwnProperty(e),r=null;if(null===t&&null!==this.superType){if(this.getModelFile().isImportedType(this.superType)){let e=this.getModelFile().resolveImport(this.superType);r=this.modelFile.getModelManager().getType(e)}else r=this.getModelFile().getType(this.superType);t=r.getProperty(e)}return t}getProperties(){let e=this.getOwnProperties(),t=null;if(null!==this.superType){if(this.getModelFile().isImportedType(this.superType)){let e=this.getModelFile().resolveImport(this.superType);t=this.modelFile.getModelManager().getType(e)}else t=this.getModelFile().getType(this.superType);if(!t)throw new a("Could not find super type "+this.superType,this.modelFile,this.ast.location);e=e.concat(t.getProperties())}return e}getNestedProperty(e){const t=e.split(".");let r=this,n=null;for(let i=0;i1)for(var r=1;r=t?e:""+Array(t+1-n.length).join(r)+e},d={s:f,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),i=r%60;return(t<=0?"+":"-")+f(n,2,"0")+":"+f(i,2,"0")},m:function e(t,r){if(t.date(){if(this.imports.push(e.namespace),this.importShortNames.set(p.getShortName(e.namespace),e.namespace),p.isWildcardName(e.namespace)){const t=p.getNamespace(e.namespace);this.importWildcardNamespaces.push(t)}e.uri&&(this.importUriMap[e.namespace]=e.uri)});for(let e=0;e{const t=p.getNamespace(e),r=this.getModelManager().getModelFile(t);if(!r){let t=f.messageFormatter("modelmanager-gettype-noregisteredns");throw new l(t({type:e}),this)}if(p.isWildcardName(e))return;const n=p.getShortName(e);if(!r.isLocalType(n)){let e=f.messageFormatter("modelmanager-gettype-notypeinns");throw new l(e({type:n,namespace:t}),this)}});for(let e=0;e{"%%"!==e&&(n++,"%c"===e&&(i=n))}),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==n&&"env"in n&&(e=Object({NODE_ENV:"production"}).DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=r(69)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,r(5))},function(e,t,r){"use strict";const n=r(39),i=r(20);e.exports=class extends i{constructor(e,t,r,n,i){super(e,t,r,n),this.$identifier=i}getIdentifier(){return this.$identifier}setIdentifier(e){this.$identifier=e;this[this.$modelManager.getModelFile(this.getNamespace()).getType(this.getFullyQualifiedType()).getIdentifierFieldName()]=e}getFullyQualifiedIdentifier(){return this.getFullyQualifiedType()+"#"+this.$identifier}toString(){return"Identifiable {id="+this.getFullyQualifiedIdentifier()+"}"}isRelationship(){return!1}isResource(){return!1}toURI(){return new n(this.getNamespace(),this.getType(),this.getIdentifier()).toURI()}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";const n=r(10);e.exports=class extends n{constructor(e,t){super(e,t)}}},function(e,t,r){"use strict";const n=r(114),i=r(51),o=r(139);e.exports=class extends n{constructor(e){super();const t=new i(e),r=new o(e);this.addModelFileLoader(r),this.addModelFileLoader(t)}}},function(e,t,r){"use strict";const n=r(15);class i extends n{constructor(e,t){super(e,t),this._isAssetDeclaration=!0}static[Symbol.hasInstance](e){return null!=e&&Boolean(e._isAssetDeclaration)}}e.exports=i},function(e,t,r){"use strict";const n=r(64),i=r(9);e.exports=class{constructor(e,t){if(!e)throw new Error("modelFile not specified");if(!t)throw new Error("ast not specified");this.modelFile=e,this.ast=t}getModelFile(){return this.modelFile}accept(e,t){return e.visit(this,t)}process(){if(this.decorators=[],this.ast.decorators)for(let e=0;e=8",npm:">=5"},main:"index.js",typings:"types/index.d.ts",scripts:{prepublishOnly:"webpack --config webpack.config.js --mode production",prepare:"pegjs ./lib/introspect/parser.pegjs",pretest:"npm run lint",lint:"eslint .",postlint:"npm run licchk",licchk:"license-check-and-add",postlicchk:"npm run doc",doc:"jsdoc --pedantic --recurse -c jsdoc.json",test:"node ./scripts/api-changelog.js && nyc mocha --recursive -t 10000","test:watch":"nyc mocha --watch --recursive -t 10000",mocha:"mocha --recursive -t 10000",nyc:"nyc mocha --recursive -t 10000"},repository:{type:"git",url:"https://github.com/accordproject/concerto.git"},keywords:["blockchain","hyperledger","solutions"],author:"accordproject.org",license:"Apache-2.0",devDependencies:{acorn:"5.1.2","babel-preset-env":"1.7.0","babel-preset-latest":"6.24.1",chai:"4.2.0","chai-as-promised":"7.1.1","chai-things":"0.2.0",commander:"2.20.0",doctrine:"3.0.0",eslint:"6.0.1","fs-extra":"8.1.0",jsdoc:"3.6.3",klaw:"3.0.0","license-check-and-add":"2.3.6",mocha:"6.1.4",mockery:"2.1.0",moxios:"0.4.0",nyc:"14.1.1",pegjs:"0.10.0",semver:"6.3.0",sinon:"7.3.2","sinon-chai":"3.3.0","tmp-promise":"2.0.2",webpack:"4.35.2","webpack-cli":"3.3.5",yargs:"13.2.4"},dependencies:{axios:"0.21.1",colors:"1.4.0",dayjs:"1.10.2",debug:"4.1.1",jsome:"2.5.0","lorem-ipsum":"1.0.6",randexp:"0.5.3",slash:"3.0.0",urijs:"1.19.1",uuid:"3.3.2"},"license-check-and-add-config":{folder:"./lib",license:"HEADER",exact_paths_method:"EXCLUDE",exact_paths:["api.txt","composer-logs","coverage","index.d.ts","./system","./introspect/parser.js","LICENSE","node_modules",".nyc-output","out",".tern-project"],file_type_method:"EXCLUDE",file_types:[".yml",".yaml",".zip",".tgz"],insert_license:!1,license_formats:{"js|njk|pegjs|cto|acl|qry":{prepend:"/*",append:" */",eachLine:{prepend:" * "}},"npmrc|editorconfig|txt":{eachLine:{prepend:"# "}},md:{file:"HEADER.md"}}},nyc:{"produce-source-map":"true",sourceMap:"inline",reporter:["lcov","text-summary","html","json"],include:["lib/**/*.js"],exclude:["lib/codegen/parsejs.js","lib/codegen/javascriptparser.js","lib/introspect/parser.js"],all:!0,"check-coverage":!0,statements:99,branches:98,functions:99,lines:98}}},function(e,t,r){"use strict";const n=r(16);class i extends n{constructor(e,t){super(e,t),this._isEnumValueDeclaration=!0}validate(e){super.validate(e)}static[Symbol.hasInstance](e){return null!=e&&Boolean(e._isEnumValueDeclaration)}}e.exports=i},function(e,t,r){"use strict";e.exports=class{constructor(e,t){this.validator=t,this.field=e}reportError(e,t){throw new Error("Validator error for field "+e+" "+this.getField().getFullyQualifiedName()+": "+t)}accept(e,t){return e.visit(this,t)}getField(){return this.field}validate(e,t){}}},function(e,t,r){"use strict";e.exports=class{constructor(e){this.modelManager=e}accept(e,t){return e.visit(this,t)}getClassDeclarations(){let e=[];const t=this.modelManager.getModelFiles();for(let r=0;r[{type:n.RANGE,from:48,to:57}],o=()=>[{type:n.CHAR,value:95},{type:n.RANGE,from:97,to:122},{type:n.RANGE,from:65,to:90}].concat(i()),s=()=>[{type:n.CHAR,value:9},{type:n.CHAR,value:10},{type:n.CHAR,value:11},{type:n.CHAR,value:12},{type:n.CHAR,value:13},{type:n.CHAR,value:32},{type:n.CHAR,value:160},{type:n.CHAR,value:5760},{type:n.RANGE,from:8192,to:8202},{type:n.CHAR,value:8232},{type:n.CHAR,value:8233},{type:n.CHAR,value:8239},{type:n.CHAR,value:8287},{type:n.CHAR,value:12288},{type:n.CHAR,value:65279}];t.words=()=>({type:n.SET,set:o(),not:!1}),t.notWords=()=>({type:n.SET,set:o(),not:!0}),t.ints=()=>({type:n.SET,set:i(),not:!1}),t.notInts=()=>({type:n.SET,set:i(),not:!0}),t.whitespace=()=>({type:n.SET,set:s(),not:!1}),t.notWhitespace=()=>({type:n.SET,set:s(),not:!0}),t.anyChar=()=>({type:n.SET,set:[{type:n.CHAR,value:10},{type:n.CHAR,value:13},{type:n.CHAR,value:8232},{type:n.CHAR,value:8233}],not:!0})},function(e,t,r){"use strict";const n=r(3),i=r(4),o=r(6),s=r(7),a=r(19),u=r(13),c=r(26),l=r(11),h=r(0),p=r(28),f=r(2),d=r(8);class g{constructor(e){this.options=e||{}}visit(e,t){return e instanceof s?this.visitEnumDeclaration(e,t):e instanceof n?this.visitClassDeclaration(e,t):e instanceof o?this.visitRelationshipDeclaration(e,t):e instanceof i?this.visitField(e,t):void 0}visitEnumDeclaration(e,t){const r=t.stack.pop(),n=e.getProperties();let i=!1;for(let e=0;e=1,n=arguments.length>=2;if(!(this instanceof o))return r?n?new o(e,t):new o(e):new o;if(void 0===e){if(r)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&r)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}o.version="1.19.1";var s=o.prototype,a=Object.prototype.hasOwnProperty;function u(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function c(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function l(e){return"Array"===c(e)}function h(e,t){var r,n,i={};if("RegExp"===c(t))i=null;else if(l(t))for(r=0,n=t.length;r]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,o.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},o.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},o.hostProtocols=["http","https"],o.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,o.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},o.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return o.domAttributes[t]}},o.encode=m,o.decode=decodeURIComponent,o.iso8859=function(){o.encode=escape,o.decode=unescape},o.unicode=function(){o.encode=m,o.decode=decodeURIComponent},o.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},o.encodeQuery=function(e,t){var r=o.encode(e+"");return void 0===t&&(t=o.escapeQuerySpace),t?r.replace(/%20/g,"+"):r},o.decodeQuery=function(e,t){e+="",void 0===t&&(t=o.escapeQuerySpace);try{return o.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var y,v={encode:"encode",decode:"decode"},A=function(e,t){return function(r){try{return o[t](r+"").replace(o.characters[e][t].expression,(function(r){return o.characters[e][t].map[r]}))}catch(e){return r}}};for(y in v)o[y+"PathSegment"]=A("pathname",v[y]),o[y+"UrnPathSegment"]=A("urnpath",v[y]);var b=function(e,t,r){return function(n){var i;i=r?function(e){return o[t](o[r](e))}:o[t];for(var s=(n+"").split(e),a=0,u=s.length;a-1&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),(r=e.indexOf("?"))>-1&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),"//"===e.substring(0,2)?(t.protocol=null,e=e.substring(2),e=o.parseAuthority(e,t)):(r=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(o.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3)?(e=e.substring(r+3),e=o.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)),t.path=e,t},o.parseHost=function(e,t){e||(e="");var r,n,i=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===i&&(i=e.length),"["===e.charAt(0))r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,i)||null,"/"===t.port&&(t.port=null);else{var s=e.indexOf(":"),a=e.indexOf("/"),u=e.indexOf(":",s+1);-1!==u&&(-1===a||u-1?n:e.length-1);return i>-1&&(-1===n||i-1?f.slice(0,d)+f.slice(d).replace(s,""):f.replace(s,"")).length<=c[0].length||r.ignore&&r.ignore.test(f))){var y=t(f,l,p=l+f.length,e);void 0!==y?(y=String(y),e=e.slice(0,l)+y+e.slice(p),n.lastIndex=l+y.length):n.lastIndex=p}}return n.lastIndex=0,e},o.ensureValidHostname=function(t,r){var n=!!t,i=!1;if(!!r&&(i=p(o.hostProtocols,r)),i&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(t&&t.match(o.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(o.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},o.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},o.noConflict=function(e){if(e){var t={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}return n.URI===this&&(n.URI=i),this},s.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=o.build(this._parts),this._deferred_build=!1),this},s.clone=function(){return new o(this)},s.valueOf=s.toString=function(){return this.build(!1)._string},s.protocol=C("protocol"),s.username=C("username"),s.password=C("password"),s.hostname=C("hostname"),s.port=C("port"),s.query=F("query","?"),s.fragment=F("fragment","#"),s.search=function(e,t){var r=this.query(e,t);return"string"==typeof r&&r.length?"?"+r:r},s.hash=function(e,t){var r=this.fragment(e,t);return"string"==typeof r&&r.length?"#"+r:r},s.pathname=function(e,t){if(void 0===e||!0===e){var r=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?o.decodeUrnPath:o.decodePath)(r):r}return this._parts.urn?this._parts.path=e?o.recodeUrnPath(e):"":this._parts.path=e?o.recodePath(e):"/",this.build(!t),this},s.path=s.pathname,s.href=function(e,t){var r;if(void 0===e)return this.toString();this._string="",this._parts=o._parts();var n=e instanceof o,i="object"==typeof e&&(e.hostname||e.path||e.pathname);e.nodeName&&(e=e[o.getDomAttribute(e)]||"",i=!1);if(!n&&i&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=o.parse(String(e),this._parts);else{if(!n&&!i)throw new TypeError("invalid input");var s=n?e._parts:e;for(r in s)"query"!==r&&a.call(this._parts,r)&&(this._parts[r]=s[r]);s.query&&this.query(s.query,!1)}return this.build(!t),this},s.is=function(e){var t=!1,n=!1,i=!1,s=!1,a=!1,u=!1,c=!1,l=!this._parts.urn;switch(this._parts.hostname&&(l=!1,n=o.ip4_expression.test(this._parts.hostname),i=o.ip6_expression.test(this._parts.hostname),a=(s=!(t=n||i))&&r&&r.has(this._parts.hostname),u=s&&o.idn_expression.test(this._parts.hostname),c=s&&o.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return l;case"absolute":return!l;case"domain":case"name":return s;case"sld":return a;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return i;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var E=s.protocol,w=s.port,D=s.hostname;s.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(o.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return E.call(this,e,t)},s.scheme=s.protocol,s.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),o.ensureValidPort(e))),w.call(this,e,t))},s.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==o.parseHost(e,r))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&o.ensureValidHostname(e,this._parts.protocol)}return D.call(this,e,t)},s.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=o(e);return this.protocol(n.protocol()).authority(n.authority()).build(!t),this},s.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?o.buildHost(this._parts):"";if("/"!==o.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},s.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?o.buildAuthority(this._parts):"";if("/"!==o.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},s.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=o.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==e[e.length-1]&&(e+="@"),o.parseUserinfo(e,this._parts),this.build(!t),this},s.resource=function(e,t){var r;return void 0===e?this.path()+this.search()+this.hash():(r=o.parse(e),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!t),this)},s.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,i=this._parts.hostname.substring(0,n),s=new RegExp("^"+u(i));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&o.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(s,e),this.build(!t),this},s.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(t).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(o.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var i=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(i,e)}return this.build(!t),this},s.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(n+1);return!0!==t&&r&&r.list[i.toLowerCase()]&&r.get(this._parts.hostname)||i}var o;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');o=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");o=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},s.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?o.decodePath(n):n}var i=this._parts.path.length-this.filename().length,s=this._parts.path.substring(0,i),a=new RegExp("^"+u(s));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=o.recodePath(e),this._parts.path=this._parts.path.replace(a,e),this.build(!t),this},s.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return e?o.decodePathSegment(n):n}var i=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(i=!0);var s=new RegExp(u(this.filename())+"$");return e=o.recodePath(e),this._parts.path=this._parts.path.replace(s,e),i?this.normalizePath(t):this.build(!t),this},s.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,i=this.filename(),s=i.lastIndexOf(".");return-1===s?"":(r=i.substring(s+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",e?o.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var a,c=this.suffix();if(c)a=e?new RegExp(u(c)+"$"):new RegExp(u("."+c)+"$");else{if(!e)return this;this._parts.path+="."+o.recodePath(e)}return a&&(e=o.recodePath(e),this._parts.path=this._parts.path.replace(a,e)),this.build(!t),this},s.segment=function(e,t,r){var n=this._parts.urn?":":"/",i=this.path(),o="/"===i.substring(0,1),s=i.split(n);if(void 0!==e&&"number"!=typeof e&&(r=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(o&&s.shift(),e<0&&(e=Math.max(s.length+e,0)),void 0===t)return void 0===e?s:s[e];if(null===e||void 0===s[e])if(l(t)){s=[];for(var a=0,u=t.length;a= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,d=String.fromCharCode;function g(e){throw new RangeError(p[e])}function m(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function y(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+m((e=e.replace(h,".")).split("."),t).join(".")}function v(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=d((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=d(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function C(e,t,r){var n=0;for(e=r?f(e/700):e>>1,e+=f(e/t);e>455;n+=36)e=f(e/35);return f(n+36*e/(e+38))}function F(e){var t,r,n,i,o,s,a,c,l,h,p,d=[],m=e.length,y=0,v=128,b=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&g("not-basic"),d.push(e.charCodeAt(n));for(i=r>0?r+1:0;i=m&&g("invalid-input"),((c=(p=e.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:36)>=36||c>f((u-y)/s))&&g("overflow"),y+=c*s,!(c<(l=a<=b?1:a>=b+26?26:a-b));a+=36)s>f(u/(h=36-l))&&g("overflow"),s*=h;b=C(y-o,t=d.length+1,0==o),f(y/t)>u-v&&g("overflow"),v+=f(y/t),y%=t,d.splice(y++,0,v)}return A(d)}function E(e){var t,r,n,i,o,s,a,c,l,h,p,m,y,A,F,E=[];for(m=(e=v(e)).length,t=128,r=0,o=72,s=0;s=t&&pf((u-r)/(y=n+1))&&g("overflow"),r+=(a-t)*y,t=a,s=0;su&&g("overflow"),p==t){for(c=r,l=36;!(c<(h=l<=o?1:l>=o+26?26:l-o));l+=36)F=c-h,A=36-h,E.push(d(b(h+F%A,0))),c=f(F/A);E.push(d(b(c,0))),o=C(r,y,n==i),r=0,++n}++r,++t}return E.join("")}a={version:"1.3.2",ucs2:{decode:v,encode:A},decode:F,encode:E,toASCII:function(e){return y(e,(function(e){return l.test(e)?"xn--"+E(e):e}))},toUnicode:function(e){return y(e,(function(e){return c.test(e)?F(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return a}.call(t,r,t,e))||(e.exports=i)}()}).call(this,r(27)(e),r(42))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){var n,i; +/*! + * URI.js - Mutating URLs + * IPv6 Support + * + * Version: 1.19.1 + * + * Author: Rodney Rehm + * Web: http://medialize.github.io/URI.js/ + * + * Licensed under + * MIT License http://www.opensource.org/licenses/mit-license + * + */!function(o,s){"use strict";e.exports?e.exports=s():void 0===(i="function"==typeof(n=s)?n.call(t,r,t,e):n)||(e.exports=i)}(0,(function(e){"use strict";var t=e&&e.IPv6;return{best:function(e){var t,r,n=e.toLowerCase().split(":"),i=n.length,o=8;for(""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[i-1]&&""===n[i-2]&&n.pop(),-1!==n[(i=n.length)-1].indexOf(".")&&(o=7),t=0;t1);a++)r.splice(0,1);n[s]=r.join("")}var u=-1,c=0,l=0,h=-1,p=!1;for(s=0;sc&&(u=h,c=l)):"0"===n[s]&&(p=!0,h=s,l=1);l>c&&(u=h,c=l),c>1&&n.splice(u,c,""),i=n.length;var f="";for(""===n[0]&&(f=":"),s=0;s=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return!1;var i=r.list[e.slice(t+1)];return!!i&&i.indexOf(" "+e.slice(n+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var n=r.list[e.slice(t+1)];return!!n&&n.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return null;var i=r.list[e.slice(t+1)];return i?i.indexOf(" "+e.slice(n+1,t)+" ")<0?null:e.slice(n+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return r}))},function(e,t){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,i=r;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}},function(e,t,r){var n=r(107),i={};for(var o in n)n.hasOwnProperty(o)&&(i[n[o]]=o);var s=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var a in s)if(s.hasOwnProperty(a)){if(!("channels"in s[a]))throw new Error("missing channels property: "+a);if(!("labels"in s[a]))throw new Error("missing channel labels property: "+a);if(s[a].labels.length!==s[a].channels)throw new Error("channel and label counts mismatch: "+a);var u=s[a].channels,c=s[a].labels;delete s[a].channels,delete s[a].labels,Object.defineProperty(s[a],"channels",{value:u}),Object.defineProperty(s[a],"labels",{value:c})}s.rgb.hsl=function(e){var t,r,n=e[0]/255,i=e[1]/255,o=e[2]/255,s=Math.min(n,i,o),a=Math.max(n,i,o),u=a-s;return a===s?t=0:n===a?t=(i-o)/u:i===a?t=2+(o-n)/u:o===a&&(t=4+(n-i)/u),(t=Math.min(60*t,360))<0&&(t+=360),r=(s+a)/2,[t,100*(a===s?0:r<=.5?u/(a+s):u/(2-a-s)),100*r]},s.rgb.hsv=function(e){var t,r,n,i,o,s=e[0]/255,a=e[1]/255,u=e[2]/255,c=Math.max(s,a,u),l=c-Math.min(s,a,u),h=function(e){return(c-e)/6/l+.5};return 0===l?i=o=0:(o=l/c,t=h(s),r=h(a),n=h(u),s===c?i=n-r:a===c?i=1/3+t-n:u===c&&(i=2/3+r-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*o,100*c]},s.rgb.hwb=function(e){var t=e[0],r=e[1],n=e[2];return[s.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(r,n))),100*(n=1-1/255*Math.max(t,Math.max(r,n)))]},s.rgb.cmyk=function(e){var t,r=e[0]/255,n=e[1]/255,i=e[2]/255;return[100*((1-r-(t=Math.min(1-r,1-n,1-i)))/(1-t)||0),100*((1-n-t)/(1-t)||0),100*((1-i-t)/(1-t)||0),100*t]},s.rgb.keyword=function(e){var t=i[e];if(t)return t;var r,o,s,a=1/0;for(var u in n)if(n.hasOwnProperty(u)){var c=n[u],l=(o=e,s=c,Math.pow(o[0]-s[0],2)+Math.pow(o[1]-s[1],2)+Math.pow(o[2]-s[2],2));l.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},s.rgb.lab=function(e){var t=s.rgb.xyz(e),r=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,r=(r/=95.047)>.008856?Math.pow(r,1/3):7.787*r+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(r-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},s.hsl.rgb=function(e){var t,r,n,i,o,s=e[0]/360,a=e[1]/100,u=e[2]/100;if(0===a)return[o=255*u,o,o];t=2*u-(r=u<.5?u*(1+a):u+a-u*a),i=[0,0,0];for(var c=0;c<3;c++)(n=s+1/3*-(c-1))<0&&n++,n>1&&n--,o=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,i[c]=255*o;return i},s.hsl.hsv=function(e){var t=e[0],r=e[1]/100,n=e[2]/100,i=r,o=Math.max(n,.01);return r*=(n*=2)<=1?n:2-n,i*=o<=1?o:2-o,[t,100*(0===n?2*i/(o+i):2*r/(n+r)),100*((n+r)/2)]},s.hsv.rgb=function(e){var t=e[0]/60,r=e[1]/100,n=e[2]/100,i=Math.floor(t)%6,o=t-Math.floor(t),s=255*n*(1-r),a=255*n*(1-r*o),u=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,u,s];case 1:return[a,n,s];case 2:return[s,n,u];case 3:return[s,a,n];case 4:return[u,s,n];case 5:return[n,s,a]}},s.hsv.hsl=function(e){var t,r,n,i=e[0],o=e[1]/100,s=e[2]/100,a=Math.max(s,.01);return n=(2-o)*s,r=o*a,[i,100*(r=(r/=(t=(2-o)*a)<=1?t:2-t)||0),100*(n/=2)]},s.hwb.rgb=function(e){var t,r,n,i,o,s,a,u=e[0]/360,c=e[1]/100,l=e[2]/100,h=c+l;switch(h>1&&(c/=h,l/=h),n=6*u-(t=Math.floor(6*u)),0!=(1&t)&&(n=1-n),i=c+n*((r=1-l)-c),t){default:case 6:case 0:o=r,s=i,a=c;break;case 1:o=i,s=r,a=c;break;case 2:o=c,s=r,a=i;break;case 3:o=c,s=i,a=r;break;case 4:o=i,s=c,a=r;break;case 5:o=r,s=c,a=i}return[255*o,255*s,255*a]},s.cmyk.rgb=function(e){var t=e[0]/100,r=e[1]/100,n=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]},s.xyz.rgb=function(e){var t,r,n,i=e[0]/100,o=e[1]/100,s=e[2]/100;return r=-.9689*i+1.8758*o+.0415*s,n=.0557*i+-.204*o+1.057*s,t=(t=3.2406*i+-1.5372*o+-.4986*s)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,[255*(t=Math.min(Math.max(0,t),1)),255*(r=Math.min(Math.max(0,r),1)),255*(n=Math.min(Math.max(0,n),1))]},s.xyz.lab=function(e){var t=e[0],r=e[1],n=e[2];return r/=100,n/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(t-r),200*(r-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]},s.lab.xyz=function(e){var t,r,n,i=e[0];t=e[1]/500+(r=(i+16)/116),n=r-e[2]/200;var o=Math.pow(r,3),s=Math.pow(t,3),a=Math.pow(n,3);return r=o>.008856?o:(r-16/116)/7.787,t=s>.008856?s:(t-16/116)/7.787,n=a>.008856?a:(n-16/116)/7.787,[t*=95.047,r*=100,n*=108.883]},s.lab.lch=function(e){var t,r=e[0],n=e[1],i=e[2];return(t=360*Math.atan2(i,n)/2/Math.PI)<0&&(t+=360),[r,Math.sqrt(n*n+i*i),t]},s.lch.lab=function(e){var t,r=e[0],n=e[1];return t=e[2]/360*2*Math.PI,[r,n*Math.cos(t),n*Math.sin(t)]},s.rgb.ansi16=function(e){var t=e[0],r=e[1],n=e[2],i=1 in arguments?arguments[1]:s.rgb.hsv(e)[2];if(0===(i=Math.round(i/50)))return 30;var o=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(t/255));return 2===i&&(o+=60),o},s.hsv.ansi16=function(e){return s.rgb.ansi16(s.hsv.rgb(e),e[2])},s.rgb.ansi256=function(e){var t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},s.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},s.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var r;return e-=16,[Math.floor(e/36)/5*255,Math.floor((r=e%36)/6)/5*255,r%6/5*255]},s.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},s.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var r=t[0];3===t[0].length&&(r=r.split("").map((function(e){return e+e})).join(""));var n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},s.rgb.hcg=function(e){var t,r=e[0]/255,n=e[1]/255,i=e[2]/255,o=Math.max(Math.max(r,n),i),s=Math.min(Math.min(r,n),i),a=o-s;return t=a<=0?0:o===r?(n-i)/a%6:o===n?2+(i-r)/a:4+(r-n)/a+4,t/=6,[360*(t%=1),100*a,100*(a<1?s/(1-a):0)]},s.hsl.hcg=function(e){var t=e[1]/100,r=e[2]/100,n=1,i=0;return(n=r<.5?2*t*r:2*t*(1-r))<1&&(i=(r-.5*n)/(1-n)),[e[0],100*n,100*i]},s.hsv.hcg=function(e){var t=e[1]/100,r=e[2]/100,n=t*r,i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},s.hcg.rgb=function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];var i,o=[0,0,0],s=t%1*6,a=s%1,u=1-a;switch(Math.floor(s)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=u,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=u,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=u}return i=(1-r)*n,[255*(r*o[0]+i),255*(r*o[1]+i),255*(r*o[2]+i)]},s.hcg.hsv=function(e){var t=e[1]/100,r=t+e[2]/100*(1-t),n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},s.hcg.hsl=function(e){var t=e[1]/100,r=e[2]/100*(1-t)+.5*t,n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},s.hcg.hwb=function(e){var t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},s.hwb.hcg=function(e){var t=e[1]/100,r=1-e[2]/100,n=r-t,i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},s.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},s.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},s.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},s.gray.hsl=s.gray.hsv=function(e){return[0,0,e[0]]},s.gray.hwb=function(e){return[0,100,e[0]]},s.gray.cmyk=function(e){return[0,0,0,e[0]]},s.gray.lab=function(e){return[e[0],0,0]},s.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},s.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},function(e,t,r){"use strict";const n=r(15);class i extends n{constructor(e,t){super(e,t),this._isParticipantDeclaration=!0}static[Symbol.hasInstance](e){return null!=e&&Boolean(e._isParticipantDeclaration)}}e.exports=i},function(e,t,r){"use strict";const n=r(23);e.exports=class extends n{constructor(e,t,r,n,i){let o=e,s="";r&&(s+=" File "+r),t&&(t.end&&t.start&&t.end.offset&&t.start.offset&&t.end.offset-t.start.offset==1&&(t.end.column=t.start.column,t.end.offset=t.start.offset),s+=s?" line "+t.start.line+" column "+t.start.column:" Line "+t.start.line+" column "+t.start.column),o+=s,super(e,t,n||o,r,i)}}},function(e,t){},function(e,t,r){"use strict";const n=r(115),i=r(22),o=r(133);e.exports=class{constructor(e){this.modelManager=e}accepts(e){return e.startsWith("http://")||e.startsWith("https://")}load(e,t){t||(t={});const r=JSON.parse(JSON.stringify(t));return r.url=e,r.method="get",r.responseType="text",n(r).then(t=>{let r=o.parse(e);const n=(r.host+r.pathname).replace(/\//g,".");return new i(this.modelManager,t.data,"@"+n)})}}},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){u.headers[e]=n.merge(o)})),e.exports=u}).call(this,r(5))},function(e,t,r){"use strict";var n=r(1),i=r(122),o=r(124),s=r(53),a=r(125),u=r(128),c=r(129),l=r(57);e.exports=function(e){return new Promise((function(t,r){var h=e.data,p=e.headers;n.isFormData(h)&&delete p["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var d=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";p.Authorization="Basic "+btoa(d+":"+g)}var m=a(e.baseURL,e.url);if(f.open(e.method.toUpperCase(),s(m,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?u(f.getAllResponseHeaders()):null,o={data:e.responseType&&"text"!==e.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:e,request:f};i(t,r,o),f=null}},f.onabort=function(){f&&(r(l("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){r(l("Network Error",e,null,f)),f=null},f.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(l(t,e,"ECONNABORTED",f)),f=null},n.isStandardBrowserEnv()){var y=(e.withCredentials||c(m))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;y&&(p[e.xsrfHeaderName]=y)}if("setRequestHeader"in f&&n.forEach(p,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete p[t]:f.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),e.responseType)try{f.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){f&&(f.abort(),r(e),f=null)})),h||(h=null),f.send(h)}))}},function(e,t,r){"use strict";var n=r(123);e.exports=function(e,t,r,i,o){var s=new Error(e);return n(s,t,r,i,o)}},function(e,t,r){"use strict";var n=r(1);e.exports=function(e,t){t=t||{};var r={},i=["url","method","data"],o=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function u(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function c(i){n.isUndefined(t[i])?n.isUndefined(e[i])||(r[i]=u(void 0,e[i])):r[i]=u(e[i],t[i])}n.forEach(i,(function(e){n.isUndefined(t[e])||(r[e]=u(void 0,t[e]))})),n.forEach(o,c),n.forEach(s,(function(i){n.isUndefined(t[i])?n.isUndefined(e[i])||(r[i]=u(void 0,e[i])):r[i]=u(void 0,t[i])})),n.forEach(a,(function(n){n in t?r[n]=u(e[n],t[n]):n in e&&(r[n]=u(void 0,e[n]))}));var l=i.concat(o).concat(s).concat(a),h=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===l.indexOf(e)}));return n.forEach(h,c),r}},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){"use strict";const n=r(50),i=r(140),o=r(141),s=r(29),a=r(36),u=r(2),c=r(9),l=r(22),h=r(142),p=r(0),f=r(61),d=r(147),g=r(25)("concerto:ModelManager");class m{constructor(){this.modelFiles={},this.factory=new a(this),this.serializer=new f(this.factory,this),this.decoratorFactories=[],this._isModelManager=!0,this.addRootModel()}addRootModel(){this.addModelFile("namespace concerto\n concept Concept {\n }","concerto.cto")}accept(e,t){return e.visit(this,t)}validateModelFile(e,t){if("string"==typeof e){new l(this,e,t).validate()}else e.validate()}_throwAlreadyExists(e){const t=this.modelFiles[e.getNamespace()].getName(),r=t?" in file "+t:"",n=e.getName()?" specified in file "+e.getName():"";let i=`Namespace ${e.getNamespace()}${n} is already declared${r}`;throw new Error(i)}addModelFile(e,t,r){g("addModelFile","addModelFile",e,t);let n=null;return n="string"==typeof e?new l(this,e,t):e,this.modelFiles[n.getNamespace()]?this._throwAlreadyExists(n):(r||n.validate(),this.modelFiles[n.getNamespace()]=n),n}updateModelFile(e,t,r){if(g("updateModelFile","updateModelFile",e,t),"string"==typeof e){let n=new l(this,e,t);return this.updateModelFile(n,t,r)}if(!this.modelFiles[e.getNamespace()])throw new Error(`Model file for namespace ${e.getNamespace()} not found`);r||e.validate();return this.modelFiles[e.getNamespace()]=e,e}deleteModelFile(e){if(!this.modelFiles[e])throw new Error("Model file does not exist");delete this.modelFiles[e]}addModelFiles(e,t,r){const n="addModelFiles";g(n,"addModelFiles",e,t);const i={};Object.assign(i,this.modelFiles);let o=[];try{for(let r=0;r{if("MISSING_DEPENDENCY"!==e.code)throw e;try{return this.validateModelFiles(),[]}catch(e){const t=this.getModelFileByFileName(e.fileName),r=t.getExternalImports(),n=Object.keys(r).find(t=>e.shortMessage.includes(t)),i=t.getImportURI(n),o=new Error(`Unable to download external model dependency '${i}'`);throw o.code="MISSING_DEPENDENCY",o}}),n={};Object.assign(n,this.modelFiles);try{return r.forEach(e=>{this.modelFiles[e.getNamespace()]?this.updateModelFile(e,e.getName(),!0):this.addModelFile(e,e.getName(),!0)}),this.validateModelFiles(),r}catch(e){throw this.modelFiles={},Object.assign(this.modelFiles,n),e}}writeModelsToFileSystem(e,t={}){if(!e)throw new Error("`path` is a required parameter of writeModelsToFileSystem");const r=Object.assign({includeExternalModels:!0},t);this.getModelFiles().forEach((function(t){if(t.isExternal()&&!r.includeExternalModels)return;const s=o(t.fileName).split("/").pop();n.writeFileSync(e+i.sep+s,t.definitions)}))}getModelFiles(e){let t=Object.keys(this.modelFiles),r=[];for(let n=0;nt.getName()===e)[0]}getNamespaces(){return Object.keys(this.modelFiles)}getType(e){const t=p.getNamespace(e),r=this.getModelFile(t);if(!r){const t=u.messageFormatter("modelmanager-gettype-noregisteredns");throw new d(e,t({type:e}))}const n=r.getType(e);if(!n){const r=u.messageFormatter("modelmanager-gettype-notypeinns");throw new d(e,r({type:p.getShortName(e),namespace:t}))}return n}getAssetDeclarations(e=!0){return this.getModelFiles().reduce((t,r)=>t.concat(r.getAssetDeclarations(e)),[])}getTransactionDeclarations(e=!0){return this.getModelFiles().reduce((t,r)=>t.concat(r.getTransactionDeclarations(e)),[])}getEventDeclarations(e=!0){return this.getModelFiles().reduce((t,r)=>t.concat(r.getEventDeclarations(e)),[])}getParticipantDeclarations(e=!0){return this.getModelFiles().reduce((t,r)=>t.concat(r.getParticipantDeclarations(e)),[])}getEnumDeclarations(e=!0){return this.getModelFiles().reduce((t,r)=>t.concat(r.getEnumDeclarations(e)),[])}getConceptDeclarations(e=!0){return this.getModelFiles().reduce((t,r)=>t.concat(r.getConceptDeclarations(e)),[])}getFactory(){return this.factory}getSerializer(){return this.serializer}getDecoratorFactories(){return this.decoratorFactories}addDecoratorFactory(e){this.decoratorFactories.push(e)}static[Symbol.hasInstance](e){return null!=e&&Boolean(e._isModelManager)}}e.exports=m},function(e,t,r){"use strict";const n=r(17),i=r(24),o=r(7),s=r(2),a=r(145),u=r(146),c=r(20),l=r(38),h=r(21),p=r(14),f={validate:!0,ergo:!1};class d{constructor(e,t){if(!e)throw new Error(s.formatMessage("serializer-constructor-factorynull"));if(!t)throw new Error(s.formatMessage("serializer-constructor-modelmanagernull"));this.factory=e,this.modelManager=t,this.defaultOptions=Object.assign({},f),this._isSerializer=!0}setDefaultOptions(e){this.defaultOptions=Object.assign({},f,e)}toJSON(e,t){if(!(e instanceof c))throw new Error(s.formatMessage("serializer-tojson-notcobject"));const r={};r.stack=new p(e),r.modelManager=this.modelManager,r.seenResources=new Set,r.dedupeResources=new Set;const n=this.modelManager.getType(e.getFullyQualifiedType());if((t=t?Object.assign({},this.defaultOptions,t):this.defaultOptions).validate){const e=new l(t);n.accept(e,r)}const i=new a(!0===t.convertResourcesToRelationships,!0===t.permitResourcesForRelationships,!0===t.deduplicateResources,!0===t.convertResourcesToId,!0===t.ergo);return r.stack.clear(),r.stack.push(e),n.accept(i,r)}fromJSON(e,t){if(!e.$class)throw new Error("Invalid JSON data. Does not contain a $class type identifier.");const r=this.modelManager.getType(e.$class);let s;if(t=t?Object.assign({},this.defaultOptions,t):this.defaultOptions,r instanceof h)s=this.factory.newTransaction(r.getNamespace(),r.getName(),e[r.getIdentifierFieldName()]);else if(r instanceof n)s=this.factory.newEvent(r.getNamespace(),r.getName(),e[r.getIdentifierFieldName()]);else if(r instanceof i)s=this.factory.newConcept(r.getNamespace(),r.getName());else{if(r instanceof o)throw new Error("Attempting to create an ENUM declaration is not supported.");s=this.factory.newResource(r.getNamespace(),r.getName(),e[r.getIdentifierFieldName()])}const a={};a.jsonStack=new p(e),a.resourceStack=new p(s),a.modelManager=this.modelManager,a.factory=this.factory;const c=new u(!0===t.acceptResourcesForRelationships,!0===t.ergo);return r.accept(c,a),t.validate&&s.validate(),s}static[Symbol.hasInstance](e){return null!=e&&Boolean(e._isSerializer)}}e.exports=d},function(e,t,r){e.exports=r(63)},function(e,t,r){"use strict";e.exports.AssetDeclaration=r(30),e.exports.BaseException=r(10),e.exports.BaseFileException=r(23),e.exports.ClassDeclaration=r(3),e.exports.ConceptDeclaration=r(24),e.exports.EnumDeclaration=r(7),e.exports.EnumValueDeclaration=r(33),e.exports.EventDeclaration=r(17),e.exports.Field=r(4),e.exports.Writer=r(68),e.exports.Factory=r(36),e.exports.Globalize=r(2),e.exports.Introspector=r(35),e.exports.Logger=r(84),e.exports.ModelFile=r(22),e.exports.ModelLoader=r(113),e.exports.ModelManager=r(60),e.exports.DefaultModelFileLoader=r(29),e.exports.ParseException=r(49),e.exports.ParticipantDeclaration=r(48),e.exports.Property=r(16),e.exports.Relationship=r(19),e.exports.RelationshipDeclaration=r(6),e.exports.Resource=r(13),e.exports.SecurityException=r(148),e.exports.Serializer=r(61),e.exports.TransactionDeclaration=r(21),e.exports.Typed=r(20),e.exports.TypedStack=r(14),e.exports.ModelUtil=r(0),e.exports.version=r(32),e.exports.Concerto=r(149)},function(e,t,r){"use strict";e.exports=class{constructor(e,t){this.ast=t,this.parent=e,this.arguments=null,this.process()}accept(e,t){return e.visit(this,t)}getParent(){return this.parent}process(){if(this.name=this.ast.name,this.arguments=[],this.ast.arguments)for(let e=0;ethis.upperBound&&this.reportError(null,"Lower bound must be less than or equal to upper bound.")}getLowerBound(){return this.lowerBound}getUpperBound(){return this.upperBound}validate(e,t){null!==t&&(null!==this.lowerBound&&tthis.upperBound&&this.reportError(e,"Value is outside upper bound "+t))}toString(){return"NumberValidator lower: "+this.lowerBound+" upper: "+this.upperBound}}},function(e,t,r){"use strict";const n=r(34);e.exports=class extends n{constructor(e,t){super(e,t);try{this.regex=new RegExp(t.substring(1,t.length-1))}catch(e){this.reportError(e.message)}}validate(e,t){null!==t&&(this.regex.test(t)||this.reportError(e,"Value + '"+t+"' failed to match validation regex: "+this.regex))}getRegex(){return this.regex}}},function(e,t,r){"use strict";e.exports=class{constructor(){this.beforeBuffer="",this.buffer="",this.linesWritten=0}writeBeforeLine(e,t){for(let t=0;t{if("%%"===r)return r;a++;const o=n.formatters[i];if("function"==typeof o){const n=e[a];r=o.call(t,n),e.splice(a,1),a--}return r}),n.formatArgs.call(t,e);(t.log||n.log).apply(t,e)}return s.namespace=e,s.enabled=n.enabled(e),s.useColors=n.useColors(),s.color=t(e),s.destroy=i,s.extend=o,"function"==typeof n.init&&n.init(s),n.instances.push(s),s}function i(){const e=n.instances.indexOf(this);return-1!==e&&(n.instances.splice(e,1),!0)}function o(e,t){const r=n(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},n.disable=function(){const e=[...n.names.map(s),...n.skips.map(s).map(e=>"-"+e)].join(",");return n.enable(""),e},n.enable=function(e){let t;n.save(e),n.names=[],n.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(t=0;t{n[t]=e[t]}),n.instances=[],n.names=[],n.skips=[],n.formatters={},n.selectColor=t,n.enable(n.load()),n}},function(e,t){var r=1e3,n=6e4,i=60*n,o=24*i;function s(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}e.exports=function(e,t){t=t||{};var a=typeof e;if("string"===a&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===a&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return s(e,t,o,"day");if(t>=i)return s(e,t,i,"hour");if(t>=n)return s(e,t,n,"minute");if(t>=r)return s(e,t,r,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=o)return Math.round(e/o)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=n)return Math.round(e/n)+"m";if(t>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){"use strict";const n=r(3),i=r(7),o=r(4),s=r(0),a=r(6),u=r(11),c=r(2);e.exports=class{visit(e,t){if(e instanceof n)return this.visitClassDeclaration(e,t);if(e instanceof a)return this.visitRelationshipDeclaration(e,t);if(e instanceof o)return this.visitField(e,t);throw new Error("Unrecognised "+JSON.stringify(e))}visitClassDeclaration(e,t){const r=t.stack.pop(),n=e.getProperties();for(const e of n){if(!t.includeOptionalFields&&e.isOptional())continue;const n=r[e.getName()];u.isNull(n)&&(r[e.getName()]=e.accept(this,t))}return r}visitField(e,t){if(e.isPrimitive())t.seen.push("Primitve");else{let r=e.getFullyQualifiedTypeName(),n=t.modelManager.getType(r);n=this.findConcreteSubclass(n);let i=n.getFullyQualifiedName();if(t.seen.includes(i)){if(e.isArray())return[];if(e.isOptional())return null;throw new Error("Model is recursive.")}t.seen.push(i)}let r;if(e.isArray()){const n=()=>this.getFieldValue(e,t);r=t.valueGenerator.getArray(n)}else r=this.getFieldValue(e,t);return t.seen.pop(),r}getFieldValue(e,t){let r=e.getFullyQualifiedTypeName();if(s.isPrimitiveType(r))switch(r){case"DateTime":return t.valueGenerator.getDateTime();case"Integer":return e.validator?t.valueGenerator.getRange(e.validator.lowerBound,e.validator.upperBound,r):t.valueGenerator.getInteger();case"Long":return e.validator?t.valueGenerator.getRange(e.validator.lowerBound,e.validator.upperBound,r):t.valueGenerator.getLong();case"Double":return e.validator?t.valueGenerator.getRange(e.validator.lowerBound,e.validator.upperBound,r):t.valueGenerator.getDouble();case"Boolean":return t.valueGenerator.getBoolean();default:return e.validator?t.valueGenerator.getRegex(e.validator.regex):t.valueGenerator.getString()}let n=t.modelManager.getType(r);if(n instanceof i){let e=n.getOwnProperties();return t.valueGenerator.getEnum(e).getName()}if(n=this.findConcreteSubclass(n),n.isConcept()){let e=t.factory.newConcept(n.getNamespace(),n.getName());return t.stack.push(e),n.accept(this,t)}{const e=this.generateRandomId(n);let r=t.factory.newResource(n.getNamespace(),n.getName(),e);return t.stack.push(r),n.accept(this,t)}}findConcreteSubclass(e){if(!e.isAbstract())return e;const t=e.getAssignableClassDeclarations().filter(e=>!e.isAbstract());if(0===t.length){const t=c.messageFormatter("instancegenerator-newinstance-noconcreteclass");throw new Error(t({type:e.getFullyQualifiedName()}))}return t[0]}visitRelationshipDeclaration(e,t){let r=t.modelManager.getType(e.getFullyQualifiedTypeName());r=this.findConcreteSubclass(r);const n=t.factory,i=()=>{const e=this.generateRandomId(r);return n.newRelationship(r.getNamespace(),r.getName(),e)};return e.isArray()?t.valueGenerator.getArray(i):i()}generateRandomId(e){let t=Math.round(9999*Math.random()).toString();return t=t.padStart(4,"0"),t}}},function(e,t,r){"use strict";const n=r(73),i=r(75),o=r(8),s=r(12);o.extend(s);const a=function(e,t,r,n,i){return null===e&&(e=n),e=Math.min(Math.max(e,n),i),(null===t||t>i)&&(t=i),t=Math.max(Math.min(t,i),n),t+=r,t/=r,e/=r,(Math.random()*(t-e)+e)/(1/r)},u=(e,t,r)=>{let n=e,i=t;switch(null!==i&&null!==n&&i",E="

");w.min{var t,r,a=0,u={type:i.ROOT,stack:[]},c=u,l=u.stack,h=[],p=t=>{n.error(e,"Nothing to repeat at column "+(t-1))},f=n.strToChars(e);for(t=f.length;a{for(var o,s,a=[],u=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g;null!=(o=u.exec(e));)if(o[1])a.push(i.words());else if(o[2])a.push(i.ints());else if(o[3])a.push(i.whitespace());else if(o[4])a.push(i.notWords());else if(o[5])a.push(i.notInts());else if(o[6])a.push(i.notWhitespace());else if(o[7])a.push({type:n.RANGE,from:(o[8]||o[9]).charCodeAt(0),to:o[10].charCodeAt(0)});else{if(!(s=o[12]))return[a,u.lastIndex];a.push({type:n.CHAR,value:s.charCodeAt(0)})}t.error(r,"Unterminated character class")},t.error=(e,t)=>{throw new SyntaxError("Invalid regular expression: /"+e+"/: "+t)}},function(e,t,r){const n=r(18);t.wordBoundary=()=>({type:n.POSITION,value:"b"}),t.nonWordBoundary=()=>({type:n.POSITION,value:"B"}),t.begin=()=>({type:n.POSITION,value:"^"}),t.end=()=>({type:n.POSITION,value:"$"})},function(e,t,r){"use strict";class n{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.highe.high)}touches(e){return!(this.high+1e.high)}add(e){return new n(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.highe+t.length,0)}add(e,t){var r=e=>{for(var t=0;t{for(var t=0;t{for(var t=0;t{for(var r=t.low;r<=t.high;)e.push(r),r++;return e},[])}subranges(){return this.ranges.map(e=>({low:e.low,high:e.high,length:1+e.high-e.low}))}}e.exports=i},function(e,t,r){"use strict";const n=r(14),i=r(13);e.exports=class extends i{constructor(e,t,r,n,i,o){super(e,t,r,n,i),this.$validator=o}setPropertyValue(e,t){let r=this.getClassDeclaration().getProperty(e);if(!r)throw new Error("The instance with id "+this.getIdentifier()+" trying to set field "+e+" which is not declared in the model.");const i={};i.stack=new n(t),i.modelManager=this.getModelManager(),i.rootResourceIdentifier=this.getFullyQualifiedIdentifier(),r.accept(this.$validator,i),super.setPropertyValue(e,t)}addArrayValue(e,t){let r=this.getClassDeclaration().getProperty(e);if(!r)throw new Error("The instance with id "+this.getIdentifier()+" trying to set field "+e+" which is not declared in the model.");if(!r.isArray())throw new Error("The instance with id "+this.getIdentifier()+" trying to add array item "+e+" which is not declared as an array in the model.");const i={};let o=[];this[e]&&(o=this[e].slice(0)),o.push(t),i.stack=new n(o),i.modelManager=this.getModelManager(),i.rootResourceIdentifier=this.getFullyQualifiedIdentifier(),r.accept(this.$validator,i),super.addArrayValue(e,t)}validate(){const e=this.getClassDeclaration(),t={};t.stack=new n(this),t.modelManager=this.getModelManager(),t.rootResourceIdentifier=this.getFullyQualifiedIdentifier(),e.accept(this.$validator,t)}}},function(e,t,r){var n=r(82),i=r(83),o=i;o.v1=n,o.v4=i,e.exports=o},function(e,t,r){var n,i,o=r(45),s=r(46),a=0,u=0;e.exports=function(e,t,r){var c=t&&r||0,l=t||[],h=(e=e||{}).node||n,p=void 0!==e.clockseq?e.clockseq:i;if(null==h||null==p){var f=o();null==h&&(h=n=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==p&&(p=i=16383&(f[6]<<8|f[7]))}var d=void 0!==e.msecs?e.msecs:(new Date).getTime(),g=void 0!==e.nsecs?e.nsecs:u+1,m=d-a+(g-u)/1e4;if(m<0&&void 0===e.clockseq&&(p=p+1&16383),(m<0||d>a)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=d,u=g,i=p;var y=(1e4*(268435455&(d+=122192928e5))+g)%4294967296;l[c++]=y>>>24&255,l[c++]=y>>>16&255,l[c++]=y>>>8&255,l[c++]=255&y;var v=d/4294967296*1e4&268435455;l[c++]=v>>>8&255,l[c++]=255&v,l[c++]=v>>>24&15|16,l[c++]=v>>>16&255,l[c++]=p>>>8|128,l[c++]=255&p;for(var A=0;A<6;++A)l[c+A]=h[A];return t||s(l)}},function(e,t,r){var n=r(45),i=r(46);e.exports=function(e,t,r){var o=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||n)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},function(e,t,r){"use strict";const n=r(85),i=r(100);i.params.lintable=!0;const o={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6},s={error:"red",warn:"yellow",info:"green",verbose:"cyan",debug:"blue",silly:"magenta"},a=e=>"object"==typeof e?"\n"+i.getColoredString(e,null,2):(e=>{try{return JSON.parse(e)&&!!e}catch(e){return!1}})(e)?"\n"+i.getColoredString(JSON.parse(e),null,2):e,u=(e,...t)=>{let r=e,i=t,u=i.shift();if(u&&"object"==typeof u&&u.level&&u.message){const e=u.padding&&u.padding[u.level];"error"===u.level&&u.stack?(r="error",u=`${u.message}\n${u.stack}`):Object.keys(o).includes(u.level)&&(r=u.level,u=u.message),u=e?`${e} ${u}`:u}i.unshift(u);(["error","warn"].includes(r)?console.error:console.log)(`${(new Date).toLocaleTimeString()} - ${(e=>n[s[e]](e.toUpperCase()))(r)}:`,...i.map(e=>e instanceof Error?`${e.message}\n${e.stack}`:e).map(a))},c={};Object.keys(o).forEach(e=>{c[e]=(...t)=>u(e,...t)});class l{static dispatch(e,...t){o[e]>o[this.level]||this.transports.forEach(r=>{r[e]&&r[e](...t)})}static add(e){this.transports.push(e)}static error(...e){return this.dispatch("error",...e)}static warn(...e){return this.dispatch("warn",...e)}static info(...e){return this.dispatch("info",...e)}static log(...e){return this.info(...e)}static http(...e){return this.dispatch("http",...e)}static verbose(...e){return this.dispatch("verbose",...e)}static debug(...e){return this.dispatch("debug",...e)}static silly(...e){return this.dispatch("silly",...e)}}l.level="info",l.transports=[c],e.exports=l},function(e,t,r){var n=r(86);e.exports=n},function(e,t,r){var n={};e.exports=n,n.themes={};var i=r(87),o=n.styles=r(90),s=Object.defineProperties,a=new RegExp(/[\r\n]+/g);n.supportsColor=r(91).supportsColor,void 0===n.enabled&&(n.enabled=!1!==n.supportsColor()),n.enable=function(){n.enabled=!0},n.disable=function(){n.enabled=!1},n.stripColors=n.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")};n.stylize=function(e,t){if(!n.enabled)return e+"";var r=o[t];return!r&&t in n?n[t](e):r.open+e+r.close};var u=/[|\\{}()[\]^$+*?.]/g;function c(e){var t=function e(){return f.apply(e,arguments)};return t._styles=e,t.__proto__=p,t}var l,h=(l={},o.grey=o.gray,Object.keys(o).forEach((function(e){o[e].closeRe=new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(u,"\\$&")}(o[e].close),"g"),l[e]={get:function(){return c(this._styles.concat(e))}}})),l),p=s((function(){}),h);function f(){var e=Array.prototype.slice.call(arguments),t=e.map((function(e){return null!=e&&e.constructor===String?e:i.inspect(e)})).join(" ");if(!n.enabled||!t)return t;for(var r=-1!=t.indexOf("\n"),s=this._styles,u=s.length;u--;){var c=o[s[u]];t=c.open+t.replace(c.closeRe,c.open)+c.close,r&&(t=t.replace(a,(function(e){return c.close+e+c.open})))}return t}n.setTheme=function(e){if("string"!=typeof e)for(var t in e)!function(t){n[t]=function(r){if("object"==typeof e[t]){var i=r;for(var o in e[t])i=n[e[t][o]](i);return i}return n[e[t]](r)}}(t);else console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));")};var d=function(e,t){var r=t.split("");return(r=r.map(e)).join("")};for(var g in n.trap=r(94),n.zalgo=r(95),n.maps={},n.maps.america=r(96)(n),n.maps.zebra=r(97)(n),n.maps.rainbow=r(98)(n),n.maps.random=r(99)(n),n.maps)!function(e){n[e]=function(t){return d(n.maps[e],t)}}(g);s(n,function(){var e={};return Object.keys(h).forEach((function(t){e[t]={get:function(){return c([t])}}})),e}())},function(e,t,r){(function(e){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),u=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&t._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),l(n,e,n.depth)}function u(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function c(e,t){return e}function l(e,r,n){if(e.customInspect&&r&&E(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return y(i)||(i=l(e,i,n)),i}var o=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(m(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,r);if(o)return o;var s=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),F(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(r);if(0===s.length){if(E(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(A(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(C(r))return e.stylize(Date.prototype.toString.call(r),"date");if(F(r))return h(r)}var c,b="",w=!1,D=["{","}"];(f(r)&&(w=!0,D=["[","]"]),E(r))&&(b=" [Function"+(r.name?": "+r.name:"")+"]");return A(r)&&(b=" "+RegExp.prototype.toString.call(r)),C(r)&&(b=" "+Date.prototype.toUTCString.call(r)),F(r)&&(b=" "+h(r)),0!==s.length||w&&0!=r.length?n<0?A(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=w?function(e,t,r,n,i){for(var o=[],s=0,a=t.length;s=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,b,D)):D[0]+b+D[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),T(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=g(r)?l(e,u.value,null):l(e,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),v(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function f(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function g(e){return null===e}function m(e){return"number"==typeof e}function y(e){return"string"==typeof e}function v(e){return void 0===e}function A(e){return b(e)&&"[object RegExp]"===w(e)}function b(e){return"object"==typeof e&&null!==e}function C(e){return b(e)&&"[object Date]"===w(e)}function F(e){return b(e)&&("[object Error]"===w(e)||e instanceof Error)}function E(e){return"function"==typeof e}function w(e){return Object.prototype.toString.call(e)}function D(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(v(o)&&(o=Object({NODE_ENV:"production"}).NODE_DEBUG||""),r=r.toUpperCase(),!s[r])if(new RegExp("\\b"+r+"\\b","i").test(o)){var n=e.pid;s[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e)}}else s[r]=function(){};return s[r]},t.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=f,t.isBoolean=d,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=m,t.isString=y,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=v,t.isRegExp=A,t.isObject=b,t.isDate=C,t.isError=F,t.isFunction=E,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(88);var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function B(){var e=new Date,t=[D(e.getHours()),D(e.getMinutes()),D(e.getSeconds())].join(":");return[e.getDate(),x[e.getMonth()],t].join(" ")}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",B(),t.format.apply(t,arguments))},t.inherits=r(89),t._extend=function(e,t){if(!t||!b(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var N="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function M(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(N&&e[N]){var t;if("function"!=typeof(t=e[N]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,N,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o=2,has16m:e>=3}}(function(e){if(!1===s)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(e&&!e.isTTY&&!0!==s)return 0;var r=s?1:0;if("win32"===t.platform){var a=n.release().split(".");return Number(t.versions.node.split(".")[0])>=8&&Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in o)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((function(e){return e in o}))||"codeship"===o.CI_NAME?1:r;if("TEAMCITY_VERSION"in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in o){var u=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||"COLORTERM"in o?1:(o.TERM,r)}(e))}i("no-color")||i("no-colors")||i("color=false")?s=!1:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(s=!0),"FORCE_COLOR"in o&&(s=0===o.FORCE_COLOR.length||0!==parseInt(o.FORCE_COLOR,10)),e.exports={supportsColor:a,stdout:a(t.stdout),stderr:a(t.stderr)}}).call(this,r(5))},function(e,t){t.endianness=function(){return"LE"},t.hostname=function(){return"undefined"!=typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"}},function(e,t,r){"use strict";(function(t){e.exports=function(e,r){var n=(r=r||t.argv).indexOf("--"),i=/^-{1,2}/.test(e)?"":"--",o=r.indexOf(i+e);return-1!==o&&(-1===n||of?h(", ","punc"):"");s.push(g+h("]","brack"))}}return o()?[s.join("\n")].concat(t):s.join("\n")},setJsomeRef:function(t){return e=t,this}}}()},function(e,t){e.exports={black:"color: #000000",red:"color: #FF0000",green:"color: #00FF00",yellow:"color: #FFFF00",blue:"color: #0000FF",magenta:"color: #FF00FF",cyan:"color: #00FFFF",white:"color: #FFFFFF",gray:"color: #C0C0C0",bgBlack:"background: #000000",bgRed:"background: #FF0000",bgGreen:"background: #00FF00",bgYellow:"background: #FFFF00",bgBlue:"background: #0000FF",bgMagenta:"background: #FF00FF",bgCyan:"background: #00FFFF",bgWhite:"background: #000000",bgGray:"background: #C0C0C0"}},function(e,t,r){"use strict";(function(t){const n=r(104),i=r(105),o=r(109).stdout,s=r(110),a="win32"===t.platform&&!(Object({NODE_ENV:"production"}).TERM||"").toLowerCase().startsWith("xterm"),u=["ansi","ansi","ansi256","ansi16m"],c=new Set(["gray"]),l=Object.create(null);function h(e,t){t=t||{};const r=o?o.level:0;e.level=void 0===t.level?r:t.level,e.enabled="enabled"in t?t.enabled:e.level>0}function p(e){if(!this||!(this instanceof p)||this.template){const t={};return h(t,e),t.template=function(){const e=[].slice.call(arguments);return m.apply(null,[t.template].concat(e))},Object.setPrototypeOf(t,p.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=p,t.template}h(this,e)}a&&(i.blue.open="");for(const e of Object.keys(i))i[e].closeRe=new RegExp(n(i[e].close),"g"),l[e]={get(){const t=i[e];return d.call(this,this._styles?this._styles.concat(t):[t],this._empty,e)}};l.visible={get(){return d.call(this,this._styles||[],!0,"visible")}},i.color.closeRe=new RegExp(n(i.color.close),"g");for(const e of Object.keys(i.color.ansi))c.has(e)||(l[e]={get(){const t=this.level;return function(){const r=i.color[u[t]][e].apply(null,arguments),n={open:r,close:i.color.close,closeRe:i.color.closeRe};return d.call(this,this._styles?this._styles.concat(n):[n],this._empty,e)}}});i.bgColor.closeRe=new RegExp(n(i.bgColor.close),"g");for(const e of Object.keys(i.bgColor.ansi)){if(c.has(e))continue;l["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const t=this.level;return function(){const r=i.bgColor[u[t]][e].apply(null,arguments),n={open:r,close:i.bgColor.close,closeRe:i.bgColor.closeRe};return d.call(this,this._styles?this._styles.concat(n):[n],this._empty,e)}}}}const f=Object.defineProperties(()=>{},l);function d(e,t,r){const n=function(){return g.apply(n,arguments)};n._styles=e,n._empty=t;const i=this;return Object.defineProperty(n,"level",{enumerable:!0,get:()=>i.level,set(e){i.level=e}}),Object.defineProperty(n,"enabled",{enumerable:!0,get:()=>i.enabled,set(e){i.enabled=e}}),n.hasGrey=this.hasGrey||"gray"===r||"grey"===r,n.__proto__=f,n}function g(){const e=arguments,t=e.length;let r=String(arguments[0]);if(0===t)return"";if(t>1)for(let n=1;nfunction(){const n=e.apply(t,arguments);return`[${n+r}m`},i=(e,r)=>function(){const n=e.apply(t,arguments);return`[${38+r};5;${n}m`},o=(e,r)=>function(){const n=e.apply(t,arguments);return`[${38+r};2;${n[0]};${n[1]};${n[2]}m`};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,r={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};r.color.grey=r.color.gray;for(const t of Object.keys(r)){const n=r[t];for(const t of Object.keys(n)){const i=n[t];r[t]={open:`[${i[0]}m`,close:`[${i[1]}m`},n[t]=r[t],e.set(i[0],i[1])}Object.defineProperty(r,t,{value:n,enumerable:!1}),Object.defineProperty(r,"codes",{value:e,enumerable:!1})}const s=e=>e,a=(e,t,r)=>[e,t,r];r.color.close="",r.bgColor.close="",r.color.ansi={ansi:n(s,0)},r.color.ansi256={ansi256:i(s,0)},r.color.ansi16m={rgb:o(a,0)},r.bgColor.ansi={ansi:n(s,10)},r.bgColor.ansi256={ansi256:i(s,10)},r.bgColor.ansi16m={rgb:o(a,10)};for(let e of Object.keys(t)){if("object"!=typeof t[e])continue;const s=t[e];"ansi16"===e&&(e="ansi"),"ansi16"in s&&(r.color.ansi[e]=n(s.ansi16,0),r.bgColor.ansi[e]=n(s.ansi16,10)),"ansi256"in s&&(r.color.ansi256[e]=i(s.ansi256,0),r.bgColor.ansi256[e]=i(s.ansi256,10)),"rgb"in s&&(r.color.ansi16m[e]=o(s.rgb,0),r.bgColor.ansi16m[e]=o(s.rgb,10))}return r}})}).call(this,r(27)(e))},function(e,t,r){var n=r(47),i=r(108),o={};Object.keys(n).forEach((function(e){o[e]={},Object.defineProperty(o[e],"channels",{value:n[e].channels}),Object.defineProperty(o[e],"labels",{value:n[e].labels});var t=i(e);Object.keys(t).forEach((function(r){var n=t[r];o[e][r]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var r=e(t);if("object"==typeof r)for(var n=r.length,i=0;i1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)}))})),e.exports=o},function(e,t,r){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(e,t,r){var n=r(47);function i(e){var t=function(){for(var e={},t=Object.keys(n),r=t.length,i=0;it?u(t):r))}else r.push(Number(t));return r}function l(e){i.lastIndex=0;const t=[];let r;for(;null!==(r=i.exec(e));){const e=r[1];if(r[2]){const n=c(e,r[2]);t.push([e].concat(n))}else t.push([e])}return t}function h(e,t){const r={};for(const e of t)for(const t of e.styles)r[t[0]]=e.inverse?null:t.slice(1);let n=e;for(const e of Object.keys(r))if(Array.isArray(r[e])){if(!(e in n))throw new Error("Unknown Chalk style: "+e);n=r[e].length>0?n[e].apply(n,r[e]):n[e]}return n}e.exports=(e,t)=>{const r=[],i=[];let o=[];if(t.replace(n,(t,n,s,a,c,p)=>{if(n)o.push(u(n));else if(a){const t=o.join("");o=[],i.push(0===r.length?t:h(e,r)(t)),r.push({inverse:s,styles:l(a)})}else if(c){if(0===r.length)throw new Error("Found extraneous } in Chalk template literal");i.push(h(e,r)(o.join(""))),o=[],r.pop()}else o.push(p)}),i.push(o.join("")),r.length>0){const e=`Chalk template literal is missing ${r.length} closing bracket${1===r.length?"":"s"} (\`}\`)`;throw new Error(e)}return i.join("")}},function(e,t){function r(e,t){var r=[],n=[];return null==t&&(t=function(e,t){return r[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,r.indexOf(t)).join(".")+"]"}),function(i,o){if(r.length>0){var s=r.indexOf(this);~s?r.splice(s+1):r.push(this),~s?n.splice(s,1/0,i):n.push(i),~r.indexOf(o)&&(o=t.call(this,i,o))}else r.push(o);return null==e?o:e.call(this,i,o)}}(e.exports=function(e,t,n,i){return JSON.stringify(e,r(t,i),n)}).getSerialize=r},function(e,t,r){"use strict";function n(e,t,r,i){this.message=e,this.expected=t,this.found=r,this.location=i,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,n)}!function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(n,Error),n.buildMessage=function(e,t){var r={literal:function(e){return'"'+i(e.text)+'"'},class:function(e){var t,r="";for(t=0;t0){for(t=1,n=1;tnr&&(nr=er,ir=[]),ir.push(e))}function dr(e,t,r){return new n(n.buildMessage(e,t),e,t,r)}function gr(){var t,r;return t=er,Gr()!==i&&(r=function(){var t,r,n,o;t=er,(r=function(){var t,r;t=er,function(){var t,r,n,o;t=er,"namespace"===e.substr(er,9)?(r="namespace",er+=9):(r=i,0===or&&fr(xt));r!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?t=r=[r,n]:(er=t,t=i)):(er=t,t=i);return t}()!==i&&Gr()!==i&&(r=Yn())!==i&&Gr()!==i?(tr=t,t=r):(er=t,t=i);return t}())!==i?((n=function(){var e,t,r,n,o,s;if(e=er,(t=Xn())!==i){for(r=[],n=er,(o=Gr())!==i&&(s=Xn())!==i?n=o=[o,s]:(er=n,n=i);n!==i;)r.push(n),n=er,(o=Gr())!==i&&(s=Xn())!==i?n=o=[o,s]:(er=n,n=i);r!==i?(tr=e,t=ei(t,r,1),e=t):(er=e,e=i)}else er=e,e=i;return e}())===i&&(n=null),n!==i?((o=function(){var e,t,r,n,o,s;if(e=er,(t=Kn())!==i){for(r=[],n=er,(o=Gr())!==i&&(s=Kn())!==i?n=o=[o,s]:(er=n,n=i);n!==i;)r.push(n),n=er,(o=Gr())!==i&&(s=Kn())!==i?n=o=[o,s]:(er=n,n=i);r!==i?(tr=e,t=ei(t,r,1),e=t):(er=e,e=i)}else er=e,e=i;return e}())===i&&(o=null),o!==i?(tr=t,s=o,r={type:"Program",namespace:r,imports:ti(n),body:ti(s)},t=r):(er=t,t=i)):(er=t,t=i)):(er=t,t=i);var s;return t}())!==i&&Gr()!==i?(tr=t,t=r):(er=t,t=i),t}function mr(){var t;return e.length>er?(t=e.charAt(er),er++):(t=i,0===or&&fr(a)),t}function yr(){var t;return or++,9===e.charCodeAt(er)?(t="\t",er++):(t=i,0===or&&fr(c)),t===i&&(11===e.charCodeAt(er)?(t="\v",er++):(t=i,0===or&&fr(l)),t===i&&(12===e.charCodeAt(er)?(t="\f",er++):(t=i,0===or&&fr(h)),t===i&&(32===e.charCodeAt(er)?(t=" ",er++):(t=i,0===or&&fr(p)),t===i&&(160===e.charCodeAt(er)?(t=" ",er++):(t=i,0===or&&fr(f)),t===i&&(65279===e.charCodeAt(er)?(t="\ufeff",er++):(t=i,0===or&&fr(d)),t===i&&(t=function(){var t;$e.test(e.charAt(er))?(t=e.charAt(er),er++):(t=i,0===or&&fr(Pe));return t}())))))),or--,t===i&&(i,0===or&&fr(u)),t}function vr(){var t;return g.test(e.charAt(er))?(t=e.charAt(er),er++):(t=i,0===or&&fr(m)),t}function Ar(){var t;return or++,10===e.charCodeAt(er)?(t="\n",er++):(t=i,0===or&&fr(v)),t===i&&("\r\n"===e.substr(er,2)?(t="\r\n",er+=2):(t=i,0===or&&fr(A)),t===i&&(13===e.charCodeAt(er)?(t="\r",er++):(t=i,0===or&&fr(b)),t===i&&(8232===e.charCodeAt(er)?(t="\u2028",er++):(t=i,0===or&&fr(C)),t===i&&(8233===e.charCodeAt(er)?(t="\u2029",er++):(t=i,0===or&&fr(F)))))),or--,t===i&&(i,0===or&&fr(y)),t}function br(){var t;return or++,(t=function(){var t,r,n,o,s,a;t=er,"/*"===e.substr(er,2)?(r="/*",er+=2):(r=i,0===or&&fr(w));if(r!==i){for(n=[],o=er,s=er,or++,"*/"===e.substr(er,2)?(a="*/",er+=2):(a=i,0===or&&fr(D)),or--,a===i?s=void 0:(er=s,s=i),s!==i&&(a=mr())!==i?o=s=[s,a]:(er=o,o=i);o!==i;)n.push(o),o=er,s=er,or++,"*/"===e.substr(er,2)?(a="*/",er+=2):(a=i,0===or&&fr(D)),or--,a===i?s=void 0:(er=s,s=i),s!==i&&(a=mr())!==i?o=s=[s,a]:(er=o,o=i);n!==i?("*/"===e.substr(er,2)?(o="*/",er+=2):(o=i,0===or&&fr(D)),o!==i?t=r=[r,n,o]:(er=t,t=i)):(er=t,t=i)}else er=t,t=i;return t}())===i&&(t=Cr()),or--,t===i&&(i,0===or&&fr(E)),t}function Cr(){var t,r,n,o,s,a;if(t=er,"//"===e.substr(er,2)?(r="//",er+=2):(r=i,0===or&&fr(x)),r!==i){for(n=[],o=er,s=er,or++,a=vr(),or--,a===i?s=void 0:(er=s,s=i),s!==i&&(a=mr())!==i?o=s=[s,a]:(er=o,o=i);o!==i;)n.push(o),o=er,s=er,or++,a=vr(),or--,a===i?s=void 0:(er=s,s=i),s!==i&&(a=mr())!==i?o=s=[s,a]:(er=o,o=i);n!==i?t=r=[r,n]:(er=t,t=i)}else er=t,t=i;return t}function Fr(){var e,t,r;return e=er,t=er,or++,r=function(){var e;(e=Dr())===i&&(e=xr());return e}(),or--,r===i?t=void 0:(er=t,t=i),t!==i&&(r=function(){var e,t,r,n;if(or++,e=er,(t=Er())!==i){for(r=[],n=wr();n!==i;)r.push(n),n=wr();r!==i?(tr=e,t={type:"Identifier",name:t+r.join("")},e=t):(er=e,e=i)}else er=e,e=i;or--,e===i&&(t=i,0===or&&fr(B));return e}())!==i?(tr=e,e=t=r):(er=e,e=i),e}function Er(){var t,r,n;return(t=function(){var t;(t=function(){var t;xe.test(e.charAt(er))?(t=e.charAt(er),er++):(t=i,0===or&&fr(Be));return t}())===i&&(t=function(){var t;ve.test(e.charAt(er))?(t=e.charAt(er),er++):(t=i,0===or&&fr(Ae));return t}())===i&&(t=function(){var t;we.test(e.charAt(er))?(t=e.charAt(er),er++):(t=i,0===or&&fr(De));return t}())===i&&(t=function(){var t;be.test(e.charAt(er))?(t=e.charAt(er),er++):(t=i,0===or&&fr(Ce));return t}())===i&&(t=function(){var t;Fe.test(e.charAt(er))?(t=e.charAt(er),er++):(t=i,0===or&&fr(Ee));return t}())===i&&(t=function(){var t;Oe.test(e.charAt(er))?(t=e.charAt(er),er++):(t=i,0===or&&fr(Re));return t}());return t}())===i&&(36===e.charCodeAt(er)?(t="$",er++):(t=i,0===or&&fr(T)),t===i&&(95===e.charCodeAt(er)?(t="_",er++):(t=i,0===or&&fr(N)),t===i&&(t=er,92===e.charCodeAt(er)?(r="\\",er++):(r=i,0===or&&fr(M)),r!==i&&(n=Qr())!==i?(tr=t,t=r=n):(er=t,t=i)))),t}function wr(){var t;return(t=Er())===i&&(t=function(){var t;(t=function(){var t;Me.test(e.charAt(er))?(t=e.charAt(er),er++):(t=i,0===or&&fr(Ie));return t}())===i&&(t=function(){var t;Te.test(e.charAt(er))?(t=e.charAt(er),er++):(t=i,0===or&&fr(Ne));return t}());return t}())===i&&(t=function(){var t;ke.test(e.charAt(er))?(t=e.charAt(er),er++):(t=i,0===or&&fr(Se));return t}())===i&&(t=function(){var t;_e.test(e.charAt(er))?(t=e.charAt(er),er++):(t=i,0===or&&fr(je));return t}())===i&&(8204===e.charCodeAt(er)?(t="‌",er++):(t=i,0===or&&fr(I)),t===i&&(8205===e.charCodeAt(er)?(t="‍",er++):(t=i,0===or&&fr(k)))),t}function Dr(){var t,r;return t=er,(r=function(){var t,r,n,o;t=er,"null"===e.substr(er,4)?(r="null",er+=4):(r=i,0===or&&fr(ze));r!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?t=r=[r,n]:(er=t,t=i)):(er=t,t=i);return t}())!==i&&(tr=t,r={type:"Literal",value:null}),t=r}function xr(){var t,r;return t=er,(r=function(){var t,r,n,o;t=er,"true"===e.substr(er,4)?(r="true",er+=4):(r=i,0===or&&fr(qe));r!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?t=r=[r,n]:(er=t,t=i)):(er=t,t=i);return t}())!==i&&(tr=t,r={type:"Literal",value:!0}),(t=r)===i&&(t=er,(r=function(){var t,r,n,o;t=er,"false"===e.substr(er,5)?(r="false",er+=5):(r=i,0===or&&fr(Le));r!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?t=r=[r,n]:(er=t,t=i)):(er=t,t=i);return t}())!==i&&(tr=t,r={type:"Literal",value:!1}),t=r),t}function Br(){var t,r,n,o;return or++,t=er,(r=function(){var t,r,n,o,s;t=er,"0x"===e.substr(er,2).toLowerCase()?(r=e.substr(er,2),er+=2):(r=i,0===or&&fr(q));if(r!==i){if(n=er,o=[],(s=Sr())!==i)for(;s!==i;)o.push(s),s=Sr();else o=i;(n=o!==i?e.substring(n,er):o)!==i?(tr=t,r={type:"Literal",value:parseInt(n,16)},t=r):(er=t,t=i)}else er=t,t=i;return t}())!==i?(n=er,or++,(o=Er())===i&&(o=Mr()),or--,o===i?n=void 0:(er=n,n=i),n!==i?(tr=t,t=r=r):(er=t,t=i)):(er=t,t=i),t===i&&(t=er,(r=function(){var t,r,n,o,s;if(t=er,(r=Nr())!==i)if(46===e.charCodeAt(er)?(n=".",er++):(n=i,0===or&&fr(O)),n!==i){for(o=[],s=Mr();s!==i;)o.push(s),s=Mr();o!==i?((s=Ir())===i&&(s=null),s!==i?(tr=t,r=R(),t=r):(er=t,t=i)):(er=t,t=i)}else er=t,t=i;else er=t,t=i;if(t===i){if(t=er,46===e.charCodeAt(er)?(r=".",er++):(r=i,0===or&&fr(O)),r!==i){if(n=[],(o=Mr())!==i)for(;o!==i;)n.push(o),o=Mr();else n=i;n!==i?((o=Ir())===i&&(o=null),o!==i?(tr=t,r=R(),t=r):(er=t,t=i)):(er=t,t=i)}else er=t,t=i;t===i&&(t=er,(r=Nr())!==i?((n=Ir())===i&&(n=null),n!==i?(tr=t,r=R(),t=r):(er=t,t=i)):(er=t,t=i))}return t}())!==i?(n=er,or++,(o=Er())===i&&(o=Mr()),or--,o===i?n=void 0:(er=n,n=i),n!==i?(tr=t,t=r=r):(er=t,t=i)):(er=t,t=i)),or--,t===i&&(r=i,0===or&&fr(S)),t}function Tr(){var t,r,n,o,s;if(t=er,_.test(e.charAt(er))?(r=e.charAt(er),er++):(r=i,0===or&&fr(j)),r===i&&(r=null),r!==i)if(Nr()!==i)if(46===e.charCodeAt(er)?(n=".",er++):(n=i,0===or&&fr(O)),n!==i){for(o=[],s=Mr();s!==i;)o.push(s),s=Mr();o!==i?((s=Ir())===i&&(s=null),s!==i?(tr=t,t=r=R()):(er=t,t=i)):(er=t,t=i)}else er=t,t=i;else er=t,t=i;else er=t,t=i;return t}function Nr(){var t,r,n,o;if(48===e.charCodeAt(er)?(t="0",er++):(t=i,0===or&&fr($)),t===i)if(t=er,(r=function(){var t;L.test(e.charAt(er))?(t=e.charAt(er),er++):(t=i,0===or&&fr(U));return t}())!==i){for(n=[],o=Mr();o!==i;)n.push(o),o=Mr();n!==i?t=r=[r,n]:(er=t,t=i)}else er=t,t=i;return t}function Mr(){var t;return P.test(e.charAt(er))?(t=e.charAt(er),er++):(t=i,0===or&&fr(Q)),t}function Ir(){var t,r,n;return t=er,(r=function(){var t;"e"===e.substr(er,1).toLowerCase()?(t=e.charAt(er),er++):(t=i,0===or&&fr(z));return t}())!==i&&(n=kr())!==i?t=r=[r,n]:(er=t,t=i),t}function kr(){var t,r,n,o;if(t=er,_.test(e.charAt(er))?(r=e.charAt(er),er++):(r=i,0===or&&fr(j)),r===i&&(r=null),r!==i){if(n=[],(o=Mr())!==i)for(;o!==i;)n.push(o),o=Mr();else n=i;n!==i?t=r=[r,n]:(er=t,t=i)}else er=t,t=i;return t}function Sr(){var t;return V.test(e.charAt(er))?(t=e.charAt(er),er++):(t=i,0===or&&fr(H)),t}function Or(){var t,r,n,o;if(or++,t=er,34===e.charCodeAt(er)?(r='"',er++):(r=i,0===or&&fr(G)),r!==i){for(n=[],o=Rr();o!==i;)n.push(o),o=Rr();n!==i?(34===e.charCodeAt(er)?(o='"',er++):(o=i,0===or&&fr(G)),o!==i?(tr=t,t=r=W(n)):(er=t,t=i)):(er=t,t=i)}else er=t,t=i;if(t===i)if(t=er,39===e.charCodeAt(er)?(r="'",er++):(r=i,0===or&&fr(Y)),r!==i){for(n=[],o=_r();o!==i;)n.push(o),o=_r();n!==i?(39===e.charCodeAt(er)?(o="'",er++):(o=i,0===or&&fr(Y)),o!==i?(tr=t,t=r=W(n)):(er=t,t=i)):(er=t,t=i)}else er=t,t=i;return or--,t===i&&(r=i,0===or&&fr(J)),t}function Rr(){var t,r,n;return t=er,r=er,or++,34===e.charCodeAt(er)?(n='"',er++):(n=i,0===or&&fr(G)),n===i&&(92===e.charCodeAt(er)?(n="\\",er++):(n=i,0===or&&fr(M)),n===i&&(n=vr())),or--,n===i?r=void 0:(er=r,r=i),r!==i&&(n=mr())!==i?(tr=t,t=r=Z()):(er=t,t=i),t===i&&(t=er,92===e.charCodeAt(er)?(r="\\",er++):(r=i,0===or&&fr(M)),r!==i&&(n=$r())!==i?(tr=t,t=r=n):(er=t,t=i),t===i&&(t=jr())),t}function _r(){var t,r,n;return t=er,r=er,or++,39===e.charCodeAt(er)?(n="'",er++):(n=i,0===or&&fr(Y)),n===i&&(92===e.charCodeAt(er)?(n="\\",er++):(n=i,0===or&&fr(M)),n===i&&(n=vr())),or--,n===i?r=void 0:(er=r,r=i),r!==i&&(n=mr())!==i?(tr=t,t=r=Z()):(er=t,t=i),t===i&&(t=er,92===e.charCodeAt(er)?(r="\\",er++):(r=i,0===or&&fr(M)),r!==i&&(n=$r())!==i?(tr=t,t=r=n):(er=t,t=i),t===i&&(t=jr())),t}function jr(){var t,r;return t=er,92===e.charCodeAt(er)?(r="\\",er++):(r=i,0===or&&fr(M)),r!==i&&Ar()!==i?(tr=t,t=r=""):(er=t,t=i),t}function $r(){var t,r,n,o;return(t=function(){var t;(t=Pr())===i&&(t=function(){var t,r,n;t=er,r=er,or++,(n=function(){var t;(t=Pr())===i&&(t=Mr())===i&&(120===e.charCodeAt(er)?(t="x",er++):(t=i,0===or&&fr(ie)),t===i&&(117===e.charCodeAt(er)?(t="u",er++):(t=i,0===or&&fr(oe))));return t}())===i&&(n=vr());or--,n===i?r=void 0:(er=r,r=i);r!==i&&(n=mr())!==i?(tr=t,r=Z(),t=r):(er=t,t=i);return t}());return t}())===i&&(t=er,48===e.charCodeAt(er)?(r="0",er++):(r=i,0===or&&fr($)),r!==i?(n=er,or++,o=Mr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?(tr=t,t=r="\0"):(er=t,t=i)):(er=t,t=i),t===i&&(t=function(){var t,r,n,o,s,a;t=er,120===e.charCodeAt(er)?(r="x",er++):(r=i,0===or&&fr(ie));r!==i?(n=er,o=er,(s=Sr())!==i&&(a=Sr())!==i?o=s=[s,a]:(er=o,o=i),(n=o!==i?e.substring(n,er):o)!==i?(tr=t,r=se(n),t=r):(er=t,t=i)):(er=t,t=i);return t}())===i&&(t=Qr())),t}function Pr(){var t,r;return 39===e.charCodeAt(er)?(t="'",er++):(t=i,0===or&&fr(Y)),t===i&&(34===e.charCodeAt(er)?(t='"',er++):(t=i,0===or&&fr(G)),t===i&&(92===e.charCodeAt(er)?(t="\\",er++):(t=i,0===or&&fr(M)),t===i&&(t=er,98===e.charCodeAt(er)?(r="b",er++):(r=i,0===or&&fr(X)),r!==i&&(tr=t,r="\b"),(t=r)===i&&(t=er,102===e.charCodeAt(er)?(r="f",er++):(r=i,0===or&&fr(K)),r!==i&&(tr=t,r="\f"),(t=r)===i&&(t=er,110===e.charCodeAt(er)?(r="n",er++):(r=i,0===or&&fr(ee)),r!==i&&(tr=t,r="\n"),(t=r)===i&&(t=er,114===e.charCodeAt(er)?(r="r",er++):(r=i,0===or&&fr(te)),r!==i&&(tr=t,r="\r"),(t=r)===i&&(t=er,116===e.charCodeAt(er)?(r="t",er++):(r=i,0===or&&fr(re)),r!==i&&(tr=t,r="\t"),(t=r)===i&&(t=er,118===e.charCodeAt(er)?(r="v",er++):(r=i,0===or&&fr(ne)),r!==i&&(tr=t,r="\v"),t=r)))))))),t}function Qr(){var t,r,n,o,s,a,u,c;return t=er,117===e.charCodeAt(er)?(r="u",er++):(r=i,0===or&&fr(oe)),r!==i?(n=er,o=er,(s=Sr())!==i&&(a=Sr())!==i&&(u=Sr())!==i&&(c=Sr())!==i?o=s=[s,a,u,c]:(er=o,o=i),(n=o!==i?e.substring(n,er):o)!==i?(tr=t,t=r=se(n)):(er=t,t=i)):(er=t,t=i),t}function Lr(){var t,r,n,o,s,a;return or++,t=er,47===e.charCodeAt(er)?(r="/",er++):(r=i,0===or&&fr(ue)),r!==i?(n=er,o=function(){var t,r,n,o;if(t=er,(r=function(){var t,r,n;t=er,r=er,or++,le.test(e.charAt(er))?(n=e.charAt(er),er++):(n=i,0===or&&fr(he));or--,n===i?r=void 0:(er=r,r=i);r!==i&&(n=qr())!==i?t=r=[r,n]:(er=t,t=i);t===i&&(t=zr())===i&&(t=Vr());return t}())!==i){for(n=[],o=Ur();o!==i;)n.push(o),o=Ur();n!==i?t=r=[r,n]:(er=t,t=i)}else er=t,t=i;return t}(),(n=o!==i?e.substring(n,er):o)!==i?(47===e.charCodeAt(er)?(o="/",er++):(o=i,0===or&&fr(ue)),o!==i?(s=er,(s=(a=function(){var e,t;e=[],t=wr();for(;t!==i;)e.push(t),t=wr();return e}())!==i?e.substring(s,er):a)!==i?(tr=t,t=r=ce(n,s)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i),or--,t===i&&(r=i,0===or&&fr(ae)),t}function Ur(){var t,r,n;return t=er,r=er,or++,pe.test(e.charAt(er))?(n=e.charAt(er),er++):(n=i,0===or&&fr(fe)),or--,n===i?r=void 0:(er=r,r=i),r!==i&&(n=qr())!==i?t=r=[r,n]:(er=t,t=i),t===i&&(t=zr())===i&&(t=Vr()),t}function zr(){var t,r,n;return t=er,92===e.charCodeAt(er)?(r="\\",er++):(r=i,0===or&&fr(M)),r!==i&&(n=qr())!==i?t=r=[r,n]:(er=t,t=i),t}function qr(){var e,t,r;return e=er,t=er,or++,r=vr(),or--,r===i?t=void 0:(er=t,t=i),t!==i&&(r=mr())!==i?e=t=[t,r]:(er=e,e=i),e}function Vr(){var t,r,n,o;if(t=er,91===e.charCodeAt(er)?(r="[",er++):(r=i,0===or&&fr(de)),r!==i){for(n=[],o=Hr();o!==i;)n.push(o),o=Hr();n!==i?(93===e.charCodeAt(er)?(o="]",er++):(o=i,0===or&&fr(ge)),o!==i?t=r=[r,n,o]:(er=t,t=i)):(er=t,t=i)}else er=t,t=i;return t}function Hr(){var t,r,n;return t=er,r=er,or++,me.test(e.charAt(er))?(n=e.charAt(er),er++):(n=i,0===or&&fr(ye)),or--,n===i?r=void 0:(er=r,r=i),r!==i&&(n=qr())!==i?t=r=[r,n]:(er=t,t=i),t===i&&(t=zr()),t}function Jr(){var t,r,n,o;return t=er,"import"===e.substr(er,6)?(r="import",er+=6):(r=i,0===or&&fr(Ue)),r!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?t=r=[r,n]:(er=t,t=i)):(er=t,t=i),t}function Gr(){var e,t;for(e=[],(t=yr())===i&&(t=Ar())===i&&(t=br());t!==i;)e.push(t),(t=yr())===i&&(t=Ar())===i&&(t=br());return e}function Wr(){var t;return Je.test(e.charAt(er))?(t=e.charAt(er),er++):(t=i,0===or&&fr(Ge)),t===i&&(We.test(e.charAt(er))?(t=e.charAt(er),er++):(t=i,0===or&&fr(Ye))),t}function Yr(){var t;return P.test(e.charAt(er))?(t=e.charAt(er),er++):(t=i,0===or&&fr(Q)),t}function Zr(){var t;return(t=Yr())===i&&("a"===e.substr(er,1).toLowerCase()?(t=e.charAt(er),er++):(t=i,0===or&&fr(Xe)),t===i&&("b"===e.substr(er,1).toLowerCase()?(t=e.charAt(er),er++):(t=i,0===or&&fr(Ke)),t===i&&("c"===e.substr(er,1).toLowerCase()?(t=e.charAt(er),er++):(t=i,0===or&&fr(et)),t===i&&("d"===e.substr(er,1).toLowerCase()?(t=e.charAt(er),er++):(t=i,0===or&&fr(tt)),t===i&&("e"===e.substr(er,1).toLowerCase()?(t=e.charAt(er),er++):(t=i,0===or&&fr(rt)),t===i&&("f"===e.substr(er,1).toLowerCase()?(t=e.charAt(er),er++):(t=i,0===or&&fr(nt)))))))),t}function Xr(){var t,r,n,o,s;return t=er,r=er,37===e.charCodeAt(er)?(n="%",er++):(n=i,0===or&&fr(it)),n!==i&&(o=Zr())!==i&&(s=Zr())!==i?r=n=[n,o,s]:(er=r,r=i),t=r!==i?e.substring(t,er):r}function Kr(){var t;return 33===e.charCodeAt(er)?(t="!",er++):(t=i,0===or&&fr(ct)),t===i&&(36===e.charCodeAt(er)?(t="$",er++):(t=i,0===or&&fr(T)),t===i&&(38===e.charCodeAt(er)?(t="&",er++):(t=i,0===or&&fr(lt)),t===i&&(39===e.charCodeAt(er)?(t="'",er++):(t=i,0===or&&fr(Y)),t===i&&(40===e.charCodeAt(er)?(t="(",er++):(t=i,0===or&&fr(ht)),t===i&&(41===e.charCodeAt(er)?(t=")",er++):(t=i,0===or&&fr(pt)),t===i&&(42===e.charCodeAt(er)?(t="*",er++):(t=i,0===or&&fr(ft)),t===i&&(43===e.charCodeAt(er)?(t="+",er++):(t=i,0===or&&fr(dt)),t===i&&(44===e.charCodeAt(er)?(t=",",er++):(t=i,0===or&&fr(gt)),t===i&&(59===e.charCodeAt(er)?(t=";",er++):(t=i,0===or&&fr(Ve)),t===i&&(61===e.charCodeAt(er)?(t="=",er++):(t=i,0===or&&fr(mt)))))))))))),t}function en(){var t;return(t=Wr())===i&&(t=Yr())===i&&(45===e.charCodeAt(er)?(t="-",er++):(t=i,0===or&&fr(yt)),t===i&&(46===e.charCodeAt(er)?(t=".",er++):(t=i,0===or&&fr(O)),t===i&&(95===e.charCodeAt(er)?(t="_",er++):(t=i,0===or&&fr(N)),t===i&&(126===e.charCodeAt(er)?(t="~",er++):(t=i,0===or&&fr(vt)))))),t}function tn(){var t,r,n,o,s,a,u,c;return t=er,(r=nn())!==i?(58===e.charCodeAt(er)?(n=":",er++):(n=i,0===or&&fr(ot)),n!==i&&(o=rn())!==i?(s=er,63===e.charCodeAt(er)?(a="?",er++):(a=i,0===or&&fr(st)),a!==i&&(u=An())!==i?s=a=[a,u]:(er=s,s=i),s===i&&(s=null),s!==i?(a=er,35===e.charCodeAt(er)?(u="#",er++):(u=i,0===or&&fr(at)),u!==i&&(c=bn())!==i?a=u=[u,c]:(er=a,a=i),a===i&&(a=null),a!==i?t=r=[r,n,o,s,a]:(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i),t}function rn(){var t,r,n,o;return t=er,"//"===e.substr(er,2)?(r="//",er+=2):(r=i,0===or&&fr(x)),r!==i&&(n=on())!==i&&(o=pn())!==i?t=r=[r,n,o]:(er=t,t=i),t===i&&(t=fn())===i&&(t=dn())===i&&(t=gn()),t}function nn(){var t,r,n,o,s;if(t=er,r=er,(n=Wr())!==i){for(o=[],(s=Wr())===i&&(s=Yr())===i&&(43===e.charCodeAt(er)?(s="+",er++):(s=i,0===or&&fr(dt)),s===i&&(45===e.charCodeAt(er)?(s="-",er++):(s=i,0===or&&fr(yt)),s===i&&(46===e.charCodeAt(er)?(s=".",er++):(s=i,0===or&&fr(O)))));s!==i;)o.push(s),(s=Wr())===i&&(s=Yr())===i&&(43===e.charCodeAt(er)?(s="+",er++):(s=i,0===or&&fr(dt)),s===i&&(45===e.charCodeAt(er)?(s="-",er++):(s=i,0===or&&fr(yt)),s===i&&(46===e.charCodeAt(er)?(s=".",er++):(s=i,0===or&&fr(O)))));o!==i?r=n=[n,o]:(er=r,r=i)}else er=r,r=i;return t=r!==i?e.substring(t,er):r}function on(){var t,r,n,o,s,a;return t=er,r=er,(n=function(){var t,r,n;t=er,r=[],(n=en())===i&&(n=Xr())===i&&(n=Kr())===i&&(58===e.charCodeAt(er)?(n=":",er++):(n=i,0===or&&fr(ot)));for(;n!==i;)r.push(n),(n=en())===i&&(n=Xr())===i&&(n=Kr())===i&&(58===e.charCodeAt(er)?(n=":",er++):(n=i,0===or&&fr(ot)));t=r!==i?e.substring(t,er):r;return t}())!==i?(64===e.charCodeAt(er)?(o="@",er++):(o=i,0===or&&fr(ut)),o!==i?r=n=[n,o]:(er=r,r=i)):(er=r,r=i),r===i&&(r=null),r!==i&&(n=function(){var t,r,n,o;t=er,(r=function(){var t,r,n,o;t=er,91===e.charCodeAt(er)?(r="[",er++):(r=i,0===or&&fr(de));r!==i?((n=function(){var t,r,n,o,s,a,u,c,l,h,p,f,d,g;t=er,r=er,(n=an())!==i&&(o=an())!==i&&(s=an())!==i&&(a=an())!==i&&(u=an())!==i&&(c=an())!==i&&(l=sn())!==i?r=n=[n,o,s,a,u,c,l]:(er=r,r=i);r===i&&(r=er,"::"===e.substr(er,2)?(n="::",er+=2):(n=i,0===or&&fr(At)),n!==i&&(o=an())!==i&&(s=an())!==i&&(a=an())!==i&&(u=an())!==i&&(c=an())!==i&&(l=sn())!==i?r=n=[n,o,s,a,u,c,l]:(er=r,r=i),r===i&&(r=er,(n=un())===i&&(n=null),n!==i?("::"===e.substr(er,2)?(o="::",er+=2):(o=i,0===or&&fr(At)),o!==i&&(s=an())!==i&&(a=an())!==i&&(u=an())!==i&&(c=an())!==i&&(l=sn())!==i?r=n=[n,o,s,a,u,c,l]:(er=r,r=i)):(er=r,r=i),r===i&&(r=er,n=er,(o=an())===i&&(o=null),o!==i&&(s=un())!==i?n=o=[o,s]:(er=n,n=i),n===i&&(n=null),n!==i?("::"===e.substr(er,2)?(o="::",er+=2):(o=i,0===or&&fr(At)),o!==i&&(s=an())!==i&&(a=an())!==i&&(u=an())!==i&&(c=sn())!==i?r=n=[n,o,s,a,u,c]:(er=r,r=i)):(er=r,r=i),r===i&&(r=er,n=er,o=er,(s=an())!==i?((a=an())===i&&(a=null),a!==i?o=s=[s,a]:(er=o,o=i)):(er=o,o=i),o===i&&(o=null),o!==i&&(s=un())!==i?n=o=[o,s]:(er=n,n=i),n===i&&(n=null),n!==i?("::"===e.substr(er,2)?(o="::",er+=2):(o=i,0===or&&fr(At)),o!==i&&(s=an())!==i&&(a=an())!==i&&(u=sn())!==i?r=n=[n,o,s,a,u]:(er=r,r=i)):(er=r,r=i),r===i&&(r=er,n=er,o=er,(s=an())!==i?(a=er,(u=an())!==i?((c=an())===i&&(c=null),c!==i?a=u=[u,c]:(er=a,a=i)):(er=a,a=i),a===i&&(a=null),a!==i?o=s=[s,a]:(er=o,o=i)):(er=o,o=i),o===i&&(o=null),o!==i&&(s=un())!==i?n=o=[o,s]:(er=n,n=i),n===i&&(n=null),n!==i?("::"===e.substr(er,2)?(o="::",er+=2):(o=i,0===or&&fr(At)),o!==i&&(s=an())!==i&&(a=sn())!==i?r=n=[n,o,s,a]:(er=r,r=i)):(er=r,r=i),r===i&&(r=er,n=er,o=er,(s=an())!==i?(a=er,(u=an())!==i?(c=er,(l=an())!==i?((h=an())===i&&(h=null),h!==i?c=l=[l,h]:(er=c,c=i)):(er=c,c=i),c===i&&(c=null),c!==i?a=u=[u,c]:(er=a,a=i)):(er=a,a=i),a===i&&(a=null),a!==i?o=s=[s,a]:(er=o,o=i)):(er=o,o=i),o===i&&(o=null),o!==i&&(s=un())!==i?n=o=[o,s]:(er=n,n=i),n===i&&(n=null),n!==i?("::"===e.substr(er,2)?(o="::",er+=2):(o=i,0===or&&fr(At)),o!==i&&(s=sn())!==i?r=n=[n,o,s]:(er=r,r=i)):(er=r,r=i),r===i&&(r=er,n=er,o=er,(s=an())!==i?(a=er,(u=an())!==i?(c=er,(l=an())!==i?(h=er,(p=an())!==i?((f=an())===i&&(f=null),f!==i?h=p=[p,f]:(er=h,h=i)):(er=h,h=i),h===i&&(h=null),h!==i?c=l=[l,h]:(er=c,c=i)):(er=c,c=i),c===i&&(c=null),c!==i?a=u=[u,c]:(er=a,a=i)):(er=a,a=i),a===i&&(a=null),a!==i?o=s=[s,a]:(er=o,o=i)):(er=o,o=i),o===i&&(o=null),o!==i&&(s=un())!==i?n=o=[o,s]:(er=n,n=i),n===i&&(n=null),n!==i?("::"===e.substr(er,2)?(o="::",er+=2):(o=i,0===or&&fr(At)),o!==i&&(s=un())!==i?r=n=[n,o,s]:(er=r,r=i)):(er=r,r=i),r===i&&(r=er,n=er,o=er,(s=an())!==i?(a=er,(u=an())!==i?(c=er,(l=an())!==i?(h=er,(p=an())!==i?(f=er,(d=an())!==i?((g=an())===i&&(g=null),g!==i?f=d=[d,g]:(er=f,f=i)):(er=f,f=i),f===i&&(f=null),f!==i?h=p=[p,f]:(er=h,h=i)):(er=h,h=i),h===i&&(h=null),h!==i?c=l=[l,h]:(er=c,c=i)):(er=c,c=i),c===i&&(c=null),c!==i?a=u=[u,c]:(er=a,a=i)):(er=a,a=i),a===i&&(a=null),a!==i?o=s=[s,a]:(er=o,o=i)):(er=o,o=i),o===i&&(o=null),o!==i&&(s=un())!==i?n=o=[o,s]:(er=n,n=i),n===i&&(n=null),n!==i?("::"===e.substr(er,2)?(o="::",er+=2):(o=i,0===or&&fr(At)),o!==i?r=n=[n,o]:(er=r,r=i)):(er=r,r=i)))))))));t=r!==i?e.substring(t,er):r;return t}())===i&&(n=function(){var t,r,n,o,s,a,u;t=er,118===e.charCodeAt(er)?(r="v",er++):(r=i,0===or&&fr(ne));if(r!==i){if(n=er,o=[],(s=Zr())!==i)for(;s!==i;)o.push(s),s=Zr();else o=i;if((n=o!==i?e.substring(n,er):o)!==i)if(46===e.charCodeAt(er)?(o=".",er++):(o=i,0===or&&fr(O)),o!==i){if(s=er,a=[],(u=en())===i&&(58===e.charCodeAt(er)?(u=":",er++):(u=i,0===or&&fr(ot))),u!==i)for(;u!==i;)a.push(u),(u=en())===i&&(58===e.charCodeAt(er)?(u=":",er++):(u=i,0===or&&fr(ot)));else a=i;(s=a!==i?e.substring(s,er):a)!==i?t=r=[r,n,o,s]:(er=t,t=i)}else er=t,t=i;else er=t,t=i}else er=t,t=i;return t}()),n!==i?(93===e.charCodeAt(er)?(o="]",er++):(o=i,0===or&&fr(ge)),o!==i?t=r=[r,n,o]:(er=t,t=i)):(er=t,t=i)):(er=t,t=i);return t}())!==i?(n=er,or++,o=hn(),or--,o===i?n=void 0:(er=n,n=i),n!==i?t=r=[r,n]:(er=t,t=i)):(er=t,t=i);t===i&&(t=er,(r=cn())!==i?(n=er,or++,o=hn(),or--,o===i?n=void 0:(er=n,n=i),n!==i?t=r=[r,n]:(er=t,t=i)):(er=t,t=i),t===i&&(t=function(){var t,r,n;t=er,r=[],n=hn();for(;n!==i;)r.push(n),n=hn();t=r!==i?e.substring(t,er):r;return t}()));return t}())!==i?(o=er,58===e.charCodeAt(er)?(s=":",er++):(s=i,0===or&&fr(ot)),s!==i&&(a=function(){var t,r,n;t=er,r=[],n=Yr();for(;n!==i;)r.push(n),n=Yr();t=r!==i?e.substring(t,er):r;return t}())!==i?o=s=[s,a]:(er=o,o=i),o===i&&(o=null),o!==i?t=r=[r,n,o]:(er=t,t=i)):(er=t,t=i),t}function sn(){var t,r,n,o;return t=er,(r=un())!==i?(58===e.charCodeAt(er)?(n=":",er++):(n=i,0===or&&fr(ot)),n!==i&&(o=un())!==i?t=r=[r,n,o]:(er=t,t=i)):(er=t,t=i),t===i&&(t=cn()),t}function an(){var t,r,n;return t=er,(r=un())!==i?(58===e.charCodeAt(er)?(n=":",er++):(n=i,0===or&&fr(ot)),n!==i?t=r=[r,n]:(er=t,t=i)):(er=t,t=i),t}function un(){var t,r,n,o,s,a,u,c;return t=er,r=er,(n=Zr())!==i?(o=er,(s=Zr())!==i?(a=er,(u=Zr())!==i?((c=Zr())===i&&(c=null),c!==i?a=u=[u,c]:(er=a,a=i)):(er=a,a=i),a===i&&(a=null),a!==i?o=s=[s,a]:(er=o,o=i)):(er=o,o=i),o===i&&(o=null),o!==i?r=n=[n,o]:(er=r,r=i)):(er=r,r=i),t=r!==i?e.substring(t,er):r}function cn(){var t,r,n,o,s,a,u,c,l;return t=er,r=er,(n=ln())!==i?(46===e.charCodeAt(er)?(o=".",er++):(o=i,0===or&&fr(O)),o!==i&&(s=ln())!==i?(46===e.charCodeAt(er)?(a=".",er++):(a=i,0===or&&fr(O)),a!==i&&(u=ln())!==i?(46===e.charCodeAt(er)?(c=".",er++):(c=i,0===or&&fr(O)),c!==i&&(l=ln())!==i?r=n=[n,o,s,a,u,c,l]:(er=r,r=i)):(er=r,r=i)):(er=r,r=i)):(er=r,r=i),t=r!==i?e.substring(t,er):r}function ln(){var t,r,n,o,s;return t=er,r=er,"25"===e.substr(er,2)?(n="25",er+=2):(n=i,0===or&&fr(bt)),n!==i?(Ct.test(e.charAt(er))?(o=e.charAt(er),er++):(o=i,0===or&&fr(Ft)),o!==i?r=n=[n,o]:(er=r,r=i)):(er=r,r=i),r===i&&(r=er,50===e.charCodeAt(er)?(n="2",er++):(n=i,0===or&&fr(Et)),n!==i?(wt.test(e.charAt(er))?(o=e.charAt(er),er++):(o=i,0===or&&fr(Dt)),o!==i&&(s=Yr())!==i?r=n=[n,o,s]:(er=r,r=i)):(er=r,r=i),r===i&&(r=er,49===e.charCodeAt(er)?(n="1",er++):(n=i,0===or&&fr(Ze)),n!==i&&(o=Yr())!==i&&(s=Yr())!==i?r=n=[n,o,s]:(er=r,r=i),r===i&&(r=er,L.test(e.charAt(er))?(n=e.charAt(er),er++):(n=i,0===or&&fr(U)),n!==i&&(o=Yr())!==i?r=n=[n,o]:(er=r,r=i),r===i&&(r=Yr())))),t=r!==i?e.substring(t,er):r}function hn(){var e;return(e=en())===i&&(e=Xr()),e}function pn(){var t,r,n,o,s;for(t=er,r=[],n=er,47===e.charCodeAt(er)?(o="/",er++):(o=i,0===or&&fr(ue)),o!==i&&(s=mn())!==i?n=o=[o,s]:(er=n,n=i);n!==i;)r.push(n),n=er,47===e.charCodeAt(er)?(o="/",er++):(o=i,0===or&&fr(ue)),o!==i&&(s=mn())!==i?n=o=[o,s]:(er=n,n=i);return t=r!==i?e.substring(t,er):r}function fn(){var t,r,n,o,s,a,u,c,l;if(t=er,r=er,47===e.charCodeAt(er)?(n="/",er++):(n=i,0===or&&fr(ue)),n!==i){if(o=er,(s=yn())!==i){for(a=[],u=er,47===e.charCodeAt(er)?(c="/",er++):(c=i,0===or&&fr(ue)),c!==i&&(l=mn())!==i?u=c=[c,l]:(er=u,u=i);u!==i;)a.push(u),u=er,47===e.charCodeAt(er)?(c="/",er++):(c=i,0===or&&fr(ue)),c!==i&&(l=mn())!==i?u=c=[c,l]:(er=u,u=i);a!==i?o=s=[s,a]:(er=o,o=i)}else er=o,o=i;o===i&&(o=null),o!==i?r=n=[n,o]:(er=r,r=i)}else er=r,r=i;return t=r!==i?e.substring(t,er):r}function dn(){var t,r,n,o,s,a,u;if(t=er,r=er,(n=yn())!==i){for(o=[],s=er,47===e.charCodeAt(er)?(a="/",er++):(a=i,0===or&&fr(ue)),a!==i&&(u=mn())!==i?s=a=[a,u]:(er=s,s=i);s!==i;)o.push(s),s=er,47===e.charCodeAt(er)?(a="/",er++):(a=i,0===or&&fr(ue)),a!==i&&(u=mn())!==i?s=a=[a,u]:(er=s,s=i);o!==i?r=n=[n,o]:(er=r,r=i)}else er=r,r=i;return t=r!==i?e.substring(t,er):r}function gn(){return"",""}function mn(){var t,r,n;for(t=er,r=[],n=vn();n!==i;)r.push(n),n=vn();return t=r!==i?e.substring(t,er):r}function yn(){var t,r,n;if(t=er,r=[],(n=vn())!==i)for(;n!==i;)r.push(n),n=vn();else r=i;return t=r!==i?e.substring(t,er):r}function vn(){var t;return(t=en())===i&&(t=Xr())===i&&(t=Kr())===i&&(58===e.charCodeAt(er)?(t=":",er++):(t=i,0===or&&fr(ot)),t===i&&(64===e.charCodeAt(er)?(t="@",er++):(t=i,0===or&&fr(ut)))),t}function An(){var t,r,n;for(t=er,r=[],(n=vn())===i&&(47===e.charCodeAt(er)?(n="/",er++):(n=i,0===or&&fr(ue)),n===i&&(63===e.charCodeAt(er)?(n="?",er++):(n=i,0===or&&fr(st))));n!==i;)r.push(n),(n=vn())===i&&(47===e.charCodeAt(er)?(n="/",er++):(n=i,0===or&&fr(ue)),n===i&&(63===e.charCodeAt(er)?(n="?",er++):(n=i,0===or&&fr(st))));return t=r!==i?e.substring(t,er):r}function bn(){var t,r,n;for(t=er,r=[],(n=vn())===i&&(47===e.charCodeAt(er)?(n="/",er++):(n=i,0===or&&fr(ue)),n===i&&(63===e.charCodeAt(er)?(n="?",er++):(n=i,0===or&&fr(st))));n!==i;)r.push(n),(n=vn())===i&&(47===e.charCodeAt(er)?(n="/",er++):(n=i,0===or&&fr(ue)),n===i&&(63===e.charCodeAt(er)?(n="?",er++):(n=i,0===or&&fr(st))));return t=r!==i?e.substring(t,er):r}function Cn(){var t,r,n,o;return t=er,"abstract"===e.substr(er,8)?(r="abstract",er+=8):(r=i,0===or&&fr(Bt)),r!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?t=r=[r,n]:(er=t,t=i)):(er=t,t=i),t}function Fn(){var t,r,n,o;return t=er,"Integer"===e.substr(er,7)?(r="Integer",er+=7):(r=i,0===or&&fr(Ot)),r!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?(tr=t,t=r="Integer"):(er=t,t=i)):(er=t,t=i),t}function En(){var t,r,n,o;return t=er,"Double"===e.substr(er,6)?(r="Double",er+=6):(r=i,0===or&&fr(Rt)),r!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?(tr=t,t=r="Double"):(er=t,t=i)):(er=t,t=i),t}function wn(){var t,r,n,o;return t=er,"Long"===e.substr(er,4)?(r="Long",er+=4):(r=i,0===or&&fr(_t)),r!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?(tr=t,t=r="Long"):(er=t,t=i)):(er=t,t=i),t}function Dn(){var t,r,n,o;return t=er,"String"===e.substr(er,6)?(r="String",er+=6):(r=i,0===or&&fr(jt)),r!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?(tr=t,t=r="String"):(er=t,t=i)):(er=t,t=i),t}function xn(){var t,r,n,o;return t=er,"DateTime"===e.substr(er,8)?(r="DateTime",er+=8):(r=i,0===or&&fr($t)),r!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?(tr=t,t=r="DateTime"):(er=t,t=i)):(er=t,t=i),t}function Bn(){var t,r,n,o;return t=er,"Boolean"===e.substr(er,7)?(r="Boolean",er+=7):(r=i,0===or&&fr(Pt)),r!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?(tr=t,t=r="Boolean"):(er=t,t=i)):(er=t,t=i),t}function Tn(){var e;return(e=Dn())===i&&(e=function(){var e;return(e=Fn())===i&&(e=En())===i&&(e=wn()),e}())===i&&(e=xn())===i&&(e=Bn()),e}function Nn(){var t;return(t=function(){var t,r,n;return t=er,"identified by"===e.substr(er,13)?(r="identified by",er+=13):(r=i,0===or&&fr(Qt)),r!==i&&Gr()!==i&&(n=Fr())!==i?(tr=t,t=r=n):(er=t,t=i),t}())===i&&(t=function(){var t,r;return t=er,"identified"===e.substr(er,10)?(r="identified",er+=10):(r=i,0===or&&fr(Lt)),r!==i&&(tr=t,r={name:"$identifier"}),t=r}()),t}function Mn(){var e,t;return e=er,(t=Or())!==i&&(tr=e,t={type:"String",value:t.value,location:ar()}),e=t}function In(){var t,r;return t=er,(r=function(){var t,r,n,o;return t=er,r=er,45===e.charCodeAt(er)?(n="-",er++):(n=i,0===or&&fr(yt)),n===i&&(n=null),(r=n!==i?e.substring(r,er):n)!==i?(n=er,(n=(o=Br())!==i?e.substring(n,er):o)!==i?(tr=t,t=r=r+n):(er=t,t=i)):(er=t,t=i),t}())!==i&&(tr=t,r={type:"Number",value:+r,location:ar()}),t=r}function kn(){var t,r,n;return t=er,r=er,(r=(n=xr())!==i?e.substring(r,er):n)!==i&&(tr=t,r={type:"Boolean",value:"true"==r,location:ar()}),t=r}function Sn(){var t,r,n,o,s;return t=er,(r=Fr())!==i&&Gr()!==i?("[]"===e.substr(er,2)?(n="[]",er+=2):(n=i,0===or&&fr(Ut)),n===i&&(n=null),n!==i?(tr=t,o=r,s=n,t=r={type:"Identifier",value:Object.assign({array:!!s},o),location:ar()}):(er=t,t=i)):(er=t,t=i),t}function On(){var e;return(e=Mn())===i&&(e=kn())===i&&(e=In())===i&&(e=Sn()),e}function Rn(){var t,r,n,o,s,a,u,c;if(t=er,40===e.charCodeAt(er)?(r="(",er++):(r=i,0===or&&fr(ht)),r!==i)if(Gr()!==i){for(n=[],o=er,(s=On())!==i&&(a=Gr())!==i?(44===e.charCodeAt(er)?(u=",",er++):(u=i,0===or&&fr(gt)),u!==i&&Gr()!==i?(tr=o,o=s=s):(er=o,o=i)):(er=o,o=i);o!==i;)n.push(o),o=er,(s=On())!==i&&(a=Gr())!==i?(44===e.charCodeAt(er)?(u=",",er++):(u=i,0===or&&fr(gt)),u!==i&&Gr()!==i?(tr=o,o=s=s):(er=o,o=i)):(er=o,o=i);n!==i?((o=On())===i&&(o=null),o!==i&&(s=Gr())!==i?(41===e.charCodeAt(er)?(a=")",er++):(a=i,0===or&&fr(pt)),a!==i?(tr=t,c=o,t=r={type:"DecoratorArguments",list:n.concat(c),location:ar()}):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)}else er=t,t=i;else er=t,t=i;return t}function _n(){var t,r,n,o;return t=er,64===e.charCodeAt(er)?(r="@",er++):(r=i,0===or&&fr(ut)),r!==i?(n=er,(n=(o=Fr())!==i?e.substring(n,er):o)!==i?((o=Rn())===i&&(o=null),o!==i?(tr=t,t=r={type:"Decorator",name:n,arguments:o,location:ar()}):(er=t,t=i)):(er=t,t=i)):(er=t,t=i),t}function jn(){var e,t,r;for(e=[],t=er,(r=_n())!==i&&Gr()!==i?(tr=t,t=r=r):(er=t,t=i);t!==i;)e.push(t),t=er,(r=_n())!==i&&Gr()!==i?(tr=t,t=r=r):(er=t,t=i);return e}function $n(){var t,r,n,o,s,a,u,c,l;return t=er,(r=jn())!==i&&Gr()!==i?((n=Cn())===i&&(n=null),n!==i&&Gr()!==i&&function(){var t,r,n,o;return t=er,"asset"===e.substr(er,5)?(r="asset",er+=5):(r=i,0===or&&fr(Nt)),r!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?t=r=[r,n]:(er=t,t=i)):(er=t,t=i),t}()!==i&&Gr()!==i&&(o=Fr())!==i&&Gr()!==i?((s=Nn())===i&&(s=null),s!==i&&Gr()!==i?((a=Qn())===i&&(a=null),a!==i&&Gr()!==i?(123===e.charCodeAt(er)?(u="{",er++):(u=i,0===or&&fr(zt)),u!==i&&Gr()!==i&&(c=Jn())!==i&&Gr()!==i?(125===e.charCodeAt(er)?(l="}",er++):(l=i,0===or&&fr(He)),l!==i?(tr=t,t=r={type:"AssetDeclaration",id:o,classExtension:a,idField:s,body:c,abstract:n,decorators:r,location:ar()}):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i),t}function Pn(){var t,r,n,o,s,a,u,c,l;return t=er,(r=jn())!==i&&Gr()!==i?((n=Cn())===i&&(n=null),n!==i&&Gr()!==i&&function(){var t,r,n,o;return t=er,"participant"===e.substr(er,11)?(r="participant",er+=11):(r=i,0===or&&fr(kt)),r!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?t=r=[r,n]:(er=t,t=i)):(er=t,t=i),t}()!==i&&Gr()!==i&&(o=Fr())!==i&&Gr()!==i?((s=Nn())===i&&(s=null),s!==i&&Gr()!==i?((a=Qn())===i&&(a=null),a!==i&&Gr()!==i?(123===e.charCodeAt(er)?(u="{",er++):(u=i,0===or&&fr(zt)),u!==i&&Gr()!==i&&(c=Jn())!==i&&Gr()!==i?(125===e.charCodeAt(er)?(l="}",er++):(l=i,0===or&&fr(He)),l!==i?(tr=t,t=r={type:"ParticipantDeclaration",id:o,classExtension:a,idField:s,body:c,abstract:n,decorators:r,location:ar()}):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i),t}function Qn(){var t,r,n;return t=er,"extends"===e.substr(er,7)?(r="extends",er+=7):(r=i,0===or&&fr(qt)),r!==i&&Gr()!==i&&(n=Fr())!==i?(tr=t,t=r={type:"ClassExtension",class:n}):(er=t,t=i),t}function Ln(){var t,r,n,o,s,a,u,c,l;return t=er,(r=jn())!==i&&Gr()!==i?((n=Cn())===i&&(n=null),n!==i&&Gr()!==i&&function(){var t,r,n,o;return t=er,"transaction"===e.substr(er,11)?(r="transaction",er+=11):(r=i,0===or&&fr(Mt)),r!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?t=r=[r,n]:(er=t,t=i)):(er=t,t=i),t}()!==i&&Gr()!==i&&(o=Fr())!==i&&Gr()!==i?((s=Nn())===i&&(s=null),s!==i&&Gr()!==i?((a=Qn())===i&&(a=null),a!==i&&Gr()!==i?(123===e.charCodeAt(er)?(u="{",er++):(u=i,0===or&&fr(zt)),u!==i&&Gr()!==i&&(c=Jn())!==i&&Gr()!==i?(125===e.charCodeAt(er)?(l="}",er++):(l=i,0===or&&fr(He)),l!==i?(tr=t,t=r={type:"TransactionDeclaration",id:o,classExtension:a,body:c,idField:s,abstract:n,decorators:r,location:ar()}):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i),t}function Un(){var t,r,n,o,s,a,u,c,l;return t=er,(r=jn())!==i&&Gr()!==i?((n=Cn())===i&&(n=null),n!==i&&Gr()!==i&&function(){var t,r,n,o;return t=er,"event"===e.substr(er,5)?(r="event",er+=5):(r=i,0===or&&fr(It)),r!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?t=r=[r,n]:(er=t,t=i)):(er=t,t=i),t}()!==i&&Gr()!==i&&(o=Fr())!==i&&Gr()!==i?((s=Nn())===i&&(s=null),s!==i&&Gr()!==i?((a=Qn())===i&&(a=null),a!==i&&Gr()!==i?(123===e.charCodeAt(er)?(u="{",er++):(u=i,0===or&&fr(zt)),u!==i&&Gr()!==i&&(c=Jn())!==i&&Gr()!==i?(125===e.charCodeAt(er)?(l="}",er++):(l=i,0===or&&fr(He)),l!==i?(tr=t,t=r={type:"EventDeclaration",id:o,classExtension:a,body:c,idField:s,abstract:n,decorators:r,location:ar()}):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i),t}function zn(){var t,r,n,o,s,a,u,c,l;return t=er,(r=jn())!==i&&Gr()!==i?((n=Cn())===i&&(n=null),n!==i&&Gr()!==i&&function(){var t,r,n,o;return t=er,"concept"===e.substr(er,7)?(r="concept",er+=7):(r=i,0===or&&fr(Tt)),r!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?t=r=[r,n]:(er=t,t=i)):(er=t,t=i),t}()!==i&&Gr()!==i&&(o=Fr())!==i&&Gr()!==i?((s=Nn())===i&&(s=null),s!==i&&Gr()!==i?((a=Qn())===i&&(a=null),a!==i&&Gr()!==i?(123===e.charCodeAt(er)?(u="{",er++):(u=i,0===or&&fr(zt)),u!==i&&Gr()!==i&&(c=Jn())!==i&&Gr()!==i?(125===e.charCodeAt(er)?(l="}",er++):(l=i,0===or&&fr(He)),l!==i?(tr=t,t=r={type:"ConceptDeclaration",id:o,classExtension:a,body:c,idField:s,abstract:n,decorators:r,location:ar()}):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i),t}function qn(){var t,r;return t=er,"optional"===e.substr(er,8)?(r="optional",er+=8):(r=i,0===or&&fr(Vt)),r!==i&&(tr=t,r={type:"Optional"}),t=r}function Vn(){var t,r,n,o;return t=er,"default"===e.substr(er,7)?(r="default",er+=7):(r=i,0===or&&fr(Ht)),r!==i&&Gr()!==i?(61===e.charCodeAt(er)?(n="=",er++):(n=i,0===or&&fr(mt)),n!==i&&Gr()!==i&&(o=Or())!==i?(tr=t,t=r=o.value):(er=t,t=i)):(er=t,t=i),t}function Hn(){var t;return(t=function(){var t,r,n,o,s,a,u,c;t=er,(r=jn())!==i&&Gr()!==i?(111===e.charCodeAt(er)?(n="o",er++):(n=i,0===or&&fr(Jt)),n!==i&&Gr()!==i&&Dn()!==i&&Gr()!==i?("[]"===e.substr(er,2)?(o="[]",er+=2):(o=i,0===or&&fr(Ut)),o===i&&(o=null),o!==i&&Gr()!==i&&(s=Fr())!==i&&Gr()!==i?((a=Vn())===i&&(a=null),a!==i&&Gr()!==i?((u=function(){var t,r,n,o,s;t=er,"regex"===e.substr(er,5)?(r="regex",er+=5):(r=i,0===or&&fr(Gt));r!==i&&Gr()!==i?(61===e.charCodeAt(er)?(n="=",er++):(n=i,0===or&&fr(mt)),n!==i&&Gr()!==i?(o=er,s=Lr(),(o=s!==i?e.substring(o,er):s)!==i?(tr=t,t=r=o):(er=t,t=i)):(er=t,t=i)):(er=t,t=i);return t}())===i&&(u=null),u!==i&&Gr()!==i?((c=qn())===i&&(c=null),c!==i&&Gr()!==i?(tr=t,r={type:"FieldDeclaration",id:s,propertyType:{name:"String"},array:o,regex:u,default:a,optional:c,decorators:r,location:ar()},t=r):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i);return t}())===i&&(t=function(){var t,r,n,o,s,a,u,c,l;t=er,(r=jn())!==i&&Gr()!==i?(111===e.charCodeAt(er)?(n="o",er++):(n=i,0===or&&fr(Jt)),n!==i&&Gr()!==i&&(o=En())!==i&&Gr()!==i?("[]"===e.substr(er,2)?(s="[]",er+=2):(s=i,0===or&&fr(Ut)),s===i&&(s=null),s!==i&&Gr()!==i&&(a=Fr())!==i&&Gr()!==i?((u=function(){var t,r,n,o,s;return t=er,"default"===e.substr(er,7)?(r="default",er+=7):(r=i,0===or&&fr(Ht)),r!==i&&Gr()!==i?(61===e.charCodeAt(er)?(n="=",er++):(n=i,0===or&&fr(mt)),n!==i&&Gr()!==i?(o=er,(o=(s=Tr())!==i?e.substring(o,er):s)!==i?(tr=t,t=r=o):(er=t,t=i)):(er=t,t=i)):(er=t,t=i),t}())===i&&(u=null),u!==i&&Gr()!==i?((c=function(){var t,r,n,o,s,a,u,c,l,h;t=er,"range"===e.substr(er,5)?(r="range",er+=5):(r=i,0===or&&fr(Wt));r!==i&&Gr()!==i?(61===e.charCodeAt(er)?(n="=",er++):(n=i,0===or&&fr(mt)),n!==i&&Gr()!==i?(91===e.charCodeAt(er)?(o="[",er++):(o=i,0===or&&fr(de)),o!==i&&Gr()!==i?(s=er,(a=Tr())===i&&(a=null),(s=a!==i?e.substring(s,er):a)!==i&&(a=Gr())!==i?(44===e.charCodeAt(er)?(u=",",er++):(u=i,0===or&&fr(gt)),u!==i&&Gr()!==i?(c=er,(l=Tr())===i&&(l=null),(c=l!==i?e.substring(c,er):l)!==i&&(l=Gr())!==i?(93===e.charCodeAt(er)?(h="]",er++):(h=i,0===or&&fr(ge)),h!==i?(tr=t,r=Yt(s,c),t=r):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i);return t}())===i&&(c=null),c!==i&&Gr()!==i?((l=qn())===i&&(l=null),l!==i&&Gr()!==i?(tr=t,r=Zt(r,o,s,a,u,c,l),t=r):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i);return t}())===i&&(t=function(){var t,r,n,o,s,a,u;t=er,(r=jn())!==i&&Gr()!==i?(111===e.charCodeAt(er)?(n="o",er++):(n=i,0===or&&fr(Jt)),n!==i&&Gr()!==i&&Bn()!==i&&Gr()!==i?("[]"===e.substr(er,2)?(o="[]",er+=2):(o=i,0===or&&fr(Ut)),o===i&&(o=null),o!==i&&Gr()!==i&&(s=Fr())!==i&&Gr()!==i?((a=function(){var t,r,n,o,s;return t=er,"default"===e.substr(er,7)?(r="default",er+=7):(r=i,0===or&&fr(Ht)),r!==i&&Gr()!==i?(61===e.charCodeAt(er)?(n="=",er++):(n=i,0===or&&fr(mt)),n!==i&&Gr()!==i?(o=er,(o=(s=xr())!==i?e.substring(o,er):s)!==i?(tr=t,t=r=o):(er=t,t=i)):(er=t,t=i)):(er=t,t=i),t}())===i&&(a=null),a!==i&&Gr()!==i?((u=qn())===i&&(u=null),u!==i&&Gr()!==i?(tr=t,r={type:"FieldDeclaration",id:s,propertyType:{name:"Boolean"},array:o,default:a,optional:u,decorators:r,location:ar()},t=r):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i);return t}())===i&&(t=function(){var t,r,n,o,s,a,u;t=er,(r=jn())!==i&&Gr()!==i?(111===e.charCodeAt(er)?(n="o",er++):(n=i,0===or&&fr(Jt)),n!==i&&Gr()!==i&&xn()!==i&&Gr()!==i?("[]"===e.substr(er,2)?(o="[]",er+=2):(o=i,0===or&&fr(Ut)),o===i&&(o=null),o!==i&&Gr()!==i&&(s=Fr())!==i&&Gr()!==i?((a=Vn())===i&&(a=null),a!==i&&Gr()!==i?((u=qn())===i&&(u=null),u!==i&&Gr()!==i?(tr=t,r={type:"FieldDeclaration",id:s,propertyType:{name:"DateTime"},array:o,default:a,optional:u,decorators:r,location:ar()},t=r):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i);return t}())===i&&(t=function(){var t,r,n,o,s,a,u;t=er,(r=jn())!==i&&Gr()!==i?("--\x3e"===e.substr(er,3)?(n="--\x3e",er+=3):(n=i,0===or&&fr(Xt)),n!==i&&Gr()!==i&&(o=Fr())!==i&&Gr()!==i?("[]"===e.substr(er,2)?(s="[]",er+=2):(s=i,0===or&&fr(Ut)),s===i&&(s=null),s!==i&&Gr()!==i&&(a=Fr())!==i&&Gr()!==i?((u=qn())===i&&(u=null),u!==i&&Gr()!==i?(tr=t,r={type:"RelationshipDeclaration",id:a,propertyType:o,array:s,optional:u,decorators:r,location:ar()},t=r):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i);return t}())===i&&(t=function(){var t,r,n,o,s,a,u,c;t=er,(r=jn())!==i&&Gr()!==i?(111===e.charCodeAt(er)?(n="o",er++):(n=i,0===or&&fr(Jt)),n!==i&&Gr()!==i&&(o=function(){var e,t,r,n,o;return e=er,t=er,or++,r=Tn(),or--,r===i?t=void 0:(er=t,t=i),t!==i&&(r=Fr())!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?(tr=e,e=t=r):(er=e,e=i)):(er=e,e=i),e}())!==i&&Gr()!==i?("[]"===e.substr(er,2)?(s="[]",er+=2):(s=i,0===or&&fr(Ut)),s===i&&(s=null),s!==i&&Gr()!==i&&(a=Fr())!==i&&Gr()!==i?((u=Vn())===i&&(u=null),u!==i&&Gr()!==i?((c=qn())===i&&(c=null),c!==i&&Gr()!==i?(tr=t,r={type:"FieldDeclaration",id:a,propertyType:o,array:s,default:u,optional:c,decorators:r,location:ar()},t=r):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i);return t}())===i&&(t=function(){var t,r,n,o,s,a,u,c,l;t=er,(r=jn())!==i&&Gr()!==i?(111===e.charCodeAt(er)?(n="o",er++):(n=i,0===or&&fr(Jt)),n!==i&&Gr()!==i&&(o=function(){var e;return(e=Fn())===i&&(e=wn()),e}())!==i&&Gr()!==i?("[]"===e.substr(er,2)?(s="[]",er+=2):(s=i,0===or&&fr(Ut)),s===i&&(s=null),s!==i&&Gr()!==i&&(a=Fr())!==i&&Gr()!==i?((u=function(){var t,r,n,o,s;return t=er,"default"===e.substr(er,7)?(r="default",er+=7):(r=i,0===or&&fr(Ht)),r!==i&&Gr()!==i?(61===e.charCodeAt(er)?(n="=",er++):(n=i,0===or&&fr(mt)),n!==i&&Gr()!==i?(o=er,(o=(s=kr())!==i?e.substring(o,er):s)!==i?(tr=t,t=r=o):(er=t,t=i)):(er=t,t=i)):(er=t,t=i),t}())===i&&(u=null),u!==i&&Gr()!==i?((c=function(){var t,r,n,o,s,a,u,c,l,h;t=er,"range"===e.substr(er,5)?(r="range",er+=5):(r=i,0===or&&fr(Wt));r!==i&&Gr()!==i?(61===e.charCodeAt(er)?(n="=",er++):(n=i,0===or&&fr(mt)),n!==i&&Gr()!==i?(91===e.charCodeAt(er)?(o="[",er++):(o=i,0===or&&fr(de)),o!==i&&Gr()!==i?(s=er,(a=kr())===i&&(a=null),(s=a!==i?e.substring(s,er):a)!==i&&(a=Gr())!==i?(44===e.charCodeAt(er)?(u=",",er++):(u=i,0===or&&fr(gt)),u!==i&&Gr()!==i?(c=er,(l=kr())===i&&(l=null),(c=l!==i?e.substring(c,er):l)!==i&&(l=Gr())!==i?(93===e.charCodeAt(er)?(h="]",er++):(h=i,0===or&&fr(ge)),h!==i?(tr=t,r=Yt(s,c),t=r):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i);return t}())===i&&(c=null),c!==i&&Gr()!==i?((l=qn())===i&&(l=null),l!==i&&Gr()!==i?(tr=t,r=Zt(r,o,s,a,u,c,l),t=r):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i)):(er=t,t=i);return t}()),t}function Jn(){var e,t,r;for(e=er,t=[],r=Hn();r!==i;)t.push(r),r=Hn();return t!==i&&(tr=e,t={type:"ClassDeclarationBody",declarations:ti(t),location:ar()}),e=t}function Gn(){var t,r,n,o,s,a;return t=er,(r=jn())!==i&&Gr()!==i&&function(){var t,r,n,o;return t=er,"enum"===e.substr(er,4)?(r="enum",er+=4):(r=i,0===or&&fr(Qe)),r!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?t=r=[r,n]:(er=t,t=i)):(er=t,t=i),t}()!==i&&Gr()!==i&&(n=Fr())!==i&&Gr()!==i?(123===e.charCodeAt(er)?(o="{",er++):(o=i,0===or&&fr(zt)),o!==i&&Gr()!==i&&(s=function(){var e,t,r;e=er,t=[],r=Wn();for(;r!==i;)t.push(r),r=Wn();t!==i&&(tr=e,t={type:"EnumDeclarationBody",declarations:ti(t)});return e=t}())!==i&&Gr()!==i?(125===e.charCodeAt(er)?(a="}",er++):(a=i,0===or&&fr(He)),a!==i?(tr=t,t=r={type:"EnumDeclaration",id:n,body:s,decorators:r,location:ar()}):(er=t,t=i)):(er=t,t=i)):(er=t,t=i),t}function Wn(){var t,r,n,o,s;return t=er,(r=jn())!==i&&Gr()!==i?(111===e.charCodeAt(er)?(n="o",er++):(n=i,0===or&&fr(Jt)),n!==i&&Gr()!==i&&(o=Fr())!==i&&Gr()!==i?((s=qn())===i&&(s=null),s!==i&&Gr()!==i?(tr=t,t=r={type:"EnumPropertyDeclaration",id:o,optional:s,decorators:r,location:ar()}):(er=t,t=i)):(er=t,t=i)):(er=t,t=i),t}function Yn(){var t,r,n,o,s,a,u,c;if(t=er,r=er,(r=(n=Fr())!==i?e.substring(r,er):n)!==i){for(n=er,o=[],s=er,46===e.charCodeAt(er)?(a=".",er++):(a=i,0===or&&fr(O)),a!==i&&(u=Fr())!==i?s=a=[a,u]:(er=s,s=i);s!==i;)o.push(s),s=er,46===e.charCodeAt(er)?(a=".",er++):(a=i,0===or&&fr(O)),a!==i&&(u=Fr())!==i?s=a=[a,u]:(er=s,s=i);(n=o!==i?e.substring(n,er):o)!==i?(tr=t,c=n,t=r=r.concat(JSON.stringify(c).replace(/['"]+/g,""))):(er=t,t=i)}else er=t,t=i;return t}function Zn(){var t,r,n,o,s,a,u;return t=er,Jr()!==i&&Gr()!==i?(r=er,n=er,(o=Yn())!==i?(".*"===e.substr(er,2)?(s=".*",er+=2):(s=i,0===or&&fr(Kt)),s===i&&(s=null),s!==i?n=o=[o,s]:(er=n,n=i)):(er=n,n=i),(r=n!==i?e.substring(r,er):n)!==i&&(n=Gr())!==i&&(o=function(){var t,r,n,o;return t=er,"from"===e.substr(er,4)?(r="from",er+=4):(r=i,0===or&&fr(St)),r!==i?(n=er,or++,o=wr(),or--,o===i?n=void 0:(er=n,n=i),n!==i?t=r=[r,n]:(er=t,t=i)):(er=t,t=i),t}())!==i&&(s=Gr())!==i?(a=er,(a=(u=tn())!==i?e.substring(a,er):u)!==i&&(u=Gr())!==i?(tr=t,t={namespace:r,uri:a}):(er=t,t=i)):(er=t,t=i)):(er=t,t=i),t}function Xn(){var t;return(t=Zn())===i&&(t=function(){var t,r,n,o,s;return t=er,Jr()!==i&&Gr()!==i?(r=er,n=er,(o=Yn())!==i?(".*"===e.substr(er,2)?(s=".*",er+=2):(s=i,0===or&&fr(Kt)),s===i&&(s=null),s!==i?n=o=[o,s]:(er=n,n=i)):(er=n,n=i),(r=n!==i?e.substring(r,er):n)!==i&&(n=Gr())!==i?(tr=t,t={namespace:r}):(er=t,t=i)):(er=t,t=i),t}()),t}function Kn(){var e;return(e=$n())===i&&(e=Ln())===i&&(e=Un())===i&&(e=Pn())===i&&(e=Gn())===i&&(e=zn()),e}function ei(e,t,r){return[e].concat(function(e,t){var r,n=new Array(e.length);for(r=0;r=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},function(e,t,r){"use strict";var n=r(1);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(59);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},function(e,t,r){"use strict";var n=r(134),i=r(135);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=A,t.resolve=function(e,t){return A(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?A(e,!1,!0).resolveObject(t):t},t.format=function(e){i.isString(e)&&(e=A(e));return e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),h=["%","/","?",";","#"].concat(l),p=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=r(136);function A(e,t,r){if(e&&i.isObject(e)&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o127?S+="x":S+=k[O];if(!S.match(f)){var _=M.slice(0,B),j=M.slice(B+1),$=k.match(d);$&&(_.push($[1]),j.unshift($[2])),j.length&&(A="/"+j.join(".")+A),this.hostname=_.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),N||(this.hostname=n.toASCII(this.hostname));var P=this.port?":"+this.port:"",Q=this.hostname||"";this.host=Q+P,this.href+=this.host,N&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==A[0]&&(A="/"+A))}if(!g[F])for(B=0,I=l.length;B0)&&r.host.split("@"))&&(r.auth=N.shift(),r.host=r.hostname=N.shift());return r.search=e.search,r.query=e.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var D=E.slice(-1)[0],x=(r.host||e.host||E.length>1)&&("."===D||".."===D)||""===D,B=0,T=E.length;T>=0;T--)"."===(D=E[T])?E.splice(T,1):".."===D?(E.splice(T,1),B++):B&&(E.splice(T,1),B--);if(!C&&!F)for(;B--;B)E.unshift("..");!C||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),x&&"/"!==E.join("/").substr(-1)&&E.push("");var N,M=""===E[0]||E[0]&&"/"===E[0].charAt(0);w&&(r.hostname=r.host=M?"":E.length?E.shift():"",(N=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=N.shift(),r.host=r.hostname=N.shift()));return(C=C||r.host&&E.length)&&!M&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,r){(function(e,n){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){t&&t.nodeType,e&&e.nodeType;var s="object"==typeof n&&n;s.global!==s&&s.window!==s&&s.self;var a,u=2147483647,c=/^xn--/,l=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,d=String.fromCharCode;function g(e){throw new RangeError(p[e])}function m(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function y(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+m((e=e.replace(h,".")).split("."),t).join(".")}function v(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=d((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=d(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function C(e,t,r){var n=0;for(e=r?f(e/700):e>>1,e+=f(e/t);e>455;n+=36)e=f(e/35);return f(n+36*e/(e+38))}function F(e){var t,r,n,i,o,s,a,c,l,h,p,d=[],m=e.length,y=0,v=128,b=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&g("not-basic"),d.push(e.charCodeAt(n));for(i=r>0?r+1:0;i=m&&g("invalid-input"),((c=(p=e.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:36)>=36||c>f((u-y)/s))&&g("overflow"),y+=c*s,!(c<(l=a<=b?1:a>=b+26?26:a-b));a+=36)s>f(u/(h=36-l))&&g("overflow"),s*=h;b=C(y-o,t=d.length+1,0==o),f(y/t)>u-v&&g("overflow"),v+=f(y/t),y%=t,d.splice(y++,0,v)}return A(d)}function E(e){var t,r,n,i,o,s,a,c,l,h,p,m,y,A,F,E=[];for(m=(e=v(e)).length,t=128,r=0,o=72,s=0;s=t&&pf((u-r)/(y=n+1))&&g("overflow"),r+=(a-t)*y,t=a,s=0;su&&g("overflow"),p==t){for(c=r,l=36;!(c<(h=l<=o?1:l>=o+26?26:l-o));l+=36)F=c-h,A=36-h,E.push(d(b(h+F%A,0))),c=f(F/A);E.push(d(b(c,0))),o=C(r,y,n==i),r=0,++n}++r,++t}return E.join("")}a={version:"1.4.1",ucs2:{decode:v,encode:A},decode:F,encode:E,toASCII:function(e){return y(e,(function(e){return l.test(e)?"xn--"+E(e):e}))},toUnicode:function(e){return y(e,(function(e){return c.test(e)?F(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return a}.call(t,r,t,e))||(e.exports=i)}()}).call(this,r(27)(e),r(42))},function(e,t,r){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,r){"use strict";t.decode=t.parse=r(137),t.encode=t.stringify=r(138)},function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,o){t=t||"&",r=r||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l=0?(h=g.substr(0,m),p=g.substr(m+1)):(h=g,p=""),f=decodeURIComponent(h),d=decodeURIComponent(p),n(s,f)?i(s[f])?s[f].push(d):s[f]=[s[f],d]:s[f]=d}return s};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,r){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?o(s(e),(function(s){var a=encodeURIComponent(n(s))+r;return i(e[s])?o(e[s],(function(e){return a+encodeURIComponent(n(e))})).join(t):a+encodeURIComponent(n(e[s]))})).join(t):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n=-1&&!i;o--){var s=o>=0?arguments[o]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,i="/"===s.charAt(0))}return(i?"/":"")+(t=r(n(t.split("/"),(function(e){return!!e})),!i).join("/"))||"."},t.normalize=function(e){var o=t.isAbsolute(e),s="/"===i(e,-1);return(e=r(n(e.split("/"),(function(e){return!!e})),!o).join("/"))||o||(e="."),e&&s&&(e+="/"),(o?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(n(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,r){function n(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var i=n(e.split("/")),o=n(r.split("/")),s=Math.min(i.length,o.length),a=s,u=0;u=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){n=o;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"/":e.slice(0,n)},t.basename=function(e,t){var r=function(e){"string"!=typeof e&&(e+="");var t,r=0,n=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){r=t+1;break}}else-1===n&&(i=!1,n=t+1);return-1===n?"":e.slice(r,n)}(e);return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,r=0,n=-1,i=!0,o=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===n&&(i=!1,n=s+1),46===a?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){r=s+1;break}}return-1===t||-1===n||0===o||1===o&&t===n-1&&t===r+1?"":e.slice(t,n)};var i="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,r(5))},function(e,t,r){"use strict";e.exports=e=>{const t=/^\\\\\?\\/.test(e),r=/[^\u0000-\u0080]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}},function(e,t,r){"use strict";const n=r(143),i=r(25)("concerto:ModelFileDownloader");e.exports=class extends n{constructor(e,t=0,r=0){super(t,r),this.modelFileLoader=e,this.results=[]}downloadExternalDependencies(e,t){const r="downloadExternalDependencies";i(r);const n=new Promise((n,o)=>{let s=0;const a=new Set;t||(t={}),e.forEach(e=>{const r=e.getExternalImports();Object.keys(r).forEach(e=>{const n=r[e];s++,this.addJob({downloadedUris:a,url:n,options:t})})}),this.on("queueError",(e,t)=>{const r=e.response&&e.response.status&&200!==e.response.status,n=e.code&&"ENOTFOUND"===e.code;if(r||n){const e=new Error(`Unable to download external model dependency '${t[0].url}'`);return e.code="MISSING_DEPENDENCY",o(e)}o(new Error("Failed to load model file. Queue: "+t+" Details: "+e))}),this.on("jobAdd",(e,t)=>{i(r,"Downloading",e.options.url)}),this.on("jobFinish",(e,t)=>{0===t.length?(this.results.forEach(e=>{i(r,"Loaded namespace",e.getNamespace())}),n(this.results)):i(r,"Downloaded",e.options.url)}),0===s&&n([])});return i(r),n}runJob(e){const t=e.downloadedUris,r=e.options,n=e.url;return t.add(n),i("runJob","Loading",n),this.modelFileLoader.load(n,r).then(e=>{this.results.push(e);const n=new Set,i=e.getExternalImports();return Object.keys(i).forEach(e=>{const t=i[e];n.add(t)}),n.forEach(e=>{t.has(e)||this.addJob({options:r,url:e,downloadedUris:t})}),e}).catch(e=>{throw e})}}},function(e,t,r){"use strict";const n=r(144);e.exports=class extends n{constructor(e=0,t=0){super(),this.startDelay=e,this.jobDelay=t,this.jobs=[],this.timer=!1,this.jobRunning=!1}addJob(e){this.jobs.push(e),this.emit("jobAdd",e,this.jobs),this.startDelay&&this.jobs.length<2?this.timer=setTimeout(()=>this.processQueue(!0),this.startDelay):this.processQueue()}deleteJob(e){this.jobs[e]?(this.jobs.splice(e,1),this.emit("jobRemove",this.jobs)):this.emit("queueError",new Error("Attempted to delete job that cannot be found: "+e),this.jobs)}processQueue(e){if(e&&(this.timer=!1),this.jobs.length<1)return;if(this.jobRunning||this.timer)return void setTimeout(()=>this.processQueue(),500);const t=this.jobs.findIndex(e=>!!e),r=()=>{this.jobRunning=!1;const e=this.jobs[t];this.deleteJob(t),this.emit("jobFinish",e,this.jobs),this.timer=setTimeout(()=>{this.processQueue(!0)},this.jobDelay)};this.jobRunning=!0,this.emit("jobStart",this.jobs[t],this.jobs),this.runJob(this.jobs[t]).then(r).catch(e=>{this.emit("queueError",e,this.jobs),r()})}getQueue(){return this.jobs}runJob(e){throw new Error("runJob method must be subclassed.")}}},function(e,t,r){"use strict";var n,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(r,n){function i(){void 0!==o&&e.removeListener("error",o),r([].slice.call(arguments))}var o;"error"!==t&&(o=function(r){e.removeListener(t,i),n(r)},e.once("error",o)),e.once(t,i)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function h(e,t,r,n){var i,o,s,a;if(c(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=l(e))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return e}function p(){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 f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=p.bind(n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)o(u,this,t);else{var c=u.length,l=m(u,c);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},a.prototype.listenerCount=g,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){"use strict";const n=r(3),i=r(4),o=r(6),s=r(13),a=r(20),u=r(0),c=r(11);e.exports=class{constructor(e,t,r,n,i){this.convertResourcesToRelationships=e,this.permitResourcesForRelationships=t,this.deduplicateResources=r,this.convertResourcesToId=n,this.ergo=i}visit(e,t){if(e instanceof n)return this.visitClassDeclaration(e,t);if(e instanceof o)return this.visitRelationshipDeclaration(e,t);if(e instanceof i)return this.visitField(e,t);throw new Error("Unrecognised "+JSON.stringify(e))}visitClassDeclaration(e,t){const r=t.stack.pop();if(!(r instanceof s))throw new Error("Expected a Resource, but found "+r);let n={},i=null;if(r.isIdentifiable()&&this.deduplicateResources){if(i=r.toURI(),t.dedupeResources.has(i))return i;t.dedupeResources.add(i)}n.$class=e.getFullyQualifiedName(),this.deduplicateResources&&i&&(n.$id=i);const o=e.getProperties();for(let e in o){const i=o[e],s=r[i.getName()];c.isNull(s)||(t.stack.push(s),n[i.getName()]=i.accept(this,t))}return n}visitField(e,t){const r=t.stack.pop();let n;if(e.isArray()){let i=[];for(let n in r){const o=r[n];if(e.isPrimitive()||u.isEnum(e))i.push(this.convertToJSON(e,o));else{t.stack.push(o,a);const e=t.modelManager.getType(o.getFullyQualifiedType());i.push(e.accept(this,t))}}n=i}else if(e.isPrimitive())n=this.convertToJSON(e,r);else if(u.isEnum(e))if(this.ergo){const t=e.getParent().getModelFile().getType(e.getType()),i=t.getFullyQualifiedName(),o=t.getProperties();let s={$left:r};for(let e=0;e!(e.startsWith("$")||a.isNull(o[e]))));var o;return function(e,t){const r=t.getProperties().map(e=>e.getName()),n=e.filter(e=>!r.includes(e));if(n.length>0){const e=`Unexpected properties for type ${t.getFullyQualifiedName()}: `+n.join(", ");throw new c(e)}}(i,e),i.forEach(i=>{let o=r[i];if(this.ergo&&(Object.prototype.hasOwnProperty.call(o,"$left")?o=o.$left:Object.prototype.hasOwnProperty.call(o,"$right")&&(o=o.$right)),null!==o){t.jsonStack.push(o);const r=e.getProperty(i);n[i]=r.accept(this,t)}}),n}visitField(e,t){const r=t.jsonStack.pop();let n=null;if(e.isArray()){n=[];for(let i=0;i