text: !function webpackUniversalModuleDefinition(root,factory){"object"==typeof exports&&"object"==typeof module?module.exports=factory():"function"==typeof define&&define.amd?define([],factory):"object"==typeof exports?exports.plugsy=factory():root.plugsy=factory()}(window,function(){return function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{enumerable:!0,get:getter})},__webpack_require__.r=function(exports){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.t=function(value,mode){if(1&mode&&(value=__webpack_require__(value)),8&mode)return value;if(4&mode&&"object"==typeof value&&value&&value.__esModule)return value;var ns=Object.create(null);if(__webpack_require__.r(ns),Object.defineProperty(ns,"default",{enumerable:!0,value:value}),2&mode&&"string"!=typeof value)for(var key in value)__webpack_require__.d(ns,key,function(key){return value[key]}.bind(null,key));return ns},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module.default}:function getModuleExports(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=0)}([function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__(1);var _utils_constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_decorators_command__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(5);__webpack_require__.d(__webpack_exports__,"command",function(){return _decorators_command__WEBPACK_IMPORTED_MODULE_2__.default});var _decorators_on__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(6);__webpack_require__.d(__webpack_exports__,"on",function(){return _decorators_on__WEBPACK_IMPORTED_MODULE_3__.default});var _decorators_persist__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(7);__webpack_require__.d(__webpack_exports__,"persist",function(){return _decorators_persist__WEBPACK_IMPORTED_MODULE_4__.default});var _lib_Plugsy__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(8),_lib_PlugsyManager__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(12);__webpack_require__.d(__webpack_exports__,"PlugsyManager",function(){return _lib_PlugsyManager__WEBPACK_IMPORTED_MODULE_6__.default});var _utils_loader__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(44);__webpack_require__.d(__webpack_exports__,"loader",function(){return _utils_loader__WEBPACK_IMPORTED_MODULE_7__.default});var _utils_redef__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(17);__webpack_require__.d(__webpack_exports__,"redef",function(){return _utils_redef__WEBPACK_IMPORTED_MODULE_8__.default}),__webpack_require__.d(__webpack_exports__,"dedef",function(){return _utils_redef__WEBPACK_IMPORTED_MODULE_8__.dedef});var _utils_tagger__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(18);if(__webpack_require__.d(__webpack_exports__,"tagger",function(){return _utils_tagger__WEBPACK_IMPORTED_MODULE_9__.default}),_utils_constants__WEBPACK_IMPORTED_MODULE_1__.hasWindow){const w=window;w.corescript?w.corescript.$.plugsy=new _lib_PlugsyManager__WEBPACK_IMPORTED_MODULE_6__.default:w.$plugsy=new _lib_PlugsyManager__WEBPACK_IMPORTED_MODULE_6__.default}__webpack_exports__.default=_lib_Plugsy__WEBPACK_IMPORTED_MODULE_5__.default},function(module,exports,__webpack_require__){(function(process,global){
  /*! *****************************************************************************
  Copyright (C) Microsoft. All rights reserved.
  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
  
  THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  MERCHANTABLITY OR NON-INFRINGEMENT.
  
  See the Apache Version 2.0 License for specific language governing permissions
  and limitations under the License.
  ***************************************************************************** */
  var Reflect;!function(Reflect){!function(factory){var root="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),exporter=makeExporter(Reflect);function makeExporter(target,previous){return function(key,value){"function"!=typeof target[key]&&Object.defineProperty(target,key,{configurable:!0,writable:!0,value:value}),previous&&previous(key,value)}}void 0===root.Reflect?root.Reflect=Reflect:exporter=makeExporter(root.Reflect,exporter),function(exporter){var hasOwn=Object.prototype.hasOwnProperty,supportsSymbol="function"==typeof Symbol,toPrimitiveSymbol=supportsSymbol&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",iteratorSymbol=supportsSymbol&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",supportsCreate="function"==typeof Object.create,supportsProto={__proto__:[]}instanceof Array,downLevel=!supportsCreate&&!supportsProto,HashMap={create:supportsCreate?function(){return MakeDictionary(Object.create(null))}:supportsProto?function(){return MakeDictionary({__proto__:null})}:function(){return MakeDictionary({})},has:downLevel?function(map,key){return hasOwn.call(map,key)}:function(map,key){return key in map},get:downLevel?function(map,key){return hasOwn.call(map,key)?map[key]:void 0}:function(map,key){return map[key]}},functionPrototype=Object.getPrototypeOf(Function),usePolyfill="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,_Map=usePolyfill||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function CreateMapPolyfill(){var cacheSentinel={},arraySentinel=[],MapIterator=function(){function MapIterator(keys,values,selector){this._index=0,this._keys=keys,this._values=values,this._selector=selector}return MapIterator.prototype["@@iterator"]=function(){return this},MapIterator.prototype[iteratorSymbol]=function(){return this},MapIterator.prototype.next=function(){var index=this._index;if(index>=0&&index<this._keys.length){var result=this._selector(this._keys[index],this._values[index]);return index+1>=this._keys.length?(this._index=-1,this._keys=arraySentinel,this._values=arraySentinel):this._index++,{value:result,done:!1}}return{value:void 0,done:!0}},MapIterator.prototype.throw=function(error){throw this._index>=0&&(this._index=-1,this._keys=arraySentinel,this._values=arraySentinel),error},MapIterator.prototype.return=function(value){return this._index>=0&&(this._index=-1,this._keys=arraySentinel,this._values=arraySentinel),{value:value,done:!0}},MapIterator}();return function(){function Map(){this._keys=[],this._values=[],this._cacheKey=cacheSentinel,this._cacheIndex=-2}return Object.defineProperty(Map.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),Map.prototype.has=function(key){return this._find(key,!1)>=0},Map.prototype.get=function(key){var index=this._find(key,!1);return index>=0?this._values[index]:void 0},Map.prototype.set=function(key,value){var index=this._find(key,!0);return this._values[index]=value,this},Map.prototype.delete=function(key){var index=this._find(key,!1);if(index>=0){for(var size=this._keys.length,i=index+1;i<size;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,key===this._cacheKey&&(this._cacheKey=cacheSentinel,this._cacheIndex=-2),!0}return!1},Map.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=cacheSentinel,this._cacheIndex=-2},Map.prototype.keys=function(){return new MapIterator(this._keys,this._values,getKey)},Map.prototype.values=function(){return new MapIterator(this._keys,this._values,getValue)},Map.prototype.entries=function(){return new MapIterator(this._keys,this._values,getEntry)},Map.prototype["@@iterator"]=function(){return this.entries()},Map.prototype[iteratorSymbol]=function(){return this.entries()},Map.prototype._find=function(key,insert){return this._cacheKey!==key&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=key)),this._cacheIndex<0&&insert&&(this._cacheIndex=this._keys.length,this._keys.push(key),this._values.push(void 0)),this._cacheIndex},Map}();function getKey(key,_){return key}function getValue(_,value){return value}function getEntry(key,value){return[key,value]}}():Map,_Set=usePolyfill||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function CreateSetPolyfill(){return function(){function Set(){this._map=new _Map}return Object.defineProperty(Set.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),Set.prototype.has=function(value){return this._map.has(value)},Set.prototype.add=function(value){return this._map.set(value,value),this},Set.prototype.delete=function(value){return this._map.delete(value)},Set.prototype.clear=function(){this._map.clear()},Set.prototype.keys=function(){return this._map.keys()},Set.prototype.values=function(){return this._map.values()},Set.prototype.entries=function(){return this._map.entries()},Set.prototype["@@iterator"]=function(){return this.keys()},Set.prototype[iteratorSymbol]=function(){return this.keys()},Set}()}():Set,Metadata=new(usePolyfill||"function"!=typeof WeakMap?function CreateWeakMapPolyfill(){var UUID_SIZE=16,keys=HashMap.create(),rootKey=CreateUniqueKey();return function(){function WeakMap(){this._key=CreateUniqueKey()}return WeakMap.prototype.has=function(target){var table=GetOrCreateWeakMapTable(target,!1);return void 0!==table&&HashMap.has(table,this._key)},WeakMap.prototype.get=function(target){var table=GetOrCreateWeakMapTable(target,!1);return void 0!==table?HashMap.get(table,this._key):void 0},WeakMap.prototype.set=function(target,value){var table=GetOrCreateWeakMapTable(target,!0);return table[this._key]=value,this},WeakMap.prototype.delete=function(target){var table=GetOrCreateWeakMapTable(target,!1);return void 0!==table&&delete table[this._key]},WeakMap.prototype.clear=function(){this._key=CreateUniqueKey()},WeakMap}();function CreateUniqueKey(){var key;do{key="@@WeakMap@@"+CreateUUID()}while(HashMap.has(keys,key));return keys[key]=!0,key}function GetOrCreateWeakMapTable(target,create){if(!hasOwn.call(target,rootKey)){if(!create)return;Object.defineProperty(target,rootKey,{value:HashMap.create()})}return target[rootKey]}function FillRandomBytes(buffer,size){for(var i=0;i<size;++i)buffer[i]=255*Math.random()|0;return buffer}function CreateUUID(){var data=function GenRandomBytes(size){if("function"==typeof Uint8Array)return"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(size)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(size)):FillRandomBytes(new Uint8Array(size),size);return FillRandomBytes(new Array(size),size)}(UUID_SIZE);data[6]=79&data[6]|64,data[8]=191&data[8]|128;for(var result="",offset=0;offset<UUID_SIZE;++offset){var byte=data[offset];4!==offset&&6!==offset&&8!==offset||(result+="-"),byte<16&&(result+="0"),result+=byte.toString(16).toLowerCase()}return result}}():WeakMap);function GetOrCreateMetadataMap(O,P,Create){var targetMetadata=Metadata.get(O);if(IsUndefined(targetMetadata)){if(!Create)return;targetMetadata=new _Map,Metadata.set(O,targetMetadata)}var metadataMap=targetMetadata.get(P);if(IsUndefined(metadataMap)){if(!Create)return;metadataMap=new _Map,targetMetadata.set(P,metadataMap)}return metadataMap}function OrdinaryHasOwnMetadata(MetadataKey,O,P){var metadataMap=GetOrCreateMetadataMap(O,P,!1);return!IsUndefined(metadataMap)&&function ToBoolean(argument){return!!argument}(metadataMap.has(MetadataKey))}function OrdinaryGetOwnMetadata(MetadataKey,O,P){var metadataMap=GetOrCreateMetadataMap(O,P,!1);if(!IsUndefined(metadataMap))return metadataMap.get(MetadataKey)}function OrdinaryDefineOwnMetadata(MetadataKey,MetadataValue,O,P){var metadataMap=GetOrCreateMetadataMap(O,P,!0);metadataMap.set(MetadataKey,MetadataValue)}function OrdinaryOwnMetadataKeys(O,P){var keys=[],metadataMap=GetOrCreateMetadataMap(O,P,!1);if(IsUndefined(metadataMap))return keys;for(var keysObj=metadataMap.keys(),iterator=function GetIterator(obj){var method=GetMethod(obj,iteratorSymbol);if(!IsCallable(method))throw new TypeError;var iterator=method.call(obj);if(!IsObject(iterator))throw new TypeError;return iterator}(keysObj),k=0;;){var next=IteratorStep(iterator);if(!next)return keys.length=k,keys;var nextValue=next.value;try{keys[k]=nextValue}catch(e){try{IteratorClose(iterator)}finally{throw e}}k++}}function Type(x){if(null===x)return 1;switch(typeof x){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===x?1:6;default:return 6}}function IsUndefined(x){return void 0===x}function IsNull(x){return null===x}function IsObject(x){return"object"==typeof x?null!==x:"function"==typeof x}function ToPrimitive(input,PreferredType){switch(Type(input)){case 0:case 1:case 2:case 3:case 4:case 5:return input}var hint=3===PreferredType?"string":5===PreferredType?"number":"default",exoticToPrim=GetMethod(input,toPrimitiveSymbol);if(void 0!==exoticToPrim){var result=exoticToPrim.call(input,hint);if(IsObject(result))throw new TypeError;return result}return function OrdinaryToPrimitive(O,hint){if("string"===hint){var toString_1=O.toString;if(IsCallable(toString_1)){var result=toString_1.call(O);if(!IsObject(result))return result}var valueOf=O.valueOf;if(IsCallable(valueOf)){var result=valueOf.call(O);if(!IsObject(result))return result}}else{var valueOf=O.valueOf;if(IsCallable(valueOf)){var result=valueOf.call(O);if(!IsObject(result))return result}var toString_2=O.toString;if(IsCallable(toString_2)){var result=toString_2.call(O);if(!IsObject(result))return result}}throw new TypeError}(input,"default"===hint?"number":hint)}function ToPropertyKey(argument){var key=ToPrimitive(argument,3);return function IsSymbol(x){return"symbol"==typeof x}(key)?key:function ToString(argument){return""+argument}(key)}function IsArray(argument){return Array.isArray?Array.isArray(argument):argument instanceof Object?argument instanceof Array:"[object Array]"===Object.prototype.toString.call(argument)}function IsCallable(argument){return"function"==typeof argument}function IsConstructor(argument){return"function"==typeof argument}function GetMethod(V,P){var func=V[P];if(null!=func){if(!IsCallable(func))throw new TypeError;return func}}function IteratorStep(iterator){var result=iterator.next();return!result.done&&result}function IteratorClose(iterator){var f=iterator.return;f&&f.call(iterator)}function OrdinaryGetPrototypeOf(O){var proto=Object.getPrototypeOf(O);if("function"!=typeof O||O===functionPrototype)return proto;if(proto!==functionPrototype)return proto;var prototype=O.prototype,prototypeProto=prototype&&Object.getPrototypeOf(prototype);if(null==prototypeProto||prototypeProto===Object.prototype)return proto;var constructor=prototypeProto.constructor;return"function"!=typeof constructor?proto:constructor===O?proto:constructor}function MakeDictionary(obj){return obj.__=void 0,delete obj.__,obj}exporter("decorate",function decorate(decorators,target,propertyKey,attributes){if(IsUndefined(propertyKey)){if(!IsArray(decorators))throw new TypeError;if(!IsConstructor(target))throw new TypeError;return function DecorateConstructor(decorators,target){for(var i=decorators.length-1;i>=0;--i){var decorator=decorators[i],decorated=decorator(target);if(!IsUndefined(decorated)&&!IsNull(decorated)){if(!IsConstructor(decorated))throw new TypeError;target=decorated}}return target}(decorators,target)}if(!IsArray(decorators))throw new TypeError;if(!IsObject(target))throw new TypeError;if(!IsObject(attributes)&&!IsUndefined(attributes)&&!IsNull(attributes))throw new TypeError;return IsNull(attributes)&&(attributes=void 0),propertyKey=ToPropertyKey(propertyKey),function DecorateProperty(decorators,target,propertyKey,descriptor){for(var i=decorators.length-1;i>=0;--i){var decorator=decorators[i],decorated=decorator(target,propertyKey,descriptor);if(!IsUndefined(decorated)&&!IsNull(decorated)){if(!IsObject(decorated))throw new TypeError;descriptor=decorated}}return descriptor}(decorators,target,propertyKey,attributes)}),exporter("metadata",function metadata(metadataKey,metadataValue){return function decorator(target,propertyKey){if(!IsObject(target))throw new TypeError;if(!IsUndefined(propertyKey)&&!function IsPropertyKey(argument){switch(Type(argument)){case 3:case 4:return!0;default:return!1}}(propertyKey))throw new TypeError;OrdinaryDefineOwnMetadata(metadataKey,metadataValue,target,propertyKey)}}),exporter("defineMetadata",function defineMetadata(metadataKey,metadataValue,target,propertyKey){if(!IsObject(target))throw new TypeError;IsUndefined(propertyKey)||(propertyKey=ToPropertyKey(propertyKey));return OrdinaryDefineOwnMetadata(metadataKey,metadataValue,target,propertyKey)}),exporter("hasMetadata",function hasMetadata(metadataKey,target,propertyKey){if(!IsObject(target))throw new TypeError;IsUndefined(propertyKey)||(propertyKey=ToPropertyKey(propertyKey));return function OrdinaryHasMetadata(MetadataKey,O,P){var hasOwn=OrdinaryHasOwnMetadata(MetadataKey,O,P);if(hasOwn)return!0;var parent=OrdinaryGetPrototypeOf(O);if(!IsNull(parent))return OrdinaryHasMetadata(MetadataKey,parent,P);return!1}(metadataKey,target,propertyKey)}),exporter("hasOwnMetadata",function hasOwnMetadata(metadataKey,target,propertyKey){if(!IsObject(target))throw new TypeError;IsUndefined(propertyKey)||(propertyKey=ToPropertyKey(propertyKey));return OrdinaryHasOwnMetadata(metadataKey,target,propertyKey)}),exporter("getMetadata",function getMetadata(metadataKey,target,propertyKey){if(!IsObject(target))throw new TypeError;IsUndefined(propertyKey)||(propertyKey=ToPropertyKey(propertyKey));return function OrdinaryGetMetadata(MetadataKey,O,P){var hasOwn=OrdinaryHasOwnMetadata(MetadataKey,O,P);if(hasOwn)return OrdinaryGetOwnMetadata(MetadataKey,O,P);var parent=OrdinaryGetPrototypeOf(O);if(!IsNull(parent))return OrdinaryGetMetadata(MetadataKey,parent,P);return}(metadataKey,target,propertyKey)}),exporter("getOwnMetadata",function getOwnMetadata(metadataKey,target,propertyKey){if(!IsObject(target))throw new TypeError;IsUndefined(propertyKey)||(propertyKey=ToPropertyKey(propertyKey));return OrdinaryGetOwnMetadata(metadataKey,target,propertyKey)}),exporter("getMetadataKeys",function getMetadataKeys(target,propertyKey){if(!IsObject(target))throw new TypeError;IsUndefined(propertyKey)||(propertyKey=ToPropertyKey(propertyKey));return function OrdinaryMetadataKeys(O,P){var ownKeys=OrdinaryOwnMetadataKeys(O,P);var parent=OrdinaryGetPrototypeOf(O);if(null===parent)return ownKeys;var parentKeys=OrdinaryMetadataKeys(parent,P);if(parentKeys.length<=0)return ownKeys;if(ownKeys.length<=0)return parentKeys;var set=new _Set;var keys=[];for(var _i=0,ownKeys_1=ownKeys;_i<ownKeys_1.length;_i++){var key=ownKeys_1[_i],hasKey=set.has(key);hasKey||(set.add(key),keys.push(key))}for(var _a=0,parentKeys_1=parentKeys;_a<parentKeys_1.length;_a++){var key=parentKeys_1[_a],hasKey=set.has(key);hasKey||(set.add(key),keys.push(key))}return keys}(target,propertyKey)}),exporter("getOwnMetadataKeys",function getOwnMetadataKeys(target,propertyKey){if(!IsObject(target))throw new TypeError;IsUndefined(propertyKey)||(propertyKey=ToPropertyKey(propertyKey));return OrdinaryOwnMetadataKeys(target,propertyKey)}),exporter("deleteMetadata",function deleteMetadata(metadataKey,target,propertyKey){if(!IsObject(target))throw new TypeError;IsUndefined(propertyKey)||(propertyKey=ToPropertyKey(propertyKey));var metadataMap=GetOrCreateMetadataMap(target,propertyKey,!1);if(IsUndefined(metadataMap))return!1;if(!metadataMap.delete(metadataKey))return!1;if(metadataMap.size>0)return!0;var targetMetadata=Metadata.get(target);return targetMetadata.delete(propertyKey),targetMetadata.size>0||(Metadata.delete(target),!0)})}(exporter)}()}(Reflect||(Reflect={}))}).call(this,__webpack_require__(2),__webpack_require__(3))},function(module,exports){var cachedSetTimeout,cachedClearTimeout,process=module.exports={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(fun,0);try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var currentQueue,queue=[],draining=!1,queueIndex=-1;function cleanUpNextTick(){draining&&currentQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=runTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex<len;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,len=queue.length}currentQueue=null,draining=!1,function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout)return clearTimeout(marker);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(marker);try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}(timeout)}}function Item(fun,array){this.fun=fun,this.array=array}function noop(){}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.prependListener=noop,process.prependOnceListener=noop,process.listeners=function(name){return[]},process.binding=function(name){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(dir){throw new Error("process.chdir is not supported")},process.umask=function(){return 0}},function(module,exports){var g;g=function(){return this}();try{g=g||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(g=window)}module.exports=g},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"isCommand",function(){return isCommand}),__webpack_require__.d(__webpack_exports__,"persisted",function(){return persisted}),__webpack_require__.d(__webpack_exports__,"handlerFor",function(){return handlerFor}),__webpack_require__.d(__webpack_exports__,"isRedefined",function(){return isRedefined}),__webpack_require__.d(__webpack_exports__,"toPersist",function(){return toPersist}),__webpack_require__.d(__webpack_exports__,"description",function(){return description}),__webpack_require__.d(__webpack_exports__,"hasWindow",function(){return hasWindow});const isCommand="$$plugsy.isCommand$$",persisted="$$plugsy.isPersisted$$",handlerFor="$$plugsy.handlerFor$$",isRedefined="$$plugsy.isRedefined$$",toPersist="$$plugsy.toPersist$$",description="$$plugsy.description$$",hasWindow="undefined"!=typeof window},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _utils_constants__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);function brand(object,description){Object.defineProperty(object,_utils_constants__WEBPACK_IMPORTED_MODULE_0__.isCommand,{value:!0}),Object.defineProperty(object,_utils_constants__WEBPACK_IMPORTED_MODULE_0__.description,{value:description})}function decorate(target,key,description){return"function"==typeof target?function decorateProperty(target,description){return brand(target,description),target}(target,description):function decorateMethod(target,key,description){brand(target[key],description)}(target,key,description)}__webpack_exports__.default=function command(target,key,description){return"string"==typeof target?function wrapper(description){return(target,key)=>decorate(target,key,description)}(target):"function"==typeof target?decorate(target,key,description):void decorate(target,key)}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _utils_constants__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);function wrapper(handler,event){return function brand(object,event){return Object.defineProperty(object,_utils_constants__WEBPACK_IMPORTED_MODULE_0__.handlerFor,{value:event}),object}(handler,event)}__webpack_exports__.default=function on(event,handler){return"function"==typeof handler?wrapper(handler,event):(target,key)=>(wrapper(target[key],event),target)}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"brand",function(){return brand});var _utils_constants__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);function brand(object){const o=new Object(object);return object&&!object[_utils_constants__WEBPACK_IMPORTED_MODULE_0__.toPersist]&&(Object.defineProperty(o,_utils_constants__WEBPACK_IMPORTED_MODULE_0__.toPersist,{value:!0}),Object.defineProperty(o,_utils_constants__WEBPACK_IMPORTED_MODULE_0__.persisted,{value:object})),o}__webpack_exports__.default=function persist(value,key){if(!key)return brand(value);value[_utils_constants__WEBPACK_IMPORTED_MODULE_0__.toPersist]=value[_utils_constants__WEBPACK_IMPORTED_MODULE_0__.toPersist]?value[_utils_constants__WEBPACK_IMPORTED_MODULE_0__.toPersist].concat(key):[key]}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"default",function(){return Plugsy});var _a,_decorators_command__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5),_utils_casings__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(9),_utils_constants__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(4),_utils_methods__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(10),_utils_signature__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(11),__decorate=function(decorators,target,key,desc){var d,c=arguments.length,r=c<3?target:null===desc?desc=Object.getOwnPropertyDescriptor(target,key):desc;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r},__metadata=function(k,v){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,v)};class Plugsy{constructor(){this[_a]={}}help(){const commands=[];for(const key of Object(_utils_methods__WEBPACK_IMPORTED_MODULE_3__.default)(this,Plugsy))if(this[key]&&this[key][_utils_constants__WEBPACK_IMPORTED_MODULE_2__.isCommand]){const info={command:key,description:this[key][_utils_constants__WEBPACK_IMPORTED_MODULE_2__.description]},desc=info.description?`\n- ${info.description}`:"",sig=Object(_utils_signature__WEBPACK_IMPORTED_MODULE_4__.default)(this,key.toString()),plugin=Object(_utils_casings__WEBPACK_IMPORTED_MODULE_1__.snakecase)(this.constructor.name);commands.push(`## ${plugin} ${Object(_utils_casings__WEBPACK_IMPORTED_MODULE_1__.snakecase)(info.command)}${sig}${desc}`)}return`# ${this.constructor.name}\n${commands.join("\n")}`}uninstall(){}install(){const keys=this[_utils_constants__WEBPACK_IMPORTED_MODULE_2__.toPersist]||[];for(const key in this)if(-1===keys.indexOf(key)&&key!==_utils_constants__WEBPACK_IMPORTED_MODULE_2__.toPersist){const value=this[key];null!==value&&value[_utils_constants__WEBPACK_IMPORTED_MODULE_2__.toPersist]&&(-1===keys.indexOf(key)&&keys.push(key),this[_utils_constants__WEBPACK_IMPORTED_MODULE_2__.persisted][key]=value[_utils_constants__WEBPACK_IMPORTED_MODULE_2__.persisted]?value[_utils_constants__WEBPACK_IMPORTED_MODULE_2__.persisted]:value,Object.defineProperty(this,key,{get:()=>this[_utils_constants__WEBPACK_IMPORTED_MODULE_2__.persisted][key],set:v=>this[_utils_constants__WEBPACK_IMPORTED_MODULE_2__.persisted][key]=v}))}this[_utils_constants__WEBPACK_IMPORTED_MODULE_2__.toPersist]=keys}}_a=_utils_constants__WEBPACK_IMPORTED_MODULE_2__.persisted,__decorate([Object(_decorators_command__WEBPACK_IMPORTED_MODULE_0__.default)("Returns information about this plugin."),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],Plugsy.prototype,"help",null)},function(module,__webpack_exports__,__webpack_require__){"use strict";function snakecase(str){return str.replace(/(^[A-Z])/,([first])=>first.toLowerCase()).replace(/([A-Z])/g,([letter])=>`_${letter.toLowerCase()}`)}function camelcase(str){return str.replace(/^([A-Z])|[\s-_]+(\w)/g,(_,p1,p2)=>p2?p2.toUpperCase():p1.toLowerCase())}__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"snakecase",function(){return snakecase}),__webpack_require__.d(__webpack_exports__,"camelcase",function(){return camelcase})},function(module,__webpack_exports__,__webpack_require__){"use strict";function hasMethod(obj,name){const desc=Object.getOwnPropertyDescriptor(obj,name);return!!desc&&"function"==typeof desc.value}function getInstanceMethodNames(obj,stop){const array=[];let proto=Object.getPrototypeOf(obj);for(;proto&&proto!==stop;){for(const name of Object.getOwnPropertyNames(proto))"constructor"!==name&&hasMethod(proto,name)&&array.push(name);proto=Object.getPrototypeOf(proto)}return array}__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"default",function(){return getInstanceMethodNames})},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"default",function(){return parameters});const STRIP_COMMENTS=/(\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s*=[^,\)]*(('(?:\\'|[^'\r\n])*')|("(?:\\"|[^"\r\n])*"))|(\s*=[^,\)]*))/gm,ARGUMENT_NAMES=/([^\s,]+)/g;function parameters(object,key){const names=function getParamNames(fn){const fnStr=fn.toString().replace(STRIP_COMMENTS,""),result=fnStr.slice(fnStr.indexOf("(")+1,fnStr.indexOf(")")).match(ARGUMENT_NAMES);return null===result?[]:result}(object[key]),types=function getParamTypes(object,key){return(Reflect.getMetadata("design:paramtypes",object,key)||[]).map(arg=>"undefined"===arg?"void":arg.name.toLowerCase())}(object,key),rtype=function getReturnType(object,key){const type=Reflect.getMetadata("design:returntype",object,key);return type&&"undefined"!==type?`${type.name}`:"void"}(object,key);return`(${names.map((name,i)=>`${name}${types[i]?`: *${types[i]}*`:""}`).join(", ")})${rtype?`: *${rtype}*`:""}`}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"default",function(){return PlugsyManager});var minimist_string__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(13),minimist_string__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(minimist_string__WEBPACK_IMPORTED_MODULE_0__),___WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(0),_utils_casings__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(9),_utils_constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(4),_utils_hydrate__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(15),_utils_methods__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(10),_utils_persist__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(16),_utils_redef__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(17),_utils_tagger__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(18),_EventBus__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(43),__awaiter=function(thisArg,_arguments,P,generator){return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):new P(function(resolve){resolve(result.value)}).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};const hasCorescript=_utils_constants__WEBPACK_IMPORTED_MODULE_3__.hasWindow&&window.corescript,corescript=hasCorescript?window.corescript:null;class PlugsyManager extends _EventBus__WEBPACK_IMPORTED_MODULE_9__.default{constructor(){super(),this.ctors={},this.plugins={},this.notetags={},this.store={},this._commands={},this.extend()}get commands(){return Object.keys(this._commands).reduce((a,b)=>a.concat(Object.keys(this._commands[b]).map(c=>`${b} ${c}`)),[]).sort((a,b)=>a.localeCompare(b))}extend(){const Data=hasCorescript?corescript.Managers.DataManager:DataManager,Interpreter=hasCorescript?corescript.Game.Game_Interpreter:Game_Interpreter;Object(_utils_redef__WEBPACK_IMPORTED_MODULE_7__.default)(Interpreter.prototype,{pluginCommand:(_interpreter,pluginCommand,command,...originalArgs)=>{pluginCommand(command,originalArgs);const{_:[subcommand,...args]}=minimist_string__WEBPACK_IMPORTED_MODULE_0___default()(originalArgs.join(" "));let res=null;for(const fullCommand of this.commands)if(fullCommand.startsWith(command+" "+subcommand)){const fns=this._commands[command];fns&&fns[subcommand]&&(res=fns[subcommand](...args))}return res}}),Object(_utils_redef__WEBPACK_IMPORTED_MODULE_7__.default)(Data,{extractSaveContents:(dm,extractSave,contents)=>__awaiter(this,void 0,void 0,function*(){yield this._uninstallPlugins(),this._load(contents.plugsy),extractSave(contents),yield this._installPlugins()}),makeSaveContents:(dm,makeSave)=>{const contents=makeSave();return contents.plugsy=this._save(),contents},setupNewGame:(dm,setup)=>__awaiter(this,void 0,void 0,function*(){yield this._uninstallPlugins(),this._load({}),setup(),yield this._installPlugins()}),isDatabaseLoaded:(dm,isLoaded)=>__awaiter(this,void 0,void 0,function*(){const okay=isLoaded(),reduce=(p,curr)=>__awaiter(this,void 0,void 0,function*(){const prev=yield p;return Object.assign({},prev,{[curr.id]:yield Object(_utils_tagger__WEBPACK_IMPORTED_MODULE_8__.default)(curr.note)})});return this.notetags=yield hasCorescript?Object.keys(corescript.$).filter(f=>Array.isArray(corescript.$[f])).reduce((p,f)=>__awaiter(this,void 0,void 0,function*(){const a=yield p;return Object.assign({},a,{[f]:yield(corescript.$[f]||[]).filter(i=>i&&i.note).reduce(reduce,{})})}),{}):Object.keys(window).filter(k=>k.startsWith("$")).filter(k=>Array.isArray(window[k])).reduce((p,k)=>__awaiter(this,void 0,void 0,function*(){const a=yield p;return Object.assign({},a,{[k]:yield(window[k]||[]).filter(i=>i&&i.note).reduce(reduce,{})})}),{}),okay})})}install(plugin){return this.ctors[plugin.name]=plugin,this}_save(){const out={};for(const name in this.plugins)if(this.plugins[name]){const plugin=this.plugins[name];out[name]=Object(_utils_persist__WEBPACK_IMPORTED_MODULE_6__.default)(plugin)}return out}_load(contents){for(const name in contents)contents[name]&&(this.store[name]=contents[name])}_uninstallPlugins(){return __awaiter(this,void 0,void 0,function*(){for(const key of Object.keys(this.plugins))yield this._uninstall(key);this._commands={},this._events={},this.store={},this.plugins={}})}_hydrate(name,plugin){Object(_utils_hydrate__WEBPACK_IMPORTED_MODULE_4__.default)(plugin,this.store[name]||{})}_installPlugins(){return __awaiter(this,void 0,void 0,function*(){for(const key of Object.keys(this.ctors))if(!this.plugins[key]){const plugin=new(0,this.ctors[key]);yield this._install(plugin),this.plugins[key]=plugin}})}_uninstall(name){return __awaiter(this,void 0,void 0,function*(){const plugin=this.plugins[name];yield plugin.uninstall()})}_install(plugin){return __awaiter(this,void 0,void 0,function*(){const name=plugin.constructor.name;this._hydrate(name,plugin),yield plugin.install(),this.plugins[name]=plugin;const commands=this._commands[Object(_utils_casings__WEBPACK_IMPORTED_MODULE_2__.snakecase)(name)]={};for(const key of Object(_utils_methods__WEBPACK_IMPORTED_MODULE_5__.default)(plugin,___WEBPACK_IMPORTED_MODULE_1__.default)){const fn=plugin[key];fn[_utils_constants__WEBPACK_IMPORTED_MODULE_3__.isCommand]&&"function"==typeof fn&&(commands[Object(_utils_casings__WEBPACK_IMPORTED_MODULE_2__.snakecase)(key)]=fn.bind(plugin)),fn[_utils_constants__WEBPACK_IMPORTED_MODULE_3__.handlerFor]&&"function"==typeof fn&&this.on(fn[_utils_constants__WEBPACK_IMPORTED_MODULE_3__.handlerFor],fn.bind(plugin))}})}}},function(module,exports,__webpack_require__){const minimist=__webpack_require__(14);module.exports=function(input){var argv;if(input.includes('"')||input.includes("'")){var countQuotes=function(piece,quote_char){var regex=new RegExp("[^"+quote_char+"\\\\]","g");return piece.replace(regex,"").replace(new RegExp("(\\\\"+quote_char+")","g"),"").replace(/\\/g,"").length},hasQuote=function(piece,quote_char){return countQuotes(piece,quote_char)>0},splitPiece=function(piece,quote_char){var first_q_index=getFirstQuote(piece,quote_char),second_q_index=getFirstQuote(piece,quote_char,first_q_index+1);return[piece.substring(0,second_q_index+1),piece.substring(second_q_index+1,piece.length)]},getFirstQuote=function(piece,quote_char,position=0){var i=position-1;do{i=piece.indexOf(quote_char,i+1)}while("\\"===piece.charAt(i-1));return i},solveQuotes=function(pieces,quote_char){for(var unclosed_quote=!1,result=[],i=0;i<pieces.length;i++)if(unclosed_quote)if(hasQuote(pieces[i],quote_char)){var q_index=getFirstQuote(pieces[i],quote_char);q_index!==pieces[i].length-1&&(pieces[i+1]=pieces[i].substring(q_index+1,pieces[i].length)+(void 0!==pieces[i+1]?pieces[i+1]:""),pieces[i]=pieces[i].substring(0,q_index+1)),result[result.length-1]=result[result.length-1]+" "+pieces[i],unclosed_quote=!1}else result[result.length-1]=result[result.length-1]+" "+pieces[i];else if(hasQuote(pieces[i],quote_char))if(1===countQuotes(pieces[i],quote_char))result.push(pieces[i]),unclosed_quote=!0;else if(2===countQuotes(pieces[i],quote_char)){var split=splitPiece(pieces[i],quote_char);result.push(split[0]),""!==split[1]&&result.push(split[1])}else{var next=pieces[i];do{split=splitPiece(next,quote_char);result.push(split[0]),next=split[1]}while(countQuotes(next,quote_char)>2);if(1===countQuotes(next,quote_char))result.push(next),unclosed_quote=!0;else{if(2!==countQuotes(next,quote_char))throw new Error("I'm sorry, but minimist-string has encounteredunexpected behaviour. This is porbably not your fault andjust a bug. Please report it with the stack trace on theGitHub tracker.");result.push(next)}}else result.push(pieces[i]);return result},good_pieces=solveQuotes(input.split(" "),'"');good_pieces=solveQuotes(good_pieces,"'");for(var regex_quotes=/[\"\']/g,i=0;i<good_pieces.length;i++)good_pieces[i]=good_pieces[i].replace(/(\\\')/g,"%%%SINGLEQUOTE%%%"),good_pieces[i]=good_pieces[i].replace(/(\\\")/g,"%%%DOUBLEQUOTE%%%"),good_pieces[i]=good_pieces[i].replace(regex_quotes,""),good_pieces[i]=good_pieces[i].replace(/(%%%SINGLEQUOTE%%%)/g,"'"),good_pieces[i]=good_pieces[i].replace(/(%%%DOUBLEQUOTE%%%)/g,'"');argv=minimist(good_pieces)}else argv=minimist(input.replace(this.prefix+" ","").split(" "));return argv}},function(module,exports){function isNumber(x){return"number"==typeof x||(!!/^0x[0-9a-f]+$/i.test(x)||/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x)&&String(Number(x))==x)}module.exports=function(args,opts){opts||(opts={});var flags={bools:{},strings:{},unknownFn:null};"function"==typeof opts.unknown&&(flags.unknownFn=opts.unknown),"boolean"==typeof opts.boolean&&opts.boolean?flags.allBools=!0:[].concat(opts.boolean).filter(Boolean).forEach(function(key){flags.bools[key]=!0});var aliases={};Object.keys(opts.alias||{}).forEach(function(key){aliases[key]=[].concat(opts.alias[key]),aliases[key].forEach(function(x){aliases[x]=[key].concat(aliases[key].filter(function(y){return x!==y}))})}),[].concat(opts.string).filter(Boolean).forEach(function(key){flags.strings[key]=!0,aliases[key]&&(flags.strings[aliases[key]]=!0)});var defaults=opts.default||{},argv={_:[]};Object.keys(flags.bools).forEach(function(key){setArg(key,void 0!==defaults[key]&&defaults[key])});var notFlags=[];function setArg(key,val,arg){if(!arg||!flags.unknownFn||function argDefined(key,arg){return flags.allBools&&/^--[^=]+$/.test(arg)||flags.strings[key]||flags.bools[key]||aliases[key]}(key,arg)||!1!==flags.unknownFn(arg)){var value=!flags.strings[key]&&isNumber(val)?Number(val):val;setKey(argv,key.split("."),value),(aliases[key]||[]).forEach(function(x){setKey(argv,x.split("."),value)})}}function setKey(obj,keys,value){var o=obj;keys.slice(0,-1).forEach(function(key){void 0===o[key]&&(o[key]={}),o=o[key]});var key=keys[keys.length-1];void 0===o[key]||flags.bools[key]||"boolean"==typeof o[key]?o[key]=value:Array.isArray(o[key])?o[key].push(value):o[key]=[o[key],value]}function aliasIsBoolean(key){return aliases[key].some(function(x){return flags.bools[x]})}-1!==args.indexOf("--")&&(notFlags=args.slice(args.indexOf("--")+1),args=args.slice(0,args.indexOf("--")));for(var i=0;i<args.length;i++){var arg=args[i];if(/^--.+=/.test(arg)){var m=arg.match(/^--([^=]+)=([\s\S]*)$/),key=m[1],value=m[2];flags.bools[key]&&(value="false"!==value),setArg(key,value,arg)}else if(/^--no-.+/.test(arg)){setArg(key=arg.match(/^--no-(.+)/)[1],!1,arg)}else if(/^--.+/.test(arg)){key=arg.match(/^--(.+)/)[1];void 0===(next=args[i+1])||/^-/.test(next)||flags.bools[key]||flags.allBools||aliases[key]&&aliasIsBoolean(key)?/^(true|false)$/.test(next)?(setArg(key,"true"===next,arg),i++):setArg(key,!flags.strings[key]||"",arg):(setArg(key,next,arg),i++)}else if(/^-[^-]+/.test(arg)){for(var letters=arg.slice(1,-1).split(""),broken=!1,j=0;j<letters.length;j++){var next;if("-"!==(next=arg.slice(j+2))){if(/[A-Za-z]/.test(letters[j])&&/=/.test(next)){setArg(letters[j],next.split("=")[1],arg),broken=!0;break}if(/[A-Za-z]/.test(letters[j])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(next)){setArg(letters[j],next,arg),broken=!0;break}if(letters[j+1]&&letters[j+1].match(/\W/)){setArg(letters[j],arg.slice(j+2),arg),broken=!0;break}setArg(letters[j],!flags.strings[letters[j]]||"",arg)}else setArg(letters[j],next,arg)}key=arg.slice(-1)[0];broken||"-"===key||(!args[i+1]||/^(-|--)[^-]/.test(args[i+1])||flags.bools[key]||aliases[key]&&aliasIsBoolean(key)?args[i+1]&&/true|false/.test(args[i+1])?(setArg(key,"true"===args[i+1],arg),i++):setArg(key,!flags.strings[key]||"",arg):(setArg(key,args[i+1],arg),i++))}else if(flags.unknownFn&&!1===flags.unknownFn(arg)||argv._.push(flags.strings._||!isNumber(arg)?arg:Number(arg)),opts.stopEarly){argv._.push.apply(argv._,args.slice(i+1));break}}return Object.keys(defaults).forEach(function(key){(function hasKey(obj,keys){var o=obj;return keys.slice(0,-1).forEach(function(key){o=o[key]||{}}),keys[keys.length-1]in o})(argv,key.split("."))||(setKey(argv,key.split("."),defaults[key]),(aliases[key]||[]).forEach(function(x){setKey(argv,x.split("."),defaults[key])}))}),opts["--"]?(argv["--"]=new Array,notFlags.forEach(function(key){argv["--"].push(key)})):notFlags.forEach(function(key){argv._.push(key)}),argv}},function(module,__webpack_exports__,__webpack_require__){"use strict";function merge(target,persisted){for(const key of Object.keys(persisted))target[key]=persisted[key];return target}__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"default",function(){return merge})},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"default",function(){return serialize});var _constants__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);function serialize(obj){const out={};for(const key of obj[_constants__WEBPACK_IMPORTED_MODULE_0__.toPersist]||[])out[key]=obj[key];return out}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"dedef",function(){return dedef}),__webpack_require__.d(__webpack_exports__,"default",function(){return redef}),__webpack_require__.d(__webpack_exports__,"redefine",function(){return redefine});var _constants__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4);let handle=1;function dedef(target,n){for(const key in target)target[key]&&target[key][_constants__WEBPACK_IMPORTED_MODULE_0__.isRedefined]&&delete target[key][_constants__WEBPACK_IMPORTED_MODULE_0__.isRedefined][n]}function redef(target,methods){if("number"!=typeof methods){for(const key in methods)key in methods&&redefine(target,key,methods[key]);return handle++}dedef(target,methods)}const wrapFn=key=>{const wrap=(ctx,curr,prev)=>(...args)=>curr(ctx,prev,...args);return function redefined(...args){const all=this[key][_constants__WEBPACK_IMPORTED_MODULE_0__.isRedefined],fns=Object.keys(all).map(k=>all[k].bind(this));let res=fns.shift();for(;fns.length;){const curr=fns.shift(),prev=res;res=((...moreArgs)=>wrap(this,curr,prev)(...moreArgs))}return res(...args)}};function redefine(object,key,fn){const original=object[key];let redefs={};if(original){const id=handle;(redefs=original[_constants__WEBPACK_IMPORTED_MODULE_0__.isRedefined]?original[_constants__WEBPACK_IMPORTED_MODULE_0__.isRedefined]:{0:original})[id]=((obj,prev,...args)=>prev?fn.call(obj,obj,prev,...args):fn.apply(obj,args))}else redefs={0:fn};return Object.assign(object,{[key]:Object.assign(wrapFn(key),{[_constants__WEBPACK_IMPORTED_MODULE_0__.isRedefined]:redefs})})}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"default",function(){return tagger});var tsxml__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(19),_casings__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(9),__awaiter=function(thisArg,_arguments,P,generator){return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):new P(function(resolve){resolve(result.value)}).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};function tagger(note){return __awaiter(this,void 0,void 0,function*(){if("string"!=typeof note)return null;const filtered=note.split("\n").map(line=>line.replace(/<(.*):[^\/](.+)>/,"")).join("\n");return(yield tsxml__WEBPACK_IMPORTED_MODULE_0__.Parser.parseStringToAst(filtered)).childNodes.map(child=>(function parseAst(node){if(node){const out={};if(node.content)return node.content;if(node.attrList)for(const attr in node.attrList)if(attr in node.attrList){const cased=Object(_casings__WEBPACK_IMPORTED_MODULE_1__.camelcase)(attr),v=node.attrList[attr];out[cased]=void 0===v||v}if(node.childNodes){const children=node.childNodes.map(n=>parseAst(n));if(children.length>=1&&(out.children=children),1===children.length){const first=children[0];"string"==typeof first&&(out.contents=first,delete out.children)}}return node.tagName?{[node.tagName]:out}:out}return null})(child)).filter(t=>"string"!=typeof t).reduce((a,b)=>Object.assign({},a,b),{})})}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const ast=__webpack_require__(20);exports.ast=ast;const parser=__webpack_require__(33);exports.parser=parser;const SyntaxErrorCode_1=__webpack_require__(34);exports.SyntaxErrorCode=SyntaxErrorCode_1.SyntaxErrorCode;const SyntaxError_1=__webpack_require__(35);exports.SyntaxError=SyntaxError_1.SyntaxError;const Parser_1=__webpack_require__(39);exports.Parser=Parser_1.Parser;const Compiler_1=__webpack_require__(42);exports.Compiler=Compiler_1.Compiler},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const Attribute_1=__webpack_require__(21);exports.Attribute=Attribute_1.Attribute;const Node_1=__webpack_require__(22);exports.Node=Node_1.Node;const SelfClosingNode_1=__webpack_require__(24);exports.SelfClosingNode=SelfClosingNode_1.SelfClosingNode;const VoidNode_1=__webpack_require__(25);exports.VoidNode=VoidNode_1.VoidNode;const TextNode_1=__webpack_require__(26);exports.TextNode=TextNode_1.TextNode;const CommentNode_1=__webpack_require__(27);exports.CommentNode=CommentNode_1.CommentNode;const CDataSectionNode_1=__webpack_require__(28);exports.CDataSectionNode=CDataSectionNode_1.CDataSectionNode;const DeclarationOpenerNode_1=__webpack_require__(29);exports.DeclarationOpenerNode=DeclarationOpenerNode_1.DeclarationOpenerNode;const ProcessingInstructionNode_1=__webpack_require__(30);exports.ProcessingInstructionNode=ProcessingInstructionNode_1.ProcessingInstructionNode;const ContainerNode_1=__webpack_require__(31);exports.ContainerNode=ContainerNode_1.ContainerNode;const DocumentNode_1=__webpack_require__(32);exports.DocumentNode=DocumentNode_1.DocumentNode},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});class Attribute{static create(value){return new class extends Attribute{constructor(){super(...arguments),this.value=value}}}valueOf(){return this.value}toString(){return this.value+""}}exports.Attribute=Attribute},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const NodeFlags_1=__webpack_require__(23);class Node{constructor(){this.parserFlags=NodeFlags_1.NodeFlags.None,this.attrList={},this.applyAttributePropertyBindings()}static get defaultStringificationParams(){return{attrParen:'"',indentChar:"\t",newlineChar:"\n"}}get parentNode(){return this._parentNode}getAllAttributeNames(){return Object.keys(this.attrList)}getNumberOfAttributes(){return this.getAllAttributeNames().length}hasAttribute(attrName){return-1!==this.getAllAttributeNames().indexOf(attrName)}getAttribute(attrName,namespaceName){if("object"==typeof this.attrList&&null!==this.attrList)return attrName=Node.joinAttributeNameWithNamespacePrefix(attrName,namespaceName),this.attrList[attrName]}setAttribute(attrName,value,namespaceName){return attrName=Node.joinAttributeNameWithNamespacePrefix(attrName,namespaceName),this.attrList=this.attrList||{},this.attrList[attrName]=value,this}removeAttribute(attrName,namespaceName){return attrName=Node.joinAttributeNameWithNamespacePrefix(attrName,namespaceName),delete this.attrList[attrName],this}toFormattedString(stringificationParams){return stringificationParams="object"==typeof stringificationParams&&null!==stringificationParams?Node.mergeObjects(Node.defaultStringificationParams,stringificationParams):Node.defaultStringificationParams,this.stringify(stringificationParams)}toString(){return this.stringify({indentChar:"",newlineChar:"",attrParen:'"'})}isTagNameAndNamespaceIdenticalTo(otherNode){return this.namespacePrefix===otherNode.namespacePrefix&&this.tagName===otherNode.tagName}isAttributeListIdenticalTo(otherNode){if(this.getNumberOfAttributes()!==otherNode.getNumberOfAttributes())return!1;return-1===this.getAllAttributeNames().findIndex(attrName=>this.getAttribute(attrName)!==otherNode.getAttribute(attrName))}isIdenticalTo(otherNode){return this.constructor===otherNode.constructor&&this.isTagNameAndNamespaceIdenticalTo(otherNode)&&this.isAttributeListIdenticalTo(otherNode)}static attributePropertyBinding(attributeName){return(target,propertyName)=>{target.addAttributeProxyProperty(propertyName,attributeName)}}getBoundAttributeNameForProperty(propertyName){if("object"==typeof this.attrPropertyBindings&&null!==this.attrPropertyBindings)return this.attrPropertyBindings[propertyName]}getBoundPropertyNamesForAttribute(attributeName){const propertyNames=[];if("object"!=typeof this.attrPropertyBindings||null===this.attrPropertyBindings)return propertyNames;for(let propertyName in this.attrPropertyBindings)this.attrPropertyBindings[propertyName]===attributeName&&propertyNames.push(propertyName);return propertyNames}static joinAttributeNameWithNamespacePrefix(attrName,namespaceName){return void 0!==namespaceName&&(attrName=namespaceName+":"+attrName),attrName}static changeParentNode(childNode,newParentNode){childNode._parentNode=newParentNode}static removeParentNode(childNode){childNode._parentNode=void 0}static generateIndentString(indentChar,indentDepth){if(0===(indentDepth=Math.max(indentDepth||0,0)))return"";let indentString="";for(;indentDepth-- >0;)indentString+=indentChar;return indentString}stringify(params,nodeIndentDepth){return nodeIndentDepth=Math.max(nodeIndentDepth||0,0),`${Node.generateIndentString(params.indentChar,nodeIndentDepth)}<${this.tagName}${this.stringifyAttributes(nodeIndentDepth)} />${params.newlineChar}`}stringifyAttributes(nodeIndentDepth){var attrString="";for(let attrName in this.attrList)attrString+=this.stringifyAttribute(attrName,this.attrList[attrName]);return attrString}stringifyAttribute(attrName,attrValue){return void 0!==attrValue?` ${attrName}="${attrValue}"`:` ${attrName}`}static mergeObjects(baseObject,overlayObject){for(let key in overlayObject)baseObject[key]=overlayObject[key];return baseObject}addAttributeProxyProperty(propertyName,attrName){this.attrPropertyBindings=this.attrPropertyBindings||{},this.attrPropertyBindings[propertyName]=attrName}applyAttributePropertyBindings(){if("object"==typeof this.attrPropertyBindings&&null!==this.attrPropertyBindings)for(let propertyName in this.attrPropertyBindings)this.applyAttributePropertyBinding(propertyName,this.attrPropertyBindings[propertyName])}applyAttributePropertyBinding(propertyName,attributeName){const value=this[propertyName];Object.defineProperty(this,propertyName,{get:()=>this.getAttribute(attributeName),set:newValue=>this.setAttribute(attributeName,newValue)}),this.setAttribute(attributeName,value)}}exports.Node=Node},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),function(NodeFlags){NodeFlags[NodeFlags.None=0]="None",NodeFlags[NodeFlags.Opened=1]="Opened",NodeFlags[NodeFlags.Closed=2]="Closed",NodeFlags[NodeFlags.SelfClosing=7]="SelfClosing",NodeFlags[NodeFlags.Void=15]="Void"}(exports.NodeFlags||(exports.NodeFlags={}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const Node_1=__webpack_require__(22);exports.SelfClosingNode=class SelfClosingNode extends Node_1.Node{}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const Node_1=__webpack_require__(22);exports.VoidNode=class VoidNode extends Node_1.Node{stringify(params,nodeIndentDepth){return nodeIndentDepth=Math.max(nodeIndentDepth||0,0),`${Node_1.Node.generateIndentString(params.indentChar,nodeIndentDepth)}<${this.tagName}${this.stringifyAttributes(nodeIndentDepth)}>${params.newlineChar}`}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const Node_1=__webpack_require__(22);class TextNode extends Node_1.Node{getContentLines(){return"string"!=typeof this.content||this.content.length<1?[]:this.content.trim().split(/\r?\n/)}isContentMultiLine(){return/\r?\n/.test(this.content.trim())}isContentIdenticalTo(otherNode){return TextNode.makeContentStringComparable(this.content||"")===TextNode.makeContentStringComparable(otherNode.content||"")}isIdenticalTo(otherNode){return super.isIdenticalTo(otherNode)&&this.isContentIdenticalTo(otherNode)}static makeContentStringComparable(contentString){return contentString.trim().replace(/[\t\r\n ]+/g,"").replace(/ +/g," ")}stringify(params,nodeIndentDepth){return this.stringifyContent(params,nodeIndentDepth)}stringifyContent(params,nodeIndentDepth){return this.isContentMultiLine()?this.stringifyMultiLineContent(params,nodeIndentDepth):this.stringifySingleLineContent(params,nodeIndentDepth)}stringifyMultiLineContent(params,nodeIndentDepth){var stringifiedContent="",newlineChar=params.newlineChar;return/\n/.test(params.newlineChar)||(newlineChar=" "),stringifiedContent+=this.getContentLines().map(contentLine=>Node_1.Node.generateIndentString(params.indentChar,nodeIndentDepth)+contentLine.trim()).join(newlineChar),/\n/.test(params.newlineChar)?stringifiedContent+params.newlineChar:stringifiedContent}stringifySingleLineContent(params,nodeIndentDepth){const formattedContent=(this.content||"").trim().replace(/(\r?\n(\t*))+/g," ").trim();return/\n/.test(params.newlineChar)?Node_1.Node.generateIndentString(params.indentChar,nodeIndentDepth)+formattedContent+"\n":formattedContent}}exports.TextNode=TextNode},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const TextNode_1=__webpack_require__(26);class CommentNode extends TextNode_1.TextNode{stringify(params,nodeIndentDepth){return`${CommentNode.generateIndentString(params.indentChar,nodeIndentDepth)}\x3c!--${this.stringifyContent(params,nodeIndentDepth)}--\x3e${params.newlineChar}`}stringifyMultiLineContent(params,nodeIndentDepth){return/\n/.test(params.newlineChar)?"\n"+super.stringifyMultiLineContent(params,nodeIndentDepth)+CommentNode.generateIndentString(params.indentChar,nodeIndentDepth):" "+super.stringifyMultiLineContent(params,nodeIndentDepth)+" "}stringifySingleLineContent(params,nodeIndentDepth){return" "+(this.content||"").trim().replace(/(\r?\n(\t*))+/g," ").trim()+" "}}exports.CommentNode=CommentNode},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const TextNode_1=__webpack_require__(26);class CDataSectionNode extends TextNode_1.TextNode{stringify(params,nodeIndentDepth){return`${CDataSectionNode.generateIndentString(params.indentChar,nodeIndentDepth)}<![CDATA[${this.stringifyContent(params,nodeIndentDepth)}]]>${params.newlineChar}`}stringifyMultiLineContent(params,nodeIndentDepth){return/\n/.test(params.newlineChar)?"\n"+super.stringifyMultiLineContent(params,nodeIndentDepth)+CDataSectionNode.generateIndentString(params.indentChar,nodeIndentDepth):super.stringifyMultiLineContent(params,nodeIndentDepth)}stringifySingleLineContent(params,nodeIndentDepth){return(this.content||"").replace(/(\r?\n(\t*))+/g," ")}}exports.CDataSectionNode=CDataSectionNode},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const Node_1=__webpack_require__(22);exports.DeclarationOpenerNode=class DeclarationOpenerNode extends Node_1.Node{constructor(){super(...arguments),this.systemLiterals=[],this.literalAndAttrOrder=[]}getNumberOfSystemLiterals(){return this.systemLiterals.length}getIndexOfSystemLiteral(literal){return this.systemLiterals.indexOf(literal)}getSystemLiteralAtIndex(literalIndex){return this.systemLiterals[literalIndex]}getAllSystemLiterals(){return[].concat(this.systemLiterals)}hasSystemLiteral(literal){return-1!==this.getIndexOfSystemLiteral(literal)}insertIntoSystemLiteralList(literal,index){return this.appendSystemLiteralIndexToOrderList(index),this.systemLiterals.splice(index,0,literal),this}prependToSystemLiteralList(literal){return this.insertIntoSystemLiteralList(literal,0),this}appendToSystemLiteralList(literal){return this.insertIntoSystemLiteralList(literal,this.getNumberOfSystemLiterals()),this}removeSystemLiteralAtIndex(index){return this.removeSystemLiteralIndexFromOrderList(index),this.systemLiterals.splice(index,1),this}removeSystemLiteral(literal){let index=this.getIndexOfSystemLiteral(literal);for(;-1!==index;)this.systemLiterals.splice(index,1),index=this.getIndexOfSystemLiteral(literal);return this}setAttribute(attrName,value,namespaceName){return this.appendAttributeToOrderList(Node_1.Node.joinAttributeNameWithNamespacePrefix(attrName,namespaceName)),super.setAttribute(attrName,value,namespaceName),this}removeAttribute(attrName,namespaceName){return this.removeAttributeFromOrderList(Node_1.Node.joinAttributeNameWithNamespacePrefix(attrName,namespaceName)),super.removeAttribute(attrName,namespaceName),this}isSystemLiteralListIdenticalTo(otherNode){if(this.systemLiterals.length!==otherNode.systemLiterals.length)return!1;for(let i=0;i<this.systemLiterals.length;i++)if(this.systemLiterals[i]!==otherNode.systemLiterals[i])return!1;return!0}isIdenticalTo(otherNode){return super.isIdenticalTo(otherNode)&&this.isSystemLiteralListIdenticalTo(otherNode)}stringify(params,nodeIndentDepth){return nodeIndentDepth=Math.max(nodeIndentDepth||0,0),`${Node_1.Node.generateIndentString(params.indentChar,nodeIndentDepth)}<!${this.tagName}${this.stringifyAttributesAndSystemLiterals(params,nodeIndentDepth)}>${params.newlineChar}`}stringifyAttributesAndSystemLiterals(params,nodeIndentDepth){return this.literalAndAttrOrder.map(attrNameOrLiteralIndex=>"string"==typeof attrNameOrLiteralIndex?this.stringifyAttribute(attrNameOrLiteralIndex,this.getAttribute(attrNameOrLiteralIndex)):` "${this.getSystemLiteralAtIndex(attrNameOrLiteralIndex)}"`).join("")}appendSystemLiteralIndexToOrderList(literalIndex){this.removeSystemLiteralIndexFromOrderList(literalIndex),this.literalAndAttrOrder.push(literalIndex)}removeSystemLiteralIndexFromOrderList(literalIndex){const index=this.literalAndAttrOrder.indexOf(literalIndex);-1!==index&&this.literalAndAttrOrder.splice(index,1)}appendAttributeToOrderList(attrNameWithNamespace){this.removeAttributeFromOrderList(attrNameWithNamespace),this.literalAndAttrOrder.push(attrNameWithNamespace)}removeAttributeFromOrderList(attrNameWithNamespace){const index=this.literalAndAttrOrder.indexOf(attrNameWithNamespace);-1!==index&&this.literalAndAttrOrder.splice(index,1)}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const Node_1=__webpack_require__(22);exports.ProcessingInstructionNode=class ProcessingInstructionNode extends Node_1.Node{stringify(params,nodeIndentDepth){return nodeIndentDepth=Math.max(nodeIndentDepth||0,0),`${Node_1.Node.generateIndentString(params.indentChar,nodeIndentDepth)}<?${this.tagName}${this.stringifyAttributes(nodeIndentDepth)}?>${params.newlineChar}`}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const Node_1=__webpack_require__(22);exports.ContainerNode=class ContainerNode extends Node_1.Node{constructor(){super(...arguments),this.childNodes=[]}getNumberOfChildren(){return this.childNodes.length}getChildAtIndex(index){return this.childNodes[index]}getIndexOfChild(child){return this.childNodes.indexOf(child)}hasChild(child){return-1!==this.getIndexOfChild(child)}insertChildAt(child,index){return Node_1.Node.changeParentNode(child,this),this.childNodes.splice(index,0,child),this}removeChildAt(index){const removedNode=this.childNodes.splice(index,1)[0];return Node_1.Node.removeParentNode(removedNode),this}insertChildBefore(child,referenceChild){if(!this.hasChild(referenceChild))throw new Error("Can not insert child: reference child not found.");return this.insertChildAt(child,this.getIndexOfChild(referenceChild)),this}insertChildAfter(child,referenceChild){if(!this.hasChild(referenceChild))throw new Error("Can not insert child: reference child not found.");return this.insertChildAt(child,this.getIndexOfChild(referenceChild)+1),this}prependChild(child){return this.insertChildAt(child,0),this}appendChild(child){return this.insertChildAt(child,this.getNumberOfChildren()),this}replaceChild(oldChild,newChild){const index=this.getIndexOfChild(oldChild);return this.removeChildAt(index),this.insertChildAt(newChild,index),this}forEachChildNode(fn){this.childNodes.forEach((childNode,index)=>fn(childNode,index))}isSubtreeIdenticalTo(otherNode){if(this.getNumberOfChildren()!==otherNode.getNumberOfChildren())return!1;for(let i=0;i<this.getNumberOfChildren();i++)if(!this.getChildAtIndex(i).isIdenticalTo(otherNode.getChildAtIndex(i)))return!1;return!0}isIdenticalTo(otherNode){return super.isIdenticalTo(otherNode)&&this.isSubtreeIdenticalTo(otherNode)}stringify(params,nodeIndentDepth){return nodeIndentDepth=Math.max(nodeIndentDepth||0,0),`${Node_1.Node.generateIndentString(params.indentChar,nodeIndentDepth)}<${this.tagName}${this.stringifyAttributes(nodeIndentDepth)}>${this.stringifyAllChildNodes(params,nodeIndentDepth)}${Node_1.Node.generateIndentString(params.indentChar,nodeIndentDepth)}</${this.tagName}>${params.newlineChar}`}stringifyAllChildNodes(params,nodeIndentDepth){var xml=params.newlineChar;return this.forEachChildNode(childNode=>{xml+=this.stringifyChildNode(childNode,params,nodeIndentDepth+1)}),xml}stringifyChildNode(childNode,params,nodeIndentDepth){return childNode.stringify(params,nodeIndentDepth)}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const ContainerNode_1=__webpack_require__(31);exports.DocumentNode=class DocumentNode extends ContainerNode_1.ContainerNode{stringify(params,nodeIndentDepth){return nodeIndentDepth=Math.max(nodeIndentDepth||0,0),this.stringifyAllChildNodes(params,nodeIndentDepth)}stringifyAllChildNodes(params,nodeIndentDepth){var xml="";return this.forEachChildNode(childNode=>{xml+=this.stringifyChildNode(childNode,params,nodeIndentDepth)}),xml}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const SyntaxErrorCode_1=__webpack_require__(34);exports.SyntaxErrorCode=SyntaxErrorCode_1.SyntaxErrorCode;const SyntaxError_1=__webpack_require__(35);exports.SyntaxError=SyntaxError_1.SyntaxError;const TagCloseMode_1=__webpack_require__(36);exports.TagCloseMode=TagCloseMode_1.TagCloseMode;const TagSyntaxRule_1=__webpack_require__(37);exports.TagSyntaxRule=TagSyntaxRule_1.TagSyntaxRule;const SyntaxRuleSet_1=__webpack_require__(38);exports.SyntaxRuleSet=SyntaxRuleSet_1.SyntaxRuleSet;const NodeFlags_1=__webpack_require__(23);exports.NodeFlags=NodeFlags_1.NodeFlags;const Parser_1=__webpack_require__(39);exports.Parser=Parser_1.Parser;const ruleSet=__webpack_require__(40);exports.ruleSet=ruleSet},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),function(SyntaxErrorCode){SyntaxErrorCode[SyntaxErrorCode.Unknown=0]="Unknown",SyntaxErrorCode[SyntaxErrorCode.UnexpectedToken=1]="UnexpectedToken",SyntaxErrorCode[SyntaxErrorCode.MissingTagNameAfterNamespacePrefix=2]="MissingTagNameAfterNamespacePrefix",SyntaxErrorCode[SyntaxErrorCode.MissingAttrNameAfterAttrPrefix=3]="MissingAttrNameAfterAttrPrefix",SyntaxErrorCode[SyntaxErrorCode.IllegalNamespacePrefix=4]="IllegalNamespacePrefix",SyntaxErrorCode[SyntaxErrorCode.IllegalSelfClose=5]="IllegalSelfClose",SyntaxErrorCode[SyntaxErrorCode.ExcessCloseTag=6]="ExcessCloseTag",SyntaxErrorCode[SyntaxErrorCode.InvalidTagName=7]="InvalidTagName"}(exports.SyntaxErrorCode||(exports.SyntaxErrorCode={}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const SyntaxErrorCode_1=__webpack_require__(34);class SyntaxError extends Error{constructor(errorCode,line,column,source,message){super(message),this.errorCode=errorCode,this.line=line,this.column=column,this.source=source,this.source=this.source||""}static getSyntaxErrorCodeName(errorCode){return SyntaxErrorCode_1.SyntaxErrorCode[errorCode]}getMessage(){return this.message}getErrorCode(){return this.errorCode}getErrorName(){return SyntaxError.getSyntaxErrorCodeName(this.getErrorCode())}getLine(){return this.line}getColumn(){return this.column}toString(){return`syntax error [${this.getErrorCode()} ${this.getErrorName()}] at token '${this.getTokenAt(this.line,this.column)}' ${this.getLine()}, ${this.getColumn()}: ${this.getMessage()}`}getTokenAt(line,column){const sourceLine=this.source.split(/\n/)[line-1];return"string"!=typeof sourceLine?"":sourceLine.split("")[column-1]}}exports.SyntaxError=SyntaxError},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),function(TagCloseMode){TagCloseMode[TagCloseMode.Tag=1]="Tag",TagCloseMode[TagCloseMode.SelfClose=2]="SelfClose",TagCloseMode[TagCloseMode.Void=4]="Void"}(exports.TagCloseMode||(exports.TagCloseMode={}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});class TagSyntaxRule{constructor(tagNames){this.tagNames=tagNames}static createForTagName(tagName){return new TagSyntaxRule([tagName])}static createForTagNames(...tagNames){return new TagSyntaxRule(tagNames.filter((tagName,index,array)=>array.indexOf(tagName)===index))}getTagNames(){return[].concat(this.tagNames)}appliesToTagName(tagName){return-1!==this.tagNames.indexOf(tagName)}getCloseMode(){return this.closeMode}setCloseMode(mode){return this.closeMode=mode,this}}exports.TagSyntaxRule=TagSyntaxRule},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});class SyntaxRuleSet{constructor(){this.tagSyntaxRules=[]}static createInstance(){return new this}static isSyntaxRuleSetClass(candidate){return"function"==typeof candidate&&candidate._syntaxRuleSetBrand_===SyntaxRuleSet._syntaxRuleSetBrand_}hasTagSyntaxRule(rule){return-1!==this.tagSyntaxRules.indexOf(rule)}getAllTagSyntaxRules(){return[].concat(this.tagSyntaxRules)}addTagSyntaxRule(rule){return this.hasTagSyntaxRule(rule)||this.tagSyntaxRules.push(rule),this}addTagSyntaxRules(...rules){return rules.forEach(rule=>this.addTagSyntaxRule(rule)),this}}SyntaxRuleSet._syntaxRuleSetBrand_=Math.random(),exports.SyntaxRuleSet=SyntaxRuleSet},function(module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):new P(function(resolve){resolve(result.value)}).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0});const ast=__webpack_require__(20),Node_1=__webpack_require__(22),SelfClosingNode_1=__webpack_require__(24),DocumentNode_1=__webpack_require__(32),ContainerNode_1=__webpack_require__(31),VoidNode_1=__webpack_require__(25),SyntaxErrorCode_1=__webpack_require__(34),SyntaxError_1=__webpack_require__(35),TagCloseMode_1=__webpack_require__(36),TagSyntaxRule_1=__webpack_require__(37),SyntaxRuleSet_1=__webpack_require__(38),NodeFlags_1=__webpack_require__(23);class Parser{constructor(stringToParse){this.stringToParse=stringToParse,this.defaultTagSyntaxRule=Parser.createDefaultTagSyntaxRule(),this.tagSyntaxRules={},this.ast=new DocumentNode_1.DocumentNode,this.currentContainerNode=this.getAst(),this.currentTokenIndex=0}static createForXmlString(stringToParse){return new Parser(stringToParse)}static parseString(stringToParse,ruleSet){return __awaiter(this,void 0,void 0,function*(){const parser=Parser.createForXmlString(stringToParse);return(ruleSet instanceof SyntaxRuleSet_1.SyntaxRuleSet||SyntaxRuleSet_1.SyntaxRuleSet.isSyntaxRuleSetClass(ruleSet))&&parser.applySyntaxRuleSet(ruleSet),parser.parseComplete(),parser})}static parseStringToAst(stringToParse,ruleSet){return __awaiter(this,void 0,void 0,function*(){return(yield Parser.parseString(stringToParse,ruleSet)).getAst()})}getDefaultTagSyntaxRule(){return this.defaultTagSyntaxRule}setDefaultTagSyntaxRule(rule){this.defaultTagSyntaxRule=rule}getTagSyntaxRuleForTagName(tagName){return this.tagSyntaxRules[tagName]||void 0}hasTagSyntaxRuleForTagName(tagName){const rule=this.getTagSyntaxRuleForTagName(tagName);return"object"==typeof rule&&null!==rule}addTagSyntaxRule(rule){return rule.getTagNames().forEach(tagName=>{this.tagSyntaxRules[tagName]=rule}),this}addTagSyntaxRules(...rules){return rules.forEach(rule=>this.addTagSyntaxRule(rule)),this}removeTagSyntaxRuleForTagName(tagName){return this.tagSyntaxRules[tagName]=void 0,this}removeTagSyntaxRulesForTagNames(tagNames){return tagNames.forEach(tagName=>this.removeTagSyntaxRuleForTagName(tagName)),this}applySyntaxRuleSet(ruleSet){return SyntaxRuleSet_1.SyntaxRuleSet.isSyntaxRuleSetClass(ruleSet)&&(ruleSet=ruleSet.createInstance()),this.addTagSyntaxRules(...ruleSet.getAllTagSyntaxRules()),this}getAst(){return this.ast}parseComplete(){if(!(this.stringToParse.length<1))for(;!this.isAtEndOfInput();)this.parseFromCurrentToken()}getCurrentLine(){const tokenMatrix=this.getTokenMatrix();return tokenMatrix[this.getCurrentTokenIndex()]?tokenMatrix[this.getCurrentTokenIndex()].line:0===this.getCurrentTokenIndex()?1:void 0}getCurrentColumn(){const tokenMatrix=this.getTokenMatrix();return tokenMatrix[this.getCurrentTokenIndex()]?tokenMatrix[this.getCurrentTokenIndex()].column:0===this.getCurrentTokenIndex()?1:void 0}getCurrentTokenIndex(){return this.currentTokenIndex}isAtEndOfInput(){return this.getCurrentTokenIndex()>=this.stringToParse.length}getTokenAtIndex(index){return this.stringToParse[index]}getCurrentToken(){return this.getTokenAtIndex(this.getCurrentTokenIndex())}getTokenRange(startIndex,endIndex){return this.stringToParse.slice(startIndex,endIndex)}getTokenRangeStartingAt(startIndex,length){return this.stringToParse.slice(startIndex,startIndex+length)}getNextToken(){return this.getTokenAtIndex(this.getCurrentTokenIndex()+1)}getPreviousToken(){return this.getTokenAtIndex(this.getCurrentTokenIndex()-1)}findFirstOccurenceOfTokenAfterIndex(token,startIndex){return this.stringToParse.indexOf(token[0],startIndex)}doesTokenOccurBeforeNextOccurenceOfOtherToken(token,otherToken,startIndex){const tokenIndex=this.findFirstOccurenceOfTokenAfterIndex(token,startIndex),otherTokenIndex=this.findFirstOccurenceOfTokenAfterIndex(otherToken,startIndex);return!(tokenIndex<0||otherTokenIndex<0)&&tokenIndex<otherTokenIndex}getCurrentContainerNode(){return this.currentContainerNode}descendInto(containerNode){this.currentContainerNode=containerNode}ascend(){this.currentContainerNode.parentNode instanceof ContainerNode_1.ContainerNode||this.raiseError(this.createSyntaxErrorAtCurrentToken(SyntaxErrorCode_1.SyntaxErrorCode.Unknown,"can not ascend: current containing node has no parent node")),this.currentContainerNode=this.currentContainerNode.parentNode}createSyntaxError(errorCode,line,column,message){return new SyntaxError_1.SyntaxError(errorCode,line,column,this.stringToParse,message)}createSyntaxErrorAtCurrentToken(errorCode,message){return this.createSyntaxError(errorCode,this.getCurrentLine(),this.getCurrentColumn(),message)}createUnexpectedTokenSyntaxErrorAtCurrentToken(message){return message=message||"token can not be parsed",this.createSyntaxErrorAtCurrentToken(SyntaxErrorCode_1.SyntaxErrorCode.UnexpectedToken,message)}raiseError(error){throw error}static isSingularCloseMode(closeMode){return closeMode in TagCloseMode_1.TagCloseMode}static createDefaultTagSyntaxRule(){const rule=TagSyntaxRule_1.TagSyntaxRule.createForTagName(void 0);return rule.setCloseMode(TagCloseMode_1.TagCloseMode.Tag|TagCloseMode_1.TagCloseMode.SelfClose),rule}getOverrideOrDefaultTagSyntaxRuleForTagName(tagName){return this.getTagSyntaxRuleForTagName(tagName)||this.getDefaultTagSyntaxRule()}getAllowedTagCloseModesForTagName(tagName){return this.getOverrideOrDefaultTagSyntaxRuleForTagName(tagName).getCloseMode()}isCloseModeAllowedForTagName(tagName,closeMode){if(!Parser.isSingularCloseMode(closeMode))throw new Error("Rule lookup failed: tag close mode must not be a combination of close modes.");return(this.getAllowedTagCloseModesForTagName(tagName)&closeMode)===closeMode}static isAlphabeticToken(token){return/[a-z]/i.test(token[0])}static isNumericToken(token){return/[0-9]/i.test(token[0])}static isWhitespaceToken(token){return" "===(token=token[0])||"\t"===token||"\r"===token||"\n"===token}static isTokenLegalInTagNameOrTagNameNamespacePrefix(token){return Parser.isAlphabeticToken(token)||Parser.isNumericToken(token)||"-"===token[0]||"_"===token[0]||"."===token[0]}static isTokenLegalInAttributeNameOrAttributeNameNameNamespacePrefix(token){return Parser.isAlphabeticToken(token)||Parser.isNumericToken(token)||"-"===token[0]||"_"===token[0]}moveByNumberOfTokens(numberOfTokens){this.currentTokenIndex+=numberOfTokens}goBackByNumberOfTokens(numberOfTokens){this.moveByNumberOfTokens(0-Math.abs(numberOfTokens))}goBackToPreviousToken(){this.goBackByNumberOfTokens(1)}advanceByNumberOfTokens(numberOfTokens){this.moveByNumberOfTokens(Math.abs(numberOfTokens))}advanceToNextToken(){this.advanceByNumberOfTokens(1)}parseFromCurrentToken(){if(!this.isAtEndOfInput())switch(!0){default:this.parseIntoNewTextNode();break;case"string"!=typeof this.getCurrentToken():case Parser.isWhitespaceToken(this.getCurrentToken())||"\r"===this.getCurrentToken()||"\n"===this.getCurrentToken():this.advanceToNextToken();break;case"<"===this.getCurrentToken():this.parseFromOpenAngleBracket()}}parseFromOpenAngleBracket(){"!"===this.getNextToken()||"?"===this.getNextToken()||!this.doesTokenOccurBeforeNextOccurenceOfOtherToken("<",">",this.getCurrentTokenIndex()+1)||this.doesTokenOccurBeforeNextOccurenceOfOtherToken('"',"<",this.getCurrentTokenIndex()+1)||this.doesTokenOccurBeforeNextOccurenceOfOtherToken("'","<",this.getCurrentTokenIndex()+1)?this.parseFromBeginningOfTag():this.parseIntoNewTextNode()}parseIntoNewTextNode(){const textNode=new ast.TextNode;for(textNode.content="",this.getCurrentContainerNode().appendChild(textNode);Parser.isWhitespaceToken(this.getCurrentToken());)this.advanceToNextToken();for(;!this.isAtEndOfInput()&&("<"!==this.getCurrentToken()||this.doesTokenOccurBeforeNextOccurenceOfOtherToken("<",">",this.getCurrentTokenIndex()+1));)textNode.content+=this.getCurrentToken(),this.advanceToNextToken()}parseFromBeginningOfTag(){switch(!0){default:this.raiseError(this.createUnexpectedTokenSyntaxErrorAtCurrentToken("expected exclamation mark, question mark or alphabetic tag name"));break;case Parser.isTokenLegalInTagNameOrTagNameNamespacePrefix(this.getNextToken()):this.parseFromBeginningOfNormalNode();break;case"</"===this.getTokenRangeStartingAt(this.getCurrentTokenIndex(),2):this.parseFromBeginningOfCloseTag();break;case"!"===this.getNextToken():switch(!0){default:this.raiseError(this.createUnexpectedTokenSyntaxErrorAtCurrentToken("expected declaration opener or comment node"));break;case"[CDATA["===this.getTokenRangeStartingAt(this.getCurrentTokenIndex()+2,7):this.parseFromBeginningOfCDataSectionNode();break;case Parser.isAlphabeticToken(this.getTokenAtIndex(this.getCurrentTokenIndex()+2)):this.parseFromBeginningOfDeclarationOpenerNode();break;case"--"===this.getTokenRangeStartingAt(this.getCurrentTokenIndex()+2,2):this.parseFromBeginningOfCommentNode()}break;case"?"===this.getNextToken():this.parseFromBeginningOfProcessingInstructionNode()}}parseFromBeginningOfNormalNode(){Parser.isTokenLegalInTagNameOrTagNameNamespacePrefix(this.getNextToken())||this.raiseError(this.createUnexpectedTokenSyntaxErrorAtCurrentToken(`expected beginning of tag name, got '${this.getNextToken()}'`));const node=new SelfClosingNode_1.SelfClosingNode;this.getCurrentContainerNode().appendChild(node),this.advanceToNextToken(),"."===this.getCurrentToken()&&this.raiseError(this.createSyntaxErrorAtCurrentToken(SyntaxErrorCode_1.SyntaxErrorCode.InvalidTagName,`expected beginning of tag name, got '${this.getCurrentToken()}'`)),this.parseCompleteOpeningTagInto(node,!0,!1)}findUnclosedNodeMatchingTagName(tagNameInfo){var containerNode=this.getCurrentContainerNode();do{if(!(containerNode.parserFlags&NodeFlags_1.NodeFlags.Closed||containerNode.namespacePrefix!==tagNameInfo.namespacePrefix||containerNode.tagName!==tagNameInfo.tagName))return containerNode}while((containerNode=containerNode.parentNode)&&containerNode.parentNode instanceof Node_1.Node)}parseFromBeginningOfCloseTag(){if("</"!==this.getTokenRangeStartingAt(this.getCurrentTokenIndex(),2)){const message=`expected beginning of close tag (</...), got '${this.getTokenRangeStartingAt(this.getCurrentTokenIndex(),2)}'`;this.raiseError(this.createUnexpectedTokenSyntaxErrorAtCurrentToken(message))}this.advanceByNumberOfTokens(2);const tagNameInfo=this.parseTagName();this.findUnclosedNodeMatchingTagName(tagNameInfo)instanceof ContainerNode_1.ContainerNode||this.raiseError(this.createSyntaxErrorAtCurrentToken(SyntaxErrorCode_1.SyntaxErrorCode.ExcessCloseTag,`close tag '${tagNameInfo.tagName}' has no open tag`)),">"!==this.getCurrentToken()&&this.raiseError(this.createUnexpectedTokenSyntaxErrorAtCurrentToken(`expected end of close tag, got '${this.getCurrentToken()}'`)),this.advanceToNextToken(),this.ascend()}parseFromBeginningOfDeclarationOpenerNode(){"<!"!==this.getTokenRangeStartingAt(this.getCurrentTokenIndex(),2)&&this.raiseError(this.createUnexpectedTokenSyntaxErrorAtCurrentToken("expected beginning of declaration opener (<!)"));const mdoNode=new ast.DeclarationOpenerNode;this.getCurrentContainerNode().appendChild(mdoNode),this.advanceByNumberOfTokens(2),this.parseCompleteOpeningTagInto(mdoNode,!1,!0)}parseFromBeginningOfProcessingInstructionNode(){"<?"!==this.getTokenRangeStartingAt(this.getCurrentTokenIndex(),2)&&this.raiseError(this.createUnexpectedTokenSyntaxErrorAtCurrentToken("expected beginning of processing instruction (<?)"));const piNode=new ast.ProcessingInstructionNode;this.getCurrentContainerNode().appendChild(piNode),this.advanceByNumberOfTokens(2),this.parseCompleteOpeningTagInto(piNode,!1,!1)}parseFromBeginningOfCDataSectionNode(){"<![CDATA["!==this.getTokenRangeStartingAt(this.getCurrentTokenIndex(),9)&&this.raiseError(this.createUnexpectedTokenSyntaxErrorAtCurrentToken("expected beginning of CDATA section (<![CDATA[)"));const cdataNode=new ast.CDataSectionNode;for(this.getCurrentContainerNode().appendChild(cdataNode),this.advanceByNumberOfTokens(9),cdataNode.content="";"]]>"!==this.getTokenRangeStartingAt(this.getCurrentTokenIndex(),3);)cdataNode.content+=this.getCurrentToken(),this.advanceToNextToken();this.advanceByNumberOfTokens(3)}parseFromBeginningOfCommentNode(){"\x3c!--"!==this.getTokenRangeStartingAt(this.getCurrentTokenIndex(),4)&&this.raiseError(this.createUnexpectedTokenSyntaxErrorAtCurrentToken("expected beginning of comment (\x3c!--)"));const commentNode=new ast.CommentNode;for(this.getCurrentContainerNode().appendChild(commentNode),this.advanceByNumberOfTokens(4),commentNode.content="";"--\x3e"!==this.getTokenRangeStartingAt(this.getCurrentTokenIndex(),3);)commentNode.content+=this.getCurrentToken(),this.advanceToNextToken();this.advanceByNumberOfTokens(3)}static createContainerNodeFromOtherNode(node){const containerNode=new ContainerNode_1.ContainerNode;return containerNode.namespacePrefix=node.namespacePrefix,containerNode.tagName=node.tagName,node.getAllAttributeNames().forEach(attrName=>containerNode.setAttribute(attrName,node.getAttribute(attrName))),containerNode}static createVoidNodeFromOtherNode(node){const voidNode=new VoidNode_1.VoidNode;return voidNode.namespacePrefix=node.namespacePrefix,voidNode.tagName=node.tagName,node.getAllAttributeNames().forEach(attrName=>voidNode.setAttribute(attrName,node.getAttribute(attrName))),voidNode}parseCompleteOpeningTagInto(node,allowDescendingIntoNewContainerNode,allowSystemLiterals){for(this.parseTagNameInto(node),"?"!==this.getCurrentToken()&&">"!==this.getCurrentToken()&&this.parseAttributeListInto(node,allowSystemLiterals);Parser.isWhitespaceToken(this.getCurrentToken());)this.advanceToNextToken();switch(!0){default:this.raiseError(this.createUnexpectedTokenSyntaxErrorAtCurrentToken("expected end of opening tag"));break;case"/>"===this.getTokenRangeStartingAt(this.getCurrentTokenIndex(),2):return this.isCloseModeAllowedForTagName(node.tagName,TagCloseMode_1.TagCloseMode.SelfClose)||this.raiseError(this.createSyntaxErrorAtCurrentToken(SyntaxErrorCode_1.SyntaxErrorCode.IllegalSelfClose,`tag '${node.tagName}' must not self-close`)),node.parserFlags|=NodeFlags_1.NodeFlags.SelfClosing,void this.advanceByNumberOfTokens(2);case"?"===this.getCurrentToken():this.advanceToNextToken();case">"===this.getCurrentToken():this.parseEndOfNonSelfClosingOpeningTag(node,allowDescendingIntoNewContainerNode),this.advanceToNextToken()}}parseEndOfNonSelfClosingOpeningTag(node,allowDescendingIntoNewContainerNode){if(node instanceof SelfClosingNode_1.SelfClosingNode)if(this.isCloseModeAllowedForTagName(node.tagName,TagCloseMode_1.TagCloseMode.Void)){const voidNode=Parser.createVoidNodeFromOtherNode(node);node.parentNode.replaceChild(node,voidNode),(node=voidNode).parserFlags|=NodeFlags_1.NodeFlags.Void}else{const containerNode=Parser.createContainerNodeFromOtherNode(node);node.parentNode.replaceChild(node,containerNode),node.parserFlags|=NodeFlags_1.NodeFlags.Opened,allowDescendingIntoNewContainerNode&&this.descendInto(containerNode)}}parseTagName(){for(var colonSeen=!1,nameStash="",tagNameInfo={namespacePrefix:void 0,tagName:void 0};Parser.isTokenLegalInTagNameOrTagNameNamespacePrefix(this.getCurrentToken())||":"===this.getCurrentToken();){if(":"===this.getCurrentToken()&&(colonSeen&&this.raiseError(this.createSyntaxErrorAtCurrentToken(SyntaxErrorCode_1.SyntaxErrorCode.IllegalNamespacePrefix,"illegal multiple namespace prefix (multiple colons in tag name)")),colonSeen=!0,tagNameInfo.namespacePrefix=nameStash,nameStash="",this.advanceToNextToken(),!Parser.isAlphabeticToken(this.getCurrentToken())))return void this.raiseError(this.createSyntaxErrorAtCurrentToken(SyntaxErrorCode_1.SyntaxErrorCode.MissingTagNameAfterNamespacePrefix,"namespace prefix must be followed by a tag name"));nameStash+=this.getCurrentToken(),this.advanceToNextToken()}return tagNameInfo.tagName=nameStash,tagNameInfo}parseTagNameInto(node){const tagNameInfo=this.parseTagName();node.namespacePrefix=tagNameInfo.namespacePrefix,node.tagName=tagNameInfo.tagName}parseAttributeListInto(node,allowLiterals){for(Parser.isWhitespaceToken(this.getCurrentToken())||"/"===this.getCurrentToken()||">"===this.getCurrentToken()||allowLiterals||'"'!==this.getCurrentToken()||this.raiseError(this.createUnexpectedTokenSyntaxErrorAtCurrentToken("expected whitespace or end of opening tag"));Parser.isWhitespaceToken(this.getCurrentToken());)this.advanceToNextToken();if(Parser.isAlphabeticToken(this.getCurrentToken())||allowLiterals||'"'===this.getCurrentToken())for(;">"!==this.getCurrentToken()&&"/"!==this.getCurrentToken()&&"?"!==this.getCurrentToken();)if('"'===this.getCurrentToken())allowLiterals||this.raiseError(this.createUnexpectedTokenSyntaxErrorAtCurrentToken("system literal not allowed on this node")),node.appendToSystemLiteralList(this.parseLiteral());else{let attrInfo=this.parseAttribute();if(""===attrInfo.name)continue;for(node.setAttribute(attrInfo.name,attrInfo.value);Parser.isWhitespaceToken(this.getCurrentToken());)this.advanceToNextToken()}}parseLiteral(){for(var value="";Parser.isWhitespaceToken(this.getCurrentToken());)this.advanceToNextToken();const valueQuoteCharacter=this.getCurrentToken();for(;!this.isAtEndOfInput()&&(this.advanceToNextToken(),this.getCurrentToken()!==valueQuoteCharacter);)value+=this.getCurrentToken();return this.advanceToNextToken(),value}parseAttribute(){for(var value,valueQuoteCharacter,name="",colonSeen=!1,getAttrInfo=()=>({name:name,value:value});Parser.isWhitespaceToken(this.getCurrentToken());)this.advanceToNextToken();for(;Parser.isTokenLegalInAttributeNameOrAttributeNameNameNamespacePrefix(this.getCurrentToken())||":"===this.getCurrentToken();){if(":"===this.getCurrentToken()&&(colonSeen&&this.raiseError(this.createSyntaxErrorAtCurrentToken(SyntaxErrorCode_1.SyntaxErrorCode.IllegalNamespacePrefix,"illegal multiple namespace prefix (multiple colons in tag name)")),colonSeen=!0,!Parser.isAlphabeticToken(this.getNextToken())))return void this.raiseError(this.createSyntaxErrorAtCurrentToken(SyntaxErrorCode_1.SyntaxErrorCode.MissingTagNameAfterNamespacePrefix,"namespace prefix must be followed by a tag name"));name+=this.getCurrentToken(),this.advanceToNextToken()}for(;Parser.isWhitespaceToken(this.getCurrentToken());)this.advanceToNextToken();if("="!==this.getCurrentToken())return getAttrInfo();if(this.advanceToNextToken(),Parser.isWhitespaceToken(this.getCurrentToken())||'"'===this.getCurrentToken()||"'"===this.getCurrentToken()){for(;Parser.isWhitespaceToken(this.getCurrentToken());)this.advanceToNextToken();if('"'!==this.getCurrentToken()&&"'"!==this.getCurrentToken())return getAttrInfo();valueQuoteCharacter=this.getCurrentToken()}for(value="";!this.isAtEndOfInput();){if(this.advanceToNextToken(),this.getCurrentToken()===valueQuoteCharacter){this.advanceToNextToken();break}value+=this.getCurrentToken()}return getAttrInfo()}getTokenMatrix(){return"object"==typeof this.tokenMatrix&&null!==this.tokenMatrix||this.createTokenMatrix(),this.tokenMatrix}createTokenMatrix(){var line=1,column=0;this.tokenMatrix=new Array(this.stringToParse.length);for(let i=0;i<this.stringToParse.length;i++){column+=1;const currentToken=this.stringToParse[i];this.tokenMatrix[i]={line:line,column:column},"\n"===currentToken&&(line+=1,column=0)}}}exports.Parser=Parser},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const Html5_1=__webpack_require__(41);exports.Html5=Html5_1.Html5},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const TagCloseMode_1=__webpack_require__(36),TagSyntaxRule_1=__webpack_require__(37),SyntaxRuleSet_1=__webpack_require__(38);class Html5 extends SyntaxRuleSet_1.SyntaxRuleSet{static get Loose(){return class Html5Loose extends Html5{constructor(){super(!0)}}}static get Strict(){return class Html5Strict extends Html5{constructor(){super(!1)}}}constructor(allowVoidElementsToSelfClose){super(),void 0===allowVoidElementsToSelfClose&&(allowVoidElementsToSelfClose=!0);const voidTagSyntaxRule=TagSyntaxRule_1.TagSyntaxRule.createForTagNames("area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr");allowVoidElementsToSelfClose?voidTagSyntaxRule.setCloseMode(TagCloseMode_1.TagCloseMode.Void|TagCloseMode_1.TagCloseMode.SelfClose):voidTagSyntaxRule.setCloseMode(TagCloseMode_1.TagCloseMode.Void),this.addTagSyntaxRule(voidTagSyntaxRule)}}exports.Html5=Html5},function(module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):new P(function(resolve){resolve(result.value)}).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0});const Parser_1=__webpack_require__(39);exports.Compiler=class Compiler{static parseXml(xmlString,ruleSet){return __awaiter(this,void 0,void 0,function*(){return Parser_1.Parser.parseString(xmlString,ruleSet)})}static parseXmlToAst(xmlString,ruleSet){return __awaiter(this,void 0,void 0,function*(){return Parser_1.Parser.parseStringToAst(xmlString,ruleSet)})}static formatXmlString(xmlString,formattingOptions,ruleSet){return __awaiter(this,void 0,void 0,function*(){return(yield Parser_1.Parser.parseStringToAst(xmlString,ruleSet)).toFormattedString(formattingOptions)})}}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"default",function(){return EventBus});class EventBus{constructor(){this._events={}}on(event,callback){return event in this._events?this._events[event].push(callback):this._events[event]=[callback],this._events[event].length-1}off(event,callback){const events=this._events[event];if("number"==typeof callback)events[callback]=null;else for(let i=0;i<events.length;i++)callback===events[i]&&(events[i]=null)}dispatch(event,...args){if(event in this._events){const fns=this._events[event];for(const fn of fns)fn&&fn(...args)}}}},function(module,__webpack_exports__,__webpack_require__){"use strict";function load(name){const url="data/"+(name.endsWith(".json")?name:name+".json");return fetch(url).then(res=>res.json())}__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"default",function(){return load})}])});