text: /*! adajs[Develop] 1.1.1 https://github.com/topolr/ada | https://github.com/topolr/ada/blob/master/LICENSE */
  (function (map,moduleName) {var Installed={};var requireModule = function (index) {if (Installed[index]) {return Installed[index].exports;}var module = Installed[index] = {exports: {}};map[index].call(module.exports, module, module.exports, requireModule);return module.exports;};var mod=requireModule(map.length-1);window&&window.Ada.installModule(moduleName,mod);})([function(module,exports,require){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ajax=ajax,exports.get=get,exports.post=post,exports.default=void 0;var _util=_interopRequireDefault(require(10));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var EVENTYPES=["readystatechange","loadstart","progress","abort","error","load","timeout","loadend"],request=function e(t){var r=this,o=t.data,a=void 0===o?{}:o,s=t.body,i=void 0===s?"":s,n=t.url,u=void 0===n?"":n,d=t.method,l=void 0===d?"post":d,p=t.dataType,f=void 0===p?"text":p,v=t.async,c=void 0===v||v,h=t.timeout,x=void 0===h?3e6:h,_=t.headers,y=void 0===_?{}:_,g=t.events,q=void 0===g?{}:g,j=t.mimeType,m=void 0===j?"":j;_classCallCheck(this,e),this.option=arguments[0];var E=new XMLHttpRequest;if(this._xhr=E,m&&E.overrideMimeType(m),!i)if("get"===l){var T=_util.default.queryString(a);u+=-1!==u.indexOf("?")?""===T?"":"&"+T:""===T?"":"?"+T}else a=_util.default.postData(a);for(var w in E.open(l,u,c),c&&(E.responseType="json"===f?"text":f,E.timeout=x),EVENTYPES.forEach(function(e){E.addEventListener(e,function(e){var t=q[e.type];t&&t.call(r,e)},!1)}),E.setRequestHeader("X-Requested-With","XMLHttpRequest"),y)E.setRequestHeader(w,y[w]);_util.default.isQueryString(a)&&E.setRequestHeader("Content-type","application/x-www-form-urlencoded"),E.send(i||a)};function ajax(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(function(t,r){e.events=Object.assign({error:function(e){r(e)},load:function(o){var a=this._xhr.status;if(a>=200&&a<300||304===a||0===a){var s=this._xhr.response;if("json"===this.option.dataType)try{s=JSON.parse(this._xhr.responseText)}catch(o){throw Error("[topolr] ajax unvaliable json string,url is '"+e.url+"' "+o)}t(s)}else r(o)}},e.events),new request(e)})}function get(e){return ajax({url:e,data:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},method:"get"})}function post(e){return ajax({url:e,data:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},method:"post",dataType:"json"})}var _default=request;exports.default=_default;},function(module,exports,require){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.view=view,exports.root=root,exports.handler=handler,exports.binder=binder,exports.BondViewGroup=exports.StaticViewGroup=exports.ViewGroup=exports.View=void 0;var _metadata=_interopRequireDefault(require(12)),_ddm2=_interopRequireDefault(require(6)),_util=_interopRequireDefault(require(10)),_factory=_interopRequireDefault(require(4)),_const=require(7),_macros=_interopRequireDefault(require(13)),_dataset2=require(3),_tags=_interopRequireDefault(require(11));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");_setPrototypeOf(t.prototype,e&&e.prototype),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _possibleConstructorReturn(t,e){return!e||"object"!==_typeof(e)&&"function"!=typeof e?_assertThisInitialized(t):e}function _getPrototypeOf(t){return(_getPrototypeOf=Object.getPrototypeOf||function(t){return t.__proto__})(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),t}function view(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null===t||_util.default.isObject(t))return function(e){var n=t||{};_metadata.default.defineMetadata("view",n,e.prototype),n.tagName&&_tags.default.set(n.tagName,e)};_metadata.default.defineMetadata("view",{},t.prototype)}function root(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null===t||_util.default.isObject(t))return function(e){_metadata.default.defineMetadata("root",t||{},e.prototype)};_metadata.default.defineMetadata("root",{},t.prototype)}function handler(t){if(t)return function(e,n,i){var r=_metadata.default.getMetadata("handler",e)||{};t.split(",").forEach(function(t){return r[t]=n}),_metadata.default.defineMetadata("handler",r,e)};throw Error("handler name can not empty")}function binder(t){if(t)return function(e,n,i){var r=_metadata.default.getMetadata("binder",e)||{};t.split(",").forEach(function(t){return r[t]=n}),_metadata.default.defineMetadata("binder",r,e)};throw Error("binder name can not empty")}function renderView(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise(function(n,i){t[_const.RENDERSTATE]||(t[_const.RENDERSTATE]=!0,setTimeout(function(){if(t.isRemoved())i("REMOVED");else{var r=t.getCurrentState();r.then&&_util.default.isFunction(r.then)?r.then(function(r){t._render(r,{},e?{}:_macros.default),e?n():t._refresh().then(function(){n()},function(t){i(t)})}):(t._render(r,{},e?{}:_macros.default),e?n():t._refresh().then(function(){n()},function(t){i(t)}))}t[_const.RENDERSTATE]=!1},0))}).catch(function(t){if("REMOVED"!==t)throw t})}_ddm2.default.setDefaultMacro("icon",function(t){var e=t.attrs;return{template:'<svg class="'.concat(e.class||"ada-icon",'"><use xlink:href="#').concat(e.id,'"></use></svg>'),props:{}}}),_ddm2.default.setDefaultAssignDirective("icon",function(t){return'<svg class="icon"><use xlink:href="#'.concat(t,'"></use></svg>')});var ViewEvent=function(){function t(e,n,i){_classCallCheck(this,t),this.target=e,this.data=i,this.type=n,this._goon=!0,this.currentTarget=null}return _createClass(t,[{key:"stopPropagation",value:function(){this._goon=!1}}]),t}(),View=function(){function t(e){var n=e.template,i=void 0===n?"":n,r=e.parent,o=void 0===r?null:r,a=e.option,s=void 0===a?{}:a,u=e.data,l=void 0===u?{}:u,d=e.dom,c=void 0===d?window.document.body:d,h=e.className,f=void 0===h?"":h;_classCallCheck(this,t),_util.default.setProp(this,_const.TEMPLATETAG,i),_util.default.setProp(this,_const.PARENTVIEWTAG,o),_util.default.setProp(this,_const.ELEMENTTAG,c),_util.default.setProp(this,_const.IDNAME,_util.default.randomid(10)),_util.default.setProp(this,_const.CLASSNAME,f),_util.default.setProp(this,_const.DATASETNAME,null),_util.default.setProp(this,_const.RENDEREDBY,null),_util.default.setProp(this,_const.RENDERSTATE,!1),_util.default.setProp(this,_const.ISREMOVED,!1),_util.default.setProp(this,_const.PREREMOVED,!1),_util.default.setProp(this,_const.OPTIONTAG,Object.assign(this.defaultOption(),s)),_util.default.setProp(this,_const.DATATAG,Object.assign({},l||{})),this.state={}}return _createClass(t,[{key:"defaultOption",value:function(){return{}}},{key:"computed",value:function(t){return t}},{key:"oncreated",value:function(){}},{key:"onunload",value:function(){}},{key:"onchange",value:function(){}},{key:"getDataSets",value:function(){var t=this;if(this.isRemoved())return[];if(!this[_const.DATASETNAME]){var e=_metadata.default.getMetadata("dataset",this.constructor.prototype),n=_metadata.default.getMetadata("pipe",this.constructor.prototype),i=_toConsumableArray(Reflect.ownKeys(e||{})).concat(_toConsumableArray(Reflect.ownKeys(n||{})));this[_const.DATASETNAME]=i}return this[_const.DATASETNAME].map(function(e){return t[e]}).filter(function(t){return t instanceof _dataset2.DataSet})}},{key:"getDataSetMap",value:function(){var t=this;if(this.isRemoved())return{};if(!this[_const.DATASETNAME]){var e=_metadata.default.getMetadata("dataset",this.constructor.prototype),n=_metadata.default.getMetadata("pipe",this.constructor.prototype),i=_toConsumableArray(Reflect.ownKeys(e||{})).concat(_toConsumableArray(Reflect.ownKeys(n||{})));this[_const.DATASETNAME]=i}var r={};return this[_const.DATASETNAME].forEach(function(e){t[e]instanceof _dataset2.DataSet&&(r[e]=t[e])}),r}},{key:"getTemplateText",value:function(){if(this.isRemoved())return null;var t=this[_const.TEMPLATETAG];return t=_util.default.parseCustomTag(t,this.tags?this.tags():{})}},{key:"getElement",value:function(){return this.isRemoved()?null:this[_const.ELEMENTTAG]}},{key:"getDDMContainer",value:function(){return this.isRemoved()?null:this[_const.ELEMENTTAG]}},{key:"getDDM",value:function(){return this.isRemoved()?null:this[_const.DDMTAG]}},{key:"getParent",value:function(){return this.isRemoved()?null:this[_const.PARENTVIEWTAG]}},{key:"getId",value:function(){return this.isRemoved()?null:this[_const.IDNAME]}},{key:"render",value:function(){return renderView(this)}},{key:"triggerEvent",value:function(t){if(!this.isRemoved()){t.currentTarget=this;var e=_metadata.default.getMetadata("handler",this.constructor.prototype);return!e||!e[t.type]||this[e[t.type]](t)}}},{key:"dispatchEvent",value:function(t,e){var n=this,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!this.isRemoved()){var r=new ViewEvent(this,t,e);if(!0===i)for(var o=this;o&&(o.triggerEvent(r),r._goon);)o=o.getParent();else this.triggerEvent(r),this.isRemoved()||r._goon&&(this instanceof ViewGroup||this instanceof StaticViewGroup)&&this.getChildren().forEach(function(i){if(n.isRemoved())return!1;i.dispatchEvent(t,e,!1)})}}},{key:"getCurrentState",value:function(){if(this.isRemoved())return null;var t=this.getDataSets().map(function(t){return t.getData()||{}});return t.unshift(this.state||{}),this.computed(Object.assign.apply(Object,[{}].concat(_toConsumableArray(t))))}},{key:"refresh",value:function(){return this.render()}},{key:"getThisClassName",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(this.isRemoved())return null;var e=this[_const.CLASSNAME];return e?t?"".concat(e,"-").concat(t):e:t}},{key:"finder",value:function(t){return this.isRemoved()?null:this.getDDM().finder(t)}},{key:"finders",value:function(t){return this.isRemoved()?[]:this.getDDM().finders(t)}},{key:"group",value:function(t){return this.isRemoved()?null:this.getDDM().group(t)}},{key:"groups",value:function(t){return this.isRemoved()?[]:this.getDDM().groups(t)}},{key:"isRemoved",value:function(){return!0===this[_const.ISREMOVED]}},{key:"isRenderingBy",value:function(){if(this.isRemoved())return!1;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return null!==this[_const.RENDEREDBY]?-1!==e.indexOf(this[_const.RENDEREDBY]):-1!==e.indexOf(this)}},{key:"toggleDataSet",value:function(t,e){var n=this.getDataSetMap()[t];if(!(n&&e instanceof n.prototype.constructor))throw Error("[ada] can not toggle DataSet,prop of view is not a DataSet or dataset is not a sub class of it");n._listener.splice(n._listener.indexOf(this),1),-1===e._listener.indexOf(this)&&(e._listener.push(this),this[t]=e)}},{key:"_render",value:function(t,e,n){var i=this;try{if(!this.isRemoved())if(this.getDDM())this.getDDM().render(t);else{var r=new _ddm2.default({id:this.getId(),container:this.getDDMContainer(),templateStr:this.getTemplateText(),binders:function(t){var e=t.method,n=t.parameters,r=_metadata.default.getMetadataExtends("binder",i.constructor.prototype);if(r){var o=r[e];o&&i[o]&&i[o](n)}},option:{tags:this.tags?this.tags():{}},macro:n});_util.default.setProp(this,_const.DDMTAG,r),r.render(t)}}catch(t){var o=null;o=_metadata.default.hasMetadata("root",this.constructor.prototype)?_metadata.default.getMetadata("root",this.constructor.prototype):_metadata.default.getMetadata("view",this.constructor.prototype),console.error("[ada] view rendered error template is [".concat(o.template,"] class is [").concat(this.constructor.name,"] =>"),this,t.message)}}},{key:"_remove",value:function(){var t=this;if(!this.isRemoved()){var e=this.getParent();e&&(!0!==this[_const.PREREMOVED]&&e.onchildremoved&&e.onchildremoved(this),e.getChildren().splice(e.getChildren().indexOf(this),1)),this.removeAllChild&&this.removeAllChild(),this.onunload&&this.onunload(),Reflect.deleteProperty(this.getElement(),_const.VIEWTAG),Reflect.ownKeys(this).forEach(function(e){t[e]=null}),this[_const.ISREMOVED]=!0}}},{key:"_clean",value:function(){var t=this;if(this[_const.ISREMOVED]=!0,this.getParent()){var e=this.getParent().getChildren(),n=e.indexOf(this);-1!==n&&e.splice(n,1)}this.onunload&&this.onunload(),Reflect.ownKeys(this).forEach(function(e){e!==_const.ISREMOVED&&(t[e]=null)})}}]),t}();exports.View=View;var ViewGroup=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,e),t=_possibleConstructorReturn(this,_getPrototypeOf(e).call(this,n)),_util.default.setProp(_assertThisInitialized(_assertThisInitialized(t)),_const.CHILDRENTAG,[]),t}return _createClass(e,[{key:"onchildremoved",value:function(){}},{key:"onchildadded",value:function(){}},{key:"render",value:function(){return renderView(this,!1)}},{key:"getChildAt",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.isRemoved()?null:this[_const.CHILDRENTAG][t]}},{key:"getFirstChildByType",value:function(t){return this.getChildrenByType(t)[0]||null}},{key:"getChildrenByType",value:function(t){return!this.isRemoved()&&t?this.getChildren().filter(function(e){return e instanceof t}):[]}},{key:"getChildren",value:function(){return this.isRemoved()?[]:this[_const.CHILDRENTAG]}},{key:"tags",value:function(){return{}}},{key:"_refresh",value:function(){var t=this;return this.isRemoved()?Promise.resolve():_util.default.queue(this.getDDM().modules().map(function(e){return function(){var n=e.element()[_const.VIEWTAG],i=e.getAttributes(),r=i.type,o=i.option,a=i.data||{};return!n||n.constructor!==r||n.isRemoved()?_factory.default.getViewInstance({viewClass:r,option:o,parent:t,data:a,dom:e.element(),tag:"view"}).then(function(e){return t.onchildadded&&t.onchildadded(e),e}):(n&&!_util.default.isEqual(n[_const.DATATAG],a)&&(n[_const.DATATAG]=a,n.onchange(a)),Promise.resolve(n))}})).then(function(e){var n;t.isRemoved()||(n=t[_const.CHILDRENTAG]).push.apply(n,_toConsumableArray(e))})}}]),_inherits(e,t),e}(View);exports.ViewGroup=ViewGroup;var StaticViewGroup=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,e),_possibleConstructorReturn(this,_getPrototypeOf(e).call(this,t))}return _createClass(e,[{key:"render",value:function(){return renderView(this)}},{key:"addChild",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.option,r=void 0===i?{}:i,o=n.container,a=void 0===o?null:o,s=n.attrs,u=void 0===s?{}:s,l=n.data,d=void 0===l?{}:l;if(this.isRemoved())return Promise.reject();a||(a=window.document.body);var c=document.createElement("div");return c.setAttribute("data-module","out:".concat(this.getId())),Reflect.ownKeys(u).forEach(function(t){return c.setAttribute(t,u[t])}),a.appendChild(c),_factory.default.getViewInstance({viewClass:e,option:r,parent:this,dom:c,data:d,tag:"view"}).then(function(e){return t.isRemoved()||(t.getChildren().push(e),t.onchildadded&&t.onchildadded(e)),e})}},{key:"removeChild",value:function(t){this.isRemoved()||-1!==this.getChildren().indexOf(t)&&(t.isRemoved()||t.getElement().parentNode.removeChild(t.getElement()));return this}},{key:"removeChildAt",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(!this.isRemoved()){var e=this.getChildren()[t];e&&this.removeChild(e)}return this}},{key:"removeAllChild",value:function(){if(!this.isRemoved())for(var t=this.getChildren();t&&t.length>0;){var e=t.shift();e.isRemoved()||e.getElement().parentNode.removeChild(e.getElement())}return this}},{key:"removeChildByType",value:function(t){if(!this.isRemoved()&&t)for(var e=this.getChildrenByType(t);e.length>0;)this.removeChild(e.shift());return this}}]),_inherits(e,t),e}(ViewGroup);exports.StaticViewGroup=StaticViewGroup;var BondViewGroup=function(t){function e(t){var n;_classCallCheck(this,e),n=_possibleConstructorReturn(this,_getPrototypeOf(e).call(this,t));var i=document.createElement("div");return i.setAttribute("class",n.getThisClassName("ddmcontainer")),n.getElement().appendChild(i),_util.default.setProp(_assertThisInitialized(_assertThisInitialized(n)),_const.DDMCONTAINER,i),n}return _createClass(e,[{key:"getDDMContainer",value:function(){return this[_const.DDMCONTAINER]}},{key:"addChild",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.option,r=void 0===i?{}:i,o=n.container,a=void 0===o?null:o,s=n.attrs,u=void 0===s?{}:s,l=n.data,d=void 0===l?{}:l;if(this.isRemoved())return Promise.reject();a||(a=window.document.body);var c=document.createElement("div");if(c.setAttribute("data-module","out:".concat(this.getId())),Reflect.ownKeys(u).forEach(function(t){return c.setAttribute(t,u[t])}),this.getDDMContainer().contains(a))throw Error("[ada] BondViewGroup can not append child in the DDM container element");return a.appendChild(c),_factory.default.getViewInstance({viewClass:e,option:r,parent:this,dom:c,data:d,tag:"view"}).then(function(e){return e.isRemoved()||(t.getChildren().push(e),t.onchildadded&&t.onchildadded(e)),e})}},{key:"removeChild",value:function(t){if(!this.isRemoved()&&(-1!==this.getChildren().indexOf(t)&&!t.isRemoved())){if(this.getDDMContainer().contains(t.getElement()))throw Error("[ada] BondViewGroup can not remove child in the DDM container");t.getElement().parentNode.removeChild(t.getElement())}return this}},{key:"removeAllChild",value:function(){for(var t=this,e=this.getChildren().filter(function(e){if(!e.isRemoved()&&!t.getDDMContainer().contains(e.getElement()))return e});e&&e.length>0;){var n=e.shift();n.isRemoved()||n.getElement().parentNode.removeChild(n.getElement())}}},{key:"removeChildByType",value:function(t){if(!this.isRemoved()&&t)for(var e=this.getChildrenByType(t);e.length>0;)this.removeChild(e.shift());return this}}]),_inherits(e,t),e}(ViewGroup);exports.BondViewGroup=BondViewGroup;},function(module,exports,require){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.ModuleLoader=exports.Option=exports.Source=exports.ActiveSource=exports.Modules=void 0;var _request=require(0),_util=_interopRequireDefault(require(10));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Option={basePath:"",sourceMap:"",develop:!0};exports.Option=Option;var Persistence={target:null,get:function(){var e;Persistence.target||(e=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB?Persistence.database:window.localStorage?Persistence.storage:Persistence.empty,Persistence.target=e);return Persistence.target},empty:{getAll:function(){return Promise.resolve({})},saveAll:function(e){return Promise.resolve()},clean:function(){return Promise.resolve()}},storage:{getAll:function(){var e={};try{e=window.localStorage.getItem("ada-local-source")}catch(e){}return Promise.resolve(e)},saveAll:function(e){try{window.localStorage.setItem("ada-local-source",window.JSON.stringify(e))}catch(e){}return Promise.resolve()},clean:function(){try{window.localStorage.removeItem("ada-local-source")}catch(e){}return Promise.resolve()}},database:{db:null,info:{name:"ada",version:1,store:"ada-local-source",key:"name",value:"local"},ready:function(){return Persistence.database.db?Promise.resolve():(window.indexedDB||(window.indexedDB=window.mozIndexedDB||window.webkitIndexedDB),new Promise(function(e){var t=indexedDB.open(Persistence.database.info.name,Persistence.database.info.version);t.onupgradeneeded=function(e){var n=t.result;n.objectStoreNames.contains(Persistence.database.info.store)&&n.deleteObjectStore(Persistence.database.info.store),n.createObjectStore(Persistence.database.info.store,{keyPath:Persistence.database.info.key}).put({name:Persistence.database.info.value,data:{}})},t.onsuccess=function(n){Persistence.database.db=t.result,e()},t.onerror=function(){e()}}))},getAll:function(){var e=this;return new Promise(function(t){e.ready().then(function(){var e=Persistence.database.db.transaction([Persistence.database.info.store],"readwrite");e.onerror=function(e){t({})};var n=e.objectStore(Persistence.database.info.store).get(Persistence.database.info.value);n.onerror=function(e){t({})},n.onsuccess=function(e){t(n.result?n.result.data:{})}})})},saveAll:function(e){var t=this;return new Promise(function(n){t.ready().then(function(){var t=Persistence.database.db.transaction([Persistence.database.info.store],"readwrite");t.oncomplete=function(e){n()},t.onerror=function(e){n()},t.objectStore(Persistence.database.info.store).put({name:Persistence.database.info.value,data:e})})})},clean:function(){var e=this;return new Promise(function(t){e.ready().then(function(){var e=Persistence.database.db.transaction([Persistence.database.info.store],"readwrite");e.oncomplete=function(e){t()},e.onerror=function(e){t()},e.objectStore(Persistence.database.info.store).delete(Persistence.database.info.value)})})}}},ModuleLoader={installed:{},moduleFnsLoaded:{},getExcutor:function(e,t){var n=e.split("/").pop().split(".").pop(),r=t;return r="js"===n?t:"css"===n||"scss"===n||"less"===n?'var styles={_linkElement:null,active:function(){var et=document.getElementById("'.concat(e,'");if(!et){var _a = document.createElement("style");_a.setAttribute("media", "screen");_a.setAttribute("type", "text/css");_a.setAttribute("id","').concat(e.replace(/\//g,"-"),'");_a.appendChild(document.createTextNode(').concat(JSON.stringify(t),'));styles._linkElement=_a;document.getElementsByTagName("head")[0].appendChild(_a);}else{et.innerText="";et.appendChild(document.createTextNode(').concat(JSON.stringify(t),"));}}};if (/complete|loaded|interactive/.test(window.document.readyState)) {styles.active();} else {window.document.addEventListener('DOMContentLoaded', function () {styles.active();}, false);}module.exports={isReady:function(){return styles._linkElement!==null;},getElement:function(){return styles._linkElement;},remove:function(){if(styles._linkElement){styles._linkElement.parentNode.removeChild(styles._linkElement);}}};"):"json"===n?"module.exports=".concat(t):"html"===n||"text"===n?"module.exports=JSON.stringify(".concat(t,")"):t,r+="//# sourceURL=".concat(Option.basePath,"/").concat(e),new Function("module","exports","require","imports",r)},getModuleDependenceInfo:function(e,t){var n=[];return{code:t=t.replace(/require\(.*?\)/g,function(e){var t=e.substring(8,e.length-1).replace(/['|"|`]/g,"").trim();return n.push(t),'require("'.concat(t,'")')}),paths:n}},getModuleDependenceMap:function(e){return Source.get(e).then(function(t){var n=ModuleLoader.getModuleDependenceInfo(e,t),r=n.paths,o=n.code,a=_defineProperty({},e,o),s=[];return r.map(function(e){ModuleLoader.installed[e]||s.push(ModuleLoader.getModuleDependenceMap(e))}),Promise.all(s).then(function(e){return Object.assign.apply(Object,[a].concat(_toConsumableArray(e))),a})})},excute:function(e){if(ModuleLoader.installed[e])return ModuleLoader.installed[e].exports;var t=ModuleLoader.installed[e]={path:e,exports:{}};return ModuleLoader.moduleFnsLoaded[e].call(t.exports,t,t.exports,ModuleLoader.excute,function(e){return ModuleLoader.load(e).then(function(e){return e.__esModule?e.default:e})}),t.exports},load:function(e){var t=ModuleLoader.installed[e];return t?Promise.resolve(t.exports):ModuleLoader.getModuleDependenceMap(e).then(function(t){for(var n in t)ModuleLoader.moduleFnsLoaded[n]=ModuleLoader.getExcutor(n,t[n]);return ModuleLoader.excute(e)})}};exports.ModuleLoader=ModuleLoader;var Modules={excute:function(e){return ModuleLoader.load(e)},scan:function(e){if(e)for(var t in ModuleLoader.installed){if(!1===e(t,ModuleLoader.installed[t].exports))break}},scanClass:function(e){if(e)for(var t in ModuleLoader.installed){var n=ModuleLoader.installed[t];if(!n.exports.__esModule&&_util.default.isFunction(n.exports)&&!1===e(t,n.exports))break;for(var r in n.exports){var o=n.exports[r];if(_util.default.isFunction(o)&&!1===e(t,o))break}}},filter:function(e){var t=[];if(e)for(var n in ModuleLoader.installed){var r=ModuleLoader.installed[n],o=e(n,r.exports.__esModule?r.exports.default:r.exports);void 0!==o&&t.push(o)}return t},get:function(e){var t=ModuleLoader.installed[e];return t?t.exports.__esModule?t.exports.default:t.exports:null},has:function(e){return void 0!==ModuleLoader.installed[e]},set:function(e,t){return ModuleLoader.installed[e]={exports:t},this}};exports.Modules=Modules;var SourceQueue={tasks:[],isRunning:!1,add:function(e,t,n){this.tasks.push({path:e,fn:t,error:n}),this.run()},run:function(){var e=this;if(!this.isRunning){var t=this.tasks.shift();t&&(this.isRunning=!0,Source.getSource(t.path).then(function(n){e.isRunning=!1,t.fn(n),e.run()},function(n){e.isRunning=!1,t.error(n),e.run()}))}}},Source={isinit:!1,source:{},ready:function(){var e=this;return this.isinit?Promise.resolve():Persistence.get().getAll().then(function(t){return e.source=Object.assign({},t,e.source),Persistence.target.saveAll(e.source)})},get:function(e){return new Promise(function(t,n){SourceQueue.add(e,function(e){t(e)},function(e){n(e)})})},decompress:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.source||(this.source={}),Object.assign(this.source,e)},getRealPath:function(e){var t=e,n="";if(n=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?Option.sourceMap[e.split(".").shift()]:Option.sourceMap[_util.default.getMappedPath(e)],Option.develop)t="".concat(e,"?h=").concat((new Date).getTime());else{var r=e.split("/"),o=r.pop().split(".");r.push("".concat(n,".").concat(o[1])),t=r.join("/")}return"".concat("/"===Option.basePath[Option.basePath.length-1]?Option.basePath:Option.basePath+"/").concat(t)},getSourceByHash:function(e,t,n){var r=this,o=0,a=Reflect.ownKeys(Option.sourceMap.packages).filter(function(e){return-1!==Option.sourceMap.packages[e].indexOf(n)})[0];return a?(Option.sourceMap.packages[a].split("|").forEach(function(e){var t=Reflect.ownKeys(Option.sourceMap).filter(function(t){return Option.sourceMap[t]===e})[0];r.source[t]&&r.source[t].hash===e||(o+=1)}),o>1?(0,_request.get)("".concat(this.getRealPath(a+".js",!0))).then(function(e){var n=JSON.parse(e.substring(11,e.length-1));return Object.assign(r.source,n),Persistence.get().saveAll(r.source).then(function(){return r.source[t].code})}):(0,_request.get)("".concat(this.getRealPath(e))).then(function(e){return r.source[t]={code:e,hash:n},Persistence.get().saveAll(r.source).then(function(){return e})})):n?(0,_request.get)("".concat(this.getRealPath(e))).then(function(e){return r.source[t]={code:e,hash:n},Persistence.get().saveAll(r.source).then(function(){return e})}):(0,_request.get)("".concat(this.getRealPath(e)))},getSource:function(e){var t=this;return this.ready().then(function(){var n=_util.default.getMappedPath(e);if(t.source[n]){var r=t.source[n].hash,o=Option.sourceMap[n];return r&&o?o===r?t.source[n].code:t.getSourceByHash(e,n,o):(0,_request.get)("".concat(t.getRealPath(e)))}return Option.sourceMap?t.getSourceByHash(e,n,Option.sourceMap[n]):(0,_request.get)("".concat(t.getRealPath(e)))})}};exports.Source=Source;var ActiveSource={cache:{},excute:function(e){var t=this;return this.cache[e]?Promise.resolve(this.cache[e]):Source.get(e).then(function(n){return t.cache[e]=n,n})},has:function(e){return void 0!==this.cache[e]}};exports.ActiveSource=ActiveSource;var exportSource={setOption:function(e){Object.assign(Option,e)},loadModule:function(e){return Modules.excute(e)},loadSource:function(e){return ActiveSource.excute(e)},decompress:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Source.decompress(e)}},_default=exportSource;exports.default=_default;},function(module,exports,require){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.pipe=pipe,exports.action=action,exports.dataset=dataset,exports.DataSetHelper=exports.DataSetAspect=exports.TransactDataSet=exports.DataSet=exports.Service=void 0;var _metadata=_interopRequireDefault(require(12)),_util=_interopRequireDefault(require(10)),_const=require(7);function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");_setPrototypeOf(t.prototype,e&&e.prototype),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _possibleConstructorReturn(t,e){return!e||"object"!==_typeof(e)&&"function"!=typeof e?_assertThisInitialized(t):e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _get(t,e,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=_superPropBase(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(r):a.value}})(t,e,r||t)}function _superPropBase(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_getPrototypeOf(t)););return t}function _getPrototypeOf(t){return(_getPrototypeOf=Object.getPrototypeOf||function(t){return t.__proto__})(t)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _createClass(t,e,r){return e&&_defineProperties(t.prototype,e),r&&_defineProperties(t,r),t}function checkInfo(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!0,n="",a={type:DataSet,service:null,aspects:[]};(_util.default.isFunction(t)?a.service=t:_util.default.isObject(t)&&Object.assign(a,t),_util.default.isFunction(a.type)&&a.type.prototype instanceof DataSet||a.type===DataSet||(r=!1,n="[ada] dataset must be a class or subclass of  DataSet"),_util.default.isFunction(a.service)&&(a.service.prototype instanceof Service||a.service===Service)||(r=!1,n="[ada] service must be a class or subclass of  Service"),e)&&(a.aspects.filter(function(t){if(!(_util.default.isFunction(t)&&t.prototype instanceof DataSetAspect))return!0}).length>0&&(r=!1,n="[ada] service aspect must be a class or subclass of  DataSetAspect"));return{checked:r,errorInfo:n,info:a}}function action(t){if(t)return function(e,r,n){var a=_metadata.default.getMetadata("action",e)||{};t.split(",").forEach(function(t){return a[t]=r}),_metadata.default.defineMetadata("action",a,e)};throw Error("[ada] dataset action name can not be empty")}function dataset(t){if(t)return function(e,r,n){var a=checkInfo(t),i=a.checked,o=a.errorInfo,s=a.info;if(!i)throw Error(o);var c=_metadata.default.getMetadata("dataset",e)||{};c[r]=s,_metadata.default.defineMetadata("dataset",c,e)};throw Error("[ada] dataset info can not be empty")}function pipe(t){if(t)return function(e,r,n){var a=checkInfo(t,!1),i=a.checked,o=a.errorInfo,s=a.info;if(!i)throw Error(o);var c=_metadata.default.getMetadata("pipe",e)||{};c[r]=s,_metadata.default.defineMetadata("pipe",c,e)};throw Error("[ada] pipe info can not be empty")}var Service=function(){function t(){_classCallCheck(this,t),this.option=this.defaultOption()}return _createClass(t,[{key:"defaultData",value:function(){return{}}},{key:"defaultOption",value:function(){return{}}}]),t}();exports.Service=Service;var DataSet=function(){function t(){_classCallCheck(this,t),this._commited=!1,this._service=null,this._listeners=[],this._aspects=[],this._data=null,this._option=null}return _createClass(t,[{key:"commit",value:function(t,e){return this._commited=!0,DataSetHelper.trigger(this,t,e)}},{key:"setOption",value:function(t){return this._commited?console.warn("[ada] DataSet has commited,option can not set again"):(this._option=t,Object.assign(this._service.option,t?t():{})),this}},{key:"getData",value:function(){return this._data}},{key:"toggleService",value:function(t){if(!(t.prototype instanceof this.defaultService()))throw Error("[ada] toggle service must be a subclass of this dataset default service class");this._service=new t,this.setOption(this._option)}},{key:"addAspect",value:function(t){if(!(t instanceof DataSetAspect))throw Error("[ada] aspect must be a instance of DataSetAspect");this._aspects.push(t)}},{key:"removeAspect",value:function(t){if(!(t instanceof DataSetAspect))throw Error("[ada] aspect must be a instance of DataSetAspect");var e=this._aspects.indexOf(t);-1!==e&&this._aspects.splice(e,1)}}]),t}();exports.DataSet=DataSet;var TransactDataSet=function(t){function e(){var t;return _classCallCheck(this,e),(t=_possibleConstructorReturn(this,_getPrototypeOf(e).call(this)))._transactions=[],t}return _createClass(e,[{key:"commit",value:function(t,r){return this._transactions.push({type:t,data:r}),_get(_getPrototypeOf(e.prototype),"commit",this).call(this,t,r)}},{key:"getTransactionList",value:function(){return this._transactions}},{key:"rollback",value:function(t){var e=this.getTransactionList();return t||(t=e.length-1),DataSetHelper.travel(this,t,!0)}},{key:"travel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return DataSetHelper.travel(this,t,!1)}}]),_inherits(e,t),e}(DataSet);exports.TransactDataSet=TransactDataSet;var DataSetAspect=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"before",value:function(){return Promise.resolve()}},{key:"after",value:function(t){var e=t.result;return Promise.resolve(e)}},{key:"error",value:function(){return Promise.resolve()}}]),t}();exports.DataSetAspect=DataSetAspect;var DataSetHelper=function(){function t(){_classCallCheck(this,t)}return _createClass(t,null,[{key:"getDataSet",value:function(t){var e=t.type,r=void 0===e?DataSet:e,n=t.service,a=void 0===n?Service:n,i=t.aspects,o=void 0===i?[]:i,s=new r;if(s._aspects=o.filter(function(t){return t.prototype instanceof DataSetAspect}).map(function(t){return new t}),!(a.prototype instanceof Service))throw Error("[ada] must be a Service class");return s._service=new a,s._data=s._service.defaultData(),s}},{key:"connectViewToDataSet",value:function(t,e){-1===t._listeners.indexOf(e)&&t._listeners.push(e)}},{key:"triggerAspectChains",value:function(t,e,r){return t._aspects.length>0?t._aspects.filter(function(t){return function(){return void 0!==t[e]}}).reduce(function(t,n){return t.then(function(){return n[e](r)})},Promise.resolve()):Promise.resolve(r.result)}},{key:"trigger",value:function(e,r,n){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=_metadata.default.getMetadataExtends("action",e._service.constructor.prototype);if(i){var o=i[r];if(o&&e._service[o])return t.triggerAspectChains(e,"before",{type:r,data:n}).finally(function(){var i=e._service[o](e.getData(),n);return i&&i.then?i.then(function(a){return t.triggerAspectChains(e,"after",{type:r,data:n,result:a})}).then(function(r){return e._data=r,a&&t.dispatch(e),r}).catch(function(a){return t.triggerAspectChains(e,"error",{type:r,data:n,result:a})}):t.triggerAspectChains(e,"after",{type:r,data:n,result:i}).then(function(r){return e._data=r,a&&t.dispatch(e),r})})}return console.warn("[ada] service action is undefined name is ".concat(r)),Promise.reject()}},{key:"dispatch",value:function(t){t._listeners.reduce(function(e,r){return e.then(function(){return r.isRemoved()?Promise.resolve():(r[_const.RENDEREDBY]=t,r.render().then(function(){return r[_const.RENDEREDBY]=null}))})},Promise.resolve()).then(function(){t._listeners=t._listeners.filter(function(t){return!t.isRemoved()})})}},{key:"travel",value:function(e,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=e.getTransactionList();if(r>=0&&r<=a.length){r-=1,a=a.filter(function(t,e){return e<=r}),n&&(e._transactions=a),a=a.map(function(r){return function(){return t.trigger(e,r.type,r.data,!1)}});var i=Promise.resolve();return e._data=e._service.defaultData(),a.length>0&&(i=i.then(function(){return a.reduce(function(t,e){return t.then(function(){return e()})},Promise.resolve())})),i.then(function(){t.dispatch(e)}),i}return Promise.reject()}}]),t}();exports.DataSetHelper=DataSetHelper;},function(module,exports,require){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _metadata=_interopRequireDefault(require(12)),_loader=_interopRequireWildcard(require(2)),_dataset2=require(3),_const=require(7),_util=_interopRequireDefault(require(10));function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,a):{};o.get||o.set?Object.defineProperty(t,a,o):t[a]=e[a]}return t.default=e,t}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,a=new Array(e.length);t<e.length;t++)a[t]=e[t];return a}}var factory={cleanView:function(e){e.querySelectorAll&&[e].concat(_toConsumableArray(e.querySelectorAll("[data-module]"))).reverse().forEach(function(e){e[_const.VIEWTAG]&&e[_const.VIEWTAG]._remove&&e[_const.VIEWTAG]._remove()})},injectDataSet:function(e,t){Reflect.ownKeys(t).forEach(function(a){var o=t[a],r=_dataset2.DataSetHelper.getDataSet(o);_dataset2.DataSetHelper.connectViewToDataSet(r,e),e[a]=r})},injectContextDataSet:function(e,t){Reflect.ownKeys(t).forEach(function(a){var o=e.getParent(),r=t[a];if(r){for(var n=!1;o;){var i=_metadata.default.getMetadata("dataset",o.constructor.prototype),c=!1;if(i)for(var d=Reflect.ownKeys(i),u=0;u<d.length;u++){var l=o[d[u]],s=!0;if(_util.default.isFunction(r)?l._service instanceof r||(s=!1):(l._service instanceof r.service||(s=!1),s&&r.type&&(l instanceof r.type||(s=!1))),s){_dataset2.DataSetHelper.connectViewToDataSet(l,e),e[a]=l,c=!0;break}}if(c){n=!0;break}o=o.getParent()}n||console.warn("[ada] dataset can not find in pipe propName is ".concat(a," view is"),e)}})},getViewInstance:function(e){var t=this,a=e.viewClass,o=e.data,r=void 0===o?{}:o,n=e.option,i=e.parent,c=e.dom,d=e.tag,u=void 0===d?"view":d,l=_metadata.default.getMetadata(u,a.prototype),s="",f=Promise.resolve(),p=_metadata.default.getMetadataExtends("dataset",a.prototype),v=_metadata.default.getMetadataExtends("pipe",a.prototype);return l.template&&(f=f.then(function(){return _loader.default.loadSource(l.template).then(function(e){s=_util.default.parseTemplate(e,l.className)})})),l.style&&(f=f.then(function(){return _loader.default.loadSource(l.style).then(function(e){_util.default.excuteStyle(_util.default.parseStyle(e,l.className),"".concat(l.style.replace(/\//g,"-"),":").concat(l.className))})})),f.then(function(){var e={option:n,template:s,parent:i,className:l.className,data:_util.default.extend({},r),dom:c};l.className&&c.classList.add(l.className);var o=new a(e);return v&&t.injectContextDataSet(o,v),p&&t.injectDataSet(o,p),_util.default.setProp(c,_const.VIEWTAG,o),o.oncreated&&o.oncreated(),o})},getRootView:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=function(){var a=window.document.createElement("div");a.setAttribute("id",_const.ROOTELEMENTNAME),a.setAttribute("class",_const.ROOTELEMENTNAME),a.setAttribute("data-module","ada-root"),window.document.body.appendChild(a);var o=a[_const.VIEWTAG];return o?Promise.resolve(o):factory.getViewInstance({viewClass:e,data:{},option:t,parent:null,dom:a,tag:"root"})};return new Promise(function(e,t){/complete|loaded|interactive/.test(window.document.readyState)?a().then(function(t){return e(t)}):window.document.addEventListener("DOMContentLoaded",function(){a().then(function(t){return e(t)})},!1)})},boot:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.root,a=void 0===t?"":t,o=e.basePath,r=void 0===o?"":o,n=e.option,i=void 0===n?{}:n,c=e.map,d=void 0===c?{}:c,u=e.develop,l=void 0===u||u;return _loader.default.setOption({basePath:r,sourceMap:d,develop:l}),0===a.indexOf("./")&&(a=a.substring(2)),0===a.indexOf("/")&&(a=a.substring(1)),_loader.default.loadModule(a).then(function(e){var t=null;return _loader.Modules.scanClass(function(e,a){if(_metadata.default.getMetadata("root",a.prototype))return t=a,!1}),t?factory.getRootView(t,i).then(function(e){var t=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;return t?new t(function(e){e.forEach(function(e){_toConsumableArray(e.removedNodes).forEach(function(e){factory.cleanView(e)})})}).observe(window.document,{childList:!0,subtree:!0}):window.document.addEventListener("DOMNodeRemoved",function(e){factory.cleanView(e.target)}),e}):(console.error("root class can not find"),Promise.reject())})}},_default=factory;exports.default=_default;},function(module,exports,require){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _updater=_interopRequireDefault(require(14)),_controlbar=_interopRequireDefault(require(15)),_teminal=_interopRequireDefault(require(16));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}var client={state:!0,start:function(){if(window.EventSource){window.addEventListener("load",function(){_controlbar.default.start(),_teminal.default.init(),new EventSource("/ada/sse").addEventListener("message",function(t){try{var e=JSON.parse(t.data),r=e.log,o=[],a=[];r&&Reflect.ownKeys(r).forEach(function(t){var e=r[t];"done"===e?o.push(t):a.push({path:t,result:e})}),0===a.length?(_teminal.default.hide(),_controlbar.default.getState()?"edit"===e.type&&(_controlbar.default.actionStart(),_updater.default.refresh(e.files,e.map).then(function(){_controlbar.default.actionDone()}).catch(function(t){window.location.reload()})):console.log("%c[Ada] HMR is stopped","color:#3D78A7;font-weight:bold")):_teminal.default.showError(a),"reload"===e.type&&window.location.reload()}catch(t){window.location.reload()}})});var t=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;t?new t(function(t){var e=!1;t.forEach(function(t){_toConsumableArray(t.removedNodes).forEach(function(t){t.querySelectorAll&&t.querySelectorAll(".ada-hmr-controllbar").length>0&&(e=!0),e||(e=!!t.classList&&t.classList.contains("ada-hmr-controllbar"))})}),e&&(_controlbar.default.start(),_teminal.default.init())}).observe(window.document,{childList:!0,subtree:!0}):window.document.body.addEventListener("DOMNodeRemoved",function(t){var e=t.target,r=!1;e.querySelectorAll&&e.querySelectorAll(".ada-hmr-controllbar").length>0&&(r=!0),r||(r=!!e.classList&&e.classList.contains("ada-hmr-controllbar")),r&&(_controlbar.default.start(),_teminal.default.init())})}}};client.start();var _default={status:function(){return _controlbar.default.isrunning?"running":"stopped"},hideControllbar:function(){_controlbar.default.hide()},showControllbar:function(){_controlbar.default.show()}};exports.default=_default;},function(module,exports,require){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.DDM=exports.Template=exports.MapDom=void 0;var _event2=_interopRequireDefault(require(24)),_util=_interopRequireDefault(require(10));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _construct(t,e,n){return(_construct="undefined"!=typeof Reflect&&Reflect.construct?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var a=new(t.bind.apply(t,r));return n&&_setPrototypeOf(a,n.prototype),a}).apply(null,arguments)}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),t}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}var REGS={k:/\r/g,l:/\n/g,a:/&lt;/g,b:/&gt;/g,d:/<%|%>/g,e:/^=.*;$/,i:/\r\n/g,f:/>[\s]+</g,g:/<%[\s\S]*%>/,h:/\<\!\-\-[\s\S]*?\-\-\>/g,startdot:/&lt;/g,enddot:/&gt;/g,isDoctype:/\<\!DOCTYPE[\s\S]*?\>/g,isNote:/\<\!\-\-[\s\S]*?\-\-\>/g,isXmlTag:/\<\?[\s\S]*?\?\>/g,propcode:/\@\[\[[0-9]+\]\]\@/g,eventcode:/\$\[\[[0-9]+\]\]\$/g,assigncode:/\(\(\[[0-9]+\]\)\)/g,expresscode:/\[\[[0-9]+\]\]/g,nodecode:/\{\{node\}\}/g},SINGLETAG=["br","hr","img","input","param","link","meta","area","base","basefont","param","col","frame","embed","keygen","source"],TEMPLATECACHE=new Map,IDNAME="$$ID",DefaultMacros={self:function(t){var e=t.props;return{template:t.context._templateStr,data:e.data}}},DefaultAssignDirectives={html:function(t){return t}},Parser={beautySyntax:{syntaxs:{defaults:function(t){return"<%=".concat(t.substring(2,t.length-2),";%>")},log:function(t){return"<%console.log(".concat(t.join(" "),");%>")},html:function(t){return"<%=assign(html,".concat(t,");%>")},map:function(t){var e=t.shift();t.shift();var n=t.shift()||"$value",r=t.shift()||"$key",a="_"+_util.default.randomid(8);return"<%for(var ".concat(a," in ").concat(e,"){var ").concat(n,"=").concat(e,"[").concat(a,"];var ").concat(r,"=").concat(a,";%>")},"/map":function(){return"<%}%>"},list:function(t){var e=t.shift();t.shift();var n=t.shift()||"$item",r=t.shift()||"$index",a="_"+_util.default.randomid(8),o="_"+_util.default.randomid(6);return"<%if(".concat(e,"&&").concat(e,".length>=0)for(var ").concat(a,"=0,").concat(r,"=0,").concat(o,"=").concat(e,".length;").concat(a,"<").concat(o,";").concat(a,"++){var ").concat(n,"=").concat(e,"[").concat(a,"];").concat(r,"=").concat(a,";%>")},"/list":function(t){return"<%}%>"},if:function(t){return"<%if(".concat(t.join(" "),"){%>")},elseif:function(t){return"<%}else if(".concat(t.join(" "),"){%>")},else:function(){return"<%}else{%>"},"/if":function(){return"<%}%>"},break:function(){return"<%break;%>"},set:function(t){return"<%var ".concat(t.join(" "),";%>")}},parse:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/\{\{[\s\S]+?\}\}/g,function(t){var e=t.substring(2,t.length-2).split(" "),n=e.shift();try{return Parser.beautySyntax.syntaxs[n]?Parser.beautySyntax.syntaxs[n](e):Parser.beautySyntax.syntaxs.defaults(t)}catch(t){console.log(t)}})}},nodeParser:{getNodeStr:function(t){var e={},n={},r={},a=[];return Reflect.ownKeys(t.props).forEach(function(o){if(o.startsWith("on")){var i=o.substring(2);e[i]=t.props[o],a.push(i)}else if(o.startsWith("@")){var c=o.substring(1);r[c]=t.props[o]}else"data-find"===o?n["data-find"]="".concat(IDNAME,'+":').concat(t.props["data-find"],'"'):"data-group"===o?n["data-group"]="".concat(IDNAME,'+":').concat(t.props["data-group"],'"'):"data-module"===o?n["data-module"]="".concat(IDNAME):n[o]='"'.concat(t.props[o],'"')}),a.length>0&&(n["data-bind"]="".concat(IDNAME,'+":').concat(a.join(","),'"')),'{tag:"'.concat(t.tag,'",attrs:{').concat(Reflect.ownKeys(n).map(function(t){return'"'.concat(t,'":').concat(n[t])}).join(","),"},events:{").concat(Reflect.ownKeys(e).map(function(t){return"".concat(t,":$").concat(e[t],"$")}).join(","),"},props:{").concat(Reflect.ownKeys(r).map(function(t){return'"'===r[t][0]?"".concat(t,":").concat(r[t]):"".concat(t,":@").concat(r[t],"@")}).join(","),"},children:[]}")},code:function(t,e){if(t.isTextNode){return/\(\[[0-9]+\]\)/.test(t.content)?t.content:'{content:"'.concat(t.content||"",'"}')}var n="",r="",a=Parser.nodeParser.getNodeStr(t);return t.parent?(n="$$NODE"+e,r="".concat(a,";$$CURRENT=").concat(n,";")):r="var ".concat(n="$$NODE"+e,"=").concat(a,";$$CURRENT=").concat(n,";"),t.children.forEach(function(t){if(t.isTextNode&&/\(\[[0-9]+\]\)/.test(t.content))r+=t.content;else{var a=e.split("_");e="".concat(a[0],"_").concat(a[1]/1+1);var o="$$NODE".concat(e),i=Parser.nodeParser.code(t,e);r+="var ".concat(o,"=").concat(i,"; ").concat(n,".children.push(").concat(o,"); $$CURRENT=").concat(n,";")}}),r}},getHTMLString:function(t){var e="";return t.forEach(function(t){e+=function t(e){var n="",r=-1!==SINGLETAG.indexOf(e.tag);if(void 0!==e.content)if(void 0===e.type)n=_util.default.encodeHTML(e.content)||"";else{var a=e.type,o=e.content;DefaultAssignDirectives[a]&&(o=DefaultAssignDirectives[a](e.content)),n='<div class="ada-assign-directive" data-assign-directive-type="'.concat(a,'">').concat(o||"","</div>")}else{var i=[];if(e.attrs&&Reflect.ownKeys(e.attrs).forEach(function(t,n){e.attrs[t]&&i.push("".concat(t,'="').concat(e.attrs[t],'"'))}),r)n="<".concat(e.tag," ").concat(i.join(" "),"/>");else{var c=[];e.children.forEach(function(e){e&&c.push(t(e))}),n="<".concat(e.tag," ").concat(i.join(" "),">").concat(c.join(""),"</").concat(e.tag,">")}}return n}(t)}),e},preparse:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t=t.trim().replace(REGS.isNote,"").replace(REGS.isDoctype,"").replace(REGS.isXmlTag,"").replace(REGS.a,"<").replace(REGS.b,">").replace(REGS.h,"").replace(REGS.f,"><").replace(REGS.i,"").replace(REGS.k,"").replace(REGS.l,""),SINGLETAG.forEach(function(e){var n=new RegExp("<".concat(e," .*?>"),"g");t=t.replace(n,function(t){return t.substring(0,t.length-1)+"/>"})}),t},parseMacro:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(-1!==t.indexOf("<@")){for(var e,n=-1,r="",a="start",o="",i="",c="",s=!0,u="",l={},f=0,p=0,d=0,h=0,v=[];n<t.length;)r=t[++n],"start"!==a||"<"!==r||"@"!==t[n+1]?"tagstart"!==a||"@"!==r?"start"!==a||"<"!==r||"/"!==t[n+1]||"@"!==t[n+2]?"endtag"!==a||">"!==r?"tagname"!==a||" "!==r?"tagname"!==a||"/"!==r&&">"!==r?"propname"!==a||"="!==r?"propvalue"!==a||"'"!==r&&'"'!==r?"propvalueing"!==a||r!==e?("endtag"===a&&(u+=r),"tagname"===a&&(o+=r),"propname"===a&&(i+=r),"propvalueing"===a&&(c+=r)):(a="tagname",l[i]=c):(a="propvalueing",e=r,c=""):a="propvalue":(">"===r?(p=n+1,a="start",s=!0):"/"===r&&(p=n+2,a="start",s=!1),""!==o&&v.push({type:"tag",tagname:o,props:l,body:s,start:f,end:p})):(a="propname",i=""):(a="start",h=n+1,v.push({type:"endtag",tagname:u,start:d,end:h})):(d=n,a="endtag",u="",n+=2):(a="tagname",o="",l={}):(a="tagstart",f=n);var g=0,m=0,E=!1,_=null,y=[],b="",S=0;return Reflect.ownKeys(v).forEach(function(e){var n=v[e];"tag"===n.type&&!1===n.body&&!1===E&&(n.bodystr="",n.from=n.start,n.to=n.end,y.push(n)),"tag"===n.type&&!0===n.body&&(E=!0,null===_&&((_=n).from=n.start),0===g&&(n.start,m=n.end),g++),"endtag"===n.type&&0===--g&&(_.to=n.end,_.bodystr=t.substring(m,n.start),y.push(_),_=null,E=!1)}),y.forEach(function(e){var n=e.props,r=[],a=[],o=[];Reflect.ownKeys(n).forEach(function(t){var e=n[t],i="";if(REGS.g.test(e)){var c="";e.split(REGS.d).forEach(function(t,e){(e+1)%2==0?""!==t&&(c+="".concat(t,"+")):c+=""!==t?"'".concat(t,"'+"):t});var s=c.length>0?c.substring(0,c.length-1):"''";i=s.substring(1,s.length-1)}else i='"'.concat(e,'"');if(t.startsWith("on")){var u=t.substring(2);r.push({name:u,value:i})}else t.startsWith("@")?a.push('"'.concat(t.substring(1),'":').concat(i)):o.push('"'.concat(t,'":').concat(i))});var i=r.map(function(t){var e=t.value.split(/\(|\)/),n=e.shift();e.pop();var r=[],a=e.map(function(t){if(-1!==t.indexOf(" as ")){var e=t.split("as");return r.push("".concat(e[1].trim())),e[0].trim()}return r.push("".concat(t.split(".").pop())),t});return'"'.concat(t.name,'":{method:"').concat(n,'",parameters:[').concat(a.join(","),'],paranames:"').concat(r.join(","),'"}')});b+="".concat(t.substring(S,e.from),'\n                       <%var $$MACRORESULT=this._macro({tag:"').concat(e.tagname,'",props:{').concat(a.join(","),"},attrs:{").concat(o.join(","),"},events:{").concat(i.join(","),'},bodyStr:"').concat(e.bodystr,"\"});if($$MACRORESULT&&$$MACRORESULT.length){for(var $$INDEX=0;$$INDEX<$$MACRORESULT.length;$$INDEX++){{{node}}.children.push($$MACRORESULT[$$INDEX]);}}else{{{node}}.children.push({content:$$MACRORESULT||''});}%>"),S=e.to}),b+=t.substring(S,t.length)}return t},parseNode:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(t&&""!==t){for(var e=[],n=[],r=null,a="",o="",i="",c="",s=!1,u=!1,l=!1,f=!1,p=!1,d=0,h=t.length;d<h;d++){var v=t[d];if("\r"!==v&&"\n"!==v){if("<"===v){p=!0,""!==c.trim()&&(r={content:c.trim()||"",parent:e[e.length-1]||null,isTextNode:!0},e[e.length-1]?e[e.length-1].children.push(r):n.push(r),c=""),t[d+1]&&"/"===t[d+1]?f=!0:(r={tag:"",props:{},children:[],parent:null,hasProp:!1,isTextNode:!1},e.push(r),e.length-2>=0&&(e[e.length-2].children.push(r),r.parent=e[e.length-2]),s=!0);continue}if(" "===v){if(p&&(s&&(s=!1,r.tag=a.trim(),a=""),!u&&!l)){u=!0;continue}}else if("="===v)p&&(u=!1);else if("'"===v||'"'===v){if(!l&&p){l=v;continue}l===v&&(l=!1,r.hasProp=!0,r.props[o.trim()]=i.trim(),o="",i="")}else{if(">"===v){p=!1,u=!1,l=!1,s=!1,f&&(f=!1,"",1===e.length&&n.push(e[0]),e.pop()),r.hasProp||(""===r.tag&&(r.tag=a.trim()),a="");continue}if("/"===v){t[d+1]&&">"===t[d+1]?(p=!1,l=!1,u=!1,f=!1,s=!1,"",1===e.length&&n.push(e[0]),r.hasProp||(""===r.tag&&(r.tag=a.trim()),a=""),e.pop()):p?l&&(i+=v):c+=v;continue}}s&&(a+=v),u&&(o+=v),l&&(i+=v),f&&v,!p&&(c+=v)}}return c&&n.push({content:c||"",parent:null,isTextNode:!0}),n}return[]},code:function(){var t="",e=[],n=[],r='"use strict";\nvar $$RESULT=[],$$CURRENT=null;\n';return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(REGS.d).forEach(function(r,a){a%2!=0?REGS.e.test(r)?(t+=""+"[[".concat(e.length,"]]"),e.push(r)):(t+="(([".concat(n.length,"]))"),n.push(r)):t+=""+r}),Parser.parseNode(t).forEach(function(t,e){var n=e+"_0",a=Parser.nodeParser.code(t,n);r+=a+"\r\n",-1!==a.indexOf("$$NODE"+n)&&-1===a.indexOf("$$RESULT.push($$NODE"+n+")")&&(r+="$$RESULT.push($$NODE"+n+");\r\n")}),r=r.replace(REGS.assigncode,function(t,e,r){return n[t.substring(3,t.length-3)]}).replace(REGS.propcode,function(t,n,r){var a=e[t.substring(3,t.length-3)];return a&&"="===a[0]?a.substring(1,a.length-1):a}).replace(REGS.eventcode,function(t,n,r){var a=e[t.substring(3,t.length-3)];if(a&&"="===a[0]){var o=a.substring(1,a.length-1).split(/\(|\)/),i=[],c=[];return o[1]&&(i=o[1].split(",").map(function(t){return-1!==t.indexOf(" as ")?t.split("as").pop().trim():-1!==t.indexOf(".")?t.split(".").pop():t}),c=o[1].split(",").map(function(t){return-1!==t.indexOf(" as ")?t.split("as").shift().trim():t})),'{method:"'.concat(o[0].trim(),'",parameters:[').concat(c.join(",")||"",'],paranames:"').concat(i.join(","),'"}')}return a}).replace(REGS.expresscode,function(t,n,r){var a=e[t.substring(2,t.length-2)];if(a&&"="===a[0]){var o=a.substring(1,a.length-1);if(0===o.indexOf("assign(")){var i=(o=o.substring(7,o.length-1)).split(","),c=i.shift(),s=i.join(",");return'"+(('.concat(s,")!==undefined?(").concat(s,'):\'\'),"type":"').concat(c)}return'"+(('.concat(o,")!==undefined?(").concat(o,"):'')+\"")}return a}).replace(REGS.nodecode,function(t,e,n){return"$$CURRENT"}),r+="return $$RESULT;"},parse:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e="";return TEMPLATECACHE.has(t)?e=TEMPLATECACHE.get(t):(e=Parser.code(Parser.parseMacro(Parser.beautySyntax.parse(Parser.preparse(t)))),TEMPLATECACHE.set(t,e)),e}},Differ={childrenEvents:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=new Set;return t.forEach(function(t){return function t(n){n.events&&(Reflect.ownKeys(n.events).forEach(function(t){return e.add(t)}),n.attrs&&n.attrs["data-module"]||n.children&&n.children.forEach(function(e){return t(e)}))}(t)}),Array.from(e)},diffNode:function(t,e,n,r){if(t&&e){var a=t.length;if(0===t.length)0!==e.length&&r.removeAll.push({path:n.join(",")});else{var o=[];t.length<e.length?t[0].attrs&&t[0].attrs.unique&&e[0].attrs&&e[0].attrs.unique?o=Differ.checkRemove(t,e).map(function(t,e){return r.bremove.push({path:n.join(",")+","+t}),t}):a=e.length:Differ.checkAdd(t,e).forEach(function(t){r.badd.push({path:n.join(","),node:t.node}),e.push(t.node)}),Differ.checkSort(t,e).map(function(t){return r.sort.push({path:n.join(",")+","+t.from,to:t.to,from:t.from}),t}).forEach(function(t){var n=e[t.from];e[t.from]=e[t.to],e[t.to]=n});var i=[];e.forEach(function(t,e){-1===o.indexOf(e)&&i.push(t)}),(e=i).length>t.length&&(a=e.length);for(var c=0;c<a;c++){if(n.push(c),t[c])if(e[c])if(t[c].attrs&&void 0!==t[c].attrs["data-module"]){if(void 0!==t[c].attrs["data-module"]){var s=Differ.checkNode(t[c],e[c]);"replace"===s?r.replace.push({path:n.join(","),node:t[c]}):!0!==s&&(r.removeAll.push({path:n.join(",")}),r.edit.push({path:n.join(","),attrs:s}))}}else{var u=Differ.checkNode(t[c],e[c]);e[c].attrs&&void 0!==e[c].attrs["data-module"]?r.replace.push({path:n.join(","),node:t[c]}):!0===u?Differ.diffNode(t[c].children,e[c].children,n,r):"replace"===u?r.replace.push({path:n.join(","),node:t[c]}):(r.edit.push({path:n.join(","),attrs:u}),Differ.diffNode(t[c].children,e[c].children,n,r))}else r.add.push({path:n.join(","),node:t[c]});else r.remove.push({path:n.join(","),node:e[c]});n.pop()}}}},checkAdd:function(t,e){var n=[];if(t[0]&&e[0]&&t[0].attrs&&t[0].attrs.unique&&e[0].attrs&&e[0].attrs.unique){var r=e.map(function(t){return t.attrs.unique});t.forEach(function(t,e){var a=t.attrs.unique;-1===r.indexOf(a)&&n.push({node:t,index:e})})}return n},checkSort:function(t,e){var n=[];if(t[0]&&e[0]&&t[0].attrs&&t[0].attrs.unique&&e[0].attrs&&e[0].attrs.unique){var r=t.map(function(t){return t.attrs.unique});e.forEach(function(t,e){var a=t.attrs.unique,o=r.indexOf(a);-1!==o&&o!==e&&n.push({node:t,from:e,to:o})})}return n},checkRemove:function(t,e){var n=[],r=t.map(function(t){return t.attrs.unique});return e.forEach(function(t,e){-1===r.indexOf(t.attrs.unique)&&n.push(e)}),n},checkNode:function(t,e){var n=!0;if(void 0!==t.content)n=t.content===e.content||"replace";else{if(t.tag===e.tag)return Differ.checkProps(t.attrs,e.attrs);n="replace"}return n},checkProps:function(t,e){var n=Object.keys(t),r=Object.keys(e),a={final:t},o=n.length,i=!1;n.length<r.length&&(o=r.length);for(var c=0;c<o;c++){var s=n[c];if(!s){i=!0;break}if(void 0===e[s]){i=!0;break}if(t[s]!==e[s]){i=!0;break}}return!i||a},diff:function(t,e){var n={add:[],replace:[],remove:[],edit:[],removeAll:[],bremove:[],badd:[],sort:[]};Differ.diffNode(t,e,[],n);return e.length=0,n}},Effecter={element:function(t,e){if("svg"===t.tag&&!e&&(e=!0),void 0!==t.content){if(e)return window.document.createElementNS("http://www.w3.org/2000/svg","text");if(void 0===t.type)return window.document.createTextNode(t.content);var n=t.type,r=t.content;DefaultAssignDirectives[n]&&(r=DefaultAssignDirectives[n](t.content));var a=window.document.createElement("div");return a.setAttribute("class","ada-assign-directive"),a.setAttribute("data-assign-directive",n),a.innerHTML=r||"",a}var o=null;for(var i in o=e?window.document.createElementNS("http://www.w3.org/2000/svg",t.tag):window.document.createElement(t.tag),t.attrs)if(e){var c=i.split(":");c.length>1?o.setAttributeNS("http://www.w3.org/1999/"+c[0],c[1],t.attrs[i]):o.setAttributeNS(null,c[0],t.attrs[i])}else o.setAttribute(i,t.attrs[i]);for(var s=0;s<t.children.length;s++)o.appendChild(Effecter.element(t.children[s],e));return o},effect:function(t,e){var n={};if(e.badd.forEach(function(e){var n=t;e.path.split(",").forEach(function(t){n=n.childNodes[t/1]}),n.appendChild(Effecter.element(e.node))}),e.sort.length>0){var r=e.sort.map(function(e){var n=t;return e.path.split(",").forEach(function(t){return n=n.childNodes[t/1]}),{node:n,to:e.to,from:e.from}}),a=_toConsumableArray(r[0].node.parentNode.childNodes);r.forEach(function(t){var e=a[t.to];a[t.to]=t.node,a[t.from]=e});for(var o=a[0].parentNode,i=document.createDocumentFragment(),c=0;c<a.length;c++)i.appendChild(a[c]);o.appendChild(i)}e.bremove.map(function(e){var n=t;return e.path.split(",").forEach(function(t){n=n.childNodes[t/1]}),n}).forEach(function(t){return t.parentNode.removeChild(t)}),e.replace.forEach(function(e){var n=t,r=!1;e.path.split(",").forEach(function(t){var a=n.childNodes[t/1];a?(n=a,r=!0):(r=!1,n.appendChild(Effecter.element(e.node)))}),r&&n.parentNode.replaceChild(Effecter.element(e.node),n)}),e.add.forEach(function(e){var r=t,a=e.path.split(",");a.pop();var o=a.join("");a.forEach(function(t){r=r.childNodes[t/1]}),n[o]?n[o].push({p:r,n:e.node}):n[o]=[{p:r,n:e.node}]}),e.edit.forEach(function(e){var n=t;e.path.split(",").forEach(function(t){return n=n.childNodes[t/1]});var r=e.attrs,a=[];if(n.attributes.getNamedItem)a=_toConsumableArray(n.attributes).map(function(t){return t.nodeName});else for(var o in n.attributes)a.push(o);Reflect.ownKeys(r.final).forEach(function(t){if(-1===t.indexOf(":")){if(n.getAttribute(t)!==r.final[t]){n.setAttribute(t,r.final[t]);try{n[t]=r.final[t]}catch(t){}}var e=a.indexOf(t);-1!==e&&a.splice(e,1)}else{var o=t.split(":"),i=o[1],c=o[0];n.getAttributeNS("http://www.w3.org/1999/"+c,i)!==r.final[t]&&n.setAttributeNS("http://www.w3.org/1999/"+c,i,r.final[t]);var s=a.indexOf(i);-1!==s&&a.splice(s,1),-1!==(s=a.indexOf(t))&&a.splice(s,1)}}),a.forEach(function(t){if(-1===t.indexOf(":"))n.removeAttribute(t);else{var e=t.split(":"),a=e[1],o=e[0];n.removeAttributeNS("http://www.w3.org/1999/"+o,a,r.final[tp])}})}),e.remove.map(function(e){var n=t,r=e.path.split(","),a=r.pop();return r.forEach(function(t){return n=n.childNodes[t/1]}),n.childNodes[a]}).forEach(function(t){return t.parentNode.removeChild(t)}),e.removeAll.forEach(function(e){var n=t;e.path&&e.path.split(",").forEach(function(t){n&&(n=n.childNodes[t/1])}),n&&(n.dataset.module||(n.innerHTML=""))}),Reflect.ownKeys(n).forEach(function(t){var e=n[t];if(e.length>0){var r=window.document.createDocumentFragment();e.forEach(function(t){return r.appendChild(Effecter.element(t.n))}),e[0].p.appendChild(r)}else e.p.appendChild(Effecter.element(e.n))})}},MapDom=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;_classCallCheck(this,t),this._container=e,this._dom=n}return _createClass(t,null,[{key:"getElementPath",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;n&&n!==t;)e.push(_toConsumableArray(n.parentNode.childNodes).indexOf(n)),n=n.parentNode;return e.reverse()}}]),_createClass(t,[{key:"getAttributes",value:function(){return this._container._cross.getAttributeByPath(t.getElementPath(this._container._container,this._dom))}},{key:"getAttribute",value:function(t){return this.getAttributes()[t]}},{key:"getEventInfo",value:function(){return this._container._cross.getEventsByPath(t.getElementPath(this._container._container,this._dom))}},{key:"isListenedEvent",value:function(t){return void 0!==this.getEventInfo()[t]}},{key:"element",value:function(){return this._dom}},{key:"getElement",value:function(){return this._dom}},{key:"groupi",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return _toConsumableArray(this._dom.querySelectorAll('[data-groupi="'.concat(n,'"]'))).map(function(n){return new t(e._container,n)})}}]),t}();exports.MapDom=MapDom;var Template=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};_classCallCheck(this,t),this._id=r,this._currentState=null,this._beforeState=null,this._macrofn=Object.assign({},DefaultMacros,n),this._templateStr=e,this._code=Parser.parse(e),this._option=a}return _createClass(t,[{key:"_macro",value:function(e){var n=e.tag,r=e.bodyStr,a=e.props,o=e.events,i=e.attrs;if(this._macrofn[n]){var c=this._macrofn[n]({attrs:i,events:o,props:a,bodyStr:r,parseBody:function(e){return""!==r?new t(r,this._macrofn,this._id).render(e):""}.bind(this),context:this,id:this._id,option:this._option});if(c&&c.template){var s=new t(c.template,this._macrofn,this._id).getCurrentState(c.data);if(1===s.length){var u=s[0],l=Reflect.ownKeys(o);return l.length>0&&(u.attrs["data-bind"]="".concat(this._id,":").concat(l.map(function(t){return t}).join(","))),Object.assign(u.props,a),Object.assign(u.events,o),Object.assign(u.attrs,i),[u]}throw new Error("[ada] macro must return only one node")}return c||""}return console.error("[ada] macro can not found ["+n+"] template is "+this._templateStr),""}},{key:"getAttributeByPath",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e={children:this._currentState};return t.forEach(function(t){return e=e.children[t]}),e.props||null}},{key:"getEventsByPath",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e={children:this._currentState};return t.forEach(function(t){return e=e.children[t]}),e.events||null}},{key:"getAllInfoByPath",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e={children:this._currentState};return t.forEach(function(t){return e=e.children[t]}),{events:e.events,props:e.props}}},{key:"getCurrentEventMap",value:function(){return this._currentState?Differ.childrenEvents(this._currentState):[]}},{key:"getCurrentState",value:function(t){var e,n=t?Reflect.ownKeys(t):[],r=n.map(function(e){return t[e]});return n.unshift(IDNAME),n.push(this._code),r.unshift(this._id),(e=_construct(Function,_toConsumableArray(n))).call.apply(e,[this].concat(_toConsumableArray(r)))}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this._currentState&&(this._beforeState=this._currentState),this._currentState=this.getCurrentState(t),e&&this._beforeState?Differ.diff(this._currentState,this._beforeState):Parser.getHTMLString(this._currentState)}},{key:"isRendered",value:function(){return!this._templateStr||null!=this._beforeState}}]),t}();exports.Template=Template;var DDM=function(){function t(e){var n=e.id,r=e.container,a=void 0===r?null:r,o=e.templateStr,i=void 0===o?"":o,c=e.binders,s=void 0===c?{}:c,u=e.macro,l=void 0===u?{}:u,f=e.option,p=void 0===f?{}:f;_classCallCheck(this,t),this._id=n,this._container=a,this._cross=new Template(i,l,n,p),this._binders=s}return _createClass(t,[{key:"_agentEvent",value:function(t){var e=this,n=this._container;_event2.default.unbind(n),t.forEach(function(t){_event2.default.canBubbleUp(t)?_event2.default.bind(n,t,function(t){for(var n=t.target,r=t.type,a=n,o=[];a&&a!==e._container&&a!==window;){var i=a.dataset.bind;if(i){var c=i.split(":"),s=c[0],u=c[1]?c[1].split(","):[];if(s===e.getId()&&-1!==u.indexOf(r)){var l=e._cross.getAllInfoByPath(MapDom.getElementPath(e._container,a)),f=l.events,p=l.props,d=f[t.type];d&&o.push({info:d,props:p})}}a=a.parentNode}o.forEach(function(n){var r=n.info,a=n.props,o=r.method,i=r.parameters,c=r.paranames;if(e._binders){var s={e:t,props:a};c.split(",").forEach(function(t,e){return s[t]=i[e]}),e._binders({method:o,parameters:s})}})}):_event2.default.bind(n,type,function(t){var n=t.target,r=t.type,a=n.dataset.bind;if(a){var o=a.split(":"),i=(o[0],o[1]?o[1].split(","):[]);if(e._cross.getId(),-1!==i.indexOf(r)){var c=e._cross.getAllInfoByPath(MapDom.getElementPath(e._container,n)),s=c.events,u=c.props,l=s[t.type];if(l){l.method;var f=l.parameters,p=l.paranames;if(e._binders){var d={e:t,props:u};p.split(",").forEach(function(t,e){return d[t]=f[e]}),e._binders({method:l.method,parameters:d})}}}}})})}},{key:"getId",value:function(){return this._id}},{key:"finder",value:function(t){return this.finders(t)[0]}},{key:"finders",value:function(t){var e=this,n="".concat(this._id,":").concat(t),r='[data-find="'.concat(n,'"]');return _toConsumableArray(this._container.querySelectorAll(r)).map(function(t){return new MapDom(e,t)})}},{key:"group",value:function(t){return this.groups(t)}},{key:"groups",value:function(t){var e=this,n="".concat(this._id,":").concat(t),r='[data-group="'.concat(n,'"]');return _toConsumableArray(this._container.querySelectorAll(r)).map(function(t){return new MapDom(e,t)})}},{key:"modules",value:function(){var t=this,e='[data-module="'.concat(this._id,'"]');return _toConsumableArray(this._container.querySelectorAll(e)).map(function(e){return new MapDom(t,e)})}},{key:"render",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this._cross.render(t,e);return e&&this._cross.isRendered()?n&&Effecter.effect(this._container,n):n&&(this._container.innerHTML=n),this._agentEvent(this._cross.getCurrentEventMap()),this}}],[{key:"setDefaultMacro",value:function(t,e){return DefaultMacros[t]=e,null}},{key:"setDefaultAssignDirective",value:function(t,e){return DefaultAssignDirectives[t]=e,function(t){Parser.beautySyntax.syntaxs[t]=function(e){return"<%=assign(".concat(t,",").concat(e,");%>")}}(t),null}}]),t}();exports.DDM=DDM;var _default=DDM;exports.default=_default;},function(module,exports,require){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ROOTELEMENTNAME=exports.PREREMOVED=exports.ISREMOVED=exports.RENDEREDBY=exports.RENDERSTATE=exports.DATASETNAME=exports.CLASSNAME=exports.DDMCONTAINER=exports.IDNAME=exports.DATATAG=exports.OPTIONTAG=exports.CHILDRENTAG=exports.ELEMENTTAG=exports.PARENTVIEWTAG=exports.VIEWTAG=exports.DDMTAG=exports.TEMPLATETAG=void 0;var TEMPLATETAG=Symbol("template");exports.TEMPLATETAG=TEMPLATETAG;var DDMTAG=Symbol("ddm");exports.DDMTAG=DDMTAG;var VIEWTAG=Symbol("view");exports.VIEWTAG=VIEWTAG;var PARENTVIEWTAG=Symbol("parent");exports.PARENTVIEWTAG=PARENTVIEWTAG;var ELEMENTTAG=Symbol("node");exports.ELEMENTTAG=ELEMENTTAG;var CHILDRENTAG=Symbol("children");exports.CHILDRENTAG=CHILDRENTAG;var OPTIONTAG="option";exports.OPTIONTAG=OPTIONTAG;var DATATAG="data";exports.DATATAG=DATATAG;var IDNAME=Symbol("viewid");exports.IDNAME=IDNAME;var DDMCONTAINER=Symbol("ddmbody");exports.DDMCONTAINER=DDMCONTAINER;var CLASSNAME=Symbol("class");exports.CLASSNAME=CLASSNAME;var DATASETNAME=Symbol("dataset");exports.DATASETNAME=DATASETNAME;var RENDERSTATE=Symbol("rendering");exports.RENDERSTATE=RENDERSTATE;var RENDEREDBY=Symbol("renderedby");exports.RENDEREDBY=RENDEREDBY;var ISREMOVED=Symbol("isremove");exports.ISREMOVED=ISREMOVED;var PREREMOVED=Symbol("preremoved");exports.PREREMOVED=PREREMOVED;var ROOTELEMENTNAME="ada-root";exports.ROOTELEMENTNAME=ROOTELEMENTNAME;},function(module,exports,require){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.subscribe=subscribe,exports.Dispatcher=void 0;var _metadata=_interopRequireDefault(require(12)),_view=require(1);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function subscribe(e){if(e)return function(t,r,i){var a=_metadata.default.getMetadata("subscribe",t)||{};e.split(",").forEach(function(e){return a[e]=r}),_metadata.default.defineMetadata("subscribe",a,t)};throw Error("handler name can not empty")}var Dispatcher=function(){function e(){_classCallCheck(this,e),this._listener=[]}return _createClass(e,[{key:"observe",value:function(e){return e instanceof _view.View&&-1===this._listener.indexOf(e)&&this._listener.push(e),this}},{key:"unobserve",value:function(e){var t=this._listener.indexOf(e);return-1!==t&&this._listener.splice(t,1),this}},{key:"dispatch",value:function(e,t){this._listener=this._listener.filter(function(r){if(!r.isRemoved()){var i=_metadata.default.getMetadata("subscribe",r.constructor.prototype);if(i){var a=i[e];try{a&&r[a]&&r[a](t)}catch(e){console.error("[ada] dispatcher subscriber call error ",e)}}return!0}})}}]),e}();exports.Dispatcher=Dispatcher;},function(module,exports,require){"use strict";Promise.prototype.finally||(Promise.prototype.finally=function(t){var n=this.constructor;return this.then(function(r){return n.resolve(t()).then(function(){return r})},function(r){return n.resolve(t()).then(function(){throw r})})});},function(module,exports,require){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _tags=_interopRequireDefault(require(11));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var util={randomid:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return t<=2&&(t=7),Math.random().toString(36).slice(2,t+2)},isString:function(t){return"string"==typeof t&&t.constructor===String},setProp:function(t,n,e){Reflect.defineProperty(t,n,{enumerable:!1,configurable:!1,writable:!0,value:e})},isFunction:function(t){return"function"==typeof t&&t.constructor===window.Function},isEqual:function(t,n){if(null===t||void 0===t||null===n||void 0===n)return t===n;if(t.constructor!==n.constructor)return!1;if(t instanceof Function)return t===n;if(t instanceof RegExp)return t===n;if(t===n||t.valueOf()===n.valueOf())return!0;if(Array.isArray(t)&&t.length!==n.length)return!1;if(t instanceof Date)return!1;if(!(t instanceof Object))return!1;if(!(n instanceof Object))return!1;var e=Object.keys(t);return Object.keys(n).every(function(t){return-1!==e.indexOf(t)})&&e.every(function(e){return util.isEqual(t[e],n[e])})},queue:function(t){var n=null,e=[];return t.forEach(function(t){n=n?n.then(function(n){return e.push(n),t()}):t()}),n?n.then(function(t){return e.push(t),e}):Promise.resolve([])},isObject:function(t){return"object"===_typeof(t)&&"[object object]"===Object.prototype.toString.call(t).toLowerCase()&&!t.length},isPlainObject:function(t){return this.isObject(t)&&t.constructor.prototype===Object.prototype},isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isQueryString:function(t){return util.isString(t)&&/(^|&).*=([^&]*)(&|$)/.test(t)},queryString:function(t){var n=[];if(t){for(var e in t){var r=t[e];util.isString(r)?n.push("".concat(e,"=").concat(window.encodeURIComponent(r))):util.isObject(r)||util.isArray(r)?n.push("".concat(e,"=").concat(window.encodeURIComponent(JSON.stringify(r)))):n.push("".concat(e,"=").concat(void 0!==r&&null!==r?window.encodeURIComponent(r.toString()):""))}return n.join("&")}return""},postData:function(t){if(t){if(t instanceof FormData||t instanceof Blob||t instanceof ArrayBuffer)return t;if(util.isObject(t)){var n=!1;for(var e in t)if(t[e]instanceof Blob||t[e]instanceof ArrayBuffer||t[e]instanceof File){n=!0;break}if(n){var r=new FormData;for(var o in t)t[o]instanceof Blob?r.append(o,t[o]):t[o]instanceof File?r.append(o,t[o]):util.isArray(t[o])||util.isObject(t[o])?r.append(o,window.encodeURIComponent(JSON.stringify(t[o]))):t[o]instanceof FormData||r.append(o,window.encodeURIComponent(t[o].toString()));return r}return util.queryString(t)}return util.isArray(t)?window.encodeURIComponent(JSON.stringify({key:t})):t}return null},parseTemplate:function(t,n){return n?t.replace(/class=(["'])(?:(?=(\\?))\2.)*?\1/g,function(t){if(-1===t.indexOf("{{")){var e=t.substring(7,t.length-1).trim().split(" ").map(function(t){return":"===t[0]?t.substring(1):n+"-"+t}),r=t.substr(6,1);return"class=".concat(r).concat(e.join(" ")).concat(r)}var o=t.substring(9,t.length-3).trim();return'class="{{('.concat(o,").split(' ').map(key=>key?(key[0]!==':'?('").concat(n,"-'+key):key.substring(1)):'').join(' ')}}\"")}):t},parseCustomTag:function(t,n){return t.replace(/<[\s\S]+?>/g,function(t){return t.replace(/<[0-9a-z_-]+?>/,function(t){var e=t.substring(1,t.length-1);return _tags.default.has(e)||void 0!==n[e]?'<@custom @customTagName="'.concat(e,'">'):(_tags.default.isRegularTag(e)||console.warn("[ada] tag [".concat(e,"] seemed not supported")),t)}).replace(/<[0-9a-z_-]+ .*?>/,function(t){var e=t.split(" "),r=e.shift().substring(1);return _tags.default.has(r)||void 0!==n[r]?(e.unshift('<@custom @customTagName="'.concat(r,'"')),e.join(" ")):(_tags.default.isRegularTag(r)||console.warn("[ada] tag [".concat(r,"] seemed not supported")),t)}).replace(/<\/[0-9a-z_-]+?>/,function(t){var e=t.substring(2,t.length-1);return _tags.default.has(e)||void 0!==n[e]?"</@custom>":(_tags.default.isRegularTag(e)||console.warn("[ada] tag [".concat(e,"] seemed not supported")),t)})})},parseStyle:function(t,n){var e="",r=[],o=[];return t.split(/\{|\}/).forEach(function(t){var n=t.trim();-1!==n.indexOf("@")&&(o.push([].concat(r)),r=[]),r.push(n)}),o.push(r),o.forEach(function(t){var r=!1,o=[];-1!==t[0].indexOf("@")&&(r=!0,e+=t[0]+"{",t.shift()),t.forEach(function(t,e){t=t.trim(),(e+1)%2!=0?o.push(t.replace(/\.[0-9a-zA-Z-]+/g,function(t){return t.substring(1).trim()!==n?".".concat(n,"-").concat(t.substring(1)):t})):t&&o.push("{"+t+"}")}),e+=r?o.join("")+"}":o.join("")}),e},excuteStyle:function(t,n){if(!document.getElementById(n)){var e=document.createElement("style");e.setAttribute("media","screen"),e.setAttribute("type","text/css"),e.setAttribute("id",n),e.appendChild(document.createTextNode(t)),document.getElementsByTagName("head")[0].appendChild(e)}},hashCode:function(t){for(var n=0,e=0;e<t.length;e++){n=(n<<5)-n+t.charCodeAt(e),n&=n}return n},encodeHTML:function(t){if(/^\s*<(\w+|!)[^>]*>/.test(t)){var n=document.createElement("div");return void 0!=n.textContent?n.textContent=t:n.innerText=t,n.innerHTML}return t},getMappedPath:function(t){return"P".concat(Math.abs(util.hashCode(t)))},extend:function(){var t,n,e,r,o,i,u=arguments[0]||{},a=1,c=arguments.length,s=!1;for("boolean"==typeof u&&(s=u,u=arguments[a]||{},a++),"object"===_typeof(u)||util.isFunction(u)||(u={}),a===c&&(u=this,a--);a<c;a++)if(null!=(t=arguments[a]))for(n in t)e=u[n],u!==(r=t[n])&&(s&&r&&(util.isPlainObject(r)||(o=Array.isArray(r)))?(o?(o=!1,i=e&&Array.isArray(e)?e:[]):i=e&&util.isPlainObject(e)?e:{},u[n]=util.extend(s,i,r)):void 0!==r&&(u[n]=r));return u}},_default=util;exports.default=_default;},function(module,exports,require){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var base={regularTags:[],tags:{},get:function(e){return this.tags[e]},set:function(e,t){this.tags[e]=t},has:function(e){return void 0!==this.get(e)},remove:function(e){var t=this;Reflect.ownKeys(this.tags).filter(function(r){return t.tags[r]===e}).forEach(function(e){return delete t.tags[e]})},isRegularTag:function(e){var t=!0;if(-1===this.regularTags.indexOf(e)){var r=document.createElement(e);r instanceof HTMLElement||r instanceof SVGElement?this.regularTags.push(e):t=!1}return t}},_default=base;exports.default=_default;},function(module,exports,require){"use strict";function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var METADATAKEY=Symbol("[[metadata]]"),Metadata={defineMetadata:function(e,t,r){-1===Reflect.ownKeys(r).indexOf(METADATAKEY)&&Reflect.defineProperty(r,METADATAKEY,{enumerable:!1,configurable:!1,writable:!1,value:{}}),r[METADATAKEY][e]=t},hasMetadata:function(e,t){for(var r=t,a=!1;r;){if(-1!==Reflect.ownKeys(r).indexOf(METADATAKEY)&&r[METADATAKEY][e]){a=!0;break}r=Reflect.getPrototypeOf(r)}return a},hasOwnMetadata:function(e,t){return-1!==Reflect.ownKeys(t).indexOf(METADATAKEY)&&void 0!==t[METADATAKEY][e]},getMetadata:function(e,t){for(var r=t,a=void 0;r;){if(-1!==Reflect.ownKeys(r).indexOf(METADATAKEY)){a=r[METADATAKEY][e];break}r=Reflect.getPrototypeOf(r)}return a},getMetadataExtends:function(e,t){for(var r=t,a=[];r;)-1!==Reflect.ownKeys(r).indexOf(METADATAKEY)&&a.push(r[METADATAKEY][e]),r=Reflect.getPrototypeOf(r);return Object.assign.apply(Object,[{}].concat(_toConsumableArray(a.reverse())))},getOwnMetadata:function(e,t){return-1!==Reflect.ownKeys(t).indexOf(METADATAKEY)?t[METADATAKEY][e]:void 0},getMetadataKeys:function(e){for(var t=e,r=[{}];t;)-1!==Reflect.ownKeys(t).indexOf(METADATAKEY)&&r.push(t[METADATAKEY]),t=Reflect.getPrototypeOf(t);return r.length>1?Reflect.ownKeys(Object.assign.apply(Object,r)).map(function(e){return e}):[]},getOwnMetadataKeys:function(e){return e[METADATAKEY]?Reflect.ownKeys(e[METADATAKEY]).map(function(e){return e}):[]},deleteMetadata:function(e,t){t[METADATAKEY]&&Reflect.deleteProperty(t[METADATAKEY],e)}},_default=Metadata;exports.default=_default;},function(module,exports,require){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _tags=_interopRequireDefault(require(11));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var macros={module:function(t){var e=t.bodyStr,a=t.props,o=(t.events,t.attrs),r=['data-module=""'];return Reflect.ownKeys(o).forEach(function(t){return r.push("".concat(t,'="').concat(t,'"'))}),{template:"<div ".concat(r.join(" "),">").concat(e,"</div>"),data:a}},custom:function(t){var e=t.bodyStr,a=t.props,o=(t.events,t.attrs),r=t.option,n=['data-module=""'];Reflect.ownKeys(o).forEach(function(t){return n.push("".concat(t,'="').concat(t,'"'))});var c="<div ".concat(n.join(" "),">").concat(e,"</div>"),u=a.customTagName,d=r.tags?r.tags[u]:null;if(d||(d=_tags.default.get(u)),!d)throw Error("[ada] tag [".concat(u,"] can not defined"));return a.type=d,{template:c,data:a}}},_default=macros;exports.default=_default;},function(module,exports,require){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _base=_interopRequireDefault(require(17));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var updater={refresh:function(e,r){return _base.default.replaceAll(e,r)}},_default=updater;exports.default=_default;},function(module,exports,require){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _controllbar=_interopRequireDefault(require(18)),_controllbar2=_interopRequireDefault(require(19)),_controllerPlay=_interopRequireDefault(require(20)),_controllerPaus=_interopRequireDefault(require(21));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}var STOPSTATE="ada-hmr-controllbar-stop",s=window.localStorage.getItem("ada-hmr-state");void 0===s?(s=!0,window.localStorage.setItem("ada-hmr-state","0")):s="0"===s;var bar={bar:null,isrunning:s,start:function(){var t=this;_controllbar.default.active(),_controllerPlay.default.active(),_controllerPaus.default.active();var e=document.createElement("div");e.setAttribute("class","ada-hmr-controllbar"),e.innerHTML=_controllbar2.default,this.bar=document.body.appendChild(e);var r=window.localStorage.getItem("ada-hmr-position");return r=r?JSON.parse(r):{x:30,y:window.innerHeight-30},this.bar.style.left="".concat(r.x,"px"),this.bar.style.top="".concat(r.y,"px"),_toConsumableArray(this.bar.querySelectorAll(".ada-hmr-controllerbar-btn-paus"))[0].addEventListener("click",function(){t.isrunning=!1,t.bar.classList.add(STOPSTATE),window.localStorage.setItem("ada-hmr-state","1")}),_toConsumableArray(this.bar.querySelectorAll(".ada-hmr-controllerbar-btn-play"))[0].addEventListener("click",function(){t.isrunning=!0,t.bar.classList.remove(STOPSTATE),window.localStorage.setItem("ada-hmr-state","0")}),this.ismove=!1,this.offset={x:0,y:0},this.bar.addEventListener("mousedown",function(e){var r=t.bar.getBoundingClientRect();t.ismove=!0,t.offset={x:e.pageX-r.x,y:e.pageY-r.y}}),document.addEventListener("mousemove",function(e){t.ismove&&(t.bar.style.left="".concat(e.pageX-t.offset.x,"px"),t.bar.style.top="".concat(e.pageY-t.offset.y,"px"),e.stopPropagation(),e.preventDefault())}),document.addEventListener("mouseup",function(e){t.ismove&&(t.ismove=!1,window.localStorage.setItem("ada-hmr-position",JSON.stringify({x:e.pageX-t.offset.x,y:e.pageY-t.offset.y})))}),this.isrunning?this.bar.classList.remove(STOPSTATE):this.bar.classList.add(STOPSTATE),this},getState:function(){return this.isrunning},hide:function(){this.bar.style.display="none"},show:function(){this.bar.style.display="flex"},actionStart:function(){this.bar.classList.add("ada-hmr-controllbar-action")},actionDone:function(){this.bar.classList.remove("ada-hmr-controllbar-action")}},_default=bar;exports.default=_default;},function(module,exports,require){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _teminal=_interopRequireDefault(require(22)),_teminal2=_interopRequireDefault(require(23)),_ddm=_interopRequireDefault(require(6));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var teminal={element:null,init:function(){_teminal.default.active()},showError:function(e){this.hide();var t=document.createElement("div");t.setAttribute("class","ada-hmr-teminal"),document.body.appendChild(t),e.forEach(function(e){e.result.stack&&(e.result.stack=e.result.stack.split("\n"))}),new _ddm.default({id:"ada-hmr-teminal",container:t,binders:{},templateStr:_teminal2.default,macro:{}}).render({info:e}),this.element=t},hide:function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}},_default=teminal;exports.default=_default;},function(module,exports,require){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _metadata=_interopRequireDefault(require(12)),_factory=_interopRequireDefault(require(4)),_util=_interopRequireDefault(require(10)),_loader=_interopRequireWildcard(require(2)),_const=require(7),_tags=_interopRequireDefault(require(11)),_const2=require(7);function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,o):{};n.get||n.set?Object.defineProperty(t,o,n):t[o]=e[o]}return t.default=e,t}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,o=new Array(e.length);t<e.length;t++)o[t]=e[t];return o}}var ExtendModule={getRootElement:function(){return window.document.getElementById(_const.ROOTELEMENTNAME)},isMapped:function(e,t){return void 0!==t[_util.default.getMappedPath(e)]},setViewPreremoveState:function(e){var t=this;e[_const2.PREREMOVED]=!0,e.getChildren&&e.getChildren().forEach(function(e){t.setViewPreremoveState(e)})},getViewsInModule:function(e){var t=[];return _loader.Modules.scanClass(function(o,n){var r=_metadata.default.getMetadata("view",n.prototype);r&&r.module===e&&t.push(n)}),t},getViewsInPageByType:function(e){var t=[];return _toConsumableArray(document.querySelectorAll("[data-module]")).forEach(function(o){var n=o[_const.VIEWTAG];n instanceof e&&t.push(n)}),t},getViewsByTemplateName:function(e){var t=this,o=[];_loader.Modules.scanClass(function(t,n){var r=_metadata.default.getMetadata("view",n.prototype);r&&r.template===e&&o.push(n)});var n=[];return o.forEach(function(e){n.push.apply(n,_toConsumableArray(t.getViewsInPageByType(e)))}),n},getViewsByStyleName:function(e){var t=this,o=[];_loader.Modules.scanClass(function(t,n){var r=_metadata.default.getMetadata("view",n.prototype);r&&r.style===e&&o.push(n)});var n=[];return o.forEach(function(e){n.push.apply(n,_toConsumableArray(t.getViewsInPageByType(e)))}),n},getChangeModules:function(e){var t=this,o=_toConsumableArray(e);return Reflect.ownKeys(_loader.ModuleLoader.moduleFnsLoaded).forEach(function(n){var r=_loader.ModuleLoader.moduleFnsLoaded[n].toString();e.forEach(function(e){new RegExp('require\\("'.concat(e,'"\\)')).test(r)&&-1===o.indexOf(n)&&(o.push(n),t.getChangeModules([n]).forEach(function(e){-1===o.indexOf(e)&&o.push(e)}))})}),o},getFutureChangedInfo:function(e){var t=e.map(function(e){return{file:e,clazz:_loader.Modules.get(e)}}),o=[],n=!1;_toConsumableArray(document.querySelectorAll("[data-module]")).forEach(function(e){var r=e[_const.VIEWTAG];if(r)for(var a=0;a<t.length;a++){var l=t[a];if(_util.default.isFunction(l.clazz)&&r instanceof l.clazz&&(e===document.getElementById("ada-root")&&(n=!0,o.length=0),o.push({element:e,construct:l.clazz,module:r,name:l.file}),n))break}});var r=[];return n?r=[o[0]]:o.forEach(function(e){var t=e.element,o=!1;r.forEach(function(e){e.element.contains(t)&&(o=!0)}),o||r.push(e)}),{infos:r,isroot:n}},uninstallModules:function(e){var t=this;e.forEach(function(e){delete _loader.ModuleLoader.installed[e],delete _loader.ModuleLoader.moduleFnsLoaded[e],t.getViewsInModule(e).forEach(function(e){return _tags.default.remove(e)})})},installModules:function(e){return _util.default.queue(e.map(function(e){return function(){return _loader.Modules.excute(e)}}))},uninstallTemplates:function(e){e.forEach(function(e){_loader.ActiveSource.cache[e]&&delete _loader.ActiveSource.cache[e]})},uninstallStyles:function(e){e.forEach(function(e){_loader.ActiveSource.cache[e]&&delete _loader.ActiveSource.cache[e]})},resetSourceMap:function(e){_loader.Option.sourceMap=e},resetViewTemplate:function(e){if(e.isRemoved())return Promise.resolve();var t=e.getElement(),o=e.constructor,n=_metadata.default.getMetadata("view",o.prototype);return this.resetView({element:t,view:e,clazz:o,isroot:void 0===n})},resetViewStyle:function(e){var t=_metadata.default.getMetadata("view",e.constructor.prototype);t||(t=_metadata.default.getMetadata("root",e.constructor.prototype));var o=Promise.resolve();if(t.style){var n="".concat(t.style.replace(/\//g,"-"),":").concat(t.className),r=document.getElementById(n);r&&r.parentNode.removeChild(r),o=o.then(function(){return _loader.default.loadSource(t.style).then(function(e){_util.default.excuteStyle(_util.default.parseStyle(e,t.className),n)})})}return o},resetView:function(e){var t=e.view,o=e.clazz,n=e.element,r=e.isroot;return t.isRemoved()||(this.setViewPreremoveState(t),t.getChildren&&t.getChildren().forEach(function(e){e.getElement().parentNode.removeChild(e.getElement())}),t.getElement().innerHTML=""),_factory.default.getViewInstance({viewClass:o,data:t.data,option:t.option,parent:t.getParent(),dom:n,tag:r?"root":"view"}).then(function(e){if(!t.isRemoved()){if(t.getParent()){var o=t.getParent().getChildren(),r=o.indexOf(t);-1!==r&&(o[r]=e)}n[_const.VIEWTAG]=e,t._clean(),e.render()}})},replaceViews:function(e,t,o){var n=this,r=new Set,a=new Set;return this.uninstallTemplates(e),this.uninstallStyles(t),this.resetSourceMap(o),e.forEach(function(e){n.getViewsByTemplateName(e).forEach(function(e){r.add(e)})}),t.forEach(function(e){n.getViewsByStyleName(e).forEach(function(e){a.add(e)})}),r.size>0&&console.log("%c- Try to update [".concat(r.size,"] views[ template ]..."),"color:#3D78A7;font-weight:bold"),a.size>0&&console.log("%c- Try to update [".concat(a.size,"] views[ style ]..."),"color:#3D78A7;font-weight:bold"),r.size>0||a.size>0?_util.default.queue(_toConsumableArray(r).map(function(e){return function(){return n.resetViewTemplate(e)}}).concat(_toConsumableArray(a).map(function(e){return function(){return n.resetViewStyle(e)}}))).then(function(){return console.log("%c- Replace done.","color:#3D78A7;font-weight:bold"),[]}):(console.log("%c- No view to update","color:#3D78A7;font-weight:bold"),Promise.resolve(_toConsumableArray(e).concat(_toConsumableArray(t))))},replaceModules:function(e,t){var o=this,n=this.getChangeModules(e);console.log("%c- Affect ".concat(n.length>1?"modules":"module"," [").concat(n.join(","),"]"),"color:#3D78A7;font-weight:bold");var r=this.getFutureChangedInfo(n);return this.uninstallModules(n),this.resetSourceMap(t),console.log("%c- Reset ".concat(n.length>1?"modules":"module"," and reinstall ").concat(n.length>1?"them":"it","..."),"color:#3D78A7;font-weight:bold"),this.installModules(n).then(function(){if(r.infos.length>0)return console.log("%c- Install modules done,Reset page [".concat(r.isroot?"From ROOT":"From Entry","]..."),"color:#3D78A7;font-weight:bold"),console.log("%c- Try to update [".concat(r.infos.length,"] views..."),"color:#3D78A7;font-weight:bold"),_util.default.queue(r.infos.map(function(e){return function(){var t=e.element,n=e.module,a=e.name,l=_loader.Modules.get(a);return o.resetView({view:n,clazz:l,element:t,isroot:r.isroot})}})).then(function(){console.log("%c- Reset page done.","color:#3D78A7;font-weight:bold")});console.log("%c- Install modules done,No view to update","color:#3D78A7;font-weight:bold")})},replaceAll:function(e,t){var o=this,n=new Date,r={year:n.getFullYear(),month:n.getMonth()+1,day:n.getDate(),hour:n.getHours(),minus:n.getMinutes(),second:n.getSeconds()};Reflect.ownKeys(r).forEach(function(e){r[e]<10&&(r[e]="0".concat(r[e]))}),console.log("%c[Ada] Start HMR  ".concat(r.year,"-").concat(r.month,"-").concat(r.day," ").concat(r.hour,":").concat(r.minus,":").concat(r.second),"font-weight:bold");var a=[],l=[],i=[],u=Promise.resolve([]),c=[];return(e=e.filter(function(e){var n=o.isMapped(e,t);return n||c.push(e),n})).length>0?(e.forEach(function(e){var t=e.split(".").pop();"html"===t?a.push(e):-1!==["css","scss","less"].indexOf(t)?l.push(e):i.push(e)}),(a.length>0||l.length>0)&&(u=u.then(function(){return console.log("%c- Try to replace as template or style","color:#3D78A7;font-weight:bold"),o.replaceViews(a,l,t)})),u.then(function(e){var n=_toConsumableArray(e).concat(i);return n.length>0?(console.log("%c- Try to replace as module","color:#3D78A7;font-weight:bold"),o.replaceModules(n,t)):Promise.resolve()}).then(function(){console.log("%cAll done.","font-weight:bold")})):u.then(function(){c.length>0&&console.log("%c- ".concat(c.length>1?"files":"file"," [").concat(c.join(","),"] ").concat(c.length>1?"are":"is"," out map"),"color:#3D78A7;font-weight:bold"),console.log("%cAll done,Nothing to update.","font-weight:bold")})}},_default=ExtendModule;exports.default=_default;},function(module,exports,require){module.exports={active:function(){var _a = document.createElement("style");_a.setAttribute("media", "screen");_a.setAttribute("type", "text/css");_a.appendChild(document.createTextNode(".ada-hmr-controllbar { position: fixed; left: 10px; z-index: 999999999; cursor: default; } .ada-hmr-controllbar .ada-hmr-controllbar-box .ada-hmr-controllbar-logocon { width: 30px; height: 30px; } .ada-hmr-controllbar .ada-hmr-controllbar-box .ada-hmr-controllbar-logo { margin-left: -135px; margin-top: -135px; transform: scale(0.1, 0.1); padding: 80px; display: inline-block; position: relative; box-shadow: 0 0 10px #676767; border-radius: 50%; background: white; } .ada-hmr-controllbar .ada-hmr-controllbar-box .ada-hmr-controllbar-logo .ada-hmr-controllbar-logo-box { width: 140px; display: inline-block; vertical-align: middle; text-align: right; } .ada-hmr-controllbar .ada-hmr-controllbar-box .ada-hmr-controllbar-logo .ada-hmr-controllbar-logo-box .ada-hmr-controllbar-logo-top { height: 40px; background: #4F79AE; border-radius: 30px 60px 0 30px; width: 120px; display: inline-block; vertical-align: top; transition: all ease-out 0.2s; } .ada-hmr-controllbar .ada-hmr-controllbar-box .ada-hmr-controllbar-logo .ada-hmr-controllbar-logo-box .ada-hmr-controllbar-logo-middle { height: 40px; margin: 10px 0 10px 0; border-radius: 60px 0 0 0; background: #4F79AE; transition: all ease-out 0.2s; } .ada-hmr-controllbar .ada-hmr-controllbar-box .ada-hmr-controllbar-logo .ada-hmr-controllbar-logo-box .ada-hmr-controllbar-logo-bottom { height: 40px; border-radius: 0 0 60px 60px; background: #4F79AE; transition: all ease-out 0.2s; } .ada-hmr-controllbar .ada-hmr-controllbar-box .ada-hmr-controllbar-logo .ada-hmr-controllbar-logo-circle { position: absolute; left: 0; top: 0; right: 0; bottom: 0; border: 10px solid #4F79AE; border-radius: 50%; animation: ada-hmr-controllbar-logo-rond 2s infinite; -webkit-animation: ada-hmr-controllbar-logo-rond 2s infinite; } .ada-hmr-controllbar .ada-hmr-controllbar-box .ada-hmr-controllbar-logo .ada-hmr-controllbar-logo-circle:after { content: \"\"; display: block; width: 40px; height: 40px; position: absolute; background-color: #3D78A7; border-radius: 50%; top: -40px; left: 70px; } .ada-hmr-controllbar .ada-hmr-controllbar-box .ada-hmr-controllbar-btns { position: absolute; left: 3px; top: 3px; text-align: center; display: none; background: #097CF5; border-radius: 12px; } .ada-hmr-controllbar .ada-hmr-controllbar-box .ada-hmr-controllbar-btns .ada-hmr-controllbar-btn { width: 24px; height: 24px; text-align: center; font-size: 12px; color: white; line-height: 27px; transition: all ease-out 0.3s; } .ada-hmr-controllbar .ada-hmr-controllbar-box .ada-hmr-controllbar-btns .ada-hmr-controllbar-btn .ada-hmr-controllbar-icon { display: inline-block; width: 1em; height: 1em; stroke-width: 0; stroke: currentColor; fill: currentColor; } .ada-hmr-controllbar .ada-hmr-controllbar-box .ada-hmr-controllbar-btns .ada-hmr-controllbar-btn.ada-hmr-controllerbar-btn-play { display: none; } .ada-hmr-controllbar .ada-hmr-controllbar-box .ada-hmr-controllbar-btns .ada-hmr-controllbar-btn.ada-hmr-controllerbar-btn-paus { display: inline-block; } .ada-hmr-controllbar .ada-hmr-controllbar-box .ada-hmr-controllbar-btns .ada-hmr-controllbar-btn:hover { color: #E5E5E5; } .ada-hmr-controllbar .ada-hmr-controllbar-box:hover .ada-hmr-controllbar-btns { display: flex; } .ada-hmr-controllbar.ada-hmr-controllbar-stop .ada-hmr-controllbar-box .ada-hmr-controllbar-logo .ada-hmr-controllbar-logo-circle:after { display: none; } .ada-hmr-controllbar.ada-hmr-controllbar-stop .ada-hmr-controllbar-box .ada-hmr-controllbar-btns .ada-hmr-controllbar-btn.ada-hmr-controllerbar-btn-play { display: inline-block; } .ada-hmr-controllbar.ada-hmr-controllbar-stop .ada-hmr-controllbar-box .ada-hmr-controllbar-btns .ada-hmr-controllbar-btn.ada-hmr-controllerbar-btn-paus { display: none; } .ada-hmr-controllbar.ada-hmr-controllbar-action .ada-hmr-controllbar-box .ada-hmr-controllbar-logo .ada-hmr-controllbar-logo-box .ada-hmr-controllbar-logo-top { background: #ffc66d; } .ada-hmr-controllbar.ada-hmr-controllbar-action .ada-hmr-controllbar-box .ada-hmr-controllbar-logo .ada-hmr-controllbar-logo-box .ada-hmr-controllbar-logo-middle { background: #ffc66d; } .ada-hmr-controllbar.ada-hmr-controllbar-action .ada-hmr-controllbar-box .ada-hmr-controllbar-logo .ada-hmr-controllbar-logo-box .ada-hmr-controllbar-logo-bottom { background: #ffc66d; } @keyframes ada-hmr-controllbar-logo-rond { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } @-webkit-keyframes ada-hmr-controllbar-logo-rond { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } }"));document.head.appendChild(_a);}};},function(module,exports,require){module.exports="<div class=\"ada-hmr-controllbar-box\">    <div class=\"ada-hmr-controllbar-logocon\">        <div class=\"ada-hmr-controllbar-logo\">            <div class=\"ada-hmr-controllbar-logo-box\">                <div class=\"ada-hmr-controllbar-logo-top\"></div>                <div class=\"ada-hmr-controllbar-logo-middle\"></div>                <div class=\"ada-hmr-controllbar-logo-bottom\"></div>            </div>            <div class=\"ada-hmr-controllbar-logo-circle\"></div>        </div>    </div>    <div class=\"ada-hmr-controllbar-btns\">        <div class=\"ada-hmr-controllbar-btn ada-hmr-controllerbar-btn-paus\">            <svg class=\"ada-hmr-controllbar-icon\">                <use xlink:href=\"#ada-hmr-controllbar-paus\"></use>            </svg>        </div>        <div class=\"ada-hmr-controllbar-btn ada-hmr-controllerbar-btn-play\">            <svg class=\"ada-hmr-controllbar-icon\">                <use xlink:href=\"#ada-hmr-controllbar-play\"></use>            </svg>        </div>    </div></div>"},function(module,exports,require){var active=function(){var c=document.getElementById("ada-icon-container");if(!c){var c=document.createElement("div");c.setAttribute("id","ada-icon-container");c.style.cssText="width:0;height:0;";document.body.appendChild(c);}if(!document.getElementById("ada-hmr-controllbar-play")){var a=document.createElement("div");a.innerHTML="<svg style=\"width:0;height:0;overflow:hidden;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><symbol   width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" id=\"ada-hmr-controllbar-play\"><title>ada-hmr-controllbar-play</title><path d=\"M15 10.001c0 0.299-0.305 0.514-0.305 0.514l-8.561 5.303c-0.624 0.409-1.134 0.106-1.134-0.669v-10.297c0-0.777 0.51-1.078 1.135-0.67l8.561 5.305c-0.001 0 0.304 0.215 0.304 0.514z\"></path></symbol></svg>";c.appendChild(a.childNodes[0]);}};module.exports={active:function(){if(/complete|loaded|interactive/.test(window.document.readyState)){active();}else{window.addEventListener("DOMContentLoaded",function(){active();});}},getIconId:function(){return "ada-hmr-controllbar-play";}};},function(module,exports,require){var active=function(){var c=document.getElementById("ada-icon-container");if(!c){var c=document.createElement("div");c.setAttribute("id","ada-icon-container");c.style.cssText="width:0;height:0;";document.body.appendChild(c);}if(!document.getElementById("ada-hmr-controllbar-paus")){var a=document.createElement("div");a.innerHTML="<svg style=\"width:0;height:0;overflow:hidden;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><symbol   width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" id=\"ada-hmr-controllbar-paus\"><title>ada-hmr-controllbar-paus</title><path d=\"M15 3h-2c-0.553 0-1 0.048-1 0.6v12.8c0 0.552 0.447 0.6 1 0.6h2c0.553 0 1-0.048 1-0.6v-12.8c0-0.552-0.447-0.6-1-0.6zM7 3h-2c-0.553 0-1 0.048-1 0.6v12.8c0 0.552 0.447 0.6 1 0.6h2c0.553 0 1-0.048 1-0.6v-12.8c0-0.552-0.447-0.6-1-0.6z\"></path></symbol></svg>";c.appendChild(a.childNodes[0]);}};module.exports={active:function(){if(/complete|loaded|interactive/.test(window.document.readyState)){active();}else{window.addEventListener("DOMContentLoaded",function(){active();});}},getIconId:function(){return "ada-hmr-controllbar-paus";}};},function(module,exports,require){module.exports={active:function(){var _a = document.createElement("style");_a.setAttribute("media", "screen");_a.setAttribute("type", "text/css");_a.appendChild(document.createTextNode(".ada-hmr-teminal { position: fixed; left: 0; top: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.9); z-index: 999999999; font-family: 'Noto Sans SC Sliced', sans-serif; } .ada-hmr-teminal .ada-hmr-teminal-head { position: absolute; left: 0; top: 0; right: 0; padding: 0 10px 0 10px; font-size: 14px; color: white; line-height: 40px; } .ada-hmr-teminal .ada-hmr-teminal-content { position: absolute; left: 0; right: 0; bottom: 0; top: 40px; border-top: 1px solid #353538; overflow: auto; } .ada-hmr-teminal .ada-hmr-teminal-content .ada-hmr-teminal-content-item { padding: 0 10px 0 10px; } .ada-hmr-teminal .ada-hmr-teminal-content .ada-hmr-teminal-content-item .ada-hmr-teminal-content-item-title { line-height: 30px; color: #ffc66d; font-size: 12px; border-bottom: 1px solid white; } .ada-hmr-teminal .ada-hmr-teminal-content .ada-hmr-teminal-content-item .ada-hmr-teminal-content-item-content { color: #e20608; font-size: 12px; line-height: 14px; } .ada-hmr-teminal .ada-hmr-teminal-content .ada-hmr-teminal-content-item .ada-hmr-teminal-content-item-content .ada-hmr-teminal-content-item-content-inner { padding: 3px 20px 3px 0; } .ada-hmr-teminal .ada-hmr-teminal-content .ada-hmr-teminal-content-item .ada-hmr-teminal-content-item-content .ada-hmr-teminal-content-item-content-a { width: 70px; color: #a9b7c6; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; float: left; } .ada-hmr-teminal .ada-hmr-teminal-content .ada-hmr-teminal-content-item .ada-hmr-teminal-content-item-content .ada-hmr-teminal-content-item-content-b { margin-left: 80px; } .ada-hmr-teminal .ada-hmr-teminal-content .ada-hmr-teminal-content-item .ada-hmr-teminal-content-item-content .ada-hmr-teminal-content-item-content-b .ada-hmr-teminal-content-item-content-b-a { line-height: 15px; }"));document.head.appendChild(_a);}};},function(module,exports,require){module.exports="<div class=\"ada-hmr-teminal-head\">ada-pack errors</div><div class=\"ada-hmr-teminal-content\">    {{list info as item}}    <div class=\"ada-hmr-teminal-content-item\">        <div class=\"ada-hmr-teminal-content-item-title\">{{item.path}}</div>        <div class=\"ada-hmr-teminal-content-item-content\">            <div class=\"ada-hmr-teminal-content-item-content-inner\">                <div class=\"ada-hmr-teminal-content-item-content-a\">name</div>                <div class=\"ada-hmr-teminal-content-item-content-b\">{{item.result.name}}</div>            </div>            <div class=\"ada-hmr-teminal-content-item-content-inner\">                <div class=\"ada-hmr-teminal-content-item-content-a\">message</div>                <div class=\"ada-hmr-teminal-content-item-content-b\">{{item.result.message}}</div>            </div>            <div class=\"ada-hmr-teminal-content-item-content-inner\">                <div class=\"ada-hmr-teminal-content-item-content-a\">stack</div>                <div class=\"ada-hmr-teminal-content-item-content-b\">                    {{list item.result.stack as stack}}                    <div class=\"ada-hmr-teminal-content-item-content-b-a\">{{stack}}</div>                    {{/list}}                </div>            </div>        </div>    </div>    {{/list}}</div>"},function(module,exports,require){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var EVENTTYPES={HTMLEvents:"load,unload,abort,error,select,change,submit,reset,focus,blur,resize,scroll",MouseEvent:"click,mousedown,mouseup,mouseover,mousemove,mouseout",UIEvent:"DOMFocusIn,DOMFocusOut,DOMActivate",MutationEvent:"DOMSubtreeModified,DOMNodeInserted,DOMNodeRemoved,DOMNodeRemovedFromDocument,DOMNodeInsertedIntoDocument,DOMAttrModified,DOMCharacterDataModified"},UNBUBBLINGEVENT=["unload","abort","error","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","progress","load","loadend","pointerenter","pointerleave","rowexit","stop","finish","bounce","afterprint","propertychange","filterchange","readystatechange","losecapture","dragdrop","dragenter","dragexit","draggesture","dragover","RadioStateChange","close","command","contextmenu","overflow","overflowchanged","underflow","popuphidden","popuphiding","popupshowing","popupshown","commandupdate"];function eventHandler(e){var t=e.currentTarget.events[e.type];for(var n in t)t[n].call(e.currentTarget,e)}var helper={isEvent:function(e){var t={type:e,interfaceName:null};for(var n in EVENTTYPES)if(-1!==EVENTTYPES[n].indexOf(e)){t.interfaceName=n;break}return t},trigger:function(e,t,n){var r=helper.isEvent(t);if(r.interfaceName){var o=document.createEvent(r.interfaceName);switch(r.interfaceName){case"MouseEvent":o.initMouseEvent(t,!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null);break;case"HTMLEvents":o.initEvent(t,!0,!1,window);break;case"UIEvents":o.initUIEvents(t,!0,!1,window,null);break;case"MutationEvent ":o.initMutationEvent(t,!0,!1,window,null,null,null,null)}e.dispatchEvent(o)}else{var a=document.createEvent("CustomEvent");a.initCustomEvent(t,!0,!0,n),e.dispatchEvent(a)}return e},canBubbleUp:function(e){return-1===UNBUBBLINGEVENT.indexOf(e)},bind:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return e.events||(e.events={}),e.events[t]?e.events[t].push(n):(e.events[t]=[],e.events[t].push(n)),e.addEventListener(t,eventHandler,r),e},unbind:function(e,t,n){if(e.events)if(t&&""!==t){var r=e.events[t];r&&(e.removeEventListener(t,eventHandler,!1),n?r.splice(r.indexOf(n),1):r.length=0)}else{e.events;Reflect.ownKeys(e.events).forEach(function(t){e.removeEventListener(t,eventHandler,!1),e.events[t].length=0})}return e}},_default=helper;exports.default=_default;},function(module,exports,require){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ajax",{enumerable:!0,get:function(){return _request.ajax}}),Object.defineProperty(exports,"get",{enumerable:!0,get:function(){return _request.get}}),Object.defineProperty(exports,"post",{enumerable:!0,get:function(){return _request.post}}),Object.defineProperty(exports,"binder",{enumerable:!0,get:function(){return _view.binder}}),Object.defineProperty(exports,"BondViewGroup",{enumerable:!0,get:function(){return _view.BondViewGroup}}),Object.defineProperty(exports,"handler",{enumerable:!0,get:function(){return _view.handler}}),Object.defineProperty(exports,"root",{enumerable:!0,get:function(){return _view.root}}),Object.defineProperty(exports,"StaticViewGroup",{enumerable:!0,get:function(){return _view.StaticViewGroup}}),Object.defineProperty(exports,"View",{enumerable:!0,get:function(){return _view.View}}),Object.defineProperty(exports,"view",{enumerable:!0,get:function(){return _view.view}}),Object.defineProperty(exports,"ViewGroup",{enumerable:!0,get:function(){return _view.ViewGroup}}),Object.defineProperty(exports,"action",{enumerable:!0,get:function(){return _dataset.action}}),Object.defineProperty(exports,"pipe",{enumerable:!0,get:function(){return _dataset.pipe}}),Object.defineProperty(exports,"dataset",{enumerable:!0,get:function(){return _dataset.dataset}}),Object.defineProperty(exports,"DataSet",{enumerable:!0,get:function(){return _dataset.DataSet}}),Object.defineProperty(exports,"DataSetAspect",{enumerable:!0,get:function(){return _dataset.DataSetAspect}}),Object.defineProperty(exports,"DataSetHelper",{enumerable:!0,get:function(){return _dataset.DataSetHelper}}),Object.defineProperty(exports,"Service",{enumerable:!0,get:function(){return _dataset.Service}}),Object.defineProperty(exports,"TransactDataSet",{enumerable:!0,get:function(){return _dataset.TransactDataSet}}),Object.defineProperty(exports,"Dispatcher",{enumerable:!0,get:function(){return _dispatcher.Dispatcher}}),Object.defineProperty(exports,"subscribe",{enumerable:!0,get:function(){return _dispatcher.subscribe}}),exports.default=exports.DDM=void 0;var _request=require(0),_view=require(1),_loader=_interopRequireWildcard(require(2)),_dataset=require(3),_factory=_interopRequireDefault(require(4)),_client=_interopRequireDefault(require(5)),_ddm=_interopRequireDefault(require(6)),_const=require(7),_dispatcher=require(8);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}require(9);var ada={modules:_loader.Modules,boot:_factory.default.boot,unpack:function(e){_loader.default.decompress(e)},installModule:function(e,t){_loader.Modules.set(e,t)},view:function(e){return e[_const.VIEWTAG]},client:_client.default},DDM={setDefaultMacro:_ddm.default.setDefaultMacro,setDefaultAssignDirective:_ddm.default.setDefaultAssignDirective};exports.DDM=DDM,window.Ada=ada;var _default=ada;exports.default=_default;}],"adajs");