diff --git a/packages/monster/dist/modules/dom/attributes.js b/packages/monster/dist/modules/dom/attributes.js new file mode 100644 index 0000000000000000000000000000000000000000..7b378cc98e209ce039c93810ff9bf39c4e32f79c --- /dev/null +++ b/packages/monster/dist/modules/dom/attributes.js @@ -0,0 +1,2 @@ +/** Monster 1.9.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ +'use strict';import{Monster}from"../namespace.js";import{TokenList}from"../types/tokenlist.js";import{validateInstance,validateString}from"../types/validate.js";function toggleAttributeValue(element,key,value){validateInstance(element,HTMLElement);validateString(value);validateString(key);if(!element.hasAttribute(key)){element.setAttribute(key,value);return element}element.setAttribute(key,new TokenList(element.getAttribute(key)).toggle(value).toString());return element}function addAttributeValue(element,key,value){validateInstance(element,HTMLElement);validateString(value);validateString(key);if(!element.hasAttribute(key)){element.setAttribute(key,value);return element}element.setAttribute(key,new TokenList(element.getAttribute(key)).add(value).toString());return element}function removeAttributeValue(element,key,value){validateInstance(element,HTMLElement);validateString(value);validateString(key);if(!element.hasAttribute(key)){return element}element.setAttribute(key,new TokenList(element.getAttribute(key)).remove(value).toString());return element}function containsAttributeValue(element,key,value){validateInstance(element,HTMLElement);validateString(value);validateString(key);if(!element.hasAttribute(key)){return false}return new TokenList(element.getAttribute(key)).contains(value)}function replaceAttributeValue(element,key,from,to){validateInstance(element,HTMLElement);validateString(from);validateString(to);validateString(key);if(!element.hasAttribute(key)){return element}element.setAttribute(key,new TokenList(element.getAttribute(key)).replace(from,to).toString());return element}function clearAttributeValue(element,key){validateInstance(element,HTMLElement);validateString(key);if(!element.hasAttribute(key)){return element}element.setAttribute(key,"");return element}Monster.assignToNamespace("Monster.Data",clearAttributeValue,replaceAttributeValue,containsAttributeValue,removeAttributeValue,addAttributeValue,toggleAttributeValue);export{Monster,clearAttributeValue,replaceAttributeValue,containsAttributeValue,removeAttributeValue,addAttributeValue,toggleAttributeValue}; diff --git a/packages/monster/dist/modules/dom/constants.js b/packages/monster/dist/modules/dom/constants.js index 970626e9a3a1ee0eb71c89037aa9ee5ab0ebffa2..09f0d111a31efcbf3ee0261aa49f372c603602ab 100644 --- a/packages/monster/dist/modules/dom/constants.js +++ b/packages/monster/dist/modules/dom/constants.js @@ -1,2 +1,2 @@ /** Monster 1.9.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ -'use strict';import{Monster}from"../namespace.js";const ATTRIBUTE_PREFIX="data-monster-";const ATTRIBUTE_OPTIONS=ATTRIBUTE_PREFIX+"options";const DEFAULT_THEME="monster";const ATTRIBUTE_THEME_PREFIX=ATTRIBUTE_PREFIX+"theme-";const ATTRIBUTE_THEME_NAME=ATTRIBUTE_THEME_PREFIX+"name";const ATTRIBUTE_UPDATER_ATTRIBUTES=ATTRIBUTE_PREFIX+"attributes";const ATTRIBUTE_UPDATER_REPLACE=ATTRIBUTE_PREFIX+"replace";const ATTRIBUTE_UPDATER_INSERT=ATTRIBUTE_PREFIX+"insert";const ATTRIBUTE_UPDATER_INSERT_REFERENCE=ATTRIBUTE_PREFIX+"insert-reference";const ATTRIBUTE_UPDATER_REMOVE=ATTRIBUTE_PREFIX+"remove";export{Monster,ATTRIBUTE_PREFIX,ATTRIBUTE_OPTIONS,DEFAULT_THEME,ATTRIBUTE_THEME_PREFIX,ATTRIBUTE_THEME_NAME,ATTRIBUTE_UPDATER_ATTRIBUTES,ATTRIBUTE_UPDATER_REPLACE,ATTRIBUTE_UPDATER_INSERT,ATTRIBUTE_UPDATER_INSERT_REFERENCE,ATTRIBUTE_UPDATER_REMOVE}; +'use strict';import{Monster}from"../namespace.js";const ATTRIBUTE_PREFIX="data-monster-";const ATTRIBUTE_OPTIONS=ATTRIBUTE_PREFIX+"options";const DEFAULT_THEME="monster";const ATTRIBUTE_THEME_PREFIX=ATTRIBUTE_PREFIX+"theme-";const ATTRIBUTE_THEME_NAME=ATTRIBUTE_THEME_PREFIX+"name";const ATTRIBUTE_UPDATER_ATTRIBUTES=ATTRIBUTE_PREFIX+"attributes";const ATTRIBUTE_UPDATER_REPLACE=ATTRIBUTE_PREFIX+"replace";const ATTRIBUTE_UPDATER_INSERT=ATTRIBUTE_PREFIX+"insert";const ATTRIBUTE_UPDATER_INSERT_REFERENCE=ATTRIBUTE_PREFIX+"insert-reference";const ATTRIBUTE_UPDATER_REMOVE=ATTRIBUTE_PREFIX+"remove";const ATTRIBUTE_UPDATER_BIND=ATTRIBUTE_PREFIX+"bind";const ATTRIBUTE_UPDATER_HASSYMBOL=ATTRIBUTE_PREFIX+"hassymbol";export{Monster,ATTRIBUTE_PREFIX,ATTRIBUTE_OPTIONS,DEFAULT_THEME,ATTRIBUTE_THEME_PREFIX,ATTRIBUTE_THEME_NAME,ATTRIBUTE_UPDATER_ATTRIBUTES,ATTRIBUTE_UPDATER_REPLACE,ATTRIBUTE_UPDATER_INSERT,ATTRIBUTE_UPDATER_INSERT_REFERENCE,ATTRIBUTE_UPDATER_REMOVE,ATTRIBUTE_UPDATER_BIND,ATTRIBUTE_UPDATER_HASSYMBOL}; diff --git a/packages/monster/dist/modules/dom/updater.js b/packages/monster/dist/modules/dom/updater.js index e14a55fead0be9eb27b0896f6497bbf04cc40850..135de9ce8a38b6bd521a54704608f4cd8f1afdf1 100644 --- a/packages/monster/dist/modules/dom/updater.js +++ b/packages/monster/dist/modules/dom/updater.js @@ -1,2 +1,2 @@ /** Monster 1.9.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ -'use strict';import{Pipe}from"../data/pipe.js";import{Base,Monster}from"../types/base.js";import{isInstance,isArray}from"../types/is.js";import{Observer}from"../types/observer.js";import{ProxyObserver}from"../types/proxyobserver.js";import{validateInstance}from"../types/validate.js";import{clone}from"../util/clone.js";import{Diff}from"../data/diff.js";import{ATTRIBUTE_UPDATER_REPLACE,ATTRIBUTE_UPDATER_ATTRIBUTES,ATTRIBUTE_UPDATER_INSERT,ATTRIBUTE_UPDATER_REMOVE,ATTRIBUTE_UPDATER_INSERT_REFERENCE}from"../dom/constants.js";import{getDocument}from"./util.js";class Updater extends Base{constructor(element,subject){super();this.element=validateInstance(element,HTMLElement);if(subject===undefined)subject={};if(!isInstance(subject,ProxyObserver)){subject=new ProxyObserver(subject)}this.last={};this.callbacks=new Map;this.subject=subject.attachObserver(new Observer(()=>{const s=this.subject.getRealSubject();const diff=Diff(this.last,s);this.last=clone(s);for(const[,change]of Object.entries(diff)){removeElement.call(this,change);insertElement.call(this,change);updateContent.call(this,change);updateAttributes.call(this,change)}}))}run(){this.last={"__init__":true};return this.subject.notifyObservers()}getSubject(){return this.subject.getSubject()}setCallback(name,callback){this.callbacks.set(name,callback);return this}}function removeElement(change){for(const[,element]of this.element.querySelectorAll(":scope ["+ATTRIBUTE_UPDATER_REMOVE+"]").entries()){element.parentNode.removeChild(element)}return this}function insertElement(change){const self=this;const subject=self.subject.getRealSubject();const document=getDocument();let mem=new WeakSet;let wd=0;while(true){let found=false;wd++;let p=clone(change?.["path"]);if(!isArray(p))return this;while(p.length>0){const current=p.join(".");const list=this.element.querySelectorAll(":scope ["+ATTRIBUTE_UPDATER_INSERT+"*=\"path:"+current+"\"]").entries();for(const[,containerElement]of list){if(mem.has(containerElement))continue;mem.add(containerElement);found=true;const attributes=containerElement.getAttribute(ATTRIBUTE_UPDATER_INSERT);let def=attributes.trim();let i=def.indexOf(" ");let key=def.substr(0,i).trim();let refPrefix=key+"-";let cmd=def.substr(i).trim();if(cmd.indexOf("|")>0){throw new Error("pipes are not allowed when cloning a node.")}let pipe=new Pipe(cmd);this.callbacks.forEach((f,n)=>{pipe.setCallback(n,f)});let value=pipe.run(subject);let dataPath=cmd.split(":").pop();let insertPoint;if(containerElement.hasChildNodes()){insertPoint=containerElement.lastChild}if(!isArray(value)){throw new Error("the value is not iterable")}let available=new Set;for(const[_i,obj]of Object.entries(value)){let ref=refPrefix+_i;let currentPath=dataPath+"."+_i;available.add(ref);let refElement=containerElement.querySelector("["+ATTRIBUTE_UPDATER_INSERT_REFERENCE+"=\""+ref+"\"]");if(refElement instanceof HTMLElement){insertPoint=refElement;continue}appendNewDocumentFragment(containerElement,key,ref,currentPath)}let nodes=containerElement.querySelectorAll("["+ATTRIBUTE_UPDATER_INSERT_REFERENCE+"*=\""+refPrefix+"\"]");for(const[,node]of Object.entries(nodes)){if(!available.has(node.getAttribute(ATTRIBUTE_UPDATER_INSERT_REFERENCE))){containerElement.removeChild(node)}}}p.pop()}if(found===false)break;if(wd++>200){throw new Error("the maximum depth for the recursion is reached.")}}}function appendNewDocumentFragment(container,key,ref,path){let template=getDocument().querySelector("template#"+key);if(!(template instanceof HTMLTemplateElement)){throw new Error("no template was found with the specified key "+key)}let nodes=template.content.cloneNode(true);for(const[,node]of Object.entries(nodes.childNodes)){if(node instanceof HTMLElement){node.setAttribute(ATTRIBUTE_UPDATER_INSERT_REFERENCE,ref);if(node.hasAttribute(ATTRIBUTE_UPDATER_REPLACE)){let value=node.getAttribute(ATTRIBUTE_UPDATER_REPLACE);node.setAttribute(ATTRIBUTE_UPDATER_REPLACE,value.replace("path:"+key,"path:"+path))}}container.appendChild(node)}}function updateContent(change){const self=this;const subject=self.subject.getRealSubject();let p=clone(change?.["path"]);runUpdateContent.call(this,this.element,p,subject);return this}function runUpdateContent(container,parts,subject){if(!isArray(parts))return;parts=clone(parts);let mem=new WeakSet;while(parts.length>0){const current=parts.join(".");parts.pop();for(const[,element]of container.querySelectorAll(":scope ["+ATTRIBUTE_UPDATER_REPLACE+"^=\"path:"+current+"\"], ["+ATTRIBUTE_UPDATER_REPLACE+"^=\"static:\"]").entries()){if(mem.has(element))continue;mem.add(element);const attributes=element.getAttribute(ATTRIBUTE_UPDATER_REPLACE);let cmd=attributes.trim();let pipe=new Pipe(cmd);this.callbacks.forEach((f,n)=>{pipe.setCallback(n,f)});let value=pipe.run(subject);if(value instanceof HTMLElement){while(element.firstChild){element.removeChild(element.firstChild)}element.addNode(value)}else{element.innerHTML=value}}}}function updateAttributes(change){const self=this;const subject=self.subject.getRealSubject();let p=clone(change?.["path"]);runUpdateAttributes(this.element,p,subject);return this}function runUpdateAttributes(container,parts,subject){if(!isArray(parts))return;parts=clone(parts);let mem=new WeakSet;while(parts.length>0){const current=parts.join(".");parts.pop();for(const[,element]of container.querySelectorAll(":scope ["+ATTRIBUTE_UPDATER_ATTRIBUTES+"*=\"path:"+current+"\"]").entries()){if(mem.has(element))continue;mem.add(element);const attributes=element.getAttribute(ATTRIBUTE_UPDATER_ATTRIBUTES);for(let[,def]of Object.entries(attributes.split(","))){def=def.trim();let i=def.indexOf(" ");let name=def.substr(0,i).trim();let cmd=def.substr(i).trim();let value=new Pipe(cmd).run(subject);if(element.getAttribute(name)!==value){element.setAttribute(name,value)}}}}}Monster.assignToNamespace("Monster.DOM",Updater);export{Monster,Updater}; +'use strict';import{Pathfinder}from"../data/pathfinder.js";import{Pipe}from"../data/pipe.js";import{Base,Monster}from"../types/base.js";import{isInstance,isArray}from"../types/is.js";import{Observer}from"../types/observer.js";import{ProxyObserver}from"../types/proxyobserver.js";import{validateInstance}from"../types/validate.js";import{clone}from"../util/clone.js";import{Diff}from"../data/diff.js";import{ATTRIBUTE_UPDATER_REPLACE,ATTRIBUTE_UPDATER_ATTRIBUTES,ATTRIBUTE_UPDATER_INSERT,ATTRIBUTE_UPDATER_REMOVE,ATTRIBUTE_UPDATER_INSERT_REFERENCE,ATTRIBUTE_UPDATER_BIND,ATTRIBUTE_UPDATER_HASSYMBOL}from"../dom/constants.js";import{getDocument}from"./util.js";const symbol=Symbol("monster-updater");class Updater extends Base{constructor(element,subject){super();this.element=validateInstance(element,HTMLElement);if(this.element?.[symbol]===undefined){this.element[symbol]=new Set}this.element[symbol].add(this);this.element.setAttribute(ATTRIBUTE_UPDATER_HASSYMBOL,symbol.toString());if(subject===undefined)subject={};if(!isInstance(subject,ProxyObserver)){subject=new ProxyObserver(subject)}this.last={};this.callbacks=new Map;this.subject=subject.attachObserver(new Observer(()=>{const s=this.subject.getRealSubject();const diff=Diff(this.last,s);this.last=clone(s);for(const[,change]of Object.entries(diff)){removeElement.call(this,change);insertElement.call(this,change);updateContent.call(this,change);updateAttributes.call(this,change)}}));this.eventTypes=["keyup","click"]}enableEventProcessing(){this.disableEventProcessing();const pathfinder=new Pathfinder(this.subject.getSubject());for(const type of this.eventTypes){this.element.addEventListener(type,controlEventHandler)}return this}disableEventProcessing(){for(const type of this.eventTypes){this.element.removeEventListener(type,controlEventHandler)}return this}run(){this.last={"__init__":true};return this.subject.notifyObservers()}getSubject(){return this.subject.getSubject()}setCallback(name,callback){this.callbacks.set(name,callback);return this}}function controlEventHandler(event){const element=event.target;if(element.hasAttribute(ATTRIBUTE_UPDATER_BIND)){const value=element.getAttribute(ATTRIBUTE_UPDATER_BIND);console.log(value);console.log(element[symbol]);element[symbol].forEach((a,b)=>{console.log(a,b)})}}function removeElement(change){for(const[,element]of this.element.querySelectorAll(":scope ["+ATTRIBUTE_UPDATER_REMOVE+"]").entries()){element.parentNode.removeChild(element)}return this}function insertElement(change){const self=this;const subject=self.subject.getRealSubject();const document=getDocument();let mem=new WeakSet;let wd=0;while(true){let found=false;wd++;let p=clone(change?.["path"]);if(!isArray(p))return this;while(p.length>0){const current=p.join(".");const list=this.element.querySelectorAll(":scope ["+ATTRIBUTE_UPDATER_INSERT+"*=\"path:"+current+"\"]").entries();for(const[,containerElement]of list){if(mem.has(containerElement))continue;mem.add(containerElement);found=true;const attributes=containerElement.getAttribute(ATTRIBUTE_UPDATER_INSERT);let def=attributes.trim();let i=def.indexOf(" ");let key=def.substr(0,i).trim();let refPrefix=key+"-";let cmd=def.substr(i).trim();if(cmd.indexOf("|")>0){throw new Error("pipes are not allowed when cloning a node.")}let pipe=new Pipe(cmd);this.callbacks.forEach((f,n)=>{pipe.setCallback(n,f)});let value=pipe.run(subject);let dataPath=cmd.split(":").pop();let insertPoint;if(containerElement.hasChildNodes()){insertPoint=containerElement.lastChild}if(!isArray(value)){throw new Error("the value is not iterable")}let available=new Set;for(const[_i,obj]of Object.entries(value)){let ref=refPrefix+_i;let currentPath=dataPath+"."+_i;available.add(ref);let refElement=containerElement.querySelector("["+ATTRIBUTE_UPDATER_INSERT_REFERENCE+"=\""+ref+"\"]");if(refElement instanceof HTMLElement){insertPoint=refElement;continue}appendNewDocumentFragment(containerElement,key,ref,currentPath)}let nodes=containerElement.querySelectorAll("["+ATTRIBUTE_UPDATER_INSERT_REFERENCE+"*=\""+refPrefix+"\"]");for(const[,node]of Object.entries(nodes)){if(!available.has(node.getAttribute(ATTRIBUTE_UPDATER_INSERT_REFERENCE))){containerElement.removeChild(node)}}}p.pop()}if(found===false)break;if(wd++>200){throw new Error("the maximum depth for the recursion is reached.")}}}function appendNewDocumentFragment(container,key,ref,path){let template=getDocument().querySelector("template#"+key);if(!(template instanceof HTMLTemplateElement)){throw new Error("no template was found with the specified key "+key)}let nodes=template.content.cloneNode(true);for(const[,node]of Object.entries(nodes.childNodes)){if(node instanceof HTMLElement){node.setAttribute(ATTRIBUTE_UPDATER_INSERT_REFERENCE,ref);if(node.hasAttribute(ATTRIBUTE_UPDATER_REPLACE)){let value=node.getAttribute(ATTRIBUTE_UPDATER_REPLACE);node.setAttribute(ATTRIBUTE_UPDATER_REPLACE,value.replace("path:"+key,"path:"+path))}}container.appendChild(node)}}function updateContent(change){const self=this;const subject=self.subject.getRealSubject();let p=clone(change?.["path"]);runUpdateContent.call(this,this.element,p,subject);return this}function runUpdateContent(container,parts,subject){if(!isArray(parts))return;parts=clone(parts);let mem=new WeakSet;while(parts.length>0){const current=parts.join(".");parts.pop();for(const[,element]of container.querySelectorAll(":scope ["+ATTRIBUTE_UPDATER_REPLACE+"^=\"path:"+current+"\"], ["+ATTRIBUTE_UPDATER_REPLACE+"^=\"static:\"]").entries()){if(mem.has(element))continue;mem.add(element);const attributes=element.getAttribute(ATTRIBUTE_UPDATER_REPLACE);let cmd=attributes.trim();let pipe=new Pipe(cmd);this.callbacks.forEach((f,n)=>{pipe.setCallback(n,f)});let value=pipe.run(subject);if(value instanceof HTMLElement){while(element.firstChild){element.removeChild(element.firstChild)}element.addNode(value)}else{element.innerHTML=value}}}}function updateAttributes(change){const self=this;const subject=self.subject.getRealSubject();let p=clone(change?.["path"]);runUpdateAttributes(this.element,p,subject);return this}function runUpdateAttributes(container,parts,subject){if(!isArray(parts))return;parts=clone(parts);let mem=new WeakSet;while(parts.length>0){const current=parts.join(".");parts.pop();for(const[,element]of container.querySelectorAll(":scope ["+ATTRIBUTE_UPDATER_ATTRIBUTES+"*=\"path:"+current+"\"]").entries()){if(mem.has(element))continue;mem.add(element);const attributes=element.getAttribute(ATTRIBUTE_UPDATER_ATTRIBUTES);for(let[,def]of Object.entries(attributes.split(","))){def=def.trim();let i=def.indexOf(" ");let name=def.substr(0,i).trim();let cmd=def.substr(i).trim();let value=new Pipe(cmd).run(subject);if(element.getAttribute(name)!==value){element.setAttribute(name,value)}}}}}Monster.assignToNamespace("Monster.DOM",Updater);export{Monster,Updater}; diff --git a/packages/monster/dist/modules/monster.js b/packages/monster/dist/modules/monster.js index 4f7035135c91cae323931d33978fbafb8facd632..ce976331ed25c42bd6deba6b1568d6dec4adcebc 100644 --- a/packages/monster/dist/modules/monster.js +++ b/packages/monster/dist/modules/monster.js @@ -1,2 +1,2 @@ /** Monster 1.9.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ -'use strict';import{Monster}from"./namespace.js";import"./types/base.js";import"./types/global.js";import"./types/id.js";import"./types/is.js";import"./types/observer.js";import"./types/observerlist.js";import"./types/proxyobserver.js";import"./types/queue.js";import"./types/randomid.js";import"./types/stack.js";import"./types/tokenlist.js";import"./types/uniquequeue.js";import"./types/validate.js";import"./types/version.js";import"./math/random.js";import"./data/diff.js";import"./data/pathfinder.js";import"./data/pipe.js";import"./data/transformer.js";import"./logging/handler.js";import"./logging/logentry.js";import"./logging/logger.js";import"./logging/handler/console.js";import"./util/clone.js";import"./util/comparator.js";import"./util/freeze.js";import"./constraints/abstract.js";import"./constraints/abstractoperator.js";import"./constraints/andoperator.js";import"./constraints/invalid.js";import"./constraints/isarray.js";import"./constraints/isobject.js";import"./constraints/oroperator.js";import"./constraints/valid.js";import"./dom/util.js";import"./dom/template.js";import"./dom/handle.js";import"./dom/assembler.js";import"./dom/customelement.js";Monster.Util.deepFreeze(Monster);export{Monster};let rootName;try{rootName=Monster.Types.getGlobalObject("__MonsterRootName__")}catch(e){}if(!rootName)rootName="Monster";Monster.Types.getGlobal()[rootName]=Monster; +'use strict';import{Monster}from"./namespace.js";import"./types/base.js";import"./types/global.js";import"./types/id.js";import"./types/is.js";import"./types/observer.js";import"./types/observerlist.js";import"./types/proxyobserver.js";import"./types/queue.js";import"./types/randomid.js";import"./types/stack.js";import"./types/tokenlist.js";import"./types/uniquequeue.js";import"./types/validate.js";import"./types/version.js";import"./math/random.js";import"./data/diff.js";import"./data/pathfinder.js";import"./data/pipe.js";import"./data/transformer.js";import"./logging/handler.js";import"./logging/logentry.js";import"./logging/logger.js";import"./logging/handler/console.js";import"./util/clone.js";import"./util/comparator.js";import"./util/freeze.js";import"./constraints/abstract.js";import"./constraints/abstractoperator.js";import"./constraints/andoperator.js";import"./constraints/invalid.js";import"./constraints/isarray.js";import"./constraints/isobject.js";import"./constraints/oroperator.js";import"./constraints/valid.js";import"./dom/util.js";import"./dom/template.js";import"./dom/handle.js";import"./dom/assembler.js";import"./dom/customelement.js";import"./dom/attributes.js";Monster.Util.deepFreeze(Monster);export{Monster};let rootName;try{rootName=Monster.Types.getGlobalObject("__MonsterRootName__")}catch(e){}if(!rootName)rootName="Monster";Monster.Types.getGlobal()[rootName]=Monster; diff --git a/packages/monster/dist/monster.dev.js b/packages/monster/dist/monster.dev.js index 0ff5c4230e6282025675727bacea7efda975f762..bfe9bf44890d0406275ce5c44650191e3c01a7e1 100644 --- a/packages/monster/dist/monster.dev.js +++ b/packages/monster/dist/monster.dev.js @@ -85,7 +85,7 @@ exports.AbstractConstraint = AbstractConstraint; _namespace.Monster.assignToNamespace('Monster.Constraints', AbstractConstraint); -},{"../namespace.js":26,"../types/base.js":27}],2:[function(require,module,exports){ +},{"../namespace.js":27,"../types/base.js":28}],2:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -502,7 +502,7 @@ exports.IsArray = IsArray; _abstract.Monster.assignToNamespace('Monster.Constraints', IsArray); -},{"../types/is.js":30,"./abstract.js":1}],6:[function(require,module,exports){ +},{"../types/is.js":31,"./abstract.js":1}],6:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -619,7 +619,7 @@ exports.IsObject = IsObject; _abstract.Monster.assignToNamespace('Monster.Constraints', IsObject); -},{"../types/is.js":30,"./abstract.js":1}],7:[function(require,module,exports){ +},{"../types/is.js":31,"./abstract.js":1}],7:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -1128,7 +1128,7 @@ function getOperator(a, b) { _is.Monster.assignToNamespace('Monster.Data', Diff); -},{"../types/is.js":30}],10:[function(require,module,exports){ +},{"../types/is.js":31}],10:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -1638,7 +1638,7 @@ function deleteValueViaPath(object, path) { return; } -},{"../namespace.js":26,"../types/base.js":27,"../types/is.js":30,"../types/stack.js":36,"../types/validate.js":39}],11:[function(require,module,exports){ +},{"../namespace.js":27,"../types/base.js":28,"../types/is.js":31,"../types/stack.js":37,"../types/validate.js":40}],11:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -1814,7 +1814,7 @@ exports.Pipe = Pipe; _namespace.Monster.assignToNamespace('Monster.Data', Pipe); -},{"../namespace.js":26,"../types/base.js":27,"../types/validate.js":39,"./transformer.js":12}],12:[function(require,module,exports){ +},{"../namespace.js":27,"../types/base.js":28,"../types/validate.js":40,"./transformer.js":12}],12:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -2326,7 +2326,7 @@ function transform(value) { return value; } -},{"../namespace.js":26,"../types/base.js":27,"../types/id.js":29,"../types/is.js":30,"../types/validate.js":39,"../util/clone.js":41,"./pathfinder.js":10}],13:[function(require,module,exports){ +},{"../namespace.js":27,"../types/base.js":28,"../types/id.js":30,"../types/is.js":31,"../types/validate.js":40,"../util/clone.js":42,"./pathfinder.js":10}],13:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -2480,19 +2480,175 @@ exports.Assembler = Assembler; _base.Monster.assignToNamespace('Monster.DOM', Assembler); -},{"../types/base.js":27,"../types/global.js":28,"../types/proxyobserver.js":33,"../types/validate.js":39}],14:[function(require,module,exports){ +},{"../types/base.js":28,"../types/global.js":29,"../types/proxyobserver.js":34,"../types/validate.js":40}],14:[function(require,module,exports){ 'use strict'; +/** + * @author schukai GmbH + */ Object.defineProperty(exports, "__esModule", { value: true }); +exports.clearAttributeValue = clearAttributeValue; +exports.replaceAttributeValue = replaceAttributeValue; +exports.containsAttributeValue = containsAttributeValue; +exports.removeAttributeValue = removeAttributeValue; +exports.addAttributeValue = addAttributeValue; +exports.toggleAttributeValue = toggleAttributeValue; Object.defineProperty(exports, "Monster", { enumerable: true, get: function get() { return _namespace.Monster; } }); -exports.ATTRIBUTE_UPDATER_REMOVE = exports.ATTRIBUTE_UPDATER_INSERT_REFERENCE = exports.ATTRIBUTE_UPDATER_INSERT = exports.ATTRIBUTE_UPDATER_REPLACE = exports.ATTRIBUTE_UPDATER_ATTRIBUTES = exports.ATTRIBUTE_THEME_NAME = exports.ATTRIBUTE_THEME_PREFIX = exports.DEFAULT_THEME = exports.ATTRIBUTE_OPTIONS = exports.ATTRIBUTE_PREFIX = void 0; + +var _namespace = require("../namespace.js"); + +var _tokenlist = require("../types/tokenlist.js"); + +var _validate = require("../types/validate.js"); + +/** + * @since 1.9.0 + * @param {HTMLElement} element + * @param {string} key + * @param {string} value + * @return {HTMLElement} + */ +function toggleAttributeValue(element, key, value) { + (0, _validate.validateInstance)(element, HTMLElement); + (0, _validate.validateString)(value); + (0, _validate.validateString)(key); + + if (!element.hasAttribute(key)) { + element.setAttribute(key, value); + return element; + } + + element.setAttribute(key, new _tokenlist.TokenList(element.getAttribute(key)).toggle(value).toString()); + return element; +} +/** + * @since 1.9.0 + * @param {HTMLElement} element + * @param {string} key + * @param {string} value + * @return {HTMLElement} + */ + + +function addAttributeValue(element, key, value) { + (0, _validate.validateInstance)(element, HTMLElement); + (0, _validate.validateString)(value); + (0, _validate.validateString)(key); + + if (!element.hasAttribute(key)) { + element.setAttribute(key, value); + return element; + } + + element.setAttribute(key, new _tokenlist.TokenList(element.getAttribute(key)).add(value).toString()); + return element; +} +/** + * @since 1.9.0 + * @param {HTMLElement} element + * @param {string} key + * @param {string} value + * @return {HTMLElement} + */ + + +function removeAttributeValue(element, key, value) { + (0, _validate.validateInstance)(element, HTMLElement); + (0, _validate.validateString)(value); + (0, _validate.validateString)(key); + + if (!element.hasAttribute(key)) { + return element; + } + + element.setAttribute(key, new _tokenlist.TokenList(element.getAttribute(key)).remove(value).toString()); + return element; +} +/** + * @since 1.9.0 + * @param {HTMLElement} element + * @param {string} key + * @param {string} value + * @return {boolean} + */ + + +function containsAttributeValue(element, key, value) { + (0, _validate.validateInstance)(element, HTMLElement); + (0, _validate.validateString)(value); + (0, _validate.validateString)(key); + + if (!element.hasAttribute(key)) { + return false; + } + + return new _tokenlist.TokenList(element.getAttribute(key)).contains(value); +} +/** + * @since 1.9.0 + * @param {HTMLElement} element + * @param {string} key + * @param {string} from + * @param {string} to + * @return {HTMLElement} + */ + + +function replaceAttributeValue(element, key, from, to) { + (0, _validate.validateInstance)(element, HTMLElement); + (0, _validate.validateString)(from); + (0, _validate.validateString)(to); + (0, _validate.validateString)(key); + + if (!element.hasAttribute(key)) { + return element; + } + + element.setAttribute(key, new _tokenlist.TokenList(element.getAttribute(key)).replace(from, to).toString()); + return element; +} +/** + * @since 1.9.0 + * @param {HTMLElement} element + * @param {string} key + * @return {HTMLElement} + */ + + +function clearAttributeValue(element, key) { + (0, _validate.validateInstance)(element, HTMLElement); + (0, _validate.validateString)(key); + + if (!element.hasAttribute(key)) { + return element; + } + + element.setAttribute(key, ""); + return element; +} + +_namespace.Monster.assignToNamespace('Monster.Data', clearAttributeValue, replaceAttributeValue, containsAttributeValue, removeAttributeValue, addAttributeValue, toggleAttributeValue); + +},{"../namespace.js":27,"../types/tokenlist.js":38,"../types/validate.js":40}],15:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "Monster", { + enumerable: true, + get: function get() { + return _namespace.Monster; + } +}); +exports.ATTRIBUTE_UPDATER_HASSYMBOL = exports.ATTRIBUTE_UPDATER_BIND = exports.ATTRIBUTE_UPDATER_REMOVE = exports.ATTRIBUTE_UPDATER_INSERT_REFERENCE = exports.ATTRIBUTE_UPDATER_INSERT = exports.ATTRIBUTE_UPDATER_REPLACE = exports.ATTRIBUTE_UPDATER_ATTRIBUTES = exports.ATTRIBUTE_THEME_NAME = exports.ATTRIBUTE_THEME_PREFIX = exports.DEFAULT_THEME = exports.ATTRIBUTE_OPTIONS = exports.ATTRIBUTE_PREFIX = void 0; var _namespace = require("../namespace.js"); @@ -2577,9 +2733,25 @@ var ATTRIBUTE_UPDATER_INSERT_REFERENCE = ATTRIBUTE_PREFIX + 'insert-reference'; exports.ATTRIBUTE_UPDATER_INSERT_REFERENCE = ATTRIBUTE_UPDATER_INSERT_REFERENCE; var ATTRIBUTE_UPDATER_REMOVE = ATTRIBUTE_PREFIX + 'remove'; +/** + * @memberOf Monster/DOM + * @type {string} + * @since 1.9.0 + */ + exports.ATTRIBUTE_UPDATER_REMOVE = ATTRIBUTE_UPDATER_REMOVE; +var ATTRIBUTE_UPDATER_BIND = ATTRIBUTE_PREFIX + 'bind'; +/** + * @memberOf Monster/DOM + * @type {string} + * @since 1.9.0 + */ -},{"../namespace.js":26}],15:[function(require,module,exports){ +exports.ATTRIBUTE_UPDATER_BIND = ATTRIBUTE_UPDATER_BIND; +var ATTRIBUTE_UPDATER_HASSYMBOL = ATTRIBUTE_PREFIX + 'hassymbol'; +exports.ATTRIBUTE_UPDATER_HASSYMBOL = ATTRIBUTE_UPDATER_HASSYMBOL; + +},{"../namespace.js":27}],16:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -2977,7 +3149,7 @@ function registerCustomElement(element) { _validate.Monster.assignToNamespace('Monster.DOM', CustomElement, registerCustomElement); -},{"../types/global.js":28,"../types/validate.js":39,"./constants.js":14,"./template.js":17}],16:[function(require,module,exports){ +},{"../types/global.js":29,"../types/validate.js":40,"./constants.js":15,"./template.js":18}],17:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -3271,7 +3443,7 @@ function getHandleFromNode(node) { _base.Monster.assignToNamespace('Monster.DOM', getHandleFromNode, Handle); -},{"../types/base.js":27,"../types/global.js":28,"../types/id.js":29,"../types/is.js":30,"../types/observer.js":31,"../types/proxyobserver.js":33,"../types/stack.js":36,"../types/validate.js":39,"./assembler.js":13}],17:[function(require,module,exports){ +},{"../types/base.js":28,"../types/global.js":29,"../types/id.js":30,"../types/is.js":31,"../types/observer.js":32,"../types/proxyobserver.js":34,"../types/stack.js":37,"../types/validate.js":40,"./assembler.js":13}],18:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -3447,7 +3619,7 @@ function findDocumentTemplate(id) { _base.Monster.assignToNamespace('Monster.DOM', Template, findDocumentTemplate); -},{"../types/base.js":27,"../types/global.js":28,"../types/validate.js":39,"./theme.js":18}],18:[function(require,module,exports){ +},{"../types/base.js":28,"../types/global.js":29,"../types/validate.js":40,"./theme.js":19}],19:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -3598,7 +3770,7 @@ function getDocumentTheme() { _base.Monster.assignToNamespace('Monster.DOM', Theme, getDocumentTheme); -},{"../types/base.js":27,"../types/global.js":28,"../types/validate.js":39,"./constants.js":14}],19:[function(require,module,exports){ +},{"../types/base.js":28,"../types/global.js":29,"../types/validate.js":40,"./constants.js":15}],20:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -3820,7 +3992,7 @@ function getDocumentFragmentFromString(html) { _global.Monster.assignToNamespace('Monster.DOM', getWindow, getDocument, getDocumentFragmentFromString); -},{"../types/global.js":28,"../types/validate.js":39}],20:[function(require,module,exports){ +},{"../types/global.js":29,"../types/validate.js":40}],21:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -4074,7 +4246,7 @@ exports.Handler = Handler; _namespace.Monster.assignToNamespace('Monster.Logging', Handler); -},{"../namespace.js":26,"../types/base.js":27,"../types/validate.js":39,"./logentry.js":22,"./logger.js":23}],21:[function(require,module,exports){ +},{"../namespace.js":27,"../types/base.js":28,"../types/validate.js":40,"./logentry.js":23,"./logger.js":24}],22:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -4159,7 +4331,7 @@ var ConsoleHandler = /*#__PURE__*/function (_Base) { _namespace.Monster.assignToNamespace('Monster.Logging', ConsoleHandler); -},{"../../logging/handler.js":20,"../../namespace.js":26,"../../types/base.js":27}],22:[function(require,module,exports){ +},{"../../logging/handler.js":21,"../../namespace.js":27,"../../types/base.js":28}],23:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -4283,7 +4455,7 @@ exports.LogEntry = LogEntry; _namespace.Monster.assignToNamespace('Monster.Logging', LogEntry); -},{"../namespace.js":26,"../types/base.js":27,"../types/validate.js":39}],23:[function(require,module,exports){ +},{"../namespace.js":27,"../types/base.js":28,"../types/validate.js":40}],24:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -4662,7 +4834,7 @@ function triggerLog(loglevel) { return logger; } -},{"../logging/handler.js":20,"../logging/logentry.js":22,"../namespace.js":26,"../types/base.js":27,"../types/validate.js":39}],24:[function(require,module,exports){ +},{"../logging/handler.js":21,"../logging/logentry.js":23,"../namespace.js":27,"../types/base.js":28,"../types/validate.js":40}],25:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -4789,7 +4961,7 @@ function create(min, max) { _global.Monster.assignToNamespace('Monster.Math', random); -},{"../types/global.js":28}],25:[function(require,module,exports){ +},{"../types/global.js":29}],26:[function(require,module,exports){ /** * @license * Copyright 2021 schukai GmbH @@ -4888,6 +5060,8 @@ require("./dom/assembler.js"); require("./dom/customelement.js"); +require("./dom/attributes.js"); + _namespace.Monster.Util.deepFreeze(_namespace.Monster); var rootName; @@ -4899,7 +5073,7 @@ try { if (!rootName) rootName = "Monster"; _namespace.Monster.Types.getGlobal()[rootName] = _namespace.Monster; -},{"./constraints/abstract.js":1,"./constraints/abstractoperator.js":2,"./constraints/andoperator.js":3,"./constraints/invalid.js":4,"./constraints/isarray.js":5,"./constraints/isobject.js":6,"./constraints/oroperator.js":7,"./constraints/valid.js":8,"./data/diff.js":9,"./data/pathfinder.js":10,"./data/pipe.js":11,"./data/transformer.js":12,"./dom/assembler.js":13,"./dom/customelement.js":15,"./dom/handle.js":16,"./dom/template.js":17,"./dom/util.js":19,"./logging/handler.js":20,"./logging/handler/console.js":21,"./logging/logentry.js":22,"./logging/logger.js":23,"./math/random.js":24,"./namespace.js":26,"./types/base.js":27,"./types/global.js":28,"./types/id.js":29,"./types/is.js":30,"./types/observer.js":31,"./types/observerlist.js":32,"./types/proxyobserver.js":33,"./types/queue.js":34,"./types/randomid.js":35,"./types/stack.js":36,"./types/tokenlist.js":37,"./types/uniquequeue.js":38,"./types/validate.js":39,"./types/version.js":40,"./util/clone.js":41,"./util/comparator.js":42,"./util/freeze.js":43}],26:[function(require,module,exports){ +},{"./constraints/abstract.js":1,"./constraints/abstractoperator.js":2,"./constraints/andoperator.js":3,"./constraints/invalid.js":4,"./constraints/isarray.js":5,"./constraints/isobject.js":6,"./constraints/oroperator.js":7,"./constraints/valid.js":8,"./data/diff.js":9,"./data/pathfinder.js":10,"./data/pipe.js":11,"./data/transformer.js":12,"./dom/assembler.js":13,"./dom/attributes.js":14,"./dom/customelement.js":16,"./dom/handle.js":17,"./dom/template.js":18,"./dom/util.js":20,"./logging/handler.js":21,"./logging/handler/console.js":22,"./logging/logentry.js":23,"./logging/logger.js":24,"./math/random.js":25,"./namespace.js":27,"./types/base.js":28,"./types/global.js":29,"./types/id.js":30,"./types/is.js":31,"./types/observer.js":32,"./types/observerlist.js":33,"./types/proxyobserver.js":34,"./types/queue.js":35,"./types/randomid.js":36,"./types/stack.js":37,"./types/tokenlist.js":38,"./types/uniquequeue.js":39,"./types/validate.js":40,"./types/version.js":41,"./util/clone.js":42,"./util/comparator.js":43,"./util/freeze.js":44}],27:[function(require,module,exports){ 'use strict'; /** * @namespace Monster @@ -5082,7 +5256,7 @@ function namespaceFor(parts) { return space; } -},{}],27:[function(require,module,exports){ +},{}],28:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -5188,7 +5362,7 @@ exports.Base = Base; _namespace.Monster.assignToNamespace('Monster.Types', Base); -},{"../namespace.js":26}],28:[function(require,module,exports){ +},{"../namespace.js":27}],29:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -5335,7 +5509,7 @@ function getGlobalFunction(name) { _namespace.Monster.assignToNamespace('Monster.Types', getGlobal, getGlobalObject, getGlobalFunction); -},{"../namespace.js":26,"./validate.js":39}],29:[function(require,module,exports){ +},{"../namespace.js":27,"./validate.js":40}],30:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -5464,7 +5638,7 @@ exports.ID = ID; _base.Monster.assignToNamespace('Monster.Types', ID); -},{"./base.js":27,"./validate.js":39}],30:[function(require,module,exports){ +},{"./base.js":28,"./validate.js":40}],31:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -5854,7 +6028,7 @@ function isInteger(value) { _namespace.Monster.assignToNamespace('Monster.Types', isPrimitive, isBoolean, isString, isObject, isArray, isFunction, isIterable, isInteger); -},{"../namespace.js":26}],31:[function(require,module,exports){ +},{"../namespace.js":27}],32:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -6094,7 +6268,7 @@ exports.Observer = Observer; _namespace.Monster.assignToNamespace('Monster.Types', Observer); -},{"../namespace.js":26,"./base.js":27,"./is.js":30,"./tokenlist.js":37,"./uniquequeue.js":38}],32:[function(require,module,exports){ +},{"../namespace.js":27,"./base.js":28,"./is.js":31,"./tokenlist.js":38,"./uniquequeue.js":39}],33:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -6272,7 +6446,7 @@ exports.ObserverList = ObserverList; _namespace.Monster.assignToNamespace('Monster.Types', ObserverList); -},{"../namespace.js":26,"./base.js":27,"./observer.js":31,"./validate.js":39}],33:[function(require,module,exports){ +},{"../namespace.js":27,"./base.js":28,"./observer.js":32,"./validate.js":40}],34:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -6570,7 +6744,7 @@ function getHandler() { return handler; } -},{"../namespace.js":26,"./base.js":27,"./is.js":30,"./observer.js":31,"./observerlist.js":32,"./validate.js":39}],34:[function(require,module,exports){ +},{"../namespace.js":27,"./base.js":28,"./is.js":31,"./observer.js":32,"./observerlist.js":33,"./validate.js":40}],35:[function(require,module,exports){ "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -6746,7 +6920,7 @@ exports.Queue = Queue; _base.Monster.assignToNamespace('Monster.Types', Queue); -},{"./base.js":27}],35:[function(require,module,exports){ +},{"./base.js":28}],36:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -6844,7 +7018,7 @@ exports.RandomID = RandomID; _id.Monster.assignToNamespace('Monster.Types', RandomID); -},{"../math/random.js":24,"./global.js":28,"./id.js":29}],36:[function(require,module,exports){ +},{"../math/random.js":25,"./global.js":29,"./id.js":30}],37:[function(require,module,exports){ "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -7000,7 +7174,7 @@ exports.Stack = Stack; _base.Monster.assignToNamespace('Monster.Types', Stack); -},{"./base.js":27}],37:[function(require,module,exports){ +},{"./base.js":28}],38:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -7444,7 +7618,7 @@ function toggleValue(token) { _namespace.Monster.assignToNamespace('Monster.Types', TokenList); -},{"../namespace.js":26,"../types/is.js":30,"../types/validate.js":39,"./base.js":27}],38:[function(require,module,exports){ +},{"../namespace.js":27,"../types/is.js":31,"../types/validate.js":40,"./base.js":28}],39:[function(require,module,exports){ "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -7591,7 +7765,7 @@ exports.UniqueQueue = UniqueQueue; _queue.Monster.assignToNamespace('Monster.Types', UniqueQueue); -},{"./queue.js":34,"./validate.js":39}],39:[function(require,module,exports){ +},{"./queue.js":35,"./validate.js":40}],40:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -7999,7 +8173,7 @@ function validateInteger(value) { _namespace.Monster.assignToNamespace('Monster.Types', validatePrimitive, validateBoolean, validateString, validateObject, validateArray, validateFunction, validateIterable, validateInteger); -},{"../namespace.js":26,"./is.js":30}],40:[function(require,module,exports){ +},{"../namespace.js":27,"./is.js":31}],41:[function(require,module,exports){ 'use strict'; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -8238,7 +8412,7 @@ function getVersion() { _namespace.Monster.assignToNamespace('Monster', getVersion); -},{"../namespace.js":26,"./base.js":27}],41:[function(require,module,exports){ +},{"../namespace.js":27,"./base.js":28}],42:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -8401,7 +8575,7 @@ function cloneObject(obj) { _namespace.Monster.assignToNamespace('Monster.Util', clone); -},{"../namespace.js":26,"../types/global.js":28,"../types/is.js":30}],42:[function(require,module,exports){ +},{"../namespace.js":27,"../types/global.js":29,"../types/is.js":31}],43:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -8634,7 +8808,7 @@ exports.Comparator = Comparator; _base.Monster.assignToNamespace('Monster.Util', Comparator); -},{"../types/base.js":27,"../types/is.js":30}],43:[function(require,module,exports){ +},{"../types/base.js":28,"../types/is.js":31}],44:[function(require,module,exports){ 'use strict'; /** * @author schukai GmbH @@ -8716,5 +8890,5 @@ function deepFreeze(object) { _namespace.Monster.assignToNamespace('Monster.Util', deepFreeze); -},{"../namespace.js":26,"../types/validate.js":39}]},{},[25]) +},{"../namespace.js":27,"../types/validate.js":40}]},{},[26]) //# sourceMappingURL=monster.dev.js.map diff --git a/packages/monster/dist/monster.dev.js.map b/packages/monster/dist/monster.dev.js.map index 116f05e17dfe80b0a60da7f710c33c661ac9e688..a3ebaf7be271abb18cf22ca8aee1a4020d616735 100644 --- a/packages/monster/dist/monster.dev.js.map +++ b/packages/monster/dist/monster.dev.js.map @@ -15,6 +15,7 @@ "packages/monster/source/data/pipe.js", "packages/monster/source/data/transformer.js", "packages/monster/source/dom/assembler.js", + "packages/monster/source/dom/attributes.js", "packages/monster/source/dom/constants.js", "packages/monster/source/dom/customelement.js", "packages/monster/source/dom/handle.js", @@ -47,7 +48,7 @@ "packages/monster/source/util/freeze.js" ], "names": [], - "mappings": "AAAA;ACAA;AAEA;AACA;AACA;;;;;;;;;;;;;;;AAEA;;AACA;;;;;;;;;;;;;;;;;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACM,kB;;;;;AAEF;AACJ;AACA;AACI,gCAAc;AAAA;;AAAA;AAEb;AAED;AAC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R,CAA0B,qBAA1B,EAAiD,WAAjD;;;AChEA;AAEA;AACA;AACA;;;;;;;;;;;;;;;AAEA;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACM,O;;;;;;;;;;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACI,qBAAQ,KAAR,EAAe;AACX,aAAO,OAAO,CAAC,MAAR,CAAe,KAAf,CAAP;AACH;;;;EAViB,4B;;;;AActB,kBAAQ,iBAAR,CAA0B,qBAA1B,EAAiD,OAAjD;;;ACxDA;AAEA;AACA;AACA;;;;;;;;;;;;;;;AAEA;;AACA;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACM,O;;;;;;;;;;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACI,qBAAQ,KAAR,EAAe;AACX,UAAI,iBAAQ,KAAR,CAAJ,EAAoB;AAChB,eAAO,OAAO,CAAC,OAAR,CAAgB,KAAhB,CAAP;AACH;;AAED,aAAO,OAAO,CAAC,MAAR,CAAe,KAAf,CAAP;AACH;;;;EAdiB,4B;;;;AAkBtB,kBAAQ,iBAAR,CAA0B,qBAA1B,EAAiD,OAAjD;;;AChEA;AAEA;AACA;AACA;;;;;;;;;;;;;;;AAEA;;AACA;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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,KAAV,EAAiB;AACb,YAAA,MAAM;AACT;AACJ,SATD;AAUH,OAxBM,CAAP;AAyBH;;;;EApCoB,kC;;;;AAyCzB,0BAAQ,iBAAR,CAA0B,qBAA1B,EAAiD,UAAjD;;;AC1FA;AAEA;AACA;AACA;;;;;;;;;;;;;;;AAEA;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACM,K;;;;;;;;;;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACI,qBAAQ,KAAR,EAAe;AACX,aAAO,OAAO,CAAC,OAAR,CAAgB,KAAhB,CAAP;AACH;;;;EAVe,4B;;;;AAcpB,kBAAQ,iBAAR,CAA0B,qBAA1B,EAAiD,KAAjD;;;ACxDA;AAEA;AACA;AACA;;;;;;;;;;;;;AAGA;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,IAAT,CAAc,KAAd,EAAqB,MAArB,EAA6B;AACzB,SAAO,MAAM,CAAC,KAAD,EAAQ,MAAR,CAAb;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,OAAT,CAAiB,CAAjB,EAAoB,CAApB,EAAuB,IAAvB,EAA6B;AACzB,MAAI,iBAAQ,IAAR,CAAJ,EAAmB;A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;AACH,GAFD,MAEO,IAAI,KAAK,KAAK,WAAV,IAAyB,KAAK,KAAK,WAAvC,EAAoD;AACvD,IAAA,QAAQ,GAAG,QAAX;AACH,GAFM,MAEA,IAAI,UAAU,CAAC,CAAD,EAAI,CAAJ,CAAd,EAAsB;AACzB,IAAA,QAAQ,GAAG,QAAX;AACH;;AAED,SAAO,QAAP;AAEH;;AAED,YAAQ,iBAAR,CAA0B,cAA1B,EAA0C,IAA1C;;;ACtPA;AAEA;AACA;AACA;;;;;;;;;;;;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAM,SAAS,GAAG,GAAlB;AACA;AACA;AACA;AACA;;AACA,IAAM,QAAQ,GAAG,GAAjB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACM,U;;;;;AAEF;AACJ;AACA;AACA;AACI,sBAAY,MAAZ,EAAoB;AAAA;;AAAA;;AAChB;AACA,UAAK,MAAL,GAAc,MAAd;AACA,UAAK,QAAL,GAAgB,QAAhB;AAHgB;AAInB;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;;;;;WACI,qBA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AI,KAAJ,EAAW;AACP,aAAO,KAAK,IAAL,CAAU,MAAV,CAAiB,UAAC,WAAD,EAAc,WAAd,EAA2B,YAA3B,EAAyC,KAAzC,EAAmD;AACvE,eAAO,WAAW,CAAC,GAAZ,CAAgB,WAAhB,CAAP;AACH,OAFM,EAEJ,KAFI,CAAP;AAGH;;;;EAlDc,U;;;;AAqDnB,mBAAQ,iBAAR,CAA0B,cAA1B,EAA0C,IAA1C;;;ACjHA;AAEA;AACA;AACA;;;;;;;;;;;;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACM,W;;;;;AACF;AACJ;AACA;AACA;AACI,uBAAY,UAAZ,EAAwB;AAAA;;AAAA;;AACpB;AACA,kCAAe,UAAf;AAEA,UAAK,IAAL,GAAY,WAAW,CAAC,UAAD,CAAvB;AACA,UAAK,OAAL,GAAe,MAAK,IAAL,CAAU,KAAV,EAAf;AACA,UAAK,SAAL,GAAiB,IAAI,GAAJ,EAAjB;AANoB;AAQvB;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;;;;WACI,qBA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G,kBAA9D;AAEA;AACA;AACA;AACA;AACA;;;AACA,IAAM,wBAAwB,GAAG,gBAAgB,GAAG,QAApD;;;;AC5EA;AAEA;AACA;AACA;;;;;;;;;;;;;;;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACM,a;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACI,2BAAc;AAAA;;AAAA;;AACV;AACA,UAAK,QAAL,GAAgB,MAAM,CAAC,MAAP,CAAc,EAAd,EAAkB,MAAK,QAAvB,EAAiC,wBAAwB,CAAC,IAAzB,+BAAjC,CAAhB;;AACA,UAAK,IAAL;;AAHU;AAIb;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;SACI,eAAe;AACX,aAAO;AACH,QAAA,UAAU,EAAE,MADT;AAEH,QAAA,cAAc,EAAE;AAFb,OAAP;AAIH;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;;;;WACI,mBAAU,GAAV,EAAe,YAAf,EAA6B;AAAA;;AACzB,oCAAe,GAAf;AACA,UAAI,CAAC,qBAAG,KAAK,QAAR,mDAAG,eAAgB,GAAhB,CAAR;AACA,UAAI,CAAC,KAAK,SAAV,EAAqB,OAAO,YAAP;AACrB,aAAO,CAAP;AACH;AAED;AACJ;AACA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ED,SAAO,QAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,SAAT,GAAqB;AAAA;;AACjB,MAAI,MAAM,kBAAG,wBAAH,gDAAG,YAAc,QAAd,CAAb;;AACA,MAAI,QAAO,MAAP,MAAkB,QAAtB,EAAgC;AAC5B,UAAM,IAAI,KAAJ,CAAU,2BAAV,CAAN;AACH;;AAED,SAAO,MAAP;AACH;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,6BAAT,CAAuC,IAAvC,EAA6C;AACzC,gCAAe,IAAf;AAEA,MAAM,QAAQ,GAAG,WAAW,EAA5B;AACA,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAT,CAAuB,UAAvB,CAAjB;AACA,EAAA,QAAQ,CAAC,SAAT,GAAqB,IAArB;AAEA,SAAO,QAAQ,CAAC,OAAhB;AACH;;AAGD,gBAAQ,iBAAR,CAA0B,aAA1B,EAAyC,SAAzC,EAAoD,WAApD,EAAiE,6BAAjE;;;ACzMA;AAEA;AACA;AACA;;;;;;;;;;;;;;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACM,O;;;;;AACF,qBAAc;AAAA;;AAAA;;AACV;AAEA;AACR;AACA;AACA;AACA;;AACQ,UAAK,QAAL,GAAgB,WAAhB;AARU;AASb;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;WACI,aAAI,KAAJ,EAAW;AACP,sCAAiB,KAAjB,EAAwB,kBAAxB;;AAEA,UAAI,KAAK,QAAL,GAAgB,KAAK,CAAC,WAAN,EAApB,EAAyC;AACrC,eAAO,KAAP;AACH;;AAED,aAAO,IAAP;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;;;;WACI,qBAAY,QAAZ,EAAsB;AAClB,qCAAgB,QAAhB;AACA,WAAK,QAAL,GAAgB,QAAhB;AACA,aAAO,IAAP;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,uBAAc;AACV,aAAO,KAAK,QAAZ;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,kBAAS;AACL,WAAK,WAAL,CAAiB,WAAjB;AACA,aAAO,IAAP;AACH;;;;AAED;AACJ;AACA;AACA;AACA;AACA;AACI,wBAAW;AACP,WAAK,WAAL,CAAiB,aAAjB;AACA,aAAO,IAAP;AACH;;;;AAED;AACJ;AACA;AACA;AACA;AACA;AACI,wBAAW;AACP,WAAK,WAAL,CAAiB,aAAjB;AACA,aAAO,IAAP;AACH;;;;AAED;AACJ;AACA;AACA;AACA;AACA;AACI,uBAAU;AACN,WAAK,WAAL,CAAiB,YAAjB;AACA,aAAO,IAAP;AACH;;;;AAED;AACJ;AACA;AACA;AACA;AACA;AACI,uBAAU;AACN,WAAK,WAAL,CAAiB,YAAjB;AACA,aAAO,IAAP;AACH;;;;AAED;AACJ;AACA;AACA;AACA;AACA;AACI,wBAAW;AACP,WAAK,WAAL,CAAiB,aAAjB;AACA,aAAO,IAAP;AACH;;;;AAED;AACJ;AACA;AACA;AACA;AACA;AAC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,KAAK,KAAK,IAAd,EAAoB,OAAO,KAAP;AACpB,SAAO,QAAO,KAAP,aAAO,KAAP,uBAAO,KAAK,CAAG,MAAM,CAAC,QAAV,CAAZ,MAAoC,UAA3C;AACH;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,WAAT,CAAqB,KAArB,EAA4B;AACxB,MAAI,IAAJ;;AAEA,MAAI,KAAK,KAAK,SAAV,IAAuB,KAAK,KAAK,IAAjC,IAAyC,KAAK,KAAK,GAAvD,EAA4D;AACxD,WAAO,IAAP;AACH;;AAED,EAAA,IAAI,WAAU,KAAV,CAAJ;;AAEA,MAAI,IAAI,KAAK,QAAT,IAAqB,IAAI,KAAK,QAA9B,IAA0C,IAAI,KAAK,SAAnD,IAAgE,IAAI,KAAK,QAA7E,EAAuF;AACnF,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,SAAT,CAAmB,KAAnB,EAA0B;AAEtB,MAAI,KAAK,KAAK,IAAV,IAAkB,KAAK,KAAK,KAAhC,EAAuC;AACnC,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,QAAT,CAAkB,KAAlB,EAAyB;AACrB,MAAI,KAAK,KAAK,SAAV,IAAuB,OAAO,KAAP,KAAiB,QAA5C,EAAsD;AAClD,WAAO,KAAP;AACH;;AACD,SAAO,IAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,QAAT,CAAkB,KAAlB,EAAyB;AAErB,MAAI,OAAO,CAAC,KAAD,CAAX,EAAoB,OAAO,KAAP;AACpB,MAAI,WAAW,CAAC,KAAD,CAAf,EAAwB,OAAO,KAAP;;AAExB,MAAI,QAAO,KAAP,MAAiB,QAArB,EAA+B;AAC3B,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,UAAT,CAAoB,KAApB,EAA2B,QAA3B,EAAqC;AAEjC,MAAI,CAAC,QAAQ,CAAC,KAAD,CAAb,EAAsB,OAAO,KAAP;AACtB,MAAI,CAAC,UAAU,CAAC,QAAD,CAAf,EAA2B,OAAO,KAAP;AAC3B,MAAI,CAAC,QAAQ,CAAC,cAAT,CAAwB,WAAxB,CAAL,EAA2C,OAAO,KAAP;AAC3C,SAAQ,KAAK,YAAY,QAAlB,GAA8B,IAA9B,GAAqC,KAA5C;AAEH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,OAAT,CAAiB,KAAjB,EAAwB;AACpB,MAAI,KAAK,CAAC,OAAN,CAAc,KAAd,CAAJ,EAA0B;AACtB,WAAO,IAAP;AACH;;AACD,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,UAAT,CAAoB,KAApB,EAA2B;AACvB,MAAI,OAAO,CAAC,KAAD,CAAX,EAAoB,OAAO,KAAP;AACpB,MAAI,WAAW,CAAC,KAAD,CAAf,EAAwB,OAAO,KAAP;;AAExB,MAAI,OAAO,KAAP,KAAiB,UAArB,EAAiC;AAC7B,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AAEH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,SAAT,CAAmB,KAAnB,EAA0B;AACtB,SAAO,MAAM,CAAC,SAAP,CAAiB,KAAjB,CAAP;AACH;;AAGD,mBAAQ,iBAAR,CAA0B,eAA1B,EAA2C,WAA3C,EAAwD,SAAxD,EAAmE,QAAnE,EAA6E,QAA7E,EAAuF,OAAvF,EAAgG,UAAhG,EAA4G,UAA5G,EAAwH,SAAxH;;;AC5WA;AAEA;AACA;AACA;;;;;;;;;;;;;;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACM,Q;;;;;AAEF;AACJ;AACA;AACA;AACA;AACI,oBAAY,QAAZ,EAA+B;AAAA;;AAAA;;AAC3B;;AAEA,QAAI,OAA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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,gBAAT,CAA0B,KAA1B,EAAiC;AAC7B,MAAI,CAAC,oBAAW,KAAX,CAAL,EAAwB;AACpB,UAAM,IAAI,SAAJ,CAAc,uBAAd,CAAN;AACH;;AACD,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,iBAAT,CAA2B,KAA3B,EAAkC;AAC9B,MAAI,CAAC,qBAAY,KAAZ,CAAL,EAAyB;AACrB,UAAM,IAAI,SAAJ,CAAc,0BAAd,CAAN;AACH;;AACD,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,eAAT,CAAyB,KAAzB,EAAgC;AAC5B,MAAI,CAAC,mBAAU,KAAV,CAAL,EAAuB;AACnB,UAAM,IAAI,SAAJ,CAAc,wBAAd,CAAN;AACH;;AACD,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,cAAT,CAAwB,KAAxB,EAA+B;AAC3B,MAAI,CAAC,kBAAS,KAAT,CAAL,EAAsB;AAClB,UAAM,IAAI,SAAJ,CAAc,uBAAd,CAAN;AACH;;AACD,SAAO,KAAP;AACH;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,cAAT,CAAwB,KAAxB,EAA+B;AAC3B,MAAI,CAAC,kBAAS,KAAT,CAAL,EAAsB;AAClB,UAAM,IAAI,SAAJ,CAAc,uBAAd,CAAN;AACH;;AACD,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,gBAAT,CAA0B,KAA1B,EAAiC,QAAjC,EAA2C;AACvC,MAAI,CAAC,oBAAW,KAAX,EAAkB,QAAlB,CAAL,EAAkC;AAC9B,QAAI,CAAC,GAAG,EAAR;;AACA,QAAI,kBAAS,QAAT,KAAsB,oBAAW,QAAX,CAA1B,EAAgD;AAC5C,MAAA,CAAC,GAAG,QAAH,aAAG,QAAH,uBAAG,QAAQ,CAAG,MAAH,CAAZ;AACH;;AAED,QAAI,CAAJ,EAAO;AACH,MAAA,CAAC,GAAG,MAAM,CAAV;AACH;;AAED,UAAM,IAAI,SAAJ,CAAc,gCAAgC,CAA9C,CAAN;AACH;;AACD,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,aAAT,CAAuB,KAAvB,EAA8B;AAC1B,MAAI,CAAC,iBAAQ,KAAR,CAAL,EAAqB;AACjB,UAAM,IAAI,SAAJ,CAAc,uBAAd,CAAN;AACH;;AACD,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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;;AAc1B,kBAAQ,iBAAR,CAA0B,qBAA1B,EAAiD,WAAjD;;;AChEA;AAEA;AACA;AACA;;;;;;;;;;;;;;;AAEA;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACM,O;;;;;;;;;;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACI,qBAAQ,KAAR,EAAe;AACX,aAAO,OAAO,CAAC,MAAR,CAAe,KAAf,CAAP;AACH;;;;EAViB,4B;;;;AActB,kBAAQ,iBAAR,CAA0B,qBAA1B,EAAiD,OAAjD;;;ACxDA;AAEA;AACA;AACA;;;;;;;;;;;;;;;AAEA;;AACA;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACM,O;;;;;;;;;;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACI,qBAAQ,KAAR,EAAe;AACX,UAAI,iBAAQ,KAAR,CAAJ,EAAoB;AAChB,eAAO,OAAO,CAAC,OAAR,CAAgB,KAAhB,CAAP;AACH;;AAED,aAAO,OAAO,CAAC,MAAR,CAAe,KAAf,CAAP;AACH;;;;EAdiB,4B;;;;AAkBtB,kBAAQ,iBAAR,CAA0B,qBAA1B,EAAiD,OAAjD;;;AChEA;AAEA;AACA;AACA;;;;;;;;;;;;;;;AAEA;;AACA;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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;AACA,cAAI,CAAC,KAAK,KAAV,EAAiB;AACb,YAAA,MAAM;AACT;AACJ,SATD;AAUH,OAxBM,CAAP;AAyBH;;;;EApCoB,kC;;;;AAyCzB,0BAAQ,iBAAR,CAA0B,qBAA1B,EAAiD,UAAjD;;;AC1FA;AAEA;AACA;AACA;;;;;;;;;;;;;;;AAEA;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACM,K;;;;;;;;;;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACI,qBAAQ,KAAR,EAAe;AACX,aAAO,OAAO,CAAC,OAAR,CAAgB,KAAhB,CAAP;AACH;;;;EAVe,4B;;;;AAcpB,kBAAQ,iBAAR,CAA0B,qBAA1B,EAAiD,KAAjD;;;ACxDA;AAEA;AACA;AACA;;;;;;;;;;;;;AAGA;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,IAAT,CAAc,KAAd,EAAqB,MAArB,EAA6B;AACzB,SAAO,MAAM,CAAC,KAAD,EAAQ,MAAR,CAAb;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,OAAT,CAAiB,CAAjB,EAAoB,CAApB,EAAuB,IAAvB,EAA6B;AACzB,MAAI,iBAAQ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AAA,QAAQ,GAAG,KAAX;AACH,GAFD,MAEO,IAAI,KAAK,KAAK,WAAV,IAAyB,KAAK,KAAK,WAAvC,EAAoD;AACvD,IAAA,QAAQ,GAAG,QAAX;AACH,GAFM,MAEA,IAAI,UAAU,CAAC,CAAD,EAAI,CAAJ,CAAd,EAAsB;AACzB,IAAA,QAAQ,GAAG,QAAX;AACH;;AAED,SAAO,QAAP;AAEH;;AAED,YAAQ,iBAAR,CAA0B,cAA1B,EAA0C,IAA1C;;;ACtPA;AAEA;AACA;AACA;;;;;;;;;;;;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAM,SAAS,GAAG,GAAlB;AACA;AACA;AACA;AACA;;AACA,IAAM,QAAQ,GAAG,GAAjB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACM,U;;;;;AAEF;AACJ;AACA;AACA;AACI,sBAAY,MAAZ,EAAoB;AAAA;;AAAA;;AAChB;AACA,UAAK,MAAL,GAAc,MAAd;AACA,UAAK,QAAL,GAAgB,QAAhB;AAHgB;AAInB;AAED;AACJ;AACA;AACA;AACA;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A;AACA;AACA;;;;WACI,aAAI,KAAJ,EAAW;AACP,aAAO,KAAK,IAAL,CAAU,MAAV,CAAiB,UAAC,WAAD,EAAc,WAAd,EAA2B,YAA3B,EAAyC,KAAzC,EAAmD;AACvE,eAAO,WAAW,CAAC,GAAZ,CAAgB,WAAhB,CAAP;AACH,OAFM,EAEJ,KAFI,CAAP;AAGH;;;;EAlDc,U;;;;AAqDnB,mBAAQ,iBAAR,CAA0B,cAA1B,EAA0C,IAA1C;;;ACjHA;AAEA;AACA;AACA;;;;;;;;;;;;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACM,W;;;;;AACF;AACJ;AACA;AACA;AACI,uBAAY,UAAZ,EAAwB;AAAA;;AAAA;;AACpB;AACA,kCAAe,UAAf;AAEA,UAAK,IAAL,GAAY,WAAW,CAAC,UAAD,CAAvB;AACA,UAAK,OAAL,GAAe,MAAK,IAAL,CAAU,KAAV,EAAf;AACA,UAAK,SAAL,GAAiB,IAAI,GAAJ,EAAjB;AANoB;AAQvB;AAED;AACJ;AACA;AACA;AACA;AACA;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AAsB,GAAG,gBAAgB,GAAG,QAAlD;AAEA;AACA;AACA;AACA;;;AACA,IAAM,oBAAoB,GAAG,sBAAsB,GAAG,MAAtD;AAEA;AACA;AACA;AACA;AACA;;;AACA,IAAM,4BAA4B,GAAG,gBAAgB,GAAG,YAAxD;AAEA;AACA;AACA;AACA;AACA;;;AACA,IAAM,yBAAyB,GAAG,gBAAgB,GAAG,SAArD;AAEA;AACA;AACA;AACA;AACA;;;AACA,IAAM,wBAAwB,GAAG,gBAAgB,GAAG,QAApD;AAEA;AACA;AACA;AACA;AACA;;;AACA,IAAM,kCAAkC,GAAG,gBAAgB,GAAG,kBAA9D;AAEA;AACA;AACA;AACA;AACA;;;AACA,IAAM,wBAAwB,GAAG,gBAAgB,GAAG,QAApD;AAEA;AACA;AACA;AACA;AACA;;;AACA,IAAM,sBAAsB,GAAG,gBAAgB,GAAG,MAAlD;AAEA;AACA;AACA;AACA;AACA;;;AACA,IAAM,2BAA2B,GAAG,gBAAgB,GAAG,WAAvD;;;;AC1FA;AAEA;AACA;AACA;;;;;;;;;;;;;;;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACM,a;;;;;AAEF;AACJ;AACA;AACA;AACA;AACA;AACI,2BAAc;AAAA;;AAAA;;AACV;AACA,UAAK,QAAL,GAAgB,MAAM,CAAC,MAAP,CAAc,EAAd,EAAkB,MAAK,QAAvB,EAAiC,wBAAwB,CAAC,IAAzB,+BAAjC,CAAhB;;AACA,UAAK,IAAL;;AAHU;AAIb;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;SACI,eAAe;AACX,aAAO;AACH,QAAA,UAAU,EAAE,MADT;AAEH,QAAA,cAAc,EAAE;AAFb,OAAP;AAIH;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;;;;WACI,mBAAU,GAAV,EAAe,YAAf,EAA6B;AAAA;;AACzB,oCAAe,GAAf;AACA,UAAI,CAAC,qBAAG,KAAK,QAAR,mDAAG,eAAgB,GAAhB,CAAR;AACA,UAAI,CAAC,KAAK,SAAV,EAAqB,OAAO,YAAP;AACrB,aAAO,CAAP;AACH;AAED;AACJ;AACA;AACA;AACA;;;;WACI,gBAAO;AACH,MAAA,cAAc,CAAC,IAAf,CAAoB,IAApB;AACA,aAAO,IAAP;AACH;AAED;AACJ;AACA;AACA;AACA;;;;WACI,oBAAW;AACP,aAAO,IAAP;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,uBAAc;AACV,aAAO,IAAP;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,6BAAoB;AAChB,WAAK,QAAL;AACH;AAED;AACJ;AACA;AACA;AACA;;;;WACI,gCAAuB;AACnB,WAAK,WAAL;AACH;AAED;AACJ;AACA;AACA;AACA;;;;WACI,2BAAkB,CAEjB;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;WACI,kCAAyB,QAAzB,EAAmC,MAAnC,EAA2C,MAA3C,EAAmD;AAC/C,WAAK,QAAL;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;AACA;;;;WACI,uBAAqB;AACjB,YAAM,IAAI,KAAJ,CAAU,kEAAV,CAAN;AACH;AAGD;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;;;WACI,kBAAgB;A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0B,aAA1B,EAAyC,KAAzC,EAAgD,gBAAhD;;;AClGA;AAEA;AACA;AACA;;;;;;;;;;;;;;;AAEA;;AACA;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,WAAT,GAAuB;AAAA;;AACnB,MAAI,QAAQ,iBAAG,wBAAH,+CAAG,WAAc,UAAd,CAAf;;AACA,MAAI,QAAO,QAAP,MAAoB,QAAxB,EAAkC;AAC9B,UAAM,IAAI,KAAJ,CAAU,2BAAV,CAAN;AACH;;AAED,SAAO,QAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,SAAT,GAAqB;AAAA;;AACjB,MAAI,MAAM,kBAAG,wBAAH,gDAAG,YAAc,QAAd,CAAb;;AACA,MAAI,QAAO,MAAP,MAAkB,QAAtB,EAAgC;AAC5B,UAAM,IAAI,KAAJ,CAAU,2BAAV,CAAN;AACH;;AAED,SAAO,MAAP;AACH;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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AAP;AACH;;;;AAED;AACJ;AACA;AACA;AACA;AACA;AACI,wBAAW;AACP,WAAK,WAAL,CAAiB,aAAjB;AACA,aAAO,IAAP;AACH;;;;AAED;AACJ;AACA;AACA;AACA;AACA;AACI,wBAAW;AACP,WAAK,WAAL,CAAiB,aAAjB;AACA,aAAO,IAAP;AACH;;;;AAED;AACJ;AACA;AACA;AACA;AACA;AACI,uBAAU;AACN,WAAK,WAAL,CAAiB,YAAjB;AACA,aAAO,IAAP;AACH;;;;AAED;AACJ;AACA;AACA;AACA;AACA;AACI,uBAAU;AACN,WAAK,WAAL,CAAiB,YAAjB;AACA,aAAO,IAAP;AACH;;;;AAED;AACJ;AACA;AACA;AACA;AACA;AACI,wBAAW;AACP,WAAK,WAAL,CAAiB,aAAjB;AACA,aAAO,IAAP;AACH;;;;AAED;AACJ;AACA;AACA;AACA;AACA;AACI,wBAAW;AACP,WAAK,WAAL,CAAiB,aAAjB;AACA,aAAO,IAAP;AACH;;;;AAGD;AACJ;AACA;AACA;AACA;AACA;AACI,sBAAS;AACL,WAAK,WAAL,CAAiB,WAAjB;AACA,aAAO,IAAP;AACH;;;;EA7IiB,U;;;;AAmJtB,mBAAQ,iBAAR,CAA0B,iBAA1B,EAA6C,OAA7C;;;ACtLA;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AAEA;;AACA;;AACA;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACM,c;;;;;AACF,4BAAc;AAAA;;AAAA;AAEb;;;EAHwB,U;;AAO7B,mBAAQ,iBAAR,CAA0B,iBAA1B,EAA6C,cAA7C;;;ACxCA;AAEA;AACA;AACA;;;;;;;;;;;;;;;AAEA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,SAAT,CAAmB,KAAnB,EAA0B;AAEtB,MAAI,KAAK,KAAK,IAAV,IAAkB,KAAK,KAAK,KAAhC,EAAuC;AACnC,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,QAAT,CAAkB,KAAlB,EAAyB;AACrB,MAAI,KAAK,KAAK,SAAV,IAAuB,OAAO,KAAP,KAAiB,QAA5C,EAAsD;AAClD,WAAO,KAAP;AACH;;AACD,SAAO,IAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,QAAT,CAAkB,KAAlB,EAAyB;AAErB,MAAI,OAAO,CAAC,KAAD,CAAX,EAAoB,OAAO,KAAP;AACpB,MAAI,WAAW,CAAC,KAAD,CAAf,EAAwB,OAAO,KAAP;;AAExB,MAAI,QAAO,KAAP,MAAiB,QAArB,EAA+B;AAC3B,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,UAAT,CAAoB,KAApB,EAA2B,QAA3B,EAAqC;AAEjC,MAAI,CAAC,QAAQ,CAAC,KAAD,CAAb,EAAsB,OAAO,KAAP;AACtB,MAAI,CAAC,UAAU,CAAC,QAAD,CAAf,EAA2B,OAAO,KAAP;AAC3B,MAAI,CAAC,QAAQ,CAAC,cAAT,CAAwB,WAAxB,CAAL,EAA2C,OAAO,KAAP;AAC3C,SAAQ,KAAK,YAAY,QAAlB,GAA8B,IAA9B,GAAqC,KAA5C;AAEH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,OAAT,CAAiB,KAAjB,EAAwB;AACpB,MAAI,KAAK,CAAC,OAAN,CAAc,KAAd,CAAJ,EAA0B;AACtB,WAAO,IAAP;AACH;;AACD,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,UAAT,CAAoB,KAApB,EAA2B;AACvB,MAAI,OAAO,CAAC,KAAD,CAAX,EAAoB,OAAO,KAAP;AACpB,MAAI,WAAW,CAAC,KAAD,CAAf,EAAwB,OAAO,KAAP;;AAExB,MAAI,OAAO,KAAP,KAAiB,UAArB,EAAiC;AAC7B,WAAO,IAAP;AACH;;AAED,SAAO,KAAP;AAEH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,SAAT,CAAmB,KAAnB,EAA0B;AACtB,SAAO,MAAM,CAAC,SAAP,CAAiB,KAAjB,CAAP;AACH;;AAGD,mBAAQ,iBAAR,CAA0B,eAA1B,EAA2C,WAA3C,EAAwD,SAAxD,EAAmE,QAAnE,EAA6E,QAA7E,EAAuF,OAAvF,EAAgG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A;;;;WACI,iBAAQ;AACJ;;AACA,WAAK,MAAL,GAAc,IAAI,OAAJ,EAAd;AACA,aAAO,IAAP;AACH;AAED;AACJ;AACA;AACA;AACA;AACA;;;;WACI,gBAAO;AAEH,UAAI,KAAK,OAAL,EAAJ,EAAoB;AAChB,eAAO,SAAP;AACH;;AACD,UAAI,KAAK,GAAG,KAAK,IAAL,CAAU,KAAV,EAAZ;AACA,WAAK,MAAL,WAAmB,KAAnB;AACA,aAAO,KAAP;AACH;;;;EAtDqB,Y;;;;AA2D1B,eAAQ,iBAAR,CAA0B,eAA1B,EAA2C,WAA3C;;;ACrFA;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AAEA;;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,gBAAT,CAA0B,KAA1B,EAAiC;AAC7B,MAAI,CAAC,oBAAW,KAAX,CAAL,EAAwB;AACpB,UAAM,IAAI,SAAJ,CAAc,uBAAd,CAAN;AACH;;AACD,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,iBAAT,CAA2B,KAA3B,EAAkC;AAC9B,MAAI,CAAC,qBAAY,KAAZ,CAAL,EAAyB;AACrB,UAAM,IAAI,SAAJ,CAAc,0BAAd,CAAN;AACH;;AACD,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,eAAT,CAAyB,KAAzB,EAAgC;AAC5B,MAAI,CAAC,mBAAU,KAAV,CAAL,EAAuB;AACnB,UAAM,IAAI,SAAJ,CAAc,wBAAd,CAAN;AACH;;AACD,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,cAAT,CAAwB,KAAxB,EAA+B;AAC3B,MAAI,CAAC,kBAAS,KAAT,CAAL,EAAsB;AAClB,UAAM,IAAI,SAAJ,CAAc,uBAAd,CAAN;AACH;;AACD,SAAO,KAAP;AACH;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,cAAT,CAAwB,KAAxB,EAA+B;AAC3B,MAAI,CAAC,kBAAS,KAAT,CAAL,EAAsB;AAClB,UAAM,IAAI,SAAJ,CAAc,uBAAd,CAAN;AACH;;AACD,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,gBAAT,CAA0B,KAA1B,EAAiC,QAAjC,EAA2C;AACvC,MAAI,CAAC,oBAAW,KAAX,EAAkB,QAAlB,CAAL,EAAkC;AAC9B,QAAI,CAAC,GAAG,EAAR;;AACA,QAAI,kBAAS,QAAT,KAAsB,oBAAW,QAAX,CAA1B,EAAgD;AAC5C,MAAA,CAAC,GAAG,QAAH,aAAG,QAAH,uBAAG,QAAQ,CAAG,MAAH,CAAZ;AACH;;AAED,QAAI,CAAJ,EAAO;AACH,MAAA,CAAC,GAAG,MAAM,CAAV;AACH;;AAED,UAAM,IAAI,SAAJ,CAAc,gCAAgC,CAA9C,CAAN;AACH;;AACD,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,aAAT,CAAuB,KAAvB,EAA8B;AAC1B,MAAI,CAAC,iBAAQ,KAAR,CAAL,EAAqB;AACjB,UAAM,IAAI,SAAJ,CAAc,uBAAd,CAAN;AACH;;AACD,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,gBAAT,CAA0B,KAA1B,EAAiC;AAC7B,MAAI,CAAC,oBAAW,KAAX,CAAL,EAAwB;AACpB,UAAM,IAAI,SAAJ,CAAc,yBAAd,CAAN;AACH;;AACD,SAAO,KAAP;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAAS,eAAT,CAAyB,KAAzB,EAAgC;AAC5B,MAAI,CAAC,mBAAU,KAAV,CAAL,EAAuB;AACnB,UAAM,IAAI,SAAJ,CAAc,yBAAd,CAAN;AACH;;AACD,SAAO,KAAP;AACH;;AAED,mBAAQ,iBAAR,CAA0B,eAA1B,EAA2C,iBAA3C,EAA8D,eAA9D,EAA+E,cAA/E,EAA+F,cAA/F,EAA+G,aAA/G,EAA8H,gBAA9H,EAAgJ,gBAAhJ,EAAkK,eAAlK;;;AC3X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ARO;AAAA;;AAAA;AAQxB,wDAA4B;AAAA,UAAnB,IAAmB;AACxB,UAAI,KAAK,GAAG,MAAM,CAAC,IAAD,CAAlB;AAEA,MAAA,MAAM,CAAC,IAAD,CAAN,GAAe,KAAK,IAAI,QAAO,KAAP,MAAiB,QAA1B,GACX,UAAU,CAAC,KAAD,CADC,GACS,KADxB;AAEH;AAbuB;AAAA;AAAA;AAAA;AAAA;;AAexB,SAAO,MAAM,CAAC,MAAP,CAAc,MAAd,CAAP;AACH;;AAED,mBAAQ,iBAAR,CAA0B,cAA1B,EAA0C,UAA1C", "file": "generated.js", "sourceRoot": "", "sourcesContent": [ @@ -65,7 +66,8 @@ "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\nimport {Transformer} from './transformer.js';\nimport {Base} from '../types/base.js';\nimport {validateFunction, validateString} from '../types/validate.js';\n\n\nconst DELIMITER = '|';\n\n/**\n * The pipe class makes it possible to combine several processing steps.\n *\n * You can call the method via the monster namespace `new Monster.Data.Pipe()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/data/pipe.js';\n * console.log(new Monster.Data.Pipe())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/data/pipe.js';\n * console.log(new Pipe())\n * </script>\n * ```\n *\n * A pipe consists of commands whose input and output are connected with the pipe symbol `|`.\n *\n * With the Pipe, processing steps can be combined. Here, the value of an object is accessed via the pathfinder (path command).\n * the word is then converted to uppercase letters and a prefix Hello is added. the two backslash safe the space char.\n *\n * @example\n * import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/data/pipe.js';\n * \n * let obj = {\n * a: {\n * b: {\n * c: {\n * d: \"world\"\n * }\n * }\n * }\n * }\n * \n * console.log(new Pipe('path:a.b.c.d | toupper | prefix:Hello\\\\ ').run(obj));\n * // ↦ Hello WORLD\n *\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Data\n */\nclass Pipe extends Base {\n\n /**\n *\n * @param {string} pipe a pipe consists of commands whose input and output are connected with the pipe symbol `|`.\n * @throws {TypeError} \n */\n constructor(pipe) {\n super();\n validateString(pipe);\n this.pipe = pipe.split(DELIMITER).map((v) => {\n return new Transformer(v);\n });\n \n\n }\n\n /**\n *\n * @param {string} name\n * @param {function} callback\n * @returns {Transformer}\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not a function\n */\n setCallback(name, callback) {\n\n for(const [,t] of Object.entries(this.pipe)) {\n t.setCallback(name, callback);\n }\n \n return this;\n \n // return this.pipe.reduce((accumulator, transformer, currentIndex, array) => {\n // return transformer.setCallback(name,callback);\n // }, value);\n \n \n }\n\n /**\n * run a pipe\n *\n * @param {*} value\n * @returns {*}\n */\n run(value) {\n return this.pipe.reduce((accumulator, transformer, currentIndex, array) => {\n return transformer.run(accumulator);\n }, value);\n }\n}\n\nMonster.assignToNamespace('Monster.Data', Pipe);\nexport {Monster, Pipe}\n", "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\nimport {Base} from '../types/base.js';\nimport {validateString, validatePrimitive, validateFunction, validateInteger} from '../types/validate.js';\nimport {isObject, isString, isArray} from '../types/is.js';\nimport {ID} from '../types/id.js';\nimport {clone} from \"../util/clone.js\";\nimport {Pathfinder} from \"./pathfinder.js\";\n\n/**\n * The transformer class is a swiss army knife for manipulating values. especially in combination with the pipe, processing chains can be built up.\n *\n * You can call the method via the monster namespace `new Monster.Data.Transformer()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/data/transformer.js';\n * console.log(new Monster.Data.Transformer())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/data/transformer.js';\n * console.log(new Transformer())\n * </script>\n * ```\n *\n * A simple example is the conversion of all characters to lowercase. for this purpose the command tolower must be used.\n * \n * ```\n * let t = new Transformer('tolower').run('ABC'); // ↦ abc\n * ```\n * \n * **all commands**\n * \n * in the following table all commands, parameters and existing aliases are described.\n * \n * | command | parameter | alias | description |\n * |:-------------|:---------------------------|:------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n * | base64 | | | Converts the value to base64 |\n * | call | function,param1:param2:... | | Calling a callback function. The function can be defined in three places: either globally, in the context `addCallback` or in the passed object |\n * | empty | | | Return empty String \"\" |\n * | if | statement1:statement2 | ? | Is the ternary operator, the first parameter is the valid statement, the second is the false part. To use the current value in the queue, you can set the value keyword. On the other hand, if you want to have the static string \"value\", you have to put one backslash \\\\ in front of it and write value. the follow values are true: 'on', true, 'true' |\n * | index | key:default | property, key | Fetches a value from an object, an array, a map or a set |\n * | length | | count | Length of the string or entries of an array or object |\n * | nop | | | Do nothing |\n * | path | path | | The access to an object is done via a Pathfinder object |\n * | plaintext | | plain | All HTML tags are removed (*) |\n * | prefix | text | | Adds a prefix |\n * | rawurlencode | | | URL coding |\n * | static | | none | The Arguments value is used and passed to the value. Special characters \\ <space> and : can be quotet by a preceding \\. |\n * | substring | start:length | | Returns a substring |\n * | suffix | text | | Adds a suffix |\n * | tointeger | | | Type conversion to an integer value |\n * | tojson | | | Type conversion to an JSON string (since 1.8.0) |\n * | tolower | | strtolower, tolowercase | The input value is converted to lowercase letters |\n * | tostring | | | Type conversion to a string |\n * | toupper | | strtoupper, touppercase | The input value is converted to uppercase letters |\n * | trim | | | Remove spaces at the beginning and end |\n * | ucfirst | | | First character large |\n * | ucwords | | | Any word beginning large |\n * | undefined | | | Return undefined |\n * | uniqid | | | Creates a string with a unique value (**) |\n * \n * (*) for this functionality the extension [jsdom](https://www.npmjs.com/package/jsdom) must be loaded in the nodejs context.\n * \n * ```\n * // polyfill\n * if (typeof window !== \"object\") {\n * const {window} = new JSDOM('', {\n * url: 'http://example.com/',\n * pretendToBeVisual: true\n * });\n * \n * [\n * 'self',\n * 'document',\n * 'Node',\n * 'Element',\n * 'HTMLElement',\n * 'DocumentFragment',\n * 'DOMParser',\n * 'XMLSerializer',\n * 'NodeFilter',\n * 'InputEvent',\n * 'CustomEvent'\n * ].forEach(key => (global[key] = window[key]));\n * }\n * ```\n * \n * (**) for this command the crypt library is necessary in the nodejs context.\n * \n * ```\n * import * as Crypto from \"@peculiar/webcrypto\";\n * global['crypto'] = new Crypto.Crypto();\n * ```\n * \n * @example\n * \n * import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/data/transformer.js';\n * \n * const transformer = new Transformer(\"tolower\")\n * \n * console.log(transformer.run(\"HELLO\"))\n * // ↦ hello\n * \n * console.log(transformer.run(\"WORLD\"))\n * // ↦ world\n * \n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Data\n */\nclass Transformer extends Base {\n /**\n *\n * @param {string} definition\n */\n constructor(definition) {\n super();\n validateString(definition);\n\n this.args = disassemble(definition);\n this.command = this.args.shift()\n this.callbacks = new Map();\n\n }\n\n /**\n *\n * @param {string} name\n * @param {function} callback\n * @returns {Transformer}\n * @throws {TypeError} value is not a string\n * @throws {TypeError} value is not a function\n */\n setCallback(name, callback) {\n validateString(name)\n validateFunction(callback)\n this.callbacks.set(name, callback);\n return this;\n }\n\n /**\n *\n * @param {*} value\n * @returns {*}\n * @throws {Error} unknown command\n * @throws {TypeError} unsupported type\n * @throws {Error} type not supported\n */\n run(value) {\n return transform.apply(this, [value])\n }\n}\n\nMonster.assignToNamespace('Monster.Data', Transformer);\nexport {Monster, Transformer}\n\n/**\n *\n * @param {string} command\n * @returns {array}\n * @private\n */\nfunction disassemble(command) {\n\n validateString(command);\n \n let placeholder = new Map;\n const regex = /((?<pattern>\\\\(?<char>.)){1})/mig;\n\n // The separator for args must be quotable\n // undefined string which should not occur normally and is also not a regex\n let result = command.matchAll(regex)\n \n for (let m of result) {\n let g=m?.['groups'];\n if(!isObject(g)) {\n continue;\n }\n \n let p=g?.['pattern'];\n let c=g?.['char'];\n \n if(p&&c) {\n let r='__'+new ID().toString()+'__';\n placeholder.set(r, c);\n command=command.replace(p,r);\n }\n \n }\n let parts = command.split(':');\n\n parts = parts.map(function (value) {\n let v = value.trim();\n for(let k of placeholder) {\n v= v.replace(k[0], k[1]);\n }\n return v;\n \n \n });\n\n return parts\n}\n\n/**\n * tries to make a string out of value and if this succeeds to return it back\n * \n * @param {*} value\n * @returns {string}\n * @private\n */\nfunction convertToString(value) {\n\n if (isObject(value) && value.hasOwnProperty('toString')) {\n value = value.toString();\n }\n\n validateString(value)\n return value;\n}\n\n/**\n *\n * @param {*} value\n * @returns {*}\n * @private\n * @throws {Error} unknown command\n * @throws {TypeError} unsupported type\n * @throws {Error} type not supported\n */\nfunction transform(value) {\n\n let args = clone(this.args);\n let key\n\n switch (this.command) {\n\n case 'static':\n return this.args.join(':');\n\n case 'tolower':\n case 'strtolower':\n case 'tolowercase':\n validateString(value)\n return value.toLowerCase();\n\n case 'toupper':\n case 'strtoupper':\n case 'touppercase':\n validateString(value)\n return value.toUpperCase();\n\n case 'tostring':\n return \"\" + value;\n\n case 'tointeger':\n let n = parseInt(value);\n validateInteger(n);\n return n\n \n case 'tojson':\n return JSON.stringify(value);\n\n case 'trim':\n validateString(value)\n return value.trim();\n\n case 'rawurlencode':\n validateString(value)\n return encodeURIComponent(value)\n .replace(/!/g, '%21')\n .replace(/'/g, '%27')\n .replace(/\\(/g, '%28')\n .replace(/\\)/g, '%29')\n .replace(/\\*/g, '%2A');\n\n\n case 'call':\n\n /**\n * callback-definition\n * function callback(value, ...args) {\n * return value;\n * }\n */\n\n let callback;\n let callbackName = args.shift();\n\n if (isObject(value) && value.hasOwnProperty(callbackName)) {\n callback = value[callbackName];\n } else if (this.callbacks.has(callbackName)) {\n callback = this.callbacks.get(callbackName);\n } else if (typeof window === 'object' && window.hasOwnProperty(callbackName)) {\n callback = window[callbackName];\n }\n validateFunction(callback);\n\n args.unshift(value);\n return callback(...args);\n\n case 'plain':\n case 'plaintext':\n validateString(value);\n let doc = new DOMParser().parseFromString(value, 'text/html');\n return doc.body.textContent || \"\";\n\n case 'if':\n case '?':\n\n validatePrimitive(value);\n\n let trueStatement = (args.shift() || undefined);\n let falseStatement = (args.shift() || undefined);\n\n if (trueStatement === 'value') {\n trueStatement = value;\n }\n if (trueStatement === '\\\\value') {\n trueStatement = 'value';\n }\n if (falseStatement === 'value') {\n falseStatement = value;\n }\n if (falseStatement === '\\\\value') {\n falseStatement = 'value';\n }\n\n let condition = ((value !== undefined && value !== '' && value !== 'off' && value !== 'false' && value !== false) || value === 'on' || value === 'true' || value === true);\n return condition ? trueStatement : falseStatement;\n\n\n case 'ucfirst':\n validateString(value);\n\n let firstchar = value.charAt(0).toUpperCase();\n return firstchar + value.substr(1);\n case 'ucwords':\n validateString(value);\n\n return value.replace(/^([a-z\\u00E0-\\u00FC])|\\s+([a-z\\u00E0-\\u00FC])/g, function (v) {\n return v.toUpperCase();\n });\n\n case 'count':\n case 'length':\n\n if ((isString(value) || isObject(value) || isArray(value)) && value.hasOwnProperty('length')) {\n return value.length;\n }\n\n throw new TypeError(\"unsupported type\");\n\n case 'base64':\n convertToString(value);\n return btoa(value);\n\n case 'empty':\n return '';\n\n case 'undefined':\n return undefined;\n\n case 'prefix':\n validateString(value);\n let prefix = args?.[0];\n return prefix + value;\n\n case 'suffix':\n validateString(value);\n let suffix = args?.[0];\n return value + suffix;\n\n case 'uniqid':\n return (new ID()).toString();\n\n case 'key':\n case 'property':\n case 'index':\n\n key = (args.shift() || 'undefined');\n let defaultValue = (args.shift() || '');\n\n if (value instanceof Map) {\n if(!value.has(key)) {\n return defaultValue;\n }\n return value.get(key);\n }\n\n if (isObject(value)||isArray(value)) {\n\n if (value?.[key]) {\n return value?.[key];\n }\n\n return defaultValue;\n }\n\n throw new Error(\"type not supported\")\n\n case 'path':\n\n key = (args.shift() || 'undefined');\n return new Pathfinder(value).getVia(key);\n \n \n case 'substring':\n\n validateString(value);\n \n let start = parseInt(args[0]) || 0;\n let end = (parseInt(args[1]) || 0) + start;\n\n return value.substring(start, end);\n \n case 'nop':\n return value;\n\n default:\n throw new Error(\"unknown command \"+this.command)\n }\n\n return value;\n}\n", "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, Base} from '../types/base.js';\nimport {validateInstance, validateString} from \"../types/validate.js\";\nimport {getGlobalFunction} from \"../types/global.js\";\nimport {ProxyObserver} from \"../types/proxyobserver.js\";\n\n\n/**\n * attribute prefix\n * \n * @type {string}\n * @memberOf Monster/DOM\n */\nconst ATTRIBUTEPREFIX = \"data-monster-\";\n\n/**\n * you can call the method via the monster namespace `new Monster.DOM.Assembler()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/assembler.js';\n * console.log(new Monster.DOM.Assembler())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Assembler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/assembler.js';\n * console.log(new Assembler())\n * </script>\n * ```\n *\n * @since 1.6.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n */\nclass Assembler extends Base {\n\n /**\n * @param {DocumentFragment} fragment\n * @throws {TypeError} value is not an instance of\n * @throws {TypeError} value is not a function\n * @throws {Error} the function is not defined\n */\n constructor(fragment) {\n super();\n this.attributePrefix = ATTRIBUTEPREFIX;\n validateInstance(fragment, getGlobalFunction('DocumentFragment'));\n this.fragment = fragment;\n }\n\n /**\n *\n * @param {string} prefix\n * @returns {Assembler}\n * @throws {TypeError} value is not a string\n */\n setAttributePrefix(prefix) {\n validateString(prefix);\n this.attributePrefix = prefix;\n return this;\n }\n\n /**\n *\n * @returns {string}\n */\n getAttributePrefix() {\n return this.attributePrefix;\n }\n\n /**\n *\n * @param {ProxyObserver|undefined} data\n * @return {DocumentFragment}\n * @throws {TypeError} value is not an instance of\n */\n createDocumentFragment(data) {\n\n if (data === undefined) {\n data = new ProxyObserver({});\n }\n\n validateInstance(data, ProxyObserver);\n let fragment = this.fragment.cloneNode(true);\n return fragment;\n }\n\n}\n\nMonster.assignToNamespace('Monster.DOM', Assembler);\nexport {Monster, ATTRIBUTEPREFIX, Assembler}\n", - "'use strict';\n\nimport {Monster} from \"../namespace.js\";\n\n/**\n * @author schukai GmbH\n */\n\n/**\n * @memberOf Monster/DOM\n * @since 1.8.0\n * @type {string}\n */\nconst ATTRIBUTE_PREFIX = 'data-monster-';\n\n/**\n * @memberOf Monster/DOM\n * @since 1.8.0\n * @type {string}\n */\nconst ATTRIBUTE_OPTIONS = ATTRIBUTE_PREFIX + 'options';\n\n\n/**\n * default theme\n * @memberOf Monster/DOM\n * @type {string}\n */\nconst DEFAULT_THEME = 'monster';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_THEME_PREFIX = ATTRIBUTE_PREFIX + 'theme-';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n */\nconst ATTRIBUTE_THEME_NAME = ATTRIBUTE_THEME_PREFIX + 'name';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_ATTRIBUTES = ATTRIBUTE_PREFIX + 'attributes';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_REPLACE = ATTRIBUTE_PREFIX + 'replace';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_INSERT = ATTRIBUTE_PREFIX + 'insert';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_INSERT_REFERENCE = ATTRIBUTE_PREFIX + 'insert-reference';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_REMOVE = ATTRIBUTE_PREFIX + 'remove';\n\n\nexport {\n Monster,\n ATTRIBUTE_PREFIX,\n ATTRIBUTE_OPTIONS,\n DEFAULT_THEME,\n ATTRIBUTE_THEME_PREFIX,\n ATTRIBUTE_THEME_NAME,\n ATTRIBUTE_UPDATER_ATTRIBUTES,\n ATTRIBUTE_UPDATER_REPLACE,\n ATTRIBUTE_UPDATER_INSERT,\n ATTRIBUTE_UPDATER_INSERT_REFERENCE,\n ATTRIBUTE_UPDATER_REMOVE\n}", + "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\nimport {TokenList} from \"../types/tokenlist.js\";\nimport {validateInstance, validateString} from \"../types/validate.js\";\n\n\n/**\n * @since 1.9.0\n * @param {HTMLElement} element\n * @param {string} key\n * @param {string} value\n * @return {HTMLElement}\n */\nfunction toggleAttributeValue(element, key, value) {\n validateInstance(element, HTMLElement);\n validateString(value)\n validateString(key)\n\n if (!element.hasAttribute(key)) {\n element.setAttribute(key, value);\n return element;\n }\n\n element.setAttribute(key, new TokenList(element.getAttribute(key)).toggle(value).toString());\n\n return element\n}\n\n/**\n * @since 1.9.0\n * @param {HTMLElement} element\n * @param {string} key\n * @param {string} value\n * @return {HTMLElement}\n */\nfunction addAttributeValue(element, key, value) {\n validateInstance(element, HTMLElement);\n validateString(value)\n validateString(key)\n\n if (!element.hasAttribute(key)) {\n element.setAttribute(key, value);\n return element;\n }\n\n element.setAttribute(key, new TokenList(element.getAttribute(key)).add(value).toString());\n\n return element\n}\n\n/**\n * @since 1.9.0\n * @param {HTMLElement} element\n * @param {string} key\n * @param {string} value\n * @return {HTMLElement}\n */\nfunction removeAttributeValue(element, key, value) {\n validateInstance(element, HTMLElement);\n validateString(value)\n validateString(key)\n\n if (!element.hasAttribute(key)) {\n return element;\n }\n\n element.setAttribute(key, new TokenList(element.getAttribute(key)).remove(value).toString());\n\n return element\n}\n\n/**\n * @since 1.9.0\n * @param {HTMLElement} element\n * @param {string} key\n * @param {string} value\n * @return {boolean}\n */\nfunction containsAttributeValue(element, key, value) {\n validateInstance(element, HTMLElement);\n validateString(value)\n validateString(key)\n\n if (!element.hasAttribute(key)) {\n return false;\n }\n\n return new TokenList(element.getAttribute(key)).contains(value);\n\n}\n\n/**\n * @since 1.9.0\n * @param {HTMLElement} element\n * @param {string} key\n * @param {string} from\n * @param {string} to\n * @return {HTMLElement}\n */\nfunction replaceAttributeValue(element, key, from, to) {\n validateInstance(element, HTMLElement);\n validateString(from)\n validateString(to)\n validateString(key)\n\n if (!element.hasAttribute(key)) {\n return element;\n }\n\n element.setAttribute(key, new TokenList(element.getAttribute(key)).replace(from, to).toString());\n\n return element\n}\n\n/**\n * @since 1.9.0\n * @param {HTMLElement} element\n * @param {string} key\n * @return {HTMLElement}\n */\nfunction clearAttributeValue(element, key) {\n validateInstance(element, HTMLElement);\n validateString(key)\n\n if (!element.hasAttribute(key)) {\n return element;\n }\n\n element.setAttribute(key, \"\");\n\n return element\n}\n\n\nMonster.assignToNamespace('Monster.Data', clearAttributeValue, replaceAttributeValue, containsAttributeValue, removeAttributeValue, addAttributeValue, toggleAttributeValue);\nexport {\n Monster,\n clearAttributeValue,\n replaceAttributeValue,\n containsAttributeValue,\n removeAttributeValue,\n addAttributeValue,\n toggleAttributeValue\n}", + "'use strict';\n\nimport {Monster} from \"../namespace.js\";\n\n/**\n * @author schukai GmbH\n */\n\n/**\n * @memberOf Monster/DOM\n * @since 1.8.0\n * @type {string}\n */\nconst ATTRIBUTE_PREFIX = 'data-monster-';\n\n/**\n * @memberOf Monster/DOM\n * @since 1.8.0\n * @type {string}\n */\nconst ATTRIBUTE_OPTIONS = ATTRIBUTE_PREFIX + 'options';\n\n\n/**\n * default theme\n * @memberOf Monster/DOM\n * @type {string}\n */\nconst DEFAULT_THEME = 'monster';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_THEME_PREFIX = ATTRIBUTE_PREFIX + 'theme-';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n */\nconst ATTRIBUTE_THEME_NAME = ATTRIBUTE_THEME_PREFIX + 'name';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_ATTRIBUTES = ATTRIBUTE_PREFIX + 'attributes';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_REPLACE = ATTRIBUTE_PREFIX + 'replace';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_INSERT = ATTRIBUTE_PREFIX + 'insert';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_INSERT_REFERENCE = ATTRIBUTE_PREFIX + 'insert-reference';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.8.0\n */\nconst ATTRIBUTE_UPDATER_REMOVE = ATTRIBUTE_PREFIX + 'remove';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.9.0\n */\nconst ATTRIBUTE_UPDATER_BIND = ATTRIBUTE_PREFIX + 'bind';\n\n/**\n * @memberOf Monster/DOM\n * @type {string}\n * @since 1.9.0\n */\nconst ATTRIBUTE_UPDATER_HASSYMBOL = ATTRIBUTE_PREFIX + 'hassymbol';\n\n\nexport {\n Monster,\n ATTRIBUTE_PREFIX,\n ATTRIBUTE_OPTIONS,\n DEFAULT_THEME,\n ATTRIBUTE_THEME_PREFIX,\n ATTRIBUTE_THEME_NAME,\n ATTRIBUTE_UPDATER_ATTRIBUTES,\n ATTRIBUTE_UPDATER_REPLACE,\n ATTRIBUTE_UPDATER_INSERT,\n ATTRIBUTE_UPDATER_INSERT_REFERENCE,\n ATTRIBUTE_UPDATER_REMOVE,\n ATTRIBUTE_UPDATER_BIND,\n ATTRIBUTE_UPDATER_HASSYMBOL\n}", "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {ATTRIBUTE_OPTIONS} from \"./constants.js\";\nimport {findDocumentTemplate} from \"./template.js\";\nimport {getGlobalObject} from \"../types/global.js\";\nimport {Monster, validateFunction, validateObject, validateString} from \"../types/validate.js\";\n\n\n/**\n * To define a new HTML element we need the power of CustomElement\n *\n * you can call the method via the monster namespace `new Monster.DOM.Element()`.\n *\n * important: after defining a `CustomElement`, the `registerCustomElement` method must be called\n * with the new class name. only then will the tag defined via the `getTag` method be made known to the DOM.\n *\n * ```\n * <script type=\"module\">\n * import {CustomElement} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/customelement.js';\n * console.log(new Monster.DOM.CustomElement())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {CustomElement} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/customelement.js';\n * console.log(new CustomElement())\n * </script>\n * ```\n *\n * ## Styling\n *\n * For optimal display of custom-elements the pseudo-class :defined can be used.\n *\n * ```html\n * <style>\n *\n * my-custom-element:not(:defined) {\n * display: none;\n * }\n *\n * my-custom-element:defined {\n * display: flex;\n * }\n *\n * </style>\n * ```\n *\n *\n *\n * @example\n *\n * // In the example the HTML structure is taken from the getTemplate method. The user can use his own template by creating a template in the DOM with the ID `monster-my-element`.\n * // You can also specify a theme (for example `mytheme`), then it will search for the ID `monster-my-element-mytheme` and if not available for the ID `monster-my-element`.\n *\n * class MonsterMyElement extends CustomElement {\n * \n * constructor() {\n * super();\n * }\n * \n * getTemplate() {\n * return `<div class=\"form-check\">\n * <label class=\"form-check-label\">\n * <input class=\"form-check-input\" type=\"checkbox\" value=\"\">\n * Checkvalue\n * </label>\n * </div>`\n * }\n *\n * static getTag() {\n * return \"monster-my-element\"\n * }\n *\n *}\n *\n * // ↦ <monster-my-element></monster-my-element>\n *\n * @see https://github.com/WICG/webcomponents\n * @see https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements\n * @since 1.7.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n */\nclass CustomElement extends HTMLElement {\n\n /**\n * A new object is created. First the `initOptions` method is called. Here the\n * options can be defined in derived classes. Subsequently, the shadowRoot is initialized.\n *\n * @throws {Error} the options attribute does not contain a valid json definition.\n */\n constructor() {\n super();\n this._options = Object.assign({}, this.defaults, getOptionsFromAttributes.call(this));\n this.init();\n }\n\n /**\n * | option | description |\n * |----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n * | shadowMode | `open` Elements of the shadow root are accessible from JavaScript outside the root, for example using. `close` Denies access to the node(s) of a closed shadow root from JavaScript outside it |\n * | delegatesFocus | A boolean that, when set to true, specifies behavior that mitigates custom element issues around focusability. When a non-focusable part of the shadow DOM is clicked, the first focusable part is given focus, and the shadow host is given any available :focus styling. |\n *\n * Derived classes can override and extend this method as follows.\n *\n * ```\n * get defaults() {\n * return Object.assign({}, super.defaults, {\n * myValue:true\n * });\n * }\n * ```\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow\n * @return {{shadowMode: string, delegatesFocus: boolean}}\n * @since 1.8.0\n */\n get defaults() {\n return {\n shadowMode: 'open',\n delegatesFocus: true\n };\n }\n\n /**\n *\n * @param {string} key\n * @param [*} defaultValue\n * @return {*}\n * @since 1.8.0\n */\n getOption(key, defaultValue) {\n validateString(key)\n let v = this._options?.[key];\n if (v === undefined) return defaultValue;\n return v;\n }\n\n /**\n *\n * @return {CustomElement}\n * @since 1.8.0\n */\n init() {\n initShadowRoot.call(this);\n return this;\n }\n\n /**\n *\n * @return {CustomElement}\n * @since 1.8.0\n */\n assemble() {\n return this;\n }\n\n /**\n *\n *\n * @return {CustomElement}\n * @since 1.8.0\n */\n disassemble() {\n return this;\n }\n\n /**\n * Called every time the element is inserted into the DOM. Useful for running setup code, such as\n * fetching resources or rendering. Generally, you should try to delay work until this time.\n *\n * @return {void}\n */\n connectedCallback() {\n this.assemble();\n }\n\n /**\n * Called every time the element is removed from the DOM. Useful for running clean up code.\n *\n * @return {void}\n */\n disconnectedCallback() {\n this.disassemble();\n }\n\n /**\n * The custom element has been moved into a new document (e.g. someone called document.adoptNode(el)).\n *\n * @return {void}\n */\n adoptedCallback() {\n\n }\n\n /**\n * Called when an observed attribute has been added, removed, updated, or replaced. Also called for initial\n * values when an element is created by the parser, or upgraded. Note: only attributes listed in the observedAttributes property will receive this callback.\n *\n * @param {string} attrName\n * @param {string} oldVal\n * @param {string} newVal\n * @return {void}\n */\n attributeChangedCallback(attrName, oldVal, newVal) {\n this.assemble();\n }\n\n /**\n * This method defines the default template if no template with the id is found in the dom.\n *\n * @since 1.8.0\n * @return {string}\n * @throws {Error} the method getTemplate must be overwritten by the derived class.\n */\n static getTemplate() {\n throw new Error(\"the method getTemplate must be overwritten by the derived class.\");\n }\n\n\n /**\n * There is no check on the name by this class. the developer is responsible for assigning an appropriate tag.\n * if the name is not valid, registerCustomElement() will issue an erro\n *\n * @link https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\n * @return {string}\n * @throws {Error} the method getTag must be overwritten by the derived class.\n */\n static getTag() {\n throw new Error(\"the method getTag must be overwritten by the derived class.\");\n }\n\n /**\n *\n * @return {CSSStyleSheet}\n */\n static getCSSStyleSheet() {\n return new CSSStyleSheet();\n }\n\n\n}\n\n/**\n * @private\n * @return {object}\n * @throws {Error} the options attribute does not contain a valid json definition.\n */\nfunction getOptionsFromAttributes() {\n if (this.hasAttribute(ATTRIBUTE_OPTIONS)) {\n try {\n let obj = JSON.parse(this.getAttribute(ATTRIBUTE_OPTIONS))\n validateObject(obj);\n return obj;\n } catch(e) {\n throw new Error('the options attribute '+ATTRIBUTE_OPTIONS+' does not contain a valid json definition (actual: '+this.getAttribute(ATTRIBUTE_OPTIONS)+').');\n }\n }\n\n return {};\n}\n\n/**\n * @private\n * @return {CustomElement}\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow\n * @memberOf CustomElement\n * @since 1.8.0\n */\nfunction initShadowRoot() {\n\n this.attachShadow({\n mode: this.getOption('shadowMode', 'open'),\n delegatesFocus: this.getOption('delegatesFocus', true)\n });\n\n const styleSheet = this.constructor.getCSSStyleSheet();\n if (styleSheet instanceof CSSStyleSheet) {\n this.shadowRoot.adoptedStyleSheets = [styleSheet];\n }\n\n try {\n let template = findDocumentTemplate(this.constructor.getTag());\n this.shadowRoot.appendChild(template.createDocumentFragment());\n } catch (e) {\n this.shadowRoot.innerHTML = this.constructor.getTemplate();\n }\n\n return this;\n}\n\n/**\n * This method registers a new element. The string returned by `CustomElement.getTag()` is used as the tag.\n *\n * @param {CustomElement} element\n * @return {void}\n * @since 1.7.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {DOMException} Failed to execute 'define' on 'CustomElementRegistry': is not a valid custom element name\n */\nfunction registerCustomElement(element) {\n validateFunction(element);\n\n let tag = element.getTag();\n\n getGlobalObject('customElements').define(element.getTag(), element);\n return;\n}\n\nMonster.assignToNamespace('Monster.DOM', CustomElement, registerCustomElement);\nexport {Monster, registerCustomElement, CustomElement}\n", "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, Base} from '../types/base.js';\nimport {Stack} from \"../types/stack.js\";\nimport {validateInstance} from \"../types/validate.js\";\nimport {ProxyObserver} from \"../types/proxyobserver.js\";\nimport {Observer} from \"../types/observer.js\";\nimport {getGlobalFunction, getGlobalObject} from \"../types/global.js\";\nimport {isInstance} from \"../types/is.js\";\nimport {ATTRIBUTEPREFIX} from \"./assembler.js\"\nimport {ID} from \"../types/id.js\";\n\n/**\n * @private\n * @type {Symbol}\n */\nconst MONSTERDOMHANDLE = Symbol('MonsterHandle');\n\n/**\n * you can call the method via the monster namespace `new Monster.DOM.Handle()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/handle.js';\n * console.log(new Monster.DOM.Handle())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Handle} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/handle.js';\n * console.log(new Handle())\n * </script>\n * ```\n *\n * @since 1.6.0\n * @copyright schukai GmbH\n * @memberOf Monster.DOM\n */\nclass Handle extends Base {\n /**\n *\n * @param {ProxyObserver} data\n */\n constructor(data) {\n super();\n\n let self = this;\n\n self.id = new ID();\n\n validateInstance(data, ProxyObserver);\n\n this.data = data\n\n this.mutationObserver = createMutationObserver.call(this);\n this.dataObserver = createDataObserver.call(this);\n this.data.attachObserver(this.dataObserver);\n\n this.nodes = new WeakSet\n this.updates = new Stack();\n\n }\n\n /**\n * @return {void}\n */\n update() {\n return;\n }\n\n /**\n *\n * @param {HTMLElement|Document} node\n * @return {Handle}\n */\n remove(node) {\n\n if (isInstance(node, getGlobalFunction('Document'))) {\n node = node.firstElementChild\n }\n\n validateInstance(node, getGlobalFunction('HTMLElement'))\n\n if (!this.nodes.has(node)) {\n return this;\n }\n\n this.mutationObserver.disconnect(node);\n\n delete node.dataset[MONSTERDOMHANDLE]\n node.removeAttribute(ATTRIBUTEPREFIX + \"handler\");\n\n return this;\n\n }\n\n /**\n *\n * @param {HTMLElement|Document} node\n * @return {Handle}\n */\n append(node) {\n\n if (isInstance(node, getGlobalFunction('Document'))) {\n node = node.firstElementChild\n }\n\n validateInstance(node, getGlobalFunction('HTMLElement'))\n\n if (this.nodes.has(node)) {\n return this;\n }\n\n node.dataset[MONSTERDOMHANDLE] = this;\n node.setAttribute(ATTRIBUTEPREFIX + \"handler\", true);\n\n this.mutationObserver.observe(node, {\n attributes: true,\n childList: true,\n subtree: true,\n characterData: true,\n characterDataOldValue: true,\n attributeOldValue: true\n });\n\n this.nodes.add(node);\n\n return this;\n\n }\n}\n\n/**\n *\n * @private\n * @return {Observer}\n */\nfunction createDataObserver() {\n const self = this;\n\n return new Observer(() => {\n self.update();\n });\n}\n\n/**\n *\n * @private\n * @return {MutationObserver}\n */\nfunction createMutationObserver() {\n\n const self = this;\n\n /**\n * @private\n * @type {MutationObserver}\n */\n const MutationObserver = getGlobalFunction('MutationObserver');\n\n // @link https://developer.mozilla.org/en/docs/Web/API/MutationObserver\n return new MutationObserver((mutationsList, observer) => {\n\n for (const mutation of mutationsList) {\n self.updates.push(mutation);\n }\n\n self.update();\n }\n )\n\n}\n\n/**\n * get the handle of a node\n *\n * if a node is specified without a handler, a recursive search upwards is performed until the corresponding\n * handle is found, or undefined is returned.\n *\n * you can call the method via the monster namespace `Monster.DOM.getHandleFromNode()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/handle.js';\n * console.log(Monster.DOM.getHandleFromNode())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getHandleFromNode} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/handle.js';\n * console.log(getHandleFromNode())\n * </script>\n * ```\n *\n * @param {Node} node\n * @return {Handle|undefined}\n * @since 1.6.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {TypeError} value is not an instance of Node\n */\nfunction getHandleFromNode(node) {\n validateInstance(node, getGlobalFunction('Node'));\n\n let handle = node.dataset?.[MONSTERDOMHANDLE];\n if (handle === undefined) {\n let parentNode = node?.['parentNode'];\n if (isInstance(parentNode, getGlobalFunction('Node'))) {\n return getHandleFromNode(parentNode)\n }\n }\n\n return handle;\n}\n\nMonster.assignToNamespace('Monster.DOM', getHandleFromNode, Handle);\nexport {Monster, getHandleFromNode, Handle}\n\n", "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster, Base} from '../types/base.js';\nimport {validateString} from \"../types/validate.js\";\nimport {getGlobalFunction, getGlobalObject} from '../types/global.js';\nimport {validateInstance} from \"../types/validate.js\";\nimport {getDocumentTheme} from \"./theme.js\";\n\n/**\n * you can call the method via the monster namespace `new Monster.DOM.Template()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/template.js';\n * console.log(new Monster.DOM.Template())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Template} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/template.js';\n * console.log(new Template())\n * </script>\n * ```\n *\n * @since 1.6.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n */\nclass Template extends Base {\n /**\n *\n * @param {HTMLTemplateElement} template\n * @throws {TypeError} value is not an instance of\n * @throws {TypeError} value is not a function\n * @throws {Error} the function is not defined\n */\n constructor(template) {\n super();\n const HTMLTemplateElement = getGlobalFunction('HTMLTemplateElement');\n validateInstance(template, HTMLTemplateElement);\n this.template = template;\n }\n\n /**\n *\n * @returns {HTMLTemplateElement}\n */\n getTemplateElement() {\n return this.template;\n }\n\n /**\n *\n * @return {DocumentFragment}\n * @throws {TypeError} value is not an instance of\n */\n createDocumentFragment() {\n return this.template.content.cloneNode(true);\n }\n\n}\n\n/**\n *\n *\n * you can call the method via the monster namespace `Monster.DOM.findDocumentTemplate()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/template.js';\n * console.log(Monster.DOM.findDocumentTemplate())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {findTemplate} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/template.js';\n * console.log(findDocumentTemplate())\n * </script>\n * ```\n *\n * @param {string} id\n * @return {Template}\n * @since 1.7.0\n * @copyright schukai GmbH\n * @memberOf Monster/DOM\n * @throws {Error} template id not found.\n * @throws {TypeError} value is not a string\n */\nfunction findDocumentTemplate(id) {\n validateString(id);\n const document = getGlobalObject('document');\n const HTMLTemplateElement = getGlobalFunction('HTMLTemplateElement');\n\n let theme = getDocumentTheme()\n let themedID = id + '-' + theme.getName();\n\n let template = document.getElementById(themedID);\n if (template instanceof HTMLTemplateElement) {\n return new Template(template);\n }\n\n template = document.getElementById(id);\n if (template instanceof HTMLTemplateElement) {\n return new Template(template);\n }\n\n throw new Error(\"template \" + id + \" not found.\")\n}\n\n\nMonster.assignToNamespace('Monster.DOM', Template, findDocumentTemplate);\nexport {Monster, Template, findDocumentTemplate}\n\n\n", @@ -76,7 +78,7 @@ "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\nimport {validateInteger} from '../types/validate.js';\nimport {Base} from '../types/base.js';\n\n\n/**\n * you can call the method via the monster namespace `new Monster.Logging.LogEntry()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/logging/logentry.js';\n * console.log(new Monster.Logging.LogEntry())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/logging/logentry.js';\n * console.log(new LogEntry())\n * </script>\n * ```\n *\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Logging\n */\nclass LogEntry extends Base {\n /**\n *\n * @param {int} loglevel\n * @param {*} args\n */\n constructor(loglevel, ...args) {\n super();\n validateInteger(loglevel);\n\n this.loglevel = loglevel\n this.arguments = args\n }\n\n /**\n *\n * @returns {integerr}\n */\n getLogLevel() {\n return this.loglevel\n }\n\n /**\n *\n * @returns {array}\n */\n getArguments() {\n return this.arguments\n }\n\n}\n\nMonster.assignToNamespace('Monster.Logging', LogEntry);\nexport {Monster, LogEntry}\n", "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\nimport {validateInteger, validateObject, validateString} from '../types/validate.js';\nimport {Handler} from '../logging/handler.js';\nimport {LogEntry} from '../logging/logentry.js';\nimport {Base} from '../types/base.js';\n\n\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst ALL = 255;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst TRACE = 64;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst DEBUG = 32;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst INFO = 16;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst WARN = 8;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst ERROR = 4;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst FATAL = 2;\n/**\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF\n * @type {number}\n * @memberOf Monster/Logging\n */\nconst OFF = 0;\n\n/**\n * you can call the method via the monster namespace `new Monster.Logging.Logger()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/logging/logger.js';\n * console.log(new Monster.Logging.Logger())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/logging/logger.js';\n * console.log(new Logger())\n * </script>\n * ```\n *\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Logging\n */\nclass Logger extends Base {\n\n /**\n *\n */\n constructor() {\n super();\n this.handler = new Set;\n }\n\n /**\n *\n * @param {Handler} handler\n * @returns {Logger}\n * @throws {Error} the handler must be an instance of Handler\n */\n addHandler(handler) {\n validateObject(handler)\n if (!(handler instanceof Handler)) {\n throw new Error(\"the handler must be an instance of Handler\")\n }\n\n this.handler.add(handler)\n return this;\n }\n\n /**\n *\n * @param {Handler} handler\n * @returns {Logger}\n * @throws {Error} the handler must be an instance of Handler\n */\n removeHandler(handler) {\n validateObject(handler)\n if (!(handler instanceof Handler)) {\n throw new Error(\"the handler must be an instance of Handler\")\n }\n\n this.handler.delete(handler);\n return this;\n }\n\n /**\n * log Trace message\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n * @param {*} arguments\n * @returns {Logger}\n * @since 1.5.0\n */\n logTrace() {\n triggerLog.apply(this, [TRACE, ...arguments]);\n return this;\n };\n\n /**\n * log Debug message\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n * @param {*} arguments\n * @returns {Logger}\n * @since 1.5.0\n */\n logDebug() {\n triggerLog.apply(this, [DEBUG, ...arguments]);\n return this;\n };\n\n /**\n * log Info message\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n *\n * @param {*} arguments\n * @returns {Logger}\n * @since 1.5.0\n */\n logInfo() {\n triggerLog.apply(this, [INFO, ...arguments]);\n return this;\n };\n\n /**\n * log Warn message\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n * @param {*} arguments\n * @returns {Logger}\n * @since 1.5.0\n */\n logWarn() {\n triggerLog.apply(this, [WARN, ...arguments]);\n return this;\n };\n\n /**\n * log Error message\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n * @param {*} arguments\n * @returns {Logger}\n * @since 1.5.0\n */\n logError() {\n triggerLog.apply(this, [ERROR, ...arguments]);\n return this;\n };\n\n /**\n * log Fatal message\n *\n * ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;\n *\n * @param {*} arguments\n * @returns {Logger}\n * @since 1.5.0\n */\n logFatal() {\n triggerLog.apply(this, [FATAL, ...arguments]);\n return this;\n };\n\n\n /**\n * Labels\n *\n * @param {integer} level\n * @returns {string}\n */\n getLabel(level) {\n validateInteger(level);\n\n if (level === ALL) return 'ALL';\n if (level === TRACE) return 'TRACE';\n if (level === DEBUG) return 'DEBUG';\n if (level === INFO) return 'INFO';\n if (level === WARN) return 'WARN';\n if (level === ERROR) return 'ERROR';\n if (level === FATAL) return 'FATAL';\n if (level === OFF) return 'OFF';\n\n return 'unknown';\n };\n\n /**\n * Level\n *\n * @param {string} label\n * @returns {integer}\n */\n getLevel(label) {\n validateString(label);\n\n if (label === 'ALL') return ALL;\n if (label === 'TRACE') return TRACE;\n if (label === 'DEBUG') return DEBUG;\n if (label === 'INFO') return INFO;\n if (label === 'WARN') return WARN;\n if (label === 'ERROR') return ERROR;\n if (label === 'FATAL') return FATAL;\n if (label === 'OFF') return OFF;\n\n return 0;\n };\n\n\n}\n\nMonster.assignToNamespace('Monster.Logging', Logger);\nexport {Monster, Logger, ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF};\n\n\n/**\n * Log triggern\n *\n * @param {integer} loglevel\n * @param {*} args\n * @returns {Logger}\n * @private\n */\nfunction triggerLog(loglevel, ...args) {\n var logger = this;\n\n for (let handler of logger.handler) {\n handler.log(new LogEntry(loglevel, args))\n }\n\n return logger;\n\n}\n", "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\n\nimport {Monster, getGlobal} from '../types/global.js';\n\n\n/**\n * this function uses crypt and returns a random number.\n *\n * you can call the method via the monster namespace `Monster.Math.random()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/math/random.js';\n * console.log(Monster.Math.random(1,10)) // ↦ 5\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/math/random.js';\n * console.log(random(1,10)) // ↦ 5\n * </script>\n * ```\n *\n * @param {number} min starting value of the definition set (default is 0)\n * @param {number} max end value of the definition set (default is 1000000000)\n * @returns {number}\n * @memberOf Monster/Math\n\n * @since 1.0.0\n * @copyright schukai GmbH\n */\nfunction random(min, max) {\n\n if (min === undefined) {\n min = 0;\n }\n if (max === undefined) {\n max = MAX;\n }\n\n if (max < min) {\n throw new Error(\"max must be greater than min\");\n }\n\n return Math.round(create(min, max));\n\n}\n\n/**\n * @private\n * @type {number}\n */\nvar MAX = 1000000000;\n\n\nMath.log2 = Math.log2 || function (n) {\n return Math.log(n) / Math.log(2);\n};\n\n/**\n *\n * @param min\n * @param max\n * @returns {*}\n * @private\n */\nfunction create(min, max) {\n let crypt;\n let globalReference = getGlobal();\n\n crypt = globalReference?.['crypto'] || globalReference?.['msCrypto'] || globalReference?.['crypto'] || undefined;\n\n if (typeof crypt === \"undefined\") {\n throw new Error(\"missing crypt\")\n }\n\n let rval = 0;\n const range = max - min;\n if (range < 2) {\n return min;\n }\n\n const bitsNeeded = Math.ceil(Math.log2(range));\n if (bitsNeeded > 53) {\n throw new Error(\"we cannot generate numbers larger than 53 bits.\");\n }\n const bytesNeeded = Math.ceil(bitsNeeded / 8);\n const mask = Math.pow(2, bitsNeeded) - 1;\n\n const byteArray = new Uint8Array(bytesNeeded);\n crypt.getRandomValues(byteArray);\n\n let p = (bytesNeeded - 1) * 8;\n for (var i = 0; i < bytesNeeded; i++) {\n rval += byteArray[i] * Math.pow(2, p);\n p -= 8;\n }\n\n rval = rval & mask;\n\n if (rval >= range) {\n return create(min, max);\n }\n\n return min + rval;\n\n}\n\nMonster.assignToNamespace('Monster.Math', random);\nexport {Monster, random}\n\n\n\n\n", - "/**\n * @license\n * Copyright 2021 schukai GmbH\n * SPDX-License-Identifier: AGPL-3.0-only or COMMERCIAL\n * @author schukai GmbH\n */\n\n'use strict';\n\nimport {Monster} from './namespace.js';\nimport './types/base.js';\nimport './types/global.js';\nimport './types/id.js';\nimport './types/is.js';\nimport './types/observer.js';\nimport './types/observerlist.js';\nimport './types/proxyobserver.js';\nimport './types/queue.js';\nimport './types/randomid.js';\nimport './types/stack.js';\nimport './types/tokenlist.js';\nimport './types/uniquequeue.js';\nimport './types/validate.js';\nimport './types/version.js';\nimport './math/random.js';\nimport './data/diff.js';\nimport './data/pathfinder.js';\nimport './data/pipe.js';\nimport './data/transformer.js';\nimport './logging/handler.js';\nimport './logging/logentry.js';\nimport './logging/logger.js';\nimport './logging/handler/console.js';\nimport './util/clone.js';\nimport './util/comparator.js';\nimport './util/freeze.js';\nimport './constraints/abstract.js';\nimport './constraints/abstractoperator.js';\nimport './constraints/andoperator.js';\nimport './constraints/invalid.js';\nimport './constraints/isarray.js';\nimport './constraints/isobject.js';\nimport './constraints/oroperator.js';\nimport './constraints/valid.js';\nimport './dom/util.js';\nimport './dom/template.js';\nimport './dom/handle.js';\nimport './dom/assembler.js';\nimport './dom/customelement.js';\n\n\nMonster.Util.deepFreeze(Monster);\nexport {Monster};\n\nlet rootName\ntry {\n rootName = Monster.Types.getGlobalObject('__MonsterRootName__');\n} catch (e) {\n\n}\n\nif (!rootName) rootName = \"Monster\";\n\nMonster.Types.getGlobal()[rootName] = Monster", + "/**\n * @license\n * Copyright 2021 schukai GmbH\n * SPDX-License-Identifier: AGPL-3.0-only or COMMERCIAL\n * @author schukai GmbH\n */\n\n'use strict';\n\nimport {Monster} from './namespace.js';\nimport './types/base.js';\nimport './types/global.js';\nimport './types/id.js';\nimport './types/is.js';\nimport './types/observer.js';\nimport './types/observerlist.js';\nimport './types/proxyobserver.js';\nimport './types/queue.js';\nimport './types/randomid.js';\nimport './types/stack.js';\nimport './types/tokenlist.js';\nimport './types/uniquequeue.js';\nimport './types/validate.js';\nimport './types/version.js';\nimport './math/random.js';\nimport './data/diff.js';\nimport './data/pathfinder.js';\nimport './data/pipe.js';\nimport './data/transformer.js';\nimport './logging/handler.js';\nimport './logging/logentry.js';\nimport './logging/logger.js';\nimport './logging/handler/console.js';\nimport './util/clone.js';\nimport './util/comparator.js';\nimport './util/freeze.js';\nimport './constraints/abstract.js';\nimport './constraints/abstractoperator.js';\nimport './constraints/andoperator.js';\nimport './constraints/invalid.js';\nimport './constraints/isarray.js';\nimport './constraints/isobject.js';\nimport './constraints/oroperator.js';\nimport './constraints/valid.js';\nimport './dom/util.js';\nimport './dom/template.js';\nimport './dom/handle.js';\nimport './dom/assembler.js';\nimport './dom/customelement.js';\nimport './dom/attributes.js';\n\n\nMonster.Util.deepFreeze(Monster);\nexport {Monster};\n\nlet rootName\ntry {\n rootName = Monster.Types.getGlobalObject('__MonsterRootName__');\n} catch (e) {\n\n}\n\nif (!rootName) rootName = \"Monster\";\n\nMonster.Types.getGlobal()[rootName] = Monster", "'use strict';\n\n/**\n * @namespace Monster\n * @author schukai GmbH\n */\n\n\n/**\n * namespace class objects form the basic framework of the namespace administration.\n *\n * all functions, classes and objects of the library hang within the namespace tree.\n *\n * via `obj instanceof Monster.Namespace` it is also easy to check whether it is an object or a namespace.\n *\n * @memberOf Monster\n * @copyright schukai GmbH\n * @since 1.0.0\n */\nclass Namespace {\n\n /**\n *\n * @param namespace\n * @param obj\n */\n constructor(namespace) {\n if (namespace === undefined || typeof namespace !== 'string') {\n throw new Error(\"namespace is not a string\")\n }\n this.namespace = namespace;\n }\n\n /**\n *\n * @returns {string}\n */\n getNamespace() {\n return this.namespace;\n }\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return this.getNamespace();\n }\n}\n\n/**\n * @type {Namespace}\n * @global\n */\nexport const Monster = new Namespace(\"Monster\");\n\n\n/**\n *\n */\nassignToNamespace('Monster', assignToNamespace);\n\n/**\n * To expand monster, the `Monster.assignToNamespace()` method can be used. \n *\n * you must call the method in the monster namespace. this allows you to mount your own classes, objects and functions into the namespace.\n * \n * To avoid confusion and so that you do not accidentally overwrite existing functions, you should use the custom namespace `X`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/namespace.js';\n * function hello() {\n * console.log('Hello World!');\n * }\n * Monster.assignToNamespace(\"Monster.X\",hello)\n * Monster.X.hello(); // ↦ Hello World!\n * </script>\n * \n * ```\n *\n * @param ns\n * @param obj\n * @memberOf Monster\n \n */\nfunction assignToNamespace(ns, ...obj) {\n let current = namespaceFor(ns.split(\".\"));\n\n for (let i = 0, l = obj.length; i < l; i++) {\n current[objectName(obj[i])] = obj[i];\n }\n}\n\n/**\n *\n * @param fn\n * @returns {string|*}\n * @private\n */\nfunction objectName(fn) {\n try {\n\n if (typeof fn !== 'function') {\n throw new Error(\"the first argument is not a function or class.\");\n }\n\n if (fn.hasOwnProperty('name')) {\n return fn.name;\n }\n\n if (\"function\" === typeof fn.toString) {\n let s = fn.toString();\n let f = s.match(/^\\s*function\\s+([^\\s(]+)/);\n if (Array.isArray(f) && typeof f[1] === 'string') {\n return f[1];\n }\n let c = s.match(/^\\s*class\\s+([^\\s(]+)/);\n if (Array.isArray(c) && typeof c[1] === 'string') {\n return c[1];\n }\n }\n\n } catch (e) {\n throw new Error(\"exception \" + e);\n }\n\n throw new Error(\"the name of the class or function cannot be resolved.\");\n}\n\n/**\n *\n * @param parts\n * @returns {Namespace}\n * @private\n */\nfunction namespaceFor(parts) {\n var space = Monster, ns = 'Monster';\n\n for (let i = 0; i < parts.length; i++) {\n\n if (\"Monster\" === parts[i]) {\n continue;\n }\n\n ns += '.' + parts[i];\n\n if (!space.hasOwnProperty(parts[i])) {\n space[parts[i]] = new Namespace(ns);\n }\n\n space = space[parts[i]];\n }\n\n return space;\n}\n\n\nexport {assignToNamespace}\n", "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\n\n\n/**\n * This is the base class from which all monster classes are derived.\n *\n * You can call the method via the monster namespace `new Monster.Types.Base()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/types/base.js';\n * console.log(new Monster.Types.Base())\n * console.log(new Monster.Types.Base())\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {Object} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/types/base.js';\n * console.log(new Base())\n * console.log(new Base())\n * </script>\n * ```\n *\n * The class was formerly called Object.\n *\n * @since 1.5.0\n * @copyright schukai GmbH\n * @memberOf Monster/Types\n */\nclass Base extends Object {\n\n /**\n *\n * @returns {string}\n */\n toString() {\n return JSON.stringify(this);\n };\n\n\n}\n\nMonster.assignToNamespace('Monster.Types', Base);\nexport {Monster, Base}\n", "'use strict';\n\n/**\n * @author schukai GmbH\n */\n\nimport {Monster} from '../namespace.js';\nimport {validateFunction, validateString, validateObject} from \"./validate.js\";\n\n/**\n * @type {objec}\n * @private\n */\nvar globalReference;\n\n/**\n * @private\n */\n(function () {\n if (typeof globalThis === 'object') {\n globalReference = globalThis;\n return;\n }\n\n Object.defineProperty(Object.prototype, '__monster__', {\n get: function () {\n return this;\n },\n configurable: true\n });\n\n __monster__.globalThis = __monster__;\n delete Object.prototype.__monster__;\n\n globalReference = globalThis;\n\n}());\n\n/**\n * Return globalThis\n *\n * If globalThis is not available, it will be polyfilled\n *\n * @since 1.6.0\n * @memberOf Monster/Types\n * @returns {objec} globalThis\n */\nfunction getGlobal() {\n return globalReference;\n}\n\n/**\n * Return global object or throw Error\n *\n * You can call the method via the monster namespace `Monster.Types.getGlobalObject()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/types/global.js';\n * console.log(Monster.Types.getGlobalObject('document')) // ↦ { }\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getGlobalObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/types/global.js';\n * console.log(getGlobalObject('document')) // ↦ { }\n * </script>\n * ```\n *\n * @since 1.6.0\n * @memberOf Monster/Types\n * @param {string} name\n * @returns {objec}\n * @throws {Error} the object is not defined\n * @throws {TypeError} value is not a object\n * @throws {TypeError} value is not a string\n */\nfunction getGlobalObject(name) {\n validateString(name);\n let o = globalReference?.[name];\n if (typeof o === 'undefined') throw new Error('the object ' + name + ' is not defined');\n validateObject(o);\n return o;\n}\n\n/**\n * Return global function or throw Error\n *\n * You can call the method via the monster namespace `Monster.Types.getGlobalFunction()`.\n *\n * ```\n * <script type=\"module\">\n * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/types/global.js';\n * console.log(Monster.Types.getGlobalFunction('parseInt')) // ↦ f parseInt() { }\n * </script>\n * ```\n *\n * Alternatively, you can also integrate this function individually.\n *\n * ```\n * <script type=\"module\">\n * import {getGlobalFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/types/global.js';\n * console.log(getGlobalFunction('parseInt')) // ↦ f parseInt() { }\n * </script>\n * ```\n *\n * @since 1.6.0\n * @memberOf Monster/Types\n * @param {string} name\n * @returns {objec}\n * @throws {TypeError} value is not a function\n * @throws {Error} the function is not defined\n * @throws {TypeError} value is not a string\n */\nfunction getGlobalFunction(name) {\n validateString(name);\n let f = globalReference?.[name];\n if (typeof f === 'undefined') throw new Error('the function ' + name + ' is not defined');\n validateFunction(f);\n return f;\n}\n\n\nMonster.assignToNamespace('Monster.Types', getGlobal, getGlobalObject, getGlobalFunction);\nexport {Monster, getGlobal, getGlobalObject, getGlobalFunction}\n", diff --git a/packages/monster/dist/monster.js b/packages/monster/dist/monster.js index 47074bd232c37824454dbe3d8e97db99f6e9275f..92d8a9255690bc4919a8e951bb3170d7474f6447 100644 --- a/packages/monster/dist/monster.js +++ b/packages/monster/dist/monster.js @@ -1,2 +1,2 @@ /** Monster 1.9.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */ -(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.AbstractConstraint=void 0;var _namespace=require("../namespace.js");var _base=require("../types/base.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var AbstractConstraint=function(_Base){_inherits(AbstractConstraint,_Base);var _super=_createSuper(AbstractConstraint);function AbstractConstraint(){_classCallCheck(this,AbstractConstraint);return _super.call(this)}_createClass(AbstractConstraint,[{key:"isValid",value:function isValid(value){return Promise.reject(value)}}]);return AbstractConstraint}(_base.Base);exports.AbstractConstraint=AbstractConstraint;_namespace.Monster.assignToNamespace("Monster.Constraints",AbstractConstraint)},{"../namespace.js":26,"../types/base.js":27}],2:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _abstract.Monster}});exports.AbstractOperator=void 0;var _abstract=require("./abstract.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var AbstractOperator=function(_AbstractConstraint){_inherits(AbstractOperator,_AbstractConstraint);var _super=_createSuper(AbstractOperator);function AbstractOperator(operantA,operantB){var _this;_classCallCheck(this,AbstractOperator);_this=_super.call(this);if(!(operantA instanceof _abstract.AbstractConstraint)||!(operantB instanceof _abstract.AbstractConstraint)){throw new TypeError("parameters must be from type AbstractConstraint")}_this.operantA=operantA;_this.operantB=operantB;return _this}return AbstractOperator}(_abstract.AbstractConstraint);exports.AbstractOperator=AbstractOperator;_abstract.Monster.assignToNamespace("Monster.Constraints",AbstractOperator)},{"./abstract.js":1}],3:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _abstract.Monster}});exports.AndOperator=void 0;var _abstract=require("./abstract.js");var _abstractoperator=require("./abstractoperator.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var AndOperator=function(_AbstractOperator){_inherits(AndOperator,_AbstractOperator);var _super=_createSuper(AndOperator);function AndOperator(){_classCallCheck(this,AndOperator);return _super.apply(this,arguments)}_createClass(AndOperator,[{key:"isValid",value:function isValid(value){return Promise.all([this.operantA.isValid(value),this.operantB.isValid(value)])}}]);return AndOperator}(_abstractoperator.AbstractOperator);exports.AndOperator=AndOperator;_abstract.Monster.assignToNamespace("Monster.Constraints",AndOperator)},{"./abstract.js":1,"./abstractoperator.js":2}],4:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _abstract.Monster}});exports.Invalid=void 0;var _abstract=require("./abstract.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Invalid=function(_AbstractConstraint){_inherits(Invalid,_AbstractConstraint);var _super=_createSuper(Invalid);function Invalid(){_classCallCheck(this,Invalid);return _super.apply(this,arguments)}_createClass(Invalid,[{key:"isValid",value:function isValid(value){return Promise.reject(value)}}]);return Invalid}(_abstract.AbstractConstraint);exports.Invalid=Invalid;_abstract.Monster.assignToNamespace("Monster.Constraints",Invalid)},{"./abstract.js":1}],5:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _abstract.Monster}});exports.IsArray=void 0;var _abstract=require("./abstract.js");var _is=require("../types/is.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var IsArray=function(_AbstractConstraint){_inherits(IsArray,_AbstractConstraint);var _super=_createSuper(IsArray);function IsArray(){_classCallCheck(this,IsArray);return _super.apply(this,arguments)}_createClass(IsArray,[{key:"isValid",value:function isValid(value){if((0,_is.isArray)(value)){return Promise.resolve(value)}return Promise.reject(value)}}]);return IsArray}(_abstract.AbstractConstraint);exports.IsArray=IsArray;_abstract.Monster.assignToNamespace("Monster.Constraints",IsArray)},{"../types/is.js":30,"./abstract.js":1}],6:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _abstract.Monster}});exports.IsObject=void 0;var _abstract=require("./abstract.js");var _is=require("../types/is.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var IsObject=function(_AbstractConstraint){_inherits(IsObject,_AbstractConstraint);var _super=_createSuper(IsObject);function IsObject(){_classCallCheck(this,IsObject);return _super.apply(this,arguments)}_createClass(IsObject,[{key:"isValid",value:function isValid(value){if((0,_is.isObject)(value)){return Promise.resolve(value)}return Promise.reject(value)}}]);return IsObject}(_abstract.AbstractConstraint);exports.IsObject=IsObject;_abstract.Monster.assignToNamespace("Monster.Constraints",IsObject)},{"../types/is.js":30,"./abstract.js":1}],7:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _abstractoperator.Monster}});exports.OrOperator=void 0;var _abstractoperator=require("./abstractoperator.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var OrOperator=function(_AbstractOperator){_inherits(OrOperator,_AbstractOperator);var _super=_createSuper(OrOperator);function OrOperator(){_classCallCheck(this,OrOperator);return _super.apply(this,arguments)}_createClass(OrOperator,[{key:"isValid",value:function isValid(value){var self=this;return new Promise(function(resolve,reject){var a,b;self.operantA.isValid(value).then(function(){resolve()})["catch"](function(){a=false;if(b===false){reject()}});self.operantB.isValid(value).then(function(){resolve()})["catch"](function(){b=false;if(a===false){reject()}})})}}]);return OrOperator}(_abstractoperator.AbstractOperator);exports.OrOperator=OrOperator;_abstractoperator.Monster.assignToNamespace("Monster.Constraints",OrOperator)},{"./abstractoperator.js":2}],8:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _abstract.Monster}});exports.Valid=void 0;var _abstract=require("./abstract.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Valid=function(_AbstractConstraint){_inherits(Valid,_AbstractConstraint);var _super=_createSuper(Valid);function Valid(){_classCallCheck(this,Valid);return _super.apply(this,arguments)}_createClass(Valid,[{key:"isValid",value:function isValid(value){return Promise.resolve(value)}}]);return Valid}(_abstract.AbstractConstraint);exports.Valid=Valid;_abstract.Monster.assignToNamespace("Monster.Constraints",Valid)},{"./abstract.js":1}],9:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.Diff=Diff;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _is.Monster}});var _is=require("../types/is.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function Diff(first,second){return doDiff(first,second)}function getKeys(a,b,type){if((0,_is.isArray)(type)){var keys=a.length>b.length?new Array(a.length):new Array(b.length);keys.fill(0);return new Set(keys.map(function(_,i){return i}))}return new Set(Object.keys(a).concat(Object.keys(b)))}function doDiff(a,b,path,diff){var typeA=_typeof(a);var typeB=_typeof(b);var currPath=path||[];var currDiff=diff||[];if(typeA===typeB&&typeA==="object"){getKeys(a,b,typeA).forEach(function(v){if(!Object.prototype.hasOwnProperty.call(a,v)){currDiff.push(buildResult(a[v],b[v],"add",currPath.concat(v)))}else if(!Object.prototype.hasOwnProperty.call(b,v)){currDiff.push(buildResult(a[v],b[v],"delete",currPath.concat(v)))}else{doDiff(a[v],b[v],currPath.concat(v),currDiff)}})}else{var o=getOperator(a,b,typeA,typeB);if(o!==undefined){currDiff.push(buildResult(a,b,o,path))}}return currDiff}function buildResult(a,b,operator,path){var result={operator:operator,path:path};if(operator!=="add"){result.first={value:a,type:_typeof(a)};if((0,_is.isObject)(a)){var _Object$getPrototypeO,_Object$getPrototypeO2;var name=(_Object$getPrototypeO=Object.getPrototypeOf(a))===null||_Object$getPrototypeO===void 0?void 0:(_Object$getPrototypeO2=_Object$getPrototypeO.constructor)===null||_Object$getPrototypeO2===void 0?void 0:_Object$getPrototypeO2.name;if(name!==undefined){result.first.instance=name}}}if(operator==="add"||operator==="update"){result.second={value:b,type:_typeof(b)};if((0,_is.isObject)(b)){var _Object$getPrototypeO3,_Object$getPrototypeO4;var _name=(_Object$getPrototypeO3=Object.getPrototypeOf(b))===null||_Object$getPrototypeO3===void 0?void 0:(_Object$getPrototypeO4=_Object$getPrototypeO3.constructor)===null||_Object$getPrototypeO4===void 0?void 0:_Object$getPrototypeO4.name;if(_name!==undefined){result.second.instance=_name}}}return result}function isNotEqual(a,b){if(_typeof(a)!==_typeof(b)){return true}if(a instanceof Date&&b instanceof Date){return a.getTime()!==b.getTime()}return a!==b}function getOperator(a,b){var operator;var typeA=_typeof(a);var typeB=_typeof(b);if(typeA==="undefined"&&typeB!=="undefined"){operator="add"}else if(typeA!=="undefined"&&typeB==="undefined"){operator="delete"}else if(isNotEqual(a,b)){operator="update"}return operator}_is.Monster.assignToNamespace("Monster.Data",Diff)},{"../types/is.js":30}],10:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Pathfinder=void 0;var _namespace=require("../namespace.js");var _is=require("../types/is.js");var _validate=require("../types/validate.js");var _base=require("../types/base.js");var _stack=require("../types/stack.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter)}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function _iterableToArrayLimit(arr,i){var _i=arr==null?null:typeof Symbol!=="undefined"&&arr[Symbol.iterator]||arr["@@iterator"];if(_i==null)return;var _arr=[];var _n=true;var _d=false;var _s,_e;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break}}catch(err){_d=true;_e=err}finally{try{if(!_n&&_i["return"]!=null)_i["return"]()}finally{if(_d)throw _e}}return _arr}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var DELIMITER=".";var WILDCARD="*";var Pathfinder=function(_Base){_inherits(Pathfinder,_Base);var _super=_createSuper(Pathfinder);function Pathfinder(object){var _this;_classCallCheck(this,Pathfinder);_this=_super.call(this);_this.object=object;_this.wildCard=WILDCARD;return _this}_createClass(Pathfinder,[{key:"setWildCard",value:function setWildCard(wildcard){(0,_validate.validateString)(wildcard);this.wildCard=wildcard;return this}},{key:"getVia",value:function getVia(path){(0,_validate.validateString)(path);return getValueViaPath.call(this,this.object,path)}},{key:"setVia",value:function setVia(path,value){(0,_validate.validateString)(path);setValueViaPath.call(this,this.object,path,value);return this}},{key:"deleteVia",value:function deleteVia(path){(0,_validate.validateString)(path);deleteValueViaPath.call(this,this.object,path);return this}},{key:"exists",value:function exists(path){(0,_validate.validateString)(path);try{getValueViaPath.call(this,this.object,path,true);return true}catch(e){}return false}}]);return Pathfinder}(_base.Base);exports.Pathfinder=Pathfinder;_namespace.Monster.assignToNamespace("Monster.Data",Pathfinder);function iterate(subject,path,check){var result=new Map;if((0,_is.isObject)(subject)||(0,_is.isArray)(subject)){for(var _i=0,_Object$entries=Object.entries(subject);_i<_Object$entries.length;_i++){var _Object$entries$_i=_slicedToArray(_Object$entries[_i],2),key=_Object$entries$_i[0],value=_Object$entries$_i[1];result.set(key,getValueViaPath.call(this,value,path,check))}}else{var _key=path.split(DELIMITER).shift();result.set(_key,getValueViaPath.call(this,subject,path,check))}return result}function getValueViaPath(subject,path,check){if(path===""){return subject}var parts=path.split(DELIMITER);var current=parts.shift();if(current===this.wildCard){return iterate.call(this,subject,parts.join(DELIMITER),check)}if((0,_is.isObject)(subject)||(0,_is.isArray)(subject)){var anchor;if(subject instanceof Map||subject instanceof WeakMap){anchor=subject.get(current)}else if(subject instanceof Set||subject instanceof WeakSet){var _ref;current=parseInt(current);(0,_validate.validateInteger)(current);anchor=(_ref=_toConsumableArray(subject))===null||_ref===void 0?void 0:_ref[current]}else if(subject instanceof WeakRef){throw Error("unsupported action for this data type")}else if((0,_is.isArray)(subject)){current=parseInt(current);(0,_validate.validateInteger)(current);anchor=subject===null||subject===void 0?void 0:subject[current]}else{anchor=subject===null||subject===void 0?void 0:subject[current]}if((0,_is.isObject)(anchor)||(0,_is.isArray)(anchor)){return getValueViaPath.call(this,anchor,parts.join(DELIMITER),check)}if(parts.length>0){throw Error("the journey is not at its end ("+parts.join(DELIMITER)+")")}if(check===true&&!subject.hasOwnProperty(current)){throw Error("unknown value")}return anchor}throw TypeError("unsupported type "+_typeof(subject))}function setValueViaPath(object,path,value){(0,_validate.validateString)(path);var parts=path.split(DELIMITER);var last=parts.pop();var subpath=parts.join(DELIMITER);var stack=new _stack.Stack;var current=subpath;while(true){try{getValueViaPath.call(this,object,current,true);break}catch(e){}stack.push(current);parts.pop();current=parts.join(DELIMITER);if(current==="")break}while(!stack.isEmpty()){current=stack.pop();var obj={};if(!stack.isEmpty()){var n=stack.peek().split(DELIMITER).pop();if((0,_is.isInteger)(parseInt(n))){obj=[]}}setValueViaPath.call(this,object,current,obj)}var anchor=getValueViaPath.call(this,object,subpath);if(!(0,_is.isObject)(object)&&!(0,_is.isArray)(object)){throw TypeError("unsupported type: "+_typeof(object))}if(anchor instanceof Map||anchor instanceof WeakMap){anchor.set(last,value)}else if(anchor instanceof Set||anchor instanceof WeakSet){anchor.append(value)}else if(anchor instanceof WeakRef){throw Error("unsupported action for this data type")}else if((0,_is.isArray)(anchor)){last=parseInt(last);(0,_validate.validateInteger)(last);anchor[last]=value}else{anchor[last]=value}return}function deleteValueViaPath(object,path){var parts=path.split(DELIMITER);var last=parts.pop();var subpath=parts.join(DELIMITER);var anchor=getValueViaPath.call(this,object,subpath);if(anchor instanceof Map){anchor["delete"](last)}else if(anchor instanceof Set||anchor instanceof WeakMap||anchor instanceof WeakSet||anchor instanceof WeakRef){throw Error("unsupported action for this data type")}else if((0,_is.isArray)(anchor)){last=parseInt(last);(0,_validate.validateInteger)(last);delete anchor[last]}else{delete anchor[last]}return}},{"../namespace.js":26,"../types/base.js":27,"../types/is.js":30,"../types/stack.js":36,"../types/validate.js":39}],11:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Pipe=void 0;var _namespace=require("../namespace.js");var _transformer=require("./transformer.js");var _base=require("../types/base.js");var _validate=require("../types/validate.js");function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function _iterableToArrayLimit(arr,i){var _i=arr==null?null:typeof Symbol!=="undefined"&&arr[Symbol.iterator]||arr["@@iterator"];if(_i==null)return;var _arr=[];var _n=true;var _d=false;var _s,_e;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break}}catch(err){_d=true;_e=err}finally{try{if(!_n&&_i["return"]!=null)_i["return"]()}finally{if(_d)throw _e}}return _arr}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var DELIMITER="|";var Pipe=function(_Base){_inherits(Pipe,_Base);var _super=_createSuper(Pipe);function Pipe(pipe){var _this;_classCallCheck(this,Pipe);_this=_super.call(this);(0,_validate.validateString)(pipe);_this.pipe=pipe.split(DELIMITER).map(function(v){return new _transformer.Transformer(v)});return _this}_createClass(Pipe,[{key:"setCallback",value:function setCallback(name,callback){for(var _i=0,_Object$entries=Object.entries(this.pipe);_i<_Object$entries.length;_i++){var _Object$entries$_i=_slicedToArray(_Object$entries[_i],2),t=_Object$entries$_i[1];t.setCallback(name,callback)}return this}},{key:"run",value:function run(value){return this.pipe.reduce(function(accumulator,transformer,currentIndex,array){return transformer.run(accumulator)},value)}}]);return Pipe}(_base.Base);exports.Pipe=Pipe;_namespace.Monster.assignToNamespace("Monster.Data",Pipe)},{"../namespace.js":26,"../types/base.js":27,"../types/validate.js":39,"./transformer.js":12}],12:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Transformer=void 0;var _namespace=require("../namespace.js");var _base=require("../types/base.js");var _validate=require("../types/validate.js");var _is=require("../types/is.js");var _id=require("../types/id.js");var _clone=require("../util/clone.js");var _pathfinder=require("./pathfinder.js");function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter)}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();normalCompletion=step.done;return step},e:function e(_e2){didErr=true;err=_e2},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function _wrapRegExp(){_wrapRegExp=function _wrapRegExp(re,groups){return new BabelRegExp(re,undefined,groups)};var _super=RegExp.prototype;var _groups=new WeakMap;function BabelRegExp(re,flags,groups){var _this=new RegExp(re,flags);_groups.set(_this,groups||_groups.get(re));return _setPrototypeOf(_this,BabelRegExp.prototype)}_inherits(BabelRegExp,RegExp);BabelRegExp.prototype.exec=function(str){var result=_super.exec.call(this,str);if(result)result.groups=buildGroups(result,this);return result};BabelRegExp.prototype[Symbol.replace]=function(str,substitution){if(typeof substitution==="string"){var groups=_groups.get(this);return _super[Symbol.replace].call(this,str,substitution.replace(/\$<([^>]+)>/g,function(_,name){return"$"+groups[name]}))}else if(typeof substitution==="function"){var _this=this;return _super[Symbol.replace].call(this,str,function(){var args=arguments;if(_typeof(args[args.length-1])!=="object"){args=[].slice.call(args);args.push(buildGroups(args,_this))}return substitution.apply(this,args)})}else{return _super[Symbol.replace].call(this,str,substitution)}};function buildGroups(result,re){var g=_groups.get(re);return Object.keys(g).reduce(function(groups,name){groups[name]=result[g[name]];return groups},Object.create(null))}return _wrapRegExp.apply(this,arguments)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Transformer=function(_Base){_inherits(Transformer,_Base);var _super=_createSuper(Transformer);function Transformer(definition){var _this;_classCallCheck(this,Transformer);_this=_super.call(this);(0,_validate.validateString)(definition);_this.args=disassemble(definition);_this.command=_this.args.shift();_this.callbacks=new Map;return _this}_createClass(Transformer,[{key:"setCallback",value:function setCallback(name,callback){(0,_validate.validateString)(name);(0,_validate.validateFunction)(callback);this.callbacks.set(name,callback);return this}},{key:"run",value:function run(value){return transform.apply(this,[value])}}]);return Transformer}(_base.Base);exports.Transformer=Transformer;_namespace.Monster.assignToNamespace("Monster.Data",Transformer);function disassemble(command){(0,_validate.validateString)(command);var placeholder=new Map;var regex=_wrapRegExp(/((\\(.)){1})/gim,{pattern:2,char:3});var result=command.matchAll(regex);var _iterator=_createForOfIteratorHelper(result),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var m=_step.value;var g=m===null||m===void 0?void 0:m["groups"];if(!(0,_is.isObject)(g)){continue}var p=g===null||g===void 0?void 0:g["pattern"];var c=g===null||g===void 0?void 0:g["char"];if(p&&c){var r="__"+(new _id.ID).toString()+"__";placeholder.set(r,c);command=command.replace(p,r)}}}catch(err){_iterator.e(err)}finally{_iterator.f()}var parts=command.split(":");parts=parts.map(function(value){var v=value.trim();var _iterator2=_createForOfIteratorHelper(placeholder),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var k=_step2.value;v=v.replace(k[0],k[1])}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}return v});return parts}function convertToString(value){if((0,_is.isObject)(value)&&value.hasOwnProperty("toString")){value=value.toString()}(0,_validate.validateString)(value);return value}function transform(value){var args=(0,_clone.clone)(this.args);var key;switch(this.command){case"static":return this.args.join(":");case"tolower":case"strtolower":case"tolowercase":(0,_validate.validateString)(value);return value.toLowerCase();case"toupper":case"strtoupper":case"touppercase":(0,_validate.validateString)(value);return value.toUpperCase();case"tostring":return""+value;case"tointeger":var n=parseInt(value);(0,_validate.validateInteger)(n);return n;case"tojson":return JSON.stringify(value);case"trim":(0,_validate.validateString)(value);return value.trim();case"rawurlencode":(0,_validate.validateString)(value);return encodeURIComponent(value).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A");case"call":var callback;var callbackName=args.shift();if((0,_is.isObject)(value)&&value.hasOwnProperty(callbackName)){callback=value[callbackName]}else if(this.callbacks.has(callbackName)){callback=this.callbacks.get(callbackName)}else if((typeof window==="undefined"?"undefined":_typeof(window))==="object"&&window.hasOwnProperty(callbackName)){callback=window[callbackName]}(0,_validate.validateFunction)(callback);args.unshift(value);return callback.apply(void 0,_toConsumableArray(args));case"plain":case"plaintext":(0,_validate.validateString)(value);var doc=(new DOMParser).parseFromString(value,"text/html");return doc.body.textContent||"";case"if":case"?":(0,_validate.validatePrimitive)(value);var trueStatement=args.shift()||undefined;var falseStatement=args.shift()||undefined;if(trueStatement==="value"){trueStatement=value}if(trueStatement==="\\value"){trueStatement="value"}if(falseStatement==="value"){falseStatement=value}if(falseStatement==="\\value"){falseStatement="value"}var condition=value!==undefined&&value!==""&&value!=="off"&&value!=="false"&&value!==false||value==="on"||value==="true"||value===true;return condition?trueStatement:falseStatement;case"ucfirst":(0,_validate.validateString)(value);var firstchar=value.charAt(0).toUpperCase();return firstchar+value.substr(1);case"ucwords":(0,_validate.validateString)(value);return value.replace(/^([a-z\u00E0-\u00FC])|\s+([a-z\u00E0-\u00FC])/g,function(v){return v.toUpperCase()});case"count":case"length":if(((0,_is.isString)(value)||(0,_is.isObject)(value)||(0,_is.isArray)(value))&&value.hasOwnProperty("length")){return value.length}throw new TypeError("unsupported type");case"base64":convertToString(value);return btoa(value);case"empty":return"";case"undefined":return undefined;case"prefix":(0,_validate.validateString)(value);var prefix=args===null||args===void 0?void 0:args[0];return prefix+value;case"suffix":(0,_validate.validateString)(value);var suffix=args===null||args===void 0?void 0:args[0];return value+suffix;case"uniqid":return(new _id.ID).toString();case"key":case"property":case"index":key=args.shift()||"undefined";var defaultValue=args.shift()||"";if(value instanceof Map){if(!value.has(key)){return defaultValue}return value.get(key)}if((0,_is.isObject)(value)||(0,_is.isArray)(value)){if(value!==null&&value!==void 0&&value[key]){return value===null||value===void 0?void 0:value[key]}return defaultValue}throw new Error("type not supported");case"path":key=args.shift()||"undefined";return new _pathfinder.Pathfinder(value).getVia(key);case"substring":(0,_validate.validateString)(value);var start=parseInt(args[0])||0;var end=(parseInt(args[1])||0)+start;return value.substring(start,end);case"nop":return value;default:throw new Error("unknown command "+this.command)}return value}},{"../namespace.js":26,"../types/base.js":27,"../types/id.js":29,"../types/is.js":30,"../types/validate.js":39,"../util/clone.js":41,"./pathfinder.js":10}],13:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _base.Monster}});exports.Assembler=exports.ATTRIBUTEPREFIX=void 0;var _base=require("../types/base.js");var _validate=require("../types/validate.js");var _global=require("../types/global.js");var _proxyobserver=require("../types/proxyobserver.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var ATTRIBUTEPREFIX="data-monster-";exports.ATTRIBUTEPREFIX=ATTRIBUTEPREFIX;var Assembler=function(_Base){_inherits(Assembler,_Base);var _super=_createSuper(Assembler);function Assembler(fragment){var _this;_classCallCheck(this,Assembler);_this=_super.call(this);_this.attributePrefix=ATTRIBUTEPREFIX;(0,_validate.validateInstance)(fragment,(0,_global.getGlobalFunction)("DocumentFragment"));_this.fragment=fragment;return _this}_createClass(Assembler,[{key:"setAttributePrefix",value:function setAttributePrefix(prefix){(0,_validate.validateString)(prefix);this.attributePrefix=prefix;return this}},{key:"getAttributePrefix",value:function getAttributePrefix(){return this.attributePrefix}},{key:"createDocumentFragment",value:function createDocumentFragment(data){if(data===undefined){data=new _proxyobserver.ProxyObserver({})}(0,_validate.validateInstance)(data,_proxyobserver.ProxyObserver);var fragment=this.fragment.cloneNode(true);return fragment}}]);return Assembler}(_base.Base);exports.Assembler=Assembler;_base.Monster.assignToNamespace("Monster.DOM",Assembler)},{"../types/base.js":27,"../types/global.js":28,"../types/proxyobserver.js":33,"../types/validate.js":39}],14:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.ATTRIBUTE_UPDATER_REMOVE=exports.ATTRIBUTE_UPDATER_INSERT_REFERENCE=exports.ATTRIBUTE_UPDATER_INSERT=exports.ATTRIBUTE_UPDATER_REPLACE=exports.ATTRIBUTE_UPDATER_ATTRIBUTES=exports.ATTRIBUTE_THEME_NAME=exports.ATTRIBUTE_THEME_PREFIX=exports.DEFAULT_THEME=exports.ATTRIBUTE_OPTIONS=exports.ATTRIBUTE_PREFIX=void 0;var _namespace=require("../namespace.js");var ATTRIBUTE_PREFIX="data-monster-";exports.ATTRIBUTE_PREFIX=ATTRIBUTE_PREFIX;var ATTRIBUTE_OPTIONS=ATTRIBUTE_PREFIX+"options";exports.ATTRIBUTE_OPTIONS=ATTRIBUTE_OPTIONS;var DEFAULT_THEME="monster";exports.DEFAULT_THEME=DEFAULT_THEME;var ATTRIBUTE_THEME_PREFIX=ATTRIBUTE_PREFIX+"theme-";exports.ATTRIBUTE_THEME_PREFIX=ATTRIBUTE_THEME_PREFIX;var ATTRIBUTE_THEME_NAME=ATTRIBUTE_THEME_PREFIX+"name";exports.ATTRIBUTE_THEME_NAME=ATTRIBUTE_THEME_NAME;var ATTRIBUTE_UPDATER_ATTRIBUTES=ATTRIBUTE_PREFIX+"attributes";exports.ATTRIBUTE_UPDATER_ATTRIBUTES=ATTRIBUTE_UPDATER_ATTRIBUTES;var ATTRIBUTE_UPDATER_REPLACE=ATTRIBUTE_PREFIX+"replace";exports.ATTRIBUTE_UPDATER_REPLACE=ATTRIBUTE_UPDATER_REPLACE;var ATTRIBUTE_UPDATER_INSERT=ATTRIBUTE_PREFIX+"insert";exports.ATTRIBUTE_UPDATER_INSERT=ATTRIBUTE_UPDATER_INSERT;var ATTRIBUTE_UPDATER_INSERT_REFERENCE=ATTRIBUTE_PREFIX+"insert-reference";exports.ATTRIBUTE_UPDATER_INSERT_REFERENCE=ATTRIBUTE_UPDATER_INSERT_REFERENCE;var ATTRIBUTE_UPDATER_REMOVE=ATTRIBUTE_PREFIX+"remove";exports.ATTRIBUTE_UPDATER_REMOVE=ATTRIBUTE_UPDATER_REMOVE},{"../namespace.js":26}],15:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});exports.registerCustomElement=registerCustomElement;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _validate.Monster}});exports.CustomElement=void 0;var _constants=require("./constants.js");var _template=require("./template.js");var _global=require("../types/global.js");var _validate=require("../types/validate.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _wrapNativeSuper(Class){var _cache=typeof Map==="function"?new Map:undefined;_wrapNativeSuper=function _wrapNativeSuper(Class){if(Class===null||!_isNativeFunction(Class))return Class;if(typeof Class!=="function"){throw new TypeError("Super expression must either be null or a function")}if(typeof _cache!=="undefined"){if(_cache.has(Class))return _cache.get(Class);_cache.set(Class,Wrapper)}function Wrapper(){return _construct(Class,arguments,_getPrototypeOf(this).constructor)}Wrapper.prototype=Object.create(Class.prototype,{constructor:{value:Wrapper,enumerable:false,writable:true,configurable:true}});return _setPrototypeOf(Wrapper,Class)};return _wrapNativeSuper(Class)}function _construct(Parent,args,Class){if(_isNativeReflectConstruct()){_construct=Reflect.construct}else{_construct=function _construct(Parent,args,Class){var a=[null];a.push.apply(a,args);var Constructor=Function.bind.apply(Parent,a);var instance=new Constructor;if(Class)_setPrototypeOf(instance,Class.prototype);return instance}}return _construct.apply(null,arguments)}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _isNativeFunction(fn){return Function.toString.call(fn).indexOf("[native code]")!==-1}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var CustomElement=function(_HTMLElement){_inherits(CustomElement,_HTMLElement);var _super=_createSuper(CustomElement);function CustomElement(){var _this;_classCallCheck(this,CustomElement);_this=_super.call(this);_this._options=Object.assign({},_this.defaults,getOptionsFromAttributes.call(_assertThisInitialized(_this)));_this.init();return _this}_createClass(CustomElement,[{key:"defaults",get:function get(){return{shadowMode:"open",delegatesFocus:true}}},{key:"getOption",value:function getOption(key,defaultValue){var _this$_options;(0,_validate.validateString)(key);var v=(_this$_options=this._options)===null||_this$_options===void 0?void 0:_this$_options[key];if(v===undefined)return defaultValue;return v}},{key:"init",value:function init(){initShadowRoot.call(this);return this}},{key:"assemble",value:function assemble(){return this}},{key:"disassemble",value:function disassemble(){return this}},{key:"connectedCallback",value:function connectedCallback(){this.assemble()}},{key:"disconnectedCallback",value:function disconnectedCallback(){this.disassemble()}},{key:"adoptedCallback",value:function adoptedCallback(){}},{key:"attributeChangedCallback",value:function attributeChangedCallback(attrName,oldVal,newVal){this.assemble()}}],[{key:"getTemplate",value:function getTemplate(){throw new Error("the method getTemplate must be overwritten by the derived class.")}},{key:"getTag",value:function getTag(){throw new Error("the method getTag must be overwritten by the derived class.")}},{key:"getCSSStyleSheet",value:function getCSSStyleSheet(){return new CSSStyleSheet}}]);return CustomElement}(_wrapNativeSuper(HTMLElement));exports.CustomElement=CustomElement;function getOptionsFromAttributes(){if(this.hasAttribute(_constants.ATTRIBUTE_OPTIONS)){try{var obj=JSON.parse(this.getAttribute(_constants.ATTRIBUTE_OPTIONS));(0,_validate.validateObject)(obj);return obj}catch(e){throw new Error("the options attribute "+_constants.ATTRIBUTE_OPTIONS+" does not contain a valid json definition (actual: "+this.getAttribute(_constants.ATTRIBUTE_OPTIONS)+").")}}return{}}function initShadowRoot(){this.attachShadow({mode:this.getOption("shadowMode","open"),delegatesFocus:this.getOption("delegatesFocus",true)});var styleSheet=this.constructor.getCSSStyleSheet();if(styleSheet instanceof CSSStyleSheet){this.shadowRoot.adoptedStyleSheets=[styleSheet]}try{var template=(0,_template.findDocumentTemplate)(this.constructor.getTag());this.shadowRoot.appendChild(template.createDocumentFragment())}catch(e){this.shadowRoot.innerHTML=this.constructor.getTemplate()}return this}function registerCustomElement(element){(0,_validate.validateFunction)(element);var tag=element.getTag();(0,_global.getGlobalObject)("customElements").define(element.getTag(),element);return}_validate.Monster.assignToNamespace("Monster.DOM",CustomElement,registerCustomElement)},{"../types/global.js":28,"../types/validate.js":39,"./constants.js":14,"./template.js":17}],16:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});exports.getHandleFromNode=getHandleFromNode;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _base.Monster}});exports.Handle=void 0;var _base=require("../types/base.js");var _stack=require("../types/stack.js");var _validate=require("../types/validate.js");var _proxyobserver=require("../types/proxyobserver.js");var _observer=require("../types/observer.js");var _global=require("../types/global.js");var _is=require("../types/is.js");var _assembler=require("./assembler.js");var _id=require("../types/id.js");function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();normalCompletion=step.done;return step},e:function e(_e2){didErr=true;err=_e2},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var MONSTERDOMHANDLE=Symbol("MonsterHandle");var Handle=function(_Base){_inherits(Handle,_Base);var _super=_createSuper(Handle);function Handle(data){var _this;_classCallCheck(this,Handle);_this=_super.call(this);var self=_assertThisInitialized(_this);self.id=new _id.ID;(0,_validate.validateInstance)(data,_proxyobserver.ProxyObserver);_this.data=data;_this.mutationObserver=createMutationObserver.call(_assertThisInitialized(_this));_this.dataObserver=createDataObserver.call(_assertThisInitialized(_this));_this.data.attachObserver(_this.dataObserver);_this.nodes=new WeakSet;_this.updates=new _stack.Stack;return _this}_createClass(Handle,[{key:"update",value:function update(){return}},{key:"remove",value:function remove(node){if((0,_is.isInstance)(node,(0,_global.getGlobalFunction)("Document"))){node=node.firstElementChild}(0,_validate.validateInstance)(node,(0,_global.getGlobalFunction)("HTMLElement"));if(!this.nodes.has(node)){return this}this.mutationObserver.disconnect(node);delete node.dataset[MONSTERDOMHANDLE];node.removeAttribute(_assembler.ATTRIBUTEPREFIX+"handler");return this}},{key:"append",value:function append(node){if((0,_is.isInstance)(node,(0,_global.getGlobalFunction)("Document"))){node=node.firstElementChild}(0,_validate.validateInstance)(node,(0,_global.getGlobalFunction)("HTMLElement"));if(this.nodes.has(node)){return this}node.dataset[MONSTERDOMHANDLE]=this;node.setAttribute(_assembler.ATTRIBUTEPREFIX+"handler",true);this.mutationObserver.observe(node,{attributes:true,childList:true,subtree:true,characterData:true,characterDataOldValue:true,attributeOldValue:true});this.nodes.add(node);return this}}]);return Handle}(_base.Base);exports.Handle=Handle;function createDataObserver(){var self=this;return new _observer.Observer(function(){self.update()})}function createMutationObserver(){var self=this;var MutationObserver=(0,_global.getGlobalFunction)("MutationObserver");return new MutationObserver(function(mutationsList,observer){var _iterator=_createForOfIteratorHelper(mutationsList),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var mutation=_step.value;self.updates.push(mutation)}}catch(err){_iterator.e(err)}finally{_iterator.f()}self.update()})}function getHandleFromNode(node){var _node$dataset;(0,_validate.validateInstance)(node,(0,_global.getGlobalFunction)("Node"));var handle=(_node$dataset=node.dataset)===null||_node$dataset===void 0?void 0:_node$dataset[MONSTERDOMHANDLE];if(handle===undefined){var parentNode=node===null||node===void 0?void 0:node["parentNode"];if((0,_is.isInstance)(parentNode,(0,_global.getGlobalFunction)("Node"))){return getHandleFromNode(parentNode)}}return handle}_base.Monster.assignToNamespace("Monster.DOM",getHandleFromNode,Handle)},{"../types/base.js":27,"../types/global.js":28,"../types/id.js":29,"../types/is.js":30,"../types/observer.js":31,"../types/proxyobserver.js":33,"../types/stack.js":36,"../types/validate.js":39,"./assembler.js":13}],17:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});exports.findDocumentTemplate=findDocumentTemplate;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _base.Monster}});exports.Template=void 0;var _base=require("../types/base.js");var _validate=require("../types/validate.js");var _global=require("../types/global.js");var _theme=require("./theme.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Template=function(_Base){_inherits(Template,_Base);var _super=_createSuper(Template);function Template(template){var _this;_classCallCheck(this,Template);_this=_super.call(this);var HTMLTemplateElement=(0,_global.getGlobalFunction)("HTMLTemplateElement");(0,_validate.validateInstance)(template,HTMLTemplateElement);_this.template=template;return _this}_createClass(Template,[{key:"getTemplateElement",value:function getTemplateElement(){return this.template}},{key:"createDocumentFragment",value:function createDocumentFragment(){return this.template.content.cloneNode(true)}}]);return Template}(_base.Base);exports.Template=Template;function findDocumentTemplate(id){(0,_validate.validateString)(id);var document=(0,_global.getGlobalObject)("document");var HTMLTemplateElement=(0,_global.getGlobalFunction)("HTMLTemplateElement");var theme=(0,_theme.getDocumentTheme)();var themedID=id+"-"+theme.getName();var template=document.getElementById(themedID);if(template instanceof HTMLTemplateElement){return new Template(template)}template=document.getElementById(id);if(template instanceof HTMLTemplateElement){return new Template(template)}throw new Error("template "+id+" not found.")}_base.Monster.assignToNamespace("Monster.DOM",Template,findDocumentTemplate)},{"../types/base.js":27,"../types/global.js":28,"../types/validate.js":39,"./theme.js":18}],18:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});exports.getDocumentTheme=getDocumentTheme;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _base.Monster}});exports.Theme=void 0;var _base=require("../types/base.js");var _validate=require("../types/validate.js");var _global=require("../types/global.js");var _constants=require("./constants.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Theme=function(_Base){_inherits(Theme,_Base);var _super=_createSuper(Theme);function Theme(name){var _this;_classCallCheck(this,Theme);_this=_super.call(this);(0,_validate.validateString)(name);_this.name=name;return _this}_createClass(Theme,[{key:"getName",value:function getName(){return this.name}}]);return Theme}(_base.Base);exports.Theme=Theme;function getDocumentTheme(){var document=(0,_global.getGlobalObject)("document");var name=_constants.DEFAULT_THEME;var element=document.querySelector("html");if(element instanceof HTMLElement){var theme=element.getAttribute(_constants.ATTRIBUTE_THEME_NAME);if(theme){name=theme}}return new Theme(name)}_base.Monster.assignToNamespace("Monster.DOM",Theme,getDocumentTheme)},{"../types/base.js":27,"../types/global.js":28,"../types/validate.js":39,"./constants.js":14}],19:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getWindow=getWindow;exports.getDocument=getDocument;exports.getDocumentFragmentFromString=getDocumentFragmentFromString;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _global.Monster}});var _global=require("../types/global.js");var _validate=require("../types/validate.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function getDocument(){var _getGlobal;var document=(_getGlobal=(0,_global.getGlobal)())===null||_getGlobal===void 0?void 0:_getGlobal["document"];if(_typeof(document)!=="object"){throw new Error("not supported environment")}return document}function getWindow(){var _getGlobal2;var window=(_getGlobal2=(0,_global.getGlobal)())===null||_getGlobal2===void 0?void 0:_getGlobal2["window"];if(_typeof(window)!=="object"){throw new Error("not supported environment")}return window}function getDocumentFragmentFromString(html){(0,_validate.validateString)(html);var document=getDocument();var template=document.createElement("template");template.innerHTML=html;return template.content}_global.Monster.assignToNamespace("Monster.DOM",getWindow,getDocument,getDocumentFragmentFromString)},{"../types/global.js":28,"../types/validate.js":39}],20:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Handler=void 0;var _namespace=require("../namespace.js");var _base=require("../types/base.js");var _logger=require("./logger.js");var _logentry=require("./logentry.js");var _validate=require("../types/validate.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Handler=function(_Base){_inherits(Handler,_Base);var _super=_createSuper(Handler);function Handler(){var _this;_classCallCheck(this,Handler);_this=_super.call(this);_this.loglevel=_logger.OFF;return _this}_createClass(Handler,[{key:"log",value:function log(entry){(0,_validate.validateInstance)(entry,_logentry.LogEntry);if(this.loglevel<entry.getLogLevel()){return false}return true}},{key:"setLogLevel",value:function setLogLevel(loglevel){(0,_validate.validateInteger)(loglevel);this.loglevel=loglevel;return this}},{key:"getLogLevel",value:function getLogLevel(){return this.loglevel}},{key:"setAll",value:function setAll(){this.setLogLevel(_logger.ALL);return this}},{key:"setTrace",value:function setTrace(){this.setLogLevel(_logger.TRACE);return this}},{key:"setDebug",value:function setDebug(){this.setLogLevel(_logger.DEBUG);return this}},{key:"setInfo",value:function setInfo(){this.setLogLevel(_logger.INFO);return this}},{key:"setWarn",value:function setWarn(){this.setLogLevel(_logger.WARN);return this}},{key:"setError",value:function setError(){this.setLogLevel(_logger.ERROR);return this}},{key:"setFatal",value:function setFatal(){this.setLogLevel(_logger.FATAL);return this}},{key:"setOff",value:function setOff(){this.setLogLevel(_logger.OFF);return this}}]);return Handler}(_base.Base);exports.Handler=Handler;_namespace.Monster.assignToNamespace("Monster.Logging",Handler)},{"../namespace.js":26,"../types/base.js":27,"../types/validate.js":39,"./logentry.js":22,"./logger.js":23}],21:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});Object.defineProperty(exports,"Handler",{enumerable:true,get:function get(){return _handler.Handler}});var _namespace=require("../../namespace.js");var _base=require("../../types/base.js");var _handler=require("../../logging/handler.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var ConsoleHandler=function(_Base){_inherits(ConsoleHandler,_Base);var _super=_createSuper(ConsoleHandler);function ConsoleHandler(){_classCallCheck(this,ConsoleHandler);return _super.call(this)}return ConsoleHandler}(_base.Base);_namespace.Monster.assignToNamespace("Monster.Logging",ConsoleHandler)},{"../../logging/handler.js":20,"../../namespace.js":26,"../../types/base.js":27}],22:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.LogEntry=void 0;var _namespace=require("../namespace.js");var _validate=require("../types/validate.js");var _base=require("../types/base.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var LogEntry=function(_Base){_inherits(LogEntry,_Base);var _super=_createSuper(LogEntry);function LogEntry(loglevel){var _this;_classCallCheck(this,LogEntry);_this=_super.call(this);(0,_validate.validateInteger)(loglevel);_this.loglevel=loglevel;for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}_this.arguments=args;return _this}_createClass(LogEntry,[{key:"getLogLevel",value:function getLogLevel(){return this.loglevel}},{key:"getArguments",value:function getArguments(){return this.arguments}}]);return LogEntry}(_base.Base);exports.LogEntry=LogEntry;_namespace.Monster.assignToNamespace("Monster.Logging",LogEntry)},{"../namespace.js":26,"../types/base.js":27,"../types/validate.js":39}],23:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.OFF=exports.FATAL=exports.ERROR=exports.WARN=exports.INFO=exports.DEBUG=exports.TRACE=exports.ALL=exports.Logger=void 0;var _namespace=require("../namespace.js");var _validate=require("../types/validate.js");var _handler=require("../logging/handler.js");var _logentry=require("../logging/logentry.js");var _base=require("../types/base.js");function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();normalCompletion=step.done;return step},e:function e(_e2){didErr=true;err=_e2},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var ALL=255;exports.ALL=ALL;var TRACE=64;exports.TRACE=TRACE;var DEBUG=32;exports.DEBUG=DEBUG;var INFO=16;exports.INFO=INFO;var WARN=8;exports.WARN=WARN;var ERROR=4;exports.ERROR=ERROR;var FATAL=2;exports.FATAL=FATAL;var OFF=0;exports.OFF=OFF;var Logger=function(_Base){_inherits(Logger,_Base);var _super=_createSuper(Logger);function Logger(){var _this;_classCallCheck(this,Logger);_this=_super.call(this);_this.handler=new Set;return _this}_createClass(Logger,[{key:"addHandler",value:function addHandler(handler){(0,_validate.validateObject)(handler);if(!(handler instanceof _handler.Handler)){throw new Error("the handler must be an instance of Handler")}this.handler.add(handler);return this}},{key:"removeHandler",value:function removeHandler(handler){(0,_validate.validateObject)(handler);if(!(handler instanceof _handler.Handler)){throw new Error("the handler must be an instance of Handler")}this.handler["delete"](handler);return this}},{key:"logTrace",value:function logTrace(){triggerLog.apply(this,[TRACE].concat(Array.prototype.slice.call(arguments)));return this}},{key:"logDebug",value:function logDebug(){triggerLog.apply(this,[DEBUG].concat(Array.prototype.slice.call(arguments)));return this}},{key:"logInfo",value:function logInfo(){triggerLog.apply(this,[INFO].concat(Array.prototype.slice.call(arguments)));return this}},{key:"logWarn",value:function logWarn(){triggerLog.apply(this,[WARN].concat(Array.prototype.slice.call(arguments)));return this}},{key:"logError",value:function logError(){triggerLog.apply(this,[ERROR].concat(Array.prototype.slice.call(arguments)));return this}},{key:"logFatal",value:function logFatal(){triggerLog.apply(this,[FATAL].concat(Array.prototype.slice.call(arguments)));return this}},{key:"getLabel",value:function getLabel(level){(0,_validate.validateInteger)(level);if(level===ALL)return"ALL";if(level===TRACE)return"TRACE";if(level===DEBUG)return"DEBUG";if(level===INFO)return"INFO";if(level===WARN)return"WARN";if(level===ERROR)return"ERROR";if(level===FATAL)return"FATAL";if(level===OFF)return"OFF";return"unknown"}},{key:"getLevel",value:function getLevel(label){(0,_validate.validateString)(label);if(label==="ALL")return ALL;if(label==="TRACE")return TRACE;if(label==="DEBUG")return DEBUG;if(label==="INFO")return INFO;if(label==="WARN")return WARN;if(label==="ERROR")return ERROR;if(label==="FATAL")return FATAL;if(label==="OFF")return OFF;return 0}}]);return Logger}(_base.Base);exports.Logger=Logger;_namespace.Monster.assignToNamespace("Monster.Logging",Logger);function triggerLog(loglevel){var logger=this;for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}var _iterator=_createForOfIteratorHelper(logger.handler),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var handler=_step.value;handler.log(new _logentry.LogEntry(loglevel,args))}}catch(err){_iterator.e(err)}finally{_iterator.f()}return logger}},{"../logging/handler.js":20,"../logging/logentry.js":22,"../namespace.js":26,"../types/base.js":27,"../types/validate.js":39}],24:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.random=random;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _global.Monster}});var _global=require("../types/global.js");function random(min,max){if(min===undefined){min=0}if(max===undefined){max=MAX}if(max<min){throw new Error("max must be greater than min")}return Math.round(create(min,max))}var MAX=1e9;Math.log2=Math.log2||function(n){return Math.log(n)/Math.log(2)};function create(min,max){var crypt;var globalReference=(0,_global.getGlobal)();crypt=(globalReference===null||globalReference===void 0?void 0:globalReference["crypto"])||(globalReference===null||globalReference===void 0?void 0:globalReference["msCrypto"])||(globalReference===null||globalReference===void 0?void 0:globalReference["crypto"])||undefined;if(typeof crypt==="undefined"){throw new Error("missing crypt")}var rval=0;var range=max-min;if(range<2){return min}var bitsNeeded=Math.ceil(Math.log2(range));if(bitsNeeded>53){throw new Error("we cannot generate numbers larger than 53 bits.")}var bytesNeeded=Math.ceil(bitsNeeded/8);var mask=Math.pow(2,bitsNeeded)-1;var byteArray=new Uint8Array(bytesNeeded);crypt.getRandomValues(byteArray);var p=(bytesNeeded-1)*8;for(var i=0;i<bytesNeeded;i++){rval+=byteArray[i]*Math.pow(2,p);p-=8}rval=rval&mask;if(rval>=range){return create(min,max)}return min+rval}_global.Monster.assignToNamespace("Monster.Math",random)},{"../types/global.js":28}],25:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("./namespace.js");require("./types/base.js");require("./types/global.js");require("./types/id.js");require("./types/is.js");require("./types/observer.js");require("./types/observerlist.js");require("./types/proxyobserver.js");require("./types/queue.js");require("./types/randomid.js");require("./types/stack.js");require("./types/tokenlist.js");require("./types/uniquequeue.js");require("./types/validate.js");require("./types/version.js");require("./math/random.js");require("./data/diff.js");require("./data/pathfinder.js");require("./data/pipe.js");require("./data/transformer.js");require("./logging/handler.js");require("./logging/logentry.js");require("./logging/logger.js");require("./logging/handler/console.js");require("./util/clone.js");require("./util/comparator.js");require("./util/freeze.js");require("./constraints/abstract.js");require("./constraints/abstractoperator.js");require("./constraints/andoperator.js");require("./constraints/invalid.js");require("./constraints/isarray.js");require("./constraints/isobject.js");require("./constraints/oroperator.js");require("./constraints/valid.js");require("./dom/util.js");require("./dom/template.js");require("./dom/handle.js");require("./dom/assembler.js");require("./dom/customelement.js");_namespace.Monster.Util.deepFreeze(_namespace.Monster);var rootName;try{rootName=_namespace.Monster.Types.getGlobalObject("__MonsterRootName__")}catch(e){}if(!rootName)rootName="Monster";_namespace.Monster.Types.getGlobal()[rootName]=_namespace.Monster},{"./constraints/abstract.js":1,"./constraints/abstractoperator.js":2,"./constraints/andoperator.js":3,"./constraints/invalid.js":4,"./constraints/isarray.js":5,"./constraints/isobject.js":6,"./constraints/oroperator.js":7,"./constraints/valid.js":8,"./data/diff.js":9,"./data/pathfinder.js":10,"./data/pipe.js":11,"./data/transformer.js":12,"./dom/assembler.js":13,"./dom/customelement.js":15,"./dom/handle.js":16,"./dom/template.js":17,"./dom/util.js":19,"./logging/handler.js":20,"./logging/handler/console.js":21,"./logging/logentry.js":22,"./logging/logger.js":23,"./math/random.js":24,"./namespace.js":26,"./types/base.js":27,"./types/global.js":28,"./types/id.js":29,"./types/is.js":30,"./types/observer.js":31,"./types/observerlist.js":32,"./types/proxyobserver.js":33,"./types/queue.js":34,"./types/randomid.js":35,"./types/stack.js":36,"./types/tokenlist.js":37,"./types/uniquequeue.js":38,"./types/validate.js":39,"./types/version.js":40,"./util/clone.js":41,"./util/comparator.js":42,"./util/freeze.js":43}],26:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.assignToNamespace=assignToNamespace;exports.Monster=void 0;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}var Namespace=function(){function Namespace(namespace){_classCallCheck(this,Namespace);if(namespace===undefined||typeof namespace!=="string"){throw new Error("namespace is not a string")}this.namespace=namespace}_createClass(Namespace,[{key:"getNamespace",value:function getNamespace(){return this.namespace}},{key:"toString",value:function toString(){return this.getNamespace()}}]);return Namespace}();var Monster=new Namespace("Monster");exports.Monster=Monster;assignToNamespace("Monster",assignToNamespace);function assignToNamespace(ns){var current=namespaceFor(ns.split("."));for(var i=0,l=arguments.length<=1?0:arguments.length-1;i<l;i++){current[objectName(i+1<1||arguments.length<=i+1?undefined:arguments[i+1])]=i+1<1||arguments.length<=i+1?undefined:arguments[i+1]}}function objectName(fn){try{if(typeof fn!=="function"){throw new Error("the first argument is not a function or class.")}if(fn.hasOwnProperty("name")){return fn.name}if("function"===typeof fn.toString){var s=fn.toString();var f=s.match(/^\s*function\s+([^\s(]+)/);if(Array.isArray(f)&&typeof f[1]==="string"){return f[1]}var c=s.match(/^\s*class\s+([^\s(]+)/);if(Array.isArray(c)&&typeof c[1]==="string"){return c[1]}}}catch(e){throw new Error("exception "+e)}throw new Error("the name of the class or function cannot be resolved.")}function namespaceFor(parts){var space=Monster,ns="Monster";for(var i=0;i<parts.length;i++){if("Monster"===parts[i]){continue}ns+="."+parts[i];if(!space.hasOwnProperty(parts[i])){space[parts[i]]=new Namespace(ns)}space=space[parts[i]]}return space}},{}],27:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Base=void 0;var _namespace=require("../namespace.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _wrapNativeSuper(Class){var _cache=typeof Map==="function"?new Map:undefined;_wrapNativeSuper=function _wrapNativeSuper(Class){if(Class===null||!_isNativeFunction(Class))return Class;if(typeof Class!=="function"){throw new TypeError("Super expression must either be null or a function")}if(typeof _cache!=="undefined"){if(_cache.has(Class))return _cache.get(Class);_cache.set(Class,Wrapper)}function Wrapper(){return _construct(Class,arguments,_getPrototypeOf(this).constructor)}Wrapper.prototype=Object.create(Class.prototype,{constructor:{value:Wrapper,enumerable:false,writable:true,configurable:true}});return _setPrototypeOf(Wrapper,Class)};return _wrapNativeSuper(Class)}function _construct(Parent,args,Class){if(_isNativeReflectConstruct()){_construct=Reflect.construct}else{_construct=function _construct(Parent,args,Class){var a=[null];a.push.apply(a,args);var Constructor=Function.bind.apply(Parent,a);var instance=new Constructor;if(Class)_setPrototypeOf(instance,Class.prototype);return instance}}return _construct.apply(null,arguments)}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _isNativeFunction(fn){return Function.toString.call(fn).indexOf("[native code]")!==-1}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Base=function(_Object){_inherits(Base,_Object);var _super=_createSuper(Base);function Base(){_classCallCheck(this,Base);return _super.apply(this,arguments)}_createClass(Base,[{key:"toString",value:function toString(){return JSON.stringify(this)}}]);return Base}(_wrapNativeSuper(Object));exports.Base=Base;_namespace.Monster.assignToNamespace("Monster.Types",Base)},{"../namespace.js":26}],28:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getGlobal=getGlobal;exports.getGlobalObject=getGlobalObject;exports.getGlobalFunction=getGlobalFunction;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");var _validate=require("./validate.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}var globalReference;(function(){if((typeof globalThis==="undefined"?"undefined":_typeof(globalThis))==="object"){globalReference=globalThis;return}Object.defineProperty(Object.prototype,"__monster__",{get:function get(){return this},configurable:true});__monster__.globalThis=__monster__;delete Object.prototype.__monster__;globalReference=globalThis})();function getGlobal(){return globalReference}function getGlobalObject(name){var _globalReference;(0,_validate.validateString)(name);var o=(_globalReference=globalReference)===null||_globalReference===void 0?void 0:_globalReference[name];if(typeof o==="undefined")throw new Error("the object "+name+" is not defined");(0,_validate.validateObject)(o);return o}function getGlobalFunction(name){var _globalReference2;(0,_validate.validateString)(name);var f=(_globalReference2=globalReference)===null||_globalReference2===void 0?void 0:_globalReference2[name];if(typeof f==="undefined")throw new Error("the function "+name+" is not defined");(0,_validate.validateFunction)(f);return f}_namespace.Monster.assignToNamespace("Monster.Types",getGlobal,getGlobalObject,getGlobalFunction)},{"../namespace.js":26,"./validate.js":39}],29:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _base.Monster}});exports.ID=void 0;var _base=require("./base.js");var _validate=require("./validate.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var internalCounter=new Map;var ID=function(_Base){_inherits(ID,_Base);var _super=_createSuper(ID);function ID(prefix){var _this;_classCallCheck(this,ID);_this=_super.call(this);if(prefix===undefined){prefix="id"}(0,_validate.validateString)(prefix);if(!internalCounter.has(prefix)){internalCounter.set(prefix,1)}var count=internalCounter.get(prefix);_this.id=prefix+count;internalCounter.set(prefix,++count);return _this}_createClass(ID,[{key:"toString",value:function toString(){return this.id}}]);return ID}(_base.Base);exports.ID=ID;_base.Monster.assignToNamespace("Monster.Types",ID)},{"./base.js":27,"./validate.js":39}],30:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.isPrimitive=isPrimitive;exports.isBoolean=isBoolean;exports.isString=isString;exports.isObject=isObject;exports.isInstance=isInstance;exports.isArray=isArray;exports.isFunction=isFunction;exports.isIterable=isIterable;exports.isInteger=isInteger;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function isIterable(value){if(value===undefined)return false;if(value===null)return false;return typeof(value===null||value===void 0?void 0:value[Symbol.iterator])==="function"}function isPrimitive(value){var type;if(value===undefined||value===null||value===NaN){return true}type=_typeof(value);if(type==="string"||type==="number"||type==="boolean"||type==="symbol"){return true}return false}function isBoolean(value){if(value===true||value===false){return true}return false}function isString(value){if(value===undefined||typeof value!=="string"){return false}return true}function isObject(value){if(isArray(value))return false;if(isPrimitive(value))return false;if(_typeof(value)==="object"){return true}return false}function isInstance(value,instance){if(!isObject(value))return false;if(!isFunction(instance))return false;if(!instance.hasOwnProperty("prototype"))return false;return value instanceof instance?true:false}function isArray(value){if(Array.isArray(value)){return true}return false}function isFunction(value){if(isArray(value))return false;if(isPrimitive(value))return false;if(typeof value==="function"){return true}return false}function isInteger(value){return Number.isInteger(value)}_namespace.Monster.assignToNamespace("Monster.Types",isPrimitive,isBoolean,isString,isObject,isArray,isFunction,isIterable,isInteger)},{"../namespace.js":26}],31:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Observer=void 0;var _namespace=require("../namespace.js");var _tokenlist=require("./tokenlist.js");var _is=require("./is.js");var _base=require("./base.js");var _uniquequeue=require("./uniquequeue.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Observer=function(_Base){_inherits(Observer,_Base);var _super=_createSuper(Observer);function Observer(callback){var _this;_classCallCheck(this,Observer);_this=_super.call(this);if(typeof callback!=="function"){throw new Error("observer callback must be a function")}_this.callback=callback;for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}_this.arguments=args;_this.tags=new _tokenlist.TokenList;_this.queue=new _uniquequeue.UniqueQueue;return _this}_createClass(Observer,[{key:"addTag",value:function addTag(tag){this.tags.add(tag);return this}},{key:"removeTag",value:function removeTag(tag){this.tags.remove(tag);return this}},{key:"getTags",value:function getTags(){return this.tags.entries()}},{key:"hasTag",value:function hasTag(tag){return this.tags.contains(tag)}},{key:"update",value:function update(subject){var self=this;return new Promise(function(resolve,reject){if(!(0,_is.isObject)(subject)){reject("subject must be an object");return}self.queue.add(subject);setTimeout(function(){try{if(self.queue.isEmpty()){resolve();return}var s=self.queue.poll();var result=self.callback.apply(s,self.arguments);if((0,_is.isObject)(result)&&result instanceof Promise){result.then(resolve)["catch"](reject);return}resolve(result)}catch(e){reject(e)}},0)})}}]);return Observer}(_base.Base);exports.Observer=Observer;_namespace.Monster.assignToNamespace("Monster.Types",Observer)},{"../namespace.js":26,"./base.js":27,"./is.js":30,"./tokenlist.js":37,"./uniquequeue.js":38}],32:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.ObserverList=void 0;var _namespace=require("../namespace.js");var _base=require("./base.js");var _observer=require("./observer.js");var _validate=require("./validate.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var ObserverList=function(_Base){_inherits(ObserverList,_Base);var _super=_createSuper(ObserverList);function ObserverList(){var _this;_classCallCheck(this,ObserverList);_this=_super.call(this);_this.observers=[];return _this}_createClass(ObserverList,[{key:"attach",value:function attach(observer){(0,_validate.validateInstance)(observer,_observer.Observer);this.observers.push(observer);return this}},{key:"detach",value:function detach(observer){(0,_validate.validateInstance)(observer,_observer.Observer);var i=0,l=this.observers.length;for(;i<l;i++){if(this.observers[i]===observer){this.observers.splice(i,1)}}return this}},{key:"contains",value:function contains(observer){(0,_validate.validateInstance)(observer,_observer.Observer);var i=0,l=this.observers.length;for(;i<l;i++){if(this.observers[i]===observer){return true}}return false}},{key:"notify",value:function notify(subject){var pomises=[];var i=0,l=this.observers.length;for(;i<l;i++){pomises.push(this.observers[i].update(subject))}return Promise.all(pomises)}}]);return ObserverList}(_base.Base);exports.ObserverList=ObserverList;_namespace.Monster.assignToNamespace("Monster.Types",ObserverList)},{"../namespace.js":26,"./base.js":27,"./observer.js":31,"./validate.js":39}],33:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.ProxyObserver=void 0;var _namespace=require("../namespace.js");var _base=require("./base.js");var _validate=require("./validate.js");var _observerlist=require("./observerlist.js");var _observer=require("./observer.js");var _is=require("./is.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var ProxyObserver=function(_Base){_inherits(ProxyObserver,_Base);var _super=_createSuper(ProxyObserver);function ProxyObserver(object){var _this;_classCallCheck(this,ProxyObserver);_this=_super.call(this);(0,_validate.validateObject)(object);_this.realSubject=object;_this.subject=new Proxy(object,getHandler.call(_assertThisInitialized(_this)));_this.objectMap=new WeakMap;_this.objectMap.set(_this.realSubject,_this.subject);_this.observers=new _observerlist.ObserverList;return _this}_createClass(ProxyObserver,[{key:"getSubject",value:function getSubject(){return this.subject}},{key:"getRealSubject",value:function getRealSubject(){return this.realSubject}},{key:"attachObserver",value:function attachObserver(observer){this.observers.attach(observer);return this}},{key:"detachObserver",value:function detachObserver(observer){this.observers.detach(observer);return this}},{key:"notifyObservers",value:function notifyObservers(){return this.observers.notify(this)}},{key:"containsObserver",value:function containsObserver(observer){return this.observers.contains(observer)}}]);return ProxyObserver}(_base.Base);exports.ProxyObserver=ProxyObserver;_namespace.Monster.assignToNamespace("Monster.Types",ProxyObserver);function getHandler(){var proxy=this;var handler={get:function get(target,key,receiver){var value=Reflect.get(target,key,receiver);if(_typeof(key)==="symbol"){return value}if((0,_is.isPrimitive)(value)){return value}if((0,_is.isArray)(value)||(0,_is.isObject)(value)){if(proxy.objectMap.has(value)){return proxy.objectMap.get(value)}else{var p=new Proxy(value,handler);proxy.objectMap.set(value,p);return p}}return value},set:function set(target,key,value,receiver){var result=Reflect.set(target,key,value,receiver);if((typeof property==="undefined"?"undefined":_typeof(property))!=="symbol"){proxy.observers.notify(proxy)}return result},deleteProperty:function deleteProperty(target,key){if(key in target){delete target[key];if(_typeof(key)!=="symbol"){proxy.observers.notify(proxy)}return true}return false},defineProperty:function defineProperty(target,key,descriptor){var result=Reflect.defineProperty(target,key,descriptor);if(_typeof(key)!=="symbol"){proxy.observers.notify(proxy)}return result},setPrototypeOf:function setPrototypeOf(target,key){var result=Reflect.setPrototypeOf(object1,key);if(_typeof(key)!=="symbol"){proxy.observers.notify(proxy)}return result}};return handler}},{"../namespace.js":26,"./base.js":27,"./is.js":30,"./observer.js":31,"./observerlist.js":32,"./validate.js":39}],34:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _base.Monster}});exports.Queue=void 0;var _base=require("./base.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Queue=function(_Base){_inherits(Queue,_Base);var _super=_createSuper(Queue);function Queue(){var _this;_classCallCheck(this,Queue);_this=_super.call(this);_this.data=[];return _this}_createClass(Queue,[{key:"isEmpty",value:function isEmpty(){return this.data.length===0}},{key:"peek",value:function peek(){if(this.isEmpty()){return undefined}return this.data[0]}},{key:"add",value:function add(value){this.data.push(value);return this}},{key:"clear",value:function clear(){this.data=[];return this}},{key:"poll",value:function poll(){if(this.isEmpty()){return undefined}return this.data.shift()}}]);return Queue}(_base.Base);exports.Queue=Queue;_base.Monster.assignToNamespace("Monster.Types",Queue)},{"./base.js":27}],35:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _id.Monster}});exports.RandomID=void 0;var _id=require("./id.js");var _global=require("./global.js");var _random=require("../math/random.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var internalCounter=0;var RandomID=function(_ID){_inherits(RandomID,_ID);var _super=_createSuper(RandomID);function RandomID(){var _this;_classCallCheck(this,RandomID);_this=_super.call(this);internalCounter+=1;_this.id=(0,_global.getGlobal)().btoa((0,_random.random)(1,1e4)).replace(/=/g,"").replace(/^[0-9]+/,"X")+internalCounter;return _this}return RandomID}(_id.ID);exports.RandomID=RandomID;_id.Monster.assignToNamespace("Monster.Types",RandomID)},{"../math/random.js":24,"./global.js":28,"./id.js":29}],36:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _base.Monster}});exports.Stack=void 0;var _base=require("./base.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Stack=function(_Base){_inherits(Stack,_Base);var _super=_createSuper(Stack);function Stack(){var _this;_classCallCheck(this,Stack);_this=_super.call(this);_this.data=[];return _this}_createClass(Stack,[{key:"isEmpty",value:function isEmpty(){return this.data.length===0}},{key:"peek",value:function peek(){var _this$data;if(this.isEmpty()){return undefined}return(_this$data=this.data)===null||_this$data===void 0?void 0:_this$data[this.data.length-1]}},{key:"push",value:function push(value){this.data.push(value);return this}},{key:"clear",value:function clear(){this.data=[];return this}},{key:"pop",value:function pop(){if(this.isEmpty()){return undefined}return this.data.pop()}}]);return Stack}(_base.Base);exports.Stack=Stack;_base.Monster.assignToNamespace("Monster.Types",Stack)},{"./base.js":27}],37:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.TokenList=void 0;var _namespace=require("../namespace.js");var _base=require("./base.js");var _is=require("../types/is.js");var _validate=require("../types/validate.js");function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();normalCompletion=step.done;return step},e:function e(_e2){didErr=true;err=_e2},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var TokenList=function(_Base){_inherits(TokenList,_Base);var _super=_createSuper(TokenList);function TokenList(init){var _this;_classCallCheck(this,TokenList);_this=_super.call(this);_this.tokens=new Set;if(typeof init!=="undefined"){_this.add(init)}return _this}_createClass(TokenList,[{key:"getIterator",value:function getIterator(){return this[Symbol.iterator]()}},{key:Symbol.iterator,value:function value(){var index=0;var entries=this.entries();return{next:function next(){if(index<entries.length){return{value:entries===null||entries===void 0?void 0:entries[index++],done:false}}else{return{done:true}}}}}},{key:"contains",value:function contains(value){var _this2=this;if((0,_is.isString)(value)){value=value.trim();var counter=0;value.split(" ").forEach(function(token){if(_this2.tokens.has(token.trim())===false)return false;counter++});return counter>0?true:false}if((0,_is.isIterable)(value)){var _counter=0;var _iterator=_createForOfIteratorHelper(value),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var token=_step.value;(0,_validate.validateString)(token);if(this.tokens.has(token.trim())===false)return false;_counter++}}catch(err){_iterator.e(err)}finally{_iterator.f()}return _counter>0?true:false}return false}},{key:"add",value:function add(value){var _this3=this;if((0,_is.isString)(value)){value.split(" ").forEach(function(token){_this3.tokens.add(token.trim())})}else if((0,_is.isIterable)(value)){var _iterator2=_createForOfIteratorHelper(value),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var token=_step2.value;(0,_validate.validateString)(token);this.tokens.add(token.trim())}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}}else if(typeof value!=="undefined"){throw new TypeError("unsupported value")}return this}},{key:"clear",value:function clear(){this.tokens.clear();return this}},{key:"remove",value:function remove(value){var _this4=this;if((0,_is.isString)(value)){value.split(" ").forEach(function(token){_this4.tokens["delete"](token.trim())})}else if((0,_is.isIterable)(value)){var _iterator3=_createForOfIteratorHelper(value),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var token=_step3.value;(0,_validate.validateString)(token);this.tokens["delete"](token.trim())}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}}else if(typeof value!=="undefined"){throw new TypeError("unsupported value")}return this}},{key:"replace",value:function replace(token,newToken){(0,_validate.validateString)(token);(0,_validate.validateString)(newToken);if(!this.contains(token)){return this}var a=Array.from(this.tokens);var i=a.indexOf(token);if(i===-1)return this;a.splice(i,1,newToken);this.tokens=new Set;this.add(a);return this}},{key:"toggle",value:function toggle(value){var _this5=this;if((0,_is.isString)(value)){value.split(" ").forEach(function(token){toggleValue.call(_this5,token)})}else if((0,_is.isIterable)(value)){var _iterator4=_createForOfIteratorHelper(value),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var token=_step4.value;toggleValue.call(this,token)}}catch(err){_iterator4.e(err)}finally{_iterator4.f()}}else if(typeof value!=="undefined"){throw new TypeError("unsupported value")}return this}},{key:"entries",value:function entries(){return Array.from(this.tokens)}},{key:"forEach",value:function forEach(callback){(0,_validate.validateFunction)(callback);this.tokens.forEach(callback);return this}},{key:"toString",value:function toString(){return this.entries().join(" ")}}]);return TokenList}(_base.Base);exports.TokenList=TokenList;function toggleValue(token){if(!(this instanceof TokenList))throw Error("must be called with TokenList.call");(0,_validate.validateString)(token);token=token.trim();if(this.contains(token)){this.remove(token);return this}this.add(token);return this}_namespace.Monster.assignToNamespace("Monster.Types",TokenList)},{"../namespace.js":26,"../types/is.js":30,"../types/validate.js":39,"./base.js":27}],38:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _queue.Monster}});exports.UniqueQueue=void 0;var _queue=require("./queue.js");var _validate=require("./validate.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _get(target,property,receiver){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(receiver)}return desc.value}}return _get(target,property,receiver||target)}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break}return object}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var UniqueQueue=function(_Queue){_inherits(UniqueQueue,_Queue);var _super=_createSuper(UniqueQueue);function UniqueQueue(){var _this;_classCallCheck(this,UniqueQueue);_this=_super.call(this);_this.unique=new WeakSet;return _this}_createClass(UniqueQueue,[{key:"add",value:function add(value){(0,_validate.validateObject)(value);if(!this.unique.has(value)){this.unique.add(value);_get(_getPrototypeOf(UniqueQueue.prototype),"add",this).call(this,value)}return this}},{key:"clear",value:function clear(){_get(_getPrototypeOf(UniqueQueue.prototype),"clear",this).call(this);this.unique=new WeakSet;return this}},{key:"poll",value:function poll(){if(this.isEmpty()){return undefined}var value=this.data.shift();this.unique["delete"](value);return value}}]);return UniqueQueue}(_queue.Queue);exports.UniqueQueue=UniqueQueue;_queue.Monster.assignToNamespace("Monster.Types",UniqueQueue)},{"./queue.js":34,"./validate.js":39}],39:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.validatePrimitive=validatePrimitive;exports.validateBoolean=validateBoolean;exports.validateString=validateString;exports.validateObject=validateObject;exports.validateInstance=validateInstance;exports.validateArray=validateArray;exports.validateFunction=validateFunction;exports.validateIterable=validateIterable;exports.validateInteger=validateInteger;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");var _is=require("./is.js");function validateIterable(value){if(!(0,_is.isIterable)(value)){throw new TypeError("value is not iterable")}return value}function validatePrimitive(value){if(!(0,_is.isPrimitive)(value)){throw new TypeError("value is not a primitive")}return value}function validateBoolean(value){if(!(0,_is.isBoolean)(value)){throw new TypeError("value is not a boolean")}return value}function validateString(value){if(!(0,_is.isString)(value)){throw new TypeError("value is not a string")}return value}function validateObject(value){if(!(0,_is.isObject)(value)){throw new TypeError("value is not a object")}return value}function validateInstance(value,instance){if(!(0,_is.isInstance)(value,instance)){var n="";if((0,_is.isObject)(instance)||(0,_is.isFunction)(instance)){n=instance===null||instance===void 0?void 0:instance["name"]}if(n){n=" "+n}throw new TypeError("value is not an instance of"+n)}return value}function validateArray(value){if(!(0,_is.isArray)(value)){throw new TypeError("value is not an array")}return value}function validateFunction(value){if(!(0,_is.isFunction)(value)){throw new TypeError("value is not a function")}return value}function validateInteger(value){if(!(0,_is.isInteger)(value)){throw new TypeError("value is not an integer")}return value}_namespace.Monster.assignToNamespace("Monster.Types",validatePrimitive,validateBoolean,validateString,validateObject,validateArray,validateFunction,validateIterable,validateInteger)},{"../namespace.js":26,"./is.js":30}],40:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});exports.getVersion=getVersion;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Version=void 0;var _namespace=require("../namespace.js");var _base=require("./base.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Version=function(_Base){_inherits(Version,_Base);var _super=_createSuper(Version);function Version(major,minor,patch){var _this;_classCallCheck(this,Version);_this=_super.call(this);if(typeof major==="string"&&minor===undefined&&patch===undefined){var parts=major.toString().split(".");major=parseInt(parts[0]||0);minor=parseInt(parts[1]||0);patch=parseInt(parts[2]||0)}if(major===undefined){throw new Error("major version is undefined")}if(minor===undefined){minor=0}if(patch===undefined){patch=0}_this.major=parseInt(major);_this.minor=parseInt(minor);_this.patch=parseInt(patch);if(isNaN(_this.major)){throw new Error("major is not a number")}if(isNaN(_this.minor)){throw new Error("minor is not a number")}if(isNaN(_this.patch)){throw new Error("patch is not a number")}return _this}_createClass(Version,[{key:"toString",value:function toString(){return this.major+"."+this.minor+"."+this.patch}},{key:"compareTo",value:function compareTo(version){if(version instanceof Version){version=version.toString()}if(typeof version!=="string"){throw new Error("type exception")}if(version===this.toString()){return 0}var a=[this.major,this.minor,this.patch];var b=version.split(".");var len=Math.max(a.length,b.length);for(var i=0;i<len;i+=1){if(a[i]&&!b[i]&&parseInt(a[i])>0||parseInt(a[i])>parseInt(b[i])){return 1}else if(b[i]&&!a[i]&&parseInt(b[i])>0||parseInt(a[i])<parseInt(b[i])){return-1}}return 0}}]);return Version}(_base.Base);exports.Version=Version;_namespace.Monster.assignToNamespace("Monster.Types",Version);var monsterVersion;function getVersion(){if(monsterVersion instanceof Version){return monsterVersion}monsterVersion=new Version("1.9.0");return monsterVersion}_namespace.Monster.assignToNamespace("Monster",getVersion)},{"../namespace.js":26,"./base.js":27}],41:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.clone=clone;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");var _is=require("../types/is.js");var _global=require("../types/global.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function clone(obj){if(null===obj){return obj}if((0,_is.isPrimitive)(obj)){return obj}if((0,_is.isFunction)(obj)){return obj}if((0,_is.isArray)(obj)){var copy=[];for(var i=0,len=obj.length;i<len;i++){copy[i]=clone(obj[i])}return copy}if((0,_is.isObject)(obj)){if(obj instanceof Date){var _copy=new Date;_copy.setTime(obj.getTime());return _copy}if(typeof Element!=="undefined"&&obj instanceof Element)return obj;if(typeof HTMLDocument!=="undefined"&&obj instanceof HTMLDocument)return obj;if(typeof DocumentFragment!=="undefined"&&obj instanceof DocumentFragment)return obj;if(obj===(0,_global.getGlobal)())return obj;if(typeof globalContext!=="undefined"&&obj===globalContext)return obj;if(typeof window!=="undefined"&&obj===window)return obj;if(typeof document!=="undefined"&&obj===document)return obj;if(typeof navigator!=="undefined"&&obj===navigator)return obj;if(typeof JSON!=="undefined"&&obj===JSON)return obj;try{if(obj instanceof Proxy){return obj}}catch(e){}return cloneObject(obj)}throw new Error("unable to clone obj! its type isn't supported.")}function cloneObject(obj){var copy;if(_typeof(obj.hasOwnProperty("getClone"))&&obj.getClone==="function"){return obj.getClone()}copy={};if(typeof obj.constructor==="function"&&typeof obj.constructor.call==="function"){copy=new obj.constructor}for(var key in obj){if(!obj.hasOwnProperty(key)){continue}if(_namespace.Monster.Types.isPrimitive(obj[key])){copy[key]=obj[key];continue}copy[key]=clone(obj[key])}return copy}_namespace.Monster.assignToNamespace("Monster.Util",clone)},{"../namespace.js":26,"../types/global.js":28,"../types/is.js":30}],42:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _base.Monster}});exports.Comparator=void 0;var _base=require("../types/base.js");var _is=require("../types/is.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Comparator=function(_Base){_inherits(Comparator,_Base);var _super=_createSuper(Comparator);function Comparator(callback){var _this;_classCallCheck(this,Comparator);_this=_super.call(this);if((0,_is.isFunction)(callback)){_this.compare=callback}else if(callback!==undefined){throw new TypeError("unsupported type")}else{_this.compare=function(a,b){if(_typeof(a)!==_typeof(b)){throw new TypeError("impractical comparison")}if(a===b){return 0}return a<b?-1:1}}return _this}_createClass(Comparator,[{key:"reverse",value:function reverse(){var original=this.compare;this.compare=function(a,b){return original(b,a)};return this}},{key:"equal",value:function equal(a,b){return this.compare(a,b)===0}},{key:"greaterThan",value:function greaterThan(a,b){return this.compare(a,b)>0}},{key:"greaterThanOrEqual",value:function greaterThanOrEqual(a,b){return this.greaterThan(a,b)||this.equal(a,b)}},{key:"lessThanOrEqual",value:function lessThanOrEqual(a,b){return this.lessThan(a,b)||this.equal(a,b)}},{key:"lessThan",value:function lessThan(a,b){return this.compare(a,b)<0}}]);return Comparator}(_base.Base);exports.Comparator=Comparator;_base.Monster.assignToNamespace("Monster.Util",Comparator)},{"../types/base.js":27,"../types/is.js":30}],43:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.deepFreeze=deepFreeze;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");var _validate=require("../types/validate.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();normalCompletion=step.done;return step},e:function e(_e2){didErr=true;err=_e2},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function deepFreeze(object){(0,_validate.validateObject)(object);var propNames=Object.getOwnPropertyNames(object);var _iterator=_createForOfIteratorHelper(propNames),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var name=_step.value;var value=object[name];object[name]=value&&_typeof(value)==="object"?deepFreeze(value):value}}catch(err){_iterator.e(err)}finally{_iterator.f()}return Object.freeze(object)}_namespace.Monster.assignToNamespace("Monster.Util",deepFreeze)},{"../namespace.js":26,"../types/validate.js":39}]},{},[25]); +(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.AbstractConstraint=void 0;var _namespace=require("../namespace.js");var _base=require("../types/base.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var AbstractConstraint=function(_Base){_inherits(AbstractConstraint,_Base);var _super=_createSuper(AbstractConstraint);function AbstractConstraint(){_classCallCheck(this,AbstractConstraint);return _super.call(this)}_createClass(AbstractConstraint,[{key:"isValid",value:function isValid(value){return Promise.reject(value)}}]);return AbstractConstraint}(_base.Base);exports.AbstractConstraint=AbstractConstraint;_namespace.Monster.assignToNamespace("Monster.Constraints",AbstractConstraint)},{"../namespace.js":27,"../types/base.js":28}],2:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _abstract.Monster}});exports.AbstractOperator=void 0;var _abstract=require("./abstract.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var AbstractOperator=function(_AbstractConstraint){_inherits(AbstractOperator,_AbstractConstraint);var _super=_createSuper(AbstractOperator);function AbstractOperator(operantA,operantB){var _this;_classCallCheck(this,AbstractOperator);_this=_super.call(this);if(!(operantA instanceof _abstract.AbstractConstraint)||!(operantB instanceof _abstract.AbstractConstraint)){throw new TypeError("parameters must be from type AbstractConstraint")}_this.operantA=operantA;_this.operantB=operantB;return _this}return AbstractOperator}(_abstract.AbstractConstraint);exports.AbstractOperator=AbstractOperator;_abstract.Monster.assignToNamespace("Monster.Constraints",AbstractOperator)},{"./abstract.js":1}],3:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _abstract.Monster}});exports.AndOperator=void 0;var _abstract=require("./abstract.js");var _abstractoperator=require("./abstractoperator.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var AndOperator=function(_AbstractOperator){_inherits(AndOperator,_AbstractOperator);var _super=_createSuper(AndOperator);function AndOperator(){_classCallCheck(this,AndOperator);return _super.apply(this,arguments)}_createClass(AndOperator,[{key:"isValid",value:function isValid(value){return Promise.all([this.operantA.isValid(value),this.operantB.isValid(value)])}}]);return AndOperator}(_abstractoperator.AbstractOperator);exports.AndOperator=AndOperator;_abstract.Monster.assignToNamespace("Monster.Constraints",AndOperator)},{"./abstract.js":1,"./abstractoperator.js":2}],4:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _abstract.Monster}});exports.Invalid=void 0;var _abstract=require("./abstract.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Invalid=function(_AbstractConstraint){_inherits(Invalid,_AbstractConstraint);var _super=_createSuper(Invalid);function Invalid(){_classCallCheck(this,Invalid);return _super.apply(this,arguments)}_createClass(Invalid,[{key:"isValid",value:function isValid(value){return Promise.reject(value)}}]);return Invalid}(_abstract.AbstractConstraint);exports.Invalid=Invalid;_abstract.Monster.assignToNamespace("Monster.Constraints",Invalid)},{"./abstract.js":1}],5:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _abstract.Monster}});exports.IsArray=void 0;var _abstract=require("./abstract.js");var _is=require("../types/is.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var IsArray=function(_AbstractConstraint){_inherits(IsArray,_AbstractConstraint);var _super=_createSuper(IsArray);function IsArray(){_classCallCheck(this,IsArray);return _super.apply(this,arguments)}_createClass(IsArray,[{key:"isValid",value:function isValid(value){if((0,_is.isArray)(value)){return Promise.resolve(value)}return Promise.reject(value)}}]);return IsArray}(_abstract.AbstractConstraint);exports.IsArray=IsArray;_abstract.Monster.assignToNamespace("Monster.Constraints",IsArray)},{"../types/is.js":31,"./abstract.js":1}],6:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _abstract.Monster}});exports.IsObject=void 0;var _abstract=require("./abstract.js");var _is=require("../types/is.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var IsObject=function(_AbstractConstraint){_inherits(IsObject,_AbstractConstraint);var _super=_createSuper(IsObject);function IsObject(){_classCallCheck(this,IsObject);return _super.apply(this,arguments)}_createClass(IsObject,[{key:"isValid",value:function isValid(value){if((0,_is.isObject)(value)){return Promise.resolve(value)}return Promise.reject(value)}}]);return IsObject}(_abstract.AbstractConstraint);exports.IsObject=IsObject;_abstract.Monster.assignToNamespace("Monster.Constraints",IsObject)},{"../types/is.js":31,"./abstract.js":1}],7:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _abstractoperator.Monster}});exports.OrOperator=void 0;var _abstractoperator=require("./abstractoperator.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var OrOperator=function(_AbstractOperator){_inherits(OrOperator,_AbstractOperator);var _super=_createSuper(OrOperator);function OrOperator(){_classCallCheck(this,OrOperator);return _super.apply(this,arguments)}_createClass(OrOperator,[{key:"isValid",value:function isValid(value){var self=this;return new Promise(function(resolve,reject){var a,b;self.operantA.isValid(value).then(function(){resolve()})["catch"](function(){a=false;if(b===false){reject()}});self.operantB.isValid(value).then(function(){resolve()})["catch"](function(){b=false;if(a===false){reject()}})})}}]);return OrOperator}(_abstractoperator.AbstractOperator);exports.OrOperator=OrOperator;_abstractoperator.Monster.assignToNamespace("Monster.Constraints",OrOperator)},{"./abstractoperator.js":2}],8:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _abstract.Monster}});exports.Valid=void 0;var _abstract=require("./abstract.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Valid=function(_AbstractConstraint){_inherits(Valid,_AbstractConstraint);var _super=_createSuper(Valid);function Valid(){_classCallCheck(this,Valid);return _super.apply(this,arguments)}_createClass(Valid,[{key:"isValid",value:function isValid(value){return Promise.resolve(value)}}]);return Valid}(_abstract.AbstractConstraint);exports.Valid=Valid;_abstract.Monster.assignToNamespace("Monster.Constraints",Valid)},{"./abstract.js":1}],9:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.Diff=Diff;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _is.Monster}});var _is=require("../types/is.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function Diff(first,second){return doDiff(first,second)}function getKeys(a,b,type){if((0,_is.isArray)(type)){var keys=a.length>b.length?new Array(a.length):new Array(b.length);keys.fill(0);return new Set(keys.map(function(_,i){return i}))}return new Set(Object.keys(a).concat(Object.keys(b)))}function doDiff(a,b,path,diff){var typeA=_typeof(a);var typeB=_typeof(b);var currPath=path||[];var currDiff=diff||[];if(typeA===typeB&&typeA==="object"){getKeys(a,b,typeA).forEach(function(v){if(!Object.prototype.hasOwnProperty.call(a,v)){currDiff.push(buildResult(a[v],b[v],"add",currPath.concat(v)))}else if(!Object.prototype.hasOwnProperty.call(b,v)){currDiff.push(buildResult(a[v],b[v],"delete",currPath.concat(v)))}else{doDiff(a[v],b[v],currPath.concat(v),currDiff)}})}else{var o=getOperator(a,b,typeA,typeB);if(o!==undefined){currDiff.push(buildResult(a,b,o,path))}}return currDiff}function buildResult(a,b,operator,path){var result={operator:operator,path:path};if(operator!=="add"){result.first={value:a,type:_typeof(a)};if((0,_is.isObject)(a)){var _Object$getPrototypeO,_Object$getPrototypeO2;var name=(_Object$getPrototypeO=Object.getPrototypeOf(a))===null||_Object$getPrototypeO===void 0?void 0:(_Object$getPrototypeO2=_Object$getPrototypeO.constructor)===null||_Object$getPrototypeO2===void 0?void 0:_Object$getPrototypeO2.name;if(name!==undefined){result.first.instance=name}}}if(operator==="add"||operator==="update"){result.second={value:b,type:_typeof(b)};if((0,_is.isObject)(b)){var _Object$getPrototypeO3,_Object$getPrototypeO4;var _name=(_Object$getPrototypeO3=Object.getPrototypeOf(b))===null||_Object$getPrototypeO3===void 0?void 0:(_Object$getPrototypeO4=_Object$getPrototypeO3.constructor)===null||_Object$getPrototypeO4===void 0?void 0:_Object$getPrototypeO4.name;if(_name!==undefined){result.second.instance=_name}}}return result}function isNotEqual(a,b){if(_typeof(a)!==_typeof(b)){return true}if(a instanceof Date&&b instanceof Date){return a.getTime()!==b.getTime()}return a!==b}function getOperator(a,b){var operator;var typeA=_typeof(a);var typeB=_typeof(b);if(typeA==="undefined"&&typeB!=="undefined"){operator="add"}else if(typeA!=="undefined"&&typeB==="undefined"){operator="delete"}else if(isNotEqual(a,b)){operator="update"}return operator}_is.Monster.assignToNamespace("Monster.Data",Diff)},{"../types/is.js":31}],10:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Pathfinder=void 0;var _namespace=require("../namespace.js");var _is=require("../types/is.js");var _validate=require("../types/validate.js");var _base=require("../types/base.js");var _stack=require("../types/stack.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter)}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function _iterableToArrayLimit(arr,i){var _i=arr==null?null:typeof Symbol!=="undefined"&&arr[Symbol.iterator]||arr["@@iterator"];if(_i==null)return;var _arr=[];var _n=true;var _d=false;var _s,_e;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break}}catch(err){_d=true;_e=err}finally{try{if(!_n&&_i["return"]!=null)_i["return"]()}finally{if(_d)throw _e}}return _arr}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var DELIMITER=".";var WILDCARD="*";var Pathfinder=function(_Base){_inherits(Pathfinder,_Base);var _super=_createSuper(Pathfinder);function Pathfinder(object){var _this;_classCallCheck(this,Pathfinder);_this=_super.call(this);_this.object=object;_this.wildCard=WILDCARD;return _this}_createClass(Pathfinder,[{key:"setWildCard",value:function setWildCard(wildcard){(0,_validate.validateString)(wildcard);this.wildCard=wildcard;return this}},{key:"getVia",value:function getVia(path){(0,_validate.validateString)(path);return getValueViaPath.call(this,this.object,path)}},{key:"setVia",value:function setVia(path,value){(0,_validate.validateString)(path);setValueViaPath.call(this,this.object,path,value);return this}},{key:"deleteVia",value:function deleteVia(path){(0,_validate.validateString)(path);deleteValueViaPath.call(this,this.object,path);return this}},{key:"exists",value:function exists(path){(0,_validate.validateString)(path);try{getValueViaPath.call(this,this.object,path,true);return true}catch(e){}return false}}]);return Pathfinder}(_base.Base);exports.Pathfinder=Pathfinder;_namespace.Monster.assignToNamespace("Monster.Data",Pathfinder);function iterate(subject,path,check){var result=new Map;if((0,_is.isObject)(subject)||(0,_is.isArray)(subject)){for(var _i=0,_Object$entries=Object.entries(subject);_i<_Object$entries.length;_i++){var _Object$entries$_i=_slicedToArray(_Object$entries[_i],2),key=_Object$entries$_i[0],value=_Object$entries$_i[1];result.set(key,getValueViaPath.call(this,value,path,check))}}else{var _key=path.split(DELIMITER).shift();result.set(_key,getValueViaPath.call(this,subject,path,check))}return result}function getValueViaPath(subject,path,check){if(path===""){return subject}var parts=path.split(DELIMITER);var current=parts.shift();if(current===this.wildCard){return iterate.call(this,subject,parts.join(DELIMITER),check)}if((0,_is.isObject)(subject)||(0,_is.isArray)(subject)){var anchor;if(subject instanceof Map||subject instanceof WeakMap){anchor=subject.get(current)}else if(subject instanceof Set||subject instanceof WeakSet){var _ref;current=parseInt(current);(0,_validate.validateInteger)(current);anchor=(_ref=_toConsumableArray(subject))===null||_ref===void 0?void 0:_ref[current]}else if(subject instanceof WeakRef){throw Error("unsupported action for this data type")}else if((0,_is.isArray)(subject)){current=parseInt(current);(0,_validate.validateInteger)(current);anchor=subject===null||subject===void 0?void 0:subject[current]}else{anchor=subject===null||subject===void 0?void 0:subject[current]}if((0,_is.isObject)(anchor)||(0,_is.isArray)(anchor)){return getValueViaPath.call(this,anchor,parts.join(DELIMITER),check)}if(parts.length>0){throw Error("the journey is not at its end ("+parts.join(DELIMITER)+")")}if(check===true&&!subject.hasOwnProperty(current)){throw Error("unknown value")}return anchor}throw TypeError("unsupported type "+_typeof(subject))}function setValueViaPath(object,path,value){(0,_validate.validateString)(path);var parts=path.split(DELIMITER);var last=parts.pop();var subpath=parts.join(DELIMITER);var stack=new _stack.Stack;var current=subpath;while(true){try{getValueViaPath.call(this,object,current,true);break}catch(e){}stack.push(current);parts.pop();current=parts.join(DELIMITER);if(current==="")break}while(!stack.isEmpty()){current=stack.pop();var obj={};if(!stack.isEmpty()){var n=stack.peek().split(DELIMITER).pop();if((0,_is.isInteger)(parseInt(n))){obj=[]}}setValueViaPath.call(this,object,current,obj)}var anchor=getValueViaPath.call(this,object,subpath);if(!(0,_is.isObject)(object)&&!(0,_is.isArray)(object)){throw TypeError("unsupported type: "+_typeof(object))}if(anchor instanceof Map||anchor instanceof WeakMap){anchor.set(last,value)}else if(anchor instanceof Set||anchor instanceof WeakSet){anchor.append(value)}else if(anchor instanceof WeakRef){throw Error("unsupported action for this data type")}else if((0,_is.isArray)(anchor)){last=parseInt(last);(0,_validate.validateInteger)(last);anchor[last]=value}else{anchor[last]=value}return}function deleteValueViaPath(object,path){var parts=path.split(DELIMITER);var last=parts.pop();var subpath=parts.join(DELIMITER);var anchor=getValueViaPath.call(this,object,subpath);if(anchor instanceof Map){anchor["delete"](last)}else if(anchor instanceof Set||anchor instanceof WeakMap||anchor instanceof WeakSet||anchor instanceof WeakRef){throw Error("unsupported action for this data type")}else if((0,_is.isArray)(anchor)){last=parseInt(last);(0,_validate.validateInteger)(last);delete anchor[last]}else{delete anchor[last]}return}},{"../namespace.js":27,"../types/base.js":28,"../types/is.js":31,"../types/stack.js":37,"../types/validate.js":40}],11:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Pipe=void 0;var _namespace=require("../namespace.js");var _transformer=require("./transformer.js");var _base=require("../types/base.js");var _validate=require("../types/validate.js");function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function _iterableToArrayLimit(arr,i){var _i=arr==null?null:typeof Symbol!=="undefined"&&arr[Symbol.iterator]||arr["@@iterator"];if(_i==null)return;var _arr=[];var _n=true;var _d=false;var _s,_e;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break}}catch(err){_d=true;_e=err}finally{try{if(!_n&&_i["return"]!=null)_i["return"]()}finally{if(_d)throw _e}}return _arr}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var DELIMITER="|";var Pipe=function(_Base){_inherits(Pipe,_Base);var _super=_createSuper(Pipe);function Pipe(pipe){var _this;_classCallCheck(this,Pipe);_this=_super.call(this);(0,_validate.validateString)(pipe);_this.pipe=pipe.split(DELIMITER).map(function(v){return new _transformer.Transformer(v)});return _this}_createClass(Pipe,[{key:"setCallback",value:function setCallback(name,callback){for(var _i=0,_Object$entries=Object.entries(this.pipe);_i<_Object$entries.length;_i++){var _Object$entries$_i=_slicedToArray(_Object$entries[_i],2),t=_Object$entries$_i[1];t.setCallback(name,callback)}return this}},{key:"run",value:function run(value){return this.pipe.reduce(function(accumulator,transformer,currentIndex,array){return transformer.run(accumulator)},value)}}]);return Pipe}(_base.Base);exports.Pipe=Pipe;_namespace.Monster.assignToNamespace("Monster.Data",Pipe)},{"../namespace.js":27,"../types/base.js":28,"../types/validate.js":40,"./transformer.js":12}],12:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Transformer=void 0;var _namespace=require("../namespace.js");var _base=require("../types/base.js");var _validate=require("../types/validate.js");var _is=require("../types/is.js");var _id=require("../types/id.js");var _clone=require("../util/clone.js");var _pathfinder=require("./pathfinder.js");function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter)}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();normalCompletion=step.done;return step},e:function e(_e2){didErr=true;err=_e2},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function _wrapRegExp(){_wrapRegExp=function _wrapRegExp(re,groups){return new BabelRegExp(re,undefined,groups)};var _super=RegExp.prototype;var _groups=new WeakMap;function BabelRegExp(re,flags,groups){var _this=new RegExp(re,flags);_groups.set(_this,groups||_groups.get(re));return _setPrototypeOf(_this,BabelRegExp.prototype)}_inherits(BabelRegExp,RegExp);BabelRegExp.prototype.exec=function(str){var result=_super.exec.call(this,str);if(result)result.groups=buildGroups(result,this);return result};BabelRegExp.prototype[Symbol.replace]=function(str,substitution){if(typeof substitution==="string"){var groups=_groups.get(this);return _super[Symbol.replace].call(this,str,substitution.replace(/\$<([^>]+)>/g,function(_,name){return"$"+groups[name]}))}else if(typeof substitution==="function"){var _this=this;return _super[Symbol.replace].call(this,str,function(){var args=arguments;if(_typeof(args[args.length-1])!=="object"){args=[].slice.call(args);args.push(buildGroups(args,_this))}return substitution.apply(this,args)})}else{return _super[Symbol.replace].call(this,str,substitution)}};function buildGroups(result,re){var g=_groups.get(re);return Object.keys(g).reduce(function(groups,name){groups[name]=result[g[name]];return groups},Object.create(null))}return _wrapRegExp.apply(this,arguments)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Transformer=function(_Base){_inherits(Transformer,_Base);var _super=_createSuper(Transformer);function Transformer(definition){var _this;_classCallCheck(this,Transformer);_this=_super.call(this);(0,_validate.validateString)(definition);_this.args=disassemble(definition);_this.command=_this.args.shift();_this.callbacks=new Map;return _this}_createClass(Transformer,[{key:"setCallback",value:function setCallback(name,callback){(0,_validate.validateString)(name);(0,_validate.validateFunction)(callback);this.callbacks.set(name,callback);return this}},{key:"run",value:function run(value){return transform.apply(this,[value])}}]);return Transformer}(_base.Base);exports.Transformer=Transformer;_namespace.Monster.assignToNamespace("Monster.Data",Transformer);function disassemble(command){(0,_validate.validateString)(command);var placeholder=new Map;var regex=_wrapRegExp(/((\\(.)){1})/gim,{pattern:2,char:3});var result=command.matchAll(regex);var _iterator=_createForOfIteratorHelper(result),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var m=_step.value;var g=m===null||m===void 0?void 0:m["groups"];if(!(0,_is.isObject)(g)){continue}var p=g===null||g===void 0?void 0:g["pattern"];var c=g===null||g===void 0?void 0:g["char"];if(p&&c){var r="__"+(new _id.ID).toString()+"__";placeholder.set(r,c);command=command.replace(p,r)}}}catch(err){_iterator.e(err)}finally{_iterator.f()}var parts=command.split(":");parts=parts.map(function(value){var v=value.trim();var _iterator2=_createForOfIteratorHelper(placeholder),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var k=_step2.value;v=v.replace(k[0],k[1])}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}return v});return parts}function convertToString(value){if((0,_is.isObject)(value)&&value.hasOwnProperty("toString")){value=value.toString()}(0,_validate.validateString)(value);return value}function transform(value){var args=(0,_clone.clone)(this.args);var key;switch(this.command){case"static":return this.args.join(":");case"tolower":case"strtolower":case"tolowercase":(0,_validate.validateString)(value);return value.toLowerCase();case"toupper":case"strtoupper":case"touppercase":(0,_validate.validateString)(value);return value.toUpperCase();case"tostring":return""+value;case"tointeger":var n=parseInt(value);(0,_validate.validateInteger)(n);return n;case"tojson":return JSON.stringify(value);case"trim":(0,_validate.validateString)(value);return value.trim();case"rawurlencode":(0,_validate.validateString)(value);return encodeURIComponent(value).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A");case"call":var callback;var callbackName=args.shift();if((0,_is.isObject)(value)&&value.hasOwnProperty(callbackName)){callback=value[callbackName]}else if(this.callbacks.has(callbackName)){callback=this.callbacks.get(callbackName)}else if((typeof window==="undefined"?"undefined":_typeof(window))==="object"&&window.hasOwnProperty(callbackName)){callback=window[callbackName]}(0,_validate.validateFunction)(callback);args.unshift(value);return callback.apply(void 0,_toConsumableArray(args));case"plain":case"plaintext":(0,_validate.validateString)(value);var doc=(new DOMParser).parseFromString(value,"text/html");return doc.body.textContent||"";case"if":case"?":(0,_validate.validatePrimitive)(value);var trueStatement=args.shift()||undefined;var falseStatement=args.shift()||undefined;if(trueStatement==="value"){trueStatement=value}if(trueStatement==="\\value"){trueStatement="value"}if(falseStatement==="value"){falseStatement=value}if(falseStatement==="\\value"){falseStatement="value"}var condition=value!==undefined&&value!==""&&value!=="off"&&value!=="false"&&value!==false||value==="on"||value==="true"||value===true;return condition?trueStatement:falseStatement;case"ucfirst":(0,_validate.validateString)(value);var firstchar=value.charAt(0).toUpperCase();return firstchar+value.substr(1);case"ucwords":(0,_validate.validateString)(value);return value.replace(/^([a-z\u00E0-\u00FC])|\s+([a-z\u00E0-\u00FC])/g,function(v){return v.toUpperCase()});case"count":case"length":if(((0,_is.isString)(value)||(0,_is.isObject)(value)||(0,_is.isArray)(value))&&value.hasOwnProperty("length")){return value.length}throw new TypeError("unsupported type");case"base64":convertToString(value);return btoa(value);case"empty":return"";case"undefined":return undefined;case"prefix":(0,_validate.validateString)(value);var prefix=args===null||args===void 0?void 0:args[0];return prefix+value;case"suffix":(0,_validate.validateString)(value);var suffix=args===null||args===void 0?void 0:args[0];return value+suffix;case"uniqid":return(new _id.ID).toString();case"key":case"property":case"index":key=args.shift()||"undefined";var defaultValue=args.shift()||"";if(value instanceof Map){if(!value.has(key)){return defaultValue}return value.get(key)}if((0,_is.isObject)(value)||(0,_is.isArray)(value)){if(value!==null&&value!==void 0&&value[key]){return value===null||value===void 0?void 0:value[key]}return defaultValue}throw new Error("type not supported");case"path":key=args.shift()||"undefined";return new _pathfinder.Pathfinder(value).getVia(key);case"substring":(0,_validate.validateString)(value);var start=parseInt(args[0])||0;var end=(parseInt(args[1])||0)+start;return value.substring(start,end);case"nop":return value;default:throw new Error("unknown command "+this.command)}return value}},{"../namespace.js":27,"../types/base.js":28,"../types/id.js":30,"../types/is.js":31,"../types/validate.js":40,"../util/clone.js":42,"./pathfinder.js":10}],13:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _base.Monster}});exports.Assembler=exports.ATTRIBUTEPREFIX=void 0;var _base=require("../types/base.js");var _validate=require("../types/validate.js");var _global=require("../types/global.js");var _proxyobserver=require("../types/proxyobserver.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var ATTRIBUTEPREFIX="data-monster-";exports.ATTRIBUTEPREFIX=ATTRIBUTEPREFIX;var Assembler=function(_Base){_inherits(Assembler,_Base);var _super=_createSuper(Assembler);function Assembler(fragment){var _this;_classCallCheck(this,Assembler);_this=_super.call(this);_this.attributePrefix=ATTRIBUTEPREFIX;(0,_validate.validateInstance)(fragment,(0,_global.getGlobalFunction)("DocumentFragment"));_this.fragment=fragment;return _this}_createClass(Assembler,[{key:"setAttributePrefix",value:function setAttributePrefix(prefix){(0,_validate.validateString)(prefix);this.attributePrefix=prefix;return this}},{key:"getAttributePrefix",value:function getAttributePrefix(){return this.attributePrefix}},{key:"createDocumentFragment",value:function createDocumentFragment(data){if(data===undefined){data=new _proxyobserver.ProxyObserver({})}(0,_validate.validateInstance)(data,_proxyobserver.ProxyObserver);var fragment=this.fragment.cloneNode(true);return fragment}}]);return Assembler}(_base.Base);exports.Assembler=Assembler;_base.Monster.assignToNamespace("Monster.DOM",Assembler)},{"../types/base.js":28,"../types/global.js":29,"../types/proxyobserver.js":34,"../types/validate.js":40}],14:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.clearAttributeValue=clearAttributeValue;exports.replaceAttributeValue=replaceAttributeValue;exports.containsAttributeValue=containsAttributeValue;exports.removeAttributeValue=removeAttributeValue;exports.addAttributeValue=addAttributeValue;exports.toggleAttributeValue=toggleAttributeValue;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");var _tokenlist=require("../types/tokenlist.js");var _validate=require("../types/validate.js");function toggleAttributeValue(element,key,value){(0,_validate.validateInstance)(element,HTMLElement);(0,_validate.validateString)(value);(0,_validate.validateString)(key);if(!element.hasAttribute(key)){element.setAttribute(key,value);return element}element.setAttribute(key,new _tokenlist.TokenList(element.getAttribute(key)).toggle(value).toString());return element}function addAttributeValue(element,key,value){(0,_validate.validateInstance)(element,HTMLElement);(0,_validate.validateString)(value);(0,_validate.validateString)(key);if(!element.hasAttribute(key)){element.setAttribute(key,value);return element}element.setAttribute(key,new _tokenlist.TokenList(element.getAttribute(key)).add(value).toString());return element}function removeAttributeValue(element,key,value){(0,_validate.validateInstance)(element,HTMLElement);(0,_validate.validateString)(value);(0,_validate.validateString)(key);if(!element.hasAttribute(key)){return element}element.setAttribute(key,new _tokenlist.TokenList(element.getAttribute(key)).remove(value).toString());return element}function containsAttributeValue(element,key,value){(0,_validate.validateInstance)(element,HTMLElement);(0,_validate.validateString)(value);(0,_validate.validateString)(key);if(!element.hasAttribute(key)){return false}return new _tokenlist.TokenList(element.getAttribute(key)).contains(value)}function replaceAttributeValue(element,key,from,to){(0,_validate.validateInstance)(element,HTMLElement);(0,_validate.validateString)(from);(0,_validate.validateString)(to);(0,_validate.validateString)(key);if(!element.hasAttribute(key)){return element}element.setAttribute(key,new _tokenlist.TokenList(element.getAttribute(key)).replace(from,to).toString());return element}function clearAttributeValue(element,key){(0,_validate.validateInstance)(element,HTMLElement);(0,_validate.validateString)(key);if(!element.hasAttribute(key)){return element}element.setAttribute(key,"");return element}_namespace.Monster.assignToNamespace("Monster.Data",clearAttributeValue,replaceAttributeValue,containsAttributeValue,removeAttributeValue,addAttributeValue,toggleAttributeValue)},{"../namespace.js":27,"../types/tokenlist.js":38,"../types/validate.js":40}],15:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.ATTRIBUTE_UPDATER_HASSYMBOL=exports.ATTRIBUTE_UPDATER_BIND=exports.ATTRIBUTE_UPDATER_REMOVE=exports.ATTRIBUTE_UPDATER_INSERT_REFERENCE=exports.ATTRIBUTE_UPDATER_INSERT=exports.ATTRIBUTE_UPDATER_REPLACE=exports.ATTRIBUTE_UPDATER_ATTRIBUTES=exports.ATTRIBUTE_THEME_NAME=exports.ATTRIBUTE_THEME_PREFIX=exports.DEFAULT_THEME=exports.ATTRIBUTE_OPTIONS=exports.ATTRIBUTE_PREFIX=void 0;var _namespace=require("../namespace.js");var ATTRIBUTE_PREFIX="data-monster-";exports.ATTRIBUTE_PREFIX=ATTRIBUTE_PREFIX;var ATTRIBUTE_OPTIONS=ATTRIBUTE_PREFIX+"options";exports.ATTRIBUTE_OPTIONS=ATTRIBUTE_OPTIONS;var DEFAULT_THEME="monster";exports.DEFAULT_THEME=DEFAULT_THEME;var ATTRIBUTE_THEME_PREFIX=ATTRIBUTE_PREFIX+"theme-";exports.ATTRIBUTE_THEME_PREFIX=ATTRIBUTE_THEME_PREFIX;var ATTRIBUTE_THEME_NAME=ATTRIBUTE_THEME_PREFIX+"name";exports.ATTRIBUTE_THEME_NAME=ATTRIBUTE_THEME_NAME;var ATTRIBUTE_UPDATER_ATTRIBUTES=ATTRIBUTE_PREFIX+"attributes";exports.ATTRIBUTE_UPDATER_ATTRIBUTES=ATTRIBUTE_UPDATER_ATTRIBUTES;var ATTRIBUTE_UPDATER_REPLACE=ATTRIBUTE_PREFIX+"replace";exports.ATTRIBUTE_UPDATER_REPLACE=ATTRIBUTE_UPDATER_REPLACE;var ATTRIBUTE_UPDATER_INSERT=ATTRIBUTE_PREFIX+"insert";exports.ATTRIBUTE_UPDATER_INSERT=ATTRIBUTE_UPDATER_INSERT;var ATTRIBUTE_UPDATER_INSERT_REFERENCE=ATTRIBUTE_PREFIX+"insert-reference";exports.ATTRIBUTE_UPDATER_INSERT_REFERENCE=ATTRIBUTE_UPDATER_INSERT_REFERENCE;var ATTRIBUTE_UPDATER_REMOVE=ATTRIBUTE_PREFIX+"remove";exports.ATTRIBUTE_UPDATER_REMOVE=ATTRIBUTE_UPDATER_REMOVE;var ATTRIBUTE_UPDATER_BIND=ATTRIBUTE_PREFIX+"bind";exports.ATTRIBUTE_UPDATER_BIND=ATTRIBUTE_UPDATER_BIND;var ATTRIBUTE_UPDATER_HASSYMBOL=ATTRIBUTE_PREFIX+"hassymbol";exports.ATTRIBUTE_UPDATER_HASSYMBOL=ATTRIBUTE_UPDATER_HASSYMBOL},{"../namespace.js":27}],16:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});exports.registerCustomElement=registerCustomElement;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _validate.Monster}});exports.CustomElement=void 0;var _constants=require("./constants.js");var _template=require("./template.js");var _global=require("../types/global.js");var _validate=require("../types/validate.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _wrapNativeSuper(Class){var _cache=typeof Map==="function"?new Map:undefined;_wrapNativeSuper=function _wrapNativeSuper(Class){if(Class===null||!_isNativeFunction(Class))return Class;if(typeof Class!=="function"){throw new TypeError("Super expression must either be null or a function")}if(typeof _cache!=="undefined"){if(_cache.has(Class))return _cache.get(Class);_cache.set(Class,Wrapper)}function Wrapper(){return _construct(Class,arguments,_getPrototypeOf(this).constructor)}Wrapper.prototype=Object.create(Class.prototype,{constructor:{value:Wrapper,enumerable:false,writable:true,configurable:true}});return _setPrototypeOf(Wrapper,Class)};return _wrapNativeSuper(Class)}function _construct(Parent,args,Class){if(_isNativeReflectConstruct()){_construct=Reflect.construct}else{_construct=function _construct(Parent,args,Class){var a=[null];a.push.apply(a,args);var Constructor=Function.bind.apply(Parent,a);var instance=new Constructor;if(Class)_setPrototypeOf(instance,Class.prototype);return instance}}return _construct.apply(null,arguments)}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _isNativeFunction(fn){return Function.toString.call(fn).indexOf("[native code]")!==-1}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var CustomElement=function(_HTMLElement){_inherits(CustomElement,_HTMLElement);var _super=_createSuper(CustomElement);function CustomElement(){var _this;_classCallCheck(this,CustomElement);_this=_super.call(this);_this._options=Object.assign({},_this.defaults,getOptionsFromAttributes.call(_assertThisInitialized(_this)));_this.init();return _this}_createClass(CustomElement,[{key:"defaults",get:function get(){return{shadowMode:"open",delegatesFocus:true}}},{key:"getOption",value:function getOption(key,defaultValue){var _this$_options;(0,_validate.validateString)(key);var v=(_this$_options=this._options)===null||_this$_options===void 0?void 0:_this$_options[key];if(v===undefined)return defaultValue;return v}},{key:"init",value:function init(){initShadowRoot.call(this);return this}},{key:"assemble",value:function assemble(){return this}},{key:"disassemble",value:function disassemble(){return this}},{key:"connectedCallback",value:function connectedCallback(){this.assemble()}},{key:"disconnectedCallback",value:function disconnectedCallback(){this.disassemble()}},{key:"adoptedCallback",value:function adoptedCallback(){}},{key:"attributeChangedCallback",value:function attributeChangedCallback(attrName,oldVal,newVal){this.assemble()}}],[{key:"getTemplate",value:function getTemplate(){throw new Error("the method getTemplate must be overwritten by the derived class.")}},{key:"getTag",value:function getTag(){throw new Error("the method getTag must be overwritten by the derived class.")}},{key:"getCSSStyleSheet",value:function getCSSStyleSheet(){return new CSSStyleSheet}}]);return CustomElement}(_wrapNativeSuper(HTMLElement));exports.CustomElement=CustomElement;function getOptionsFromAttributes(){if(this.hasAttribute(_constants.ATTRIBUTE_OPTIONS)){try{var obj=JSON.parse(this.getAttribute(_constants.ATTRIBUTE_OPTIONS));(0,_validate.validateObject)(obj);return obj}catch(e){throw new Error("the options attribute "+_constants.ATTRIBUTE_OPTIONS+" does not contain a valid json definition (actual: "+this.getAttribute(_constants.ATTRIBUTE_OPTIONS)+").")}}return{}}function initShadowRoot(){this.attachShadow({mode:this.getOption("shadowMode","open"),delegatesFocus:this.getOption("delegatesFocus",true)});var styleSheet=this.constructor.getCSSStyleSheet();if(styleSheet instanceof CSSStyleSheet){this.shadowRoot.adoptedStyleSheets=[styleSheet]}try{var template=(0,_template.findDocumentTemplate)(this.constructor.getTag());this.shadowRoot.appendChild(template.createDocumentFragment())}catch(e){this.shadowRoot.innerHTML=this.constructor.getTemplate()}return this}function registerCustomElement(element){(0,_validate.validateFunction)(element);var tag=element.getTag();(0,_global.getGlobalObject)("customElements").define(element.getTag(),element);return}_validate.Monster.assignToNamespace("Monster.DOM",CustomElement,registerCustomElement)},{"../types/global.js":29,"../types/validate.js":40,"./constants.js":15,"./template.js":18}],17:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});exports.getHandleFromNode=getHandleFromNode;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _base.Monster}});exports.Handle=void 0;var _base=require("../types/base.js");var _stack=require("../types/stack.js");var _validate=require("../types/validate.js");var _proxyobserver=require("../types/proxyobserver.js");var _observer=require("../types/observer.js");var _global=require("../types/global.js");var _is=require("../types/is.js");var _assembler=require("./assembler.js");var _id=require("../types/id.js");function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();normalCompletion=step.done;return step},e:function e(_e2){didErr=true;err=_e2},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var MONSTERDOMHANDLE=Symbol("MonsterHandle");var Handle=function(_Base){_inherits(Handle,_Base);var _super=_createSuper(Handle);function Handle(data){var _this;_classCallCheck(this,Handle);_this=_super.call(this);var self=_assertThisInitialized(_this);self.id=new _id.ID;(0,_validate.validateInstance)(data,_proxyobserver.ProxyObserver);_this.data=data;_this.mutationObserver=createMutationObserver.call(_assertThisInitialized(_this));_this.dataObserver=createDataObserver.call(_assertThisInitialized(_this));_this.data.attachObserver(_this.dataObserver);_this.nodes=new WeakSet;_this.updates=new _stack.Stack;return _this}_createClass(Handle,[{key:"update",value:function update(){return}},{key:"remove",value:function remove(node){if((0,_is.isInstance)(node,(0,_global.getGlobalFunction)("Document"))){node=node.firstElementChild}(0,_validate.validateInstance)(node,(0,_global.getGlobalFunction)("HTMLElement"));if(!this.nodes.has(node)){return this}this.mutationObserver.disconnect(node);delete node.dataset[MONSTERDOMHANDLE];node.removeAttribute(_assembler.ATTRIBUTEPREFIX+"handler");return this}},{key:"append",value:function append(node){if((0,_is.isInstance)(node,(0,_global.getGlobalFunction)("Document"))){node=node.firstElementChild}(0,_validate.validateInstance)(node,(0,_global.getGlobalFunction)("HTMLElement"));if(this.nodes.has(node)){return this}node.dataset[MONSTERDOMHANDLE]=this;node.setAttribute(_assembler.ATTRIBUTEPREFIX+"handler",true);this.mutationObserver.observe(node,{attributes:true,childList:true,subtree:true,characterData:true,characterDataOldValue:true,attributeOldValue:true});this.nodes.add(node);return this}}]);return Handle}(_base.Base);exports.Handle=Handle;function createDataObserver(){var self=this;return new _observer.Observer(function(){self.update()})}function createMutationObserver(){var self=this;var MutationObserver=(0,_global.getGlobalFunction)("MutationObserver");return new MutationObserver(function(mutationsList,observer){var _iterator=_createForOfIteratorHelper(mutationsList),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var mutation=_step.value;self.updates.push(mutation)}}catch(err){_iterator.e(err)}finally{_iterator.f()}self.update()})}function getHandleFromNode(node){var _node$dataset;(0,_validate.validateInstance)(node,(0,_global.getGlobalFunction)("Node"));var handle=(_node$dataset=node.dataset)===null||_node$dataset===void 0?void 0:_node$dataset[MONSTERDOMHANDLE];if(handle===undefined){var parentNode=node===null||node===void 0?void 0:node["parentNode"];if((0,_is.isInstance)(parentNode,(0,_global.getGlobalFunction)("Node"))){return getHandleFromNode(parentNode)}}return handle}_base.Monster.assignToNamespace("Monster.DOM",getHandleFromNode,Handle)},{"../types/base.js":28,"../types/global.js":29,"../types/id.js":30,"../types/is.js":31,"../types/observer.js":32,"../types/proxyobserver.js":34,"../types/stack.js":37,"../types/validate.js":40,"./assembler.js":13}],18:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});exports.findDocumentTemplate=findDocumentTemplate;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _base.Monster}});exports.Template=void 0;var _base=require("../types/base.js");var _validate=require("../types/validate.js");var _global=require("../types/global.js");var _theme=require("./theme.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Template=function(_Base){_inherits(Template,_Base);var _super=_createSuper(Template);function Template(template){var _this;_classCallCheck(this,Template);_this=_super.call(this);var HTMLTemplateElement=(0,_global.getGlobalFunction)("HTMLTemplateElement");(0,_validate.validateInstance)(template,HTMLTemplateElement);_this.template=template;return _this}_createClass(Template,[{key:"getTemplateElement",value:function getTemplateElement(){return this.template}},{key:"createDocumentFragment",value:function createDocumentFragment(){return this.template.content.cloneNode(true)}}]);return Template}(_base.Base);exports.Template=Template;function findDocumentTemplate(id){(0,_validate.validateString)(id);var document=(0,_global.getGlobalObject)("document");var HTMLTemplateElement=(0,_global.getGlobalFunction)("HTMLTemplateElement");var theme=(0,_theme.getDocumentTheme)();var themedID=id+"-"+theme.getName();var template=document.getElementById(themedID);if(template instanceof HTMLTemplateElement){return new Template(template)}template=document.getElementById(id);if(template instanceof HTMLTemplateElement){return new Template(template)}throw new Error("template "+id+" not found.")}_base.Monster.assignToNamespace("Monster.DOM",Template,findDocumentTemplate)},{"../types/base.js":28,"../types/global.js":29,"../types/validate.js":40,"./theme.js":19}],19:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});exports.getDocumentTheme=getDocumentTheme;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _base.Monster}});exports.Theme=void 0;var _base=require("../types/base.js");var _validate=require("../types/validate.js");var _global=require("../types/global.js");var _constants=require("./constants.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Theme=function(_Base){_inherits(Theme,_Base);var _super=_createSuper(Theme);function Theme(name){var _this;_classCallCheck(this,Theme);_this=_super.call(this);(0,_validate.validateString)(name);_this.name=name;return _this}_createClass(Theme,[{key:"getName",value:function getName(){return this.name}}]);return Theme}(_base.Base);exports.Theme=Theme;function getDocumentTheme(){var document=(0,_global.getGlobalObject)("document");var name=_constants.DEFAULT_THEME;var element=document.querySelector("html");if(element instanceof HTMLElement){var theme=element.getAttribute(_constants.ATTRIBUTE_THEME_NAME);if(theme){name=theme}}return new Theme(name)}_base.Monster.assignToNamespace("Monster.DOM",Theme,getDocumentTheme)},{"../types/base.js":28,"../types/global.js":29,"../types/validate.js":40,"./constants.js":15}],20:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getWindow=getWindow;exports.getDocument=getDocument;exports.getDocumentFragmentFromString=getDocumentFragmentFromString;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _global.Monster}});var _global=require("../types/global.js");var _validate=require("../types/validate.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function getDocument(){var _getGlobal;var document=(_getGlobal=(0,_global.getGlobal)())===null||_getGlobal===void 0?void 0:_getGlobal["document"];if(_typeof(document)!=="object"){throw new Error("not supported environment")}return document}function getWindow(){var _getGlobal2;var window=(_getGlobal2=(0,_global.getGlobal)())===null||_getGlobal2===void 0?void 0:_getGlobal2["window"];if(_typeof(window)!=="object"){throw new Error("not supported environment")}return window}function getDocumentFragmentFromString(html){(0,_validate.validateString)(html);var document=getDocument();var template=document.createElement("template");template.innerHTML=html;return template.content}_global.Monster.assignToNamespace("Monster.DOM",getWindow,getDocument,getDocumentFragmentFromString)},{"../types/global.js":29,"../types/validate.js":40}],21:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Handler=void 0;var _namespace=require("../namespace.js");var _base=require("../types/base.js");var _logger=require("./logger.js");var _logentry=require("./logentry.js");var _validate=require("../types/validate.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Handler=function(_Base){_inherits(Handler,_Base);var _super=_createSuper(Handler);function Handler(){var _this;_classCallCheck(this,Handler);_this=_super.call(this);_this.loglevel=_logger.OFF;return _this}_createClass(Handler,[{key:"log",value:function log(entry){(0,_validate.validateInstance)(entry,_logentry.LogEntry);if(this.loglevel<entry.getLogLevel()){return false}return true}},{key:"setLogLevel",value:function setLogLevel(loglevel){(0,_validate.validateInteger)(loglevel);this.loglevel=loglevel;return this}},{key:"getLogLevel",value:function getLogLevel(){return this.loglevel}},{key:"setAll",value:function setAll(){this.setLogLevel(_logger.ALL);return this}},{key:"setTrace",value:function setTrace(){this.setLogLevel(_logger.TRACE);return this}},{key:"setDebug",value:function setDebug(){this.setLogLevel(_logger.DEBUG);return this}},{key:"setInfo",value:function setInfo(){this.setLogLevel(_logger.INFO);return this}},{key:"setWarn",value:function setWarn(){this.setLogLevel(_logger.WARN);return this}},{key:"setError",value:function setError(){this.setLogLevel(_logger.ERROR);return this}},{key:"setFatal",value:function setFatal(){this.setLogLevel(_logger.FATAL);return this}},{key:"setOff",value:function setOff(){this.setLogLevel(_logger.OFF);return this}}]);return Handler}(_base.Base);exports.Handler=Handler;_namespace.Monster.assignToNamespace("Monster.Logging",Handler)},{"../namespace.js":27,"../types/base.js":28,"../types/validate.js":40,"./logentry.js":23,"./logger.js":24}],22:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});Object.defineProperty(exports,"Handler",{enumerable:true,get:function get(){return _handler.Handler}});var _namespace=require("../../namespace.js");var _base=require("../../types/base.js");var _handler=require("../../logging/handler.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var ConsoleHandler=function(_Base){_inherits(ConsoleHandler,_Base);var _super=_createSuper(ConsoleHandler);function ConsoleHandler(){_classCallCheck(this,ConsoleHandler);return _super.call(this)}return ConsoleHandler}(_base.Base);_namespace.Monster.assignToNamespace("Monster.Logging",ConsoleHandler)},{"../../logging/handler.js":21,"../../namespace.js":27,"../../types/base.js":28}],23:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.LogEntry=void 0;var _namespace=require("../namespace.js");var _validate=require("../types/validate.js");var _base=require("../types/base.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var LogEntry=function(_Base){_inherits(LogEntry,_Base);var _super=_createSuper(LogEntry);function LogEntry(loglevel){var _this;_classCallCheck(this,LogEntry);_this=_super.call(this);(0,_validate.validateInteger)(loglevel);_this.loglevel=loglevel;for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}_this.arguments=args;return _this}_createClass(LogEntry,[{key:"getLogLevel",value:function getLogLevel(){return this.loglevel}},{key:"getArguments",value:function getArguments(){return this.arguments}}]);return LogEntry}(_base.Base);exports.LogEntry=LogEntry;_namespace.Monster.assignToNamespace("Monster.Logging",LogEntry)},{"../namespace.js":27,"../types/base.js":28,"../types/validate.js":40}],24:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.OFF=exports.FATAL=exports.ERROR=exports.WARN=exports.INFO=exports.DEBUG=exports.TRACE=exports.ALL=exports.Logger=void 0;var _namespace=require("../namespace.js");var _validate=require("../types/validate.js");var _handler=require("../logging/handler.js");var _logentry=require("../logging/logentry.js");var _base=require("../types/base.js");function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();normalCompletion=step.done;return step},e:function e(_e2){didErr=true;err=_e2},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var ALL=255;exports.ALL=ALL;var TRACE=64;exports.TRACE=TRACE;var DEBUG=32;exports.DEBUG=DEBUG;var INFO=16;exports.INFO=INFO;var WARN=8;exports.WARN=WARN;var ERROR=4;exports.ERROR=ERROR;var FATAL=2;exports.FATAL=FATAL;var OFF=0;exports.OFF=OFF;var Logger=function(_Base){_inherits(Logger,_Base);var _super=_createSuper(Logger);function Logger(){var _this;_classCallCheck(this,Logger);_this=_super.call(this);_this.handler=new Set;return _this}_createClass(Logger,[{key:"addHandler",value:function addHandler(handler){(0,_validate.validateObject)(handler);if(!(handler instanceof _handler.Handler)){throw new Error("the handler must be an instance of Handler")}this.handler.add(handler);return this}},{key:"removeHandler",value:function removeHandler(handler){(0,_validate.validateObject)(handler);if(!(handler instanceof _handler.Handler)){throw new Error("the handler must be an instance of Handler")}this.handler["delete"](handler);return this}},{key:"logTrace",value:function logTrace(){triggerLog.apply(this,[TRACE].concat(Array.prototype.slice.call(arguments)));return this}},{key:"logDebug",value:function logDebug(){triggerLog.apply(this,[DEBUG].concat(Array.prototype.slice.call(arguments)));return this}},{key:"logInfo",value:function logInfo(){triggerLog.apply(this,[INFO].concat(Array.prototype.slice.call(arguments)));return this}},{key:"logWarn",value:function logWarn(){triggerLog.apply(this,[WARN].concat(Array.prototype.slice.call(arguments)));return this}},{key:"logError",value:function logError(){triggerLog.apply(this,[ERROR].concat(Array.prototype.slice.call(arguments)));return this}},{key:"logFatal",value:function logFatal(){triggerLog.apply(this,[FATAL].concat(Array.prototype.slice.call(arguments)));return this}},{key:"getLabel",value:function getLabel(level){(0,_validate.validateInteger)(level);if(level===ALL)return"ALL";if(level===TRACE)return"TRACE";if(level===DEBUG)return"DEBUG";if(level===INFO)return"INFO";if(level===WARN)return"WARN";if(level===ERROR)return"ERROR";if(level===FATAL)return"FATAL";if(level===OFF)return"OFF";return"unknown"}},{key:"getLevel",value:function getLevel(label){(0,_validate.validateString)(label);if(label==="ALL")return ALL;if(label==="TRACE")return TRACE;if(label==="DEBUG")return DEBUG;if(label==="INFO")return INFO;if(label==="WARN")return WARN;if(label==="ERROR")return ERROR;if(label==="FATAL")return FATAL;if(label==="OFF")return OFF;return 0}}]);return Logger}(_base.Base);exports.Logger=Logger;_namespace.Monster.assignToNamespace("Monster.Logging",Logger);function triggerLog(loglevel){var logger=this;for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}var _iterator=_createForOfIteratorHelper(logger.handler),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var handler=_step.value;handler.log(new _logentry.LogEntry(loglevel,args))}}catch(err){_iterator.e(err)}finally{_iterator.f()}return logger}},{"../logging/handler.js":21,"../logging/logentry.js":23,"../namespace.js":27,"../types/base.js":28,"../types/validate.js":40}],25:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.random=random;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _global.Monster}});var _global=require("../types/global.js");function random(min,max){if(min===undefined){min=0}if(max===undefined){max=MAX}if(max<min){throw new Error("max must be greater than min")}return Math.round(create(min,max))}var MAX=1e9;Math.log2=Math.log2||function(n){return Math.log(n)/Math.log(2)};function create(min,max){var crypt;var globalReference=(0,_global.getGlobal)();crypt=(globalReference===null||globalReference===void 0?void 0:globalReference["crypto"])||(globalReference===null||globalReference===void 0?void 0:globalReference["msCrypto"])||(globalReference===null||globalReference===void 0?void 0:globalReference["crypto"])||undefined;if(typeof crypt==="undefined"){throw new Error("missing crypt")}var rval=0;var range=max-min;if(range<2){return min}var bitsNeeded=Math.ceil(Math.log2(range));if(bitsNeeded>53){throw new Error("we cannot generate numbers larger than 53 bits.")}var bytesNeeded=Math.ceil(bitsNeeded/8);var mask=Math.pow(2,bitsNeeded)-1;var byteArray=new Uint8Array(bytesNeeded);crypt.getRandomValues(byteArray);var p=(bytesNeeded-1)*8;for(var i=0;i<bytesNeeded;i++){rval+=byteArray[i]*Math.pow(2,p);p-=8}rval=rval&mask;if(rval>=range){return create(min,max)}return min+rval}_global.Monster.assignToNamespace("Monster.Math",random)},{"../types/global.js":29}],26:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("./namespace.js");require("./types/base.js");require("./types/global.js");require("./types/id.js");require("./types/is.js");require("./types/observer.js");require("./types/observerlist.js");require("./types/proxyobserver.js");require("./types/queue.js");require("./types/randomid.js");require("./types/stack.js");require("./types/tokenlist.js");require("./types/uniquequeue.js");require("./types/validate.js");require("./types/version.js");require("./math/random.js");require("./data/diff.js");require("./data/pathfinder.js");require("./data/pipe.js");require("./data/transformer.js");require("./logging/handler.js");require("./logging/logentry.js");require("./logging/logger.js");require("./logging/handler/console.js");require("./util/clone.js");require("./util/comparator.js");require("./util/freeze.js");require("./constraints/abstract.js");require("./constraints/abstractoperator.js");require("./constraints/andoperator.js");require("./constraints/invalid.js");require("./constraints/isarray.js");require("./constraints/isobject.js");require("./constraints/oroperator.js");require("./constraints/valid.js");require("./dom/util.js");require("./dom/template.js");require("./dom/handle.js");require("./dom/assembler.js");require("./dom/customelement.js");require("./dom/attributes.js");_namespace.Monster.Util.deepFreeze(_namespace.Monster);var rootName;try{rootName=_namespace.Monster.Types.getGlobalObject("__MonsterRootName__")}catch(e){}if(!rootName)rootName="Monster";_namespace.Monster.Types.getGlobal()[rootName]=_namespace.Monster},{"./constraints/abstract.js":1,"./constraints/abstractoperator.js":2,"./constraints/andoperator.js":3,"./constraints/invalid.js":4,"./constraints/isarray.js":5,"./constraints/isobject.js":6,"./constraints/oroperator.js":7,"./constraints/valid.js":8,"./data/diff.js":9,"./data/pathfinder.js":10,"./data/pipe.js":11,"./data/transformer.js":12,"./dom/assembler.js":13,"./dom/attributes.js":14,"./dom/customelement.js":16,"./dom/handle.js":17,"./dom/template.js":18,"./dom/util.js":20,"./logging/handler.js":21,"./logging/handler/console.js":22,"./logging/logentry.js":23,"./logging/logger.js":24,"./math/random.js":25,"./namespace.js":27,"./types/base.js":28,"./types/global.js":29,"./types/id.js":30,"./types/is.js":31,"./types/observer.js":32,"./types/observerlist.js":33,"./types/proxyobserver.js":34,"./types/queue.js":35,"./types/randomid.js":36,"./types/stack.js":37,"./types/tokenlist.js":38,"./types/uniquequeue.js":39,"./types/validate.js":40,"./types/version.js":41,"./util/clone.js":42,"./util/comparator.js":43,"./util/freeze.js":44}],27:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.assignToNamespace=assignToNamespace;exports.Monster=void 0;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}var Namespace=function(){function Namespace(namespace){_classCallCheck(this,Namespace);if(namespace===undefined||typeof namespace!=="string"){throw new Error("namespace is not a string")}this.namespace=namespace}_createClass(Namespace,[{key:"getNamespace",value:function getNamespace(){return this.namespace}},{key:"toString",value:function toString(){return this.getNamespace()}}]);return Namespace}();var Monster=new Namespace("Monster");exports.Monster=Monster;assignToNamespace("Monster",assignToNamespace);function assignToNamespace(ns){var current=namespaceFor(ns.split("."));for(var i=0,l=arguments.length<=1?0:arguments.length-1;i<l;i++){current[objectName(i+1<1||arguments.length<=i+1?undefined:arguments[i+1])]=i+1<1||arguments.length<=i+1?undefined:arguments[i+1]}}function objectName(fn){try{if(typeof fn!=="function"){throw new Error("the first argument is not a function or class.")}if(fn.hasOwnProperty("name")){return fn.name}if("function"===typeof fn.toString){var s=fn.toString();var f=s.match(/^\s*function\s+([^\s(]+)/);if(Array.isArray(f)&&typeof f[1]==="string"){return f[1]}var c=s.match(/^\s*class\s+([^\s(]+)/);if(Array.isArray(c)&&typeof c[1]==="string"){return c[1]}}}catch(e){throw new Error("exception "+e)}throw new Error("the name of the class or function cannot be resolved.")}function namespaceFor(parts){var space=Monster,ns="Monster";for(var i=0;i<parts.length;i++){if("Monster"===parts[i]){continue}ns+="."+parts[i];if(!space.hasOwnProperty(parts[i])){space[parts[i]]=new Namespace(ns)}space=space[parts[i]]}return space}},{}],28:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Base=void 0;var _namespace=require("../namespace.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _wrapNativeSuper(Class){var _cache=typeof Map==="function"?new Map:undefined;_wrapNativeSuper=function _wrapNativeSuper(Class){if(Class===null||!_isNativeFunction(Class))return Class;if(typeof Class!=="function"){throw new TypeError("Super expression must either be null or a function")}if(typeof _cache!=="undefined"){if(_cache.has(Class))return _cache.get(Class);_cache.set(Class,Wrapper)}function Wrapper(){return _construct(Class,arguments,_getPrototypeOf(this).constructor)}Wrapper.prototype=Object.create(Class.prototype,{constructor:{value:Wrapper,enumerable:false,writable:true,configurable:true}});return _setPrototypeOf(Wrapper,Class)};return _wrapNativeSuper(Class)}function _construct(Parent,args,Class){if(_isNativeReflectConstruct()){_construct=Reflect.construct}else{_construct=function _construct(Parent,args,Class){var a=[null];a.push.apply(a,args);var Constructor=Function.bind.apply(Parent,a);var instance=new Constructor;if(Class)_setPrototypeOf(instance,Class.prototype);return instance}}return _construct.apply(null,arguments)}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _isNativeFunction(fn){return Function.toString.call(fn).indexOf("[native code]")!==-1}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Base=function(_Object){_inherits(Base,_Object);var _super=_createSuper(Base);function Base(){_classCallCheck(this,Base);return _super.apply(this,arguments)}_createClass(Base,[{key:"toString",value:function toString(){return JSON.stringify(this)}}]);return Base}(_wrapNativeSuper(Object));exports.Base=Base;_namespace.Monster.assignToNamespace("Monster.Types",Base)},{"../namespace.js":27}],29:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getGlobal=getGlobal;exports.getGlobalObject=getGlobalObject;exports.getGlobalFunction=getGlobalFunction;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");var _validate=require("./validate.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}var globalReference;(function(){if((typeof globalThis==="undefined"?"undefined":_typeof(globalThis))==="object"){globalReference=globalThis;return}Object.defineProperty(Object.prototype,"__monster__",{get:function get(){return this},configurable:true});__monster__.globalThis=__monster__;delete Object.prototype.__monster__;globalReference=globalThis})();function getGlobal(){return globalReference}function getGlobalObject(name){var _globalReference;(0,_validate.validateString)(name);var o=(_globalReference=globalReference)===null||_globalReference===void 0?void 0:_globalReference[name];if(typeof o==="undefined")throw new Error("the object "+name+" is not defined");(0,_validate.validateObject)(o);return o}function getGlobalFunction(name){var _globalReference2;(0,_validate.validateString)(name);var f=(_globalReference2=globalReference)===null||_globalReference2===void 0?void 0:_globalReference2[name];if(typeof f==="undefined")throw new Error("the function "+name+" is not defined");(0,_validate.validateFunction)(f);return f}_namespace.Monster.assignToNamespace("Monster.Types",getGlobal,getGlobalObject,getGlobalFunction)},{"../namespace.js":27,"./validate.js":40}],30:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _base.Monster}});exports.ID=void 0;var _base=require("./base.js");var _validate=require("./validate.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var internalCounter=new Map;var ID=function(_Base){_inherits(ID,_Base);var _super=_createSuper(ID);function ID(prefix){var _this;_classCallCheck(this,ID);_this=_super.call(this);if(prefix===undefined){prefix="id"}(0,_validate.validateString)(prefix);if(!internalCounter.has(prefix)){internalCounter.set(prefix,1)}var count=internalCounter.get(prefix);_this.id=prefix+count;internalCounter.set(prefix,++count);return _this}_createClass(ID,[{key:"toString",value:function toString(){return this.id}}]);return ID}(_base.Base);exports.ID=ID;_base.Monster.assignToNamespace("Monster.Types",ID)},{"./base.js":28,"./validate.js":40}],31:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.isPrimitive=isPrimitive;exports.isBoolean=isBoolean;exports.isString=isString;exports.isObject=isObject;exports.isInstance=isInstance;exports.isArray=isArray;exports.isFunction=isFunction;exports.isIterable=isIterable;exports.isInteger=isInteger;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function isIterable(value){if(value===undefined)return false;if(value===null)return false;return typeof(value===null||value===void 0?void 0:value[Symbol.iterator])==="function"}function isPrimitive(value){var type;if(value===undefined||value===null||value===NaN){return true}type=_typeof(value);if(type==="string"||type==="number"||type==="boolean"||type==="symbol"){return true}return false}function isBoolean(value){if(value===true||value===false){return true}return false}function isString(value){if(value===undefined||typeof value!=="string"){return false}return true}function isObject(value){if(isArray(value))return false;if(isPrimitive(value))return false;if(_typeof(value)==="object"){return true}return false}function isInstance(value,instance){if(!isObject(value))return false;if(!isFunction(instance))return false;if(!instance.hasOwnProperty("prototype"))return false;return value instanceof instance?true:false}function isArray(value){if(Array.isArray(value)){return true}return false}function isFunction(value){if(isArray(value))return false;if(isPrimitive(value))return false;if(typeof value==="function"){return true}return false}function isInteger(value){return Number.isInteger(value)}_namespace.Monster.assignToNamespace("Monster.Types",isPrimitive,isBoolean,isString,isObject,isArray,isFunction,isIterable,isInteger)},{"../namespace.js":27}],32:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Observer=void 0;var _namespace=require("../namespace.js");var _tokenlist=require("./tokenlist.js");var _is=require("./is.js");var _base=require("./base.js");var _uniquequeue=require("./uniquequeue.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Observer=function(_Base){_inherits(Observer,_Base);var _super=_createSuper(Observer);function Observer(callback){var _this;_classCallCheck(this,Observer);_this=_super.call(this);if(typeof callback!=="function"){throw new Error("observer callback must be a function")}_this.callback=callback;for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}_this.arguments=args;_this.tags=new _tokenlist.TokenList;_this.queue=new _uniquequeue.UniqueQueue;return _this}_createClass(Observer,[{key:"addTag",value:function addTag(tag){this.tags.add(tag);return this}},{key:"removeTag",value:function removeTag(tag){this.tags.remove(tag);return this}},{key:"getTags",value:function getTags(){return this.tags.entries()}},{key:"hasTag",value:function hasTag(tag){return this.tags.contains(tag)}},{key:"update",value:function update(subject){var self=this;return new Promise(function(resolve,reject){if(!(0,_is.isObject)(subject)){reject("subject must be an object");return}self.queue.add(subject);setTimeout(function(){try{if(self.queue.isEmpty()){resolve();return}var s=self.queue.poll();var result=self.callback.apply(s,self.arguments);if((0,_is.isObject)(result)&&result instanceof Promise){result.then(resolve)["catch"](reject);return}resolve(result)}catch(e){reject(e)}},0)})}}]);return Observer}(_base.Base);exports.Observer=Observer;_namespace.Monster.assignToNamespace("Monster.Types",Observer)},{"../namespace.js":27,"./base.js":28,"./is.js":31,"./tokenlist.js":38,"./uniquequeue.js":39}],33:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.ObserverList=void 0;var _namespace=require("../namespace.js");var _base=require("./base.js");var _observer=require("./observer.js");var _validate=require("./validate.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var ObserverList=function(_Base){_inherits(ObserverList,_Base);var _super=_createSuper(ObserverList);function ObserverList(){var _this;_classCallCheck(this,ObserverList);_this=_super.call(this);_this.observers=[];return _this}_createClass(ObserverList,[{key:"attach",value:function attach(observer){(0,_validate.validateInstance)(observer,_observer.Observer);this.observers.push(observer);return this}},{key:"detach",value:function detach(observer){(0,_validate.validateInstance)(observer,_observer.Observer);var i=0,l=this.observers.length;for(;i<l;i++){if(this.observers[i]===observer){this.observers.splice(i,1)}}return this}},{key:"contains",value:function contains(observer){(0,_validate.validateInstance)(observer,_observer.Observer);var i=0,l=this.observers.length;for(;i<l;i++){if(this.observers[i]===observer){return true}}return false}},{key:"notify",value:function notify(subject){var pomises=[];var i=0,l=this.observers.length;for(;i<l;i++){pomises.push(this.observers[i].update(subject))}return Promise.all(pomises)}}]);return ObserverList}(_base.Base);exports.ObserverList=ObserverList;_namespace.Monster.assignToNamespace("Monster.Types",ObserverList)},{"../namespace.js":27,"./base.js":28,"./observer.js":32,"./validate.js":40}],34:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.ProxyObserver=void 0;var _namespace=require("../namespace.js");var _base=require("./base.js");var _validate=require("./validate.js");var _observerlist=require("./observerlist.js");var _observer=require("./observer.js");var _is=require("./is.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var ProxyObserver=function(_Base){_inherits(ProxyObserver,_Base);var _super=_createSuper(ProxyObserver);function ProxyObserver(object){var _this;_classCallCheck(this,ProxyObserver);_this=_super.call(this);(0,_validate.validateObject)(object);_this.realSubject=object;_this.subject=new Proxy(object,getHandler.call(_assertThisInitialized(_this)));_this.objectMap=new WeakMap;_this.objectMap.set(_this.realSubject,_this.subject);_this.observers=new _observerlist.ObserverList;return _this}_createClass(ProxyObserver,[{key:"getSubject",value:function getSubject(){return this.subject}},{key:"getRealSubject",value:function getRealSubject(){return this.realSubject}},{key:"attachObserver",value:function attachObserver(observer){this.observers.attach(observer);return this}},{key:"detachObserver",value:function detachObserver(observer){this.observers.detach(observer);return this}},{key:"notifyObservers",value:function notifyObservers(){return this.observers.notify(this)}},{key:"containsObserver",value:function containsObserver(observer){return this.observers.contains(observer)}}]);return ProxyObserver}(_base.Base);exports.ProxyObserver=ProxyObserver;_namespace.Monster.assignToNamespace("Monster.Types",ProxyObserver);function getHandler(){var proxy=this;var handler={get:function get(target,key,receiver){var value=Reflect.get(target,key,receiver);if(_typeof(key)==="symbol"){return value}if((0,_is.isPrimitive)(value)){return value}if((0,_is.isArray)(value)||(0,_is.isObject)(value)){if(proxy.objectMap.has(value)){return proxy.objectMap.get(value)}else{var p=new Proxy(value,handler);proxy.objectMap.set(value,p);return p}}return value},set:function set(target,key,value,receiver){var result=Reflect.set(target,key,value,receiver);if((typeof property==="undefined"?"undefined":_typeof(property))!=="symbol"){proxy.observers.notify(proxy)}return result},deleteProperty:function deleteProperty(target,key){if(key in target){delete target[key];if(_typeof(key)!=="symbol"){proxy.observers.notify(proxy)}return true}return false},defineProperty:function defineProperty(target,key,descriptor){var result=Reflect.defineProperty(target,key,descriptor);if(_typeof(key)!=="symbol"){proxy.observers.notify(proxy)}return result},setPrototypeOf:function setPrototypeOf(target,key){var result=Reflect.setPrototypeOf(object1,key);if(_typeof(key)!=="symbol"){proxy.observers.notify(proxy)}return result}};return handler}},{"../namespace.js":27,"./base.js":28,"./is.js":31,"./observer.js":32,"./observerlist.js":33,"./validate.js":40}],35:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _base.Monster}});exports.Queue=void 0;var _base=require("./base.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Queue=function(_Base){_inherits(Queue,_Base);var _super=_createSuper(Queue);function Queue(){var _this;_classCallCheck(this,Queue);_this=_super.call(this);_this.data=[];return _this}_createClass(Queue,[{key:"isEmpty",value:function isEmpty(){return this.data.length===0}},{key:"peek",value:function peek(){if(this.isEmpty()){return undefined}return this.data[0]}},{key:"add",value:function add(value){this.data.push(value);return this}},{key:"clear",value:function clear(){this.data=[];return this}},{key:"poll",value:function poll(){if(this.isEmpty()){return undefined}return this.data.shift()}}]);return Queue}(_base.Base);exports.Queue=Queue;_base.Monster.assignToNamespace("Monster.Types",Queue)},{"./base.js":28}],36:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _id.Monster}});exports.RandomID=void 0;var _id=require("./id.js");var _global=require("./global.js");var _random=require("../math/random.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var internalCounter=0;var RandomID=function(_ID){_inherits(RandomID,_ID);var _super=_createSuper(RandomID);function RandomID(){var _this;_classCallCheck(this,RandomID);_this=_super.call(this);internalCounter+=1;_this.id=(0,_global.getGlobal)().btoa((0,_random.random)(1,1e4)).replace(/=/g,"").replace(/^[0-9]+/,"X")+internalCounter;return _this}return RandomID}(_id.ID);exports.RandomID=RandomID;_id.Monster.assignToNamespace("Monster.Types",RandomID)},{"../math/random.js":25,"./global.js":29,"./id.js":30}],37:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _base.Monster}});exports.Stack=void 0;var _base=require("./base.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Stack=function(_Base){_inherits(Stack,_Base);var _super=_createSuper(Stack);function Stack(){var _this;_classCallCheck(this,Stack);_this=_super.call(this);_this.data=[];return _this}_createClass(Stack,[{key:"isEmpty",value:function isEmpty(){return this.data.length===0}},{key:"peek",value:function peek(){var _this$data;if(this.isEmpty()){return undefined}return(_this$data=this.data)===null||_this$data===void 0?void 0:_this$data[this.data.length-1]}},{key:"push",value:function push(value){this.data.push(value);return this}},{key:"clear",value:function clear(){this.data=[];return this}},{key:"pop",value:function pop(){if(this.isEmpty()){return undefined}return this.data.pop()}}]);return Stack}(_base.Base);exports.Stack=Stack;_base.Monster.assignToNamespace("Monster.Types",Stack)},{"./base.js":28}],38:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.TokenList=void 0;var _namespace=require("../namespace.js");var _base=require("./base.js");var _is=require("../types/is.js");var _validate=require("../types/validate.js");function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();normalCompletion=step.done;return step},e:function e(_e2){didErr=true;err=_e2},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var TokenList=function(_Base){_inherits(TokenList,_Base);var _super=_createSuper(TokenList);function TokenList(init){var _this;_classCallCheck(this,TokenList);_this=_super.call(this);_this.tokens=new Set;if(typeof init!=="undefined"){_this.add(init)}return _this}_createClass(TokenList,[{key:"getIterator",value:function getIterator(){return this[Symbol.iterator]()}},{key:Symbol.iterator,value:function value(){var index=0;var entries=this.entries();return{next:function next(){if(index<entries.length){return{value:entries===null||entries===void 0?void 0:entries[index++],done:false}}else{return{done:true}}}}}},{key:"contains",value:function contains(value){var _this2=this;if((0,_is.isString)(value)){value=value.trim();var counter=0;value.split(" ").forEach(function(token){if(_this2.tokens.has(token.trim())===false)return false;counter++});return counter>0?true:false}if((0,_is.isIterable)(value)){var _counter=0;var _iterator=_createForOfIteratorHelper(value),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var token=_step.value;(0,_validate.validateString)(token);if(this.tokens.has(token.trim())===false)return false;_counter++}}catch(err){_iterator.e(err)}finally{_iterator.f()}return _counter>0?true:false}return false}},{key:"add",value:function add(value){var _this3=this;if((0,_is.isString)(value)){value.split(" ").forEach(function(token){_this3.tokens.add(token.trim())})}else if((0,_is.isIterable)(value)){var _iterator2=_createForOfIteratorHelper(value),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var token=_step2.value;(0,_validate.validateString)(token);this.tokens.add(token.trim())}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}}else if(typeof value!=="undefined"){throw new TypeError("unsupported value")}return this}},{key:"clear",value:function clear(){this.tokens.clear();return this}},{key:"remove",value:function remove(value){var _this4=this;if((0,_is.isString)(value)){value.split(" ").forEach(function(token){_this4.tokens["delete"](token.trim())})}else if((0,_is.isIterable)(value)){var _iterator3=_createForOfIteratorHelper(value),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var token=_step3.value;(0,_validate.validateString)(token);this.tokens["delete"](token.trim())}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}}else if(typeof value!=="undefined"){throw new TypeError("unsupported value")}return this}},{key:"replace",value:function replace(token,newToken){(0,_validate.validateString)(token);(0,_validate.validateString)(newToken);if(!this.contains(token)){return this}var a=Array.from(this.tokens);var i=a.indexOf(token);if(i===-1)return this;a.splice(i,1,newToken);this.tokens=new Set;this.add(a);return this}},{key:"toggle",value:function toggle(value){var _this5=this;if((0,_is.isString)(value)){value.split(" ").forEach(function(token){toggleValue.call(_this5,token)})}else if((0,_is.isIterable)(value)){var _iterator4=_createForOfIteratorHelper(value),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var token=_step4.value;toggleValue.call(this,token)}}catch(err){_iterator4.e(err)}finally{_iterator4.f()}}else if(typeof value!=="undefined"){throw new TypeError("unsupported value")}return this}},{key:"entries",value:function entries(){return Array.from(this.tokens)}},{key:"forEach",value:function forEach(callback){(0,_validate.validateFunction)(callback);this.tokens.forEach(callback);return this}},{key:"toString",value:function toString(){return this.entries().join(" ")}}]);return TokenList}(_base.Base);exports.TokenList=TokenList;function toggleValue(token){if(!(this instanceof TokenList))throw Error("must be called with TokenList.call");(0,_validate.validateString)(token);token=token.trim();if(this.contains(token)){this.remove(token);return this}this.add(token);return this}_namespace.Monster.assignToNamespace("Monster.Types",TokenList)},{"../namespace.js":27,"../types/is.js":31,"../types/validate.js":40,"./base.js":28}],39:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _queue.Monster}});exports.UniqueQueue=void 0;var _queue=require("./queue.js");var _validate=require("./validate.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _get(target,property,receiver){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(receiver)}return desc.value}}return _get(target,property,receiver||target)}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break}return object}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var UniqueQueue=function(_Queue){_inherits(UniqueQueue,_Queue);var _super=_createSuper(UniqueQueue);function UniqueQueue(){var _this;_classCallCheck(this,UniqueQueue);_this=_super.call(this);_this.unique=new WeakSet;return _this}_createClass(UniqueQueue,[{key:"add",value:function add(value){(0,_validate.validateObject)(value);if(!this.unique.has(value)){this.unique.add(value);_get(_getPrototypeOf(UniqueQueue.prototype),"add",this).call(this,value)}return this}},{key:"clear",value:function clear(){_get(_getPrototypeOf(UniqueQueue.prototype),"clear",this).call(this);this.unique=new WeakSet;return this}},{key:"poll",value:function poll(){if(this.isEmpty()){return undefined}var value=this.data.shift();this.unique["delete"](value);return value}}]);return UniqueQueue}(_queue.Queue);exports.UniqueQueue=UniqueQueue;_queue.Monster.assignToNamespace("Monster.Types",UniqueQueue)},{"./queue.js":35,"./validate.js":40}],40:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.validatePrimitive=validatePrimitive;exports.validateBoolean=validateBoolean;exports.validateString=validateString;exports.validateObject=validateObject;exports.validateInstance=validateInstance;exports.validateArray=validateArray;exports.validateFunction=validateFunction;exports.validateIterable=validateIterable;exports.validateInteger=validateInteger;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");var _is=require("./is.js");function validateIterable(value){if(!(0,_is.isIterable)(value)){throw new TypeError("value is not iterable")}return value}function validatePrimitive(value){if(!(0,_is.isPrimitive)(value)){throw new TypeError("value is not a primitive")}return value}function validateBoolean(value){if(!(0,_is.isBoolean)(value)){throw new TypeError("value is not a boolean")}return value}function validateString(value){if(!(0,_is.isString)(value)){throw new TypeError("value is not a string")}return value}function validateObject(value){if(!(0,_is.isObject)(value)){throw new TypeError("value is not a object")}return value}function validateInstance(value,instance){if(!(0,_is.isInstance)(value,instance)){var n="";if((0,_is.isObject)(instance)||(0,_is.isFunction)(instance)){n=instance===null||instance===void 0?void 0:instance["name"]}if(n){n=" "+n}throw new TypeError("value is not an instance of"+n)}return value}function validateArray(value){if(!(0,_is.isArray)(value)){throw new TypeError("value is not an array")}return value}function validateFunction(value){if(!(0,_is.isFunction)(value)){throw new TypeError("value is not a function")}return value}function validateInteger(value){if(!(0,_is.isInteger)(value)){throw new TypeError("value is not an integer")}return value}_namespace.Monster.assignToNamespace("Monster.Types",validatePrimitive,validateBoolean,validateString,validateObject,validateArray,validateFunction,validateIterable,validateInteger)},{"../namespace.js":27,"./is.js":31}],41:[function(require,module,exports){"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}Object.defineProperty(exports,"__esModule",{value:true});exports.getVersion=getVersion;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});exports.Version=void 0;var _namespace=require("../namespace.js");var _base=require("./base.js");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Version=function(_Base){_inherits(Version,_Base);var _super=_createSuper(Version);function Version(major,minor,patch){var _this;_classCallCheck(this,Version);_this=_super.call(this);if(typeof major==="string"&&minor===undefined&&patch===undefined){var parts=major.toString().split(".");major=parseInt(parts[0]||0);minor=parseInt(parts[1]||0);patch=parseInt(parts[2]||0)}if(major===undefined){throw new Error("major version is undefined")}if(minor===undefined){minor=0}if(patch===undefined){patch=0}_this.major=parseInt(major);_this.minor=parseInt(minor);_this.patch=parseInt(patch);if(isNaN(_this.major)){throw new Error("major is not a number")}if(isNaN(_this.minor)){throw new Error("minor is not a number")}if(isNaN(_this.patch)){throw new Error("patch is not a number")}return _this}_createClass(Version,[{key:"toString",value:function toString(){return this.major+"."+this.minor+"."+this.patch}},{key:"compareTo",value:function compareTo(version){if(version instanceof Version){version=version.toString()}if(typeof version!=="string"){throw new Error("type exception")}if(version===this.toString()){return 0}var a=[this.major,this.minor,this.patch];var b=version.split(".");var len=Math.max(a.length,b.length);for(var i=0;i<len;i+=1){if(a[i]&&!b[i]&&parseInt(a[i])>0||parseInt(a[i])>parseInt(b[i])){return 1}else if(b[i]&&!a[i]&&parseInt(b[i])>0||parseInt(a[i])<parseInt(b[i])){return-1}}return 0}}]);return Version}(_base.Base);exports.Version=Version;_namespace.Monster.assignToNamespace("Monster.Types",Version);var monsterVersion;function getVersion(){if(monsterVersion instanceof Version){return monsterVersion}monsterVersion=new Version("1.9.0");return monsterVersion}_namespace.Monster.assignToNamespace("Monster",getVersion)},{"../namespace.js":27,"./base.js":28}],42:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.clone=clone;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");var _is=require("../types/is.js");var _global=require("../types/global.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function clone(obj){if(null===obj){return obj}if((0,_is.isPrimitive)(obj)){return obj}if((0,_is.isFunction)(obj)){return obj}if((0,_is.isArray)(obj)){var copy=[];for(var i=0,len=obj.length;i<len;i++){copy[i]=clone(obj[i])}return copy}if((0,_is.isObject)(obj)){if(obj instanceof Date){var _copy=new Date;_copy.setTime(obj.getTime());return _copy}if(typeof Element!=="undefined"&&obj instanceof Element)return obj;if(typeof HTMLDocument!=="undefined"&&obj instanceof HTMLDocument)return obj;if(typeof DocumentFragment!=="undefined"&&obj instanceof DocumentFragment)return obj;if(obj===(0,_global.getGlobal)())return obj;if(typeof globalContext!=="undefined"&&obj===globalContext)return obj;if(typeof window!=="undefined"&&obj===window)return obj;if(typeof document!=="undefined"&&obj===document)return obj;if(typeof navigator!=="undefined"&&obj===navigator)return obj;if(typeof JSON!=="undefined"&&obj===JSON)return obj;try{if(obj instanceof Proxy){return obj}}catch(e){}return cloneObject(obj)}throw new Error("unable to clone obj! its type isn't supported.")}function cloneObject(obj){var copy;if(_typeof(obj.hasOwnProperty("getClone"))&&obj.getClone==="function"){return obj.getClone()}copy={};if(typeof obj.constructor==="function"&&typeof obj.constructor.call==="function"){copy=new obj.constructor}for(var key in obj){if(!obj.hasOwnProperty(key)){continue}if(_namespace.Monster.Types.isPrimitive(obj[key])){copy[key]=obj[key];continue}copy[key]=clone(obj[key])}return copy}_namespace.Monster.assignToNamespace("Monster.Util",clone)},{"../namespace.js":27,"../types/global.js":29,"../types/is.js":31}],43:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _base.Monster}});exports.Comparator=void 0;var _base=require("../types/base.js");var _is=require("../types/is.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else{result=Super.apply(this,arguments)}return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}var Comparator=function(_Base){_inherits(Comparator,_Base);var _super=_createSuper(Comparator);function Comparator(callback){var _this;_classCallCheck(this,Comparator);_this=_super.call(this);if((0,_is.isFunction)(callback)){_this.compare=callback}else if(callback!==undefined){throw new TypeError("unsupported type")}else{_this.compare=function(a,b){if(_typeof(a)!==_typeof(b)){throw new TypeError("impractical comparison")}if(a===b){return 0}return a<b?-1:1}}return _this}_createClass(Comparator,[{key:"reverse",value:function reverse(){var original=this.compare;this.compare=function(a,b){return original(b,a)};return this}},{key:"equal",value:function equal(a,b){return this.compare(a,b)===0}},{key:"greaterThan",value:function greaterThan(a,b){return this.compare(a,b)>0}},{key:"greaterThanOrEqual",value:function greaterThanOrEqual(a,b){return this.greaterThan(a,b)||this.equal(a,b)}},{key:"lessThanOrEqual",value:function lessThanOrEqual(a,b){return this.lessThan(a,b)||this.equal(a,b)}},{key:"lessThan",value:function lessThan(a,b){return this.compare(a,b)<0}}]);return Comparator}(_base.Base);exports.Comparator=Comparator;_base.Monster.assignToNamespace("Monster.Util",Comparator)},{"../types/base.js":28,"../types/is.js":31}],44:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.deepFreeze=deepFreeze;Object.defineProperty(exports,"Monster",{enumerable:true,get:function get(){return _namespace.Monster}});var _namespace=require("../namespace.js");var _validate=require("../types/validate.js");function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();normalCompletion=step.done;return step},e:function e(_e2){didErr=true;err=_e2},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function deepFreeze(object){(0,_validate.validateObject)(object);var propNames=Object.getOwnPropertyNames(object);var _iterator=_createForOfIteratorHelper(propNames),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var name=_step.value;var value=object[name];object[name]=value&&_typeof(value)==="object"?deepFreeze(value):value}}catch(err){_iterator.e(err)}finally{_iterator.f()}return Object.freeze(object)}_namespace.Monster.assignToNamespace("Monster.Util",deepFreeze)},{"../namespace.js":27,"../types/validate.js":40}]},{},[26]); diff --git a/packages/monster/source/dom/attributes.js b/packages/monster/source/dom/attributes.js new file mode 100644 index 0000000000000000000000000000000000000000..caf1c9821bca95f601b52e4a602aa3eb902a6efc --- /dev/null +++ b/packages/monster/source/dom/attributes.js @@ -0,0 +1,287 @@ +'use strict'; + +/** + * @author schukai GmbH + */ + +import {Monster} from '../namespace.js'; +import {TokenList} from "../types/tokenlist.js"; +import {validateInstance, validateString} from "../types/validate.js"; + + +/** + * With this method tokens in an attribute can be switched on or off. For example, classes can be switched on and off in the elements class attribute. + * + * Tokens are always separated by a space. + * + * You can call the method via the monster namespace `new Monster.DOM.toggleAttributeToken()`. + * + * ``` + * <script type="module"> + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/attributes.js'; + * Monster.DOM.toggleAttributeToken(); + * </script> + * ``` + * + * Alternatively, you can also integrate this function individually. + * + * ``` + * <script type="module"> + * import {toggleAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/attributes.js'; + * toggleAttributeToken(); + * </script> + * ``` + * + * @since 1.9.0 + * @copyright schukai GmbH + * @memberOf Monster/DOM + * @param {HTMLElement} element + * @param {string} key + * @param {string} token + * @return {HTMLElement} + */ +function toggleAttributeToken(element, key, token) { + validateInstance(element, HTMLElement); + validateString(token) + validateString(key) + + if (!element.hasAttribute(key)) { + element.setAttribute(key, token); + return element; + } + + element.setAttribute(key, new TokenList(element.getAttribute(key)).toggle(token).toString()); + + return element +} + +/** + * this method can be used to add a token to an attribute. Tokens are always separated by a space. + * + * You can call the method via the monster namespace `new Monster.DOM.addAttributeToken()`. + * + * ``` + * <script type="module"> + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/attributes.js'; + * Monster.DOM.addAttributeToken(); + * </script> + * ``` + * + * Alternatively, you can also integrate this function individually. + * + * ``` + * <script type="module"> + * import {addAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/attributes.js'; + * addAttributeToken(); + * </script> + * ``` + * + * @since 1.9.0 + * @copyright schukai GmbH + * @memberOf Monster/DOM + * @param {HTMLElement} element + * @param {string} key + * @param {string} token + * @return {HTMLElement} + */ +function addAttributeToken(element, key, token) { + validateInstance(element, HTMLElement); + validateString(token) + validateString(key) + + if (!element.hasAttribute(key)) { + element.setAttribute(key, token); + return element; + } + + element.setAttribute(key, new TokenList(element.getAttribute(key)).add(token).toString()); + + return element +} + +/** + * This function can be used to remove tokens from an attribute. + * + * Tokens are always separated by a space. + * + * You can call the method via the monster namespace `new Monster.DOM.removeAttributeToken()`. + * + * ``` + * <script type="module"> + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/attributes.js'; + * Monster.DOM.removeAttributeToken(); + * </script> + * ``` + * + * Alternatively, you can also integrate this function individually. + * + * ``` + * <script type="module"> + * import {removeAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/attributes.js'; + * removeAttributeToken(); + * </script> + * ``` + * + * @since 1.9.0 + * @copyright schukai GmbH + * @memberOf Monster/DOM + * @param {HTMLElement} element + * @param {string} key + * @param {string} token + * @return {HTMLElement} + */ +function removeAttributeToken(element, key, token) { + validateInstance(element, HTMLElement); + validateString(token) + validateString(key) + + if (!element.hasAttribute(key)) { + return element; + } + + element.setAttribute(key, new TokenList(element.getAttribute(key)).remove(token).toString()); + + return element +} + +/** + * This method can be used to determine whether an attribute has a token. + * + * Tokens are always separated by a space. + * + * You can call the method via the monster namespace `new Monster.DOM.containsAttributeToken()`. + * + * ``` + * <script type="module"> + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/attributes.js'; + * Monster.DOM.containsAttributeToken(); + * </script> + * ``` + * + * Alternatively, you can also integrate this function individually. + * + * ``` + * <script type="module"> + * import {containsAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/attributes.js'; + * containsAttributeToken(); + * </script> + * ``` + * + * @since 1.9.0 + * @copyright schukai GmbH + * @memberOf Monster/DOM + * @param {HTMLElement} element + * @param {string} key + * @param {string} token + * @return {boolean} + */ +function containsAttributeToken(element, key, token) { + validateInstance(element, HTMLElement); + validateString(token) + validateString(key) + + if (!element.hasAttribute(key)) { + return false; + } + + return new TokenList(element.getAttribute(key)).contains(token); + +} + +/** + * Tokens are always separated by a space. + * + * You can call the method via the monster namespace `new Monster.DOM.replaceAttributeToken()`. + * + * ``` + * <script type="module"> + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/attributes.js'; + * Monster.DOM.replaceAttributeToken(); + * </script> + * ``` + * + * Alternatively, you can also integrate this function individually. + * + * ``` + * <script type="module"> + * import {replaceAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/attributes.js'; + * replaceAttributeToken(); + * </script> + * ``` + * + * @since 1.9.0 + * @copyright schukai GmbH + * @memberOf Monster/DOM + * @param {HTMLElement} element + * @param {string} key + * @param {string} from + * @param {string} to + * @return {HTMLElement} + */ +function replaceAttributeToken(element, key, from, to) { + validateInstance(element, HTMLElement); + validateString(from) + validateString(to) + validateString(key) + + if (!element.hasAttribute(key)) { + return element; + } + + element.setAttribute(key, new TokenList(element.getAttribute(key)).replace(from, to).toString()); + + return element +} + +/** + * Tokens are always separated by a space. + * + * You can call the method via the monster namespace `new Monster.DOM.clearAttributeTokens()`. + * + * ``` + * <script type="module"> + * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/attributes.js'; + * Monster.DOM.clearAttributeTokens(); + * </script> + * ``` + * + * Alternatively, you can also integrate this function individually. + * + * ``` + * <script type="module"> + * import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.9.0/dist/modules/dom/attributes.js'; + * clearAttributeTokens(); + * </script> + * ``` + * + * @since 1.9.0 + * @copyright schukai GmbH + * @memberOf Monster/DOM + * @param {HTMLElement} element + * @param {string} key + * @return {HTMLElement} + */ +function clearAttributeTokens(element, key) { + validateInstance(element, HTMLElement); + validateString(key) + + if (!element.hasAttribute(key)) { + return element; + } + + element.setAttribute(key, ""); + + return element +} + + +Monster.assignToNamespace('Monster.DOM', clearAttributeTokens, replaceAttributeToken, containsAttributeToken, removeAttributeToken, addAttributeToken, toggleAttributeToken); +export { + Monster, + clearAttributeTokens, + replaceAttributeToken, + containsAttributeToken, + removeAttributeToken, + addAttributeToken, + toggleAttributeToken +} \ No newline at end of file diff --git a/packages/monster/source/dom/constants.js b/packages/monster/source/dom/constants.js index 5bb72d5bf9c0e1feb9c46ab85a706a39d376563a..9121fecf6df3184c0d1be036f32d11746529a67e 100644 --- a/packages/monster/source/dom/constants.js +++ b/packages/monster/source/dom/constants.js @@ -76,6 +76,20 @@ const ATTRIBUTE_UPDATER_INSERT_REFERENCE = ATTRIBUTE_PREFIX + 'insert-reference' */ const ATTRIBUTE_UPDATER_REMOVE = ATTRIBUTE_PREFIX + 'remove'; +/** + * @memberOf Monster/DOM + * @type {string} + * @since 1.9.0 + */ +const ATTRIBUTE_UPDATER_BIND = ATTRIBUTE_PREFIX + 'bind'; + +/** + * @memberOf Monster/DOM + * @type {string} + * @since 1.9.0 + */ +const ATTRIBUTE_UPDATER_HASSYMBOL = ATTRIBUTE_PREFIX + 'hassymbol'; + export { Monster, @@ -88,5 +102,7 @@ export { ATTRIBUTE_UPDATER_REPLACE, ATTRIBUTE_UPDATER_INSERT, ATTRIBUTE_UPDATER_INSERT_REFERENCE, - ATTRIBUTE_UPDATER_REMOVE + ATTRIBUTE_UPDATER_REMOVE, + ATTRIBUTE_UPDATER_BIND, + ATTRIBUTE_UPDATER_HASSYMBOL } \ No newline at end of file diff --git a/packages/monster/source/dom/updater.js b/packages/monster/source/dom/updater.js index 1a5ea9b045035a111dc8e24d21288bbc665601fc..05f9a7f1ff945194d4d290b783346e122c83b964 100644 --- a/packages/monster/source/dom/updater.js +++ b/packages/monster/source/dom/updater.js @@ -1,5 +1,6 @@ 'use strict'; +import {Pathfinder} from "../data/pathfinder.js"; import {Pipe} from "../data/pipe.js"; import {Base, Monster} from "../types/base.js"; import {isInstance, isArray} from "../types/is.js"; @@ -13,7 +14,9 @@ import { ATTRIBUTE_UPDATER_ATTRIBUTES, ATTRIBUTE_UPDATER_INSERT, ATTRIBUTE_UPDATER_REMOVE, - ATTRIBUTE_UPDATER_INSERT_REFERENCE + ATTRIBUTE_UPDATER_INSERT_REFERENCE, + ATTRIBUTE_UPDATER_BIND, + ATTRIBUTE_UPDATER_HASSYMBOL } from "../dom/constants.js"; import {getDocument} from "./util.js"; @@ -22,6 +25,12 @@ import {getDocument} from "./util.js"; */ +/** + * @private + * @type {Symbol} + */ +const symbol = Symbol('monster-updater'); + /** * The updater class connects an object with the dom. in this way, structures and contents in the DOM can be programmatically adapted via attributes. * @@ -98,7 +107,15 @@ class Updater extends Base { */ this.element = validateInstance(element, HTMLElement); - if(subject===undefined) subject = {} + + if (this.element?.[symbol] === undefined) { + this.element[symbol] = new Set; + } + + this.element[symbol].add(this); + this.element.setAttribute(ATTRIBUTE_UPDATER_HASSYMBOL,symbol.toString()); + + if (subject === undefined) subject = {} if (!isInstance(subject, ProxyObserver)) { subject = new ProxyObserver(subject); } @@ -122,6 +139,41 @@ class Updater extends Base { } })); + this.eventTypes = ['keyup', 'click']; + + + } + + /** + * + * @since 1.9.0 + * @return {Updater} + */ + enableEventProcessing() { + this.disableEventProcessing(); + + const pathfinder = new Pathfinder(this.subject.getSubject()); + + for (const type of this.eventTypes) { + this.element.addEventListener(type, controlEventHandler); + } + + return this; + + } + + /** + * + * @since 1.9.0 + * @return {Updater} + */ + disableEventProcessing() { + + for (const type of this.eventTypes) { + this.element.removeEventListener(type, controlEventHandler); + } + + return this; } @@ -135,7 +187,7 @@ class Updater extends Base { run() { // the key __init__has no further meaning and is only // used to create the diff for empty objects. - this.last = {'__init__':true}; + this.last = {'__init__': true}; return this.subject.notifyObservers(); } @@ -169,6 +221,26 @@ class Updater extends Base { } +/** + * @private + * @param event + */ +function controlEventHandler(event) { + const element = event.target; + if (element.hasAttribute(ATTRIBUTE_UPDATER_BIND)) { + const value = element.getAttribute(ATTRIBUTE_UPDATER_BIND); + console.log(value); + console.log(element[symbol]); + + element[symbol].forEach((a, b) => { + console.log(a, b); + }); + + } + + +} + /** * @private * @since 1.8.0 diff --git a/packages/monster/source/monster.js b/packages/monster/source/monster.js index 55b39cb5818126ed8e5f6693e17abc3039e2fd1d..7abe6ef9f37bef776360cf62e078cbe9dd7356b9 100644 --- a/packages/monster/source/monster.js +++ b/packages/monster/source/monster.js @@ -47,6 +47,7 @@ import './dom/template.js'; import './dom/handle.js'; import './dom/assembler.js'; import './dom/customelement.js'; +import './dom/attributes.js'; Monster.Util.deepFreeze(Monster); diff --git a/packages/monster/test/cases/dom/attributes.js b/packages/monster/test/cases/dom/attributes.js new file mode 100644 index 0000000000000000000000000000000000000000..2a37ee0b43bdfcf249e1750477d19bc5c96da3f7 --- /dev/null +++ b/packages/monster/test/cases/dom/attributes.js @@ -0,0 +1,97 @@ +'use strict'; + +import {expect} from "chai" + +import { + addAttributeToken, + toggleAttributeToken, + containsAttributeToken, + replaceAttributeToken, + clearAttributeTokens, + removeAttributeToken +} from "../../../source/dom/attributes.js"; + +import {initJSDOM} from "../../util/jsdom.js"; + +let html1 = `<div id="test1"></div>`; + +describe('Attributes', function () { + before(function (done) { + initJSDOM().then(() => { + done() + }); + }); + + describe('Attributes', function () { + + beforeEach(() => { + let mocks = document.getElementById('mocks'); + mocks.innerHTML = html1; + }) + + afterEach(() => { + let mocks = document.getElementById('mocks'); + mocks.innerHTML = ""; + }) + + const atributeKey = 'data-test'; + + it('toggleAttributeToken(element, key, value)', function () { + let element = document.getElementById('test1'); + expect(element.hasAttribute(atributeKey)).to.be.false; + element.setAttribute(atributeKey, 'apple bananna') + toggleAttributeToken(element, atributeKey, 'pinapple'); + expect(element.getAttribute(atributeKey)).to.be.equal('apple bananna pinapple'); + toggleAttributeToken(element, atributeKey, 'pinapple'); + expect(element.getAttribute(atributeKey)).to.be.equal('apple bananna'); + }) + + it('addAttributeToken(element, key, value)', function () { + let element = document.getElementById('test1'); + expect(element.hasAttribute(atributeKey)).to.be.false; + addAttributeToken(element, atributeKey, 'pinapple'); + expect(element.getAttribute(atributeKey)).to.be.equal('pinapple'); + addAttributeToken(element, atributeKey, 'bananna'); + expect(element.getAttribute(atributeKey)).to.be.equal('pinapple bananna'); + }) + + it('removeAttributeToken(element, key, value)', function () { + let element = document.getElementById('test1'); + element.setAttribute(atributeKey, 'apple bananna lemmon') + removeAttributeToken(element, atributeKey, 'pinapple'); + expect(element.getAttribute(atributeKey)).to.be.equal('apple bananna lemmon'); + removeAttributeToken(element, atributeKey, 'bananna'); + expect(element.getAttribute(atributeKey)).to.be.equal('apple lemmon'); + + }) + + it('containsAttributeToken(element, key, value)', function () { + let element = document.getElementById('test1'); + expect(containsAttributeToken(element, atributeKey, 'pinapple')).to.be.false; + element.setAttribute(atributeKey, 'apple bananna') + expect(containsAttributeToken(element, atributeKey, 'pinapple')).to.be.false; + expect(containsAttributeToken(element, atributeKey, 'bananna')).to.be.true; + expect(containsAttributeToken(element, atributeKey, 'apple')).to.be.true; + + }) + + it(' replaceAttributeToken(element, key, value)', function () { + let element = document.getElementById('test1'); + element.setAttribute(atributeKey, 'apple bananna tomato') + replaceAttributeToken(element, atributeKey, 'tomato', 'lemmon'); + expect(element.getAttribute(atributeKey)).to.be.equal('apple bananna lemmon'); + replaceAttributeToken(element, atributeKey, 'bananna', 'pear'); + expect(element.getAttribute(atributeKey)).to.be.equal('apple pear lemmon'); + }) + + it('clearAttributeTokens(element, key)', function () { + let element = document.getElementById('test1'); + element.setAttribute(atributeKey, 'apple bananna') + clearAttributeTokens(element, atributeKey); + expect(element.getAttribute(atributeKey)).to.be.equal(''); + + }) + + + }) +}) \ No newline at end of file diff --git a/packages/monster/test/cases/dom/updater.js b/packages/monster/test/cases/dom/updater.js index 869f7f20c6637c3a8a5790c5152252ce889c308a..32679991097a2bbf7f2f7d5ffa5ded9ae71f3bed 100644 --- a/packages/monster/test/cases/dom/updater.js +++ b/packages/monster/test/cases/dom/updater.js @@ -64,13 +64,7 @@ describe('DOM', function () { let mocks = document.getElementById('mocks'); mocks.innerHTML = ""; }) - - describe('Updater()', function () { - describe('Example code', function () { - - }) - }) - + describe('Updater()', function () { describe('test Errors', function () {